openspecui 0.7.0 → 0.7.2

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,464 @@
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/angular-html-CU67Zn6k.js","assets/html-GMplVEZG.js","assets/javascript-wDzz0qaB.js","assets/css-DPfMkruS.js","assets/angular-ts-BwZT4LLn.js","assets/scss-OYdSNvt2.js","assets/apl-dKokRX4l.js","assets/xml-sdJ4AIDG.js","assets/java-CylS5w8V.js","assets/json-Cp-IABpG.js","assets/astro-CbQHKStN.js","assets/typescript-BPQ3VLAy.js","assets/postcss-CXtECtnM.js","assets/tsx-COt5Ahok.js","assets/blade-DVc8C-J4.js","assets/html-derivative-BFtXZ54Q.js","assets/sql-BLtJtn59.js","assets/bsl-BO_Y6i37.js","assets/sdbl-DVxCFoDh.js","assets/cairo-KRGpt6FW.js","assets/python-B6aJPvgy.js","assets/cobol-nwyudZeR.js","assets/coffee-Ch7k5sss.js","assets/cpp-CofmeUqb.js","assets/regexp-CDVJQ6XC.js","assets/glsl-DplSGwfg.js","assets/c-BIGW1oBm.js","assets/crystal-tKQVLTB8.js","assets/shellscript-Yzrsuije.js","assets/edge-BkV0erSs.js","assets/elixir-CDX3lj18.js","assets/elm-DbKCFpqz.js","assets/erb-BOJIQeun.js","assets/ruby-BvKwtOVI.js","assets/haml-B8DHNrY2.js","assets/graphql-ChdNCCLP.js","assets/jsx-g9-lgVsj.js","assets/lua-BbnMAYS6.js","assets/yaml-Buea-lGh.js","assets/erlang-DsQrWhSR.js","assets/markdown-Cvjx9yec.js","assets/fortran-fixed-form-BZjJHVRy.js","assets/fortran-free-form-D22FLkUw.js","assets/fsharp-CXgrBDvD.js","assets/gdresource-B7Tvp0Sc.js","assets/gdshader-DkwncUOv.js","assets/gdscript-DTMYz4Jt.js","assets/git-commit-F4YmCXRG.js","assets/diff-D97Zzqfu.js","assets/git-rebase-r7XF79zn.js","assets/glimmer-js-Rg0-pVw9.js","assets/glimmer-ts-U6CK756n.js","assets/hack-CaT9iCJl.js","assets/handlebars-BL8al0AC.js","assets/http-jrhK8wxY.js","assets/hurl-irOxFIW8.js","assets/csv-fuZLfV_i.js","assets/hxml-Bvhsp5Yf.js","assets/haxe-CzTSHFRz.js","assets/jinja-4LBKfQ-Z.js","assets/jison-wvAkD_A8.js","assets/julia-C8NyazO9.js","assets/r-DiinP2Uv.js","assets/latex-BdAV_C_H.js","assets/tex-CxkMU7Pf.js","assets/liquid-DYVedYrR.js","assets/marko-CPi9NSCl.js","assets/less-B1dDrJ26.js","assets/mdc-DUICxH0z.js","assets/nginx-DknmC5AR.js","assets/nim-CVrawwO9.js","assets/perl-C0TMdlhV.js","assets/php-CDn_0X-4.js","assets/pug-CGlum2m_.js","assets/qml-3beO22l8.js","assets/razor-CE9lU5zL.js","assets/csharp-K5feNrxe.js","assets/rst-B0xPkSld.js","assets/cmake-D1j8_8rp.js","assets/sas-cz2c8ADy.js","assets/shaderlab-Dg9Lc6iA.js","assets/hlsl-D3lLCCz7.js","assets/shellsession-BADoaaVG.js","assets/soy-Brmx7dQM.js","assets/sparql-rVzFXLq3.js","assets/turtle-BsS91CYL.js","assets/stata-BH5u7GGu.js","assets/svelte-3Dk4HxPD.js","assets/templ-W15q3VgB.js","assets/go-Dn2_MT6a.js","assets/ts-tags-zn1MmPIZ.js","assets/twig-CO9l9SDP.js","assets/vue-DnHKYNfI.js","assets/vue-html-CChd_i61.js","assets/vue-vine-8moa0y9V.js","assets/stylus-BEDo0Tqx.js","assets/xsl-CtQFsRM5.js","assets/dockerfile-BKs6k2Af.js","assets/simple-mode-GW_nhZxv.js","assets/factor-kuTfRLto.js","assets/nsis-LdVXkNf5.js","assets/pug-DeIclll2.js","assets/javascript-iXu5QeM3.js"])))=>i.map(i=>d[i]);
2
+ var q3=Object.defineProperty;var dT=t=>{throw TypeError(t)};var U3=(t,e,n)=>e in t?q3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n;var ce=(t,e,n)=>U3(t,typeof e!="symbol"?e+"":e,n),Ay=(t,e,n)=>e.has(t)||dT("Cannot "+n);var I=(t,e,n)=>(Ay(t,e,"read from private field"),n?n.call(t):e.get(t)),Ee=(t,e,n)=>e.has(t)?dT("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,n),_e=(t,e,n,i)=>(Ay(t,e,"write to private field"),i?i.call(t,n):e.set(t,n),n),Xe=(t,e,n)=>(Ay(t,e,"access private method"),n);var bp=(t,e,n,i)=>({set _(r){_e(t,e,r,n)},get _(){return I(t,e,i)}});(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function n(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=n(r);fetch(r.href,s)}})();function Ov(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ry={exports:{}},sh={};/**
3
+ * @license React
4
+ * react-jsx-runtime.production.js
5
+ *
6
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
7
+ *
8
+ * This source code is licensed under the MIT license found in the
9
+ * LICENSE file in the root directory of this source tree.
10
+ */var pT;function Y3(){if(pT)return sh;pT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.fragment");function n(i,r,s){var o=null;if(s!==void 0&&(o=""+s),r.key!==void 0&&(o=""+r.key),"key"in r){s={};for(var l in r)l!=="key"&&(s[l]=r[l])}else s=r;return r=s.ref,{$$typeof:t,type:i,key:o,ref:r!==void 0?r:null,props:s}}return sh.Fragment=e,sh.jsx=n,sh.jsxs=n,sh}var mT;function G3(){return mT||(mT=1,Ry.exports=Y3()),Ry.exports}var v=G3(),$y={exports:{}},oh={},Ly={exports:{}},My={};/**
11
+ * @license React
12
+ * scheduler.production.js
13
+ *
14
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
15
+ *
16
+ * This source code is licensed under the MIT license found in the
17
+ * LICENSE file in the root directory of this source tree.
18
+ */var gT;function W3(){return gT||(gT=1,(function(t){function e(q,se){var pe=q.length;q.push(se);e:for(;0<pe;){var ve=pe-1>>>1,j=q[ve];if(0<r(j,se))q[ve]=se,q[pe]=j,pe=ve;else break e}}function n(q){return q.length===0?null:q[0]}function i(q){if(q.length===0)return null;var se=q[0],pe=q.pop();if(pe!==se){q[0]=pe;e:for(var ve=0,j=q.length,N=j>>>1;ve<N;){var te=2*(ve+1)-1,L=q[te],re=te+1,ge=q[re];if(0>r(L,pe))re<j&&0>r(ge,L)?(q[ve]=ge,q[re]=pe,ve=re):(q[ve]=L,q[te]=pe,ve=te);else if(re<j&&0>r(ge,pe))q[ve]=ge,q[re]=pe,ve=re;else break e}}return se}function r(q,se){var pe=q.sortIndex-se.sortIndex;return pe!==0?pe:q.id-se.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var c=[],h=[],d=1,p=null,g=3,O=!1,x=!1,S=!1,_=!1,k=typeof setTimeout=="function"?setTimeout:null,P=typeof clearTimeout=="function"?clearTimeout:null,Q=typeof setImmediate<"u"?setImmediate:null;function R(q){for(var se=n(h);se!==null;){if(se.callback===null)i(h);else if(se.startTime<=q)i(h),se.sortIndex=se.expirationTime,e(c,se);else break;se=n(h)}}function $(q){if(S=!1,R(q),!x)if(n(c)!==null)x=!0,C||(C=!0,G());else{var se=n(h);se!==null&&ie($,se.startTime-q)}}var C=!1,D=-1,Z=5,U=-1;function M(){return _?!0:!(t.unstable_now()-U<Z)}function V(){if(_=!1,C){var q=t.unstable_now();U=q;var se=!0;try{e:{x=!1,S&&(S=!1,P(D),D=-1),O=!0;var pe=g;try{t:{for(R(q),p=n(c);p!==null&&!(p.expirationTime>q&&M());){var ve=p.callback;if(typeof ve=="function"){p.callback=null,g=p.priorityLevel;var j=ve(p.expirationTime<=q);if(q=t.unstable_now(),typeof j=="function"){p.callback=j,R(q),se=!0;break t}p===n(c)&&i(c),R(q)}else i(c);p=n(c)}if(p!==null)se=!0;else{var N=n(h);N!==null&&ie($,N.startTime-q),se=!1}}break e}finally{p=null,g=pe,O=!1}se=void 0}}finally{se?G():C=!1}}}var G;if(typeof Q=="function")G=function(){Q(V)};else if(typeof MessageChannel<"u"){var J=new MessageChannel,K=J.port2;J.port1.onmessage=V,G=function(){K.postMessage(null)}}else G=function(){k(V,0)};function ie(q,se){D=k(function(){q(t.unstable_now())},se)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(q){q.callback=null},t.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Z=0<q?Math.floor(1e3/q):5},t.unstable_getCurrentPriorityLevel=function(){return g},t.unstable_next=function(q){switch(g){case 1:case 2:case 3:var se=3;break;default:se=g}var pe=g;g=se;try{return q()}finally{g=pe}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(q,se){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var pe=g;g=q;try{return se()}finally{g=pe}},t.unstable_scheduleCallback=function(q,se,pe){var ve=t.unstable_now();switch(typeof pe=="object"&&pe!==null?(pe=pe.delay,pe=typeof pe=="number"&&0<pe?ve+pe:ve):pe=ve,q){case 1:var j=-1;break;case 2:j=250;break;case 5:j=1073741823;break;case 4:j=1e4;break;default:j=5e3}return j=pe+j,q={id:d++,callback:se,priorityLevel:q,startTime:pe,expirationTime:j,sortIndex:-1},pe>ve?(q.sortIndex=pe,e(h,q),n(c)===null&&q===n(h)&&(S?(P(D),D=-1):S=!0,ie($,pe-ve))):(q.sortIndex=j,e(c,q),x||O||(x=!0,C||(C=!0,G()))),q},t.unstable_shouldYield=M,t.unstable_wrapCallback=function(q){var se=g;return function(){var pe=g;g=se;try{return q.apply(this,arguments)}finally{g=pe}}}})(My)),My}var OT;function H3(){return OT||(OT=1,Ly.exports=W3()),Ly.exports}var Dy={exports:{}},je={};/**
19
+ * @license React
20
+ * react.production.js
21
+ *
22
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
23
+ *
24
+ * This source code is licensed under the MIT license found in the
25
+ * LICENSE file in the root directory of this source tree.
26
+ */var yT;function F3(){if(yT)return je;yT=1;var t=Symbol.for("react.transitional.element"),e=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),r=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.for("react.activity"),g=Symbol.iterator;function O(N){return N===null||typeof N!="object"?null:(N=g&&N[g]||N["@@iterator"],typeof N=="function"?N:null)}var x={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},S=Object.assign,_={};function k(N,te,L){this.props=N,this.context=te,this.refs=_,this.updater=L||x}k.prototype.isReactComponent={},k.prototype.setState=function(N,te){if(typeof N!="object"&&typeof N!="function"&&N!=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,N,te,"setState")},k.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function P(){}P.prototype=k.prototype;function Q(N,te,L){this.props=N,this.context=te,this.refs=_,this.updater=L||x}var R=Q.prototype=new P;R.constructor=Q,S(R,k.prototype),R.isPureReactComponent=!0;var $=Array.isArray;function C(){}var D={H:null,A:null,T:null,S:null},Z=Object.prototype.hasOwnProperty;function U(N,te,L){var re=L.ref;return{$$typeof:t,type:N,key:te,ref:re!==void 0?re:null,props:L}}function M(N,te){return U(N.type,te,N.props)}function V(N){return typeof N=="object"&&N!==null&&N.$$typeof===t}function G(N){var te={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(L){return te[L]})}var J=/\/+/g;function K(N,te){return typeof N=="object"&&N!==null&&N.key!=null?G(""+N.key):te.toString(36)}function ie(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(C,C):(N.status="pending",N.then(function(te){N.status==="pending"&&(N.status="fulfilled",N.value=te)},function(te){N.status==="pending"&&(N.status="rejected",N.reason=te)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function q(N,te,L,re,ge){var be=typeof N;(be==="undefined"||be==="boolean")&&(N=null);var Ce=!1;if(N===null)Ce=!0;else switch(be){case"bigint":case"string":case"number":Ce=!0;break;case"object":switch(N.$$typeof){case t:case e:Ce=!0;break;case d:return Ce=N._init,q(Ce(N._payload),te,L,re,ge)}}if(Ce)return ge=ge(N),Ce=re===""?"."+K(N,0):re,$(ge)?(L="",Ce!=null&&(L=Ce.replace(J,"$&/")+"/"),q(ge,te,L,"",function(xn){return xn})):ge!=null&&(V(ge)&&(ge=M(ge,L+(ge.key==null||N&&N.key===ge.key?"":(""+ge.key).replace(J,"$&/")+"/")+Ce)),te.push(ge)),1;Ce=0;var st=re===""?".":re+":";if($(N))for(var Fe=0;Fe<N.length;Fe++)re=N[Fe],be=st+K(re,Fe),Ce+=q(re,te,L,be,ge);else if(Fe=O(N),typeof Fe=="function")for(N=Fe.call(N),Fe=0;!(re=N.next()).done;)re=re.value,be=st+K(re,Fe++),Ce+=q(re,te,L,be,ge);else if(be==="object"){if(typeof N.then=="function")return q(ie(N),te,L,re,ge);throw te=String(N),Error("Objects are not valid as a React child (found: "+(te==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":te)+"). If you meant to render a collection of children, use an array instead.")}return Ce}function se(N,te,L){if(N==null)return N;var re=[],ge=0;return q(N,re,"","",function(be){return te.call(L,be,ge++)}),re}function pe(N){if(N._status===-1){var te=N._result;te=te(),te.then(function(L){(N._status===0||N._status===-1)&&(N._status=1,N._result=L)},function(L){(N._status===0||N._status===-1)&&(N._status=2,N._result=L)}),N._status===-1&&(N._status=0,N._result=te)}if(N._status===1)return N._result.default;throw N._result}var ve=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var te=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent(te))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},j={map:se,forEach:function(N,te,L){se(N,function(){te.apply(this,arguments)},L)},count:function(N){var te=0;return se(N,function(){te++}),te},toArray:function(N){return se(N,function(te){return te})||[]},only:function(N){if(!V(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return je.Activity=p,je.Children=j,je.Component=k,je.Fragment=n,je.Profiler=r,je.PureComponent=Q,je.StrictMode=i,je.Suspense=c,je.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,je.__COMPILER_RUNTIME={__proto__:null,c:function(N){return D.H.useMemoCache(N)}},je.cache=function(N){return function(){return N.apply(null,arguments)}},je.cacheSignal=function(){return null},je.cloneElement=function(N,te,L){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=S({},N.props),ge=N.key;if(te!=null)for(be in te.key!==void 0&&(ge=""+te.key),te)!Z.call(te,be)||be==="key"||be==="__self"||be==="__source"||be==="ref"&&te.ref===void 0||(re[be]=te[be]);var be=arguments.length-2;if(be===1)re.children=L;else if(1<be){for(var Ce=Array(be),st=0;st<be;st++)Ce[st]=arguments[st+2];re.children=Ce}return U(N.type,ge,re)},je.createContext=function(N){return N={$$typeof:o,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:s,_context:N},N},je.createElement=function(N,te,L){var re,ge={},be=null;if(te!=null)for(re in te.key!==void 0&&(be=""+te.key),te)Z.call(te,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ge[re]=te[re]);var Ce=arguments.length-2;if(Ce===1)ge.children=L;else if(1<Ce){for(var st=Array(Ce),Fe=0;Fe<Ce;Fe++)st[Fe]=arguments[Fe+2];ge.children=st}if(N&&N.defaultProps)for(re in Ce=N.defaultProps,Ce)ge[re]===void 0&&(ge[re]=Ce[re]);return U(N,be,ge)},je.createRef=function(){return{current:null}},je.forwardRef=function(N){return{$$typeof:l,render:N}},je.isValidElement=V,je.lazy=function(N){return{$$typeof:d,_payload:{_status:-1,_result:N},_init:pe}},je.memo=function(N,te){return{$$typeof:h,type:N,compare:te===void 0?null:te}},je.startTransition=function(N){var te=D.T,L={};D.T=L;try{var re=N(),ge=D.S;ge!==null&&ge(L,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(C,ve)}catch(be){ve(be)}finally{te!==null&&L.types!==null&&(te.types=L.types),D.T=te}},je.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},je.use=function(N){return D.H.use(N)},je.useActionState=function(N,te,L){return D.H.useActionState(N,te,L)},je.useCallback=function(N,te){return D.H.useCallback(N,te)},je.useContext=function(N){return D.H.useContext(N)},je.useDebugValue=function(){},je.useDeferredValue=function(N,te){return D.H.useDeferredValue(N,te)},je.useEffect=function(N,te){return D.H.useEffect(N,te)},je.useEffectEvent=function(N){return D.H.useEffectEvent(N)},je.useId=function(){return D.H.useId()},je.useImperativeHandle=function(N,te,L){return D.H.useImperativeHandle(N,te,L)},je.useInsertionEffect=function(N,te){return D.H.useInsertionEffect(N,te)},je.useLayoutEffect=function(N,te){return D.H.useLayoutEffect(N,te)},je.useMemo=function(N,te){return D.H.useMemo(N,te)},je.useOptimistic=function(N,te){return D.H.useOptimistic(N,te)},je.useReducer=function(N,te,L){return D.H.useReducer(N,te,L)},je.useRef=function(N){return D.H.useRef(N)},je.useState=function(N){return D.H.useState(N)},je.useSyncExternalStore=function(N,te,L){return D.H.useSyncExternalStore(N,te,L)},je.useTransition=function(){return D.H.useTransition()},je.version="19.2.0",je}var bT;function Xf(){return bT||(bT=1,Dy.exports=F3()),Dy.exports}var jy={exports:{}},vn={};/**
27
+ * @license React
28
+ * react-dom.production.js
29
+ *
30
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
31
+ *
32
+ * This source code is licensed under the MIT license found in the
33
+ * LICENSE file in the root directory of this source tree.
34
+ */var xT;function K3(){if(xT)return vn;xT=1;var t=Xf();function e(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var d=2;d<arguments.length;d++)h+="&args[]="+encodeURIComponent(arguments[d])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var i={d:{f:n,r:function(){throw Error(e(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},r=Symbol.for("react.portal");function s(c,h,d){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:r,key:p==null?null:""+p,children:c,containerInfo:h,implementation:d}}var o=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function l(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return vn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=i,vn.createPortal=function(c,h){var d=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(e(299));return s(c,h,null,d)},vn.flushSync=function(c){var h=o.T,d=i.p;try{if(o.T=null,i.p=2,c)return c()}finally{o.T=h,i.p=d,i.d.f()}},vn.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,i.d.C(c,h))},vn.prefetchDNS=function(c){typeof c=="string"&&i.d.D(c)},vn.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var d=h.as,p=l(d,h.crossOrigin),g=typeof h.integrity=="string"?h.integrity:void 0,O=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;d==="style"?i.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:p,integrity:g,fetchPriority:O}):d==="script"&&i.d.X(c,{crossOrigin:p,integrity:g,fetchPriority:O,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},vn.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var d=l(h.as,h.crossOrigin);i.d.M(c,{crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&i.d.M(c)},vn.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var d=h.as,p=l(d,h.crossOrigin);i.d.L(c,d,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},vn.preloadModule=function(c,h){if(typeof c=="string")if(h){var d=l(h.as,h.crossOrigin);i.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:d,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else i.d.m(c)},vn.requestFormReset=function(c){i.d.r(c)},vn.unstable_batchedUpdates=function(c,h){return c(h)},vn.useFormState=function(c,h,d){return o.H.useFormState(c,h,d)},vn.useFormStatus=function(){return o.H.useHostTransitionStatus()},vn.version="19.2.0",vn}var vT;function E2(){if(vT)return jy.exports;vT=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),jy.exports=K3(),jy.exports}/**
35
+ * @license React
36
+ * react-dom-client.production.js
37
+ *
38
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
39
+ *
40
+ * This source code is licensed under the MIT license found in the
41
+ * LICENSE file in the root directory of this source tree.
42
+ */var ST;function J3(){if(ST)return oh;ST=1;var t=H3(),e=Xf(),n=E2();function i(a){var u="https://react.dev/errors/"+a;if(1<arguments.length){u+="?args[]="+encodeURIComponent(arguments[1]);for(var f=2;f<arguments.length;f++)u+="&args[]="+encodeURIComponent(arguments[f])}return"Minified React error #"+a+"; visit "+u+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(a){return!(!a||a.nodeType!==1&&a.nodeType!==9&&a.nodeType!==11)}function s(a){var u=a,f=a;if(a.alternate)for(;u.return;)u=u.return;else{a=u;do u=a,(u.flags&4098)!==0&&(f=u.return),a=u.return;while(a)}return u.tag===3?f:null}function o(a){if(a.tag===13){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function l(a){if(a.tag===31){var u=a.memoizedState;if(u===null&&(a=a.alternate,a!==null&&(u=a.memoizedState)),u!==null)return u.dehydrated}return null}function c(a){if(s(a)!==a)throw Error(i(188))}function h(a){var u=a.alternate;if(!u){if(u=s(a),u===null)throw Error(i(188));return u!==a?null:a}for(var f=a,m=u;;){var y=f.return;if(y===null)break;var b=y.alternate;if(b===null){if(m=y.return,m!==null){f=m;continue}break}if(y.child===b.child){for(b=y.child;b;){if(b===f)return c(y),a;if(b===m)return c(y),u;b=b.sibling}throw Error(i(188))}if(f.return!==m.return)f=y,m=b;else{for(var w=!1,E=y.child;E;){if(E===f){w=!0,f=y,m=b;break}if(E===m){w=!0,m=y,f=b;break}E=E.sibling}if(!w){for(E=b.child;E;){if(E===f){w=!0,f=b,m=y;break}if(E===m){w=!0,m=b,f=y;break}E=E.sibling}if(!w)throw Error(i(189))}}if(f.alternate!==m)throw Error(i(190))}if(f.tag!==3)throw Error(i(188));return f.stateNode.current===f?a:u}function d(a){var u=a.tag;if(u===5||u===26||u===27||u===6)return a;for(a=a.child;a!==null;){if(u=d(a),u!==null)return u;a=a.sibling}return null}var p=Object.assign,g=Symbol.for("react.element"),O=Symbol.for("react.transitional.element"),x=Symbol.for("react.portal"),S=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),k=Symbol.for("react.profiler"),P=Symbol.for("react.consumer"),Q=Symbol.for("react.context"),R=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),C=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),Z=Symbol.for("react.lazy"),U=Symbol.for("react.activity"),M=Symbol.for("react.memo_cache_sentinel"),V=Symbol.iterator;function G(a){return a===null||typeof a!="object"?null:(a=V&&a[V]||a["@@iterator"],typeof a=="function"?a:null)}var J=Symbol.for("react.client.reference");function K(a){if(a==null)return null;if(typeof a=="function")return a.$$typeof===J?null:a.displayName||a.name||null;if(typeof a=="string")return a;switch(a){case S:return"Fragment";case k:return"Profiler";case _:return"StrictMode";case $:return"Suspense";case C:return"SuspenseList";case U:return"Activity"}if(typeof a=="object")switch(a.$$typeof){case x:return"Portal";case Q:return a.displayName||"Context";case P:return(a._context.displayName||"Context")+".Consumer";case R:var u=a.render;return a=a.displayName,a||(a=u.displayName||u.name||"",a=a!==""?"ForwardRef("+a+")":"ForwardRef"),a;case D:return u=a.displayName||null,u!==null?u:K(a.type)||"Memo";case Z:u=a._payload,a=a._init;try{return K(a(u))}catch{}}return null}var ie=Array.isArray,q=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,pe={pending:!1,data:null,method:null,action:null},ve=[],j=-1;function N(a){return{current:a}}function te(a){0>j||(a.current=ve[j],ve[j]=null,j--)}function L(a,u){j++,ve[j]=a.current,a.current=u}var re=N(null),ge=N(null),be=N(null),Ce=N(null);function st(a,u){switch(L(be,u),L(ge,a),L(re,null),u.nodeType){case 9:case 11:a=(a=u.documentElement)&&(a=a.namespaceURI)?DP(a):0;break;default:if(a=u.tagName,u=u.namespaceURI)u=DP(u),a=jP(u,a);else switch(a){case"svg":a=1;break;case"math":a=2;break;default:a=0}}te(re),L(re,a)}function Fe(){te(re),te(ge),te(be)}function xn(a){a.memoizedState!==null&&L(Ce,a);var u=re.current,f=jP(u,a.type);u!==f&&(L(ge,a),L(re,f))}function oi(a){ge.current===a&&(te(re),te(ge)),Ce.current===a&&(te(Ce),th._currentValue=pe)}var ai,cl;function er(a){if(ai===void 0)try{throw Error()}catch(f){var u=f.stack.trim().match(/\n( *(at )?)/);ai=u&&u[1]||"",cl=-1<f.stack.indexOf(`
43
+ at`)?" (<anonymous>)":-1<f.stack.indexOf("@")?"@unknown:0:0":""}return`
44
+ `+ai+a+cl}var Gr=!1;function Vs(a,u){if(!a||Gr)return"";Gr=!0;var f=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var m={DetermineComponentFrameRoot:function(){try{if(u){var he=function(){throw Error()};if(Object.defineProperty(he.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(he,[])}catch(ne){var F=ne}Reflect.construct(a,[],he)}else{try{he.call()}catch(ne){F=ne}a.call(he.prototype)}}else{try{throw Error()}catch(ne){F=ne}(he=a())&&typeof he.catch=="function"&&he.catch(function(){})}}catch(ne){if(ne&&F&&typeof ne.stack=="string")return[ne.stack,F.stack]}return[null,null]}};m.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var y=Object.getOwnPropertyDescriptor(m.DetermineComponentFrameRoot,"name");y&&y.configurable&&Object.defineProperty(m.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var b=m.DetermineComponentFrameRoot(),w=b[0],E=b[1];if(w&&E){var z=w.split(`
45
+ `),H=E.split(`
46
+ `);for(y=m=0;m<z.length&&!z[m].includes("DetermineComponentFrameRoot");)m++;for(;y<H.length&&!H[y].includes("DetermineComponentFrameRoot");)y++;if(m===z.length||y===H.length)for(m=z.length-1,y=H.length-1;1<=m&&0<=y&&z[m]!==H[y];)y--;for(;1<=m&&0<=y;m--,y--)if(z[m]!==H[y]){if(m!==1||y!==1)do if(m--,y--,0>y||z[m]!==H[y]){var oe=`
47
+ `+z[m].replace(" at new "," at ");return a.displayName&&oe.includes("<anonymous>")&&(oe=oe.replace("<anonymous>",a.displayName)),oe}while(1<=m&&0<=y);break}}}finally{Gr=!1,Error.prepareStackTrace=f}return(f=a?a.displayName||a.name:"")?er(f):""}function ul(a,u){switch(a.tag){case 26:case 27:case 5:return er(a.type);case 16:return er("Lazy");case 13:return a.child!==u&&u!==null?er("Suspense Fallback"):er("Suspense");case 19:return er("SuspenseList");case 0:case 15:return Vs(a.type,!1);case 11:return Vs(a.type.render,!1);case 1:return Vs(a.type,!0);case 31:return er("Activity");default:return""}}function hl(a){try{var u="",f=null;do u+=ul(a,f),f=a,a=a.return;while(a);return u}catch(m){return`
48
+ Error generating stack: `+m.message+`
49
+ `+m.stack}}var tr=Object.prototype.hasOwnProperty,nr=t.unstable_scheduleCallback,Bs=t.unstable_cancelCallback,fl=t.unstable_shouldYield,ot=t.unstable_requestPaint,it=t.unstable_now,En=t.unstable_getCurrentPriorityLevel,le=t.unstable_ImmediatePriority,Oe=t.unstable_UserBlockingPriority,Le=t.unstable_NormalPriority,Be=t.unstable_LowPriority,ut=t.unstable_IdlePriority,li=t.log,Wr=t.unstable_setDisableYieldValue,An=null,Ft=null;function Vn(a){if(typeof li=="function"&&Wr(a),Ft&&typeof Ft.setStrictMode=="function")try{Ft.setStrictMode(An,a)}catch{}}var bt=Math.clz32?Math.clz32:AN,Zs=Math.log,ir=Math.LN2;function AN(a){return a>>>=0,a===0?32:31-(Zs(a)/ir|0)|0}var id=256,rd=262144,sd=4194304;function Jo(a){var u=a&42;if(u!==0)return u;switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return a&261888;case 262144:case 524288:case 1048576:case 2097152:return a&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return a&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return a}}function od(a,u,f){var m=a.pendingLanes;if(m===0)return 0;var y=0,b=a.suspendedLanes,w=a.pingedLanes;a=a.warmLanes;var E=m&134217727;return E!==0?(m=E&~b,m!==0?y=Jo(m):(w&=E,w!==0?y=Jo(w):f||(f=E&~a,f!==0&&(y=Jo(f))))):(E=m&~b,E!==0?y=Jo(E):w!==0?y=Jo(w):f||(f=m&~a,f!==0&&(y=Jo(f)))),y===0?0:u!==0&&u!==y&&(u&b)===0&&(b=y&-y,f=u&-u,b>=f||b===32&&(f&4194048)!==0)?u:y}function pu(a,u){return(a.pendingLanes&~(a.suspendedLanes&~a.pingedLanes)&u)===0}function RN(a,u){switch(a){case 1:case 2:case 4:case 8:case 64:return u+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return u+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function O_(){var a=sd;return sd<<=1,(sd&62914560)===0&&(sd=4194304),a}function bO(a){for(var u=[],f=0;31>f;f++)u.push(a);return u}function mu(a,u){a.pendingLanes|=u,u!==268435456&&(a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0)}function $N(a,u,f,m,y,b){var w=a.pendingLanes;a.pendingLanes=f,a.suspendedLanes=0,a.pingedLanes=0,a.warmLanes=0,a.expiredLanes&=f,a.entangledLanes&=f,a.errorRecoveryDisabledLanes&=f,a.shellSuspendCounter=0;var E=a.entanglements,z=a.expirationTimes,H=a.hiddenUpdates;for(f=w&~f;0<f;){var oe=31-bt(f),he=1<<oe;E[oe]=0,z[oe]=-1;var F=H[oe];if(F!==null)for(H[oe]=null,oe=0;oe<F.length;oe++){var ne=F[oe];ne!==null&&(ne.lane&=-536870913)}f&=~he}m!==0&&y_(a,m,0),b!==0&&y===0&&a.tag!==0&&(a.suspendedLanes|=b&~(w&~u))}function y_(a,u,f){a.pendingLanes|=u,a.suspendedLanes&=~u;var m=31-bt(u);a.entangledLanes|=u,a.entanglements[m]=a.entanglements[m]|1073741824|f&261930}function b_(a,u){var f=a.entangledLanes|=u;for(a=a.entanglements;f;){var m=31-bt(f),y=1<<m;y&u|a[m]&u&&(a[m]|=u),f&=~y}}function x_(a,u){var f=u&-u;return f=(f&42)!==0?1:xO(f),(f&(a.suspendedLanes|u))!==0?0:f}function xO(a){switch(a){case 2:a=1;break;case 8:a=4;break;case 32:a=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:a=128;break;case 268435456:a=134217728;break;default:a=0}return a}function vO(a){return a&=-a,2<a?8<a?(a&134217727)!==0?32:268435456:8:2}function v_(){var a=se.p;return a!==0?a:(a=window.event,a===void 0?32:oT(a.type))}function S_(a,u){var f=se.p;try{return se.p=a,u()}finally{se.p=f}}var qs=Math.random().toString(36).slice(2),un="__reactFiber$"+qs,Bn="__reactProps$"+qs,dl="__reactContainer$"+qs,SO="__reactEvents$"+qs,LN="__reactListeners$"+qs,MN="__reactHandles$"+qs,__="__reactResources$"+qs,gu="__reactMarker$"+qs;function _O(a){delete a[un],delete a[Bn],delete a[SO],delete a[LN],delete a[MN]}function pl(a){var u=a[un];if(u)return u;for(var f=a.parentNode;f;){if(u=f[dl]||f[un]){if(f=u.alternate,u.child!==null||f!==null&&f.child!==null)for(a=ZP(a);a!==null;){if(f=a[un])return f;a=ZP(a)}return u}a=f,f=a.parentNode}return null}function ml(a){if(a=a[un]||a[dl]){var u=a.tag;if(u===5||u===6||u===13||u===31||u===26||u===27||u===3)return a}return null}function Ou(a){var u=a.tag;if(u===5||u===26||u===27||u===6)return a.stateNode;throw Error(i(33))}function gl(a){var u=a[__];return u||(u=a[__]={hoistableStyles:new Map,hoistableScripts:new Map}),u}function rn(a){a[gu]=!0}var k_=new Set,w_={};function ea(a,u){Ol(a,u),Ol(a+"Capture",u)}function Ol(a,u){for(w_[a]=u,a=0;a<u.length;a++)k_.add(u[a])}var DN=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),P_={},T_={};function jN(a){return tr.call(T_,a)?!0:tr.call(P_,a)?!1:DN.test(a)?T_[a]=!0:(P_[a]=!0,!1)}function ad(a,u,f){if(jN(u))if(f===null)a.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":a.removeAttribute(u);return;case"boolean":var m=u.toLowerCase().slice(0,5);if(m!=="data-"&&m!=="aria-"){a.removeAttribute(u);return}}a.setAttribute(u,""+f)}}function ld(a,u,f){if(f===null)a.removeAttribute(u);else{switch(typeof f){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(u);return}a.setAttribute(u,""+f)}}function Hr(a,u,f,m){if(m===null)a.removeAttribute(f);else{switch(typeof m){case"undefined":case"function":case"symbol":case"boolean":a.removeAttribute(f);return}a.setAttributeNS(u,f,""+m)}}function Qi(a){switch(typeof a){case"bigint":case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return""}}function Q_(a){var u=a.type;return(a=a.nodeName)&&a.toLowerCase()==="input"&&(u==="checkbox"||u==="radio")}function NN(a,u,f){var m=Object.getOwnPropertyDescriptor(a.constructor.prototype,u);if(!a.hasOwnProperty(u)&&typeof m<"u"&&typeof m.get=="function"&&typeof m.set=="function"){var y=m.get,b=m.set;return Object.defineProperty(a,u,{configurable:!0,get:function(){return y.call(this)},set:function(w){f=""+w,b.call(this,w)}}),Object.defineProperty(a,u,{enumerable:m.enumerable}),{getValue:function(){return f},setValue:function(w){f=""+w},stopTracking:function(){a._valueTracker=null,delete a[u]}}}}function kO(a){if(!a._valueTracker){var u=Q_(a)?"checked":"value";a._valueTracker=NN(a,u,""+a[u])}}function C_(a){if(!a)return!1;var u=a._valueTracker;if(!u)return!0;var f=u.getValue(),m="";return a&&(m=Q_(a)?a.checked?"true":"false":a.value),a=m,a!==f?(u.setValue(a),!0):!1}function cd(a){if(a=a||(typeof document<"u"?document:void 0),typeof a>"u")return null;try{return a.activeElement||a.body}catch{return a.body}}var zN=/[\n"\\]/g;function Ci(a){return a.replace(zN,function(u){return"\\"+u.charCodeAt(0).toString(16)+" "})}function wO(a,u,f,m,y,b,w,E){a.name="",w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"?a.type=w:a.removeAttribute("type"),u!=null?w==="number"?(u===0&&a.value===""||a.value!=u)&&(a.value=""+Qi(u)):a.value!==""+Qi(u)&&(a.value=""+Qi(u)):w!=="submit"&&w!=="reset"||a.removeAttribute("value"),u!=null?PO(a,w,Qi(u)):f!=null?PO(a,w,Qi(f)):m!=null&&a.removeAttribute("value"),y==null&&b!=null&&(a.defaultChecked=!!b),y!=null&&(a.checked=y&&typeof y!="function"&&typeof y!="symbol"),E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?a.name=""+Qi(E):a.removeAttribute("name")}function E_(a,u,f,m,y,b,w,E){if(b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(a.type=b),u!=null||f!=null){if(!(b!=="submit"&&b!=="reset"||u!=null)){kO(a);return}f=f!=null?""+Qi(f):"",u=u!=null?""+Qi(u):f,E||u===a.value||(a.value=u),a.defaultValue=u}m=m??y,m=typeof m!="function"&&typeof m!="symbol"&&!!m,a.checked=E?a.checked:!!m,a.defaultChecked=!!m,w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(a.name=w),kO(a)}function PO(a,u,f){u==="number"&&cd(a.ownerDocument)===a||a.defaultValue===""+f||(a.defaultValue=""+f)}function yl(a,u,f,m){if(a=a.options,u){u={};for(var y=0;y<f.length;y++)u["$"+f[y]]=!0;for(f=0;f<a.length;f++)y=u.hasOwnProperty("$"+a[f].value),a[f].selected!==y&&(a[f].selected=y),y&&m&&(a[f].defaultSelected=!0)}else{for(f=""+Qi(f),u=null,y=0;y<a.length;y++){if(a[y].value===f){a[y].selected=!0,m&&(a[y].defaultSelected=!0);return}u!==null||a[y].disabled||(u=a[y])}u!==null&&(u.selected=!0)}}function A_(a,u,f){if(u!=null&&(u=""+Qi(u),u!==a.value&&(a.value=u),f==null)){a.defaultValue!==u&&(a.defaultValue=u);return}a.defaultValue=f!=null?""+Qi(f):""}function R_(a,u,f,m){if(u==null){if(m!=null){if(f!=null)throw Error(i(92));if(ie(m)){if(1<m.length)throw Error(i(93));m=m[0]}f=m}f==null&&(f=""),u=f}f=Qi(u),a.defaultValue=f,m=a.textContent,m===f&&m!==""&&m!==null&&(a.value=m),kO(a)}function bl(a,u){if(u){var f=a.firstChild;if(f&&f===a.lastChild&&f.nodeType===3){f.nodeValue=u;return}}a.textContent=u}var IN=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function $_(a,u,f){var m=u.indexOf("--")===0;f==null||typeof f=="boolean"||f===""?m?a.setProperty(u,""):u==="float"?a.cssFloat="":a[u]="":m?a.setProperty(u,f):typeof f!="number"||f===0||IN.has(u)?u==="float"?a.cssFloat=f:a[u]=(""+f).trim():a[u]=f+"px"}function L_(a,u,f){if(u!=null&&typeof u!="object")throw Error(i(62));if(a=a.style,f!=null){for(var m in f)!f.hasOwnProperty(m)||u!=null&&u.hasOwnProperty(m)||(m.indexOf("--")===0?a.setProperty(m,""):m==="float"?a.cssFloat="":a[m]="");for(var y in u)m=u[y],u.hasOwnProperty(y)&&f[y]!==m&&$_(a,y,m)}else for(var b in u)u.hasOwnProperty(b)&&$_(a,b,u[b])}function TO(a){if(a.indexOf("-")===-1)return!1;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var XN=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["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"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["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"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["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"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),VN=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function ud(a){return VN.test(""+a)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":a}function Fr(){}var QO=null;function CO(a){return a=a.target||a.srcElement||window,a.correspondingUseElement&&(a=a.correspondingUseElement),a.nodeType===3?a.parentNode:a}var xl=null,vl=null;function M_(a){var u=ml(a);if(u&&(a=u.stateNode)){var f=a[Bn]||null;e:switch(a=u.stateNode,u.type){case"input":if(wO(a,f.value,f.defaultValue,f.defaultValue,f.checked,f.defaultChecked,f.type,f.name),u=f.name,f.type==="radio"&&u!=null){for(f=a;f.parentNode;)f=f.parentNode;for(f=f.querySelectorAll('input[name="'+Ci(""+u)+'"][type="radio"]'),u=0;u<f.length;u++){var m=f[u];if(m!==a&&m.form===a.form){var y=m[Bn]||null;if(!y)throw Error(i(90));wO(m,y.value,y.defaultValue,y.defaultValue,y.checked,y.defaultChecked,y.type,y.name)}}for(u=0;u<f.length;u++)m=f[u],m.form===a.form&&C_(m)}break e;case"textarea":A_(a,f.value,f.defaultValue);break e;case"select":u=f.value,u!=null&&yl(a,!!f.multiple,u,!1)}}}var EO=!1;function D_(a,u,f){if(EO)return a(u,f);EO=!0;try{var m=a(u);return m}finally{if(EO=!1,(xl!==null||vl!==null)&&(Fd(),xl&&(u=xl,a=vl,vl=xl=null,M_(u),a)))for(u=0;u<a.length;u++)M_(a[u])}}function yu(a,u){var f=a.stateNode;if(f===null)return null;var m=f[Bn]||null;if(m===null)return null;f=m[u];e:switch(u){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(m=!m.disabled)||(a=a.type,m=!(a==="button"||a==="input"||a==="select"||a==="textarea")),a=!m;break e;default:a=!1}if(a)return null;if(f&&typeof f!="function")throw Error(i(231,u,typeof f));return f}var Kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),AO=!1;if(Kr)try{var bu={};Object.defineProperty(bu,"passive",{get:function(){AO=!0}}),window.addEventListener("test",bu,bu),window.removeEventListener("test",bu,bu)}catch{AO=!1}var Us=null,RO=null,hd=null;function j_(){if(hd)return hd;var a,u=RO,f=u.length,m,y="value"in Us?Us.value:Us.textContent,b=y.length;for(a=0;a<f&&u[a]===y[a];a++);var w=f-a;for(m=1;m<=w&&u[f-m]===y[b-m];m++);return hd=y.slice(a,1<m?1-m:void 0)}function fd(a){var u=a.keyCode;return"charCode"in a?(a=a.charCode,a===0&&u===13&&(a=13)):a=u,a===10&&(a=13),32<=a||a===13?a:0}function dd(){return!0}function N_(){return!1}function Zn(a){function u(f,m,y,b,w){this._reactName=f,this._targetInst=y,this.type=m,this.nativeEvent=b,this.target=w,this.currentTarget=null;for(var E in a)a.hasOwnProperty(E)&&(f=a[E],this[E]=f?f(b):b[E]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?dd:N_,this.isPropagationStopped=N_,this}return p(u.prototype,{preventDefault:function(){this.defaultPrevented=!0;var f=this.nativeEvent;f&&(f.preventDefault?f.preventDefault():typeof f.returnValue!="unknown"&&(f.returnValue=!1),this.isDefaultPrevented=dd)},stopPropagation:function(){var f=this.nativeEvent;f&&(f.stopPropagation?f.stopPropagation():typeof f.cancelBubble!="unknown"&&(f.cancelBubble=!0),this.isPropagationStopped=dd)},persist:function(){},isPersistent:dd}),u}var ta={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(a){return a.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pd=Zn(ta),xu=p({},ta,{view:0,detail:0}),BN=Zn(xu),$O,LO,vu,md=p({},xu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:DO,button:0,buttons:0,relatedTarget:function(a){return a.relatedTarget===void 0?a.fromElement===a.srcElement?a.toElement:a.fromElement:a.relatedTarget},movementX:function(a){return"movementX"in a?a.movementX:(a!==vu&&(vu&&a.type==="mousemove"?($O=a.screenX-vu.screenX,LO=a.screenY-vu.screenY):LO=$O=0,vu=a),$O)},movementY:function(a){return"movementY"in a?a.movementY:LO}}),z_=Zn(md),ZN=p({},md,{dataTransfer:0}),qN=Zn(ZN),UN=p({},xu,{relatedTarget:0}),MO=Zn(UN),YN=p({},ta,{animationName:0,elapsedTime:0,pseudoElement:0}),GN=Zn(YN),WN=p({},ta,{clipboardData:function(a){return"clipboardData"in a?a.clipboardData:window.clipboardData}}),HN=Zn(WN),FN=p({},ta,{data:0}),I_=Zn(FN),KN={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},JN={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},ez={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function tz(a){var u=this.nativeEvent;return u.getModifierState?u.getModifierState(a):(a=ez[a])?!!u[a]:!1}function DO(){return tz}var nz=p({},xu,{key:function(a){if(a.key){var u=KN[a.key]||a.key;if(u!=="Unidentified")return u}return a.type==="keypress"?(a=fd(a),a===13?"Enter":String.fromCharCode(a)):a.type==="keydown"||a.type==="keyup"?JN[a.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:DO,charCode:function(a){return a.type==="keypress"?fd(a):0},keyCode:function(a){return a.type==="keydown"||a.type==="keyup"?a.keyCode:0},which:function(a){return a.type==="keypress"?fd(a):a.type==="keydown"||a.type==="keyup"?a.keyCode:0}}),iz=Zn(nz),rz=p({},md,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),X_=Zn(rz),sz=p({},xu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:DO}),oz=Zn(sz),az=p({},ta,{propertyName:0,elapsedTime:0,pseudoElement:0}),lz=Zn(az),cz=p({},md,{deltaX:function(a){return"deltaX"in a?a.deltaX:"wheelDeltaX"in a?-a.wheelDeltaX:0},deltaY:function(a){return"deltaY"in a?a.deltaY:"wheelDeltaY"in a?-a.wheelDeltaY:"wheelDelta"in a?-a.wheelDelta:0},deltaZ:0,deltaMode:0}),uz=Zn(cz),hz=p({},ta,{newState:0,oldState:0}),fz=Zn(hz),dz=[9,13,27,32],jO=Kr&&"CompositionEvent"in window,Su=null;Kr&&"documentMode"in document&&(Su=document.documentMode);var pz=Kr&&"TextEvent"in window&&!Su,V_=Kr&&(!jO||Su&&8<Su&&11>=Su),B_=" ",Z_=!1;function q_(a,u){switch(a){case"keyup":return dz.indexOf(u.keyCode)!==-1;case"keydown":return u.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function U_(a){return a=a.detail,typeof a=="object"&&"data"in a?a.data:null}var Sl=!1;function mz(a,u){switch(a){case"compositionend":return U_(u);case"keypress":return u.which!==32?null:(Z_=!0,B_);case"textInput":return a=u.data,a===B_&&Z_?null:a;default:return null}}function gz(a,u){if(Sl)return a==="compositionend"||!jO&&q_(a,u)?(a=j_(),hd=RO=Us=null,Sl=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(u.ctrlKey||u.altKey||u.metaKey)||u.ctrlKey&&u.altKey){if(u.char&&1<u.char.length)return u.char;if(u.which)return String.fromCharCode(u.which)}return null;case"compositionend":return V_&&u.locale!=="ko"?null:u.data;default:return null}}var Oz={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Y_(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u==="input"?!!Oz[a.type]:u==="textarea"}function G_(a,u,f,m){xl?vl?vl.push(m):vl=[m]:xl=m,u=rp(u,"onChange"),0<u.length&&(f=new pd("onChange","change",null,f,m),a.push({event:f,listeners:u}))}var _u=null,ku=null;function yz(a){EP(a,0)}function gd(a){var u=Ou(a);if(C_(u))return a}function W_(a,u){if(a==="change")return u}var H_=!1;if(Kr){var NO;if(Kr){var zO="oninput"in document;if(!zO){var F_=document.createElement("div");F_.setAttribute("oninput","return;"),zO=typeof F_.oninput=="function"}NO=zO}else NO=!1;H_=NO&&(!document.documentMode||9<document.documentMode)}function K_(){_u&&(_u.detachEvent("onpropertychange",J_),ku=_u=null)}function J_(a){if(a.propertyName==="value"&&gd(ku)){var u=[];G_(u,ku,a,CO(a)),D_(yz,u)}}function bz(a,u,f){a==="focusin"?(K_(),_u=u,ku=f,_u.attachEvent("onpropertychange",J_)):a==="focusout"&&K_()}function xz(a){if(a==="selectionchange"||a==="keyup"||a==="keydown")return gd(ku)}function vz(a,u){if(a==="click")return gd(u)}function Sz(a,u){if(a==="input"||a==="change")return gd(u)}function _z(a,u){return a===u&&(a!==0||1/a===1/u)||a!==a&&u!==u}var ci=typeof Object.is=="function"?Object.is:_z;function wu(a,u){if(ci(a,u))return!0;if(typeof a!="object"||a===null||typeof u!="object"||u===null)return!1;var f=Object.keys(a),m=Object.keys(u);if(f.length!==m.length)return!1;for(m=0;m<f.length;m++){var y=f[m];if(!tr.call(u,y)||!ci(a[y],u[y]))return!1}return!0}function ek(a){for(;a&&a.firstChild;)a=a.firstChild;return a}function tk(a,u){var f=ek(a);a=0;for(var m;f;){if(f.nodeType===3){if(m=a+f.textContent.length,a<=u&&m>=u)return{node:f,offset:u-a};a=m}e:{for(;f;){if(f.nextSibling){f=f.nextSibling;break e}f=f.parentNode}f=void 0}f=ek(f)}}function nk(a,u){return a&&u?a===u?!0:a&&a.nodeType===3?!1:u&&u.nodeType===3?nk(a,u.parentNode):"contains"in a?a.contains(u):a.compareDocumentPosition?!!(a.compareDocumentPosition(u)&16):!1:!1}function ik(a){a=a!=null&&a.ownerDocument!=null&&a.ownerDocument.defaultView!=null?a.ownerDocument.defaultView:window;for(var u=cd(a.document);u instanceof a.HTMLIFrameElement;){try{var f=typeof u.contentWindow.location.href=="string"}catch{f=!1}if(f)a=u.contentWindow;else break;u=cd(a.document)}return u}function IO(a){var u=a&&a.nodeName&&a.nodeName.toLowerCase();return u&&(u==="input"&&(a.type==="text"||a.type==="search"||a.type==="tel"||a.type==="url"||a.type==="password")||u==="textarea"||a.contentEditable==="true")}var kz=Kr&&"documentMode"in document&&11>=document.documentMode,_l=null,XO=null,Pu=null,VO=!1;function rk(a,u,f){var m=f.window===f?f.document:f.nodeType===9?f:f.ownerDocument;VO||_l==null||_l!==cd(m)||(m=_l,"selectionStart"in m&&IO(m)?m={start:m.selectionStart,end:m.selectionEnd}:(m=(m.ownerDocument&&m.ownerDocument.defaultView||window).getSelection(),m={anchorNode:m.anchorNode,anchorOffset:m.anchorOffset,focusNode:m.focusNode,focusOffset:m.focusOffset}),Pu&&wu(Pu,m)||(Pu=m,m=rp(XO,"onSelect"),0<m.length&&(u=new pd("onSelect","select",null,u,f),a.push({event:u,listeners:m}),u.target=_l)))}function na(a,u){var f={};return f[a.toLowerCase()]=u.toLowerCase(),f["Webkit"+a]="webkit"+u,f["Moz"+a]="moz"+u,f}var kl={animationend:na("Animation","AnimationEnd"),animationiteration:na("Animation","AnimationIteration"),animationstart:na("Animation","AnimationStart"),transitionrun:na("Transition","TransitionRun"),transitionstart:na("Transition","TransitionStart"),transitioncancel:na("Transition","TransitionCancel"),transitionend:na("Transition","TransitionEnd")},BO={},sk={};Kr&&(sk=document.createElement("div").style,"AnimationEvent"in window||(delete kl.animationend.animation,delete kl.animationiteration.animation,delete kl.animationstart.animation),"TransitionEvent"in window||delete kl.transitionend.transition);function ia(a){if(BO[a])return BO[a];if(!kl[a])return a;var u=kl[a],f;for(f in u)if(u.hasOwnProperty(f)&&f in sk)return BO[a]=u[f];return a}var ok=ia("animationend"),ak=ia("animationiteration"),lk=ia("animationstart"),wz=ia("transitionrun"),Pz=ia("transitionstart"),Tz=ia("transitioncancel"),ck=ia("transitionend"),uk=new Map,ZO="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");ZO.push("scrollEnd");function rr(a,u){uk.set(a,u),ea(u,[a])}var Od=typeof reportError=="function"?reportError:function(a){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var u=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof a=="object"&&a!==null&&typeof a.message=="string"?String(a.message):String(a),error:a});if(!window.dispatchEvent(u))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",a);return}console.error(a)},Ei=[],wl=0,qO=0;function yd(){for(var a=wl,u=qO=wl=0;u<a;){var f=Ei[u];Ei[u++]=null;var m=Ei[u];Ei[u++]=null;var y=Ei[u];Ei[u++]=null;var b=Ei[u];if(Ei[u++]=null,m!==null&&y!==null){var w=m.pending;w===null?y.next=y:(y.next=w.next,w.next=y),m.pending=y}b!==0&&hk(f,y,b)}}function bd(a,u,f,m){Ei[wl++]=a,Ei[wl++]=u,Ei[wl++]=f,Ei[wl++]=m,qO|=m,a.lanes|=m,a=a.alternate,a!==null&&(a.lanes|=m)}function UO(a,u,f,m){return bd(a,u,f,m),xd(a)}function ra(a,u){return bd(a,null,null,u),xd(a)}function hk(a,u,f){a.lanes|=f;var m=a.alternate;m!==null&&(m.lanes|=f);for(var y=!1,b=a.return;b!==null;)b.childLanes|=f,m=b.alternate,m!==null&&(m.childLanes|=f),b.tag===22&&(a=b.stateNode,a===null||a._visibility&1||(y=!0)),a=b,b=b.return;return a.tag===3?(b=a.stateNode,y&&u!==null&&(y=31-bt(f),a=b.hiddenUpdates,m=a[y],m===null?a[y]=[u]:m.push(u),u.lane=f|536870912),b):null}function xd(a){if(50<Gu)throw Gu=0,ty=null,Error(i(185));for(var u=a.return;u!==null;)a=u,u=a.return;return a.tag===3?a.stateNode:null}var Pl={};function Qz(a,u,f,m){this.tag=a,this.key=f,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=m,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(a,u,f,m){return new Qz(a,u,f,m)}function YO(a){return a=a.prototype,!(!a||!a.isReactComponent)}function Jr(a,u){var f=a.alternate;return f===null?(f=ui(a.tag,u,a.key,a.mode),f.elementType=a.elementType,f.type=a.type,f.stateNode=a.stateNode,f.alternate=a,a.alternate=f):(f.pendingProps=u,f.type=a.type,f.flags=0,f.subtreeFlags=0,f.deletions=null),f.flags=a.flags&65011712,f.childLanes=a.childLanes,f.lanes=a.lanes,f.child=a.child,f.memoizedProps=a.memoizedProps,f.memoizedState=a.memoizedState,f.updateQueue=a.updateQueue,u=a.dependencies,f.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},f.sibling=a.sibling,f.index=a.index,f.ref=a.ref,f.refCleanup=a.refCleanup,f}function fk(a,u){a.flags&=65011714;var f=a.alternate;return f===null?(a.childLanes=0,a.lanes=u,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=f.childLanes,a.lanes=f.lanes,a.child=f.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=f.memoizedProps,a.memoizedState=f.memoizedState,a.updateQueue=f.updateQueue,a.type=f.type,u=f.dependencies,a.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext}),a}function vd(a,u,f,m,y,b){var w=0;if(m=a,typeof a=="function")YO(a)&&(w=1);else if(typeof a=="string")w=$3(a,f,re.current)?26:a==="html"||a==="head"||a==="body"?27:5;else e:switch(a){case U:return a=ui(31,f,u,y),a.elementType=U,a.lanes=b,a;case S:return sa(f.children,y,b,u);case _:w=8,y|=24;break;case k:return a=ui(12,f,u,y|2),a.elementType=k,a.lanes=b,a;case $:return a=ui(13,f,u,y),a.elementType=$,a.lanes=b,a;case C:return a=ui(19,f,u,y),a.elementType=C,a.lanes=b,a;default:if(typeof a=="object"&&a!==null)switch(a.$$typeof){case Q:w=10;break e;case P:w=9;break e;case R:w=11;break e;case D:w=14;break e;case Z:w=16,m=null;break e}w=29,f=Error(i(130,a===null?"null":typeof a,"")),m=null}return u=ui(w,f,u,y),u.elementType=a,u.type=m,u.lanes=b,u}function sa(a,u,f,m){return a=ui(7,a,m,u),a.lanes=f,a}function GO(a,u,f){return a=ui(6,a,null,u),a.lanes=f,a}function dk(a){var u=ui(18,null,null,0);return u.stateNode=a,u}function WO(a,u,f){return u=ui(4,a.children!==null?a.children:[],a.key,u),u.lanes=f,u.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation},u}var pk=new WeakMap;function Ai(a,u){if(typeof a=="object"&&a!==null){var f=pk.get(a);return f!==void 0?f:(u={value:a,source:u,stack:hl(u)},pk.set(a,u),u)}return{value:a,source:u,stack:hl(u)}}var Tl=[],Ql=0,Sd=null,Tu=0,Ri=[],$i=0,Ys=null,Or=1,yr="";function es(a,u){Tl[Ql++]=Tu,Tl[Ql++]=Sd,Sd=a,Tu=u}function mk(a,u,f){Ri[$i++]=Or,Ri[$i++]=yr,Ri[$i++]=Ys,Ys=a;var m=Or;a=yr;var y=32-bt(m)-1;m&=~(1<<y),f+=1;var b=32-bt(u)+y;if(30<b){var w=y-y%5;b=(m&(1<<w)-1).toString(32),m>>=w,y-=w,Or=1<<32-bt(u)+y|f<<y|m,yr=b+a}else Or=1<<b|f<<y|m,yr=a}function HO(a){a.return!==null&&(es(a,1),mk(a,1,0))}function FO(a){for(;a===Sd;)Sd=Tl[--Ql],Tl[Ql]=null,Tu=Tl[--Ql],Tl[Ql]=null;for(;a===Ys;)Ys=Ri[--$i],Ri[$i]=null,yr=Ri[--$i],Ri[$i]=null,Or=Ri[--$i],Ri[$i]=null}function gk(a,u){Ri[$i++]=Or,Ri[$i++]=yr,Ri[$i++]=Ys,Or=u.id,yr=u.overflow,Ys=a}var hn=null,Pt=null,Ke=!1,Gs=null,Li=!1,KO=Error(i(519));function Ws(a){var u=Error(i(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Qu(Ai(u,a)),KO}function Ok(a){var u=a.stateNode,f=a.type,m=a.memoizedProps;switch(u[un]=a,u[Bn]=m,f){case"dialog":qe("cancel",u),qe("close",u);break;case"iframe":case"object":case"embed":qe("load",u);break;case"video":case"audio":for(f=0;f<Hu.length;f++)qe(Hu[f],u);break;case"source":qe("error",u);break;case"img":case"image":case"link":qe("error",u),qe("load",u);break;case"details":qe("toggle",u);break;case"input":qe("invalid",u),E_(u,m.value,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name,!0);break;case"select":qe("invalid",u);break;case"textarea":qe("invalid",u),R_(u,m.value,m.defaultValue,m.children)}f=m.children,typeof f!="string"&&typeof f!="number"&&typeof f!="bigint"||u.textContent===""+f||m.suppressHydrationWarning===!0||LP(u.textContent,f)?(m.popover!=null&&(qe("beforetoggle",u),qe("toggle",u)),m.onScroll!=null&&qe("scroll",u),m.onScrollEnd!=null&&qe("scrollend",u),m.onClick!=null&&(u.onclick=Fr),u=!0):u=!1,u||Ws(a,!0)}function yk(a){for(hn=a.return;hn;)switch(hn.tag){case 5:case 31:case 13:Li=!1;return;case 27:case 3:Li=!0;return;default:hn=hn.return}}function Cl(a){if(a!==hn)return!1;if(!Ke)return yk(a),Ke=!0,!1;var u=a.tag,f;if((f=u!==3&&u!==27)&&((f=u===5)&&(f=a.type,f=!(f!=="form"&&f!=="button")||gy(a.type,a.memoizedProps)),f=!f),f&&Pt&&Ws(a),yk(a),u===13){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));Pt=BP(a)}else if(u===31){if(a=a.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(317));Pt=BP(a)}else u===27?(u=Pt,co(a.type)?(a=vy,vy=null,Pt=a):Pt=u):Pt=hn?Di(a.stateNode.nextSibling):null;return!0}function oa(){Pt=hn=null,Ke=!1}function JO(){var a=Gs;return a!==null&&(Gn===null?Gn=a:Gn.push.apply(Gn,a),Gs=null),a}function Qu(a){Gs===null?Gs=[a]:Gs.push(a)}var e0=N(null),aa=null,ts=null;function Hs(a,u,f){L(e0,u._currentValue),u._currentValue=f}function ns(a){a._currentValue=e0.current,te(e0)}function t0(a,u,f){for(;a!==null;){var m=a.alternate;if((a.childLanes&u)!==u?(a.childLanes|=u,m!==null&&(m.childLanes|=u)):m!==null&&(m.childLanes&u)!==u&&(m.childLanes|=u),a===f)break;a=a.return}}function n0(a,u,f,m){var y=a.child;for(y!==null&&(y.return=a);y!==null;){var b=y.dependencies;if(b!==null){var w=y.child;b=b.firstContext;e:for(;b!==null;){var E=b;b=y;for(var z=0;z<u.length;z++)if(E.context===u[z]){b.lanes|=f,E=b.alternate,E!==null&&(E.lanes|=f),t0(b.return,f,a),m||(w=null);break e}b=E.next}}else if(y.tag===18){if(w=y.return,w===null)throw Error(i(341));w.lanes|=f,b=w.alternate,b!==null&&(b.lanes|=f),t0(w,f,a),w=null}else w=y.child;if(w!==null)w.return=y;else for(w=y;w!==null;){if(w===a){w=null;break}if(y=w.sibling,y!==null){y.return=w.return,w=y;break}w=w.return}y=w}}function El(a,u,f,m){a=null;for(var y=u,b=!1;y!==null;){if(!b){if((y.flags&524288)!==0)b=!0;else if((y.flags&262144)!==0)break}if(y.tag===10){var w=y.alternate;if(w===null)throw Error(i(387));if(w=w.memoizedProps,w!==null){var E=y.type;ci(y.pendingProps.value,w.value)||(a!==null?a.push(E):a=[E])}}else if(y===Ce.current){if(w=y.alternate,w===null)throw Error(i(387));w.memoizedState.memoizedState!==y.memoizedState.memoizedState&&(a!==null?a.push(th):a=[th])}y=y.return}a!==null&&n0(u,a,f,m),u.flags|=262144}function _d(a){for(a=a.firstContext;a!==null;){if(!ci(a.context._currentValue,a.memoizedValue))return!0;a=a.next}return!1}function la(a){aa=a,ts=null,a=a.dependencies,a!==null&&(a.firstContext=null)}function fn(a){return bk(aa,a)}function kd(a,u){return aa===null&&la(a),bk(a,u)}function bk(a,u){var f=u._currentValue;if(u={context:u,memoizedValue:f,next:null},ts===null){if(a===null)throw Error(i(308));ts=u,a.dependencies={lanes:0,firstContext:u},a.flags|=524288}else ts=ts.next=u;return f}var Cz=typeof AbortController<"u"?AbortController:function(){var a=[],u=this.signal={aborted:!1,addEventListener:function(f,m){a.push(m)}};this.abort=function(){u.aborted=!0,a.forEach(function(f){return f()})}},Ez=t.unstable_scheduleCallback,Az=t.unstable_NormalPriority,Vt={$$typeof:Q,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function i0(){return{controller:new Cz,data:new Map,refCount:0}}function Cu(a){a.refCount--,a.refCount===0&&Ez(Az,function(){a.controller.abort()})}var Eu=null,r0=0,Al=0,Rl=null;function Rz(a,u){if(Eu===null){var f=Eu=[];r0=0,Al=ay(),Rl={status:"pending",value:void 0,then:function(m){f.push(m)}}}return r0++,u.then(xk,xk),u}function xk(){if(--r0===0&&Eu!==null){Rl!==null&&(Rl.status="fulfilled");var a=Eu;Eu=null,Al=0,Rl=null;for(var u=0;u<a.length;u++)(0,a[u])()}}function $z(a,u){var f=[],m={status:"pending",value:null,reason:null,then:function(y){f.push(y)}};return a.then(function(){m.status="fulfilled",m.value=u;for(var y=0;y<f.length;y++)(0,f[y])(u)},function(y){for(m.status="rejected",m.reason=y,y=0;y<f.length;y++)(0,f[y])(void 0)}),m}var vk=q.S;q.S=function(a,u){rP=it(),typeof u=="object"&&u!==null&&typeof u.then=="function"&&Rz(a,u),vk!==null&&vk(a,u)};var ca=N(null);function s0(){var a=ca.current;return a!==null?a:xt.pooledCache}function wd(a,u){u===null?L(ca,ca.current):L(ca,u.pool)}function Sk(){var a=s0();return a===null?null:{parent:Vt._currentValue,pool:a}}var $l=Error(i(460)),o0=Error(i(474)),Pd=Error(i(542)),Td={then:function(){}};function _k(a){return a=a.status,a==="fulfilled"||a==="rejected"}function kk(a,u,f){switch(f=a[f],f===void 0?a.push(u):f!==u&&(u.then(Fr,Fr),u=f),u.status){case"fulfilled":return u.value;case"rejected":throw a=u.reason,Pk(a),a;default:if(typeof u.status=="string")u.then(Fr,Fr);else{if(a=xt,a!==null&&100<a.shellSuspendCounter)throw Error(i(482));a=u,a.status="pending",a.then(function(m){if(u.status==="pending"){var y=u;y.status="fulfilled",y.value=m}},function(m){if(u.status==="pending"){var y=u;y.status="rejected",y.reason=m}})}switch(u.status){case"fulfilled":return u.value;case"rejected":throw a=u.reason,Pk(a),a}throw ha=u,$l}}function ua(a){try{var u=a._init;return u(a._payload)}catch(f){throw f!==null&&typeof f=="object"&&typeof f.then=="function"?(ha=f,$l):f}}var ha=null;function wk(){if(ha===null)throw Error(i(459));var a=ha;return ha=null,a}function Pk(a){if(a===$l||a===Pd)throw Error(i(483))}var Ll=null,Au=0;function Qd(a){var u=Au;return Au+=1,Ll===null&&(Ll=[]),kk(Ll,a,u)}function Ru(a,u){u=u.props.ref,a.ref=u!==void 0?u:null}function Cd(a,u){throw u.$$typeof===g?Error(i(525)):(a=Object.prototype.toString.call(u),Error(i(31,a==="[object Object]"?"object with keys {"+Object.keys(u).join(", ")+"}":a)))}function Tk(a){function u(Y,X){if(a){var W=Y.deletions;W===null?(Y.deletions=[X],Y.flags|=16):W.push(X)}}function f(Y,X){if(!a)return null;for(;X!==null;)u(Y,X),X=X.sibling;return null}function m(Y){for(var X=new Map;Y!==null;)Y.key!==null?X.set(Y.key,Y):X.set(Y.index,Y),Y=Y.sibling;return X}function y(Y,X){return Y=Jr(Y,X),Y.index=0,Y.sibling=null,Y}function b(Y,X,W){return Y.index=W,a?(W=Y.alternate,W!==null?(W=W.index,W<X?(Y.flags|=67108866,X):W):(Y.flags|=67108866,X)):(Y.flags|=1048576,X)}function w(Y){return a&&Y.alternate===null&&(Y.flags|=67108866),Y}function E(Y,X,W,ue){return X===null||X.tag!==6?(X=GO(W,Y.mode,ue),X.return=Y,X):(X=y(X,W),X.return=Y,X)}function z(Y,X,W,ue){var Ae=W.type;return Ae===S?oe(Y,X,W.props.children,ue,W.key):X!==null&&(X.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===Z&&ua(Ae)===X.type)?(X=y(X,W.props),Ru(X,W),X.return=Y,X):(X=vd(W.type,W.key,W.props,null,Y.mode,ue),Ru(X,W),X.return=Y,X)}function H(Y,X,W,ue){return X===null||X.tag!==4||X.stateNode.containerInfo!==W.containerInfo||X.stateNode.implementation!==W.implementation?(X=WO(W,Y.mode,ue),X.return=Y,X):(X=y(X,W.children||[]),X.return=Y,X)}function oe(Y,X,W,ue,Ae){return X===null||X.tag!==7?(X=sa(W,Y.mode,ue,Ae),X.return=Y,X):(X=y(X,W),X.return=Y,X)}function he(Y,X,W){if(typeof X=="string"&&X!==""||typeof X=="number"||typeof X=="bigint")return X=GO(""+X,Y.mode,W),X.return=Y,X;if(typeof X=="object"&&X!==null){switch(X.$$typeof){case O:return W=vd(X.type,X.key,X.props,null,Y.mode,W),Ru(W,X),W.return=Y,W;case x:return X=WO(X,Y.mode,W),X.return=Y,X;case Z:return X=ua(X),he(Y,X,W)}if(ie(X)||G(X))return X=sa(X,Y.mode,W,null),X.return=Y,X;if(typeof X.then=="function")return he(Y,Qd(X),W);if(X.$$typeof===Q)return he(Y,kd(Y,X),W);Cd(Y,X)}return null}function F(Y,X,W,ue){var Ae=X!==null?X.key:null;if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return Ae!==null?null:E(Y,X,""+W,ue);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case O:return W.key===Ae?z(Y,X,W,ue):null;case x:return W.key===Ae?H(Y,X,W,ue):null;case Z:return W=ua(W),F(Y,X,W,ue)}if(ie(W)||G(W))return Ae!==null?null:oe(Y,X,W,ue,null);if(typeof W.then=="function")return F(Y,X,Qd(W),ue);if(W.$$typeof===Q)return F(Y,X,kd(Y,W),ue);Cd(Y,W)}return null}function ne(Y,X,W,ue,Ae){if(typeof ue=="string"&&ue!==""||typeof ue=="number"||typeof ue=="bigint")return Y=Y.get(W)||null,E(X,Y,""+ue,Ae);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case O:return Y=Y.get(ue.key===null?W:ue.key)||null,z(X,Y,ue,Ae);case x:return Y=Y.get(ue.key===null?W:ue.key)||null,H(X,Y,ue,Ae);case Z:return ue=ua(ue),ne(Y,X,W,ue,Ae)}if(ie(ue)||G(ue))return Y=Y.get(W)||null,oe(X,Y,ue,Ae,null);if(typeof ue.then=="function")return ne(Y,X,W,Qd(ue),Ae);if(ue.$$typeof===Q)return ne(Y,X,W,kd(X,ue),Ae);Cd(X,ue)}return null}function Pe(Y,X,W,ue){for(var Ae=null,at=null,Te=X,ze=X=0,He=null;Te!==null&&ze<W.length;ze++){Te.index>ze?(He=Te,Te=null):He=Te.sibling;var lt=F(Y,Te,W[ze],ue);if(lt===null){Te===null&&(Te=He);break}a&&Te&&lt.alternate===null&&u(Y,Te),X=b(lt,X,ze),at===null?Ae=lt:at.sibling=lt,at=lt,Te=He}if(ze===W.length)return f(Y,Te),Ke&&es(Y,ze),Ae;if(Te===null){for(;ze<W.length;ze++)Te=he(Y,W[ze],ue),Te!==null&&(X=b(Te,X,ze),at===null?Ae=Te:at.sibling=Te,at=Te);return Ke&&es(Y,ze),Ae}for(Te=m(Te);ze<W.length;ze++)He=ne(Te,Y,ze,W[ze],ue),He!==null&&(a&&He.alternate!==null&&Te.delete(He.key===null?ze:He.key),X=b(He,X,ze),at===null?Ae=He:at.sibling=He,at=He);return a&&Te.forEach(function(mo){return u(Y,mo)}),Ke&&es(Y,ze),Ae}function $e(Y,X,W,ue){if(W==null)throw Error(i(151));for(var Ae=null,at=null,Te=X,ze=X=0,He=null,lt=W.next();Te!==null&&!lt.done;ze++,lt=W.next()){Te.index>ze?(He=Te,Te=null):He=Te.sibling;var mo=F(Y,Te,lt.value,ue);if(mo===null){Te===null&&(Te=He);break}a&&Te&&mo.alternate===null&&u(Y,Te),X=b(mo,X,ze),at===null?Ae=mo:at.sibling=mo,at=mo,Te=He}if(lt.done)return f(Y,Te),Ke&&es(Y,ze),Ae;if(Te===null){for(;!lt.done;ze++,lt=W.next())lt=he(Y,lt.value,ue),lt!==null&&(X=b(lt,X,ze),at===null?Ae=lt:at.sibling=lt,at=lt);return Ke&&es(Y,ze),Ae}for(Te=m(Te);!lt.done;ze++,lt=W.next())lt=ne(Te,Y,ze,lt.value,ue),lt!==null&&(a&&lt.alternate!==null&&Te.delete(lt.key===null?ze:lt.key),X=b(lt,X,ze),at===null?Ae=lt:at.sibling=lt,at=lt);return a&&Te.forEach(function(Z3){return u(Y,Z3)}),Ke&&es(Y,ze),Ae}function Ot(Y,X,W,ue){if(typeof W=="object"&&W!==null&&W.type===S&&W.key===null&&(W=W.props.children),typeof W=="object"&&W!==null){switch(W.$$typeof){case O:e:{for(var Ae=W.key;X!==null;){if(X.key===Ae){if(Ae=W.type,Ae===S){if(X.tag===7){f(Y,X.sibling),ue=y(X,W.props.children),ue.return=Y,Y=ue;break e}}else if(X.elementType===Ae||typeof Ae=="object"&&Ae!==null&&Ae.$$typeof===Z&&ua(Ae)===X.type){f(Y,X.sibling),ue=y(X,W.props),Ru(ue,W),ue.return=Y,Y=ue;break e}f(Y,X);break}else u(Y,X);X=X.sibling}W.type===S?(ue=sa(W.props.children,Y.mode,ue,W.key),ue.return=Y,Y=ue):(ue=vd(W.type,W.key,W.props,null,Y.mode,ue),Ru(ue,W),ue.return=Y,Y=ue)}return w(Y);case x:e:{for(Ae=W.key;X!==null;){if(X.key===Ae)if(X.tag===4&&X.stateNode.containerInfo===W.containerInfo&&X.stateNode.implementation===W.implementation){f(Y,X.sibling),ue=y(X,W.children||[]),ue.return=Y,Y=ue;break e}else{f(Y,X);break}else u(Y,X);X=X.sibling}ue=WO(W,Y.mode,ue),ue.return=Y,Y=ue}return w(Y);case Z:return W=ua(W),Ot(Y,X,W,ue)}if(ie(W))return Pe(Y,X,W,ue);if(G(W)){if(Ae=G(W),typeof Ae!="function")throw Error(i(150));return W=Ae.call(W),$e(Y,X,W,ue)}if(typeof W.then=="function")return Ot(Y,X,Qd(W),ue);if(W.$$typeof===Q)return Ot(Y,X,kd(Y,W),ue);Cd(Y,W)}return typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint"?(W=""+W,X!==null&&X.tag===6?(f(Y,X.sibling),ue=y(X,W),ue.return=Y,Y=ue):(f(Y,X),ue=GO(W,Y.mode,ue),ue.return=Y,Y=ue),w(Y)):f(Y,X)}return function(Y,X,W,ue){try{Au=0;var Ae=Ot(Y,X,W,ue);return Ll=null,Ae}catch(Te){if(Te===$l||Te===Pd)throw Te;var at=ui(29,Te,null,Y.mode);return at.lanes=ue,at.return=Y,at}finally{}}}var fa=Tk(!0),Qk=Tk(!1),Fs=!1;function a0(a){a.updateQueue={baseState:a.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function l0(a,u){a=a.updateQueue,u.updateQueue===a&&(u.updateQueue={baseState:a.baseState,firstBaseUpdate:a.firstBaseUpdate,lastBaseUpdate:a.lastBaseUpdate,shared:a.shared,callbacks:null})}function Ks(a){return{lane:a,tag:0,payload:null,callback:null,next:null}}function Js(a,u,f){var m=a.updateQueue;if(m===null)return null;if(m=m.shared,(ct&2)!==0){var y=m.pending;return y===null?u.next=u:(u.next=y.next,y.next=u),m.pending=u,u=xd(a),hk(a,null,f),u}return bd(a,m,u,f),xd(a)}function $u(a,u,f){if(u=u.updateQueue,u!==null&&(u=u.shared,(f&4194048)!==0)){var m=u.lanes;m&=a.pendingLanes,f|=m,u.lanes=f,b_(a,f)}}function c0(a,u){var f=a.updateQueue,m=a.alternate;if(m!==null&&(m=m.updateQueue,f===m)){var y=null,b=null;if(f=f.firstBaseUpdate,f!==null){do{var w={lane:f.lane,tag:f.tag,payload:f.payload,callback:null,next:null};b===null?y=b=w:b=b.next=w,f=f.next}while(f!==null);b===null?y=b=u:b=b.next=u}else y=b=u;f={baseState:m.baseState,firstBaseUpdate:y,lastBaseUpdate:b,shared:m.shared,callbacks:m.callbacks},a.updateQueue=f;return}a=f.lastBaseUpdate,a===null?f.firstBaseUpdate=u:a.next=u,f.lastBaseUpdate=u}var u0=!1;function Lu(){if(u0){var a=Rl;if(a!==null)throw a}}function Mu(a,u,f,m){u0=!1;var y=a.updateQueue;Fs=!1;var b=y.firstBaseUpdate,w=y.lastBaseUpdate,E=y.shared.pending;if(E!==null){y.shared.pending=null;var z=E,H=z.next;z.next=null,w===null?b=H:w.next=H,w=z;var oe=a.alternate;oe!==null&&(oe=oe.updateQueue,E=oe.lastBaseUpdate,E!==w&&(E===null?oe.firstBaseUpdate=H:E.next=H,oe.lastBaseUpdate=z))}if(b!==null){var he=y.baseState;w=0,oe=H=z=null,E=b;do{var F=E.lane&-536870913,ne=F!==E.lane;if(ne?(We&F)===F:(m&F)===F){F!==0&&F===Al&&(u0=!0),oe!==null&&(oe=oe.next={lane:0,tag:E.tag,payload:E.payload,callback:null,next:null});e:{var Pe=a,$e=E;F=u;var Ot=f;switch($e.tag){case 1:if(Pe=$e.payload,typeof Pe=="function"){he=Pe.call(Ot,he,F);break e}he=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=$e.payload,F=typeof Pe=="function"?Pe.call(Ot,he,F):Pe,F==null)break e;he=p({},he,F);break e;case 2:Fs=!0}}F=E.callback,F!==null&&(a.flags|=64,ne&&(a.flags|=8192),ne=y.callbacks,ne===null?y.callbacks=[F]:ne.push(F))}else ne={lane:F,tag:E.tag,payload:E.payload,callback:E.callback,next:null},oe===null?(H=oe=ne,z=he):oe=oe.next=ne,w|=F;if(E=E.next,E===null){if(E=y.shared.pending,E===null)break;ne=E,E=ne.next,ne.next=null,y.lastBaseUpdate=ne,y.shared.pending=null}}while(!0);oe===null&&(z=he),y.baseState=z,y.firstBaseUpdate=H,y.lastBaseUpdate=oe,b===null&&(y.shared.lanes=0),ro|=w,a.lanes=w,a.memoizedState=he}}function Ck(a,u){if(typeof a!="function")throw Error(i(191,a));a.call(u)}function Ek(a,u){var f=a.callbacks;if(f!==null)for(a.callbacks=null,a=0;a<f.length;a++)Ck(f[a],u)}var Ml=N(null),Ed=N(0);function Ak(a,u){a=hs,L(Ed,a),L(Ml,u),hs=a|u.baseLanes}function h0(){L(Ed,hs),L(Ml,Ml.current)}function f0(){hs=Ed.current,te(Ml),te(Ed)}var hi=N(null),Mi=null;function eo(a){var u=a.alternate;L(jt,jt.current&1),L(hi,a),Mi===null&&(u===null||Ml.current!==null||u.memoizedState!==null)&&(Mi=a)}function d0(a){L(jt,jt.current),L(hi,a),Mi===null&&(Mi=a)}function Rk(a){a.tag===22?(L(jt,jt.current),L(hi,a),Mi===null&&(Mi=a)):to()}function to(){L(jt,jt.current),L(hi,hi.current)}function fi(a){te(hi),Mi===a&&(Mi=null),te(jt)}var jt=N(0);function Ad(a){for(var u=a;u!==null;){if(u.tag===13){var f=u.memoizedState;if(f!==null&&(f=f.dehydrated,f===null||by(f)||xy(f)))return u}else if(u.tag===19&&(u.memoizedProps.revealOrder==="forwards"||u.memoizedProps.revealOrder==="backwards"||u.memoizedProps.revealOrder==="unstable_legacy-backwards"||u.memoizedProps.revealOrder==="together")){if((u.flags&128)!==0)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var is=0,Ne=null,mt=null,Bt=null,Rd=!1,Dl=!1,da=!1,$d=0,Du=0,jl=null,Lz=0;function $t(){throw Error(i(321))}function p0(a,u){if(u===null)return!1;for(var f=0;f<u.length&&f<a.length;f++)if(!ci(a[f],u[f]))return!1;return!0}function m0(a,u,f,m,y,b){return is=b,Ne=u,u.memoizedState=null,u.updateQueue=null,u.lanes=0,q.H=a===null||a.memoizedState===null?mw:E0,da=!1,b=f(m,y),da=!1,Dl&&(b=Lk(u,f,m,y)),$k(a),b}function $k(a){q.H=zu;var u=mt!==null&&mt.next!==null;if(is=0,Bt=mt=Ne=null,Rd=!1,Du=0,jl=null,u)throw Error(i(300));a===null||Zt||(a=a.dependencies,a!==null&&_d(a)&&(Zt=!0))}function Lk(a,u,f,m){Ne=a;var y=0;do{if(Dl&&(jl=null),Du=0,Dl=!1,25<=y)throw Error(i(301));if(y+=1,Bt=mt=null,a.updateQueue!=null){var b=a.updateQueue;b.lastEffect=null,b.events=null,b.stores=null,b.memoCache!=null&&(b.memoCache.index=0)}q.H=gw,b=u(f,m)}while(Dl);return b}function Mz(){var a=q.H,u=a.useState()[0];return u=typeof u.then=="function"?ju(u):u,a=a.useState()[0],(mt!==null?mt.memoizedState:null)!==a&&(Ne.flags|=1024),u}function g0(){var a=$d!==0;return $d=0,a}function O0(a,u,f){u.updateQueue=a.updateQueue,u.flags&=-2053,a.lanes&=~f}function y0(a){if(Rd){for(a=a.memoizedState;a!==null;){var u=a.queue;u!==null&&(u.pending=null),a=a.next}Rd=!1}is=0,Bt=mt=Ne=null,Dl=!1,Du=$d=0,jl=null}function Rn(){var a={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Bt===null?Ne.memoizedState=Bt=a:Bt=Bt.next=a,Bt}function Nt(){if(mt===null){var a=Ne.alternate;a=a!==null?a.memoizedState:null}else a=mt.next;var u=Bt===null?Ne.memoizedState:Bt.next;if(u!==null)Bt=u,mt=a;else{if(a===null)throw Ne.alternate===null?Error(i(467)):Error(i(310));mt=a,a={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Bt===null?Ne.memoizedState=Bt=a:Bt=Bt.next=a}return Bt}function Ld(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function ju(a){var u=Du;return Du+=1,jl===null&&(jl=[]),a=kk(jl,a,u),u=Ne,(Bt===null?u.memoizedState:Bt.next)===null&&(u=u.alternate,q.H=u===null||u.memoizedState===null?mw:E0),a}function Md(a){if(a!==null&&typeof a=="object"){if(typeof a.then=="function")return ju(a);if(a.$$typeof===Q)return fn(a)}throw Error(i(438,String(a)))}function b0(a){var u=null,f=Ne.updateQueue;if(f!==null&&(u=f.memoCache),u==null){var m=Ne.alternate;m!==null&&(m=m.updateQueue,m!==null&&(m=m.memoCache,m!=null&&(u={data:m.data.map(function(y){return y.slice()}),index:0})))}if(u==null&&(u={data:[],index:0}),f===null&&(f=Ld(),Ne.updateQueue=f),f.memoCache=u,f=u.data[u.index],f===void 0)for(f=u.data[u.index]=Array(a),m=0;m<a;m++)f[m]=M;return u.index++,f}function rs(a,u){return typeof u=="function"?u(a):u}function Dd(a){var u=Nt();return x0(u,mt,a)}function x0(a,u,f){var m=a.queue;if(m===null)throw Error(i(311));m.lastRenderedReducer=f;var y=a.baseQueue,b=m.pending;if(b!==null){if(y!==null){var w=y.next;y.next=b.next,b.next=w}u.baseQueue=y=b,m.pending=null}if(b=a.baseState,y===null)a.memoizedState=b;else{u=y.next;var E=w=null,z=null,H=u,oe=!1;do{var he=H.lane&-536870913;if(he!==H.lane?(We&he)===he:(is&he)===he){var F=H.revertLane;if(F===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null}),he===Al&&(oe=!0);else if((is&F)===F){H=H.next,F===Al&&(oe=!0);continue}else he={lane:0,revertLane:H.revertLane,gesture:null,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},z===null?(E=z=he,w=b):z=z.next=he,Ne.lanes|=F,ro|=F;he=H.action,da&&f(b,he),b=H.hasEagerState?H.eagerState:f(b,he)}else F={lane:he,revertLane:H.revertLane,gesture:H.gesture,action:H.action,hasEagerState:H.hasEagerState,eagerState:H.eagerState,next:null},z===null?(E=z=F,w=b):z=z.next=F,Ne.lanes|=he,ro|=he;H=H.next}while(H!==null&&H!==u);if(z===null?w=b:z.next=E,!ci(b,a.memoizedState)&&(Zt=!0,oe&&(f=Rl,f!==null)))throw f;a.memoizedState=b,a.baseState=w,a.baseQueue=z,m.lastRenderedState=b}return y===null&&(m.lanes=0),[a.memoizedState,m.dispatch]}function v0(a){var u=Nt(),f=u.queue;if(f===null)throw Error(i(311));f.lastRenderedReducer=a;var m=f.dispatch,y=f.pending,b=u.memoizedState;if(y!==null){f.pending=null;var w=y=y.next;do b=a(b,w.action),w=w.next;while(w!==y);ci(b,u.memoizedState)||(Zt=!0),u.memoizedState=b,u.baseQueue===null&&(u.baseState=b),f.lastRenderedState=b}return[b,m]}function Mk(a,u,f){var m=Ne,y=Nt(),b=Ke;if(b){if(f===void 0)throw Error(i(407));f=f()}else f=u();var w=!ci((mt||y).memoizedState,f);if(w&&(y.memoizedState=f,Zt=!0),y=y.queue,k0(Nk.bind(null,m,y,a),[a]),y.getSnapshot!==u||w||Bt!==null&&Bt.memoizedState.tag&1){if(m.flags|=2048,Nl(9,{destroy:void 0},jk.bind(null,m,y,f,u),null),xt===null)throw Error(i(349));b||(is&127)!==0||Dk(m,u,f)}return f}function Dk(a,u,f){a.flags|=16384,a={getSnapshot:u,value:f},u=Ne.updateQueue,u===null?(u=Ld(),Ne.updateQueue=u,u.stores=[a]):(f=u.stores,f===null?u.stores=[a]:f.push(a))}function jk(a,u,f,m){u.value=f,u.getSnapshot=m,zk(u)&&Ik(a)}function Nk(a,u,f){return f(function(){zk(u)&&Ik(a)})}function zk(a){var u=a.getSnapshot;a=a.value;try{var f=u();return!ci(a,f)}catch{return!0}}function Ik(a){var u=ra(a,2);u!==null&&Wn(u,a,2)}function S0(a){var u=Rn();if(typeof a=="function"){var f=a;if(a=f(),da){Vn(!0);try{f()}finally{Vn(!1)}}}return u.memoizedState=u.baseState=a,u.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:a},u}function Xk(a,u,f,m){return a.baseState=f,x0(a,mt,typeof m=="function"?m:rs)}function Dz(a,u,f,m,y){if(zd(a))throw Error(i(485));if(a=u.action,a!==null){var b={payload:y,action:a,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(w){b.listeners.push(w)}};q.T!==null?f(!0):b.isTransition=!1,m(b),f=u.pending,f===null?(b.next=u.pending=b,Vk(u,b)):(b.next=f.next,u.pending=f.next=b)}}function Vk(a,u){var f=u.action,m=u.payload,y=a.state;if(u.isTransition){var b=q.T,w={};q.T=w;try{var E=f(y,m),z=q.S;z!==null&&z(w,E),Bk(a,u,E)}catch(H){_0(a,u,H)}finally{b!==null&&w.types!==null&&(b.types=w.types),q.T=b}}else try{b=f(y,m),Bk(a,u,b)}catch(H){_0(a,u,H)}}function Bk(a,u,f){f!==null&&typeof f=="object"&&typeof f.then=="function"?f.then(function(m){Zk(a,u,m)},function(m){return _0(a,u,m)}):Zk(a,u,f)}function Zk(a,u,f){u.status="fulfilled",u.value=f,qk(u),a.state=f,u=a.pending,u!==null&&(f=u.next,f===u?a.pending=null:(f=f.next,u.next=f,Vk(a,f)))}function _0(a,u,f){var m=a.pending;if(a.pending=null,m!==null){m=m.next;do u.status="rejected",u.reason=f,qk(u),u=u.next;while(u!==m)}a.action=null}function qk(a){a=a.listeners;for(var u=0;u<a.length;u++)(0,a[u])()}function Uk(a,u){return u}function Yk(a,u){if(Ke){var f=xt.formState;if(f!==null){e:{var m=Ne;if(Ke){if(Pt){t:{for(var y=Pt,b=Li;y.nodeType!==8;){if(!b){y=null;break t}if(y=Di(y.nextSibling),y===null){y=null;break t}}b=y.data,y=b==="F!"||b==="F"?y:null}if(y){Pt=Di(y.nextSibling),m=y.data==="F!";break e}}Ws(m)}m=!1}m&&(u=f[0])}}return f=Rn(),f.memoizedState=f.baseState=u,m={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Uk,lastRenderedState:u},f.queue=m,f=fw.bind(null,Ne,m),m.dispatch=f,m=S0(!1),b=C0.bind(null,Ne,!1,m.queue),m=Rn(),y={state:u,dispatch:null,action:a,pending:null},m.queue=y,f=Dz.bind(null,Ne,y,b,f),y.dispatch=f,m.memoizedState=a,[u,f,!1]}function Gk(a){var u=Nt();return Wk(u,mt,a)}function Wk(a,u,f){if(u=x0(a,u,Uk)[0],a=Dd(rs)[0],typeof u=="object"&&u!==null&&typeof u.then=="function")try{var m=ju(u)}catch(w){throw w===$l?Pd:w}else m=u;u=Nt();var y=u.queue,b=y.dispatch;return f!==u.memoizedState&&(Ne.flags|=2048,Nl(9,{destroy:void 0},jz.bind(null,y,f),null)),[m,b,a]}function jz(a,u){a.action=u}function Hk(a){var u=Nt(),f=mt;if(f!==null)return Wk(u,f,a);Nt(),u=u.memoizedState,f=Nt();var m=f.queue.dispatch;return f.memoizedState=a,[u,m,!1]}function Nl(a,u,f,m){return a={tag:a,create:f,deps:m,inst:u,next:null},u=Ne.updateQueue,u===null&&(u=Ld(),Ne.updateQueue=u),f=u.lastEffect,f===null?u.lastEffect=a.next=a:(m=f.next,f.next=a,a.next=m,u.lastEffect=a),a}function Fk(){return Nt().memoizedState}function jd(a,u,f,m){var y=Rn();Ne.flags|=a,y.memoizedState=Nl(1|u,{destroy:void 0},f,m===void 0?null:m)}function Nd(a,u,f,m){var y=Nt();m=m===void 0?null:m;var b=y.memoizedState.inst;mt!==null&&m!==null&&p0(m,mt.memoizedState.deps)?y.memoizedState=Nl(u,b,f,m):(Ne.flags|=a,y.memoizedState=Nl(1|u,b,f,m))}function Kk(a,u){jd(8390656,8,a,u)}function k0(a,u){Nd(2048,8,a,u)}function Nz(a){Ne.flags|=4;var u=Ne.updateQueue;if(u===null)u=Ld(),Ne.updateQueue=u,u.events=[a];else{var f=u.events;f===null?u.events=[a]:f.push(a)}}function Jk(a){var u=Nt().memoizedState;return Nz({ref:u,nextImpl:a}),function(){if((ct&2)!==0)throw Error(i(440));return u.impl.apply(void 0,arguments)}}function ew(a,u){return Nd(4,2,a,u)}function tw(a,u){return Nd(4,4,a,u)}function nw(a,u){if(typeof u=="function"){a=a();var f=u(a);return function(){typeof f=="function"?f():u(null)}}if(u!=null)return a=a(),u.current=a,function(){u.current=null}}function iw(a,u,f){f=f!=null?f.concat([a]):null,Nd(4,4,nw.bind(null,u,a),f)}function w0(){}function rw(a,u){var f=Nt();u=u===void 0?null:u;var m=f.memoizedState;return u!==null&&p0(u,m[1])?m[0]:(f.memoizedState=[a,u],a)}function sw(a,u){var f=Nt();u=u===void 0?null:u;var m=f.memoizedState;if(u!==null&&p0(u,m[1]))return m[0];if(m=a(),da){Vn(!0);try{a()}finally{Vn(!1)}}return f.memoizedState=[m,u],m}function P0(a,u,f){return f===void 0||(is&1073741824)!==0&&(We&261930)===0?a.memoizedState=u:(a.memoizedState=f,a=oP(),Ne.lanes|=a,ro|=a,f)}function ow(a,u,f,m){return ci(f,u)?f:Ml.current!==null?(a=P0(a,f,m),ci(a,u)||(Zt=!0),a):(is&42)===0||(is&1073741824)!==0&&(We&261930)===0?(Zt=!0,a.memoizedState=f):(a=oP(),Ne.lanes|=a,ro|=a,u)}function aw(a,u,f,m,y){var b=se.p;se.p=b!==0&&8>b?b:8;var w=q.T,E={};q.T=E,C0(a,!1,u,f);try{var z=y(),H=q.S;if(H!==null&&H(E,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var oe=$z(z,m);Nu(a,u,oe,mi(a))}else Nu(a,u,m,mi(a))}catch(he){Nu(a,u,{then:function(){},status:"rejected",reason:he},mi())}finally{se.p=b,w!==null&&E.types!==null&&(w.types=E.types),q.T=w}}function zz(){}function T0(a,u,f,m){if(a.tag!==5)throw Error(i(476));var y=lw(a).queue;aw(a,y,u,pe,f===null?zz:function(){return cw(a),f(m)})}function lw(a){var u=a.memoizedState;if(u!==null)return u;u={memoizedState:pe,baseState:pe,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:pe},next:null};var f={};return u.next={memoizedState:f,baseState:f,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:rs,lastRenderedState:f},next:null},a.memoizedState=u,a=a.alternate,a!==null&&(a.memoizedState=u),u}function cw(a){var u=lw(a);u.next===null&&(u=a.alternate.memoizedState),Nu(a,u.next.queue,{},mi())}function Q0(){return fn(th)}function uw(){return Nt().memoizedState}function hw(){return Nt().memoizedState}function Iz(a){for(var u=a.return;u!==null;){switch(u.tag){case 24:case 3:var f=mi();a=Ks(f);var m=Js(u,a,f);m!==null&&(Wn(m,u,f),$u(m,u,f)),u={cache:i0()},a.payload=u;return}u=u.return}}function Xz(a,u,f){var m=mi();f={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null},zd(a)?dw(u,f):(f=UO(a,u,f,m),f!==null&&(Wn(f,a,m),pw(f,u,m)))}function fw(a,u,f){var m=mi();Nu(a,u,f,m)}function Nu(a,u,f,m){var y={lane:m,revertLane:0,gesture:null,action:f,hasEagerState:!1,eagerState:null,next:null};if(zd(a))dw(u,y);else{var b=a.alternate;if(a.lanes===0&&(b===null||b.lanes===0)&&(b=u.lastRenderedReducer,b!==null))try{var w=u.lastRenderedState,E=b(w,f);if(y.hasEagerState=!0,y.eagerState=E,ci(E,w))return bd(a,u,y,0),xt===null&&yd(),!1}catch{}finally{}if(f=UO(a,u,y,m),f!==null)return Wn(f,a,m),pw(f,u,m),!0}return!1}function C0(a,u,f,m){if(m={lane:2,revertLane:ay(),gesture:null,action:m,hasEagerState:!1,eagerState:null,next:null},zd(a)){if(u)throw Error(i(479))}else u=UO(a,f,m,2),u!==null&&Wn(u,a,2)}function zd(a){var u=a.alternate;return a===Ne||u!==null&&u===Ne}function dw(a,u){Dl=Rd=!0;var f=a.pending;f===null?u.next=u:(u.next=f.next,f.next=u),a.pending=u}function pw(a,u,f){if((f&4194048)!==0){var m=u.lanes;m&=a.pendingLanes,f|=m,u.lanes=f,b_(a,f)}}var zu={readContext:fn,use:Md,useCallback:$t,useContext:$t,useEffect:$t,useImperativeHandle:$t,useLayoutEffect:$t,useInsertionEffect:$t,useMemo:$t,useReducer:$t,useRef:$t,useState:$t,useDebugValue:$t,useDeferredValue:$t,useTransition:$t,useSyncExternalStore:$t,useId:$t,useHostTransitionStatus:$t,useFormState:$t,useActionState:$t,useOptimistic:$t,useMemoCache:$t,useCacheRefresh:$t};zu.useEffectEvent=$t;var mw={readContext:fn,use:Md,useCallback:function(a,u){return Rn().memoizedState=[a,u===void 0?null:u],a},useContext:fn,useEffect:Kk,useImperativeHandle:function(a,u,f){f=f!=null?f.concat([a]):null,jd(4194308,4,nw.bind(null,u,a),f)},useLayoutEffect:function(a,u){return jd(4194308,4,a,u)},useInsertionEffect:function(a,u){jd(4,2,a,u)},useMemo:function(a,u){var f=Rn();u=u===void 0?null:u;var m=a();if(da){Vn(!0);try{a()}finally{Vn(!1)}}return f.memoizedState=[m,u],m},useReducer:function(a,u,f){var m=Rn();if(f!==void 0){var y=f(u);if(da){Vn(!0);try{f(u)}finally{Vn(!1)}}}else y=u;return m.memoizedState=m.baseState=y,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:y},m.queue=a,a=a.dispatch=Xz.bind(null,Ne,a),[m.memoizedState,a]},useRef:function(a){var u=Rn();return a={current:a},u.memoizedState=a},useState:function(a){a=S0(a);var u=a.queue,f=fw.bind(null,Ne,u);return u.dispatch=f,[a.memoizedState,f]},useDebugValue:w0,useDeferredValue:function(a,u){var f=Rn();return P0(f,a,u)},useTransition:function(){var a=S0(!1);return a=aw.bind(null,Ne,a.queue,!0,!1),Rn().memoizedState=a,[!1,a]},useSyncExternalStore:function(a,u,f){var m=Ne,y=Rn();if(Ke){if(f===void 0)throw Error(i(407));f=f()}else{if(f=u(),xt===null)throw Error(i(349));(We&127)!==0||Dk(m,u,f)}y.memoizedState=f;var b={value:f,getSnapshot:u};return y.queue=b,Kk(Nk.bind(null,m,b,a),[a]),m.flags|=2048,Nl(9,{destroy:void 0},jk.bind(null,m,b,f,u),null),f},useId:function(){var a=Rn(),u=xt.identifierPrefix;if(Ke){var f=yr,m=Or;f=(m&~(1<<32-bt(m)-1)).toString(32)+f,u="_"+u+"R_"+f,f=$d++,0<f&&(u+="H"+f.toString(32)),u+="_"}else f=Lz++,u="_"+u+"r_"+f.toString(32)+"_";return a.memoizedState=u},useHostTransitionStatus:Q0,useFormState:Yk,useActionState:Yk,useOptimistic:function(a){var u=Rn();u.memoizedState=u.baseState=a;var f={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return u.queue=f,u=C0.bind(null,Ne,!0,f),f.dispatch=u,[a,u]},useMemoCache:b0,useCacheRefresh:function(){return Rn().memoizedState=Iz.bind(null,Ne)},useEffectEvent:function(a){var u=Rn(),f={impl:a};return u.memoizedState=f,function(){if((ct&2)!==0)throw Error(i(440));return f.impl.apply(void 0,arguments)}}},E0={readContext:fn,use:Md,useCallback:rw,useContext:fn,useEffect:k0,useImperativeHandle:iw,useInsertionEffect:ew,useLayoutEffect:tw,useMemo:sw,useReducer:Dd,useRef:Fk,useState:function(){return Dd(rs)},useDebugValue:w0,useDeferredValue:function(a,u){var f=Nt();return ow(f,mt.memoizedState,a,u)},useTransition:function(){var a=Dd(rs)[0],u=Nt().memoizedState;return[typeof a=="boolean"?a:ju(a),u]},useSyncExternalStore:Mk,useId:uw,useHostTransitionStatus:Q0,useFormState:Gk,useActionState:Gk,useOptimistic:function(a,u){var f=Nt();return Xk(f,mt,a,u)},useMemoCache:b0,useCacheRefresh:hw};E0.useEffectEvent=Jk;var gw={readContext:fn,use:Md,useCallback:rw,useContext:fn,useEffect:k0,useImperativeHandle:iw,useInsertionEffect:ew,useLayoutEffect:tw,useMemo:sw,useReducer:v0,useRef:Fk,useState:function(){return v0(rs)},useDebugValue:w0,useDeferredValue:function(a,u){var f=Nt();return mt===null?P0(f,a,u):ow(f,mt.memoizedState,a,u)},useTransition:function(){var a=v0(rs)[0],u=Nt().memoizedState;return[typeof a=="boolean"?a:ju(a),u]},useSyncExternalStore:Mk,useId:uw,useHostTransitionStatus:Q0,useFormState:Hk,useActionState:Hk,useOptimistic:function(a,u){var f=Nt();return mt!==null?Xk(f,mt,a,u):(f.baseState=a,[a,f.queue.dispatch])},useMemoCache:b0,useCacheRefresh:hw};gw.useEffectEvent=Jk;function A0(a,u,f,m){u=a.memoizedState,f=f(m,u),f=f==null?u:p({},u,f),a.memoizedState=f,a.lanes===0&&(a.updateQueue.baseState=f)}var R0={enqueueSetState:function(a,u,f){a=a._reactInternals;var m=mi(),y=Ks(m);y.payload=u,f!=null&&(y.callback=f),u=Js(a,y,m),u!==null&&(Wn(u,a,m),$u(u,a,m))},enqueueReplaceState:function(a,u,f){a=a._reactInternals;var m=mi(),y=Ks(m);y.tag=1,y.payload=u,f!=null&&(y.callback=f),u=Js(a,y,m),u!==null&&(Wn(u,a,m),$u(u,a,m))},enqueueForceUpdate:function(a,u){a=a._reactInternals;var f=mi(),m=Ks(f);m.tag=2,u!=null&&(m.callback=u),u=Js(a,m,f),u!==null&&(Wn(u,a,f),$u(u,a,f))}};function Ow(a,u,f,m,y,b,w){return a=a.stateNode,typeof a.shouldComponentUpdate=="function"?a.shouldComponentUpdate(m,b,w):u.prototype&&u.prototype.isPureReactComponent?!wu(f,m)||!wu(y,b):!0}function yw(a,u,f,m){a=u.state,typeof u.componentWillReceiveProps=="function"&&u.componentWillReceiveProps(f,m),typeof u.UNSAFE_componentWillReceiveProps=="function"&&u.UNSAFE_componentWillReceiveProps(f,m),u.state!==a&&R0.enqueueReplaceState(u,u.state,null)}function pa(a,u){var f=u;if("ref"in u){f={};for(var m in u)m!=="ref"&&(f[m]=u[m])}if(a=a.defaultProps){f===u&&(f=p({},f));for(var y in a)f[y]===void 0&&(f[y]=a[y])}return f}function bw(a){Od(a)}function xw(a){console.error(a)}function vw(a){Od(a)}function Id(a,u){try{var f=a.onUncaughtError;f(u.value,{componentStack:u.stack})}catch(m){setTimeout(function(){throw m})}}function Sw(a,u,f){try{var m=a.onCaughtError;m(f.value,{componentStack:f.stack,errorBoundary:u.tag===1?u.stateNode:null})}catch(y){setTimeout(function(){throw y})}}function $0(a,u,f){return f=Ks(f),f.tag=3,f.payload={element:null},f.callback=function(){Id(a,u)},f}function _w(a){return a=Ks(a),a.tag=3,a}function kw(a,u,f,m){var y=f.type.getDerivedStateFromError;if(typeof y=="function"){var b=m.value;a.payload=function(){return y(b)},a.callback=function(){Sw(u,f,m)}}var w=f.stateNode;w!==null&&typeof w.componentDidCatch=="function"&&(a.callback=function(){Sw(u,f,m),typeof y!="function"&&(so===null?so=new Set([this]):so.add(this));var E=m.stack;this.componentDidCatch(m.value,{componentStack:E!==null?E:""})})}function Vz(a,u,f,m,y){if(f.flags|=32768,m!==null&&typeof m=="object"&&typeof m.then=="function"){if(u=f.alternate,u!==null&&El(u,f,y,!0),f=hi.current,f!==null){switch(f.tag){case 31:case 13:return Mi===null?Kd():f.alternate===null&&Lt===0&&(Lt=3),f.flags&=-257,f.flags|=65536,f.lanes=y,m===Td?f.flags|=16384:(u=f.updateQueue,u===null?f.updateQueue=new Set([m]):u.add(m),ry(a,m,y)),!1;case 22:return f.flags|=65536,m===Td?f.flags|=16384:(u=f.updateQueue,u===null?(u={transitions:null,markerInstances:null,retryQueue:new Set([m])},f.updateQueue=u):(f=u.retryQueue,f===null?u.retryQueue=new Set([m]):f.add(m)),ry(a,m,y)),!1}throw Error(i(435,f.tag))}return ry(a,m,y),Kd(),!1}if(Ke)return u=hi.current,u!==null?((u.flags&65536)===0&&(u.flags|=256),u.flags|=65536,u.lanes=y,m!==KO&&(a=Error(i(422),{cause:m}),Qu(Ai(a,f)))):(m!==KO&&(u=Error(i(423),{cause:m}),Qu(Ai(u,f))),a=a.current.alternate,a.flags|=65536,y&=-y,a.lanes|=y,m=Ai(m,f),y=$0(a.stateNode,m,y),c0(a,y),Lt!==4&&(Lt=2)),!1;var b=Error(i(520),{cause:m});if(b=Ai(b,f),Yu===null?Yu=[b]:Yu.push(b),Lt!==4&&(Lt=2),u===null)return!0;m=Ai(m,f),f=u;do{switch(f.tag){case 3:return f.flags|=65536,a=y&-y,f.lanes|=a,a=$0(f.stateNode,m,a),c0(f,a),!1;case 1:if(u=f.type,b=f.stateNode,(f.flags&128)===0&&(typeof u.getDerivedStateFromError=="function"||b!==null&&typeof b.componentDidCatch=="function"&&(so===null||!so.has(b))))return f.flags|=65536,y&=-y,f.lanes|=y,y=_w(y),kw(y,a,f,m),c0(f,y),!1}f=f.return}while(f!==null);return!1}var L0=Error(i(461)),Zt=!1;function dn(a,u,f,m){u.child=a===null?Qk(u,null,f,m):fa(u,a.child,f,m)}function ww(a,u,f,m,y){f=f.render;var b=u.ref;if("ref"in m){var w={};for(var E in m)E!=="ref"&&(w[E]=m[E])}else w=m;return la(u),m=m0(a,u,f,w,b,y),E=g0(),a!==null&&!Zt?(O0(a,u,y),ss(a,u,y)):(Ke&&E&&HO(u),u.flags|=1,dn(a,u,m,y),u.child)}function Pw(a,u,f,m,y){if(a===null){var b=f.type;return typeof b=="function"&&!YO(b)&&b.defaultProps===void 0&&f.compare===null?(u.tag=15,u.type=b,Tw(a,u,b,m,y)):(a=vd(f.type,null,m,u,u.mode,y),a.ref=u.ref,a.return=u,u.child=a)}if(b=a.child,!V0(a,y)){var w=b.memoizedProps;if(f=f.compare,f=f!==null?f:wu,f(w,m)&&a.ref===u.ref)return ss(a,u,y)}return u.flags|=1,a=Jr(b,m),a.ref=u.ref,a.return=u,u.child=a}function Tw(a,u,f,m,y){if(a!==null){var b=a.memoizedProps;if(wu(b,m)&&a.ref===u.ref)if(Zt=!1,u.pendingProps=m=b,V0(a,y))(a.flags&131072)!==0&&(Zt=!0);else return u.lanes=a.lanes,ss(a,u,y)}return M0(a,u,f,m,y)}function Qw(a,u,f,m){var y=m.children,b=a!==null?a.memoizedState:null;if(a===null&&u.stateNode===null&&(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),m.mode==="hidden"){if((u.flags&128)!==0){if(b=b!==null?b.baseLanes|f:f,a!==null){for(m=u.child=a.child,y=0;m!==null;)y=y|m.lanes|m.childLanes,m=m.sibling;m=y&~b}else m=0,u.child=null;return Cw(a,u,b,f,m)}if((f&536870912)!==0)u.memoizedState={baseLanes:0,cachePool:null},a!==null&&wd(u,b!==null?b.cachePool:null),b!==null?Ak(u,b):h0(),Rk(u);else return m=u.lanes=536870912,Cw(a,u,b!==null?b.baseLanes|f:f,f,m)}else b!==null?(wd(u,b.cachePool),Ak(u,b),to(),u.memoizedState=null):(a!==null&&wd(u,null),h0(),to());return dn(a,u,y,f),u.child}function Iu(a,u){return a!==null&&a.tag===22||u.stateNode!==null||(u.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.sibling}function Cw(a,u,f,m,y){var b=s0();return b=b===null?null:{parent:Vt._currentValue,pool:b},u.memoizedState={baseLanes:f,cachePool:b},a!==null&&wd(u,null),h0(),Rk(u),a!==null&&El(a,u,m,!0),u.childLanes=y,null}function Xd(a,u){return u=Bd({mode:u.mode,children:u.children},a.mode),u.ref=a.ref,a.child=u,u.return=a,u}function Ew(a,u,f){return fa(u,a.child,null,f),a=Xd(u,u.pendingProps),a.flags|=2,fi(u),u.memoizedState=null,a}function Bz(a,u,f){var m=u.pendingProps,y=(u.flags&128)!==0;if(u.flags&=-129,a===null){if(Ke){if(m.mode==="hidden")return a=Xd(u,m),u.lanes=536870912,Iu(null,a);if(d0(u),(a=Pt)?(a=VP(a,Li),a=a!==null&&a.data==="&"?a:null,a!==null&&(u.memoizedState={dehydrated:a,treeContext:Ys!==null?{id:Or,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},f=dk(a),f.return=u,u.child=f,hn=u,Pt=null)):a=null,a===null)throw Ws(u);return u.lanes=536870912,null}return Xd(u,m)}var b=a.memoizedState;if(b!==null){var w=b.dehydrated;if(d0(u),y)if(u.flags&256)u.flags&=-257,u=Ew(a,u,f);else if(u.memoizedState!==null)u.child=a.child,u.flags|=128,u=null;else throw Error(i(558));else if(Zt||El(a,u,f,!1),y=(f&a.childLanes)!==0,Zt||y){if(m=xt,m!==null&&(w=x_(m,f),w!==0&&w!==b.retryLane))throw b.retryLane=w,ra(a,w),Wn(m,a,w),L0;Kd(),u=Ew(a,u,f)}else a=b.treeContext,Pt=Di(w.nextSibling),hn=u,Ke=!0,Gs=null,Li=!1,a!==null&&gk(u,a),u=Xd(u,m),u.flags|=4096;return u}return a=Jr(a.child,{mode:m.mode,children:m.children}),a.ref=u.ref,u.child=a,a.return=u,a}function Vd(a,u){var f=u.ref;if(f===null)a!==null&&a.ref!==null&&(u.flags|=4194816);else{if(typeof f!="function"&&typeof f!="object")throw Error(i(284));(a===null||a.ref!==f)&&(u.flags|=4194816)}}function M0(a,u,f,m,y){return la(u),f=m0(a,u,f,m,void 0,y),m=g0(),a!==null&&!Zt?(O0(a,u,y),ss(a,u,y)):(Ke&&m&&HO(u),u.flags|=1,dn(a,u,f,y),u.child)}function Aw(a,u,f,m,y,b){return la(u),u.updateQueue=null,f=Lk(u,m,f,y),$k(a),m=g0(),a!==null&&!Zt?(O0(a,u,b),ss(a,u,b)):(Ke&&m&&HO(u),u.flags|=1,dn(a,u,f,b),u.child)}function Rw(a,u,f,m,y){if(la(u),u.stateNode===null){var b=Pl,w=f.contextType;typeof w=="object"&&w!==null&&(b=fn(w)),b=new f(m,b),u.memoizedState=b.state!==null&&b.state!==void 0?b.state:null,b.updater=R0,u.stateNode=b,b._reactInternals=u,b=u.stateNode,b.props=m,b.state=u.memoizedState,b.refs={},a0(u),w=f.contextType,b.context=typeof w=="object"&&w!==null?fn(w):Pl,b.state=u.memoizedState,w=f.getDerivedStateFromProps,typeof w=="function"&&(A0(u,f,w,m),b.state=u.memoizedState),typeof f.getDerivedStateFromProps=="function"||typeof b.getSnapshotBeforeUpdate=="function"||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(w=b.state,typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount(),w!==b.state&&R0.enqueueReplaceState(b,b.state,null),Mu(u,m,b,y),Lu(),b.state=u.memoizedState),typeof b.componentDidMount=="function"&&(u.flags|=4194308),m=!0}else if(a===null){b=u.stateNode;var E=u.memoizedProps,z=pa(f,E);b.props=z;var H=b.context,oe=f.contextType;w=Pl,typeof oe=="object"&&oe!==null&&(w=fn(oe));var he=f.getDerivedStateFromProps;oe=typeof he=="function"||typeof b.getSnapshotBeforeUpdate=="function",E=u.pendingProps!==E,oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(E||H!==w)&&yw(u,b,m,w),Fs=!1;var F=u.memoizedState;b.state=F,Mu(u,m,b,y),Lu(),H=u.memoizedState,E||F!==H||Fs?(typeof he=="function"&&(A0(u,f,he,m),H=u.memoizedState),(z=Fs||Ow(u,f,z,m,F,H,w))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(u.flags|=4194308)):(typeof b.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=m,u.memoizedState=H),b.props=m,b.state=H,b.context=w,m=z):(typeof b.componentDidMount=="function"&&(u.flags|=4194308),m=!1)}else{b=u.stateNode,l0(a,u),w=u.memoizedProps,oe=pa(f,w),b.props=oe,he=u.pendingProps,F=b.context,H=f.contextType,z=Pl,typeof H=="object"&&H!==null&&(z=fn(H)),E=f.getDerivedStateFromProps,(H=typeof E=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(w!==he||F!==z)&&yw(u,b,m,z),Fs=!1,F=u.memoizedState,b.state=F,Mu(u,m,b,y),Lu();var ne=u.memoizedState;w!==he||F!==ne||Fs||a!==null&&a.dependencies!==null&&_d(a.dependencies)?(typeof E=="function"&&(A0(u,f,E,m),ne=u.memoizedState),(oe=Fs||Ow(u,f,oe,m,F,ne,z)||a!==null&&a.dependencies!==null&&_d(a.dependencies))?(H||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(m,ne,z),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(m,ne,z)),typeof b.componentDidUpdate=="function"&&(u.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof b.componentDidUpdate!="function"||w===a.memoizedProps&&F===a.memoizedState||(u.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===a.memoizedProps&&F===a.memoizedState||(u.flags|=1024),u.memoizedProps=m,u.memoizedState=ne),b.props=m,b.state=ne,b.context=z,m=oe):(typeof b.componentDidUpdate!="function"||w===a.memoizedProps&&F===a.memoizedState||(u.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||w===a.memoizedProps&&F===a.memoizedState||(u.flags|=1024),m=!1)}return b=m,Vd(a,u),m=(u.flags&128)!==0,b||m?(b=u.stateNode,f=m&&typeof f.getDerivedStateFromError!="function"?null:b.render(),u.flags|=1,a!==null&&m?(u.child=fa(u,a.child,null,y),u.child=fa(u,null,f,y)):dn(a,u,f,y),u.memoizedState=b.state,a=u.child):a=ss(a,u,y),a}function $w(a,u,f,m){return oa(),u.flags|=256,dn(a,u,f,m),u.child}var D0={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function j0(a){return{baseLanes:a,cachePool:Sk()}}function N0(a,u,f){return a=a!==null?a.childLanes&~f:0,u&&(a|=pi),a}function Lw(a,u,f){var m=u.pendingProps,y=!1,b=(u.flags&128)!==0,w;if((w=b)||(w=a!==null&&a.memoizedState===null?!1:(jt.current&2)!==0),w&&(y=!0,u.flags&=-129),w=(u.flags&32)!==0,u.flags&=-33,a===null){if(Ke){if(y?eo(u):to(),(a=Pt)?(a=VP(a,Li),a=a!==null&&a.data!=="&"?a:null,a!==null&&(u.memoizedState={dehydrated:a,treeContext:Ys!==null?{id:Or,overflow:yr}:null,retryLane:536870912,hydrationErrors:null},f=dk(a),f.return=u,u.child=f,hn=u,Pt=null)):a=null,a===null)throw Ws(u);return xy(a)?u.lanes=32:u.lanes=536870912,null}var E=m.children;return m=m.fallback,y?(to(),y=u.mode,E=Bd({mode:"hidden",children:E},y),m=sa(m,y,f,null),E.return=u,m.return=u,E.sibling=m,u.child=E,m=u.child,m.memoizedState=j0(f),m.childLanes=N0(a,w,f),u.memoizedState=D0,Iu(null,m)):(eo(u),z0(u,E))}var z=a.memoizedState;if(z!==null&&(E=z.dehydrated,E!==null)){if(b)u.flags&256?(eo(u),u.flags&=-257,u=I0(a,u,f)):u.memoizedState!==null?(to(),u.child=a.child,u.flags|=128,u=null):(to(),E=m.fallback,y=u.mode,m=Bd({mode:"visible",children:m.children},y),E=sa(E,y,f,null),E.flags|=2,m.return=u,E.return=u,m.sibling=E,u.child=m,fa(u,a.child,null,f),m=u.child,m.memoizedState=j0(f),m.childLanes=N0(a,w,f),u.memoizedState=D0,u=Iu(null,m));else if(eo(u),xy(E)){if(w=E.nextSibling&&E.nextSibling.dataset,w)var H=w.dgst;w=H,m=Error(i(419)),m.stack="",m.digest=w,Qu({value:m,source:null,stack:null}),u=I0(a,u,f)}else if(Zt||El(a,u,f,!1),w=(f&a.childLanes)!==0,Zt||w){if(w=xt,w!==null&&(m=x_(w,f),m!==0&&m!==z.retryLane))throw z.retryLane=m,ra(a,m),Wn(w,a,m),L0;by(E)||Kd(),u=I0(a,u,f)}else by(E)?(u.flags|=192,u.child=a.child,u=null):(a=z.treeContext,Pt=Di(E.nextSibling),hn=u,Ke=!0,Gs=null,Li=!1,a!==null&&gk(u,a),u=z0(u,m.children),u.flags|=4096);return u}return y?(to(),E=m.fallback,y=u.mode,z=a.child,H=z.sibling,m=Jr(z,{mode:"hidden",children:m.children}),m.subtreeFlags=z.subtreeFlags&65011712,H!==null?E=Jr(H,E):(E=sa(E,y,f,null),E.flags|=2),E.return=u,m.return=u,m.sibling=E,u.child=m,Iu(null,m),m=u.child,E=a.child.memoizedState,E===null?E=j0(f):(y=E.cachePool,y!==null?(z=Vt._currentValue,y=y.parent!==z?{parent:z,pool:z}:y):y=Sk(),E={baseLanes:E.baseLanes|f,cachePool:y}),m.memoizedState=E,m.childLanes=N0(a,w,f),u.memoizedState=D0,Iu(a.child,m)):(eo(u),f=a.child,a=f.sibling,f=Jr(f,{mode:"visible",children:m.children}),f.return=u,f.sibling=null,a!==null&&(w=u.deletions,w===null?(u.deletions=[a],u.flags|=16):w.push(a)),u.child=f,u.memoizedState=null,f)}function z0(a,u){return u=Bd({mode:"visible",children:u},a.mode),u.return=a,a.child=u}function Bd(a,u){return a=ui(22,a,null,u),a.lanes=0,a}function I0(a,u,f){return fa(u,a.child,null,f),a=z0(u,u.pendingProps.children),a.flags|=2,u.memoizedState=null,a}function Mw(a,u,f){a.lanes|=u;var m=a.alternate;m!==null&&(m.lanes|=u),t0(a.return,u,f)}function X0(a,u,f,m,y,b){var w=a.memoizedState;w===null?a.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:m,tail:f,tailMode:y,treeForkCount:b}:(w.isBackwards=u,w.rendering=null,w.renderingStartTime=0,w.last=m,w.tail=f,w.tailMode=y,w.treeForkCount=b)}function Dw(a,u,f){var m=u.pendingProps,y=m.revealOrder,b=m.tail;m=m.children;var w=jt.current,E=(w&2)!==0;if(E?(w=w&1|2,u.flags|=128):w&=1,L(jt,w),dn(a,u,m,f),m=Ke?Tu:0,!E&&a!==null&&(a.flags&128)!==0)e:for(a=u.child;a!==null;){if(a.tag===13)a.memoizedState!==null&&Mw(a,f,u);else if(a.tag===19)Mw(a,f,u);else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===u)break e;for(;a.sibling===null;){if(a.return===null||a.return===u)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}switch(y){case"forwards":for(f=u.child,y=null;f!==null;)a=f.alternate,a!==null&&Ad(a)===null&&(y=f),f=f.sibling;f=y,f===null?(y=u.child,u.child=null):(y=f.sibling,f.sibling=null),X0(u,!1,y,f,b,m);break;case"backwards":case"unstable_legacy-backwards":for(f=null,y=u.child,u.child=null;y!==null;){if(a=y.alternate,a!==null&&Ad(a)===null){u.child=y;break}a=y.sibling,y.sibling=f,f=y,y=a}X0(u,!0,f,null,b,m);break;case"together":X0(u,!1,null,null,void 0,m);break;default:u.memoizedState=null}return u.child}function ss(a,u,f){if(a!==null&&(u.dependencies=a.dependencies),ro|=u.lanes,(f&u.childLanes)===0)if(a!==null){if(El(a,u,f,!1),(f&u.childLanes)===0)return null}else return null;if(a!==null&&u.child!==a.child)throw Error(i(153));if(u.child!==null){for(a=u.child,f=Jr(a,a.pendingProps),u.child=f,f.return=u;a.sibling!==null;)a=a.sibling,f=f.sibling=Jr(a,a.pendingProps),f.return=u;f.sibling=null}return u.child}function V0(a,u){return(a.lanes&u)!==0?!0:(a=a.dependencies,!!(a!==null&&_d(a)))}function Zz(a,u,f){switch(u.tag){case 3:st(u,u.stateNode.containerInfo),Hs(u,Vt,a.memoizedState.cache),oa();break;case 27:case 5:xn(u);break;case 4:st(u,u.stateNode.containerInfo);break;case 10:Hs(u,u.type,u.memoizedProps.value);break;case 31:if(u.memoizedState!==null)return u.flags|=128,d0(u),null;break;case 13:var m=u.memoizedState;if(m!==null)return m.dehydrated!==null?(eo(u),u.flags|=128,null):(f&u.child.childLanes)!==0?Lw(a,u,f):(eo(u),a=ss(a,u,f),a!==null?a.sibling:null);eo(u);break;case 19:var y=(a.flags&128)!==0;if(m=(f&u.childLanes)!==0,m||(El(a,u,f,!1),m=(f&u.childLanes)!==0),y){if(m)return Dw(a,u,f);u.flags|=128}if(y=u.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),L(jt,jt.current),m)break;return null;case 22:return u.lanes=0,Qw(a,u,f,u.pendingProps);case 24:Hs(u,Vt,a.memoizedState.cache)}return ss(a,u,f)}function jw(a,u,f){if(a!==null)if(a.memoizedProps!==u.pendingProps)Zt=!0;else{if(!V0(a,f)&&(u.flags&128)===0)return Zt=!1,Zz(a,u,f);Zt=(a.flags&131072)!==0}else Zt=!1,Ke&&(u.flags&1048576)!==0&&mk(u,Tu,u.index);switch(u.lanes=0,u.tag){case 16:e:{var m=u.pendingProps;if(a=ua(u.elementType),u.type=a,typeof a=="function")YO(a)?(m=pa(a,m),u.tag=1,u=Rw(null,u,a,m,f)):(u.tag=0,u=M0(null,u,a,m,f));else{if(a!=null){var y=a.$$typeof;if(y===R){u.tag=11,u=ww(null,u,a,m,f);break e}else if(y===D){u.tag=14,u=Pw(null,u,a,m,f);break e}}throw u=K(a)||a,Error(i(306,u,""))}}return u;case 0:return M0(a,u,u.type,u.pendingProps,f);case 1:return m=u.type,y=pa(m,u.pendingProps),Rw(a,u,m,y,f);case 3:e:{if(st(u,u.stateNode.containerInfo),a===null)throw Error(i(387));m=u.pendingProps;var b=u.memoizedState;y=b.element,l0(a,u),Mu(u,m,null,f);var w=u.memoizedState;if(m=w.cache,Hs(u,Vt,m),m!==b.cache&&n0(u,[Vt],f,!0),Lu(),m=w.element,b.isDehydrated)if(b={element:m,isDehydrated:!1,cache:w.cache},u.updateQueue.baseState=b,u.memoizedState=b,u.flags&256){u=$w(a,u,m,f);break e}else if(m!==y){y=Ai(Error(i(424)),u),Qu(y),u=$w(a,u,m,f);break e}else{switch(a=u.stateNode.containerInfo,a.nodeType){case 9:a=a.body;break;default:a=a.nodeName==="HTML"?a.ownerDocument.body:a}for(Pt=Di(a.firstChild),hn=u,Ke=!0,Gs=null,Li=!0,f=Qk(u,null,m,f),u.child=f;f;)f.flags=f.flags&-3|4096,f=f.sibling}else{if(oa(),m===y){u=ss(a,u,f);break e}dn(a,u,m,f)}u=u.child}return u;case 26:return Vd(a,u),a===null?(f=GP(u.type,null,u.pendingProps,null))?u.memoizedState=f:Ke||(f=u.type,a=u.pendingProps,m=sp(be.current).createElement(f),m[un]=u,m[Bn]=a,pn(m,f,a),rn(m),u.stateNode=m):u.memoizedState=GP(u.type,a.memoizedProps,u.pendingProps,a.memoizedState),null;case 27:return xn(u),a===null&&Ke&&(m=u.stateNode=qP(u.type,u.pendingProps,be.current),hn=u,Li=!0,y=Pt,co(u.type)?(vy=y,Pt=Di(m.firstChild)):Pt=y),dn(a,u,u.pendingProps.children,f),Vd(a,u),a===null&&(u.flags|=4194304),u.child;case 5:return a===null&&Ke&&((y=m=Pt)&&(m=x3(m,u.type,u.pendingProps,Li),m!==null?(u.stateNode=m,hn=u,Pt=Di(m.firstChild),Li=!1,y=!0):y=!1),y||Ws(u)),xn(u),y=u.type,b=u.pendingProps,w=a!==null?a.memoizedProps:null,m=b.children,gy(y,b)?m=null:w!==null&&gy(y,w)&&(u.flags|=32),u.memoizedState!==null&&(y=m0(a,u,Mz,null,null,f),th._currentValue=y),Vd(a,u),dn(a,u,m,f),u.child;case 6:return a===null&&Ke&&((a=f=Pt)&&(f=v3(f,u.pendingProps,Li),f!==null?(u.stateNode=f,hn=u,Pt=null,a=!0):a=!1),a||Ws(u)),null;case 13:return Lw(a,u,f);case 4:return st(u,u.stateNode.containerInfo),m=u.pendingProps,a===null?u.child=fa(u,null,m,f):dn(a,u,m,f),u.child;case 11:return ww(a,u,u.type,u.pendingProps,f);case 7:return dn(a,u,u.pendingProps,f),u.child;case 8:return dn(a,u,u.pendingProps.children,f),u.child;case 12:return dn(a,u,u.pendingProps.children,f),u.child;case 10:return m=u.pendingProps,Hs(u,u.type,m.value),dn(a,u,m.children,f),u.child;case 9:return y=u.type._context,m=u.pendingProps.children,la(u),y=fn(y),m=m(y),u.flags|=1,dn(a,u,m,f),u.child;case 14:return Pw(a,u,u.type,u.pendingProps,f);case 15:return Tw(a,u,u.type,u.pendingProps,f);case 19:return Dw(a,u,f);case 31:return Bz(a,u,f);case 22:return Qw(a,u,f,u.pendingProps);case 24:return la(u),m=fn(Vt),a===null?(y=s0(),y===null&&(y=xt,b=i0(),y.pooledCache=b,b.refCount++,b!==null&&(y.pooledCacheLanes|=f),y=b),u.memoizedState={parent:m,cache:y},a0(u),Hs(u,Vt,y)):((a.lanes&f)!==0&&(l0(a,u),Mu(u,null,null,f),Lu()),y=a.memoizedState,b=u.memoizedState,y.parent!==m?(y={parent:m,cache:m},u.memoizedState=y,u.lanes===0&&(u.memoizedState=u.updateQueue.baseState=y),Hs(u,Vt,m)):(m=b.cache,Hs(u,Vt,m),m!==y.cache&&n0(u,[Vt],f,!0))),dn(a,u,u.pendingProps.children,f),u.child;case 29:throw u.pendingProps}throw Error(i(156,u.tag))}function os(a){a.flags|=4}function B0(a,u,f,m,y){if((u=(a.mode&32)!==0)&&(u=!1),u){if(a.flags|=16777216,(y&335544128)===y)if(a.stateNode.complete)a.flags|=8192;else if(uP())a.flags|=8192;else throw ha=Td,o0}else a.flags&=-16777217}function Nw(a,u){if(u.type!=="stylesheet"||(u.state.loading&4)!==0)a.flags&=-16777217;else if(a.flags|=16777216,!JP(u))if(uP())a.flags|=8192;else throw ha=Td,o0}function Zd(a,u){u!==null&&(a.flags|=4),a.flags&16384&&(u=a.tag!==22?O_():536870912,a.lanes|=u,Vl|=u)}function Xu(a,u){if(!Ke)switch(a.tailMode){case"hidden":u=a.tail;for(var f=null;u!==null;)u.alternate!==null&&(f=u),u=u.sibling;f===null?a.tail=null:f.sibling=null;break;case"collapsed":f=a.tail;for(var m=null;f!==null;)f.alternate!==null&&(m=f),f=f.sibling;m===null?u||a.tail===null?a.tail=null:a.tail.sibling=null:m.sibling=null}}function Tt(a){var u=a.alternate!==null&&a.alternate.child===a.child,f=0,m=0;if(u)for(var y=a.child;y!==null;)f|=y.lanes|y.childLanes,m|=y.subtreeFlags&65011712,m|=y.flags&65011712,y.return=a,y=y.sibling;else for(y=a.child;y!==null;)f|=y.lanes|y.childLanes,m|=y.subtreeFlags,m|=y.flags,y.return=a,y=y.sibling;return a.subtreeFlags|=m,a.childLanes=f,u}function qz(a,u,f){var m=u.pendingProps;switch(FO(u),u.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(u),null;case 1:return Tt(u),null;case 3:return f=u.stateNode,m=null,a!==null&&(m=a.memoizedState.cache),u.memoizedState.cache!==m&&(u.flags|=2048),ns(Vt),Fe(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(a===null||a.child===null)&&(Cl(u)?os(u):a===null||a.memoizedState.isDehydrated&&(u.flags&256)===0||(u.flags|=1024,JO())),Tt(u),null;case 26:var y=u.type,b=u.memoizedState;return a===null?(os(u),b!==null?(Tt(u),Nw(u,b)):(Tt(u),B0(u,y,null,m,f))):b?b!==a.memoizedState?(os(u),Tt(u),Nw(u,b)):(Tt(u),u.flags&=-16777217):(a=a.memoizedProps,a!==m&&os(u),Tt(u),B0(u,y,a,m,f)),null;case 27:if(oi(u),f=be.current,y=u.type,a!==null&&u.stateNode!=null)a.memoizedProps!==m&&os(u);else{if(!m){if(u.stateNode===null)throw Error(i(166));return Tt(u),null}a=re.current,Cl(u)?Ok(u):(a=qP(y,m,f),u.stateNode=a,os(u))}return Tt(u),null;case 5:if(oi(u),y=u.type,a!==null&&u.stateNode!=null)a.memoizedProps!==m&&os(u);else{if(!m){if(u.stateNode===null)throw Error(i(166));return Tt(u),null}if(b=re.current,Cl(u))Ok(u);else{var w=sp(be.current);switch(b){case 1:b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case 2:b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;default:switch(y){case"svg":b=w.createElementNS("http://www.w3.org/2000/svg",y);break;case"math":b=w.createElementNS("http://www.w3.org/1998/Math/MathML",y);break;case"script":b=w.createElement("div"),b.innerHTML="<script><\/script>",b=b.removeChild(b.firstChild);break;case"select":b=typeof m.is=="string"?w.createElement("select",{is:m.is}):w.createElement("select"),m.multiple?b.multiple=!0:m.size&&(b.size=m.size);break;default:b=typeof m.is=="string"?w.createElement(y,{is:m.is}):w.createElement(y)}}b[un]=u,b[Bn]=m;e:for(w=u.child;w!==null;){if(w.tag===5||w.tag===6)b.appendChild(w.stateNode);else if(w.tag!==4&&w.tag!==27&&w.child!==null){w.child.return=w,w=w.child;continue}if(w===u)break e;for(;w.sibling===null;){if(w.return===null||w.return===u)break e;w=w.return}w.sibling.return=w.return,w=w.sibling}u.stateNode=b;e:switch(pn(b,y,m),y){case"button":case"input":case"select":case"textarea":m=!!m.autoFocus;break e;case"img":m=!0;break e;default:m=!1}m&&os(u)}}return Tt(u),B0(u,u.type,a===null?null:a.memoizedProps,u.pendingProps,f),null;case 6:if(a&&u.stateNode!=null)a.memoizedProps!==m&&os(u);else{if(typeof m!="string"&&u.stateNode===null)throw Error(i(166));if(a=be.current,Cl(u)){if(a=u.stateNode,f=u.memoizedProps,m=null,y=hn,y!==null)switch(y.tag){case 27:case 5:m=y.memoizedProps}a[un]=u,a=!!(a.nodeValue===f||m!==null&&m.suppressHydrationWarning===!0||LP(a.nodeValue,f)),a||Ws(u,!0)}else a=sp(a).createTextNode(m),a[un]=u,u.stateNode=a}return Tt(u),null;case 31:if(f=u.memoizedState,a===null||a.memoizedState!==null){if(m=Cl(u),f!==null){if(a===null){if(!m)throw Error(i(318));if(a=u.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(i(557));a[un]=u}else oa(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Tt(u),a=!1}else f=JO(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=f),a=!0;if(!a)return u.flags&256?(fi(u),u):(fi(u),null);if((u.flags&128)!==0)throw Error(i(558))}return Tt(u),null;case 13:if(m=u.memoizedState,a===null||a.memoizedState!==null&&a.memoizedState.dehydrated!==null){if(y=Cl(u),m!==null&&m.dehydrated!==null){if(a===null){if(!y)throw Error(i(318));if(y=u.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(i(317));y[un]=u}else oa(),(u.flags&128)===0&&(u.memoizedState=null),u.flags|=4;Tt(u),y=!1}else y=JO(),a!==null&&a.memoizedState!==null&&(a.memoizedState.hydrationErrors=y),y=!0;if(!y)return u.flags&256?(fi(u),u):(fi(u),null)}return fi(u),(u.flags&128)!==0?(u.lanes=f,u):(f=m!==null,a=a!==null&&a.memoizedState!==null,f&&(m=u.child,y=null,m.alternate!==null&&m.alternate.memoizedState!==null&&m.alternate.memoizedState.cachePool!==null&&(y=m.alternate.memoizedState.cachePool.pool),b=null,m.memoizedState!==null&&m.memoizedState.cachePool!==null&&(b=m.memoizedState.cachePool.pool),b!==y&&(m.flags|=2048)),f!==a&&f&&(u.child.flags|=8192),Zd(u,u.updateQueue),Tt(u),null);case 4:return Fe(),a===null&&hy(u.stateNode.containerInfo),Tt(u),null;case 10:return ns(u.type),Tt(u),null;case 19:if(te(jt),m=u.memoizedState,m===null)return Tt(u),null;if(y=(u.flags&128)!==0,b=m.rendering,b===null)if(y)Xu(m,!1);else{if(Lt!==0||a!==null&&(a.flags&128)!==0)for(a=u.child;a!==null;){if(b=Ad(a),b!==null){for(u.flags|=128,Xu(m,!1),a=b.updateQueue,u.updateQueue=a,Zd(u,a),u.subtreeFlags=0,a=f,f=u.child;f!==null;)fk(f,a),f=f.sibling;return L(jt,jt.current&1|2),Ke&&es(u,m.treeForkCount),u.child}a=a.sibling}m.tail!==null&&it()>Wd&&(u.flags|=128,y=!0,Xu(m,!1),u.lanes=4194304)}else{if(!y)if(a=Ad(b),a!==null){if(u.flags|=128,y=!0,a=a.updateQueue,u.updateQueue=a,Zd(u,a),Xu(m,!0),m.tail===null&&m.tailMode==="hidden"&&!b.alternate&&!Ke)return Tt(u),null}else 2*it()-m.renderingStartTime>Wd&&f!==536870912&&(u.flags|=128,y=!0,Xu(m,!1),u.lanes=4194304);m.isBackwards?(b.sibling=u.child,u.child=b):(a=m.last,a!==null?a.sibling=b:u.child=b,m.last=b)}return m.tail!==null?(a=m.tail,m.rendering=a,m.tail=a.sibling,m.renderingStartTime=it(),a.sibling=null,f=jt.current,L(jt,y?f&1|2:f&1),Ke&&es(u,m.treeForkCount),a):(Tt(u),null);case 22:case 23:return fi(u),f0(),m=u.memoizedState!==null,a!==null?a.memoizedState!==null!==m&&(u.flags|=8192):m&&(u.flags|=8192),m?(f&536870912)!==0&&(u.flags&128)===0&&(Tt(u),u.subtreeFlags&6&&(u.flags|=8192)):Tt(u),f=u.updateQueue,f!==null&&Zd(u,f.retryQueue),f=null,a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),m=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(m=u.memoizedState.cachePool.pool),m!==f&&(u.flags|=2048),a!==null&&te(ca),null;case 24:return f=null,a!==null&&(f=a.memoizedState.cache),u.memoizedState.cache!==f&&(u.flags|=2048),ns(Vt),Tt(u),null;case 25:return null;case 30:return null}throw Error(i(156,u.tag))}function Uz(a,u){switch(FO(u),u.tag){case 1:return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 3:return ns(Vt),Fe(),a=u.flags,(a&65536)!==0&&(a&128)===0?(u.flags=a&-65537|128,u):null;case 26:case 27:case 5:return oi(u),null;case 31:if(u.memoizedState!==null){if(fi(u),u.alternate===null)throw Error(i(340));oa()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 13:if(fi(u),a=u.memoizedState,a!==null&&a.dehydrated!==null){if(u.alternate===null)throw Error(i(340));oa()}return a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 19:return te(jt),null;case 4:return Fe(),null;case 10:return ns(u.type),null;case 22:case 23:return fi(u),f0(),a!==null&&te(ca),a=u.flags,a&65536?(u.flags=a&-65537|128,u):null;case 24:return ns(Vt),null;case 25:return null;default:return null}}function zw(a,u){switch(FO(u),u.tag){case 3:ns(Vt),Fe();break;case 26:case 27:case 5:oi(u);break;case 4:Fe();break;case 31:u.memoizedState!==null&&fi(u);break;case 13:fi(u);break;case 19:te(jt);break;case 10:ns(u.type);break;case 22:case 23:fi(u),f0(),a!==null&&te(ca);break;case 24:ns(Vt)}}function Vu(a,u){try{var f=u.updateQueue,m=f!==null?f.lastEffect:null;if(m!==null){var y=m.next;f=y;do{if((f.tag&a)===a){m=void 0;var b=f.create,w=f.inst;m=b(),w.destroy=m}f=f.next}while(f!==y)}}catch(E){dt(u,u.return,E)}}function no(a,u,f){try{var m=u.updateQueue,y=m!==null?m.lastEffect:null;if(y!==null){var b=y.next;m=b;do{if((m.tag&a)===a){var w=m.inst,E=w.destroy;if(E!==void 0){w.destroy=void 0,y=u;var z=f,H=E;try{H()}catch(oe){dt(y,z,oe)}}}m=m.next}while(m!==b)}}catch(oe){dt(u,u.return,oe)}}function Iw(a){var u=a.updateQueue;if(u!==null){var f=a.stateNode;try{Ek(u,f)}catch(m){dt(a,a.return,m)}}}function Xw(a,u,f){f.props=pa(a.type,a.memoizedProps),f.state=a.memoizedState;try{f.componentWillUnmount()}catch(m){dt(a,u,m)}}function Bu(a,u){try{var f=a.ref;if(f!==null){switch(a.tag){case 26:case 27:case 5:var m=a.stateNode;break;case 30:m=a.stateNode;break;default:m=a.stateNode}typeof f=="function"?a.refCleanup=f(m):f.current=m}}catch(y){dt(a,u,y)}}function br(a,u){var f=a.ref,m=a.refCleanup;if(f!==null)if(typeof m=="function")try{m()}catch(y){dt(a,u,y)}finally{a.refCleanup=null,a=a.alternate,a!=null&&(a.refCleanup=null)}else if(typeof f=="function")try{f(null)}catch(y){dt(a,u,y)}else f.current=null}function Vw(a){var u=a.type,f=a.memoizedProps,m=a.stateNode;try{e:switch(u){case"button":case"input":case"select":case"textarea":f.autoFocus&&m.focus();break e;case"img":f.src?m.src=f.src:f.srcSet&&(m.srcset=f.srcSet)}}catch(y){dt(a,a.return,y)}}function Z0(a,u,f){try{var m=a.stateNode;p3(m,a.type,f,u),m[Bn]=u}catch(y){dt(a,a.return,y)}}function Bw(a){return a.tag===5||a.tag===3||a.tag===26||a.tag===27&&co(a.type)||a.tag===4}function q0(a){e:for(;;){for(;a.sibling===null;){if(a.return===null||Bw(a.return))return null;a=a.return}for(a.sibling.return=a.return,a=a.sibling;a.tag!==5&&a.tag!==6&&a.tag!==18;){if(a.tag===27&&co(a.type)||a.flags&2||a.child===null||a.tag===4)continue e;a.child.return=a,a=a.child}if(!(a.flags&2))return a.stateNode}}function U0(a,u,f){var m=a.tag;if(m===5||m===6)a=a.stateNode,u?(f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f).insertBefore(a,u):(u=f.nodeType===9?f.body:f.nodeName==="HTML"?f.ownerDocument.body:f,u.appendChild(a),f=f._reactRootContainer,f!=null||u.onclick!==null||(u.onclick=Fr));else if(m!==4&&(m===27&&co(a.type)&&(f=a.stateNode,u=null),a=a.child,a!==null))for(U0(a,u,f),a=a.sibling;a!==null;)U0(a,u,f),a=a.sibling}function qd(a,u,f){var m=a.tag;if(m===5||m===6)a=a.stateNode,u?f.insertBefore(a,u):f.appendChild(a);else if(m!==4&&(m===27&&co(a.type)&&(f=a.stateNode),a=a.child,a!==null))for(qd(a,u,f),a=a.sibling;a!==null;)qd(a,u,f),a=a.sibling}function Zw(a){var u=a.stateNode,f=a.memoizedProps;try{for(var m=a.type,y=u.attributes;y.length;)u.removeAttributeNode(y[0]);pn(u,m,f),u[un]=a,u[Bn]=f}catch(b){dt(a,a.return,b)}}var as=!1,qt=!1,Y0=!1,qw=typeof WeakSet=="function"?WeakSet:Set,sn=null;function Yz(a,u){if(a=a.containerInfo,py=fp,a=ik(a),IO(a)){if("selectionStart"in a)var f={start:a.selectionStart,end:a.selectionEnd};else e:{f=(f=a.ownerDocument)&&f.defaultView||window;var m=f.getSelection&&f.getSelection();if(m&&m.rangeCount!==0){f=m.anchorNode;var y=m.anchorOffset,b=m.focusNode;m=m.focusOffset;try{f.nodeType,b.nodeType}catch{f=null;break e}var w=0,E=-1,z=-1,H=0,oe=0,he=a,F=null;t:for(;;){for(var ne;he!==f||y!==0&&he.nodeType!==3||(E=w+y),he!==b||m!==0&&he.nodeType!==3||(z=w+m),he.nodeType===3&&(w+=he.nodeValue.length),(ne=he.firstChild)!==null;)F=he,he=ne;for(;;){if(he===a)break t;if(F===f&&++H===y&&(E=w),F===b&&++oe===m&&(z=w),(ne=he.nextSibling)!==null)break;he=F,F=he.parentNode}he=ne}f=E===-1||z===-1?null:{start:E,end:z}}else f=null}f=f||{start:0,end:0}}else f=null;for(my={focusedElem:a,selectionRange:f},fp=!1,sn=u;sn!==null;)if(u=sn,a=u.child,(u.subtreeFlags&1028)!==0&&a!==null)a.return=u,sn=a;else for(;sn!==null;){switch(u=sn,b=u.alternate,a=u.flags,u.tag){case 0:if((a&4)!==0&&(a=u.updateQueue,a=a!==null?a.events:null,a!==null))for(f=0;f<a.length;f++)y=a[f],y.ref.impl=y.nextImpl;break;case 11:case 15:break;case 1:if((a&1024)!==0&&b!==null){a=void 0,f=u,y=b.memoizedProps,b=b.memoizedState,m=f.stateNode;try{var Pe=pa(f.type,y);a=m.getSnapshotBeforeUpdate(Pe,b),m.__reactInternalSnapshotBeforeUpdate=a}catch($e){dt(f,f.return,$e)}}break;case 3:if((a&1024)!==0){if(a=u.stateNode.containerInfo,f=a.nodeType,f===9)yy(a);else if(f===1)switch(a.nodeName){case"HEAD":case"HTML":case"BODY":yy(a);break;default:a.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((a&1024)!==0)throw Error(i(163))}if(a=u.sibling,a!==null){a.return=u.return,sn=a;break}sn=u.return}}function Uw(a,u,f){var m=f.flags;switch(f.tag){case 0:case 11:case 15:cs(a,f),m&4&&Vu(5,f);break;case 1:if(cs(a,f),m&4)if(a=f.stateNode,u===null)try{a.componentDidMount()}catch(w){dt(f,f.return,w)}else{var y=pa(f.type,u.memoizedProps);u=u.memoizedState;try{a.componentDidUpdate(y,u,a.__reactInternalSnapshotBeforeUpdate)}catch(w){dt(f,f.return,w)}}m&64&&Iw(f),m&512&&Bu(f,f.return);break;case 3:if(cs(a,f),m&64&&(a=f.updateQueue,a!==null)){if(u=null,f.child!==null)switch(f.child.tag){case 27:case 5:u=f.child.stateNode;break;case 1:u=f.child.stateNode}try{Ek(a,u)}catch(w){dt(f,f.return,w)}}break;case 27:u===null&&m&4&&Zw(f);case 26:case 5:cs(a,f),u===null&&m&4&&Vw(f),m&512&&Bu(f,f.return);break;case 12:cs(a,f);break;case 31:cs(a,f),m&4&&Ww(a,f);break;case 13:cs(a,f),m&4&&Hw(a,f),m&64&&(a=f.memoizedState,a!==null&&(a=a.dehydrated,a!==null&&(f=n3.bind(null,f),S3(a,f))));break;case 22:if(m=f.memoizedState!==null||as,!m){u=u!==null&&u.memoizedState!==null||qt,y=as;var b=qt;as=m,(qt=u)&&!b?us(a,f,(f.subtreeFlags&8772)!==0):cs(a,f),as=y,qt=b}break;case 30:break;default:cs(a,f)}}function Yw(a){var u=a.alternate;u!==null&&(a.alternate=null,Yw(u)),a.child=null,a.deletions=null,a.sibling=null,a.tag===5&&(u=a.stateNode,u!==null&&_O(u)),a.stateNode=null,a.return=null,a.dependencies=null,a.memoizedProps=null,a.memoizedState=null,a.pendingProps=null,a.stateNode=null,a.updateQueue=null}var Et=null,qn=!1;function ls(a,u,f){for(f=f.child;f!==null;)Gw(a,u,f),f=f.sibling}function Gw(a,u,f){if(Ft&&typeof Ft.onCommitFiberUnmount=="function")try{Ft.onCommitFiberUnmount(An,f)}catch{}switch(f.tag){case 26:qt||br(f,u),ls(a,u,f),f.memoizedState?f.memoizedState.count--:f.stateNode&&(f=f.stateNode,f.parentNode.removeChild(f));break;case 27:qt||br(f,u);var m=Et,y=qn;co(f.type)&&(Et=f.stateNode,qn=!1),ls(a,u,f),Ku(f.stateNode),Et=m,qn=y;break;case 5:qt||br(f,u);case 6:if(m=Et,y=qn,Et=null,ls(a,u,f),Et=m,qn=y,Et!==null)if(qn)try{(Et.nodeType===9?Et.body:Et.nodeName==="HTML"?Et.ownerDocument.body:Et).removeChild(f.stateNode)}catch(b){dt(f,u,b)}else try{Et.removeChild(f.stateNode)}catch(b){dt(f,u,b)}break;case 18:Et!==null&&(qn?(a=Et,IP(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,f.stateNode),Hl(a)):IP(Et,f.stateNode));break;case 4:m=Et,y=qn,Et=f.stateNode.containerInfo,qn=!0,ls(a,u,f),Et=m,qn=y;break;case 0:case 11:case 14:case 15:no(2,f,u),qt||no(4,f,u),ls(a,u,f);break;case 1:qt||(br(f,u),m=f.stateNode,typeof m.componentWillUnmount=="function"&&Xw(f,u,m)),ls(a,u,f);break;case 21:ls(a,u,f);break;case 22:qt=(m=qt)||f.memoizedState!==null,ls(a,u,f),qt=m;break;default:ls(a,u,f)}}function Ww(a,u){if(u.memoizedState===null&&(a=u.alternate,a!==null&&(a=a.memoizedState,a!==null))){a=a.dehydrated;try{Hl(a)}catch(f){dt(u,u.return,f)}}}function Hw(a,u){if(u.memoizedState===null&&(a=u.alternate,a!==null&&(a=a.memoizedState,a!==null&&(a=a.dehydrated,a!==null))))try{Hl(a)}catch(f){dt(u,u.return,f)}}function Gz(a){switch(a.tag){case 31:case 13:case 19:var u=a.stateNode;return u===null&&(u=a.stateNode=new qw),u;case 22:return a=a.stateNode,u=a._retryCache,u===null&&(u=a._retryCache=new qw),u;default:throw Error(i(435,a.tag))}}function Ud(a,u){var f=Gz(a);u.forEach(function(m){if(!f.has(m)){f.add(m);var y=i3.bind(null,a,m);m.then(y,y)}})}function Un(a,u){var f=u.deletions;if(f!==null)for(var m=0;m<f.length;m++){var y=f[m],b=a,w=u,E=w;e:for(;E!==null;){switch(E.tag){case 27:if(co(E.type)){Et=E.stateNode,qn=!1;break e}break;case 5:Et=E.stateNode,qn=!1;break e;case 3:case 4:Et=E.stateNode.containerInfo,qn=!0;break e}E=E.return}if(Et===null)throw Error(i(160));Gw(b,w,y),Et=null,qn=!1,b=y.alternate,b!==null&&(b.return=null),y.return=null}if(u.subtreeFlags&13886)for(u=u.child;u!==null;)Fw(u,a),u=u.sibling}var sr=null;function Fw(a,u){var f=a.alternate,m=a.flags;switch(a.tag){case 0:case 11:case 14:case 15:Un(u,a),Yn(a),m&4&&(no(3,a,a.return),Vu(3,a),no(5,a,a.return));break;case 1:Un(u,a),Yn(a),m&512&&(qt||f===null||br(f,f.return)),m&64&&as&&(a=a.updateQueue,a!==null&&(m=a.callbacks,m!==null&&(f=a.shared.hiddenCallbacks,a.shared.hiddenCallbacks=f===null?m:f.concat(m))));break;case 26:var y=sr;if(Un(u,a),Yn(a),m&512&&(qt||f===null||br(f,f.return)),m&4){var b=f!==null?f.memoizedState:null;if(m=a.memoizedState,f===null)if(m===null)if(a.stateNode===null){e:{m=a.type,f=a.memoizedProps,y=y.ownerDocument||y;t:switch(m){case"title":b=y.getElementsByTagName("title")[0],(!b||b[gu]||b[un]||b.namespaceURI==="http://www.w3.org/2000/svg"||b.hasAttribute("itemprop"))&&(b=y.createElement(m),y.head.insertBefore(b,y.querySelector("head > title"))),pn(b,m,f),b[un]=a,rn(b),m=b;break e;case"link":var w=FP("link","href",y).get(m+(f.href||""));if(w){for(var E=0;E<w.length;E++)if(b=w[E],b.getAttribute("href")===(f.href==null||f.href===""?null:f.href)&&b.getAttribute("rel")===(f.rel==null?null:f.rel)&&b.getAttribute("title")===(f.title==null?null:f.title)&&b.getAttribute("crossorigin")===(f.crossOrigin==null?null:f.crossOrigin)){w.splice(E,1);break t}}b=y.createElement(m),pn(b,m,f),y.head.appendChild(b);break;case"meta":if(w=FP("meta","content",y).get(m+(f.content||""))){for(E=0;E<w.length;E++)if(b=w[E],b.getAttribute("content")===(f.content==null?null:""+f.content)&&b.getAttribute("name")===(f.name==null?null:f.name)&&b.getAttribute("property")===(f.property==null?null:f.property)&&b.getAttribute("http-equiv")===(f.httpEquiv==null?null:f.httpEquiv)&&b.getAttribute("charset")===(f.charSet==null?null:f.charSet)){w.splice(E,1);break t}}b=y.createElement(m),pn(b,m,f),y.head.appendChild(b);break;default:throw Error(i(468,m))}b[un]=a,rn(b),m=b}a.stateNode=m}else KP(y,a.type,a.stateNode);else a.stateNode=HP(y,m,a.memoizedProps);else b!==m?(b===null?f.stateNode!==null&&(f=f.stateNode,f.parentNode.removeChild(f)):b.count--,m===null?KP(y,a.type,a.stateNode):HP(y,m,a.memoizedProps)):m===null&&a.stateNode!==null&&Z0(a,a.memoizedProps,f.memoizedProps)}break;case 27:Un(u,a),Yn(a),m&512&&(qt||f===null||br(f,f.return)),f!==null&&m&4&&Z0(a,a.memoizedProps,f.memoizedProps);break;case 5:if(Un(u,a),Yn(a),m&512&&(qt||f===null||br(f,f.return)),a.flags&32){y=a.stateNode;try{bl(y,"")}catch(Pe){dt(a,a.return,Pe)}}m&4&&a.stateNode!=null&&(y=a.memoizedProps,Z0(a,y,f!==null?f.memoizedProps:y)),m&1024&&(Y0=!0);break;case 6:if(Un(u,a),Yn(a),m&4){if(a.stateNode===null)throw Error(i(162));m=a.memoizedProps,f=a.stateNode;try{f.nodeValue=m}catch(Pe){dt(a,a.return,Pe)}}break;case 3:if(lp=null,y=sr,sr=op(u.containerInfo),Un(u,a),sr=y,Yn(a),m&4&&f!==null&&f.memoizedState.isDehydrated)try{Hl(u.containerInfo)}catch(Pe){dt(a,a.return,Pe)}Y0&&(Y0=!1,Kw(a));break;case 4:m=sr,sr=op(a.stateNode.containerInfo),Un(u,a),Yn(a),sr=m;break;case 12:Un(u,a),Yn(a);break;case 31:Un(u,a),Yn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Ud(a,m)));break;case 13:Un(u,a),Yn(a),a.child.flags&8192&&a.memoizedState!==null!=(f!==null&&f.memoizedState!==null)&&(Gd=it()),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Ud(a,m)));break;case 22:y=a.memoizedState!==null;var z=f!==null&&f.memoizedState!==null,H=as,oe=qt;if(as=H||y,qt=oe||z,Un(u,a),qt=oe,as=H,Yn(a),m&8192)e:for(u=a.stateNode,u._visibility=y?u._visibility&-2:u._visibility|1,y&&(f===null||z||as||qt||ma(a)),f=null,u=a;;){if(u.tag===5||u.tag===26){if(f===null){z=f=u;try{if(b=z.stateNode,y)w=b.style,typeof w.setProperty=="function"?w.setProperty("display","none","important"):w.display="none";else{E=z.stateNode;var he=z.memoizedProps.style,F=he!=null&&he.hasOwnProperty("display")?he.display:null;E.style.display=F==null||typeof F=="boolean"?"":(""+F).trim()}}catch(Pe){dt(z,z.return,Pe)}}}else if(u.tag===6){if(f===null){z=u;try{z.stateNode.nodeValue=y?"":z.memoizedProps}catch(Pe){dt(z,z.return,Pe)}}}else if(u.tag===18){if(f===null){z=u;try{var ne=z.stateNode;y?XP(ne,!0):XP(z.stateNode,!1)}catch(Pe){dt(z,z.return,Pe)}}}else if((u.tag!==22&&u.tag!==23||u.memoizedState===null||u===a)&&u.child!==null){u.child.return=u,u=u.child;continue}if(u===a)break e;for(;u.sibling===null;){if(u.return===null||u.return===a)break e;f===u&&(f=null),u=u.return}f===u&&(f=null),u.sibling.return=u.return,u=u.sibling}m&4&&(m=a.updateQueue,m!==null&&(f=m.retryQueue,f!==null&&(m.retryQueue=null,Ud(a,f))));break;case 19:Un(u,a),Yn(a),m&4&&(m=a.updateQueue,m!==null&&(a.updateQueue=null,Ud(a,m)));break;case 30:break;case 21:break;default:Un(u,a),Yn(a)}}function Yn(a){var u=a.flags;if(u&2){try{for(var f,m=a.return;m!==null;){if(Bw(m)){f=m;break}m=m.return}if(f==null)throw Error(i(160));switch(f.tag){case 27:var y=f.stateNode,b=q0(a);qd(a,b,y);break;case 5:var w=f.stateNode;f.flags&32&&(bl(w,""),f.flags&=-33);var E=q0(a);qd(a,E,w);break;case 3:case 4:var z=f.stateNode.containerInfo,H=q0(a);U0(a,H,z);break;default:throw Error(i(161))}}catch(oe){dt(a,a.return,oe)}a.flags&=-3}u&4096&&(a.flags&=-4097)}function Kw(a){if(a.subtreeFlags&1024)for(a=a.child;a!==null;){var u=a;Kw(u),u.tag===5&&u.flags&1024&&u.stateNode.reset(),a=a.sibling}}function cs(a,u){if(u.subtreeFlags&8772)for(u=u.child;u!==null;)Uw(a,u.alternate,u),u=u.sibling}function ma(a){for(a=a.child;a!==null;){var u=a;switch(u.tag){case 0:case 11:case 14:case 15:no(4,u,u.return),ma(u);break;case 1:br(u,u.return);var f=u.stateNode;typeof f.componentWillUnmount=="function"&&Xw(u,u.return,f),ma(u);break;case 27:Ku(u.stateNode);case 26:case 5:br(u,u.return),ma(u);break;case 22:u.memoizedState===null&&ma(u);break;case 30:ma(u);break;default:ma(u)}a=a.sibling}}function us(a,u,f){for(f=f&&(u.subtreeFlags&8772)!==0,u=u.child;u!==null;){var m=u.alternate,y=a,b=u,w=b.flags;switch(b.tag){case 0:case 11:case 15:us(y,b,f),Vu(4,b);break;case 1:if(us(y,b,f),m=b,y=m.stateNode,typeof y.componentDidMount=="function")try{y.componentDidMount()}catch(H){dt(m,m.return,H)}if(m=b,y=m.updateQueue,y!==null){var E=m.stateNode;try{var z=y.shared.hiddenCallbacks;if(z!==null)for(y.shared.hiddenCallbacks=null,y=0;y<z.length;y++)Ck(z[y],E)}catch(H){dt(m,m.return,H)}}f&&w&64&&Iw(b),Bu(b,b.return);break;case 27:Zw(b);case 26:case 5:us(y,b,f),f&&m===null&&w&4&&Vw(b),Bu(b,b.return);break;case 12:us(y,b,f);break;case 31:us(y,b,f),f&&w&4&&Ww(y,b);break;case 13:us(y,b,f),f&&w&4&&Hw(y,b);break;case 22:b.memoizedState===null&&us(y,b,f),Bu(b,b.return);break;case 30:break;default:us(y,b,f)}u=u.sibling}}function G0(a,u){var f=null;a!==null&&a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(f=a.memoizedState.cachePool.pool),a=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(a=u.memoizedState.cachePool.pool),a!==f&&(a!=null&&a.refCount++,f!=null&&Cu(f))}function W0(a,u){a=null,u.alternate!==null&&(a=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==a&&(u.refCount++,a!=null&&Cu(a))}function or(a,u,f,m){if(u.subtreeFlags&10256)for(u=u.child;u!==null;)Jw(a,u,f,m),u=u.sibling}function Jw(a,u,f,m){var y=u.flags;switch(u.tag){case 0:case 11:case 15:or(a,u,f,m),y&2048&&Vu(9,u);break;case 1:or(a,u,f,m);break;case 3:or(a,u,f,m),y&2048&&(a=null,u.alternate!==null&&(a=u.alternate.memoizedState.cache),u=u.memoizedState.cache,u!==a&&(u.refCount++,a!=null&&Cu(a)));break;case 12:if(y&2048){or(a,u,f,m),a=u.stateNode;try{var b=u.memoizedProps,w=b.id,E=b.onPostCommit;typeof E=="function"&&E(w,u.alternate===null?"mount":"update",a.passiveEffectDuration,-0)}catch(z){dt(u,u.return,z)}}else or(a,u,f,m);break;case 31:or(a,u,f,m);break;case 13:or(a,u,f,m);break;case 23:break;case 22:b=u.stateNode,w=u.alternate,u.memoizedState!==null?b._visibility&2?or(a,u,f,m):Zu(a,u):b._visibility&2?or(a,u,f,m):(b._visibility|=2,zl(a,u,f,m,(u.subtreeFlags&10256)!==0||!1)),y&2048&&G0(w,u);break;case 24:or(a,u,f,m),y&2048&&W0(u.alternate,u);break;default:or(a,u,f,m)}}function zl(a,u,f,m,y){for(y=y&&((u.subtreeFlags&10256)!==0||!1),u=u.child;u!==null;){var b=a,w=u,E=f,z=m,H=w.flags;switch(w.tag){case 0:case 11:case 15:zl(b,w,E,z,y),Vu(8,w);break;case 23:break;case 22:var oe=w.stateNode;w.memoizedState!==null?oe._visibility&2?zl(b,w,E,z,y):Zu(b,w):(oe._visibility|=2,zl(b,w,E,z,y)),y&&H&2048&&G0(w.alternate,w);break;case 24:zl(b,w,E,z,y),y&&H&2048&&W0(w.alternate,w);break;default:zl(b,w,E,z,y)}u=u.sibling}}function Zu(a,u){if(u.subtreeFlags&10256)for(u=u.child;u!==null;){var f=a,m=u,y=m.flags;switch(m.tag){case 22:Zu(f,m),y&2048&&G0(m.alternate,m);break;case 24:Zu(f,m),y&2048&&W0(m.alternate,m);break;default:Zu(f,m)}u=u.sibling}}var qu=8192;function Il(a,u,f){if(a.subtreeFlags&qu)for(a=a.child;a!==null;)eP(a,u,f),a=a.sibling}function eP(a,u,f){switch(a.tag){case 26:Il(a,u,f),a.flags&qu&&a.memoizedState!==null&&L3(f,sr,a.memoizedState,a.memoizedProps);break;case 5:Il(a,u,f);break;case 3:case 4:var m=sr;sr=op(a.stateNode.containerInfo),Il(a,u,f),sr=m;break;case 22:a.memoizedState===null&&(m=a.alternate,m!==null&&m.memoizedState!==null?(m=qu,qu=16777216,Il(a,u,f),qu=m):Il(a,u,f));break;default:Il(a,u,f)}}function tP(a){var u=a.alternate;if(u!==null&&(a=u.child,a!==null)){u.child=null;do u=a.sibling,a.sibling=null,a=u;while(a!==null)}}function Uu(a){var u=a.deletions;if((a.flags&16)!==0){if(u!==null)for(var f=0;f<u.length;f++){var m=u[f];sn=m,iP(m,a)}tP(a)}if(a.subtreeFlags&10256)for(a=a.child;a!==null;)nP(a),a=a.sibling}function nP(a){switch(a.tag){case 0:case 11:case 15:Uu(a),a.flags&2048&&no(9,a,a.return);break;case 3:Uu(a);break;case 12:Uu(a);break;case 22:var u=a.stateNode;a.memoizedState!==null&&u._visibility&2&&(a.return===null||a.return.tag!==13)?(u._visibility&=-3,Yd(a)):Uu(a);break;default:Uu(a)}}function Yd(a){var u=a.deletions;if((a.flags&16)!==0){if(u!==null)for(var f=0;f<u.length;f++){var m=u[f];sn=m,iP(m,a)}tP(a)}for(a=a.child;a!==null;){switch(u=a,u.tag){case 0:case 11:case 15:no(8,u,u.return),Yd(u);break;case 22:f=u.stateNode,f._visibility&2&&(f._visibility&=-3,Yd(u));break;default:Yd(u)}a=a.sibling}}function iP(a,u){for(;sn!==null;){var f=sn;switch(f.tag){case 0:case 11:case 15:no(8,f,u);break;case 23:case 22:if(f.memoizedState!==null&&f.memoizedState.cachePool!==null){var m=f.memoizedState.cachePool.pool;m!=null&&m.refCount++}break;case 24:Cu(f.memoizedState.cache)}if(m=f.child,m!==null)m.return=f,sn=m;else e:for(f=a;sn!==null;){m=sn;var y=m.sibling,b=m.return;if(Yw(m),m===f){sn=null;break e}if(y!==null){y.return=b,sn=y;break e}sn=b}}}var Wz={getCacheForType:function(a){var u=fn(Vt),f=u.data.get(a);return f===void 0&&(f=a(),u.data.set(a,f)),f},cacheSignal:function(){return fn(Vt).controller.signal}},Hz=typeof WeakMap=="function"?WeakMap:Map,ct=0,xt=null,Ze=null,We=0,ft=0,di=null,io=!1,Xl=!1,H0=!1,hs=0,Lt=0,ro=0,ga=0,F0=0,pi=0,Vl=0,Yu=null,Gn=null,K0=!1,Gd=0,rP=0,Wd=1/0,Hd=null,so=null,Kt=0,oo=null,Bl=null,fs=0,J0=0,ey=null,sP=null,Gu=0,ty=null;function mi(){return(ct&2)!==0&&We!==0?We&-We:q.T!==null?ay():v_()}function oP(){if(pi===0)if((We&536870912)===0||Ke){var a=rd;rd<<=1,(rd&3932160)===0&&(rd=262144),pi=a}else pi=536870912;return a=hi.current,a!==null&&(a.flags|=32),pi}function Wn(a,u,f){(a===xt&&(ft===2||ft===9)||a.cancelPendingCommit!==null)&&(Zl(a,0),ao(a,We,pi,!1)),mu(a,f),((ct&2)===0||a!==xt)&&(a===xt&&((ct&2)===0&&(ga|=f),Lt===4&&ao(a,We,pi,!1)),xr(a))}function aP(a,u,f){if((ct&6)!==0)throw Error(i(327));var m=!f&&(u&127)===0&&(u&a.expiredLanes)===0||pu(a,u),y=m?Jz(a,u):iy(a,u,!0),b=m;do{if(y===0){Xl&&!m&&ao(a,u,0,!1);break}else{if(f=a.current.alternate,b&&!Fz(f)){y=iy(a,u,!1),b=!1;continue}if(y===2){if(b=u,a.errorRecoveryDisabledLanes&b)var w=0;else w=a.pendingLanes&-536870913,w=w!==0?w:w&536870912?536870912:0;if(w!==0){u=w;e:{var E=a;y=Yu;var z=E.current.memoizedState.isDehydrated;if(z&&(Zl(E,w).flags|=256),w=iy(E,w,!1),w!==2){if(H0&&!z){E.errorRecoveryDisabledLanes|=b,ga|=b,y=4;break e}b=Gn,Gn=y,b!==null&&(Gn===null?Gn=b:Gn.push.apply(Gn,b))}y=w}if(b=!1,y!==2)continue}}if(y===1){Zl(a,0),ao(a,u,0,!0);break}e:{switch(m=a,b=y,b){case 0:case 1:throw Error(i(345));case 4:if((u&4194048)!==u)break;case 6:ao(m,u,pi,!io);break e;case 2:Gn=null;break;case 3:case 5:break;default:throw Error(i(329))}if((u&62914560)===u&&(y=Gd+300-it(),10<y)){if(ao(m,u,pi,!io),od(m,0,!0)!==0)break e;fs=u,m.timeoutHandle=NP(lP.bind(null,m,f,Gn,Hd,K0,u,pi,ga,Vl,io,b,"Throttled",-0,0),y);break e}lP(m,f,Gn,Hd,K0,u,pi,ga,Vl,io,b,null,-0,0)}}break}while(!0);xr(a)}function lP(a,u,f,m,y,b,w,E,z,H,oe,he,F,ne){if(a.timeoutHandle=-1,he=u.subtreeFlags,he&8192||(he&16785408)===16785408){he={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Fr},eP(u,b,he);var Pe=(b&62914560)===b?Gd-it():(b&4194048)===b?rP-it():0;if(Pe=M3(he,Pe),Pe!==null){fs=b,a.cancelPendingCommit=Pe(gP.bind(null,a,u,b,f,m,y,w,E,z,oe,he,null,F,ne)),ao(a,b,w,!H);return}}gP(a,u,b,f,m,y,w,E,z)}function Fz(a){for(var u=a;;){var f=u.tag;if((f===0||f===11||f===15)&&u.flags&16384&&(f=u.updateQueue,f!==null&&(f=f.stores,f!==null)))for(var m=0;m<f.length;m++){var y=f[m],b=y.getSnapshot;y=y.value;try{if(!ci(b(),y))return!1}catch{return!1}}if(f=u.child,u.subtreeFlags&16384&&f!==null)f.return=u,u=f;else{if(u===a)break;for(;u.sibling===null;){if(u.return===null||u.return===a)return!0;u=u.return}u.sibling.return=u.return,u=u.sibling}}return!0}function ao(a,u,f,m){u&=~F0,u&=~ga,a.suspendedLanes|=u,a.pingedLanes&=~u,m&&(a.warmLanes|=u),m=a.expirationTimes;for(var y=u;0<y;){var b=31-bt(y),w=1<<b;m[b]=-1,y&=~w}f!==0&&y_(a,f,u)}function Fd(){return(ct&6)===0?(Wu(0),!1):!0}function ny(){if(Ze!==null){if(ft===0)var a=Ze.return;else a=Ze,ts=aa=null,y0(a),Ll=null,Au=0,a=Ze;for(;a!==null;)zw(a.alternate,a),a=a.return;Ze=null}}function Zl(a,u){var f=a.timeoutHandle;f!==-1&&(a.timeoutHandle=-1,O3(f)),f=a.cancelPendingCommit,f!==null&&(a.cancelPendingCommit=null,f()),fs=0,ny(),xt=a,Ze=f=Jr(a.current,null),We=u,ft=0,di=null,io=!1,Xl=pu(a,u),H0=!1,Vl=pi=F0=ga=ro=Lt=0,Gn=Yu=null,K0=!1,(u&8)!==0&&(u|=u&32);var m=a.entangledLanes;if(m!==0)for(a=a.entanglements,m&=u;0<m;){var y=31-bt(m),b=1<<y;u|=a[y],m&=~b}return hs=u,yd(),f}function cP(a,u){Ne=null,q.H=zu,u===$l||u===Pd?(u=wk(),ft=3):u===o0?(u=wk(),ft=4):ft=u===L0?8:u!==null&&typeof u=="object"&&typeof u.then=="function"?6:1,di=u,Ze===null&&(Lt=1,Id(a,Ai(u,a.current)))}function uP(){var a=hi.current;return a===null?!0:(We&4194048)===We?Mi===null:(We&62914560)===We||(We&536870912)!==0?a===Mi:!1}function hP(){var a=q.H;return q.H=zu,a===null?zu:a}function fP(){var a=q.A;return q.A=Wz,a}function Kd(){Lt=4,io||(We&4194048)!==We&&hi.current!==null||(Xl=!0),(ro&134217727)===0&&(ga&134217727)===0||xt===null||ao(xt,We,pi,!1)}function iy(a,u,f){var m=ct;ct|=2;var y=hP(),b=fP();(xt!==a||We!==u)&&(Hd=null,Zl(a,u)),u=!1;var w=Lt;e:do try{if(ft!==0&&Ze!==null){var E=Ze,z=di;switch(ft){case 8:ny(),w=6;break e;case 3:case 2:case 9:case 6:hi.current===null&&(u=!0);var H=ft;if(ft=0,di=null,ql(a,E,z,H),f&&Xl){w=0;break e}break;default:H=ft,ft=0,di=null,ql(a,E,z,H)}}Kz(),w=Lt;break}catch(oe){cP(a,oe)}while(!0);return u&&a.shellSuspendCounter++,ts=aa=null,ct=m,q.H=y,q.A=b,Ze===null&&(xt=null,We=0,yd()),w}function Kz(){for(;Ze!==null;)dP(Ze)}function Jz(a,u){var f=ct;ct|=2;var m=hP(),y=fP();xt!==a||We!==u?(Hd=null,Wd=it()+500,Zl(a,u)):Xl=pu(a,u);e:do try{if(ft!==0&&Ze!==null){u=Ze;var b=di;t:switch(ft){case 1:ft=0,di=null,ql(a,u,b,1);break;case 2:case 9:if(_k(b)){ft=0,di=null,pP(u);break}u=function(){ft!==2&&ft!==9||xt!==a||(ft=7),xr(a)},b.then(u,u);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:_k(b)?(ft=0,di=null,pP(u)):(ft=0,di=null,ql(a,u,b,7));break;case 5:var w=null;switch(Ze.tag){case 26:w=Ze.memoizedState;case 5:case 27:var E=Ze;if(w?JP(w):E.stateNode.complete){ft=0,di=null;var z=E.sibling;if(z!==null)Ze=z;else{var H=E.return;H!==null?(Ze=H,Jd(H)):Ze=null}break t}}ft=0,di=null,ql(a,u,b,5);break;case 6:ft=0,di=null,ql(a,u,b,6);break;case 8:ny(),Lt=6;break e;default:throw Error(i(462))}}e3();break}catch(oe){cP(a,oe)}while(!0);return ts=aa=null,q.H=m,q.A=y,ct=f,Ze!==null?0:(xt=null,We=0,yd(),Lt)}function e3(){for(;Ze!==null&&!fl();)dP(Ze)}function dP(a){var u=jw(a.alternate,a,hs);a.memoizedProps=a.pendingProps,u===null?Jd(a):Ze=u}function pP(a){var u=a,f=u.alternate;switch(u.tag){case 15:case 0:u=Aw(f,u,u.pendingProps,u.type,void 0,We);break;case 11:u=Aw(f,u,u.pendingProps,u.type.render,u.ref,We);break;case 5:y0(u);default:zw(f,u),u=Ze=fk(u,hs),u=jw(f,u,hs)}a.memoizedProps=a.pendingProps,u===null?Jd(a):Ze=u}function ql(a,u,f,m){ts=aa=null,y0(u),Ll=null,Au=0;var y=u.return;try{if(Vz(a,y,u,f,We)){Lt=1,Id(a,Ai(f,a.current)),Ze=null;return}}catch(b){if(y!==null)throw Ze=y,b;Lt=1,Id(a,Ai(f,a.current)),Ze=null;return}u.flags&32768?(Ke||m===1?a=!0:Xl||(We&536870912)!==0?a=!1:(io=a=!0,(m===2||m===9||m===3||m===6)&&(m=hi.current,m!==null&&m.tag===13&&(m.flags|=16384))),mP(u,a)):Jd(u)}function Jd(a){var u=a;do{if((u.flags&32768)!==0){mP(u,io);return}a=u.return;var f=qz(u.alternate,u,hs);if(f!==null){Ze=f;return}if(u=u.sibling,u!==null){Ze=u;return}Ze=u=a}while(u!==null);Lt===0&&(Lt=5)}function mP(a,u){do{var f=Uz(a.alternate,a);if(f!==null){f.flags&=32767,Ze=f;return}if(f=a.return,f!==null&&(f.flags|=32768,f.subtreeFlags=0,f.deletions=null),!u&&(a=a.sibling,a!==null)){Ze=a;return}Ze=a=f}while(a!==null);Lt=6,Ze=null}function gP(a,u,f,m,y,b,w,E,z){a.cancelPendingCommit=null;do ep();while(Kt!==0);if((ct&6)!==0)throw Error(i(327));if(u!==null){if(u===a.current)throw Error(i(177));if(b=u.lanes|u.childLanes,b|=qO,$N(a,f,b,w,E,z),a===xt&&(Ze=xt=null,We=0),Bl=u,oo=a,fs=f,J0=b,ey=y,sP=m,(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?(a.callbackNode=null,a.callbackPriority=0,r3(Le,function(){return vP(),null})):(a.callbackNode=null,a.callbackPriority=0),m=(u.flags&13878)!==0,(u.subtreeFlags&13878)!==0||m){m=q.T,q.T=null,y=se.p,se.p=2,w=ct,ct|=4;try{Yz(a,u,f)}finally{ct=w,se.p=y,q.T=m}}Kt=1,OP(),yP(),bP()}}function OP(){if(Kt===1){Kt=0;var a=oo,u=Bl,f=(u.flags&13878)!==0;if((u.subtreeFlags&13878)!==0||f){f=q.T,q.T=null;var m=se.p;se.p=2;var y=ct;ct|=4;try{Fw(u,a);var b=my,w=ik(a.containerInfo),E=b.focusedElem,z=b.selectionRange;if(w!==E&&E&&E.ownerDocument&&nk(E.ownerDocument.documentElement,E)){if(z!==null&&IO(E)){var H=z.start,oe=z.end;if(oe===void 0&&(oe=H),"selectionStart"in E)E.selectionStart=H,E.selectionEnd=Math.min(oe,E.value.length);else{var he=E.ownerDocument||document,F=he&&he.defaultView||window;if(F.getSelection){var ne=F.getSelection(),Pe=E.textContent.length,$e=Math.min(z.start,Pe),Ot=z.end===void 0?$e:Math.min(z.end,Pe);!ne.extend&&$e>Ot&&(w=Ot,Ot=$e,$e=w);var Y=tk(E,$e),X=tk(E,Ot);if(Y&&X&&(ne.rangeCount!==1||ne.anchorNode!==Y.node||ne.anchorOffset!==Y.offset||ne.focusNode!==X.node||ne.focusOffset!==X.offset)){var W=he.createRange();W.setStart(Y.node,Y.offset),ne.removeAllRanges(),$e>Ot?(ne.addRange(W),ne.extend(X.node,X.offset)):(W.setEnd(X.node,X.offset),ne.addRange(W))}}}}for(he=[],ne=E;ne=ne.parentNode;)ne.nodeType===1&&he.push({element:ne,left:ne.scrollLeft,top:ne.scrollTop});for(typeof E.focus=="function"&&E.focus(),E=0;E<he.length;E++){var ue=he[E];ue.element.scrollLeft=ue.left,ue.element.scrollTop=ue.top}}fp=!!py,my=py=null}finally{ct=y,se.p=m,q.T=f}}a.current=u,Kt=2}}function yP(){if(Kt===2){Kt=0;var a=oo,u=Bl,f=(u.flags&8772)!==0;if((u.subtreeFlags&8772)!==0||f){f=q.T,q.T=null;var m=se.p;se.p=2;var y=ct;ct|=4;try{Uw(a,u.alternate,u)}finally{ct=y,se.p=m,q.T=f}}Kt=3}}function bP(){if(Kt===4||Kt===3){Kt=0,ot();var a=oo,u=Bl,f=fs,m=sP;(u.subtreeFlags&10256)!==0||(u.flags&10256)!==0?Kt=5:(Kt=0,Bl=oo=null,xP(a,a.pendingLanes));var y=a.pendingLanes;if(y===0&&(so=null),vO(f),u=u.stateNode,Ft&&typeof Ft.onCommitFiberRoot=="function")try{Ft.onCommitFiberRoot(An,u,void 0,(u.current.flags&128)===128)}catch{}if(m!==null){u=q.T,y=se.p,se.p=2,q.T=null;try{for(var b=a.onRecoverableError,w=0;w<m.length;w++){var E=m[w];b(E.value,{componentStack:E.stack})}}finally{q.T=u,se.p=y}}(fs&3)!==0&&ep(),xr(a),y=a.pendingLanes,(f&261930)!==0&&(y&42)!==0?a===ty?Gu++:(Gu=0,ty=a):Gu=0,Wu(0)}}function xP(a,u){(a.pooledCacheLanes&=u)===0&&(u=a.pooledCache,u!=null&&(a.pooledCache=null,Cu(u)))}function ep(){return OP(),yP(),bP(),vP()}function vP(){if(Kt!==5)return!1;var a=oo,u=J0;J0=0;var f=vO(fs),m=q.T,y=se.p;try{se.p=32>f?32:f,q.T=null,f=ey,ey=null;var b=oo,w=fs;if(Kt=0,Bl=oo=null,fs=0,(ct&6)!==0)throw Error(i(331));var E=ct;if(ct|=4,nP(b.current),Jw(b,b.current,w,f),ct=E,Wu(0,!1),Ft&&typeof Ft.onPostCommitFiberRoot=="function")try{Ft.onPostCommitFiberRoot(An,b)}catch{}return!0}finally{se.p=y,q.T=m,xP(a,u)}}function SP(a,u,f){u=Ai(f,u),u=$0(a.stateNode,u,2),a=Js(a,u,2),a!==null&&(mu(a,2),xr(a))}function dt(a,u,f){if(a.tag===3)SP(a,a,f);else for(;u!==null;){if(u.tag===3){SP(u,a,f);break}else if(u.tag===1){var m=u.stateNode;if(typeof u.type.getDerivedStateFromError=="function"||typeof m.componentDidCatch=="function"&&(so===null||!so.has(m))){a=Ai(f,a),f=_w(2),m=Js(u,f,2),m!==null&&(kw(f,m,u,a),mu(m,2),xr(m));break}}u=u.return}}function ry(a,u,f){var m=a.pingCache;if(m===null){m=a.pingCache=new Hz;var y=new Set;m.set(u,y)}else y=m.get(u),y===void 0&&(y=new Set,m.set(u,y));y.has(f)||(H0=!0,y.add(f),a=t3.bind(null,a,u,f),u.then(a,a))}function t3(a,u,f){var m=a.pingCache;m!==null&&m.delete(u),a.pingedLanes|=a.suspendedLanes&f,a.warmLanes&=~f,xt===a&&(We&f)===f&&(Lt===4||Lt===3&&(We&62914560)===We&&300>it()-Gd?(ct&2)===0&&Zl(a,0):F0|=f,Vl===We&&(Vl=0)),xr(a)}function _P(a,u){u===0&&(u=O_()),a=ra(a,u),a!==null&&(mu(a,u),xr(a))}function n3(a){var u=a.memoizedState,f=0;u!==null&&(f=u.retryLane),_P(a,f)}function i3(a,u){var f=0;switch(a.tag){case 31:case 13:var m=a.stateNode,y=a.memoizedState;y!==null&&(f=y.retryLane);break;case 19:m=a.stateNode;break;case 22:m=a.stateNode._retryCache;break;default:throw Error(i(314))}m!==null&&m.delete(u),_P(a,f)}function r3(a,u){return nr(a,u)}var tp=null,Ul=null,sy=!1,np=!1,oy=!1,lo=0;function xr(a){a!==Ul&&a.next===null&&(Ul===null?tp=Ul=a:Ul=Ul.next=a),np=!0,sy||(sy=!0,o3())}function Wu(a,u){if(!oy&&np){oy=!0;do for(var f=!1,m=tp;m!==null;){if(a!==0){var y=m.pendingLanes;if(y===0)var b=0;else{var w=m.suspendedLanes,E=m.pingedLanes;b=(1<<31-bt(42|a)+1)-1,b&=y&~(w&~E),b=b&201326741?b&201326741|1:b?b|2:0}b!==0&&(f=!0,TP(m,b))}else b=We,b=od(m,m===xt?b:0,m.cancelPendingCommit!==null||m.timeoutHandle!==-1),(b&3)===0||pu(m,b)||(f=!0,TP(m,b));m=m.next}while(f);oy=!1}}function s3(){kP()}function kP(){np=sy=!1;var a=0;lo!==0&&g3()&&(a=lo);for(var u=it(),f=null,m=tp;m!==null;){var y=m.next,b=wP(m,u);b===0?(m.next=null,f===null?tp=y:f.next=y,y===null&&(Ul=f)):(f=m,(a!==0||(b&3)!==0)&&(np=!0)),m=y}Kt!==0&&Kt!==5||Wu(a),lo!==0&&(lo=0)}function wP(a,u){for(var f=a.suspendedLanes,m=a.pingedLanes,y=a.expirationTimes,b=a.pendingLanes&-62914561;0<b;){var w=31-bt(b),E=1<<w,z=y[w];z===-1?((E&f)===0||(E&m)!==0)&&(y[w]=RN(E,u)):z<=u&&(a.expiredLanes|=E),b&=~E}if(u=xt,f=We,f=od(a,a===u?f:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m=a.callbackNode,f===0||a===u&&(ft===2||ft===9)||a.cancelPendingCommit!==null)return m!==null&&m!==null&&Bs(m),a.callbackNode=null,a.callbackPriority=0;if((f&3)===0||pu(a,f)){if(u=f&-f,u===a.callbackPriority)return u;switch(m!==null&&Bs(m),vO(f)){case 2:case 8:f=Oe;break;case 32:f=Le;break;case 268435456:f=ut;break;default:f=Le}return m=PP.bind(null,a),f=nr(f,m),a.callbackPriority=u,a.callbackNode=f,u}return m!==null&&m!==null&&Bs(m),a.callbackPriority=2,a.callbackNode=null,2}function PP(a,u){if(Kt!==0&&Kt!==5)return a.callbackNode=null,a.callbackPriority=0,null;var f=a.callbackNode;if(ep()&&a.callbackNode!==f)return null;var m=We;return m=od(a,a===xt?m:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),m===0?null:(aP(a,m,u),wP(a,it()),a.callbackNode!=null&&a.callbackNode===f?PP.bind(null,a):null)}function TP(a,u){if(ep())return null;aP(a,u,!0)}function o3(){y3(function(){(ct&6)!==0?nr(le,s3):kP()})}function ay(){if(lo===0){var a=Al;a===0&&(a=id,id<<=1,(id&261888)===0&&(id=256)),lo=a}return lo}function QP(a){return a==null||typeof a=="symbol"||typeof a=="boolean"?null:typeof a=="function"?a:ud(""+a)}function CP(a,u){var f=u.ownerDocument.createElement("input");return f.name=u.name,f.value=u.value,a.id&&f.setAttribute("form",a.id),u.parentNode.insertBefore(f,u),a=new FormData(a),f.parentNode.removeChild(f),a}function a3(a,u,f,m,y){if(u==="submit"&&f&&f.stateNode===y){var b=QP((y[Bn]||null).action),w=m.submitter;w&&(u=(u=w[Bn]||null)?QP(u.formAction):w.getAttribute("formAction"),u!==null&&(b=u,w=null));var E=new pd("action","action",null,m,y);a.push({event:E,listeners:[{instance:null,listener:function(){if(m.defaultPrevented){if(lo!==0){var z=w?CP(y,w):new FormData(y);T0(f,{pending:!0,data:z,method:y.method,action:b},null,z)}}else typeof b=="function"&&(E.preventDefault(),z=w?CP(y,w):new FormData(y),T0(f,{pending:!0,data:z,method:y.method,action:b},b,z))},currentTarget:y}]})}}for(var ly=0;ly<ZO.length;ly++){var cy=ZO[ly],l3=cy.toLowerCase(),c3=cy[0].toUpperCase()+cy.slice(1);rr(l3,"on"+c3)}rr(ok,"onAnimationEnd"),rr(ak,"onAnimationIteration"),rr(lk,"onAnimationStart"),rr("dblclick","onDoubleClick"),rr("focusin","onFocus"),rr("focusout","onBlur"),rr(wz,"onTransitionRun"),rr(Pz,"onTransitionStart"),rr(Tz,"onTransitionCancel"),rr(ck,"onTransitionEnd"),Ol("onMouseEnter",["mouseout","mouseover"]),Ol("onMouseLeave",["mouseout","mouseover"]),Ol("onPointerEnter",["pointerout","pointerover"]),Ol("onPointerLeave",["pointerout","pointerover"]),ea("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ea("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ea("onBeforeInput",["compositionend","keypress","textInput","paste"]),ea("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ea("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Hu="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),u3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Hu));function EP(a,u){u=(u&4)!==0;for(var f=0;f<a.length;f++){var m=a[f],y=m.event;m=m.listeners;e:{var b=void 0;if(u)for(var w=m.length-1;0<=w;w--){var E=m[w],z=E.instance,H=E.currentTarget;if(E=E.listener,z!==b&&y.isPropagationStopped())break e;b=E,y.currentTarget=H;try{b(y)}catch(oe){Od(oe)}y.currentTarget=null,b=z}else for(w=0;w<m.length;w++){if(E=m[w],z=E.instance,H=E.currentTarget,E=E.listener,z!==b&&y.isPropagationStopped())break e;b=E,y.currentTarget=H;try{b(y)}catch(oe){Od(oe)}y.currentTarget=null,b=z}}}}function qe(a,u){var f=u[SO];f===void 0&&(f=u[SO]=new Set);var m=a+"__bubble";f.has(m)||(AP(u,a,2,!1),f.add(m))}function uy(a,u,f){var m=0;u&&(m|=4),AP(f,a,m,u)}var ip="_reactListening"+Math.random().toString(36).slice(2);function hy(a){if(!a[ip]){a[ip]=!0,k_.forEach(function(f){f!=="selectionchange"&&(u3.has(f)||uy(f,!1,a),uy(f,!0,a))});var u=a.nodeType===9?a:a.ownerDocument;u===null||u[ip]||(u[ip]=!0,uy("selectionchange",!1,u))}}function AP(a,u,f,m){switch(oT(u)){case 2:var y=N3;break;case 8:y=z3;break;default:y=Py}f=y.bind(null,u,f,a),y=void 0,!AO||u!=="touchstart"&&u!=="touchmove"&&u!=="wheel"||(y=!0),m?y!==void 0?a.addEventListener(u,f,{capture:!0,passive:y}):a.addEventListener(u,f,!0):y!==void 0?a.addEventListener(u,f,{passive:y}):a.addEventListener(u,f,!1)}function fy(a,u,f,m,y){var b=m;if((u&1)===0&&(u&2)===0&&m!==null)e:for(;;){if(m===null)return;var w=m.tag;if(w===3||w===4){var E=m.stateNode.containerInfo;if(E===y)break;if(w===4)for(w=m.return;w!==null;){var z=w.tag;if((z===3||z===4)&&w.stateNode.containerInfo===y)return;w=w.return}for(;E!==null;){if(w=pl(E),w===null)return;if(z=w.tag,z===5||z===6||z===26||z===27){m=b=w;continue e}E=E.parentNode}}m=m.return}D_(function(){var H=b,oe=CO(f),he=[];e:{var F=uk.get(a);if(F!==void 0){var ne=pd,Pe=a;switch(a){case"keypress":if(fd(f)===0)break e;case"keydown":case"keyup":ne=iz;break;case"focusin":Pe="focus",ne=MO;break;case"focusout":Pe="blur",ne=MO;break;case"beforeblur":case"afterblur":ne=MO;break;case"click":if(f.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ne=z_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ne=qN;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ne=oz;break;case ok:case ak:case lk:ne=GN;break;case ck:ne=lz;break;case"scroll":case"scrollend":ne=BN;break;case"wheel":ne=uz;break;case"copy":case"cut":case"paste":ne=HN;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ne=X_;break;case"toggle":case"beforetoggle":ne=fz}var $e=(u&4)!==0,Ot=!$e&&(a==="scroll"||a==="scrollend"),Y=$e?F!==null?F+"Capture":null:F;$e=[];for(var X=H,W;X!==null;){var ue=X;if(W=ue.stateNode,ue=ue.tag,ue!==5&&ue!==26&&ue!==27||W===null||Y===null||(ue=yu(X,Y),ue!=null&&$e.push(Fu(X,ue,W))),Ot)break;X=X.return}0<$e.length&&(F=new ne(F,Pe,null,f,oe),he.push({event:F,listeners:$e}))}}if((u&7)===0){e:{if(F=a==="mouseover"||a==="pointerover",ne=a==="mouseout"||a==="pointerout",F&&f!==QO&&(Pe=f.relatedTarget||f.fromElement)&&(pl(Pe)||Pe[dl]))break e;if((ne||F)&&(F=oe.window===oe?oe:(F=oe.ownerDocument)?F.defaultView||F.parentWindow:window,ne?(Pe=f.relatedTarget||f.toElement,ne=H,Pe=Pe?pl(Pe):null,Pe!==null&&(Ot=s(Pe),$e=Pe.tag,Pe!==Ot||$e!==5&&$e!==27&&$e!==6)&&(Pe=null)):(ne=null,Pe=H),ne!==Pe)){if($e=z_,ue="onMouseLeave",Y="onMouseEnter",X="mouse",(a==="pointerout"||a==="pointerover")&&($e=X_,ue="onPointerLeave",Y="onPointerEnter",X="pointer"),Ot=ne==null?F:Ou(ne),W=Pe==null?F:Ou(Pe),F=new $e(ue,X+"leave",ne,f,oe),F.target=Ot,F.relatedTarget=W,ue=null,pl(oe)===H&&($e=new $e(Y,X+"enter",Pe,f,oe),$e.target=W,$e.relatedTarget=Ot,ue=$e),Ot=ue,ne&&Pe)t:{for($e=h3,Y=ne,X=Pe,W=0,ue=Y;ue;ue=$e(ue))W++;ue=0;for(var Ae=X;Ae;Ae=$e(Ae))ue++;for(;0<W-ue;)Y=$e(Y),W--;for(;0<ue-W;)X=$e(X),ue--;for(;W--;){if(Y===X||X!==null&&Y===X.alternate){$e=Y;break t}Y=$e(Y),X=$e(X)}$e=null}else $e=null;ne!==null&&RP(he,F,ne,$e,!1),Pe!==null&&Ot!==null&&RP(he,Ot,Pe,$e,!0)}}e:{if(F=H?Ou(H):window,ne=F.nodeName&&F.nodeName.toLowerCase(),ne==="select"||ne==="input"&&F.type==="file")var at=W_;else if(Y_(F))if(H_)at=Sz;else{at=xz;var Te=bz}else ne=F.nodeName,!ne||ne.toLowerCase()!=="input"||F.type!=="checkbox"&&F.type!=="radio"?H&&TO(H.elementType)&&(at=W_):at=vz;if(at&&(at=at(a,H))){G_(he,at,f,oe);break e}Te&&Te(a,F,H),a==="focusout"&&H&&F.type==="number"&&H.memoizedProps.value!=null&&PO(F,"number",F.value)}switch(Te=H?Ou(H):window,a){case"focusin":(Y_(Te)||Te.contentEditable==="true")&&(_l=Te,XO=H,Pu=null);break;case"focusout":Pu=XO=_l=null;break;case"mousedown":VO=!0;break;case"contextmenu":case"mouseup":case"dragend":VO=!1,rk(he,f,oe);break;case"selectionchange":if(kz)break;case"keydown":case"keyup":rk(he,f,oe)}var ze;if(jO)e:{switch(a){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else Sl?q_(a,f)&&(He="onCompositionEnd"):a==="keydown"&&f.keyCode===229&&(He="onCompositionStart");He&&(V_&&f.locale!=="ko"&&(Sl||He!=="onCompositionStart"?He==="onCompositionEnd"&&Sl&&(ze=j_()):(Us=oe,RO="value"in Us?Us.value:Us.textContent,Sl=!0)),Te=rp(H,He),0<Te.length&&(He=new I_(He,a,null,f,oe),he.push({event:He,listeners:Te}),ze?He.data=ze:(ze=U_(f),ze!==null&&(He.data=ze)))),(ze=pz?mz(a,f):gz(a,f))&&(He=rp(H,"onBeforeInput"),0<He.length&&(Te=new I_("onBeforeInput","beforeinput",null,f,oe),he.push({event:Te,listeners:He}),Te.data=ze)),a3(he,a,H,f,oe)}EP(he,u)})}function Fu(a,u,f){return{instance:a,listener:u,currentTarget:f}}function rp(a,u){for(var f=u+"Capture",m=[];a!==null;){var y=a,b=y.stateNode;if(y=y.tag,y!==5&&y!==26&&y!==27||b===null||(y=yu(a,f),y!=null&&m.unshift(Fu(a,y,b)),y=yu(a,u),y!=null&&m.push(Fu(a,y,b))),a.tag===3)return m;a=a.return}return[]}function h3(a){if(a===null)return null;do a=a.return;while(a&&a.tag!==5&&a.tag!==27);return a||null}function RP(a,u,f,m,y){for(var b=u._reactName,w=[];f!==null&&f!==m;){var E=f,z=E.alternate,H=E.stateNode;if(E=E.tag,z!==null&&z===m)break;E!==5&&E!==26&&E!==27||H===null||(z=H,y?(H=yu(f,b),H!=null&&w.unshift(Fu(f,H,z))):y||(H=yu(f,b),H!=null&&w.push(Fu(f,H,z)))),f=f.return}w.length!==0&&a.push({event:u,listeners:w})}var f3=/\r\n?/g,d3=/\u0000|\uFFFD/g;function $P(a){return(typeof a=="string"?a:""+a).replace(f3,`
50
+ `).replace(d3,"")}function LP(a,u){return u=$P(u),$P(a)===u}function gt(a,u,f,m,y,b){switch(f){case"children":typeof m=="string"?u==="body"||u==="textarea"&&m===""||bl(a,m):(typeof m=="number"||typeof m=="bigint")&&u!=="body"&&bl(a,""+m);break;case"className":ld(a,"class",m);break;case"tabIndex":ld(a,"tabindex",m);break;case"dir":case"role":case"viewBox":case"width":case"height":ld(a,f,m);break;case"style":L_(a,m,b);break;case"data":if(u!=="object"){ld(a,"data",m);break}case"src":case"href":if(m===""&&(u!=="a"||f!=="href")){a.removeAttribute(f);break}if(m==null||typeof m=="function"||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(f);break}m=ud(""+m),a.setAttribute(f,m);break;case"action":case"formAction":if(typeof m=="function"){a.setAttribute(f,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof b=="function"&&(f==="formAction"?(u!=="input"&&gt(a,u,"name",y.name,y,null),gt(a,u,"formEncType",y.formEncType,y,null),gt(a,u,"formMethod",y.formMethod,y,null),gt(a,u,"formTarget",y.formTarget,y,null)):(gt(a,u,"encType",y.encType,y,null),gt(a,u,"method",y.method,y,null),gt(a,u,"target",y.target,y,null)));if(m==null||typeof m=="symbol"||typeof m=="boolean"){a.removeAttribute(f);break}m=ud(""+m),a.setAttribute(f,m);break;case"onClick":m!=null&&(a.onclick=Fr);break;case"onScroll":m!=null&&qe("scroll",a);break;case"onScrollEnd":m!=null&&qe("scrollend",a);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(f=m.__html,f!=null){if(y.children!=null)throw Error(i(60));a.innerHTML=f}}break;case"multiple":a.multiple=m&&typeof m!="function"&&typeof m!="symbol";break;case"muted":a.muted=m&&typeof m!="function"&&typeof m!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(m==null||typeof m=="function"||typeof m=="boolean"||typeof m=="symbol"){a.removeAttribute("xlink:href");break}f=ud(""+m),a.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",f);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(f,""+m):a.removeAttribute(f);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":m&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(f,""):a.removeAttribute(f);break;case"capture":case"download":m===!0?a.setAttribute(f,""):m!==!1&&m!=null&&typeof m!="function"&&typeof m!="symbol"?a.setAttribute(f,m):a.removeAttribute(f);break;case"cols":case"rows":case"size":case"span":m!=null&&typeof m!="function"&&typeof m!="symbol"&&!isNaN(m)&&1<=m?a.setAttribute(f,m):a.removeAttribute(f);break;case"rowSpan":case"start":m==null||typeof m=="function"||typeof m=="symbol"||isNaN(m)?a.removeAttribute(f):a.setAttribute(f,m);break;case"popover":qe("beforetoggle",a),qe("toggle",a),ad(a,"popover",m);break;case"xlinkActuate":Hr(a,"http://www.w3.org/1999/xlink","xlink:actuate",m);break;case"xlinkArcrole":Hr(a,"http://www.w3.org/1999/xlink","xlink:arcrole",m);break;case"xlinkRole":Hr(a,"http://www.w3.org/1999/xlink","xlink:role",m);break;case"xlinkShow":Hr(a,"http://www.w3.org/1999/xlink","xlink:show",m);break;case"xlinkTitle":Hr(a,"http://www.w3.org/1999/xlink","xlink:title",m);break;case"xlinkType":Hr(a,"http://www.w3.org/1999/xlink","xlink:type",m);break;case"xmlBase":Hr(a,"http://www.w3.org/XML/1998/namespace","xml:base",m);break;case"xmlLang":Hr(a,"http://www.w3.org/XML/1998/namespace","xml:lang",m);break;case"xmlSpace":Hr(a,"http://www.w3.org/XML/1998/namespace","xml:space",m);break;case"is":ad(a,"is",m);break;case"innerText":case"textContent":break;default:(!(2<f.length)||f[0]!=="o"&&f[0]!=="O"||f[1]!=="n"&&f[1]!=="N")&&(f=XN.get(f)||f,ad(a,f,m))}}function dy(a,u,f,m,y,b){switch(f){case"style":L_(a,m,b);break;case"dangerouslySetInnerHTML":if(m!=null){if(typeof m!="object"||!("__html"in m))throw Error(i(61));if(f=m.__html,f!=null){if(y.children!=null)throw Error(i(60));a.innerHTML=f}}break;case"children":typeof m=="string"?bl(a,m):(typeof m=="number"||typeof m=="bigint")&&bl(a,""+m);break;case"onScroll":m!=null&&qe("scroll",a);break;case"onScrollEnd":m!=null&&qe("scrollend",a);break;case"onClick":m!=null&&(a.onclick=Fr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!w_.hasOwnProperty(f))e:{if(f[0]==="o"&&f[1]==="n"&&(y=f.endsWith("Capture"),u=f.slice(2,y?f.length-7:void 0),b=a[Bn]||null,b=b!=null?b[f]:null,typeof b=="function"&&a.removeEventListener(u,b,y),typeof m=="function")){typeof b!="function"&&b!==null&&(f in a?a[f]=null:a.hasAttribute(f)&&a.removeAttribute(f)),a.addEventListener(u,m,y);break e}f in a?a[f]=m:m===!0?a.setAttribute(f,""):ad(a,f,m)}}}function pn(a,u,f){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":qe("error",a),qe("load",a);var m=!1,y=!1,b;for(b in f)if(f.hasOwnProperty(b)){var w=f[b];if(w!=null)switch(b){case"src":m=!0;break;case"srcSet":y=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(i(137,u));default:gt(a,u,b,w,f,null)}}y&&gt(a,u,"srcSet",f.srcSet,f,null),m&&gt(a,u,"src",f.src,f,null);return;case"input":qe("invalid",a);var E=b=w=y=null,z=null,H=null;for(m in f)if(f.hasOwnProperty(m)){var oe=f[m];if(oe!=null)switch(m){case"name":y=oe;break;case"type":w=oe;break;case"checked":z=oe;break;case"defaultChecked":H=oe;break;case"value":b=oe;break;case"defaultValue":E=oe;break;case"children":case"dangerouslySetInnerHTML":if(oe!=null)throw Error(i(137,u));break;default:gt(a,u,m,oe,f,null)}}E_(a,b,E,z,H,w,y,!1);return;case"select":qe("invalid",a),m=w=b=null;for(y in f)if(f.hasOwnProperty(y)&&(E=f[y],E!=null))switch(y){case"value":b=E;break;case"defaultValue":w=E;break;case"multiple":m=E;default:gt(a,u,y,E,f,null)}u=b,f=w,a.multiple=!!m,u!=null?yl(a,!!m,u,!1):f!=null&&yl(a,!!m,f,!0);return;case"textarea":qe("invalid",a),b=y=m=null;for(w in f)if(f.hasOwnProperty(w)&&(E=f[w],E!=null))switch(w){case"value":m=E;break;case"defaultValue":y=E;break;case"children":b=E;break;case"dangerouslySetInnerHTML":if(E!=null)throw Error(i(91));break;default:gt(a,u,w,E,f,null)}R_(a,m,y,b);return;case"option":for(z in f)if(f.hasOwnProperty(z)&&(m=f[z],m!=null))switch(z){case"selected":a.selected=m&&typeof m!="function"&&typeof m!="symbol";break;default:gt(a,u,z,m,f,null)}return;case"dialog":qe("beforetoggle",a),qe("toggle",a),qe("cancel",a),qe("close",a);break;case"iframe":case"object":qe("load",a);break;case"video":case"audio":for(m=0;m<Hu.length;m++)qe(Hu[m],a);break;case"image":qe("error",a),qe("load",a);break;case"details":qe("toggle",a);break;case"embed":case"source":case"link":qe("error",a),qe("load",a);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(H in f)if(f.hasOwnProperty(H)&&(m=f[H],m!=null))switch(H){case"children":case"dangerouslySetInnerHTML":throw Error(i(137,u));default:gt(a,u,H,m,f,null)}return;default:if(TO(u)){for(oe in f)f.hasOwnProperty(oe)&&(m=f[oe],m!==void 0&&dy(a,u,oe,m,f,void 0));return}}for(E in f)f.hasOwnProperty(E)&&(m=f[E],m!=null&&gt(a,u,E,m,f,null))}function p3(a,u,f,m){switch(u){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var y=null,b=null,w=null,E=null,z=null,H=null,oe=null;for(ne in f){var he=f[ne];if(f.hasOwnProperty(ne)&&he!=null)switch(ne){case"checked":break;case"value":break;case"defaultValue":z=he;default:m.hasOwnProperty(ne)||gt(a,u,ne,null,m,he)}}for(var F in m){var ne=m[F];if(he=f[F],m.hasOwnProperty(F)&&(ne!=null||he!=null))switch(F){case"type":b=ne;break;case"name":y=ne;break;case"checked":H=ne;break;case"defaultChecked":oe=ne;break;case"value":w=ne;break;case"defaultValue":E=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(i(137,u));break;default:ne!==he&&gt(a,u,F,ne,m,he)}}wO(a,w,E,z,H,oe,b,y);return;case"select":ne=w=E=F=null;for(b in f)if(z=f[b],f.hasOwnProperty(b)&&z!=null)switch(b){case"value":break;case"multiple":ne=z;default:m.hasOwnProperty(b)||gt(a,u,b,null,m,z)}for(y in m)if(b=m[y],z=f[y],m.hasOwnProperty(y)&&(b!=null||z!=null))switch(y){case"value":F=b;break;case"defaultValue":E=b;break;case"multiple":w=b;default:b!==z&&gt(a,u,y,b,m,z)}u=E,f=w,m=ne,F!=null?yl(a,!!f,F,!1):!!m!=!!f&&(u!=null?yl(a,!!f,u,!0):yl(a,!!f,f?[]:"",!1));return;case"textarea":ne=F=null;for(E in f)if(y=f[E],f.hasOwnProperty(E)&&y!=null&&!m.hasOwnProperty(E))switch(E){case"value":break;case"children":break;default:gt(a,u,E,null,m,y)}for(w in m)if(y=m[w],b=f[w],m.hasOwnProperty(w)&&(y!=null||b!=null))switch(w){case"value":F=y;break;case"defaultValue":ne=y;break;case"children":break;case"dangerouslySetInnerHTML":if(y!=null)throw Error(i(91));break;default:y!==b&&gt(a,u,w,y,m,b)}A_(a,F,ne);return;case"option":for(var Pe in f)if(F=f[Pe],f.hasOwnProperty(Pe)&&F!=null&&!m.hasOwnProperty(Pe))switch(Pe){case"selected":a.selected=!1;break;default:gt(a,u,Pe,null,m,F)}for(z in m)if(F=m[z],ne=f[z],m.hasOwnProperty(z)&&F!==ne&&(F!=null||ne!=null))switch(z){case"selected":a.selected=F&&typeof F!="function"&&typeof F!="symbol";break;default:gt(a,u,z,F,m,ne)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var $e in f)F=f[$e],f.hasOwnProperty($e)&&F!=null&&!m.hasOwnProperty($e)&&gt(a,u,$e,null,m,F);for(H in m)if(F=m[H],ne=f[H],m.hasOwnProperty(H)&&F!==ne&&(F!=null||ne!=null))switch(H){case"children":case"dangerouslySetInnerHTML":if(F!=null)throw Error(i(137,u));break;default:gt(a,u,H,F,m,ne)}return;default:if(TO(u)){for(var Ot in f)F=f[Ot],f.hasOwnProperty(Ot)&&F!==void 0&&!m.hasOwnProperty(Ot)&&dy(a,u,Ot,void 0,m,F);for(oe in m)F=m[oe],ne=f[oe],!m.hasOwnProperty(oe)||F===ne||F===void 0&&ne===void 0||dy(a,u,oe,F,m,ne);return}}for(var Y in f)F=f[Y],f.hasOwnProperty(Y)&&F!=null&&!m.hasOwnProperty(Y)&&gt(a,u,Y,null,m,F);for(he in m)F=m[he],ne=f[he],!m.hasOwnProperty(he)||F===ne||F==null&&ne==null||gt(a,u,he,F,m,ne)}function MP(a){switch(a){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function m3(){if(typeof performance.getEntriesByType=="function"){for(var a=0,u=0,f=performance.getEntriesByType("resource"),m=0;m<f.length;m++){var y=f[m],b=y.transferSize,w=y.initiatorType,E=y.duration;if(b&&E&&MP(w)){for(w=0,E=y.responseEnd,m+=1;m<f.length;m++){var z=f[m],H=z.startTime;if(H>E)break;var oe=z.transferSize,he=z.initiatorType;oe&&MP(he)&&(z=z.responseEnd,w+=oe*(z<E?1:(E-H)/(z-H)))}if(--m,u+=8*(b+w)/(y.duration/1e3),a++,10<a)break}}if(0<a)return u/a/1e6}return navigator.connection&&(a=navigator.connection.downlink,typeof a=="number")?a:5}var py=null,my=null;function sp(a){return a.nodeType===9?a:a.ownerDocument}function DP(a){switch(a){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function jP(a,u){if(a===0)switch(u){case"svg":return 1;case"math":return 2;default:return 0}return a===1&&u==="foreignObject"?0:a}function gy(a,u){return a==="textarea"||a==="noscript"||typeof u.children=="string"||typeof u.children=="number"||typeof u.children=="bigint"||typeof u.dangerouslySetInnerHTML=="object"&&u.dangerouslySetInnerHTML!==null&&u.dangerouslySetInnerHTML.__html!=null}var Oy=null;function g3(){var a=window.event;return a&&a.type==="popstate"?a===Oy?!1:(Oy=a,!0):(Oy=null,!1)}var NP=typeof setTimeout=="function"?setTimeout:void 0,O3=typeof clearTimeout=="function"?clearTimeout:void 0,zP=typeof Promise=="function"?Promise:void 0,y3=typeof queueMicrotask=="function"?queueMicrotask:typeof zP<"u"?function(a){return zP.resolve(null).then(a).catch(b3)}:NP;function b3(a){setTimeout(function(){throw a})}function co(a){return a==="head"}function IP(a,u){var f=u,m=0;do{var y=f.nextSibling;if(a.removeChild(f),y&&y.nodeType===8)if(f=y.data,f==="/$"||f==="/&"){if(m===0){a.removeChild(y),Hl(u);return}m--}else if(f==="$"||f==="$?"||f==="$~"||f==="$!"||f==="&")m++;else if(f==="html")Ku(a.ownerDocument.documentElement);else if(f==="head"){f=a.ownerDocument.head,Ku(f);for(var b=f.firstChild;b;){var w=b.nextSibling,E=b.nodeName;b[gu]||E==="SCRIPT"||E==="STYLE"||E==="LINK"&&b.rel.toLowerCase()==="stylesheet"||f.removeChild(b),b=w}}else f==="body"&&Ku(a.ownerDocument.body);f=y}while(f);Hl(u)}function XP(a,u){var f=a;a=0;do{var m=f.nextSibling;if(f.nodeType===1?u?(f._stashedDisplay=f.style.display,f.style.display="none"):(f.style.display=f._stashedDisplay||"",f.getAttribute("style")===""&&f.removeAttribute("style")):f.nodeType===3&&(u?(f._stashedText=f.nodeValue,f.nodeValue=""):f.nodeValue=f._stashedText||""),m&&m.nodeType===8)if(f=m.data,f==="/$"){if(a===0)break;a--}else f!=="$"&&f!=="$?"&&f!=="$~"&&f!=="$!"||a++;f=m}while(f)}function yy(a){var u=a.firstChild;for(u&&u.nodeType===10&&(u=u.nextSibling);u;){var f=u;switch(u=u.nextSibling,f.nodeName){case"HTML":case"HEAD":case"BODY":yy(f),_O(f);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(f.rel.toLowerCase()==="stylesheet")continue}a.removeChild(f)}}function x3(a,u,f,m){for(;a.nodeType===1;){var y=f;if(a.nodeName.toLowerCase()!==u.toLowerCase()){if(!m&&(a.nodeName!=="INPUT"||a.type!=="hidden"))break}else if(m){if(!a[gu])switch(u){case"meta":if(!a.hasAttribute("itemprop"))break;return a;case"link":if(b=a.getAttribute("rel"),b==="stylesheet"&&a.hasAttribute("data-precedence"))break;if(b!==y.rel||a.getAttribute("href")!==(y.href==null||y.href===""?null:y.href)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin)||a.getAttribute("title")!==(y.title==null?null:y.title))break;return a;case"style":if(a.hasAttribute("data-precedence"))break;return a;case"script":if(b=a.getAttribute("src"),(b!==(y.src==null?null:y.src)||a.getAttribute("type")!==(y.type==null?null:y.type)||a.getAttribute("crossorigin")!==(y.crossOrigin==null?null:y.crossOrigin))&&b&&a.hasAttribute("async")&&!a.hasAttribute("itemprop"))break;return a;default:return a}}else if(u==="input"&&a.type==="hidden"){var b=y.name==null?null:""+y.name;if(y.type==="hidden"&&a.getAttribute("name")===b)return a}else return a;if(a=Di(a.nextSibling),a===null)break}return null}function v3(a,u,f){if(u==="")return null;for(;a.nodeType!==3;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!f||(a=Di(a.nextSibling),a===null))return null;return a}function VP(a,u){for(;a.nodeType!==8;)if((a.nodeType!==1||a.nodeName!=="INPUT"||a.type!=="hidden")&&!u||(a=Di(a.nextSibling),a===null))return null;return a}function by(a){return a.data==="$?"||a.data==="$~"}function xy(a){return a.data==="$!"||a.data==="$?"&&a.ownerDocument.readyState!=="loading"}function S3(a,u){var f=a.ownerDocument;if(a.data==="$~")a._reactRetry=u;else if(a.data!=="$?"||f.readyState!=="loading")u();else{var m=function(){u(),f.removeEventListener("DOMContentLoaded",m)};f.addEventListener("DOMContentLoaded",m),a._reactRetry=m}}function Di(a){for(;a!=null;a=a.nextSibling){var u=a.nodeType;if(u===1||u===3)break;if(u===8){if(u=a.data,u==="$"||u==="$!"||u==="$?"||u==="$~"||u==="&"||u==="F!"||u==="F")break;if(u==="/$"||u==="/&")return null}}return a}var vy=null;function BP(a){a=a.nextSibling;for(var u=0;a;){if(a.nodeType===8){var f=a.data;if(f==="/$"||f==="/&"){if(u===0)return Di(a.nextSibling);u--}else f!=="$"&&f!=="$!"&&f!=="$?"&&f!=="$~"&&f!=="&"||u++}a=a.nextSibling}return null}function ZP(a){a=a.previousSibling;for(var u=0;a;){if(a.nodeType===8){var f=a.data;if(f==="$"||f==="$!"||f==="$?"||f==="$~"||f==="&"){if(u===0)return a;u--}else f!=="/$"&&f!=="/&"||u++}a=a.previousSibling}return null}function qP(a,u,f){switch(u=sp(f),a){case"html":if(a=u.documentElement,!a)throw Error(i(452));return a;case"head":if(a=u.head,!a)throw Error(i(453));return a;case"body":if(a=u.body,!a)throw Error(i(454));return a;default:throw Error(i(451))}}function Ku(a){for(var u=a.attributes;u.length;)a.removeAttributeNode(u[0]);_O(a)}var ji=new Map,UP=new Set;function op(a){return typeof a.getRootNode=="function"?a.getRootNode():a.nodeType===9?a:a.ownerDocument}var ds=se.d;se.d={f:_3,r:k3,D:w3,C:P3,L:T3,m:Q3,X:E3,S:C3,M:A3};function _3(){var a=ds.f(),u=Fd();return a||u}function k3(a){var u=ml(a);u!==null&&u.tag===5&&u.type==="form"?cw(u):ds.r(a)}var Yl=typeof document>"u"?null:document;function YP(a,u,f){var m=Yl;if(m&&typeof u=="string"&&u){var y=Ci(u);y='link[rel="'+a+'"][href="'+y+'"]',typeof f=="string"&&(y+='[crossorigin="'+f+'"]'),UP.has(y)||(UP.add(y),a={rel:a,crossOrigin:f,href:u},m.querySelector(y)===null&&(u=m.createElement("link"),pn(u,"link",a),rn(u),m.head.appendChild(u)))}}function w3(a){ds.D(a),YP("dns-prefetch",a,null)}function P3(a,u){ds.C(a,u),YP("preconnect",a,u)}function T3(a,u,f){ds.L(a,u,f);var m=Yl;if(m&&a&&u){var y='link[rel="preload"][as="'+Ci(u)+'"]';u==="image"&&f&&f.imageSrcSet?(y+='[imagesrcset="'+Ci(f.imageSrcSet)+'"]',typeof f.imageSizes=="string"&&(y+='[imagesizes="'+Ci(f.imageSizes)+'"]')):y+='[href="'+Ci(a)+'"]';var b=y;switch(u){case"style":b=Gl(a);break;case"script":b=Wl(a)}ji.has(b)||(a=p({rel:"preload",href:u==="image"&&f&&f.imageSrcSet?void 0:a,as:u},f),ji.set(b,a),m.querySelector(y)!==null||u==="style"&&m.querySelector(Ju(b))||u==="script"&&m.querySelector(eh(b))||(u=m.createElement("link"),pn(u,"link",a),rn(u),m.head.appendChild(u)))}}function Q3(a,u){ds.m(a,u);var f=Yl;if(f&&a){var m=u&&typeof u.as=="string"?u.as:"script",y='link[rel="modulepreload"][as="'+Ci(m)+'"][href="'+Ci(a)+'"]',b=y;switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":b=Wl(a)}if(!ji.has(b)&&(a=p({rel:"modulepreload",href:a},u),ji.set(b,a),f.querySelector(y)===null)){switch(m){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(f.querySelector(eh(b)))return}m=f.createElement("link"),pn(m,"link",a),rn(m),f.head.appendChild(m)}}}function C3(a,u,f){ds.S(a,u,f);var m=Yl;if(m&&a){var y=gl(m).hoistableStyles,b=Gl(a);u=u||"default";var w=y.get(b);if(!w){var E={loading:0,preload:null};if(w=m.querySelector(Ju(b)))E.loading=5;else{a=p({rel:"stylesheet",href:a,"data-precedence":u},f),(f=ji.get(b))&&Sy(a,f);var z=w=m.createElement("link");rn(z),pn(z,"link",a),z._p=new Promise(function(H,oe){z.onload=H,z.onerror=oe}),z.addEventListener("load",function(){E.loading|=1}),z.addEventListener("error",function(){E.loading|=2}),E.loading|=4,ap(w,u,m)}w={type:"stylesheet",instance:w,count:1,state:E},y.set(b,w)}}}function E3(a,u){ds.X(a,u);var f=Yl;if(f&&a){var m=gl(f).hoistableScripts,y=Wl(a),b=m.get(y);b||(b=f.querySelector(eh(y)),b||(a=p({src:a,async:!0},u),(u=ji.get(y))&&_y(a,u),b=f.createElement("script"),rn(b),pn(b,"link",a),f.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(y,b))}}function A3(a,u){ds.M(a,u);var f=Yl;if(f&&a){var m=gl(f).hoistableScripts,y=Wl(a),b=m.get(y);b||(b=f.querySelector(eh(y)),b||(a=p({src:a,async:!0,type:"module"},u),(u=ji.get(y))&&_y(a,u),b=f.createElement("script"),rn(b),pn(b,"link",a),f.head.appendChild(b)),b={type:"script",instance:b,count:1,state:null},m.set(y,b))}}function GP(a,u,f,m){var y=(y=be.current)?op(y):null;if(!y)throw Error(i(446));switch(a){case"meta":case"title":return null;case"style":return typeof f.precedence=="string"&&typeof f.href=="string"?(u=Gl(f.href),f=gl(y).hoistableStyles,m=f.get(u),m||(m={type:"style",instance:null,count:0,state:null},f.set(u,m)),m):{type:"void",instance:null,count:0,state:null};case"link":if(f.rel==="stylesheet"&&typeof f.href=="string"&&typeof f.precedence=="string"){a=Gl(f.href);var b=gl(y).hoistableStyles,w=b.get(a);if(w||(y=y.ownerDocument||y,w={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},b.set(a,w),(b=y.querySelector(Ju(a)))&&!b._p&&(w.instance=b,w.state.loading=5),ji.has(a)||(f={rel:"preload",as:"style",href:f.href,crossOrigin:f.crossOrigin,integrity:f.integrity,media:f.media,hrefLang:f.hrefLang,referrerPolicy:f.referrerPolicy},ji.set(a,f),b||R3(y,a,f,w.state))),u&&m===null)throw Error(i(528,""));return w}if(u&&m!==null)throw Error(i(529,""));return null;case"script":return u=f.async,f=f.src,typeof f=="string"&&u&&typeof u!="function"&&typeof u!="symbol"?(u=Wl(f),f=gl(y).hoistableScripts,m=f.get(u),m||(m={type:"script",instance:null,count:0,state:null},f.set(u,m)),m):{type:"void",instance:null,count:0,state:null};default:throw Error(i(444,a))}}function Gl(a){return'href="'+Ci(a)+'"'}function Ju(a){return'link[rel="stylesheet"]['+a+"]"}function WP(a){return p({},a,{"data-precedence":a.precedence,precedence:null})}function R3(a,u,f,m){a.querySelector('link[rel="preload"][as="style"]['+u+"]")?m.loading=1:(u=a.createElement("link"),m.preload=u,u.addEventListener("load",function(){return m.loading|=1}),u.addEventListener("error",function(){return m.loading|=2}),pn(u,"link",f),rn(u),a.head.appendChild(u))}function Wl(a){return'[src="'+Ci(a)+'"]'}function eh(a){return"script[async]"+a}function HP(a,u,f){if(u.count++,u.instance===null)switch(u.type){case"style":var m=a.querySelector('style[data-href~="'+Ci(f.href)+'"]');if(m)return u.instance=m,rn(m),m;var y=p({},f,{"data-href":f.href,"data-precedence":f.precedence,href:null,precedence:null});return m=(a.ownerDocument||a).createElement("style"),rn(m),pn(m,"style",y),ap(m,f.precedence,a),u.instance=m;case"stylesheet":y=Gl(f.href);var b=a.querySelector(Ju(y));if(b)return u.state.loading|=4,u.instance=b,rn(b),b;m=WP(f),(y=ji.get(y))&&Sy(m,y),b=(a.ownerDocument||a).createElement("link"),rn(b);var w=b;return w._p=new Promise(function(E,z){w.onload=E,w.onerror=z}),pn(b,"link",m),u.state.loading|=4,ap(b,f.precedence,a),u.instance=b;case"script":return b=Wl(f.src),(y=a.querySelector(eh(b)))?(u.instance=y,rn(y),y):(m=f,(y=ji.get(b))&&(m=p({},f),_y(m,y)),a=a.ownerDocument||a,y=a.createElement("script"),rn(y),pn(y,"link",m),a.head.appendChild(y),u.instance=y);case"void":return null;default:throw Error(i(443,u.type))}else u.type==="stylesheet"&&(u.state.loading&4)===0&&(m=u.instance,u.state.loading|=4,ap(m,f.precedence,a));return u.instance}function ap(a,u,f){for(var m=f.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),y=m.length?m[m.length-1]:null,b=y,w=0;w<m.length;w++){var E=m[w];if(E.dataset.precedence===u)b=E;else if(b!==y)break}b?b.parentNode.insertBefore(a,b.nextSibling):(u=f.nodeType===9?f.head:f,u.insertBefore(a,u.firstChild))}function Sy(a,u){a.crossOrigin==null&&(a.crossOrigin=u.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=u.referrerPolicy),a.title==null&&(a.title=u.title)}function _y(a,u){a.crossOrigin==null&&(a.crossOrigin=u.crossOrigin),a.referrerPolicy==null&&(a.referrerPolicy=u.referrerPolicy),a.integrity==null&&(a.integrity=u.integrity)}var lp=null;function FP(a,u,f){if(lp===null){var m=new Map,y=lp=new Map;y.set(f,m)}else y=lp,m=y.get(f),m||(m=new Map,y.set(f,m));if(m.has(a))return m;for(m.set(a,null),f=f.getElementsByTagName(a),y=0;y<f.length;y++){var b=f[y];if(!(b[gu]||b[un]||a==="link"&&b.getAttribute("rel")==="stylesheet")&&b.namespaceURI!=="http://www.w3.org/2000/svg"){var w=b.getAttribute(u)||"";w=a+w;var E=m.get(w);E?E.push(b):m.set(w,[b])}}return m}function KP(a,u,f){a=a.ownerDocument||a,a.head.insertBefore(f,u==="title"?a.querySelector("head > title"):null)}function $3(a,u,f){if(f===1||u.itemProp!=null)return!1;switch(a){case"meta":case"title":return!0;case"style":if(typeof u.precedence!="string"||typeof u.href!="string"||u.href==="")break;return!0;case"link":if(typeof u.rel!="string"||typeof u.href!="string"||u.href===""||u.onLoad||u.onError)break;switch(u.rel){case"stylesheet":return a=u.disabled,typeof u.precedence=="string"&&a==null;default:return!0}case"script":if(u.async&&typeof u.async!="function"&&typeof u.async!="symbol"&&!u.onLoad&&!u.onError&&u.src&&typeof u.src=="string")return!0}return!1}function JP(a){return!(a.type==="stylesheet"&&(a.state.loading&3)===0)}function L3(a,u,f,m){if(f.type==="stylesheet"&&(typeof m.media!="string"||matchMedia(m.media).matches!==!1)&&(f.state.loading&4)===0){if(f.instance===null){var y=Gl(m.href),b=u.querySelector(Ju(y));if(b){u=b._p,u!==null&&typeof u=="object"&&typeof u.then=="function"&&(a.count++,a=cp.bind(a),u.then(a,a)),f.state.loading|=4,f.instance=b,rn(b);return}b=u.ownerDocument||u,m=WP(m),(y=ji.get(y))&&Sy(m,y),b=b.createElement("link"),rn(b);var w=b;w._p=new Promise(function(E,z){w.onload=E,w.onerror=z}),pn(b,"link",m),f.instance=b}a.stylesheets===null&&(a.stylesheets=new Map),a.stylesheets.set(f,u),(u=f.state.preload)&&(f.state.loading&3)===0&&(a.count++,f=cp.bind(a),u.addEventListener("load",f),u.addEventListener("error",f))}}var ky=0;function M3(a,u){return a.stylesheets&&a.count===0&&hp(a,a.stylesheets),0<a.count||0<a.imgCount?function(f){var m=setTimeout(function(){if(a.stylesheets&&hp(a,a.stylesheets),a.unsuspend){var b=a.unsuspend;a.unsuspend=null,b()}},6e4+u);0<a.imgBytes&&ky===0&&(ky=62500*m3());var y=setTimeout(function(){if(a.waitingForImages=!1,a.count===0&&(a.stylesheets&&hp(a,a.stylesheets),a.unsuspend)){var b=a.unsuspend;a.unsuspend=null,b()}},(a.imgBytes>ky?50:800)+u);return a.unsuspend=f,function(){a.unsuspend=null,clearTimeout(m),clearTimeout(y)}}:null}function cp(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hp(this,this.stylesheets);else if(this.unsuspend){var a=this.unsuspend;this.unsuspend=null,a()}}}var up=null;function hp(a,u){a.stylesheets=null,a.unsuspend!==null&&(a.count++,up=new Map,u.forEach(D3,a),up=null,cp.call(a))}function D3(a,u){if(!(u.state.loading&4)){var f=up.get(a);if(f)var m=f.get(null);else{f=new Map,up.set(a,f);for(var y=a.querySelectorAll("link[data-precedence],style[data-precedence]"),b=0;b<y.length;b++){var w=y[b];(w.nodeName==="LINK"||w.getAttribute("media")!=="not all")&&(f.set(w.dataset.precedence,w),m=w)}m&&f.set(null,m)}y=u.instance,w=y.getAttribute("data-precedence"),b=f.get(w)||m,b===m&&f.set(null,y),f.set(w,y),this.count++,m=cp.bind(this),y.addEventListener("load",m),y.addEventListener("error",m),b?b.parentNode.insertBefore(y,b.nextSibling):(a=a.nodeType===9?a.head:a,a.insertBefore(y,a.firstChild)),u.state.loading|=4}}var th={$$typeof:Q,Provider:null,Consumer:null,_currentValue:pe,_currentValue2:pe,_threadCount:0};function j3(a,u,f,m,y,b,w,E,z){this.tag=1,this.containerInfo=a,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=bO(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=bO(0),this.hiddenUpdates=bO(null),this.identifierPrefix=m,this.onUncaughtError=y,this.onCaughtError=b,this.onRecoverableError=w,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function eT(a,u,f,m,y,b,w,E,z,H,oe,he){return a=new j3(a,u,f,w,z,H,oe,he,E),u=1,b===!0&&(u|=24),b=ui(3,null,null,u),a.current=b,b.stateNode=a,u=i0(),u.refCount++,a.pooledCache=u,u.refCount++,b.memoizedState={element:m,isDehydrated:f,cache:u},a0(b),a}function tT(a){return a?(a=Pl,a):Pl}function nT(a,u,f,m,y,b){y=tT(y),m.context===null?m.context=y:m.pendingContext=y,m=Ks(u),m.payload={element:f},b=b===void 0?null:b,b!==null&&(m.callback=b),f=Js(a,m,u),f!==null&&(Wn(f,a,u),$u(f,a,u))}function iT(a,u){if(a=a.memoizedState,a!==null&&a.dehydrated!==null){var f=a.retryLane;a.retryLane=f!==0&&f<u?f:u}}function wy(a,u){iT(a,u),(a=a.alternate)&&iT(a,u)}function rT(a){if(a.tag===13||a.tag===31){var u=ra(a,67108864);u!==null&&Wn(u,a,67108864),wy(a,67108864)}}function sT(a){if(a.tag===13||a.tag===31){var u=mi();u=xO(u);var f=ra(a,u);f!==null&&Wn(f,a,u),wy(a,u)}}var fp=!0;function N3(a,u,f,m){var y=q.T;q.T=null;var b=se.p;try{se.p=2,Py(a,u,f,m)}finally{se.p=b,q.T=y}}function z3(a,u,f,m){var y=q.T;q.T=null;var b=se.p;try{se.p=8,Py(a,u,f,m)}finally{se.p=b,q.T=y}}function Py(a,u,f,m){if(fp){var y=Ty(m);if(y===null)fy(a,u,m,dp,f),aT(a,m);else if(X3(y,a,u,f,m))m.stopPropagation();else if(aT(a,m),u&4&&-1<I3.indexOf(a)){for(;y!==null;){var b=ml(y);if(b!==null)switch(b.tag){case 3:if(b=b.stateNode,b.current.memoizedState.isDehydrated){var w=Jo(b.pendingLanes);if(w!==0){var E=b;for(E.pendingLanes|=2,E.entangledLanes|=2;w;){var z=1<<31-bt(w);E.entanglements[1]|=z,w&=~z}xr(b),(ct&6)===0&&(Wd=it()+500,Wu(0))}}break;case 31:case 13:E=ra(b,2),E!==null&&Wn(E,b,2),Fd(),wy(b,2)}if(b=Ty(m),b===null&&fy(a,u,m,dp,f),b===y)break;y=b}y!==null&&m.stopPropagation()}else fy(a,u,m,null,f)}}function Ty(a){return a=CO(a),Qy(a)}var dp=null;function Qy(a){if(dp=null,a=pl(a),a!==null){var u=s(a);if(u===null)a=null;else{var f=u.tag;if(f===13){if(a=o(u),a!==null)return a;a=null}else if(f===31){if(a=l(u),a!==null)return a;a=null}else if(f===3){if(u.stateNode.current.memoizedState.isDehydrated)return u.tag===3?u.stateNode.containerInfo:null;a=null}else u!==a&&(a=null)}}return dp=a,null}function oT(a){switch(a){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(En()){case le:return 2;case Oe:return 8;case Le:case Be:return 32;case ut:return 268435456;default:return 32}default:return 32}}var Cy=!1,uo=null,ho=null,fo=null,nh=new Map,ih=new Map,po=[],I3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function aT(a,u){switch(a){case"focusin":case"focusout":uo=null;break;case"dragenter":case"dragleave":ho=null;break;case"mouseover":case"mouseout":fo=null;break;case"pointerover":case"pointerout":nh.delete(u.pointerId);break;case"gotpointercapture":case"lostpointercapture":ih.delete(u.pointerId)}}function rh(a,u,f,m,y,b){return a===null||a.nativeEvent!==b?(a={blockedOn:u,domEventName:f,eventSystemFlags:m,nativeEvent:b,targetContainers:[y]},u!==null&&(u=ml(u),u!==null&&rT(u)),a):(a.eventSystemFlags|=m,u=a.targetContainers,y!==null&&u.indexOf(y)===-1&&u.push(y),a)}function X3(a,u,f,m,y){switch(u){case"focusin":return uo=rh(uo,a,u,f,m,y),!0;case"dragenter":return ho=rh(ho,a,u,f,m,y),!0;case"mouseover":return fo=rh(fo,a,u,f,m,y),!0;case"pointerover":var b=y.pointerId;return nh.set(b,rh(nh.get(b)||null,a,u,f,m,y)),!0;case"gotpointercapture":return b=y.pointerId,ih.set(b,rh(ih.get(b)||null,a,u,f,m,y)),!0}return!1}function lT(a){var u=pl(a.target);if(u!==null){var f=s(u);if(f!==null){if(u=f.tag,u===13){if(u=o(f),u!==null){a.blockedOn=u,S_(a.priority,function(){sT(f)});return}}else if(u===31){if(u=l(f),u!==null){a.blockedOn=u,S_(a.priority,function(){sT(f)});return}}else if(u===3&&f.stateNode.current.memoizedState.isDehydrated){a.blockedOn=f.tag===3?f.stateNode.containerInfo:null;return}}}a.blockedOn=null}function pp(a){if(a.blockedOn!==null)return!1;for(var u=a.targetContainers;0<u.length;){var f=Ty(a.nativeEvent);if(f===null){f=a.nativeEvent;var m=new f.constructor(f.type,f);QO=m,f.target.dispatchEvent(m),QO=null}else return u=ml(f),u!==null&&rT(u),a.blockedOn=f,!1;u.shift()}return!0}function cT(a,u,f){pp(a)&&f.delete(u)}function V3(){Cy=!1,uo!==null&&pp(uo)&&(uo=null),ho!==null&&pp(ho)&&(ho=null),fo!==null&&pp(fo)&&(fo=null),nh.forEach(cT),ih.forEach(cT)}function mp(a,u){a.blockedOn===u&&(a.blockedOn=null,Cy||(Cy=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,V3)))}var gp=null;function uT(a){gp!==a&&(gp=a,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){gp===a&&(gp=null);for(var u=0;u<a.length;u+=3){var f=a[u],m=a[u+1],y=a[u+2];if(typeof m!="function"){if(Qy(m||f)===null)continue;break}var b=ml(f);b!==null&&(a.splice(u,3),u-=3,T0(b,{pending:!0,data:y,method:f.method,action:m},m,y))}}))}function Hl(a){function u(z){return mp(z,a)}uo!==null&&mp(uo,a),ho!==null&&mp(ho,a),fo!==null&&mp(fo,a),nh.forEach(u),ih.forEach(u);for(var f=0;f<po.length;f++){var m=po[f];m.blockedOn===a&&(m.blockedOn=null)}for(;0<po.length&&(f=po[0],f.blockedOn===null);)lT(f),f.blockedOn===null&&po.shift();if(f=(a.ownerDocument||a).$$reactFormReplay,f!=null)for(m=0;m<f.length;m+=3){var y=f[m],b=f[m+1],w=y[Bn]||null;if(typeof b=="function")w||uT(f);else if(w){var E=null;if(b&&b.hasAttribute("formAction")){if(y=b,w=b[Bn]||null)E=w.formAction;else if(Qy(y)!==null)continue}else E=w.action;typeof E=="function"?f[m+1]=E:(f.splice(m,3),m-=3),uT(f)}}}function hT(){function a(b){b.canIntercept&&b.info==="react-transition"&&b.intercept({handler:function(){return new Promise(function(w){return y=w})},focusReset:"manual",scroll:"manual"})}function u(){y!==null&&(y(),y=null),m||setTimeout(f,20)}function f(){if(!m&&!navigation.transition){var b=navigation.currentEntry;b&&b.url!=null&&navigation.navigate(b.url,{state:b.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var m=!1,y=null;return navigation.addEventListener("navigate",a),navigation.addEventListener("navigatesuccess",u),navigation.addEventListener("navigateerror",u),setTimeout(f,100),function(){m=!0,navigation.removeEventListener("navigate",a),navigation.removeEventListener("navigatesuccess",u),navigation.removeEventListener("navigateerror",u),y!==null&&(y(),y=null)}}}function Ey(a){this._internalRoot=a}Op.prototype.render=Ey.prototype.render=function(a){var u=this._internalRoot;if(u===null)throw Error(i(409));var f=u.current,m=mi();nT(f,m,a,u,null,null)},Op.prototype.unmount=Ey.prototype.unmount=function(){var a=this._internalRoot;if(a!==null){this._internalRoot=null;var u=a.containerInfo;nT(a.current,2,null,a,null,null),Fd(),u[dl]=null}};function Op(a){this._internalRoot=a}Op.prototype.unstable_scheduleHydration=function(a){if(a){var u=v_();a={blockedOn:null,target:a,priority:u};for(var f=0;f<po.length&&u!==0&&u<po[f].priority;f++);po.splice(f,0,a),f===0&&lT(a)}};var fT=e.version;if(fT!=="19.2.0")throw Error(i(527,fT,"19.2.0"));se.findDOMNode=function(a){var u=a._reactInternals;if(u===void 0)throw typeof a.render=="function"?Error(i(188)):(a=Object.keys(a).join(","),Error(i(268,a)));return a=h(u),a=a!==null?d(a):null,a=a===null?null:a.stateNode,a};var B3={bundleType:0,version:"19.2.0",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.0"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var yp=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yp.isDisabled&&yp.supportsFiber)try{An=yp.inject(B3),Ft=yp}catch{}}return oh.createRoot=function(a,u){if(!r(a))throw Error(i(299));var f=!1,m="",y=bw,b=xw,w=vw;return u!=null&&(u.unstable_strictMode===!0&&(f=!0),u.identifierPrefix!==void 0&&(m=u.identifierPrefix),u.onUncaughtError!==void 0&&(y=u.onUncaughtError),u.onCaughtError!==void 0&&(b=u.onCaughtError),u.onRecoverableError!==void 0&&(w=u.onRecoverableError)),u=eT(a,1,!1,null,null,f,m,null,y,b,w,hT),a[dl]=u.current,hy(a),new Ey(u)},oh.hydrateRoot=function(a,u,f){if(!r(a))throw Error(i(299));var m=!1,y="",b=bw,w=xw,E=vw,z=null;return f!=null&&(f.unstable_strictMode===!0&&(m=!0),f.identifierPrefix!==void 0&&(y=f.identifierPrefix),f.onUncaughtError!==void 0&&(b=f.onUncaughtError),f.onCaughtError!==void 0&&(w=f.onCaughtError),f.onRecoverableError!==void 0&&(E=f.onRecoverableError),f.formState!==void 0&&(z=f.formState)),u=eT(a,1,!0,u,f??null,m,y,z,b,w,E,hT),u.context=tT(null),f=u.current,m=mi(),m=xO(m),y=Ks(m),y.callback=null,Js(f,y,m),f=m,u.current.lanes=f,mu(u,f),xr(u),a[dl]=u.current,hy(a),new Op(u)},oh.version="19.2.0",oh}var _T;function eI(){if(_T)return $y.exports;_T=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(e){console.error(e)}}return t(),$y.exports=J3(),$y.exports}var tI=eI(),nu=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},nI={setTimeout:(t,e)=>setTimeout(t,e),clearTimeout:t=>clearTimeout(t),setInterval:(t,e)=>setInterval(t,e),clearInterval:t=>clearInterval(t)},So,gv,b2,iI=(b2=class{constructor(){Ee(this,So,nI);Ee(this,gv,!1)}setTimeoutProvider(t){_e(this,So,t)}setTimeout(t,e){return I(this,So).setTimeout(t,e)}clearTimeout(t){I(this,So).clearTimeout(t)}setInterval(t,e){return I(this,So).setInterval(t,e)}clearInterval(t){I(this,So).clearInterval(t)}},So=new WeakMap,gv=new WeakMap,b2),Ta=new iI;function rI(t){setTimeout(t,0)}var Ua=typeof window>"u"||"Deno"in globalThis;function Mn(){}function sI(t,e){return typeof t=="function"?t(e):t}function gx(t){return typeof t=="number"&&t>=0&&t!==1/0}function A2(t,e){return Math.max(t+(e||0)-Date.now(),0)}function Mo(t,e){return typeof t=="function"?t(e):t}function Xi(t,e){return typeof t=="function"?t(e):t}function kT(t,e){const{type:n="all",exact:i,fetchStatus:r,predicate:s,queryKey:o,stale:l}=t;if(o){if(i){if(e.queryHash!==yv(o,e.options))return!1}else if(!Kh(e.queryKey,o))return!1}if(n!=="all"){const c=e.isActive();if(n==="active"&&!c||n==="inactive"&&c)return!1}return!(typeof l=="boolean"&&e.isStale()!==l||r&&r!==e.state.fetchStatus||s&&!s(e))}function wT(t,e){const{exact:n,status:i,predicate:r,mutationKey:s}=t;if(s){if(!e.options.mutationKey)return!1;if(n){if(Ya(e.options.mutationKey)!==Ya(s))return!1}else if(!Kh(e.options.mutationKey,s))return!1}return!(i&&e.state.status!==i||r&&!r(e))}function yv(t,e){return((e==null?void 0:e.queryKeyHashFn)||Ya)(t)}function Ya(t){return JSON.stringify(t,(e,n)=>Ox(n)?Object.keys(n).sort().reduce((i,r)=>(i[r]=n[r],i),{}):n)}function Kh(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?Object.keys(e).every(n=>Kh(t[n],e[n])):!1}var oI=Object.prototype.hasOwnProperty;function R2(t,e){if(t===e)return t;const n=PT(t)&&PT(e);if(!n&&!(Ox(t)&&Ox(e)))return e;const r=(n?t:Object.keys(t)).length,s=n?e:Object.keys(e),o=s.length,l=n?new Array(o):{};let c=0;for(let h=0;h<o;h++){const d=n?h:s[h],p=t[d],g=e[d];if(p===g){l[d]=p,(n?h<r:oI.call(t,d))&&c++;continue}if(p===null||g===null||typeof p!="object"||typeof g!="object"){l[d]=g;continue}const O=R2(p,g);l[d]=O,O===p&&c++}return r===o&&c===r?t:l}function Em(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const n in t)if(t[n]!==e[n])return!1;return!0}function PT(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Ox(t){if(!TT(t))return!1;const e=t.constructor;if(e===void 0)return!0;const n=e.prototype;return!(!TT(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function TT(t){return Object.prototype.toString.call(t)==="[object Object]"}function aI(t){return new Promise(e=>{Ta.setTimeout(e,t)})}function yx(t,e,n){return typeof n.structuralSharing=="function"?n.structuralSharing(t,e):n.structuralSharing!==!1?R2(t,e):e}function lI(t,e,n=0){const i=[...t,e];return n&&i.length>n?i.slice(1):i}function cI(t,e,n=0){const i=[e,...t];return n&&i.length>n?i.slice(0,-1):i}var As=Symbol();function $2(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===As?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}function L2(t,e){return typeof t=="function"?t(...e):!!t}var Ra,_o,Pc,x2,uI=(x2=class extends nu{constructor(){super();Ee(this,Ra);Ee(this,_o);Ee(this,Pc);_e(this,Pc,e=>{if(!Ua&&window.addEventListener){const n=()=>e();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){I(this,_o)||this.setEventListener(I(this,Pc))}onUnsubscribe(){var e;this.hasListeners()||((e=I(this,_o))==null||e.call(this),_e(this,_o,void 0))}setEventListener(e){var n;_e(this,Pc,e),(n=I(this,_o))==null||n.call(this),_e(this,_o,e(i=>{typeof i=="boolean"?this.setFocused(i):this.onFocus()}))}setFocused(e){I(this,Ra)!==e&&(_e(this,Ra,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(n=>{n(e)})}isFocused(){var e;return typeof I(this,Ra)=="boolean"?I(this,Ra):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},Ra=new WeakMap,_o=new WeakMap,Pc=new WeakMap,x2),bv=new uI;function bx(){let t,e;const n=new Promise((r,s)=>{t=r,e=s});n.status="pending",n.catch(()=>{});function i(r){Object.assign(n,r),delete n.resolve,delete n.reject}return n.resolve=r=>{i({status:"fulfilled",value:r}),t(r)},n.reject=r=>{i({status:"rejected",reason:r}),e(r)},n}var hI=rI;function fI(){let t=[],e=0,n=l=>{l()},i=l=>{l()},r=hI;const s=l=>{e?t.push(l):r(()=>{n(l)})},o=()=>{const l=t;t=[],l.length&&r(()=>{i(()=>{l.forEach(c=>{n(c)})})})};return{batch:l=>{let c;e++;try{c=l()}finally{e--,e||o()}return c},batchCalls:l=>(...c)=>{s(()=>{l(...c)})},schedule:s,setNotifyFunction:l=>{n=l},setBatchNotifyFunction:l=>{i=l},setScheduler:l=>{r=l}}}var tn=fI(),Tc,ko,Qc,v2,dI=(v2=class extends nu{constructor(){super();Ee(this,Tc,!0);Ee(this,ko);Ee(this,Qc);_e(this,Qc,e=>{if(!Ua&&window.addEventListener){const n=()=>e(!0),i=()=>e(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",i,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",i)}}})}onSubscribe(){I(this,ko)||this.setEventListener(I(this,Qc))}onUnsubscribe(){var e;this.hasListeners()||((e=I(this,ko))==null||e.call(this),_e(this,ko,void 0))}setEventListener(e){var n;_e(this,Qc,e),(n=I(this,ko))==null||n.call(this),_e(this,ko,e(this.setOnline.bind(this)))}setOnline(e){I(this,Tc)!==e&&(_e(this,Tc,e),this.listeners.forEach(i=>{i(e)}))}isOnline(){return I(this,Tc)}},Tc=new WeakMap,ko=new WeakMap,Qc=new WeakMap,v2),Am=new dI;function pI(t){return Math.min(1e3*2**t,3e4)}function M2(t){return(t??"online")==="online"?Am.isOnline():!0}var xx=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function D2(t){let e=!1,n=0,i;const r=bx(),s=()=>r.status!=="pending",o=S=>{var _;if(!s()){const k=new xx(S);g(k),(_=t.onCancel)==null||_.call(t,k)}},l=()=>{e=!0},c=()=>{e=!1},h=()=>bv.isFocused()&&(t.networkMode==="always"||Am.isOnline())&&t.canRun(),d=()=>M2(t.networkMode)&&t.canRun(),p=S=>{s()||(i==null||i(),r.resolve(S))},g=S=>{s()||(i==null||i(),r.reject(S))},O=()=>new Promise(S=>{var _;i=k=>{(s()||h())&&S(k)},(_=t.onPause)==null||_.call(t)}).then(()=>{var S;i=void 0,s()||(S=t.onContinue)==null||S.call(t)}),x=()=>{if(s())return;let S;const _=n===0?t.initialPromise:void 0;try{S=_??t.fn()}catch(k){S=Promise.reject(k)}Promise.resolve(S).then(p).catch(k=>{var C;if(s())return;const P=t.retry??(Ua?0:3),Q=t.retryDelay??pI,R=typeof Q=="function"?Q(n,k):Q,$=P===!0||typeof P=="number"&&n<P||typeof P=="function"&&P(n,k);if(e||!$){g(k);return}n++,(C=t.onFail)==null||C.call(t,n,k),aI(R).then(()=>h()?void 0:O()).then(()=>{e?g(k):x()})})};return{promise:r,status:()=>r.status,cancel:o,continue:()=>(i==null||i(),r),cancelRetry:l,continueRetry:c,canStart:d,start:()=>(d()?x():O().then(x),r)}}var $a,S2,j2=(S2=class{constructor(){Ee(this,$a)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),gx(this.gcTime)&&_e(this,$a,Ta.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(Ua?1/0:300*1e3))}clearGcTimeout(){I(this,$a)&&(Ta.clearTimeout(I(this,$a)),_e(this,$a,void 0))}},$a=new WeakMap,S2),La,Cc,Ii,Ma,on,Df,Da,ar,Os,_2,mI=(_2=class extends j2{constructor(e){super();Ee(this,ar);Ee(this,La);Ee(this,Cc);Ee(this,Ii);Ee(this,Ma);Ee(this,on);Ee(this,Df);Ee(this,Da);_e(this,Da,!1),_e(this,Df,e.defaultOptions),this.setOptions(e.options),this.observers=[],_e(this,Ma,e.client),_e(this,Ii,I(this,Ma).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,_e(this,La,CT(this.options)),this.state=e.state??I(this,La),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=I(this,on))==null?void 0:e.promise}setOptions(e){if(this.options={...I(this,Df),...e},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=CT(this.options);n.data!==void 0&&(this.setState(QT(n.data,n.dataUpdatedAt)),_e(this,La,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,Ii).remove(this)}setData(e,n){const i=yx(this.state.data,e,this.options);return Xe(this,ar,Os).call(this,{data:i,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),i}setState(e,n){Xe(this,ar,Os).call(this,{type:"setState",state:e,setStateOptions:n})}cancel(e){var i,r;const n=(i=I(this,on))==null?void 0:i.promise;return(r=I(this,on))==null||r.cancel(e),n?n.then(Mn).catch(Mn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(I(this,La))}isActive(){return this.observers.some(e=>Xi(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===As||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStatic(){return this.getObserversCount()>0?this.observers.some(e=>Mo(e.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(e=0){return this.state.data===void 0?!0:e==="static"?!1:this.state.isInvalidated?!0:!A2(this.state.dataUpdatedAt,e)}onFocus(){var n;const e=this.observers.find(i=>i.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(n=I(this,on))==null||n.continue()}onOnline(){var n;const e=this.observers.find(i=>i.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(n=I(this,on))==null||n.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),I(this,Ii).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(n=>n!==e),this.observers.length||(I(this,on)&&(I(this,Da)?I(this,on).cancel({revert:!0}):I(this,on).cancelRetry()),this.scheduleGc()),I(this,Ii).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Xe(this,ar,Os).call(this,{type:"invalidate"})}async fetch(e,n){var c,h,d,p,g,O,x,S,_,k,P,Q;if(this.state.fetchStatus!=="idle"&&((c=I(this,on))==null?void 0:c.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(I(this,on))return I(this,on).continueRetry(),I(this,on).promise}if(e&&this.setOptions(e),!this.options.queryFn){const R=this.observers.find($=>$.options.queryFn);R&&this.setOptions(R.options)}const i=new AbortController,r=R=>{Object.defineProperty(R,"signal",{enumerable:!0,get:()=>(_e(this,Da,!0),i.signal)})},s=()=>{const R=$2(this.options,n),C=(()=>{const D={client:I(this,Ma),queryKey:this.queryKey,meta:this.meta};return r(D),D})();return _e(this,Da,!1),this.options.persister?this.options.persister(R,C,this):R(C)},l=(()=>{const R={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:I(this,Ma),state:this.state,fetchFn:s};return r(R),R})();(h=this.options.behavior)==null||h.onFetch(l,this),_e(this,Cc,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((d=l.fetchOptions)==null?void 0:d.meta))&&Xe(this,ar,Os).call(this,{type:"fetch",meta:(p=l.fetchOptions)==null?void 0:p.meta}),_e(this,on,D2({initialPromise:n==null?void 0:n.initialPromise,fn:l.fetchFn,onCancel:R=>{R instanceof xx&&R.revert&&this.setState({...I(this,Cc),fetchStatus:"idle"}),i.abort()},onFail:(R,$)=>{Xe(this,ar,Os).call(this,{type:"failed",failureCount:R,error:$})},onPause:()=>{Xe(this,ar,Os).call(this,{type:"pause"})},onContinue:()=>{Xe(this,ar,Os).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0}));try{const R=await I(this,on).start();if(R===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(R),(O=(g=I(this,Ii).config).onSuccess)==null||O.call(g,R,this),(S=(x=I(this,Ii).config).onSettled)==null||S.call(x,R,this.state.error,this),R}catch(R){if(R instanceof xx){if(R.silent)return I(this,on).promise;if(R.revert){if(this.state.data===void 0)throw R;return this.state.data}}throw Xe(this,ar,Os).call(this,{type:"error",error:R}),(k=(_=I(this,Ii).config).onError)==null||k.call(_,R,this),(Q=(P=I(this,Ii).config).onSettled)==null||Q.call(P,this.state.data,R,this),R}finally{this.scheduleGc()}}},La=new WeakMap,Cc=new WeakMap,Ii=new WeakMap,Ma=new WeakMap,on=new WeakMap,Df=new WeakMap,Da=new WeakMap,ar=new WeakSet,Os=function(e){const n=i=>{switch(e.type){case"failed":return{...i,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...i,fetchStatus:"paused"};case"continue":return{...i,fetchStatus:"fetching"};case"fetch":return{...i,...N2(i.data,this.options),fetchMeta:e.meta??null};case"success":const r={...i,...QT(e.data,e.dataUpdatedAt),dataUpdateCount:i.dataUpdateCount+1,...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return _e(this,Cc,e.manual?r:void 0),r;case"error":const s=e.error;return{...i,error:s,errorUpdateCount:i.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:i.fetchFailureCount+1,fetchFailureReason:s,fetchStatus:"idle",status:"error"};case"invalidate":return{...i,isInvalidated:!0};case"setState":return{...i,...e.state}}};this.state=n(this.state),tn.batch(()=>{this.observers.forEach(i=>{i.onQueryUpdate()}),I(this,Ii).notify({query:this,type:"updated",action:e})})},_2);function N2(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:M2(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function QT(t,e){return{data:t,dataUpdatedAt:e??Date.now(),error:null,isInvalidated:!1,status:"success"}}function CT(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,n=e!==void 0,i=n?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,dataUpdateCount:0,dataUpdatedAt:n?i??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Kn,Je,jf,$n,ja,Ec,bs,wo,Nf,Ac,Rc,Na,za,Po,$c,ht,kh,vx,Sx,_x,kx,wx,Px,Tx,z2,k2,gI=(k2=class extends nu{constructor(e,n){super();Ee(this,ht);Ee(this,Kn);Ee(this,Je);Ee(this,jf);Ee(this,$n);Ee(this,ja);Ee(this,Ec);Ee(this,bs);Ee(this,wo);Ee(this,Nf);Ee(this,Ac);Ee(this,Rc);Ee(this,Na);Ee(this,za);Ee(this,Po);Ee(this,$c,new Set);this.options=n,_e(this,Kn,e),_e(this,wo,null),_e(this,bs,bx()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,Je).addObserver(this),ET(I(this,Je),this.options)?Xe(this,ht,kh).call(this):this.updateResult(),Xe(this,ht,kx).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Qx(I(this,Je),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Qx(I(this,Je),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Xe(this,ht,wx).call(this),Xe(this,ht,Px).call(this),I(this,Je).removeObserver(this)}setOptions(e){const n=this.options,i=I(this,Je);if(this.options=I(this,Kn).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof Xi(this.options.enabled,I(this,Je))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Xe(this,ht,Tx).call(this),I(this,Je).setOptions(this.options),n._defaulted&&!Em(this.options,n)&&I(this,Kn).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,Je),observer:this});const r=this.hasListeners();r&&AT(I(this,Je),i,this.options,n)&&Xe(this,ht,kh).call(this),this.updateResult(),r&&(I(this,Je)!==i||Xi(this.options.enabled,I(this,Je))!==Xi(n.enabled,I(this,Je))||Mo(this.options.staleTime,I(this,Je))!==Mo(n.staleTime,I(this,Je)))&&Xe(this,ht,vx).call(this);const s=Xe(this,ht,Sx).call(this);r&&(I(this,Je)!==i||Xi(this.options.enabled,I(this,Je))!==Xi(n.enabled,I(this,Je))||s!==I(this,Po))&&Xe(this,ht,_x).call(this,s)}getOptimisticResult(e){const n=I(this,Kn).getQueryCache().build(I(this,Kn),e),i=this.createResult(n,e);return yI(this,i)&&(_e(this,$n,i),_e(this,Ec,this.options),_e(this,ja,I(this,Je).state)),i}getCurrentResult(){return I(this,$n)}trackResult(e,n){return new Proxy(e,{get:(i,r)=>(this.trackProp(r),n==null||n(r),r==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,bs).status==="pending"&&I(this,bs).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(i,r))})}trackProp(e){I(this,$c).add(e)}getCurrentQuery(){return I(this,Je)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){const n=I(this,Kn).defaultQueryOptions(e),i=I(this,Kn).getQueryCache().build(I(this,Kn),n);return i.fetch().then(()=>this.createResult(i,n))}fetch(e){return Xe(this,ht,kh).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,$n)))}createResult(e,n){var U;const i=I(this,Je),r=this.options,s=I(this,$n),o=I(this,ja),l=I(this,Ec),h=e!==i?e.state:I(this,jf),{state:d}=e;let p={...d},g=!1,O;if(n._optimisticResults){const M=this.hasListeners(),V=!M&&ET(e,n),G=M&&AT(e,i,n,r);(V||G)&&(p={...p,...N2(d.data,e.options)}),n._optimisticResults==="isRestoring"&&(p.fetchStatus="idle")}let{error:x,errorUpdatedAt:S,status:_}=p;O=p.data;let k=!1;if(n.placeholderData!==void 0&&O===void 0&&_==="pending"){let M;s!=null&&s.isPlaceholderData&&n.placeholderData===(l==null?void 0:l.placeholderData)?(M=s.data,k=!0):M=typeof n.placeholderData=="function"?n.placeholderData((U=I(this,Rc))==null?void 0:U.state.data,I(this,Rc)):n.placeholderData,M!==void 0&&(_="success",O=yx(s==null?void 0:s.data,M,n),g=!0)}if(n.select&&O!==void 0&&!k)if(s&&O===(o==null?void 0:o.data)&&n.select===I(this,Nf))O=I(this,Ac);else try{_e(this,Nf,n.select),O=n.select(O),O=yx(s==null?void 0:s.data,O,n),_e(this,Ac,O),_e(this,wo,null)}catch(M){_e(this,wo,M)}I(this,wo)&&(x=I(this,wo),O=I(this,Ac),S=Date.now(),_="error");const P=p.fetchStatus==="fetching",Q=_==="pending",R=_==="error",$=Q&&P,C=O!==void 0,Z={status:_,fetchStatus:p.fetchStatus,isPending:Q,isSuccess:_==="success",isError:R,isInitialLoading:$,isLoading:$,data:O,dataUpdatedAt:p.dataUpdatedAt,error:x,errorUpdatedAt:S,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:p.dataUpdateCount>0||p.errorUpdateCount>0,isFetchedAfterMount:p.dataUpdateCount>h.dataUpdateCount||p.errorUpdateCount>h.errorUpdateCount,isFetching:P,isRefetching:P&&!Q,isLoadingError:R&&!C,isPaused:p.fetchStatus==="paused",isPlaceholderData:g,isRefetchError:R&&C,isStale:xv(e,n),refetch:this.refetch,promise:I(this,bs),isEnabled:Xi(n.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){const M=J=>{Z.status==="error"?J.reject(Z.error):Z.data!==void 0&&J.resolve(Z.data)},V=()=>{const J=_e(this,bs,Z.promise=bx());M(J)},G=I(this,bs);switch(G.status){case"pending":e.queryHash===i.queryHash&&M(G);break;case"fulfilled":(Z.status==="error"||Z.data!==G.value)&&V();break;case"rejected":(Z.status!=="error"||Z.error!==G.reason)&&V();break}}return Z}updateResult(){const e=I(this,$n),n=this.createResult(I(this,Je),this.options);if(_e(this,ja,I(this,Je).state),_e(this,Ec,this.options),I(this,ja).data!==void 0&&_e(this,Rc,I(this,Je)),Em(n,e))return;_e(this,$n,n);const i=()=>{if(!e)return!0;const{notifyOnChangeProps:r}=this.options,s=typeof r=="function"?r():r;if(s==="all"||!s&&!I(this,$c).size)return!0;const o=new Set(s??I(this,$c));return this.options.throwOnError&&o.add("error"),Object.keys(I(this,$n)).some(l=>{const c=l;return I(this,$n)[c]!==e[c]&&o.has(c)})};Xe(this,ht,z2).call(this,{listeners:i()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Xe(this,ht,kx).call(this)}},Kn=new WeakMap,Je=new WeakMap,jf=new WeakMap,$n=new WeakMap,ja=new WeakMap,Ec=new WeakMap,bs=new WeakMap,wo=new WeakMap,Nf=new WeakMap,Ac=new WeakMap,Rc=new WeakMap,Na=new WeakMap,za=new WeakMap,Po=new WeakMap,$c=new WeakMap,ht=new WeakSet,kh=function(e){Xe(this,ht,Tx).call(this);let n=I(this,Je).fetch(this.options,e);return e!=null&&e.throwOnError||(n=n.catch(Mn)),n},vx=function(){Xe(this,ht,wx).call(this);const e=Mo(this.options.staleTime,I(this,Je));if(Ua||I(this,$n).isStale||!gx(e))return;const i=A2(I(this,$n).dataUpdatedAt,e)+1;_e(this,Na,Ta.setTimeout(()=>{I(this,$n).isStale||this.updateResult()},i))},Sx=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,Je)):this.options.refetchInterval)??!1},_x=function(e){Xe(this,ht,Px).call(this),_e(this,Po,e),!(Ua||Xi(this.options.enabled,I(this,Je))===!1||!gx(I(this,Po))||I(this,Po)===0)&&_e(this,za,Ta.setInterval(()=>{(this.options.refetchIntervalInBackground||bv.isFocused())&&Xe(this,ht,kh).call(this)},I(this,Po)))},kx=function(){Xe(this,ht,vx).call(this),Xe(this,ht,_x).call(this,Xe(this,ht,Sx).call(this))},wx=function(){I(this,Na)&&(Ta.clearTimeout(I(this,Na)),_e(this,Na,void 0))},Px=function(){I(this,za)&&(Ta.clearInterval(I(this,za)),_e(this,za,void 0))},Tx=function(){const e=I(this,Kn).getQueryCache().build(I(this,Kn),this.options);if(e===I(this,Je))return;const n=I(this,Je);_e(this,Je,e),_e(this,jf,e.state),this.hasListeners()&&(n==null||n.removeObserver(this),e.addObserver(this))},z2=function(e){tn.batch(()=>{e.listeners&&this.listeners.forEach(n=>{n(I(this,$n))}),I(this,Kn).getQueryCache().notify({query:I(this,Je),type:"observerResultsUpdated"})})},k2);function OI(t,e){return Xi(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function ET(t,e){return OI(t,e)||t.state.data!==void 0&&Qx(t,e,e.refetchOnMount)}function Qx(t,e,n){if(Xi(e.enabled,t)!==!1&&Mo(e.staleTime,t)!=="static"){const i=typeof n=="function"?n(t):n;return i==="always"||i!==!1&&xv(t,e)}return!1}function AT(t,e,n,i){return(t!==e||Xi(i.enabled,t)===!1)&&(!n.suspense||t.state.status!=="error")&&xv(t,n)}function xv(t,e){return Xi(e.enabled,t)!==!1&&t.isStaleByTime(Mo(e.staleTime,t))}function yI(t,e){return!Em(t.getCurrentResult(),e)}function RT(t){return{onFetch:(e,n)=>{var d,p,g,O,x;const i=e.options,r=(g=(p=(d=e.fetchOptions)==null?void 0:d.meta)==null?void 0:p.fetchMore)==null?void 0:g.direction,s=((O=e.state.data)==null?void 0:O.pages)||[],o=((x=e.state.data)==null?void 0:x.pageParams)||[];let l={pages:[],pageParams:[]},c=0;const h=async()=>{let S=!1;const _=Q=>{Object.defineProperty(Q,"signal",{enumerable:!0,get:()=>(e.signal.aborted?S=!0:e.signal.addEventListener("abort",()=>{S=!0}),e.signal)})},k=$2(e.options,e.fetchOptions),P=async(Q,R,$)=>{if(S)return Promise.reject();if(R==null&&Q.pages.length)return Promise.resolve(Q);const D=(()=>{const V={client:e.client,queryKey:e.queryKey,pageParam:R,direction:$?"backward":"forward",meta:e.options.meta};return _(V),V})(),Z=await k(D),{maxPages:U}=e.options,M=$?cI:lI;return{pages:M(Q.pages,Z,U),pageParams:M(Q.pageParams,R,U)}};if(r&&s.length){const Q=r==="backward",R=Q?bI:$T,$={pages:s,pageParams:o},C=R(i,$);l=await P($,C,Q)}else{const Q=t??s.length;do{const R=c===0?o[0]??i.initialPageParam:$T(i,l);if(c>0&&R==null)break;l=await P(l,R),c++}while(c<Q)}return l};e.options.persister?e.fetchFn=()=>{var S,_;return(_=(S=e.options).persister)==null?void 0:_.call(S,h,{client:e.client,queryKey:e.queryKey,meta:e.options.meta,signal:e.signal},n)}:e.fetchFn=h}}}function $T(t,{pages:e,pageParams:n}){const i=e.length-1;return e.length>0?t.getNextPageParam(e[i],e,n[i],n):void 0}function bI(t,{pages:e,pageParams:n}){var i;return e.length>0?(i=t.getPreviousPageParam)==null?void 0:i.call(t,e[0],e,n[0],n):void 0}var zf,Qr,Ln,Ia,Cr,yo,w2,xI=(w2=class extends j2{constructor(e){super();Ee(this,Cr);Ee(this,zf);Ee(this,Qr);Ee(this,Ln);Ee(this,Ia);_e(this,zf,e.client),this.mutationId=e.mutationId,_e(this,Ln,e.mutationCache),_e(this,Qr,[]),this.state=e.state||I2(),this.setOptions(e.options),this.scheduleGc()}setOptions(e){this.options=e,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(e){I(this,Qr).includes(e)||(I(this,Qr).push(e),this.clearGcTimeout(),I(this,Ln).notify({type:"observerAdded",mutation:this,observer:e}))}removeObserver(e){_e(this,Qr,I(this,Qr).filter(n=>n!==e)),this.scheduleGc(),I(this,Ln).notify({type:"observerRemoved",mutation:this,observer:e})}optionalRemove(){I(this,Qr).length||(this.state.status==="pending"?this.scheduleGc():I(this,Ln).remove(this))}continue(){var e;return((e=I(this,Ia))==null?void 0:e.continue())??this.execute(this.state.variables)}async execute(e){var o,l,c,h,d,p,g,O,x,S,_,k,P,Q,R,$,C,D,Z,U;const n=()=>{Xe(this,Cr,yo).call(this,{type:"continue"})},i={client:I(this,zf),meta:this.options.meta,mutationKey:this.options.mutationKey};_e(this,Ia,D2({fn:()=>this.options.mutationFn?this.options.mutationFn(e,i):Promise.reject(new Error("No mutationFn found")),onFail:(M,V)=>{Xe(this,Cr,yo).call(this,{type:"failed",failureCount:M,error:V})},onPause:()=>{Xe(this,Cr,yo).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,Ln).canRun(this)}));const r=this.state.status==="pending",s=!I(this,Ia).canStart();try{if(r)n();else{Xe(this,Cr,yo).call(this,{type:"pending",variables:e,isPaused:s}),await((l=(o=I(this,Ln).config).onMutate)==null?void 0:l.call(o,e,this,i));const V=await((h=(c=this.options).onMutate)==null?void 0:h.call(c,e,i));V!==this.state.context&&Xe(this,Cr,yo).call(this,{type:"pending",context:V,variables:e,isPaused:s})}const M=await I(this,Ia).start();return await((p=(d=I(this,Ln).config).onSuccess)==null?void 0:p.call(d,M,e,this.state.context,this,i)),await((O=(g=this.options).onSuccess)==null?void 0:O.call(g,M,e,this.state.context,i)),await((S=(x=I(this,Ln).config).onSettled)==null?void 0:S.call(x,M,null,this.state.variables,this.state.context,this,i)),await((k=(_=this.options).onSettled)==null?void 0:k.call(_,M,null,e,this.state.context,i)),Xe(this,Cr,yo).call(this,{type:"success",data:M}),M}catch(M){try{throw await((Q=(P=I(this,Ln).config).onError)==null?void 0:Q.call(P,M,e,this.state.context,this,i)),await(($=(R=this.options).onError)==null?void 0:$.call(R,M,e,this.state.context,i)),await((D=(C=I(this,Ln).config).onSettled)==null?void 0:D.call(C,void 0,M,this.state.variables,this.state.context,this,i)),await((U=(Z=this.options).onSettled)==null?void 0:U.call(Z,void 0,M,e,this.state.context,i)),M}finally{Xe(this,Cr,yo).call(this,{type:"error",error:M})}}finally{I(this,Ln).runNext(this)}}},zf=new WeakMap,Qr=new WeakMap,Ln=new WeakMap,Ia=new WeakMap,Cr=new WeakSet,yo=function(e){const n=i=>{switch(e.type){case"failed":return{...i,failureCount:e.failureCount,failureReason:e.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:e.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:e.isPaused,status:"pending",variables:e.variables,submittedAt:Date.now()};case"success":return{...i,data:e.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:e.error,failureCount:i.failureCount+1,failureReason:e.error,isPaused:!1,status:"error"}}};this.state=n(this.state),tn.batch(()=>{I(this,Qr).forEach(i=>{i.onMutationUpdate(e)}),I(this,Ln).notify({mutation:this,type:"updated",action:e})})},w2);function I2(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var xs,lr,If,P2,vI=(P2=class extends nu{constructor(e={}){super();Ee(this,xs);Ee(this,lr);Ee(this,If);this.config=e,_e(this,xs,new Set),_e(this,lr,new Map),_e(this,If,0)}build(e,n,i){const r=new xI({client:e,mutationCache:this,mutationId:++bp(this,If)._,options:e.defaultMutationOptions(n),state:i});return this.add(r),r}add(e){I(this,xs).add(e);const n=xp(e);if(typeof n=="string"){const i=I(this,lr).get(n);i?i.push(e):I(this,lr).set(n,[e])}this.notify({type:"added",mutation:e})}remove(e){if(I(this,xs).delete(e)){const n=xp(e);if(typeof n=="string"){const i=I(this,lr).get(n);if(i)if(i.length>1){const r=i.indexOf(e);r!==-1&&i.splice(r,1)}else i[0]===e&&I(this,lr).delete(n)}}this.notify({type:"removed",mutation:e})}canRun(e){const n=xp(e);if(typeof n=="string"){const i=I(this,lr).get(n),r=i==null?void 0:i.find(s=>s.state.status==="pending");return!r||r===e}else return!0}runNext(e){var i;const n=xp(e);if(typeof n=="string"){const r=(i=I(this,lr).get(n))==null?void 0:i.find(s=>s!==e&&s.state.isPaused);return(r==null?void 0:r.continue())??Promise.resolve()}else return Promise.resolve()}clear(){tn.batch(()=>{I(this,xs).forEach(e=>{this.notify({type:"removed",mutation:e})}),I(this,xs).clear(),I(this,lr).clear()})}getAll(){return Array.from(I(this,xs))}find(e){const n={exact:!0,...e};return this.getAll().find(i=>wT(n,i))}findAll(e={}){return this.getAll().filter(n=>wT(e,n))}notify(e){tn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}resumePausedMutations(){const e=this.getAll().filter(n=>n.state.isPaused);return tn.batch(()=>Promise.all(e.map(n=>n.continue().catch(Mn))))}},xs=new WeakMap,lr=new WeakMap,If=new WeakMap,P2);function xp(t){var e;return(e=t.options.scope)==null?void 0:e.id}var vs,To,Jn,Ss,Es,um,Cx,T2,SI=(T2=class extends nu{constructor(n,i){super();Ee(this,Es);Ee(this,vs);Ee(this,To);Ee(this,Jn);Ee(this,Ss);_e(this,vs,n),this.setOptions(i),this.bindMethods(),Xe(this,Es,um).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var r;const i=this.options;this.options=I(this,vs).defaultMutationOptions(n),Em(this.options,i)||I(this,vs).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,Jn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Ya(i.mutationKey)!==Ya(this.options.mutationKey)?this.reset():((r=I(this,Jn))==null?void 0:r.state.status)==="pending"&&I(this,Jn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=I(this,Jn))==null||n.removeObserver(this)}onMutationUpdate(n){Xe(this,Es,um).call(this),Xe(this,Es,Cx).call(this,n)}getCurrentResult(){return I(this,To)}reset(){var n;(n=I(this,Jn))==null||n.removeObserver(this),_e(this,Jn,void 0),Xe(this,Es,um).call(this),Xe(this,Es,Cx).call(this)}mutate(n,i){var r;return _e(this,Ss,i),(r=I(this,Jn))==null||r.removeObserver(this),_e(this,Jn,I(this,vs).getMutationCache().build(I(this,vs),this.options)),I(this,Jn).addObserver(this),I(this,Jn).execute(n)}},vs=new WeakMap,To=new WeakMap,Jn=new WeakMap,Ss=new WeakMap,Es=new WeakSet,um=function(){var i;const n=((i=I(this,Jn))==null?void 0:i.state)??I2();_e(this,To,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},Cx=function(n){tn.batch(()=>{var i,r,s,o,l,c,h,d;if(I(this,Ss)&&this.hasListeners()){const p=I(this,To).variables,g=I(this,To).context,O={client:I(this,vs),meta:this.options.meta,mutationKey:this.options.mutationKey};(n==null?void 0:n.type)==="success"?((r=(i=I(this,Ss)).onSuccess)==null||r.call(i,n.data,p,g,O),(o=(s=I(this,Ss)).onSettled)==null||o.call(s,n.data,null,p,g,O)):(n==null?void 0:n.type)==="error"&&((c=(l=I(this,Ss)).onError)==null||c.call(l,n.error,p,g,O),(d=(h=I(this,Ss)).onSettled)==null||d.call(h,void 0,n.error,p,g,O))}this.listeners.forEach(p=>{p(I(this,To))})})},T2),Er,Q2,_I=(Q2=class extends nu{constructor(e={}){super();Ee(this,Er);this.config=e,_e(this,Er,new Map)}build(e,n,i){const r=n.queryKey,s=n.queryHash??yv(r,n);let o=this.get(s);return o||(o=new mI({client:e,queryKey:r,queryHash:s,options:e.defaultQueryOptions(n),state:i,defaultOptions:e.getQueryDefaults(r)}),this.add(o)),o}add(e){I(this,Er).has(e.queryHash)||(I(this,Er).set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){const n=I(this,Er).get(e.queryHash);n&&(e.destroy(),n===e&&I(this,Er).delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){tn.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return I(this,Er).get(e)}getAll(){return[...I(this,Er).values()]}find(e){const n={exact:!0,...e};return this.getAll().find(i=>kT(n,i))}findAll(e={}){const n=this.getAll();return Object.keys(e).length>0?n.filter(i=>kT(e,i)):n}notify(e){tn.batch(()=>{this.listeners.forEach(n=>{n(e)})})}onFocus(){tn.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){tn.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Er=new WeakMap,Q2),Mt,Qo,Co,Lc,Mc,Eo,Dc,jc,C2,kI=(C2=class{constructor(t={}){Ee(this,Mt);Ee(this,Qo);Ee(this,Co);Ee(this,Lc);Ee(this,Mc);Ee(this,Eo);Ee(this,Dc);Ee(this,jc);_e(this,Mt,t.queryCache||new _I),_e(this,Qo,t.mutationCache||new vI),_e(this,Co,t.defaultOptions||{}),_e(this,Lc,new Map),_e(this,Mc,new Map),_e(this,Eo,0)}mount(){bp(this,Eo)._++,I(this,Eo)===1&&(_e(this,Dc,bv.subscribe(async t=>{t&&(await this.resumePausedMutations(),I(this,Mt).onFocus())})),_e(this,jc,Am.subscribe(async t=>{t&&(await this.resumePausedMutations(),I(this,Mt).onOnline())})))}unmount(){var t,e;bp(this,Eo)._--,I(this,Eo)===0&&((t=I(this,Dc))==null||t.call(this),_e(this,Dc,void 0),(e=I(this,jc))==null||e.call(this),_e(this,jc,void 0))}isFetching(t){return I(this,Mt).findAll({...t,fetchStatus:"fetching"}).length}isMutating(t){return I(this,Qo).findAll({...t,status:"pending"}).length}getQueryData(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=I(this,Mt).get(e.queryHash))==null?void 0:n.state.data}ensureQueryData(t){const e=this.defaultQueryOptions(t),n=I(this,Mt).build(this,e),i=n.state.data;return i===void 0?this.fetchQuery(t):(t.revalidateIfStale&&n.isStaleByTime(Mo(e.staleTime,n))&&this.prefetchQuery(e),Promise.resolve(i))}getQueriesData(t){return I(this,Mt).findAll(t).map(({queryKey:e,state:n})=>{const i=n.data;return[e,i]})}setQueryData(t,e,n){const i=this.defaultQueryOptions({queryKey:t}),r=I(this,Mt).get(i.queryHash),s=r==null?void 0:r.state.data,o=sI(e,s);if(o!==void 0)return I(this,Mt).build(this,i).setData(o,{...n,manual:!0})}setQueriesData(t,e,n){return tn.batch(()=>I(this,Mt).findAll(t).map(({queryKey:i})=>[i,this.setQueryData(i,e,n)]))}getQueryState(t){var n;const e=this.defaultQueryOptions({queryKey:t});return(n=I(this,Mt).get(e.queryHash))==null?void 0:n.state}removeQueries(t){const e=I(this,Mt);tn.batch(()=>{e.findAll(t).forEach(n=>{e.remove(n)})})}resetQueries(t,e){const n=I(this,Mt);return tn.batch(()=>(n.findAll(t).forEach(i=>{i.reset()}),this.refetchQueries({type:"active",...t},e)))}cancelQueries(t,e={}){const n={revert:!0,...e},i=tn.batch(()=>I(this,Mt).findAll(t).map(r=>r.cancel(n)));return Promise.all(i).then(Mn).catch(Mn)}invalidateQueries(t,e={}){return tn.batch(()=>(I(this,Mt).findAll(t).forEach(n=>{n.invalidate()}),(t==null?void 0:t.refetchType)==="none"?Promise.resolve():this.refetchQueries({...t,type:(t==null?void 0:t.refetchType)??(t==null?void 0:t.type)??"active"},e)))}refetchQueries(t,e={}){const n={...e,cancelRefetch:e.cancelRefetch??!0},i=tn.batch(()=>I(this,Mt).findAll(t).filter(r=>!r.isDisabled()&&!r.isStatic()).map(r=>{let s=r.fetch(void 0,n);return n.throwOnError||(s=s.catch(Mn)),r.state.fetchStatus==="paused"?Promise.resolve():s}));return Promise.all(i).then(Mn)}fetchQuery(t){const e=this.defaultQueryOptions(t);e.retry===void 0&&(e.retry=!1);const n=I(this,Mt).build(this,e);return n.isStaleByTime(Mo(e.staleTime,n))?n.fetch(e):Promise.resolve(n.state.data)}prefetchQuery(t){return this.fetchQuery(t).then(Mn).catch(Mn)}fetchInfiniteQuery(t){return t.behavior=RT(t.pages),this.fetchQuery(t)}prefetchInfiniteQuery(t){return this.fetchInfiniteQuery(t).then(Mn).catch(Mn)}ensureInfiniteQueryData(t){return t.behavior=RT(t.pages),this.ensureQueryData(t)}resumePausedMutations(){return Am.isOnline()?I(this,Qo).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,Mt)}getMutationCache(){return I(this,Qo)}getDefaultOptions(){return I(this,Co)}setDefaultOptions(t){_e(this,Co,t)}setQueryDefaults(t,e){I(this,Lc).set(Ya(t),{queryKey:t,defaultOptions:e})}getQueryDefaults(t){const e=[...I(this,Lc).values()],n={};return e.forEach(i=>{Kh(t,i.queryKey)&&Object.assign(n,i.defaultOptions)}),n}setMutationDefaults(t,e){I(this,Mc).set(Ya(t),{mutationKey:t,defaultOptions:e})}getMutationDefaults(t){const e=[...I(this,Mc).values()],n={};return e.forEach(i=>{Kh(t,i.mutationKey)&&Object.assign(n,i.defaultOptions)}),n}defaultQueryOptions(t){if(t._defaulted)return t;const e={...I(this,Co).queries,...this.getQueryDefaults(t.queryKey),...t,_defaulted:!0};return e.queryHash||(e.queryHash=yv(e.queryKey,e)),e.refetchOnReconnect===void 0&&(e.refetchOnReconnect=e.networkMode!=="always"),e.throwOnError===void 0&&(e.throwOnError=!!e.suspense),!e.networkMode&&e.persister&&(e.networkMode="offlineFirst"),e.queryFn===As&&(e.enabled=!1),e}defaultMutationOptions(t){return t!=null&&t._defaulted?t:{...I(this,Co).mutations,...(t==null?void 0:t.mutationKey)&&this.getMutationDefaults(t.mutationKey),...t,_defaulted:!0}}clear(){I(this,Mt).clear(),I(this,Qo).clear()}},Mt=new WeakMap,Qo=new WeakMap,Co=new WeakMap,Lc=new WeakMap,Mc=new WeakMap,Eo=new WeakMap,Dc=new WeakMap,jc=new WeakMap,C2),B=Xf();const Nc=Ov(B);var X2=B.createContext(void 0),V2=t=>{const e=B.useContext(X2);if(!e)throw new Error("No QueryClient set, use QueryClientProvider to set one");return e},wI=({client:t,children:e})=>(B.useEffect(()=>(t.mount(),()=>{t.unmount()}),[t]),v.jsx(X2.Provider,{value:t,children:e})),B2=B.createContext(!1),PI=()=>B.useContext(B2);B2.Provider;function TI(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var QI=B.createContext(TI()),CI=()=>B.useContext(QI),EI=(t,e)=>{(t.suspense||t.throwOnError||t.experimental_prefetchInRender)&&(e.isReset()||(t.retryOnMount=!1))},AI=t=>{B.useEffect(()=>{t.clearReset()},[t])},RI=({result:t,errorResetBoundary:e,throwOnError:n,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||L2(n,[t.error,i])),$I=t=>{if(t.suspense){const n=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>n(i(...r)):n(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},LI=(t,e)=>t.isLoading&&t.isFetching&&!e,MI=(t,e)=>(t==null?void 0:t.suspense)&&e.isPending,LT=(t,e,n)=>e.fetchOptimistic(t).catch(()=>{n.clearReset()});function DI(t,e,n){var p,g,O,x,S;const i=PI(),r=CI(),s=V2(),o=s.defaultQueryOptions(t);(g=(p=s.getDefaultOptions().queries)==null?void 0:p._experimental_beforeQuery)==null||g.call(p,o),o._optimisticResults=i?"isRestoring":"optimistic",$I(o),EI(o,r),AI(r);const l=!s.getQueryCache().get(o.queryHash),[c]=B.useState(()=>new e(s,o)),h=c.getOptimisticResult(o),d=!i&&t.subscribed!==!1;if(B.useSyncExternalStore(B.useCallback(_=>{const k=d?c.subscribe(tn.batchCalls(_)):Mn;return c.updateResult(),k},[c,d]),()=>c.getCurrentResult(),()=>c.getCurrentResult()),B.useEffect(()=>{c.setOptions(o)},[o,c]),MI(o,h))throw LT(o,c,r);if(RI({result:h,errorResetBoundary:r,throwOnError:o.throwOnError,query:s.getQueryCache().get(o.queryHash),suspense:o.suspense}))throw h.error;if((x=(O=s.getDefaultOptions().queries)==null?void 0:O._experimental_afterQuery)==null||x.call(O,o,h),o.experimental_prefetchInRender&&!Ua&&LI(h,i)){const _=l?LT(o,c,r):(S=s.getQueryCache().get(o.queryHash))==null?void 0:S.promise;_==null||_.catch(Mn).finally(()=>{c.updateResult()})}return o.notifyOnChangeProps?h:c.trackResult(h)}function Ny(t,e){return DI(t,gI)}function Rm(t,e){const n=V2(),[i]=B.useState(()=>new SI(n,t));B.useEffect(()=>{i.setOptions(t)},[i,t]);const r=B.useSyncExternalStore(B.useCallback(o=>i.subscribe(tn.batchCalls(o)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),s=B.useCallback((o,l)=>{i.mutate(o,l).catch(Mn)},[i]);if(r.error&&L2(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:s,mutateAsync:r.mutate}}const Ex=new WeakMap,jI=new WeakMap,$m={current:[]};let zy=!1,Rh=0;const wh=new Set,vp=new Map;function Z2(t){for(const e of t){if($m.current.includes(e))continue;$m.current.push(e),e.recompute();const n=jI.get(e);if(n)for(const i of n){const r=Ex.get(i);r!=null&&r.length&&Z2(r)}}}function NI(t){const e={prevVal:t.prevState,currentVal:t.state};for(const n of t.listeners)n(e)}function zI(t){const e={prevVal:t.prevState,currentVal:t.state};for(const n of t.listeners)n(e)}function q2(t){if(Rh>0&&!vp.has(t)&&vp.set(t,t.prevState),wh.add(t),!(Rh>0)&&!zy)try{for(zy=!0;wh.size>0;){const e=Array.from(wh);wh.clear();for(const n of e){const i=vp.get(n)??n.prevState;n.prevState=i,NI(n)}for(const n of e){const i=Ex.get(n);i&&($m.current.push(n),Z2(i))}for(const n of e){const i=Ex.get(n);if(i)for(const r of i)zI(r)}}}finally{zy=!1,$m.current=[],vp.clear()}}function $h(t){Rh++;try{t()}finally{if(Rh--,Rh===0){const e=wh.values().next().value;e&&q2(e)}}}function II(t){return typeof t=="function"}class XI{constructor(e,n){this.listeners=new Set,this.subscribe=i=>{var r,s;this.listeners.add(i);const o=(s=(r=this.options)==null?void 0:r.onSubscribe)==null?void 0:s.call(r,i,this);return()=>{this.listeners.delete(i),o==null||o()}},this.prevState=e,this.state=e,this.options=n}setState(e){var n,i,r;this.prevState=this.state,(n=this.options)!=null&&n.updateFn?this.state=this.options.updateFn(this.prevState)(e):II(e)?this.state=e(this.prevState):this.state=e,(r=(i=this.options)==null?void 0:i.onUpdate)==null||r.call(i),q2(this)}}const Do="__TSR_index",MT="popstate",DT="beforeunload";function VI(t){let e=t.getLocation();const n=new Set,i=o=>{e=t.getLocation(),n.forEach(l=>l({location:e,action:o}))},r=o=>{t.notifyOnIndexChange??!0?i(o):e=t.getLocation()},s=async({task:o,navigateOpts:l,...c})=>{var g,O;if((l==null?void 0:l.ignoreBlocker)??!1){o();return}const d=((g=t.getBlockers)==null?void 0:g.call(t))??[],p=c.type==="PUSH"||c.type==="REPLACE";if(typeof document<"u"&&d.length&&p)for(const x of d){const S=Lm(c.path,c.state);if(await x.blockerFn({currentLocation:e,nextLocation:S,action:c.type})){(O=t.onBlocked)==null||O.call(t);return}}o()};return{get location(){return e},get length(){return t.getLength()},subscribers:n,subscribe:o=>(n.add(o),()=>{n.delete(o)}),push:(o,l,c)=>{const h=e.state[Do];l=jT(h+1,l),s({task:()=>{t.pushState(o,l),i({type:"PUSH"})},navigateOpts:c,type:"PUSH",path:o,state:l})},replace:(o,l,c)=>{const h=e.state[Do];l=jT(h,l),s({task:()=>{t.replaceState(o,l),i({type:"REPLACE"})},navigateOpts:c,type:"REPLACE",path:o,state:l})},go:(o,l)=>{s({task:()=>{t.go(o),r({type:"GO",index:o})},navigateOpts:l,type:"GO"})},back:o=>{s({task:()=>{t.back((o==null?void 0:o.ignoreBlocker)??!1),r({type:"BACK"})},navigateOpts:o,type:"BACK"})},forward:o=>{s({task:()=>{t.forward((o==null?void 0:o.ignoreBlocker)??!1),r({type:"FORWARD"})},navigateOpts:o,type:"FORWARD"})},canGoBack:()=>e.state[Do]!==0,createHref:o=>t.createHref(o),block:o=>{var c;if(!t.setBlockers)return()=>{};const l=((c=t.getBlockers)==null?void 0:c.call(t))??[];return t.setBlockers([...l,o]),()=>{var d,p;const h=((d=t.getBlockers)==null?void 0:d.call(t))??[];(p=t.setBlockers)==null||p.call(t,h.filter(g=>g!==o))}},flush:()=>{var o;return(o=t.flush)==null?void 0:o.call(t)},destroy:()=>{var o;return(o=t.destroy)==null?void 0:o.call(t)},notify:i}}function jT(t,e){e||(e={});const n=vv();return{...e,key:n,__TSR_key:n,[Do]:t}}function BI(t){var Z,U;const e=typeof document<"u"?window:void 0,n=e.history.pushState,i=e.history.replaceState;let r=[];const s=()=>r,o=M=>r=M,l=(M=>M),c=(()=>Lm(`${e.location.pathname}${e.location.search}${e.location.hash}`,e.history.state));if(!((Z=e.history.state)!=null&&Z.__TSR_key)&&!((U=e.history.state)!=null&&U.key)){const M=vv();e.history.replaceState({[Do]:0,key:M,__TSR_key:M},"")}let h=c(),d,p=!1,g=!1,O=!1,x=!1;const S=()=>h;let _,k;const P=()=>{_&&(D._ignoreSubscribers=!0,(_.isPush?e.history.pushState:e.history.replaceState)(_.state,"",_.href),D._ignoreSubscribers=!1,_=void 0,k=void 0,d=void 0)},Q=(M,V,G)=>{const J=l(V);k||(d=h),h=Lm(V,G),_={href:J,state:G,isPush:(_==null?void 0:_.isPush)||M==="push"},k||(k=Promise.resolve().then(()=>P()))},R=M=>{h=c(),D.notify({type:M})},$=async()=>{if(g){g=!1;return}const M=c(),V=M.state[Do]-h.state[Do],G=V===1,J=V===-1,K=!G&&!J||p;p=!1;const ie=K?"GO":J?"BACK":"FORWARD",q=K?{type:"GO",index:V}:{type:J?"BACK":"FORWARD"};if(O)O=!1;else{const se=s();if(typeof document<"u"&&se.length){for(const pe of se)if(await pe.blockerFn({currentLocation:h,nextLocation:M,action:ie})){g=!0,e.history.go(1),D.notify(q);return}}}h=c(),D.notify(q)},C=M=>{if(x){x=!1;return}let V=!1;const G=s();if(typeof document<"u"&&G.length)for(const J of G){const K=J.enableBeforeUnload??!0;if(K===!0){V=!0;break}if(typeof K=="function"&&K()===!0){V=!0;break}}if(V)return M.preventDefault(),M.returnValue=""},D=VI({getLocation:S,getLength:()=>e.history.length,pushState:(M,V)=>Q("push",M,V),replaceState:(M,V)=>Q("replace",M,V),back:M=>(M&&(O=!0),x=!0,e.history.back()),forward:M=>{M&&(O=!0),x=!0,e.history.forward()},go:M=>{p=!0,e.history.go(M)},createHref:M=>l(M),flush:P,destroy:()=>{e.history.pushState=n,e.history.replaceState=i,e.removeEventListener(DT,C,{capture:!0}),e.removeEventListener(MT,$)},onBlocked:()=>{d&&h!==d&&(h=d)},getBlockers:s,setBlockers:o,notifyOnIndexChange:!1});return e.addEventListener(DT,C,{capture:!0}),e.addEventListener(MT,$),e.history.pushState=function(...M){const V=n.apply(e.history,M);return D._ignoreSubscribers||R("PUSH"),V},e.history.replaceState=function(...M){const V=i.apply(e.history,M);return D._ignoreSubscribers||R("REPLACE"),V},D}function Lm(t,e){const n=t.indexOf("#"),i=t.indexOf("?"),r=vv();return{href:t,pathname:t.substring(0,n>0?i>0?Math.min(n,i):n:i>0?i:t.length),hash:n>-1?t.substring(n):"",search:i>-1?t.slice(i,n===-1?void 0:n):"",state:e||{[Do]:0,key:r,__TSR_key:r}}}function vv(){return(Math.random()+1).toString(36).substring(7)}function Mm(t){return t[t.length-1]}function ZI(t){return typeof t=="function"}function Xa(t,e){return ZI(t)?t(e):t}const qI=Object.prototype.hasOwnProperty;function zi(t,e){if(t===e)return t;const n=e,i=IT(t)&&IT(n);if(!i&&!(Dm(t)&&Dm(n)))return n;const r=i?t:NT(t);if(!r)return n;const s=i?n:NT(n);if(!s)return n;const o=r.length,l=s.length,c=i?new Array(l):{};let h=0;for(let d=0;d<l;d++){const p=i?d:s[d],g=t[p],O=n[p];if(g===O){c[p]=g,(i?d<o:qI.call(t,p))&&h++;continue}if(g===null||O===null||typeof g!="object"||typeof O!="object"){c[p]=O;continue}const x=zi(g,O);c[p]=x,x===g&&h++}return o===l&&h===o?t:c}function NT(t){const e=[],n=Object.getOwnPropertyNames(t);for(const r of n){if(!Object.prototype.propertyIsEnumerable.call(t,r))return!1;e.push(r)}const i=Object.getOwnPropertySymbols(t);for(const r of i){if(!Object.prototype.propertyIsEnumerable.call(t,r))return!1;e.push(r)}return e}function Dm(t){if(!zT(t))return!1;const e=t.constructor;if(typeof e>"u")return!0;const n=e.prototype;return!(!zT(n)||!n.hasOwnProperty("isPrototypeOf"))}function zT(t){return Object.prototype.toString.call(t)==="[object Object]"}function IT(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function Va(t,e,n){if(t===e)return!0;if(typeof t!=typeof e)return!1;if(Array.isArray(t)&&Array.isArray(e)){if(t.length!==e.length)return!1;for(let i=0,r=t.length;i<r;i++)if(!Va(t[i],e[i],n))return!1;return!0}if(Dm(t)&&Dm(e)){const i=(n==null?void 0:n.ignoreUndefined)??!0;if(n!=null&&n.partial){for(const o in e)if((!i||e[o]!==void 0)&&!Va(t[o],e[o],n))return!1;return!0}let r=0;if(!i)r=Object.keys(t).length;else for(const o in t)t[o]!==void 0&&r++;let s=0;for(const o in e)if((!i||e[o]!==void 0)&&(s++,s>r||!Va(t[o],e[o],n)))return!1;return r===s}return!1}function zc(t){let e,n;const i=new Promise((r,s)=>{e=r,n=s});return i.status="pending",i.resolve=r=>{i.status="resolved",i.value=r,e(r),t==null||t(r)},i.reject=r=>{i.status="rejected",n(r)},i}function jo(t){return!!(t&&typeof t=="object"&&typeof t.then=="function")}function XT(t){try{return decodeURI(t)}catch{return t.replaceAll(/%[0-9A-F]{2}/gi,e=>{try{return decodeURI(e)}catch{return e}})}}function VT(t,e){if(!t)return t;const n=/%25|%5C/gi;let i=0,r="",s;for(;(s=n.exec(t))!==null;)r+=XT(t.slice(i,s.index))+s[0],i=n.lastIndex;return r+XT(i?t.slice(i):t)}var UI="Invariant failed";function Rs(t,e){if(!t)throw new Error(UI)}function jm(t){const e=new Map;let n,i;const r=s=>{s.next&&(s.prev?(s.prev.next=s.next,s.next.prev=s.prev,s.next=void 0,i&&(i.next=s,s.prev=i)):(s.next.prev=void 0,n=s.next,s.next=void 0,i&&(s.prev=i,i.next=s)),i=s)};return{get(s){const o=e.get(s);if(o)return r(o),o.value},set(s,o){if(e.size>=t&&n){const c=n;e.delete(c.key),c.next&&(n=c.next,c.next.prev=void 0),c===i&&(i=void 0)}const l=e.get(s);if(l)l.value=o,r(l);else{const c={key:s,value:o,prev:i};i&&(i.next=c),i=c,n||(n=c),e.set(s,c)}},clear(){e.clear(),n=void 0,i=void 0}}}const Ic=0,Ga=1,Wa=2,Jh=3,YI=/^([^{]*)\{\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,GI=/^([^{]*)\{-\$([a-zA-Z_$][a-zA-Z0-9_$]*)\}([^}]*)$/,WI=/^([^{]*)\{\$\}([^}]*)$/;function Sv(t,e,n=new Uint16Array(6)){const i=t.indexOf("/",e),r=i===-1?t.length:i,s=t.substring(e,r);if(!s||!s.includes("$"))return n[0]=Ic,n[1]=e,n[2]=e,n[3]=r,n[4]=r,n[5]=r,n;if(s==="$"){const h=t.length;return n[0]=Wa,n[1]=e,n[2]=e,n[3]=h,n[4]=h,n[5]=h,n}if(s.charCodeAt(0)===36)return n[0]=Ga,n[1]=e,n[2]=e+1,n[3]=r,n[4]=r,n[5]=r,n;const o=s.match(WI);if(o){const d=o[1].length;return n[0]=Wa,n[1]=e+d,n[2]=e+d+1,n[3]=e+d+2,n[4]=e+d+3,n[5]=t.length,n}const l=s.match(GI);if(l){const h=l[1],d=l[2],p=l[3],g=h.length;return n[0]=Jh,n[1]=e+g,n[2]=e+g+3,n[3]=e+g+3+d.length,n[4]=r-p.length,n[5]=r,n}const c=s.match(YI);if(c){const h=c[1],d=c[2],p=c[3],g=h.length;return n[0]=Ga,n[1]=e+g,n[2]=e+g+2,n[3]=e+g+2+d.length,n[4]=r-p.length,n[5]=r,n}return n[0]=Ic,n[1]=e,n[2]=e,n[3]=r,n[4]=r,n[5]=r,n}function Mg(t,e,n,i,r,s,o){var c,h,d,p,g;o==null||o(n);let l=i;{const O=n.fullPath??n.from,x=O.length,S=((c=n.options)==null?void 0:c.caseSensitive)??t;for(;l<x;){const _=Sv(O,l,e);let k;const P=l,Q=_[5];switch(l=Q+1,s++,_[0]){case Ic:{const $=O.substring(_[2],_[3]);if(S){const C=(h=r.static)==null?void 0:h.get($);if(C)k=C;else{r.static??(r.static=new Map);const D=ef(n.fullPath??n.from);D.parent=r,D.depth=s,k=D,r.static.set($,D)}}else{const C=$.toLowerCase(),D=(d=r.staticInsensitive)==null?void 0:d.get(C);if(D)k=D;else{r.staticInsensitive??(r.staticInsensitive=new Map);const Z=ef(n.fullPath??n.from);Z.parent=r,Z.depth=s,k=Z,r.staticInsensitive.set(C,Z)}}break}case Ga:{const $=O.substring(P,_[1]),C=O.substring(_[4],Q),D=S&&!!($||C),Z=$?D?$:$.toLowerCase():void 0,U=C?D?C:C.toLowerCase():void 0,M=(p=r.dynamic)==null?void 0:p.find(V=>V.caseSensitive===D&&V.prefix===Z&&V.suffix===U);if(M)k=M;else{const V=Xy(Ga,n.fullPath??n.from,D,Z,U);k=V,V.depth=s,V.parent=r,r.dynamic??(r.dynamic=[]),r.dynamic.push(V)}break}case Jh:{const $=O.substring(P,_[1]),C=O.substring(_[4],Q),D=S&&!!($||C),Z=$?D?$:$.toLowerCase():void 0,U=C?D?C:C.toLowerCase():void 0,M=(g=r.optional)==null?void 0:g.find(V=>V.caseSensitive===D&&V.prefix===Z&&V.suffix===U);if(M)k=M;else{const V=Xy(Jh,n.fullPath??n.from,D,Z,U);k=V,V.parent=r,V.depth=s,r.optional??(r.optional=[]),r.optional.push(V)}break}case Wa:{const $=O.substring(P,_[1]),C=O.substring(_[4],Q),D=S&&!!($||C),Z=$?D?$:$.toLowerCase():void 0,U=C?D?C:C.toLowerCase():void 0,M=Xy(Wa,n.fullPath??n.from,D,Z,U);k=M,M.parent=r,M.depth=s,r.wildcard??(r.wildcard=[]),r.wildcard.push(M)}}r=k}if((n.path||!n.children)&&!n.isRoot){const _=O.endsWith("/");_||(r.notFound=n),(!r.route||!r.isIndex&&_)&&(r.route=n),r.isIndex||(r.isIndex=_)}}if(n.children)for(const O of n.children)Mg(t,e,O,l,r,s,o)}function Iy(t,e){if(t.prefix&&e.prefix&&t.prefix!==e.prefix){if(t.prefix.startsWith(e.prefix))return-1;if(e.prefix.startsWith(t.prefix))return 1}if(t.suffix&&e.suffix&&t.suffix!==e.suffix){if(t.suffix.endsWith(e.suffix))return-1;if(e.suffix.endsWith(t.suffix))return 1}return t.prefix&&!e.prefix?-1:!t.prefix&&e.prefix?1:t.suffix&&!e.suffix?-1:!t.suffix&&e.suffix?1:t.caseSensitive&&!e.caseSensitive?-1:!t.caseSensitive&&e.caseSensitive?1:0}function Sa(t){var e,n,i;if(t.static)for(const r of t.static.values())Sa(r);if(t.staticInsensitive)for(const r of t.staticInsensitive.values())Sa(r);if((e=t.dynamic)!=null&&e.length){t.dynamic.sort(Iy);for(const r of t.dynamic)Sa(r)}if((n=t.optional)!=null&&n.length){t.optional.sort(Iy);for(const r of t.optional)Sa(r)}if((i=t.wildcard)!=null&&i.length){t.wildcard.sort(Iy);for(const r of t.wildcard)Sa(r)}}function ef(t){return{kind:Ic,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:t,parent:null,isIndex:!1,notFound:null}}function Xy(t,e,n,i,r){return{kind:t,depth:0,static:null,staticInsensitive:null,dynamic:null,optional:null,wildcard:null,route:null,fullPath:e,parent:null,isIndex:!1,notFound:null,caseSensitive:n,prefix:i,suffix:r}}function HI(t,e){const n=ef("/"),i=new Uint16Array(6);for(const r of t)Mg(!1,i,r,1,n,0);Sa(n),e.masksTree=n,e.flatCache=jm(1e3)}function FI(t,e){t||(t="/");const n=e.flatCache.get(t);if(n)return n;const i=_v(t,e.masksTree);return e.flatCache.set(t,i),i}function KI(t,e,n,i,r){t||(t="/"),i||(i="/");const s=e?`case\0${t}`:t;let o=r.singleCache.get(s);if(!o){o=ef("/");const l=new Uint16Array(6);Mg(e,l,{from:t},1,o,0),r.singleCache.set(s,o)}return _v(i,o,n)}function JI(t,e,n=!1){const i=n?t:`nofuzz\0${t}`,r=e.matchCache.get(i);if(r!==void 0)return r;t||(t="/");const s=_v(t,e.segmentTree,n);return s&&(s.branch=i4(s.route)),e.matchCache.set(i,s),s}function e4(t){return t==="/"?t:t.replace(/\/{1,}$/,"")}function t4(t,e=!1,n){const i=ef(t.fullPath),r=new Uint16Array(6),s={},o={};let l=0;return Mg(e,r,t,1,i,0,h=>{if(n==null||n(h,l),Rs(!(h.id in s),`Duplicate routes found with id: ${String(h.id)}`),s[h.id]=h,l!==0&&h.path){const d=e4(h.fullPath);(!o[d]||h.fullPath.endsWith("/"))&&(o[d]=h)}l++}),Sa(i),{processedTree:{segmentTree:i,singleCache:jm(1e3),matchCache:jm(1e3),flatCache:null,masksTree:null},routesById:s,routesByPath:o}}function _v(t,e,n=!1){const i=t.split("/"),r=s4(t,i,e,n);if(!r)return null;const s=n4(t,i,r),o="**"in r;return o&&(s["**"]=r["**"]),{route:o?r.node.notFound??r.node.route:r.node.route,params:s}}function n4(t,e,n){var o,l,c,h,d,p;const i=r4(n.node);let r=null;const s={};for(let g=0,O=0,x=0;O<i.length;g++,O++,x++){const S=i[O],_=e[g],k=x;if(_&&(x+=_.length),S.kind===Ga){r??(r=n.node.fullPath.split("/"));const P=r[O],Q=((o=S.prefix)==null?void 0:o.length)??0;if(P.charCodeAt(Q)===123){const $=((l=S.suffix)==null?void 0:l.length)??0,C=P.substring(Q+2,P.length-$-1),D=_.substring(Q,_.length-$);s[C]=decodeURIComponent(D)}else{const $=P.substring(1);s[$]=decodeURIComponent(_)}}else if(S.kind===Jh){if(n.skipped&1<<O){g--;continue}r??(r=n.node.fullPath.split("/"));const P=r[O],Q=((c=S.prefix)==null?void 0:c.length)??0,R=((h=S.suffix)==null?void 0:h.length)??0,$=P.substring(Q+3,P.length-R-1),C=S.suffix||S.prefix?_.substring(Q,_.length-R):_;C&&(s[$]=decodeURIComponent(C))}else if(S.kind===Wa){const P=S,Q=t.substring(k+(((d=P.prefix)==null?void 0:d.length)??0),t.length-(((p=P.suffix)==null?void 0:p.length)??0)),R=decodeURIComponent(Q);s["*"]=R,s._splat=R;break}}return s}function i4(t){const e=[t];for(;t.parentRoute;)t=t.parentRoute,e.push(t);return e.reverse(),e}function r4(t){const e=Array(t.depth+1);do e[t.depth]=t,t=t.parent;while(t);return e}function s4(t,e,n,i){const r=!Mm(e),s=r&&t!=="/",o=e.length-(r?1:0),l=[{node:n,index:1,skipped:0,depth:1,statics:1,dynamics:0,optionals:0}];let c=null,h=null,d=null;for(;l.length;){const p=l.pop();let{node:g,index:O,skipped:x,depth:S,statics:_,dynamics:k,optionals:P}=p;i&&g.notFound&&Vy(h,p)&&(h=p);const Q=O===o;if(Q){if(g.route&&(!s||g.isIndex)&&(Vy(d,p)&&(d=p),_===o&&g.isIndex))return d;if(!g.optional&&!g.wildcard)continue}const R=Q?void 0:e[O];let $;if(g.wildcard&&Vy(c,p))for(const C of g.wildcard){const{prefix:D,suffix:Z}=C;if(!(D&&(Q||!(C.caseSensitive?R:$??($=R.toLowerCase())).startsWith(D)))){if(Z){if(Q)continue;const U=e.slice(O).join("/").slice(-Z.length);if((C.caseSensitive?U:U.toLowerCase())!==Z)continue}c={node:C,index:O,skipped:x,depth:S,statics:_,dynamics:k,optionals:P};break}}if(g.optional){const C=x|1<<S,D=S+1;for(let Z=g.optional.length-1;Z>=0;Z--){const U=g.optional[Z];l.push({node:U,index:O,skipped:C,depth:D,statics:_,dynamics:k,optionals:P})}if(!Q)for(let Z=g.optional.length-1;Z>=0;Z--){const U=g.optional[Z],{prefix:M,suffix:V}=U;if(M||V){const G=U.caseSensitive?R:$??($=R.toLowerCase());if(M&&!G.startsWith(M)||V&&!G.endsWith(V))continue}l.push({node:U,index:O+1,skipped:x,depth:D,statics:_,dynamics:k,optionals:P+1})}}if(!Q&&g.dynamic&&R)for(let C=g.dynamic.length-1;C>=0;C--){const D=g.dynamic[C],{prefix:Z,suffix:U}=D;if(Z||U){const M=D.caseSensitive?R:$??($=R.toLowerCase());if(Z&&!M.startsWith(Z)||U&&!M.endsWith(U))continue}l.push({node:D,index:O+1,skipped:x,depth:S+1,statics:_,dynamics:k+1,optionals:P})}if(!Q&&g.staticInsensitive){const C=g.staticInsensitive.get($??($=R.toLowerCase()));C&&l.push({node:C,index:O+1,skipped:x,depth:S+1,statics:_+1,dynamics:k,optionals:P})}if(!Q&&g.static){const C=g.static.get(R);C&&l.push({node:C,index:O+1,skipped:x,depth:S+1,statics:_+1,dynamics:k,optionals:P})}}if(d)return d;if(c)return c;if(i&&h){let p=h.index;for(let O=0;O<h.index;O++)p+=e[O].length;const g=p===t.length?"/":t.slice(p);return{node:h.node,skipped:h.skipped,"**":decodeURIComponent(g)}}return null}function Vy(t,e){return t?e.statics>t.statics||e.statics===t.statics&&(e.dynamics>t.dynamics||e.dynamics===t.dynamics&&(e.optionals>t.optionals||e.optionals===t.optionals&&(e.node.isIndex>t.node.isIndex||e.node.isIndex===t.node.isIndex&&e.depth>t.depth))):!0}function hm(t){return kv(t.filter(e=>e!==void 0).join("/"))}function kv(t){return t.replace(/\/{2,}/g,"/")}function U2(t){return t==="/"?t:t.replace(/^\/{1,}/,"")}function Ba(t){const e=t.length;return e>1&&t[e-1]==="/"?t.replace(/\/{1,}$/,""):t}function fm(t){return Ba(U2(t))}function Nm(t,e){return t!=null&&t.endsWith("/")&&t!=="/"&&t!==`${e}/`?t.slice(0,-1):t}function o4(t,e,n){return Nm(t,n)===Nm(e,n)}function a4({base:t,to:e,trailingSlash:n="never",cache:i}){const r=e.startsWith("/"),s=!r&&e===".";let o;if(i){o=r?e:s?t:t+"\0"+e;const p=i.get(o);if(p)return p}let l;if(s)l=t.split("/");else if(r)l=e.split("/");else{for(l=t.split("/");l.length>1&&Mm(l)==="";)l.pop();const p=e.split("/");for(let g=0,O=p.length;g<O;g++){const x=p[g];x===""?g?g===O-1&&l.push(x):l=[x]:x===".."?l.pop():x==="."||l.push(x)}}l.length>1&&(Mm(l)===""?n==="never"&&l.pop():n==="always"&&l.push(""));let c,h="";for(let p=0;p<l.length;p++){p>0&&(h+="/");const g=l[p];if(!g)continue;c=Sv(g,0,c);const O=c[0];if(O===Ic){h+=g;continue}const x=c[5],S=g.substring(0,c[1]),_=g.substring(c[4],x),k=g.substring(c[2],c[3]);O===Ga?h+=S||_?`${S}{$${k}}${_}`:`$${k}`:O===Wa?h+=S||_?`${S}{$}${_}`:"$":h+=`${S}{-$${k}}${_}`}h=kv(h);const d=h||"/";return o&&i&&i.set(o,d),d}function By(t,e,n){const i=e[t];return typeof i!="string"?i:t==="_splat"?encodeURI(i):l4(i,n)}function Zy({path:t,params:e,decodeCharMap:n}){let i=!1;const r={};if(!t||t==="/")return{interpolatedPath:"/",usedParams:r,isMissingParams:i};if(!t.includes("$"))return{interpolatedPath:t,usedParams:r,isMissingParams:i};const s=t.length;let o=0,l,c="";for(;o<s;){const d=o;l=Sv(t,d,l);const p=l[5];if(o=p+1,d===p)continue;const g=l[0];if(g===Ic){c+="/"+t.substring(d,p);continue}if(g===Wa){const O=e._splat;r._splat=O,r["*"]=O;const x=t.substring(d,l[1]),S=t.substring(l[4],p);if(!O){i=!0,(x||S)&&(c+="/"+x+S);continue}const _=By("_splat",e,n);c+="/"+x+_+S;continue}if(g===Ga){const O=t.substring(l[2],l[3]);!i&&!(O in e)&&(i=!0),r[O]=e[O];const x=t.substring(d,l[1]),S=t.substring(l[4],p),_=By(O,e,n)??"undefined";c+="/"+x+_+S;continue}if(g===Jh){const O=t.substring(l[2],l[3]),x=e[O];if(x==null)continue;r[O]=x;const S=t.substring(d,l[1]),_=t.substring(l[4],p),k=By(O,e,n)??"";c+="/"+S+k+_;continue}}return t.endsWith("/")&&(c+="/"),{usedParams:r,interpolatedPath:c||"/",isMissingParams:i}}function l4(t,e){let n=encodeURIComponent(t);if(e)for(const[i,r]of e)n=n.replaceAll(i,r);return n}function Y2(t={}){if(t.isNotFound=!0,t.throw)throw t;return t}function Yi(t){return!!(t!=null&&t.isNotFound)}function c4(){try{if(typeof window<"u"&&typeof window.sessionStorage=="object")return window.sessionStorage}catch{}}const zm="tsr-scroll-restoration-v1_3",u4=(t,e)=>{let n;return(...i)=>{n||(n=setTimeout(()=>{t(...i),n=null},e))}};function h4(){const t=c4();if(!t)return null;const e=t.getItem(zm);let n=e?JSON.parse(e):{};return{state:n,set:i=>(n=Xa(i,n)||n,t.setItem(zm,JSON.stringify(n)))}}const Sp=h4(),Ax=t=>t.state.__TSR_key||t.href;function f4(t){const e=[];let n;for(;n=t.parentNode;)e.push(`${t.tagName}:nth-child(${Array.prototype.indexOf.call(n.children,t)+1})`),t=n;return`${e.reverse().join(" > ")}`.toLowerCase()}let Im=!1;function G2({storageKey:t,key:e,behavior:n,shouldScrollRestoration:i,scrollToTopSelectors:r,location:s}){var h,d;let o;try{o=JSON.parse(sessionStorage.getItem(t)||"{}")}catch(p){console.error(p);return}const l=e||((h=window.history.state)==null?void 0:h.__TSR_key),c=o[l];Im=!0;e:{if(i&&c&&Object.keys(c).length>0){for(const O in c){const x=c[O];if(O==="window")window.scrollTo({top:x.scrollY,left:x.scrollX,behavior:n});else if(O){const S=document.querySelector(O);S&&(S.scrollLeft=x.scrollX,S.scrollTop=x.scrollY)}}break e}const p=(s??window.location).hash.split("#",2)[1];if(p){const O=((d=window.history.state)==null?void 0:d.__hashScrollIntoViewOptions)??!0;if(O){const x=document.getElementById(p);x&&x.scrollIntoView(O)}break e}const g={top:0,left:0,behavior:n};if(window.scrollTo(g),r)for(const O of r){if(O==="window")continue;const x=typeof O=="function"?O():document.querySelector(O);x&&x.scrollTo(g)}}Im=!1}function d4(t,e){if(!Sp&&!t.isServer||((t.options.scrollRestoration??!1)&&(t.isScrollRestoring=!0),t.isServer||t.isScrollRestorationSetup||!Sp))return;t.isScrollRestorationSetup=!0,Im=!1;const i=t.options.getScrollRestorationKey||Ax;window.history.scrollRestoration="manual";const r=s=>{if(Im||!t.isScrollRestoring)return;let o="";if(s.target===document||s.target===window)o="window";else{const c=s.target.getAttribute("data-scroll-restoration-id");c?o=`[data-scroll-restoration-id="${c}"]`:o=f4(s.target)}const l=i(t.state.location);Sp.set(c=>{const h=c[l]||(c[l]={}),d=h[o]||(h[o]={});if(o==="window")d.scrollX=window.scrollX||0,d.scrollY=window.scrollY||0;else if(o){const p=document.querySelector(o);p&&(d.scrollX=p.scrollLeft||0,d.scrollY=p.scrollTop||0)}return c})};typeof document<"u"&&document.addEventListener("scroll",u4(r,100),!0),t.subscribe("onRendered",s=>{const o=i(s.toLocation);if(!t.resetNextScroll){t.resetNextScroll=!0;return}typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation})||(G2({storageKey:zm,key:o,behavior:t.options.scrollRestorationBehavior,shouldScrollRestoration:t.isScrollRestoring,scrollToTopSelectors:t.options.scrollToTopSelectors,location:t.history.location}),t.isScrollRestoring&&Sp.set(l=>(l[o]||(l[o]={}),l)))})}function p4(t){if(typeof document<"u"&&document.querySelector){const e=t.state.location.state.__hashScrollIntoViewOptions??!0;if(e&&t.state.location.hash!==""){const n=document.getElementById(t.state.location.hash);n&&n.scrollIntoView(e)}}}function m4(t,e=String){const n=new URLSearchParams;for(const i in t){const r=t[i];r!==void 0&&n.set(i,e(r))}return n.toString()}function qy(t){return t?t==="false"?!1:t==="true"?!0:+t*0===0&&+t+""===t?+t:t:""}function g4(t){const e=new URLSearchParams(t),n={};for(const[i,r]of e.entries()){const s=n[i];s==null?n[i]=qy(r):Array.isArray(s)?s.push(qy(r)):n[i]=[s,qy(r)]}return n}const O4=b4(JSON.parse),y4=x4(JSON.stringify,JSON.parse);function b4(t){return e=>{e[0]==="?"&&(e=e.substring(1));const n=g4(e);for(const i in n){const r=n[i];if(typeof r=="string")try{n[i]=t(r)}catch{}}return n}}function x4(t,e){const n=typeof e=="function";function i(r){if(typeof r=="object"&&r!==null)try{return t(r)}catch{}else if(n&&typeof r=="string")try{return e(r),t(r)}catch{}return r}return r=>{const s=m4(r,i);return s?`?${s}`:""}}const Si="__root__";function v4(t){if(t.statusCode=t.statusCode||t.code||307,!t.reloadDocument&&typeof t.href=="string")try{new URL(t.href),t.reloadDocument=!0}catch{}const e=new Headers(t.headers);t.href&&e.get("Location")===null&&e.set("Location",t.href);const n=new Response(null,{status:t.statusCode,headers:e});if(n.options=t,t.throw)throw n;return n}function cr(t){return t instanceof Response&&!!t.options}const dm=t=>{var e;if(!t.rendered)return t.rendered=!0,(e=t.onReady)==null?void 0:e.call(t)},Dg=(t,e)=>!!(t.preload&&!t.router.state.matches.some(n=>n.id===e)),W2=(t,e)=>{var r;const n=t.router.routesById[e.routeId??""]??t.router.routeTree;!n.options.notFoundComponent&&((r=t.router.options)!=null&&r.defaultNotFoundComponent)&&(n.options.notFoundComponent=t.router.options.defaultNotFoundComponent),Rs(n.options.notFoundComponent);const i=t.matches.find(s=>s.routeId===n.id);Rs(i,"Could not find match for route: "+n.id),t.updateMatch(i.id,s=>({...s,status:"notFound",error:e,isFetching:!1})),e.routerCode==="BEFORE_LOAD"&&n.parentRoute&&(e.routeId=n.parentRoute.id,W2(t,e))},Ao=(t,e,n)=>{var i,r,s;if(!(!cr(n)&&!Yi(n))){if(cr(n)&&n.redirectHandled&&!n.options.reloadDocument)throw n;if(e){(i=e._nonReactive.beforeLoadPromise)==null||i.resolve(),(r=e._nonReactive.loaderPromise)==null||r.resolve(),e._nonReactive.beforeLoadPromise=void 0,e._nonReactive.loaderPromise=void 0;const o=cr(n)?"redirected":"notFound";e._nonReactive.error=n,t.updateMatch(e.id,l=>({...l,status:o,isFetching:!1,error:n})),Yi(n)&&!n.routeId&&(n.routeId=e.routeId),(s=e._nonReactive.loadPromise)==null||s.resolve()}throw cr(n)?(t.rendered=!0,n.options._fromLocation=t.location,n.redirectHandled=!0,n=t.router.resolveRedirect(n),n):(W2(t,n),n)}},H2=(t,e)=>{const n=t.router.getMatch(e);return!!(!t.router.isServer&&n._nonReactive.dehydrated||t.router.isServer&&n.ssr===!1)},ah=(t,e,n,i)=>{var l,c;const{id:r,routeId:s}=t.matches[e],o=t.router.looseRoutesById[s];if(n instanceof Promise)throw n;n.routerCode=i,t.firstBadMatchIndex??(t.firstBadMatchIndex=e),Ao(t,t.router.getMatch(r),n);try{(c=(l=o.options).onError)==null||c.call(l,n)}catch(h){n=h,Ao(t,t.router.getMatch(r),n)}t.updateMatch(r,h=>{var d,p;return(d=h._nonReactive.beforeLoadPromise)==null||d.resolve(),h._nonReactive.beforeLoadPromise=void 0,(p=h._nonReactive.loadPromise)==null||p.resolve(),{...h,error:n,status:"error",isFetching:!1,updatedAt:Date.now(),abortController:new AbortController}})},S4=(t,e,n,i)=>{var O;const r=t.router.getMatch(e),s=(O=t.matches[n-1])==null?void 0:O.id,o=s?t.router.getMatch(s):void 0;if(t.router.isShell()){r.ssr=i.id===Si;return}if((o==null?void 0:o.ssr)===!1){r.ssr=!1;return}const l=x=>x===!0&&(o==null?void 0:o.ssr)==="data-only"?"data-only":x,c=t.router.options.defaultSsr??!0;if(i.options.ssr===void 0){r.ssr=l(c);return}if(typeof i.options.ssr!="function"){r.ssr=l(i.options.ssr);return}const{search:h,params:d}=r,p={search:_p(h,r.searchError),params:_p(d,r.paramsError),location:t.location,matches:t.matches.map(x=>({index:x.index,pathname:x.pathname,fullPath:x.fullPath,staticData:x.staticData,id:x.id,routeId:x.routeId,search:_p(x.search,x.searchError),params:_p(x.params,x.paramsError),ssr:x.ssr}))},g=i.options.ssr(p);if(jo(g))return g.then(x=>{r.ssr=l(x??c)});r.ssr=l(g??c)},F2=(t,e,n,i)=>{var o;if(i._nonReactive.pendingTimeout!==void 0)return;const r=n.options.pendingMs??t.router.options.defaultPendingMs;if(!!(t.onReady&&!t.router.isServer&&!Dg(t,e)&&(n.options.loader||n.options.beforeLoad||eR(n))&&typeof r=="number"&&r!==1/0&&(n.options.pendingComponent??((o=t.router.options)==null?void 0:o.defaultPendingComponent)))){const l=setTimeout(()=>{dm(t)},r);i._nonReactive.pendingTimeout=l}},_4=(t,e,n)=>{const i=t.router.getMatch(e);if(!i._nonReactive.beforeLoadPromise&&!i._nonReactive.loaderPromise)return;F2(t,e,n,i);const r=()=>{const s=t.router.getMatch(e);s.preload&&(s.status==="redirected"||s.status==="notFound")&&Ao(t,s,s.error)};return i._nonReactive.beforeLoadPromise?i._nonReactive.beforeLoadPromise.then(r):r()},k4=(t,e,n,i)=>{var D;const r=t.router.getMatch(e),s=r._nonReactive.loadPromise;r._nonReactive.loadPromise=zc(()=>{s==null||s.resolve()});const{paramsError:o,searchError:l}=r;o&&ah(t,n,o,"PARSE_PARAMS"),l&&ah(t,n,l,"VALIDATE_SEARCH"),F2(t,e,i,r);const c=new AbortController,h=(D=t.matches[n-1])==null?void 0:D.id,d=h?t.router.getMatch(h):void 0,g={...(d==null?void 0:d.context)??t.router.options.context??void 0,...r.__routeContext};let O=!1;const x=()=>{O||(O=!0,t.updateMatch(e,Z=>({...Z,isFetching:"beforeLoad",fetchCount:Z.fetchCount+1,abortController:c,context:g})))},S=()=>{var Z;(Z=r._nonReactive.beforeLoadPromise)==null||Z.resolve(),r._nonReactive.beforeLoadPromise=void 0,t.updateMatch(e,U=>({...U,isFetching:!1}))};if(!i.options.beforeLoad){$h(()=>{x(),S()});return}r._nonReactive.beforeLoadPromise=zc();const{search:_,params:k,cause:P}=r,Q=Dg(t,e),R={search:_,abortController:c,params:k,preload:Q,context:g,location:t.location,navigate:Z=>t.router.navigate({...Z,_fromLocation:t.location}),buildLocation:t.router.buildLocation,cause:Q?"preload":P,matches:t.matches,...t.router.options.additionalContext},$=Z=>{if(Z===void 0){$h(()=>{x(),S()});return}(cr(Z)||Yi(Z))&&(x(),ah(t,n,Z,"BEFORE_LOAD")),$h(()=>{x(),t.updateMatch(e,U=>({...U,__beforeLoadContext:Z,context:{...U.context,...Z}})),S()})};let C;try{if(C=i.options.beforeLoad(R),jo(C))return x(),C.catch(Z=>{ah(t,n,Z,"BEFORE_LOAD")}).then($)}catch(Z){x(),ah(t,n,Z,"BEFORE_LOAD")}$(C)},w4=(t,e)=>{const{id:n,routeId:i}=t.matches[e],r=t.router.looseRoutesById[i],s=()=>{if(t.router.isServer){const c=S4(t,n,e,r);if(jo(c))return c.then(l)}return l()},o=()=>k4(t,n,e,r),l=()=>{if(H2(t,n))return;const c=_4(t,n,r);return jo(c)?c.then(o):o()};return s()},Lh=(t,e,n)=>{var s,o,l,c,h,d;const i=t.router.getMatch(e);if(!i||!n.options.head&&!n.options.scripts&&!n.options.headers)return;const r={matches:t.matches,match:i,params:i.params,loaderData:i.loaderData};return Promise.all([(o=(s=n.options).head)==null?void 0:o.call(s,r),(c=(l=n.options).scripts)==null?void 0:c.call(l,r),(d=(h=n.options).headers)==null?void 0:d.call(h,r)]).then(([p,g,O])=>{const x=p==null?void 0:p.meta,S=p==null?void 0:p.links,_=p==null?void 0:p.scripts,k=p==null?void 0:p.styles;return{meta:x,links:S,headScripts:_,headers:O,scripts:g,styles:k}})},K2=(t,e,n,i)=>{const r=t.matchPromises[n-1],{params:s,loaderDeps:o,abortController:l,cause:c}=t.router.getMatch(e);let h=t.router.options.context??{};for(let p=0;p<=n;p++){const g=t.matches[p];if(!g)continue;const O=t.router.getMatch(g.id);O&&(h={...h,...O.__routeContext??{},...O.__beforeLoadContext??{}})}const d=Dg(t,e);return{params:s,deps:o,preload:!!d,parentMatchPromise:r,abortController:l,context:h,location:t.location,navigate:p=>t.router.navigate({...p,_fromLocation:t.location}),cause:d?"preload":c,route:i,...t.router.options.additionalContext}},BT=async(t,e,n,i)=>{var r,s,o,l,c,h;try{const d=t.router.getMatch(e);try{(!t.router.isServer||d.ssr===!0)&&J2(i);const p=(s=(r=i.options).loader)==null?void 0:s.call(r,K2(t,e,n,i)),g=i.options.loader&&jo(p);if(!!(g||i._lazyPromise||i._componentsPromise||i.options.head||i.options.scripts||i.options.headers||d._nonReactive.minPendingPromise)&&t.updateMatch(e,k=>({...k,isFetching:"loader"})),i.options.loader){const k=g?await p:p;Ao(t,t.router.getMatch(e),k),k!==void 0&&t.updateMatch(e,P=>({...P,loaderData:k}))}i._lazyPromise&&await i._lazyPromise;const x=Lh(t,e,i),S=x?await x:void 0,_=d._nonReactive.minPendingPromise;_&&await _,i._componentsPromise&&await i._componentsPromise,t.updateMatch(e,k=>({...k,error:void 0,status:"success",isFetching:!1,updatedAt:Date.now(),...S}))}catch(p){let g=p;const O=d._nonReactive.minPendingPromise;O&&await O,Yi(p)&&await((l=(o=i.options.notFoundComponent)==null?void 0:o.preload)==null?void 0:l.call(o)),Ao(t,t.router.getMatch(e),p);try{(h=(c=i.options).onError)==null||h.call(c,p)}catch(_){g=_,Ao(t,t.router.getMatch(e),_)}const x=Lh(t,e,i),S=x?await x:void 0;t.updateMatch(e,_=>({..._,error:g,status:"error",isFetching:!1,...S}))}}catch(d){const p=t.router.getMatch(e);if(p){const g=Lh(t,e,i);if(g){const O=await g;t.updateMatch(e,x=>({...x,...O}))}p._nonReactive.loaderPromise=void 0}Ao(t,p,d)}},P4=async(t,e)=>{var h,d;const{id:n,routeId:i}=t.matches[e];let r=!1,s=!1;const o=t.router.looseRoutesById[i];if(H2(t,n)){if(t.router.isServer){const p=Lh(t,n,o);if(p){const g=await p;t.updateMatch(n,O=>({...O,...g}))}return t.router.getMatch(n)}}else{const p=t.router.getMatch(n);if(p._nonReactive.loaderPromise){if(p.status==="success"&&!t.sync&&!p.preload)return p;await p._nonReactive.loaderPromise;const g=t.router.getMatch(n),O=g._nonReactive.error||g.error;O&&Ao(t,g,O)}else{const g=Date.now()-p.updatedAt,O=Dg(t,n),x=O?o.options.preloadStaleTime??t.router.options.defaultPreloadStaleTime??3e4:o.options.staleTime??t.router.options.defaultStaleTime??0,S=o.options.shouldReload,_=typeof S=="function"?S(K2(t,n,e,o)):S,k=!!O&&!t.router.state.matches.some($=>$.id===n),P=t.router.getMatch(n);P._nonReactive.loaderPromise=zc(),k!==P.preload&&t.updateMatch(n,$=>({...$,preload:k}));const{status:Q,invalid:R}=P;if(r=Q==="success"&&(R||(_??g>x)),!(O&&o.options.preload===!1))if(r&&!t.sync)s=!0,(async()=>{var $,C;try{await BT(t,n,e,o);const D=t.router.getMatch(n);($=D._nonReactive.loaderPromise)==null||$.resolve(),(C=D._nonReactive.loadPromise)==null||C.resolve(),D._nonReactive.loaderPromise=void 0}catch(D){cr(D)&&await t.router.navigate(D.options)}})();else if(Q!=="success"||r&&t.sync)await BT(t,n,e,o);else{const $=Lh(t,n,o);if($){const C=await $;t.updateMatch(n,D=>({...D,...C}))}}}}const l=t.router.getMatch(n);s||((h=l._nonReactive.loaderPromise)==null||h.resolve(),(d=l._nonReactive.loadPromise)==null||d.resolve()),clearTimeout(l._nonReactive.pendingTimeout),l._nonReactive.pendingTimeout=void 0,s||(l._nonReactive.loaderPromise=void 0),l._nonReactive.dehydrated=void 0;const c=s?l.isFetching:!1;return c!==l.isFetching||l.invalid!==!1?(t.updateMatch(n,p=>({...p,isFetching:c,invalid:!1})),t.router.getMatch(n)):l};async function ZT(t){const e=Object.assign(t,{matchPromises:[]});!e.router.isServer&&e.router.state.matches.some(n=>n._forcePending)&&dm(e);try{for(let r=0;r<e.matches.length;r++){const s=w4(e,r);jo(s)&&await s}const n=e.firstBadMatchIndex??e.matches.length;for(let r=0;r<n;r++)e.matchPromises.push(P4(e,r));await Promise.all(e.matchPromises);const i=dm(e);jo(i)&&await i}catch(n){if(Yi(n)&&!e.preload){const i=dm(e);throw jo(i)&&await i,n}if(cr(n))throw n}return e.matches}async function J2(t){if(!t._lazyLoaded&&t._lazyPromise===void 0&&(t.lazyFn?t._lazyPromise=t.lazyFn().then(e=>{const{id:n,...i}=e.options;Object.assign(t.options,i),t._lazyLoaded=!0,t._lazyPromise=void 0}):t._lazyLoaded=!0),!t._componentsLoaded&&t._componentsPromise===void 0){const e=()=>{var i;const n=[];for(const r of tR){const s=(i=t.options[r])==null?void 0:i.preload;s&&n.push(s())}if(n.length)return Promise.all(n).then(()=>{t._componentsLoaded=!0,t._componentsPromise=void 0});t._componentsLoaded=!0,t._componentsPromise=void 0};t._componentsPromise=t._lazyPromise?t._lazyPromise.then(e):e()}return t._componentsPromise}function _p(t,e){return e?{status:"error",error:e}:{status:"success",value:t}}function eR(t){var e;for(const n of tR)if((e=t.options[n])!=null&&e.preload)return!0;return!1}const tR=["component","errorComponent","pendingComponent","notFoundComponent"];function T4(t){return{input:({url:e})=>{for(const n of t)e=nR(n,e);return e},output:({url:e})=>{for(let n=t.length-1;n>=0;n--)e=iR(t[n],e);return e}}}function Q4(t){const e=fm(t.basepath),n=`/${e}`,i=`${n}/`,r=t.caseSensitive?n:n.toLowerCase(),s=t.caseSensitive?i:i.toLowerCase();return{input:({url:o})=>{const l=t.caseSensitive?o.pathname:o.pathname.toLowerCase();return l===r?o.pathname="/":l.startsWith(s)&&(o.pathname=o.pathname.slice(n.length)),o},output:({url:o})=>(o.pathname=hm(["/",e,o.pathname]),o)}}function nR(t,e){var i;const n=(i=t==null?void 0:t.input)==null?void 0:i.call(t,{url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function iR(t,e){var i;const n=(i=t==null?void 0:t.output)==null?void 0:i.call(t,{url:e});if(n){if(typeof n=="string")return new URL(n);if(n instanceof URL)return n}return e}function Za(t){const e=t.resolvedLocation,n=t.location,i=(e==null?void 0:e.pathname)!==n.pathname,r=(e==null?void 0:e.href)!==n.href,s=(e==null?void 0:e.hash)!==n.hash;return{fromLocation:e,toLocation:n,pathChanged:i,hrefChanged:r,hashChanged:s}}class C4{constructor(e){this.tempLocationKey=`${Math.round(Math.random()*1e7)}`,this.resetNextScroll=!0,this.shouldViewTransition=void 0,this.isViewTransitionTypesSupported=void 0,this.subscribers=new Set,this.isScrollRestoring=!1,this.isScrollRestorationSetup=!1,this.startTransition=n=>n(),this.update=n=>{var g;n.notFoundRoute&&console.warn("The notFoundRoute API is deprecated and will be removed in the next major version. See https://tanstack.com/router/v1/docs/framework/react/guide/not-found-errors#migrating-from-notfoundroute for more info.");const i=this.options,r=this.basepath??(i==null?void 0:i.basepath)??"/",s=this.basepath===void 0,o=i==null?void 0:i.rewrite;this.options={...i,...n},this.isServer=this.options.isServer??typeof document>"u",this.pathParamsDecodeCharMap=this.options.pathParamsAllowedCharacters?new Map(this.options.pathParamsAllowedCharacters.map(O=>[encodeURIComponent(O),O])):void 0,(!this.history||this.options.history&&this.options.history!==this.history)&&(this.options.history?this.history=this.options.history:this.isServer||(this.history=BI())),this.origin=this.options.origin,this.origin||(!this.isServer&&(window!=null&&window.origin)&&window.origin!=="null"?this.origin=window.origin:this.origin="http://localhost"),this.history&&this.updateLatestLocation(),this.options.routeTree!==this.routeTree&&(this.routeTree=this.options.routeTree,this.buildRouteTree()),!this.__store&&this.latestLocation&&(this.__store=new XI(A4(this.latestLocation),{onUpdate:()=>{this.__store.state={...this.state,cachedMatches:this.state.cachedMatches.filter(O=>!["redirected"].includes(O.status))}}}),d4(this));let l=!1;const c=this.options.basepath??"/",h=this.options.rewrite;if(s||r!==c||o!==h){this.basepath=c;const O=[];fm(c)!==""&&O.push(Q4({basepath:c})),h&&O.push(h),this.rewrite=O.length===0?void 0:O.length===1?O[0]:T4(O),this.history&&this.updateLatestLocation(),l=!0}l&&this.__store&&(this.__store.state={...this.state,location:this.latestLocation}),typeof window<"u"&&"CSS"in window&&typeof((g=window.CSS)==null?void 0:g.supports)=="function"&&(this.isViewTransitionTypesSupported=window.CSS.supports("selector(:active-view-transition-type(a)"))},this.updateLatestLocation=()=>{this.latestLocation=this.parseLocation(this.history.location,this.latestLocation)},this.buildRouteTree=()=>{const{routesById:n,routesByPath:i,processedTree:r}=t4(this.routeTree,this.options.caseSensitive,(o,l)=>{o.init({originalIndex:l})});this.options.routeMasks&&HI(this.options.routeMasks,r),this.routesById=n,this.routesByPath=i,this.processedTree=r;const s=this.options.notFoundRoute;s&&(s.init({originalIndex:99999999999}),this.routesById[s.id]=s)},this.subscribe=(n,i)=>{const r={eventType:n,fn:i};return this.subscribers.add(r),()=>{this.subscribers.delete(r)}},this.emit=n=>{this.subscribers.forEach(i=>{i.eventType===n.type&&i.fn(n)})},this.parseLocation=(n,i)=>{const r=({href:c,state:h})=>{const d=new URL(c,this.origin),p=nR(this.rewrite,d),g=this.options.parseSearch(p.search),O=this.options.stringifySearch(g);p.search=O;const x=p.href.replace(p.origin,""),{pathname:S,hash:_}=p;return{href:x,publicHref:c,url:p.href,pathname:VT(S),searchStr:O,search:zi(i==null?void 0:i.search,g),hash:_.split("#").reverse()[0]??"",state:zi(i==null?void 0:i.state,h)}},s=r(n),{__tempLocation:o,__tempKey:l}=s.state;if(o&&(!l||l===this.tempLocationKey)){const c=r(o);return c.state.key=s.state.key,c.state.__TSR_key=s.state.__TSR_key,delete c.state.__tempLocation,{...c,maskedLocation:s}}return s},this.resolvePathCache=jm(1e3),this.resolvePathWithBase=(n,i)=>a4({base:n,to:kv(i),trailingSlash:this.options.trailingSlash,cache:this.resolvePathCache}),this.matchRoutes=(n,i,r)=>typeof n=="string"?this.matchRoutesInternal({pathname:n,search:i},r):this.matchRoutesInternal(n,i),this.getMatchedRoutes=n=>R4({pathname:n,routesById:this.routesById,processedTree:this.processedTree}),this.cancelMatch=n=>{const i=this.getMatch(n);i&&(i.abortController.abort(),clearTimeout(i._nonReactive.pendingTimeout),i._nonReactive.pendingTimeout=void 0)},this.cancelMatches=()=>{const n=this.state.matches.filter(s=>s.status==="pending"),i=this.state.matches.filter(s=>s.isFetching==="loader");new Set([...this.state.pendingMatches??[],...n,...i]).forEach(s=>{this.cancelMatch(s.id)})},this.buildLocation=n=>{const i=(s={})=>{var M,V;const o=s._fromLocation||this.pendingBuiltLocation||this.latestLocation,l=this.matchRoutes(o,{_buildLocation:!0}),c=Mm(l);s.from;const h=s.unsafeRelative==="path"?o.pathname:s.from??c.fullPath,d=this.resolvePathWithBase(h,"."),p=c.search,g={...c.params},O=s.to?this.resolvePathWithBase(d,`${s.to}`):this.resolvePathWithBase(d,"."),x=s.params===!1||s.params===null?{}:(s.params??!0)===!0?g:Object.assign(g,Xa(s.params,g)),S=Zy({path:O,params:x}).interpolatedPath,_=this.matchRoutes(S,void 0,{_buildLocation:!0}).map(G=>this.looseRoutesById[G.routeId]);if(Object.keys(x).length>0)for(const G of _){const J=((M=G.options.params)==null?void 0:M.stringify)??G.options.stringifyParams;J&&Object.assign(x,J(x))}const k=n.leaveParams?O:VT(Zy({path:O,params:x,decodeCharMap:this.pathParamsDecodeCharMap}).interpolatedPath);let P=p;if(n._includeValidateSearch&&((V=this.options.search)!=null&&V.strict)){const G={};_.forEach(J=>{if(J.options.validateSearch)try{Object.assign(G,Rx(J.options.validateSearch,{...G,...P}))}catch{}}),P=G}P=$4({search:P,dest:s,destRoutes:_,_includeValidateSearch:n._includeValidateSearch}),P=zi(p,P);const Q=this.options.stringifySearch(P),R=s.hash===!0?o.hash:s.hash?Xa(s.hash,o.hash):void 0,$=R?`#${R}`:"";let C=s.state===!0?o.state:s.state?Xa(s.state,o.state):{};C=zi(o.state,C);const D=`${k}${Q}${$}`,Z=new URL(D,this.origin),U=iR(this.rewrite,Z);return{publicHref:U.pathname+U.search+U.hash,href:D,url:U.href,pathname:k,search:P,searchStr:Q,state:C,hash:R??"",unmaskOnReload:s.unmaskOnReload}},r=(s={},o)=>{const l=i(s);let c=o?i(o):void 0;if(!c){const h={};if(this.options.routeMasks){const d=FI(l.pathname,this.processedTree);if(d){Object.assign(h,d.params);const{from:p,...g}=d.route;o={from:n.from,...g,params:h},c=i(o)}}}return c&&(l.maskedLocation=c),l};return n.mask?r(n,{from:n.from,...n.mask}):r(n)},this.commitLocation=({viewTransition:n,ignoreBlocker:i,...r})=>{const s=()=>{const c=["key","__TSR_key","__TSR_index","__hashScrollIntoViewOptions"];c.forEach(d=>{r.state[d]=this.latestLocation.state[d]});const h=Va(r.state,this.latestLocation.state);return c.forEach(d=>{delete r.state[d]}),h},o=Ba(this.latestLocation.href)===Ba(r.href),l=this.commitLocationPromise;if(this.commitLocationPromise=zc(()=>{l==null||l.resolve()}),o&&s())this.load();else{let{maskedLocation:c,hashScrollIntoView:h,...d}=r;c&&(d={...c,state:{...c.state,__tempKey:void 0,__tempLocation:{...d,search:d.searchStr,state:{...d.state,__tempKey:void 0,__tempLocation:void 0,__TSR_key:void 0,key:void 0}}}},(d.unmaskOnReload??this.options.unmaskOnReload??!1)&&(d.state.__tempKey=this.tempLocationKey)),d.state.__hashScrollIntoViewOptions=h??this.options.defaultHashScrollIntoView??!0,this.shouldViewTransition=n,this.history[r.replace?"replace":"push"](d.publicHref,d.state,{ignoreBlocker:i})}return this.resetNextScroll=r.resetScroll??!0,this.history.subscribers.size||this.load(),this.commitLocationPromise},this.buildAndCommitLocation=({replace:n,resetScroll:i,hashScrollIntoView:r,viewTransition:s,ignoreBlocker:o,href:l,...c}={})=>{if(l){const p=this.history.location.state.__TSR_index,g=Lm(l,{__TSR_index:n?p:p+1});c.to=g.pathname,c.search=this.options.parseSearch(g.search),c.hash=g.hash.slice(1)}const h=this.buildLocation({...c,_includeValidateSearch:!0});this.pendingBuiltLocation=h;const d=this.commitLocation({...h,viewTransition:s,replace:n,resetScroll:i,hashScrollIntoView:r,ignoreBlocker:o});return Promise.resolve().then(()=>{this.pendingBuiltLocation===h&&(this.pendingBuiltLocation=void 0)}),d},this.navigate=async({to:n,reloadDocument:i,href:r,...s})=>{var o;if(!i&&r)try{new URL(`${r}`),i=!0}catch{}if(i){if(r||(r=this.buildLocation({to:n,...s}).url),!s.ignoreBlocker){const l=this.history,c=((o=l.getBlockers)==null?void 0:o.call(l))??[];for(const h of c)if(h!=null&&h.blockerFn&&await h.blockerFn({currentLocation:this.latestLocation,nextLocation:this.latestLocation,action:"PUSH"}))return Promise.resolve()}return s.replace?window.location.replace(r):window.location.href=r,Promise.resolve()}return this.buildAndCommitLocation({...s,href:r,to:n,_isNavigate:!0})},this.beforeLoad=()=>{if(this.cancelMatches(),this.updateLatestLocation(),this.isServer){const i=this.buildLocation({to:this.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0}),r=s=>{try{return encodeURI(decodeURI(s))}catch{return s}};if(fm(r(this.latestLocation.href))!==fm(r(i.href))){let s=i.url;throw this.origin&&s.startsWith(this.origin)&&(s=s.replace(this.origin,"")||"/"),v4({href:s})}}const n=this.matchRoutes(this.latestLocation);this.__store.setState(i=>({...i,status:"pending",statusCode:200,isLoading:!0,location:this.latestLocation,pendingMatches:n,cachedMatches:i.cachedMatches.filter(r=>!n.some(s=>s.id===r.id))}))},this.load=async n=>{let i,r,s;for(s=new Promise(l=>{this.startTransition(async()=>{var c;try{this.beforeLoad();const h=this.latestLocation,d=this.state.resolvedLocation;this.state.redirect||this.emit({type:"onBeforeNavigate",...Za({resolvedLocation:d,location:h})}),this.emit({type:"onBeforeLoad",...Za({resolvedLocation:d,location:h})}),await ZT({router:this,sync:n==null?void 0:n.sync,matches:this.state.pendingMatches,location:h,updateMatch:this.updateMatch,onReady:async()=>{this.startTransition(()=>{this.startViewTransition(async()=>{let p=[],g=[],O=[];$h(()=>{this.__store.setState(x=>{const S=x.matches,_=x.pendingMatches||x.matches;return p=S.filter(k=>!_.some(P=>P.id===k.id)),g=_.filter(k=>!S.some(P=>P.id===k.id)),O=_.filter(k=>S.some(P=>P.id===k.id)),{...x,isLoading:!1,loadedAt:Date.now(),matches:_,pendingMatches:void 0,cachedMatches:[...x.cachedMatches,...p.filter(k=>k.status!=="error"&&k.status!=="notFound")]}}),this.clearExpiredCache()}),[[p,"onLeave"],[g,"onEnter"],[O,"onStay"]].forEach(([x,S])=>{x.forEach(_=>{var k,P;(P=(k=this.looseRoutesById[_.routeId].options)[S])==null||P.call(k,_)})})})})}})}catch(h){cr(h)?(i=h,this.isServer||this.navigate({...i.options,replace:!0,ignoreBlocker:!0})):Yi(h)&&(r=h),this.__store.setState(d=>({...d,statusCode:i?i.status:r?404:d.matches.some(p=>p.status==="error")?500:200,redirect:i}))}this.latestLoadPromise===s&&((c=this.commitLocationPromise)==null||c.resolve(),this.latestLoadPromise=void 0,this.commitLocationPromise=void 0),l()})}),this.latestLoadPromise=s,await s;this.latestLoadPromise&&s!==this.latestLoadPromise;)await this.latestLoadPromise;let o;this.hasNotFoundMatch()?o=404:this.__store.state.matches.some(l=>l.status==="error")&&(o=500),o!==void 0&&this.__store.setState(l=>({...l,statusCode:o}))},this.startViewTransition=n=>{const i=this.shouldViewTransition??this.options.defaultViewTransition;if(delete this.shouldViewTransition,i&&typeof document<"u"&&"startViewTransition"in document&&typeof document.startViewTransition=="function"){let r;if(typeof i=="object"&&this.isViewTransitionTypesSupported){const s=this.latestLocation,o=this.state.resolvedLocation,l=typeof i.types=="function"?i.types(Za({resolvedLocation:o,location:s})):i.types;if(l===!1){n();return}r={update:n,types:l}}else r=n;document.startViewTransition(r)}else n()},this.updateMatch=(n,i)=>{this.startTransition(()=>{var s;const r=(s=this.state.pendingMatches)!=null&&s.some(o=>o.id===n)?"pendingMatches":this.state.matches.some(o=>o.id===n)?"matches":this.state.cachedMatches.some(o=>o.id===n)?"cachedMatches":"";r&&this.__store.setState(o=>{var l;return{...o,[r]:(l=o[r])==null?void 0:l.map(c=>c.id===n?i(c):c)}})})},this.getMatch=n=>{var r;const i=s=>s.id===n;return this.state.cachedMatches.find(i)??((r=this.state.pendingMatches)==null?void 0:r.find(i))??this.state.matches.find(i)},this.invalidate=n=>{const i=r=>{var s;return((s=n==null?void 0:n.filter)==null?void 0:s.call(n,r))??!0?{...r,invalid:!0,...n!=null&&n.forcePending||r.status==="error"||r.status==="notFound"?{status:"pending",error:void 0}:void 0}:r};return this.__store.setState(r=>{var s;return{...r,matches:r.matches.map(i),cachedMatches:r.cachedMatches.map(i),pendingMatches:(s=r.pendingMatches)==null?void 0:s.map(i)}}),this.shouldViewTransition=!1,this.load({sync:n==null?void 0:n.sync})},this.resolveRedirect=n=>{if(!n.options.href){const i=this.buildLocation(n.options);let r=i.url;this.origin&&r.startsWith(this.origin)&&(r=r.replace(this.origin,"")||"/"),n.options.href=i.href,n.headers.set("Location",r)}return n.headers.get("Location")||n.headers.set("Location",n.options.href),n},this.clearCache=n=>{const i=n==null?void 0:n.filter;i!==void 0?this.__store.setState(r=>({...r,cachedMatches:r.cachedMatches.filter(s=>!i(s))})):this.__store.setState(r=>({...r,cachedMatches:[]}))},this.clearExpiredCache=()=>{const n=i=>{const r=this.looseRoutesById[i.routeId];if(!r.options.loader)return!0;const s=(i.preload?r.options.preloadGcTime??this.options.defaultPreloadGcTime:r.options.gcTime??this.options.defaultGcTime)??300*1e3;return i.status==="error"?!0:Date.now()-i.updatedAt>=s};this.clearCache({filter:n})},this.loadRouteChunk=J2,this.preloadRoute=async n=>{const i=this.buildLocation(n);let r=this.matchRoutes(i,{throwOnError:!0,preload:!0,dest:n});const s=new Set([...this.state.matches,...this.state.pendingMatches??[]].map(l=>l.id)),o=new Set([...s,...this.state.cachedMatches.map(l=>l.id)]);$h(()=>{r.forEach(l=>{o.has(l.id)||this.__store.setState(c=>({...c,cachedMatches:[...c.cachedMatches,l]}))})});try{return r=await ZT({router:this,matches:r,location:i,preload:!0,updateMatch:(l,c)=>{s.has(l)?r=r.map(h=>h.id===l?c(h):h):this.updateMatch(l,c)}}),r}catch(l){if(cr(l))return l.options.reloadDocument?void 0:await this.preloadRoute({...l.options,_fromLocation:i});Yi(l)||console.error(l);return}},this.matchRoute=(n,i)=>{const r={...n,to:n.to?this.resolvePathWithBase(n.from||"",n.to):void 0,params:n.params||{},leaveParams:!0},s=this.buildLocation(r);if(i!=null&&i.pending&&this.state.status!=="pending")return!1;const l=((i==null?void 0:i.pending)===void 0?!this.state.isLoading:i.pending)?this.latestLocation:this.state.resolvedLocation||this.state.location,c=KI(s.pathname,(i==null?void 0:i.caseSensitive)??!1,(i==null?void 0:i.fuzzy)??!1,l.pathname,this.processedTree);return!c||n.params&&!Va(c.params,n.params,{partial:!0})?!1:(i==null?void 0:i.includeSearch)??!0?Va(l.search,s.search,{partial:!0})?c.params:!1:c.params},this.hasNotFoundMatch=()=>this.__store.state.matches.some(n=>n.status==="notFound"||n.globalNotFound),this.update({defaultPreloadDelay:50,defaultPendingMs:1e3,defaultPendingMinMs:500,context:void 0,...e,caseSensitive:e.caseSensitive??!1,notFoundMode:e.notFoundMode??"fuzzy",stringifySearch:e.stringifySearch??y4,parseSearch:e.parseSearch??O4}),typeof document<"u"&&(self.__TSR_ROUTER__=this)}isShell(){return!!this.options.isShell}isPrerendering(){return!!this.options.isPrerendering}get state(){return this.__store.state}get looseRoutesById(){return this.routesById}matchRoutesInternal(e,n){const i=this.getMatchedRoutes(e.pathname),{foundRoute:r,routeParams:s}=i;let{matchedRoutes:o}=i,l=!1;(r?r.path!=="/"&&s["**"]:Ba(e.pathname))&&(this.options.notFoundRoute?o=[...o,this.options.notFoundRoute]:l=!0);const c=(()=>{if(l){if(this.options.notFoundMode!=="root")for(let p=o.length-1;p>=0;p--){const g=o[p];if(g.children)return g.id}return Si}})(),h=[],d=p=>(p==null?void 0:p.id)?p.context??this.options.context??void 0:this.options.context??void 0;return o.forEach((p,g)=>{var J,K,ie;const O=h[g-1],[x,S,_]=(()=>{const q=(O==null?void 0:O.search)??e.search,se=(O==null?void 0:O._strictSearch)??void 0;try{const pe=Rx(p.options.validateSearch,{...q})??void 0;return[{...q,...pe},{...se,...pe},void 0]}catch(pe){let ve=pe;if(pe instanceof Xm||(ve=new Xm(pe.message,{cause:pe})),n!=null&&n.throwOnError)throw ve;return[q,{},ve]}})(),k=((K=(J=p.options).loaderDeps)==null?void 0:K.call(J,{search:x}))??"",P=k?JSON.stringify(k):"",{interpolatedPath:Q,usedParams:R}=Zy({path:p.fullPath,params:s,decodeCharMap:this.pathParamsDecodeCharMap}),$=p.id+Q+P,C=this.getMatch($),D=this.state.matches.find(q=>q.routeId===p.id),Z=(C==null?void 0:C._strictParams)??R;let U;if(!C){const q=((ie=p.options.params)==null?void 0:ie.parse)??p.options.parseParams;if(q)try{Object.assign(Z,q(Z))}catch(se){if(Yi(se)||cr(se)?U=se:U=new E4(se.message,{cause:se}),n!=null&&n.throwOnError)throw U}}Object.assign(s,Z);const M=D?"stay":"enter";let V;if(C)V={...C,cause:M,params:D?zi(D.params,s):s,_strictParams:Z,search:zi(D?D.search:C.search,x),_strictSearch:S};else{const q=p.options.loader||p.options.beforeLoad||p.lazyFn||eR(p)?"pending":"success";V={id:$,index:g,routeId:p.id,params:D?zi(D.params,s):s,_strictParams:Z,pathname:Q,updatedAt:Date.now(),search:D?zi(D.search,x):x,_strictSearch:S,searchError:void 0,status:q,isFetching:!1,error:void 0,paramsError:U,__routeContext:void 0,_nonReactive:{loadPromise:zc()},__beforeLoadContext:void 0,context:{},abortController:new AbortController,fetchCount:0,cause:M,loaderDeps:D?zi(D.loaderDeps,k):k,invalid:!1,preload:!1,links:void 0,scripts:void 0,headScripts:void 0,meta:void 0,staticData:p.options.staticData||{},fullPath:p.fullPath}}n!=null&&n.preload||(V.globalNotFound=c===p.id),V.searchError=_;const G=d(O);V.context={...G,...V.__routeContext,...V.__beforeLoadContext},h.push(V)}),h.forEach((p,g)=>{const O=this.looseRoutesById[p.routeId];if(!this.getMatch(p.id)&&(n==null?void 0:n._buildLocation)!==!0){const S=h[g-1],_=d(S);if(O.options.context){const k={deps:p.loaderDeps,params:p.params,context:_??{},location:e,navigate:P=>this.navigate({...P,_fromLocation:e}),buildLocation:this.buildLocation,cause:p.cause,abortController:p.abortController,preload:!!p.preload,matches:h};p.__routeContext=O.options.context(k)??void 0}p.context={..._,...p.__routeContext,...p.__beforeLoadContext}}}),h}}class Xm extends Error{}class E4 extends Error{}function A4(t){return{loadedAt:0,isLoading:!1,isTransitioning:!1,status:"idle",resolvedLocation:void 0,location:t,matches:[],pendingMatches:[],cachedMatches:[],statusCode:200}}function Rx(t,e){if(t==null)return{};if("~standard"in t){const n=t["~standard"].validate(e);if(n instanceof Promise)throw new Xm("Async validation not supported");if(n.issues)throw new Xm(JSON.stringify(n.issues,void 0,2),{cause:n});return n.value}return"parse"in t?t.parse(e):typeof t=="function"?t(e):{}}function R4({pathname:t,routesById:e,processedTree:n}){const i={},r=Ba(t);let s;const o=JI(r,n,!0);return o&&(s=o.route,Object.assign(i,o.params)),{matchedRoutes:(o==null?void 0:o.branch)||[e[Si]],routeParams:i,foundRoute:s}}function $4({search:t,dest:e,destRoutes:n,_includeValidateSearch:i}){const r=n.reduce((l,c)=>{var d;const h=[];if("search"in c.options)(d=c.options.search)!=null&&d.middlewares&&h.push(...c.options.search.middlewares);else if(c.options.preSearchFilters||c.options.postSearchFilters){const p=({search:g,next:O})=>{let x=g;"preSearchFilters"in c.options&&c.options.preSearchFilters&&(x=c.options.preSearchFilters.reduce((_,k)=>k(_),g));const S=O(x);return"postSearchFilters"in c.options&&c.options.postSearchFilters?c.options.postSearchFilters.reduce((_,k)=>k(_),S):S};h.push(p)}if(i&&c.options.validateSearch){const p=({search:g,next:O})=>{const x=O(g);try{return{...x,...Rx(c.options.validateSearch,x)??void 0}}catch{return x}};h.push(p)}return l.concat(h)},[])??[],s=({search:l})=>e.search?e.search===!0?l:Xa(e.search,l):{};r.push(s);const o=(l,c)=>{if(l>=r.length)return c;const h=r[l];return h({search:c,next:p=>o(l+1,p)})};return o(0,t)}const L4="Error preloading route! ☝️";class rR{constructor(e){if(this.init=n=>{var h,d;this.originalIndex=n.originalIndex;const i=this.options,r=!(i!=null&&i.path)&&!(i!=null&&i.id);this.parentRoute=(d=(h=this.options).getParentRoute)==null?void 0:d.call(h),r?this._path=Si:this.parentRoute||Rs(!1);let s=r?Si:i==null?void 0:i.path;s&&s!=="/"&&(s=U2(s));const o=(i==null?void 0:i.id)||s;let l=r?Si:hm([this.parentRoute.id===Si?"":this.parentRoute.id,o]);s===Si&&(s="/"),l!==Si&&(l=hm(["/",l]));const c=l===Si?"/":hm([this.parentRoute.fullPath,s]);this._path=s,this._id=l,this._fullPath=c,this._to=c},this.addChildren=n=>this._addFileChildren(n),this._addFileChildren=n=>(Array.isArray(n)&&(this.children=n),typeof n=="object"&&n!==null&&(this.children=Object.values(n)),this),this._addFileTypes=()=>this,this.updateLoader=n=>(Object.assign(this.options,n),this),this.update=n=>(Object.assign(this.options,n),this),this.lazy=n=>(this.lazyFn=n,this),this.options=e||{},this.isRoot=!(e!=null&&e.getParentRoute),e!=null&&e.id&&(e!=null&&e.path))throw new Error("Route cannot have both an 'id' and a 'path' option.")}get to(){return this._to}get id(){return this._id}get path(){return this._path}get fullPath(){return this._fullPath}}class M4{constructor({id:e}){this.notFound=n=>Y2({routeId:this.id,...n}),this.id=e}}class D4 extends rR{constructor(e){super(e)}}function wv(t){const e=t.errorComponent??jg;return v.jsx(j4,{getResetKey:t.getResetKey,onCatch:t.onCatch,children:({error:n,reset:i})=>n?B.createElement(e,{error:n,reset:i}):t.children})}class j4 extends B.Component{constructor(){super(...arguments),this.state={error:null}}static getDerivedStateFromProps(e){return{resetKey:e.getResetKey()}}static getDerivedStateFromError(e){return{error:e}}reset(){this.setState({error:null})}componentDidUpdate(e,n){n.error&&n.resetKey!==this.state.resetKey&&this.reset()}componentDidCatch(e,n){this.props.onCatch&&this.props.onCatch(e,n)}render(){return this.props.children({error:this.state.resetKey!==this.props.getResetKey()?null:this.state.error,reset:()=>{this.reset()}})}}function jg({error:t}){const[e,n]=B.useState(!1);return v.jsxs("div",{style:{padding:".5rem",maxWidth:"100%"},children:[v.jsxs("div",{style:{display:"flex",alignItems:"center",gap:".5rem"},children:[v.jsx("strong",{style:{fontSize:"1rem"},children:"Something went wrong!"}),v.jsx("button",{style:{appearance:"none",fontSize:".6em",border:"1px solid currentColor",padding:".1rem .2rem",fontWeight:"bold",borderRadius:".25rem"},onClick:()=>n(i=>!i),children:e?"Hide Error":"Show Error"})]}),v.jsx("div",{style:{height:".25rem"}}),e?v.jsx("div",{children:v.jsx("pre",{style:{fontSize:".7em",border:"1px solid red",borderRadius:".25rem",padding:".3rem",color:"red",overflow:"auto"},children:t.message?v.jsx("code",{children:t.message}):null})}):null]})}function N4({children:t,fallback:e=null}){return z4()?v.jsx(Nc.Fragment,{children:t}):v.jsx(Nc.Fragment,{children:e})}function z4(){return Nc.useSyncExternalStore(I4,()=>!0,()=>!1)}function I4(){return()=>{}}var Uy={exports:{}},Yy={},Gy={exports:{}},Wy={};/**
51
+ * @license React
52
+ * use-sync-external-store-shim.production.js
53
+ *
54
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
55
+ *
56
+ * This source code is licensed under the MIT license found in the
57
+ * LICENSE file in the root directory of this source tree.
58
+ */var qT;function X4(){if(qT)return Wy;qT=1;var t=Xf();function e(p,g){return p===g&&(p!==0||1/p===1/g)||p!==p&&g!==g}var n=typeof Object.is=="function"?Object.is:e,i=t.useState,r=t.useEffect,s=t.useLayoutEffect,o=t.useDebugValue;function l(p,g){var O=g(),x=i({inst:{value:O,getSnapshot:g}}),S=x[0].inst,_=x[1];return s(function(){S.value=O,S.getSnapshot=g,c(S)&&_({inst:S})},[p,O,g]),r(function(){return c(S)&&_({inst:S}),p(function(){c(S)&&_({inst:S})})},[p]),o(O),O}function c(p){var g=p.getSnapshot;p=p.value;try{var O=g();return!n(p,O)}catch{return!0}}function h(p,g){return g()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?h:l;return Wy.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:d,Wy}var UT;function V4(){return UT||(UT=1,Gy.exports=X4()),Gy.exports}/**
59
+ * @license React
60
+ * use-sync-external-store-shim/with-selector.production.js
61
+ *
62
+ * Copyright (c) Meta Platforms, Inc. and affiliates.
63
+ *
64
+ * This source code is licensed under the MIT license found in the
65
+ * LICENSE file in the root directory of this source tree.
66
+ */var YT;function B4(){if(YT)return Yy;YT=1;var t=Xf(),e=V4();function n(h,d){return h===d&&(h!==0||1/h===1/d)||h!==h&&d!==d}var i=typeof Object.is=="function"?Object.is:n,r=e.useSyncExternalStore,s=t.useRef,o=t.useEffect,l=t.useMemo,c=t.useDebugValue;return Yy.useSyncExternalStoreWithSelector=function(h,d,p,g,O){var x=s(null);if(x.current===null){var S={hasValue:!1,value:null};x.current=S}else S=x.current;x=l(function(){function k(C){if(!P){if(P=!0,Q=C,C=g(C),O!==void 0&&S.hasValue){var D=S.value;if(O(D,C))return R=D}return R=C}if(D=R,i(Q,C))return D;var Z=g(C);return O!==void 0&&O(D,Z)?(Q=C,D):(Q=C,R=Z)}var P=!1,Q,R,$=p===void 0?null:p;return[function(){return k(d())},$===null?void 0:function(){return k($())}]},[d,p,g,O]);var _=r(h,x[0],x[1]);return o(function(){S.hasValue=!0,S.value=_},[_]),c(_),_},Yy}var GT;function Z4(){return GT||(GT=1,Uy.exports=B4()),Uy.exports}var q4=Z4();function U4(t,e=i=>i,n={}){const i=n.equal??Y4;return q4.useSyncExternalStoreWithSelector(t.subscribe,()=>t.state,()=>t.state,e,i)}function Y4(t,e){if(Object.is(t,e))return!0;if(typeof t!="object"||t===null||typeof e!="object"||e===null)return!1;if(t instanceof Map&&e instanceof Map){if(t.size!==e.size)return!1;for(const[i,r]of t)if(!e.has(i)||!Object.is(r,e.get(i)))return!1;return!0}if(t instanceof Set&&e instanceof Set){if(t.size!==e.size)return!1;for(const i of t)if(!e.has(i))return!1;return!0}if(t instanceof Date&&e instanceof Date)return t.getTime()===e.getTime();const n=WT(t);if(n.length!==WT(e).length)return!1;for(let i=0;i<n.length;i++)if(!Object.prototype.hasOwnProperty.call(e,n[i])||!Object.is(t[n[i]],e[n[i]]))return!1;return!0}function WT(t){return Object.keys(t).concat(Object.getOwnPropertySymbols(t))}const Hy=B.createContext(null);function sR(){return typeof document>"u"?Hy:window.__TSR_ROUTER_CONTEXT__?window.__TSR_ROUTER_CONTEXT__:(window.__TSR_ROUTER_CONTEXT__=Hy,Hy)}function Xn(t){const e=B.useContext(sR());return t==null||t.warn,e}function Nn(t){const e=Xn({warn:(t==null?void 0:t.router)===void 0}),n=(t==null?void 0:t.router)||e,i=B.useRef(void 0);return U4(n.__store,r=>{if(t!=null&&t.select){if(t.structuralSharing??n.options.defaultStructuralSharing){const s=zi(i.current,t.select(r));return i.current=s,s}return t.select(r)}return r})}const Ng=B.createContext(void 0),G4=B.createContext(void 0);function Hi(t){const e=B.useContext(t.from?G4:Ng);return Nn({select:i=>{const r=i.matches.find(s=>t.from?t.from===s.routeId:s.id===e);if(Rs(!((t.shouldThrow??!0)&&!r),`Could not find ${t.from?`an active match from "${t.from}"`:"a nearest match!"}`),r!==void 0)return t.select?t.select(r):r},structuralSharing:t.structuralSharing})}function zg(t){return Hi({from:t.from,strict:t.strict,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.loaderData):e.loaderData})}function Ig(t){const{select:e,...n}=t;return Hi({...n,select:i=>e?e(i.loaderDeps):i.loaderDeps})}function iu(t){return Hi({from:t.from,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,strict:t.strict,select:e=>{const n=t.strict===!1?e.params:e._strictParams;return t.select?t.select(n):n}})}function Xg(t){return Hi({from:t.from,strict:t.strict,shouldThrow:t.shouldThrow,structuralSharing:t.structuralSharing,select:e=>t.select?t.select(e.search):e.search})}const kp=typeof window<"u"?B.useLayoutEffect:B.useEffect;function Fy(t){const e=B.useRef({value:t,prev:null}),n=e.current.value;return t!==n&&(e.current={value:t,prev:n}),e.current.prev}function W4(t,e,n={},i={}){B.useEffect(()=>{if(!t.current||i.disabled||typeof IntersectionObserver!="function")return;const r=new IntersectionObserver(([s])=>{e(s)},n);return r.observe(t.current),()=>{r.disconnect()}},[e,n,i.disabled,t])}function H4(t){const e=B.useRef(null);return B.useImperativeHandle(t,()=>e.current,[]),e}function ru(t){const e=Xn();return B.useCallback(n=>e.navigate({...n,from:n.from??(t==null?void 0:t.from)}),[t==null?void 0:t.from,e])}var oR=E2();function F4(t,e){const n=Xn(),[i,r]=B.useState(!1),s=B.useRef(!1),o=H4(e),{activeProps:l,inactiveProps:c,activeOptions:h,to:d,preload:p,preloadDelay:g,hashScrollIntoView:O,replace:x,startTransition:S,resetScroll:_,viewTransition:k,children:P,target:Q,disabled:R,style:$,className:C,onClick:D,onFocus:Z,onMouseEnter:U,onMouseLeave:M,onTouchStart:V,ignoreBlocker:G,params:J,search:K,hash:ie,state:q,mask:se,reloadDocument:pe,unsafeRelative:ve,from:j,_fromLocation:N,...te}=t,L=Nn({select:ot=>ot.location.search,structuralSharing:!0}),re=t.from,ge=B.useMemo(()=>({...t,from:re}),[n,L,re,t._fromLocation,t.hash,t.to,t.search,t.params,t.state,t.mask,t.unsafeRelative]),be=B.useMemo(()=>n.buildLocation({...ge}),[n,ge]),Ce=B.useMemo(()=>{if(R)return;let ot=be.maskedLocation?be.maskedLocation.url:be.url,it=!1;return n.origin&&(ot.startsWith(n.origin)?ot=n.history.createHref(ot.replace(n.origin,""))||"/":it=!0),{href:ot,external:it}},[R,be.maskedLocation,be.url,n.origin,n.history]),st=B.useMemo(()=>{if(Ce!=null&&Ce.external)return Ce.href;try{return new URL(d),d}catch{}},[d,Ce]),Fe=t.reloadDocument||st?!1:p??n.options.defaultPreload,xn=g??n.options.defaultPreloadDelay??0,oi=Nn({select:ot=>{if(st)return!1;if(h!=null&&h.exact){if(!o4(ot.location.pathname,be.pathname,n.basepath))return!1}else{const it=Nm(ot.location.pathname,n.basepath),En=Nm(be.pathname,n.basepath);if(!(it.startsWith(En)&&(it.length===En.length||it[En.length]==="/")))return!1}return((h==null?void 0:h.includeSearch)??!0)&&!Va(ot.location.search,be.search,{partial:!(h!=null&&h.exact),ignoreUndefined:!(h!=null&&h.explicitUndefined)})?!1:h!=null&&h.includeHash?ot.location.hash===be.hash:!0}}),ai=B.useCallback(()=>{n.preloadRoute({...ge}).catch(ot=>{console.warn(ot),console.warn(L4)})},[n,ge]),cl=B.useCallback(ot=>{ot!=null&&ot.isIntersecting&&ai()},[ai]);W4(o,cl,nX,{disabled:!!R||Fe!=="viewport"}),B.useEffect(()=>{s.current||!R&&Fe==="render"&&(ai(),s.current=!0)},[R,ai,Fe]);const er=ot=>{const it=ot.currentTarget.getAttribute("target"),En=Q!==void 0?Q:it;if(!R&&!iX(ot)&&!ot.defaultPrevented&&(!En||En==="_self")&&ot.button===0){ot.preventDefault(),oR.flushSync(()=>{r(!0)});const le=n.subscribe("onResolved",()=>{le(),r(!1)});n.navigate({...ge,replace:x,resetScroll:_,hashScrollIntoView:O,startTransition:S,viewTransition:k,ignoreBlocker:G})}};if(st)return{...te,ref:o,href:st,...P&&{children:P},...Q&&{target:Q},...R&&{disabled:R},...$&&{style:$},...C&&{className:C},...D&&{onClick:D},...Z&&{onFocus:Z},...U&&{onMouseEnter:U},...M&&{onMouseLeave:M},...V&&{onTouchStart:V}};const Gr=ot=>{R||Fe&&ai()},Vs=Gr,ul=ot=>{if(!(R||!Fe))if(!xn)ai();else{const it=ot.target;if(lh.has(it))return;const En=setTimeout(()=>{lh.delete(it),ai()},xn);lh.set(it,En)}},hl=ot=>{if(R||!Fe||!xn)return;const it=ot.target,En=lh.get(it);En&&(clearTimeout(En),lh.delete(it))},tr=oi?Xa(l,{})??K4:Ky,nr=oi?Ky:Xa(c,{})??Ky,Bs=[C,tr.className,nr.className].filter(Boolean).join(" "),fl=($||tr.style||nr.style)&&{...$,...tr.style,...nr.style};return{...te,...tr,...nr,href:Ce==null?void 0:Ce.href,ref:o,onClick:ch([D,er]),onFocus:ch([Z,Gr]),onMouseEnter:ch([U,ul]),onMouseLeave:ch([M,hl]),onTouchStart:ch([V,Vs]),disabled:!!R,target:Q,...fl&&{style:fl},...Bs&&{className:Bs},...R&&J4,...oi&&eX,...i&&tX}}const Ky={},K4={className:"active"},J4={role:"link","aria-disabled":!0},eX={"data-status":"active","aria-current":"page"},tX={"data-transitioning":"transitioning"},lh=new WeakMap,nX={rootMargin:"100px"},ch=t=>e=>{for(const n of t)if(n){if(e.defaultPrevented)return;n(e)}},It=B.forwardRef((t,e)=>{const{_asChild:n,...i}=t,{type:r,ref:s,...o}=F4(i,e),l=typeof i.children=="function"?i.children({isActive:o["data-status"]==="active"}):i.children;return n===void 0&&delete o.disabled,B.createElement(n||"a",{...o,ref:s},l)});function iX(t){return!!(t.metaKey||t.altKey||t.ctrlKey||t.shiftKey)}function rX(t){return new sX({id:t})}class sX extends M4{constructor({id:e}){super({id:e}),this.useMatch=n=>Hi({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Hi({from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Xg({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>iu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ig({...n,from:this.id,strict:!1}),this.useLoaderData=n=>zg({...n,from:this.id,strict:!1}),this.useNavigate=()=>{const n=Xn();return ru({from:n.routesById[this.id].fullPath})},this.notFound=n=>Y2({routeId:this.id,...n}),this.Link=Nc.forwardRef((n,i)=>{const s=Xn().routesById[this.id].fullPath;return v.jsx(It,{ref:i,from:s,...n})})}}class oX extends rR{constructor(e){super(e),this.useMatch=n=>Hi({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Hi({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Xg({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>iu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ig({...n,from:this.id}),this.useLoaderData=n=>zg({...n,from:this.id}),this.useNavigate=()=>ru({from:this.fullPath}),this.Link=Nc.forwardRef((n,i)=>v.jsx(It,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function Vr(t){return new oX(t)}class aX extends D4{constructor(e){super(e),this.useMatch=n=>Hi({select:n==null?void 0:n.select,from:this.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Hi({...n,from:this.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Xg({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useParams=n=>iu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.id}),this.useLoaderDeps=n=>Ig({...n,from:this.id}),this.useLoaderData=n=>zg({...n,from:this.id}),this.useNavigate=()=>ru({from:this.fullPath}),this.Link=Nc.forwardRef((n,i)=>v.jsx(It,{ref:i,from:this.fullPath,...n})),this.$$typeof=Symbol.for("react.memo")}}function lX(t){return new aX(t)}function HT(t){return typeof t=="object"?new FT(t,{silent:!0}).createRoute(t):new FT(t,{silent:!0}).createRoute}class FT{constructor(e,n){this.path=e,this.createRoute=i=>{this.silent;const r=Vr(i);return r.isRoot=!1,r},this.silent=n==null?void 0:n.silent}}class KT{constructor(e){this.useMatch=n=>Hi({select:n==null?void 0:n.select,from:this.options.id,structuralSharing:n==null?void 0:n.structuralSharing}),this.useRouteContext=n=>Hi({from:this.options.id,select:i=>n!=null&&n.select?n.select(i.context):i.context}),this.useSearch=n=>Xg({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useParams=n=>iu({select:n==null?void 0:n.select,structuralSharing:n==null?void 0:n.structuralSharing,from:this.options.id}),this.useLoaderDeps=n=>Ig({...n,from:this.options.id}),this.useLoaderData=n=>zg({...n,from:this.options.id}),this.useNavigate=()=>{const n=Xn();return ru({from:n.routesById[this.options.id].fullPath})},this.options=e,this.$$typeof=Symbol.for("react.memo")}}function JT(t){return typeof t=="object"?new KT(t):e=>new KT({id:t,...e})}function cX(){const t=Xn(),e=B.useRef({router:t,mounted:!1}),[n,i]=B.useState(!1),{hasPendingMatches:r,isLoading:s}=Nn({select:p=>({isLoading:p.isLoading,hasPendingMatches:p.matches.some(g=>g.status==="pending")}),structuralSharing:!0}),o=Fy(s),l=s||n||r,c=Fy(l),h=s||r,d=Fy(h);return t.startTransition=p=>{i(!0),B.startTransition(()=>{p(),i(!1)})},B.useEffect(()=>{const p=t.history.subscribe(t.load),g=t.buildLocation({to:t.latestLocation.pathname,search:!0,params:!0,hash:!0,state:!0,_includeValidateSearch:!0});return Ba(t.latestLocation.href)!==Ba(g.href)&&t.commitLocation({...g,replace:!0}),()=>{p()}},[t,t.history]),kp(()=>{if(typeof window<"u"&&t.ssr||e.current.router===t&&e.current.mounted)return;e.current={router:t,mounted:!0},(async()=>{try{await t.load()}catch(g){console.error(g)}})()},[t]),kp(()=>{o&&!s&&t.emit({type:"onLoad",...Za(t.state)})},[o,t,s]),kp(()=>{d&&!h&&t.emit({type:"onBeforeRouteMount",...Za(t.state)})},[h,d,t]),kp(()=>{if(c&&!l){const p=Za(t.state);t.emit({type:"onResolved",...p}),t.__store.setState(g=>({...g,status:"idle",resolvedLocation:g.location})),p.hrefChanged&&p4(t)}},[l,c,t]),null}function uX(t){const e=Nn({select:n=>`not-found-${n.location.pathname}-${n.status}`});return v.jsx(wv,{getResetKey:()=>e,onCatch:(n,i)=>{var r;if(Yi(n))(r=t.onCatch)==null||r.call(t,n,i);else throw n},errorComponent:({error:n})=>{var i;if(Yi(n))return(i=t.fallback)==null?void 0:i.call(t,n);throw n},children:t.children})}function hX(){return v.jsx("p",{children:"Not Found"})}function sc(t){return v.jsx(v.Fragment,{children:t.children})}function aR(t,e,n){return e.options.notFoundComponent?v.jsx(e.options.notFoundComponent,{...n}):t.options.defaultNotFoundComponent?v.jsx(t.options.defaultNotFoundComponent,{...n}):v.jsx(hX,{})}function fX({children:t}){var n;const e=Xn();return e.isServer?v.jsx("script",{nonce:(n=e.options.ssr)==null?void 0:n.nonce,className:"$tsr",dangerouslySetInnerHTML:{__html:t+';typeof $_TSR !== "undefined" && $_TSR.c()'}}):null}function dX(){const t=Xn();if(!t.isScrollRestoring||!t.isServer||typeof t.options.scrollRestoration=="function"&&!t.options.scrollRestoration({location:t.latestLocation}))return null;const n=(t.options.getScrollRestorationKey||Ax)(t.latestLocation),i=n!==Ax(t.latestLocation)?n:void 0,r={storageKey:zm,shouldScrollRestoration:!0};return i&&(r.key=i),v.jsx(fX,{children:`(${G2.toString()})(${JSON.stringify(r)})`})}const lR=B.memo(function({matchId:e}){var k,P;const n=Xn(),i=Nn({select:Q=>{const R=Q.matches.find($=>$.id===e);return Rs(R),{routeId:R.routeId,ssr:R.ssr,_displayPending:R._displayPending}},structuralSharing:!0}),r=n.routesById[i.routeId],s=r.options.pendingComponent??n.options.defaultPendingComponent,o=s?v.jsx(s,{}):null,l=r.options.errorComponent??n.options.defaultErrorComponent,c=r.options.onCatch??n.options.defaultOnCatch,h=r.isRoot?r.options.notFoundComponent??((k=n.options.notFoundRoute)==null?void 0:k.options.component):r.options.notFoundComponent,d=i.ssr===!1||i.ssr==="data-only",p=(!r.isRoot||r.options.wrapInSuspense||d)&&(r.options.wrapInSuspense??s??(((P=r.options.errorComponent)==null?void 0:P.preload)||d))?B.Suspense:sc,g=l?wv:sc,O=h?uX:sc,x=Nn({select:Q=>Q.loadedAt}),S=Nn({select:Q=>{var $;const R=Q.matches.findIndex(C=>C.id===e);return($=Q.matches[R-1])==null?void 0:$.routeId}}),_=r.isRoot?r.options.shellComponent??sc:sc;return v.jsxs(_,{children:[v.jsx(Ng.Provider,{value:e,children:v.jsx(p,{fallback:o,children:v.jsx(g,{getResetKey:()=>x,errorComponent:l||jg,onCatch:(Q,R)=>{if(Yi(Q))throw Q;c==null||c(Q,R)},children:v.jsx(O,{fallback:Q=>{if(!h||Q.routeId&&Q.routeId!==i.routeId||!Q.routeId&&!r.isRoot)throw Q;return B.createElement(h,Q)},children:d||i._displayPending?v.jsx(N4,{fallback:o,children:v.jsx(eQ,{matchId:e})}):v.jsx(eQ,{matchId:e})})})})}),S===Si&&n.options.scrollRestoration?v.jsxs(v.Fragment,{children:[v.jsx(pX,{}),v.jsx(dX,{})]}):null]})});function pX(){const t=Xn(),e=B.useRef(void 0);return v.jsx("script",{suppressHydrationWarning:!0,ref:n=>{n&&(e.current===void 0||e.current.href!==t.latestLocation.href)&&(t.emit({type:"onRendered",...Za(t.state)}),e.current=t.latestLocation)}},t.latestLocation.state.__TSR_key)}const eQ=B.memo(function({matchId:e}){var c,h,d,p;const n=Xn(),{match:i,key:r,routeId:s}=Nn({select:g=>{const O=g.matches.find(P=>P.id===e),x=O.routeId,S=n.routesById[x].options.remountDeps??n.options.defaultRemountDeps,_=S==null?void 0:S({routeId:x,loaderDeps:O.loaderDeps,params:O._strictParams,search:O._strictSearch});return{key:_?JSON.stringify(_):void 0,routeId:x,match:{id:O.id,status:O.status,error:O.error,_forcePending:O._forcePending,_displayPending:O._displayPending}}},structuralSharing:!0}),o=n.routesById[s],l=B.useMemo(()=>{const g=o.options.component??n.options.defaultComponent;return g?v.jsx(g,{},r):v.jsx(cR,{})},[r,o.options.component,n.options.defaultComponent]);if(i._displayPending)throw(c=n.getMatch(i.id))==null?void 0:c._nonReactive.displayPendingPromise;if(i._forcePending)throw(h=n.getMatch(i.id))==null?void 0:h._nonReactive.minPendingPromise;if(i.status==="pending"){const g=o.options.pendingMinMs??n.options.defaultPendingMinMs;if(g){const O=n.getMatch(i.id);if(O&&!O._nonReactive.minPendingPromise&&!n.isServer){const x=zc();O._nonReactive.minPendingPromise=x,setTimeout(()=>{x.resolve(),O._nonReactive.minPendingPromise=void 0},g)}}throw(d=n.getMatch(i.id))==null?void 0:d._nonReactive.loadPromise}if(i.status==="notFound")return Rs(Yi(i.error)),aR(n,o,i.error);if(i.status==="redirected")throw Rs(cr(i.error)),(p=n.getMatch(i.id))==null?void 0:p._nonReactive.loadPromise;if(i.status==="error"){if(n.isServer){const g=(o.options.errorComponent??n.options.defaultErrorComponent)||jg;return v.jsx(g,{error:i.error,reset:void 0,info:{componentStack:""}})}throw i.error}return l}),cR=B.memo(function(){const e=Xn(),n=B.useContext(Ng),i=Nn({select:h=>{var d;return(d=h.matches.find(p=>p.id===n))==null?void 0:d.routeId}}),r=e.routesById[i],s=Nn({select:h=>{const p=h.matches.find(g=>g.id===n);return Rs(p),p.globalNotFound}}),o=Nn({select:h=>{var g;const d=h.matches,p=d.findIndex(O=>O.id===n);return(g=d[p+1])==null?void 0:g.id}}),l=e.options.defaultPendingComponent?v.jsx(e.options.defaultPendingComponent,{}):null;if(s)return aR(e,r,void 0);if(!o)return null;const c=v.jsx(lR,{matchId:o});return i===Si?v.jsx(B.Suspense,{fallback:l,children:c}):c});function mX(){const t=Xn(),n=t.routesById[Si].options.pendingComponent??t.options.defaultPendingComponent,i=n?v.jsx(n,{}):null,r=t.isServer||typeof document<"u"&&t.ssr?sc:B.Suspense,s=v.jsxs(r,{fallback:i,children:[!t.isServer&&v.jsx(cX,{}),v.jsx(gX,{})]});return t.options.InnerWrap?v.jsx(t.options.InnerWrap,{children:s}):s}function gX(){const t=Xn(),e=Nn({select:r=>{var s;return(s=r.matches[0])==null?void 0:s.id}}),n=Nn({select:r=>r.loadedAt}),i=e?v.jsx(lR,{matchId:e}):null;return v.jsx(Ng.Provider,{value:e,children:t.options.disableGlobalCatchBoundary?i:v.jsx(wv,{getResetKey:()=>n,errorComponent:jg,onCatch:r=>{r.message||r.toString()},children:i})})}const OX=t=>new yX(t);class yX extends C4{constructor(e){super(e)}}typeof globalThis<"u"?(globalThis.createFileRoute=HT,globalThis.createLazyFileRoute=JT):typeof window<"u"&&(window.createFileRoute=HT,window.createLazyFileRoute=JT);function bX({router:t,children:e,...n}){Object.keys(n).length>0&&t.update({...t.options,...n,context:{...t.options.context,...n.context}});const i=sR(),r=v.jsx(i.Provider,{value:t,children:e});return t.options.Wrap?v.jsx(t.options.Wrap,{children:r}):r}function xX({router:t,...e}){return v.jsx(bX,{router:t,...e,children:v.jsx(mX,{})})}var vX=Object.create,uR=Object.defineProperty,SX=Object.getOwnPropertyDescriptor,hR=Object.getOwnPropertyNames,_X=Object.getPrototypeOf,kX=Object.prototype.hasOwnProperty,Br=(t,e)=>function(){return e||(0,t[hR(t)[0]])((e={exports:{}}).exports,e),e.exports},wX=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=hR(e),s=0,o=r.length,l;s<o;s++)l=r[s],!kX.call(t,l)&&l!==n&&uR(t,l,{get:(c=>e[c]).bind(null,l),enumerable:!(i=SX(e,l))||i.enumerable});return t},Xt=(t,e,n)=>(n=t!=null?vX(_X(t)):{},wX(uR(n,"default",{value:t,enumerable:!0}),t)),fR=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,e){function n(i){"@babel/helpers - typeof";return e.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,n(i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),PX=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,e){var n=fR().default;function i(r,s){if(n(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var l=o.call(r,s||"default");if(n(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(r)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),TX=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,e){var n=fR().default,i=PX();function r(s){var o=i(s,"string");return n(o)=="symbol"?o:o+""}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),rl=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,e){var n=TX();function i(r,s,o){return(s=n(s))in r?Object.defineProperty(r,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[s]=o,r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),pr=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,e){var n=rl();function i(s,o){var l=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);o&&(c=c.filter(function(h){return Object.getOwnPropertyDescriptor(s,h).enumerable})),l.push.apply(l,c)}return l}function r(s){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?i(Object(l),!0).forEach(function(c){n(s,c,l[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(l)):i(Object(l)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(l,c))})}return s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}});function sl(t){const e={subscribe(n){let i=null,r=!1,s=!1,o=!1;function l(){if(i===null){o=!0;return}s||(s=!0,typeof i=="function"?i():i&&i.unsubscribe())}return i=t({next(c){var h;r||(h=n.next)===null||h===void 0||h.call(n,c)},error(c){var h;r||(r=!0,(h=n.error)===null||h===void 0||h.call(n,c),l())},complete(){var c;r||(r=!0,(c=n.complete)===null||c===void 0||c.call(n),l())}}),o&&l(),{unsubscribe:l}},pipe(...n){return n.reduce(QX,e)}};return e}function QX(t,e){return e(t)}function CX(t){const e=new AbortController;return new Promise((i,r)=>{let s=!1;function o(){s||(s=!0,l.unsubscribe())}e.signal.addEventListener("abort",()=>{r(e.signal.reason)});const l=t.subscribe({next(c){s=!0,i(c),o()},error(c){r(c)},complete(){e.abort(),o()}})})}function EX(t){return e=>{let n=0,i=null;const r=[];function s(){i||(i=e.subscribe({next(l){for(const h of r){var c;(c=h.next)===null||c===void 0||c.call(h,l)}},error(l){for(const h of r){var c;(c=h.error)===null||c===void 0||c.call(h,l)}},complete(){for(const c of r){var l;(l=c.complete)===null||l===void 0||l.call(c)}}}))}function o(){if(n===0&&i){const l=i;i=null,l.unsubscribe()}}return sl(l=>(n++,r.push(l),s(),{unsubscribe(){n--,o();const c=r.findIndex(h=>h===l);c>-1&&r.splice(c,1)}}))}}function dR(t){let e=t;const n=[],i=o=>{e!==void 0&&o.next(e),n.push(o)},r=o=>{n.splice(n.indexOf(o),1)},s=sl(o=>(i(o),()=>{r(o)}));return s.next=o=>{if(e!==o){e=o;for(const l of n)l.next(o)}},s.get=()=>e,s}function pR(t){return sl(e=>{function n(r=0,s=t.op){const o=t.links[r];if(!o)throw new Error("No more links to execute - did you forget to add an ending link?");return o({op:s,next(c){return n(r+1,c)}})}return n().subscribe(e)})}function tQ(t){return Array.isArray(t)?t:[t]}function AX(t){return e=>{const n=tQ(t.true).map(r=>r(e)),i=tQ(t.false).map(r=>r(e));return r=>sl(s=>{const o=t.condition(r.op)?n:i;return pR({op:r.op,links:o}).subscribe(s)})}}function Io(t){return!!t&&!Array.isArray(t)&&typeof t=="object"}function RX(t){return typeof t=="function"}const $X=typeof Symbol=="function"&&!!Symbol.asyncIterator;function LX(t){return $X&&Io(t)&&Symbol.asyncIterator in t}const $x=t=>t();function nQ(t=0){return new Promise(e=>setTimeout(e,t))}var MX=Object.create,mR=Object.defineProperty,DX=Object.getOwnPropertyDescriptor,gR=Object.getOwnPropertyNames,jX=Object.getPrototypeOf,NX=Object.prototype.hasOwnProperty,Vf=(t,e)=>function(){return e||(0,t[gR(t)[0]])((e={exports:{}}).exports,e),e.exports},zX=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=gR(e),s=0,o=r.length,l;s<o;s++)l=r[s],!NX.call(t,l)&&l!==n&&mR(t,l,{get:(c=>e[c]).bind(null,l),enumerable:!(i=DX(e,l))||i.enumerable});return t},Vg=(t,e,n)=>(n=t!=null?MX(jX(t)):{},zX(mR(n,"default",{value:t,enumerable:!0}),t));const OR=()=>{},iQ=t=>{Object.freeze&&Object.freeze(t)};function yR(t,e,n){var i;const r=e.join(".");return(i=n[r])!==null&&i!==void 0||(n[r]=new Proxy(OR,{get(s,o){if(!(typeof o!="string"||o==="then"))return yR(t,[...e,o],n)},apply(s,o,l){const c=e[e.length-1];let h={args:l,path:e};return c==="call"?h={args:l.length>=2?[l[1]]:[],path:e.slice(0,-1)}:c==="apply"&&(h={args:l.length>=2?l[1]:[],path:e.slice(0,-1)}),iQ(h.args),iQ(h.path),t(h)}})),n[r]}const bR=t=>yR(t,[],Object.create(null)),IX=t=>new Proxy(OR,{get(e,n){if(n!=="then")return t(n)}});var xR=Vf({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,e){function n(i){"@babel/helpers - typeof";return e.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,n(i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),XX=Vf({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,e){var n=xR().default;function i(r,s){if(n(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var l=o.call(r,s||"default");if(n(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(r)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),VX=Vf({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,e){var n=xR().default,i=XX();function r(s){var o=i(s,"string");return n(o)=="symbol"?o:o+""}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),vR=Vf({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,e){var n=VX();function i(r,s,o){return(s=n(s))in r?Object.defineProperty(r,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[s]=o,r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),Pv=Vf({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,e){var n=vR();function i(s,o){var l=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);o&&(c=c.filter(function(h){return Object.getOwnPropertyDescriptor(s,h).enumerable})),l.push.apply(l,c)}return l}function r(s){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?i(Object(l),!0).forEach(function(c){n(s,c,l[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(l)):i(Object(l)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(l,c))})}return s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}});Vg(Pv());var rQ=Vg(vR()),BX=class extends Error{};function ZX(t){if(t instanceof Error)return t;const e=typeof t;if(!(e==="undefined"||e==="function"||t===null)){if(e!=="object")return new Error(String(t));if(Io(t))return Object.assign(new BX,t)}}var sQ=class extends Error{constructor(t){var e,n,i;const r=ZX(t.cause),s=(e=(n=t.message)!==null&&n!==void 0?n:r==null?void 0:r.message)!==null&&e!==void 0?e:t.code;super(s,{cause:r}),(0,rQ.default)(this,"cause",void 0),(0,rQ.default)(this,"code",void 0),this.code=t.code,this.name="TRPCError",(i=this.cause)!==null&&i!==void 0||(this.cause=r)}},wp=Vg(Pv());function qX(t,e){if("error"in t){const i=e.deserialize(t.error);return{ok:!1,error:(0,wp.default)((0,wp.default)({},t),{},{error:i})}}return{ok:!0,result:(0,wp.default)((0,wp.default)({},t.result),(!t.result.type||t.result.type==="data")&&{type:"data",data:e.deserialize(t.result.data)})}}var Jy=class extends Error{constructor(){super("Unable to transform response from server")}};function SR(t,e){let n;try{n=qX(t,e)}catch{throw new Jy}if(!n.ok&&(!Io(n.error.error)||typeof n.error.error.code!="number"))throw new Jy;if(n.ok&&!Io(n.result))throw new Jy;return n}Vg(Pv());function UX(t){return typeof t=="function"}async function YX(t,e){const{_def:n}=t;let i=n.procedures[e];for(;!i;){const r=Object.keys(n.lazy).find(o=>e.startsWith(o));if(!r)return null;await n.lazy[r].load(),i=n.procedures[e]}return i}async function GX(t){const{type:e,path:n}=t,i=await YX(t.router,n);if(!i||!UX(i)||i._def.type!==e&&!t.allowMethodOverride)throw new sQ({code:"NOT_FOUND",message:`No "${e}"-procedure on path "${n}"`});/* istanbul ignore if -- @preserve */if(i._def.type!==e&&t.allowMethodOverride&&i._def.type==="subscription")throw new sQ({code:"METHOD_NOT_SUPPORTED",message:"Method override is not supported for subscriptions"});return i(t)}var Pp=Xt(rl()),Fl=Xt(pr());function WX(t){return t instanceof _s}function HX(t){return Io(t)&&Io(t.error)&&typeof t.error.code=="number"&&typeof t.error.message=="string"}function FX(t,e){return typeof t=="string"?t:Io(t)&&typeof t.message=="string"?t.message:e}var _s=class pm extends Error{constructor(e,n){var i,r;const s=n==null?void 0:n.cause;super(e,{cause:s}),(0,Pp.default)(this,"cause",void 0),(0,Pp.default)(this,"shape",void 0),(0,Pp.default)(this,"data",void 0),(0,Pp.default)(this,"meta",void 0),this.meta=n==null?void 0:n.meta,this.cause=s,this.shape=n==null||(i=n.result)===null||i===void 0?void 0:i.error,this.data=n==null||(r=n.result)===null||r===void 0?void 0:r.error.data,this.name="TRPCClientError",Object.setPrototypeOf(this,pm.prototype)}static from(e,n={}){const i=e;return WX(i)?(n.meta&&(i.meta=(0,Fl.default)((0,Fl.default)({},i.meta),n.meta)),i):HX(i)?new pm(i.error.message,(0,Fl.default)((0,Fl.default)({},n),{},{result:i})):new pm(FX(i,"Unknown error"),(0,Fl.default)((0,Fl.default)({},n),{},{cause:i}))}};function _R(t){const e=t;return e?"input"in e?e:{input:e,output:e}:{input:{serialize:n=>n,deserialize:n=>n},output:{serialize:n=>n,deserialize:n=>n}}}const oQ=t=>typeof t=="function";function KX(t){if(t)return t;if(typeof window<"u"&&oQ(window.fetch))return window.fetch;if(typeof globalThis<"u"&&oQ(globalThis.fetch))return globalThis.fetch;throw new Error("No fetch implementation found")}var Mh=Xt(pr());function JX(t){return{url:t.url.toString(),fetch:t.fetch,transformer:_R(t.transformer),methodOverride:t.methodOverride}}function eV(t){const e={};for(let n=0;n<t.length;n++){const i=t[n];e[n]=i}return e}const tV={query:"GET",mutation:"POST",subscription:"PATCH"};function kR(t){return"input"in t?t.transformer.input.serialize(t.input):eV(t.inputs.map(e=>t.transformer.input.serialize(e)))}const wR=t=>{const e=t.url.split("?");let i=e[0].replace(/\/$/,"")+"/"+t.path;const r=[];if(e[1]&&r.push(e[1]),"inputs"in t&&r.push("batch=1"),t.type==="query"||t.type==="subscription"){const s=kR(t);s!==void 0&&t.methodOverride!=="POST"&&r.push(`input=${encodeURIComponent(JSON.stringify(s))}`)}return r.length&&(i+="?"+r.join("&")),i},nV=t=>{if(t.type==="query"&&t.methodOverride!=="POST")return;const e=kR(t);return e!==void 0?JSON.stringify(e):void 0},iV=t=>aV((0,Mh.default)((0,Mh.default)({},t),{},{contentTypeHeader:"application/json",getUrl:wR,getBody:nV}));var rV=class extends Error{constructor(){const t="AbortError";super(t),this.name=t,this.message=t}};const sV=t=>{var e;if(t!=null&&t.aborted)throw(e=t.throwIfAborted)===null||e===void 0||e.call(t),typeof DOMException<"u"?new DOMException("AbortError","AbortError"):new rV};async function oV(t){var e;sV(t.signal);const n=t.getUrl(t),i=t.getBody(t),r=(e=t.methodOverride)!==null&&e!==void 0?e:tV[t.type],s=await(async()=>{const l=await t.headers();return Symbol.iterator in l?Object.fromEntries(l):l})(),o=(0,Mh.default)((0,Mh.default)((0,Mh.default)({},t.contentTypeHeader&&r!=="GET"?{"content-type":t.contentTypeHeader}:{}),t.trpcAcceptHeader?{"trpc-accept":t.trpcAcceptHeader}:void 0),s);return KX(t.fetch)(n,{method:r,signal:t.signal,body:i,headers:o})}async function aV(t){const e={},n=await oV(t);e.response=n;const i=await n.json();return e.responseJSON=i,{json:i,meta:e}}Xt(pr());const aQ=()=>{throw new Error("Something went wrong. Please submit an issue at https://github.com/trpc/trpc/issues/new")};function lQ(t){let e=null,n=null;const i=()=>{clearTimeout(n),n=null,e=null};function r(l){const c=[[]];let h=0;for(;;){const g=l[h];if(!g)break;const O=c[c.length-1];if(g.aborted){var d;(d=g.reject)===null||d===void 0||d.call(g,new Error("Aborted")),h++;continue}if(t.validate(O.concat(g).map(S=>S.key))){O.push(g),h++;continue}if(O.length===0){var p;(p=g.reject)===null||p===void 0||p.call(g,new Error("Input is too big for a single dispatch")),h++;continue}c.push([])}return c}function s(){const l=r(e);i();for(const c of l){if(!c.length)continue;const h={items:c};for(const p of c)p.batch=h;t.fetch(h.items.map(p=>p.key)).then(async p=>{await Promise.all(p.map(async(O,x)=>{const S=h.items[x];try{var _;const P=await Promise.resolve(O);(_=S.resolve)===null||_===void 0||_.call(S,P)}catch(P){var k;(k=S.reject)===null||k===void 0||k.call(S,P)}S.batch=null,S.reject=null,S.resolve=null}));for(const O of h.items){var g;(g=O.reject)===null||g===void 0||g.call(O,new Error("Missing result")),O.batch=null}}).catch(p=>{for(const O of h.items){var g;(g=O.reject)===null||g===void 0||g.call(O,p),O.batch=null}})}}function o(l){var c;const h={aborted:!1,key:l,batch:null,resolve:aQ,reject:aQ},d=new Promise((p,g)=>{var O;h.reject=g,h.resolve=p,(O=e)!==null&&O!==void 0||(e=[]),e.push(h)});return(c=n)!==null&&c!==void 0||(n=setTimeout(s)),d}return{load:o}}function lV(...t){const e=new AbortController,n=t.length;let i=0;const r=()=>{++i===n&&e.abort()};for(const s of t)s!=null&&s.aborted?r():s==null||s.addEventListener("abort",r,{once:!0});return e.signal}var Tp=Xt(pr());function cV(t){var e,n;const i=JX(t),r=(e=t.maxURLLength)!==null&&e!==void 0?e:1/0,s=(n=t.maxItems)!==null&&n!==void 0?n:1/0;return()=>{const o=d=>({validate(p){if(r===1/0&&s===1/0)return!0;if(p.length>s)return!1;const g=p.map(S=>S.path).join(","),O=p.map(S=>S.input);return wR((0,Tp.default)((0,Tp.default)({},i),{},{type:d,path:g,inputs:O,signal:null})).length<=r},async fetch(p){const g=p.map(P=>P.path).join(","),O=p.map(P=>P.input),x=lV(...p.map(P=>P.signal)),S=await iV((0,Tp.default)((0,Tp.default)({},i),{},{path:g,inputs:O,type:d,headers(){return t.headers?typeof t.headers=="function"?t.headers({opList:p}):t.headers:{}},signal:x}));return(Array.isArray(S.json)?S.json:p.map(()=>S.json)).map(P=>({meta:S.meta,json:P}))}}),l=lQ(o("query")),c=lQ(o("mutation")),h={query:l,mutation:c};return({op:d})=>sl(p=>{/* istanbul ignore if -- @preserve */if(d.type==="subscription")throw new Error("Subscriptions are unsupported by `httpLink` - use `httpSubscriptionLink` or `wsLink`");const O=h[d.type].load(d);let x;return O.then(S=>{x=S;const _=SR(S.json,i.transformer.output);if(!_.ok){p.error(_s.from(_.error,{meta:S.meta}));return}p.next({context:S.meta,result:_.result}),p.complete()}).catch(S=>{p.error(_s.from(S,{meta:x==null?void 0:x.meta}))}),()=>{}})}}Xt(pr());const uV={enabled:!1,closeMs:0},hV={enabled:!1,pongTimeoutMs:1e3,intervalMs:5e3},fV=t=>t===0?0:Math.min(1e3*2**t,3e4),PR=(t,...e)=>typeof t=="function"?t(...e):t;var dV=Xt(rl()),Kl=class TR extends Error{constructor(e){super(e.message,{cause:e.cause}),this.name="TRPCWebSocketClosedError",Object.setPrototypeOf(this,TR.prototype)}},pV=class{constructor(t,e){this.onTimeout=t,this.timeoutMs=e,(0,dV.default)(this,"timeout",void 0)}reset(){this.timeout&&(clearTimeout(this.timeout),this.timeout=setTimeout(this.onTimeout,this.timeoutMs))}start(){clearTimeout(this.timeout),this.timeout=setTimeout(this.onTimeout,this.timeoutMs)}stop(){clearTimeout(this.timeout),this.timeout=void 0}};function QR(){let t,e;return{promise:new Promise((i,r)=>{t=i,e=r}),resolve:t,reject:e}}async function mV(t){const e=await PR(t.url);if(!t.connectionParams)return e;const i=`${e.includes("?")?"&":"?"}connectionParams=1`;return e+i}async function gV(t){const e={method:"connectionParams",data:await PR(t)};return JSON.stringify(e)}var cQ=Xt(rl()),OV=class{constructor(){(0,cQ.default)(this,"outgoingRequests",new Array),(0,cQ.default)(this,"pendingRequests",{})}register(t,e){const{promise:n,resolve:i}=QR();return this.outgoingRequests.push({id:String(t.id),message:t,end:n,callbacks:{next:e.next,complete:()=>{e.complete(),i()},error:r=>{e.error(r),i()}}}),()=>{this.delete(t.id),e.complete(),i()}}delete(t){t!==null&&(this.outgoingRequests=this.outgoingRequests.filter(({id:e})=>e!==String(t)),delete this.pendingRequests[String(t)])}flush(){const t=this.outgoingRequests;this.outgoingRequests=[];for(const e of t)this.pendingRequests[e.id]=e;return t}getPendingRequests(){return Object.values(this.pendingRequests)}getPendingRequest(t){return t===null?null:this.pendingRequests[String(t)]}getOutgoingRequests(){return this.outgoingRequests}getRequests(){return[...this.getOutgoingRequests().map(t=>({state:"outgoing",message:t.message,end:t.end,callbacks:t.callbacks})),...this.getPendingRequests().map(t=>({state:"pending",message:t.message,end:t.end,callbacks:t.callbacks}))]}hasPendingRequests(){return this.getPendingRequests().length>0}hasPendingSubscriptions(){return this.getPendingRequests().some(t=>t.message.method==="subscription")}hasOutgoingRequests(){return this.outgoingRequests.length>0}},xa=Xt(rl());function yV(t){const{promise:e,resolve:n,reject:i}=QR();return t.addEventListener("open",()=>{t.removeEventListener("error",i),n()}),t.addEventListener("error",i),e}function bV(t,{intervalMs:e,pongTimeoutMs:n}){let i,r;function s(){i=setTimeout(()=>{t.send("PING"),r=setTimeout(()=>{t.close()},n)},e)}function o(){clearTimeout(i),s()}function l(){clearTimeout(r),o()}t.addEventListener("open",s),t.addEventListener("message",({data:c})=>{clearTimeout(i),s(),c==="PONG"&&l()}),t.addEventListener("close",()=>{clearTimeout(i),clearTimeout(r)})}var CR=class Lx{constructor(e){var n;if((0,xa.default)(this,"id",++Lx.connectCount),(0,xa.default)(this,"WebSocketPonyfill",void 0),(0,xa.default)(this,"urlOptions",void 0),(0,xa.default)(this,"keepAliveOpts",void 0),(0,xa.default)(this,"wsObservable",dR(null)),(0,xa.default)(this,"openPromise",null),this.WebSocketPonyfill=(n=e.WebSocketPonyfill)!==null&&n!==void 0?n:WebSocket,!this.WebSocketPonyfill)throw new Error("No WebSocket implementation found - you probably don't want to use this on the server, but if you do you need to pass a `WebSocket`-ponyfill");this.urlOptions=e.urlOptions,this.keepAliveOpts=e.keepAlive}get ws(){return this.wsObservable.get()}set ws(e){this.wsObservable.next(e)}isOpen(){return!!this.ws&&this.ws.readyState===this.WebSocketPonyfill.OPEN&&!this.openPromise}isClosed(){return!!this.ws&&(this.ws.readyState===this.WebSocketPonyfill.CLOSING||this.ws.readyState===this.WebSocketPonyfill.CLOSED)}async open(){var e=this;if(e.openPromise)return e.openPromise;e.id=++Lx.connectCount;const n=mV(e.urlOptions).then(i=>new e.WebSocketPonyfill(i));e.openPromise=n.then(async i=>{e.ws=i,i.addEventListener("message",function({data:r}){r==="PING"&&this.send("PONG")}),e.keepAliveOpts.enabled&&bV(i,e.keepAliveOpts),i.addEventListener("close",()=>{e.ws===i&&(e.ws=null)}),await yV(i),e.urlOptions.connectionParams&&i.send(await gV(e.urlOptions.connectionParams))});try{await e.openPromise}finally{e.openPromise=null}}async close(){var e=this;try{await e.openPromise}finally{var n;(n=e.ws)===null||n===void 0||n.close()}}};(0,xa.default)(CR,"connectCount",0);function xV(t){return t.isOpen()?{id:t.id,state:"open",ws:t.ws}:t.isClosed()?{id:t.id,state:"closed",ws:t.ws}:t.ws?{id:t.id,state:"connecting",ws:t.ws}:null}var ps=Xt(rl()),Jl=Xt(pr()),vV=class{constructor(t){var e;(0,ps.default)(this,"connectionState",void 0),(0,ps.default)(this,"allowReconnect",!1),(0,ps.default)(this,"requestManager",new OV),(0,ps.default)(this,"activeConnection",void 0),(0,ps.default)(this,"reconnectRetryDelay",void 0),(0,ps.default)(this,"inactivityTimeout",void 0),(0,ps.default)(this,"callbacks",void 0),(0,ps.default)(this,"lazyMode",void 0),(0,ps.default)(this,"reconnecting",null),this.callbacks={onOpen:t.onOpen,onClose:t.onClose,onError:t.onError};const n=(0,Jl.default)((0,Jl.default)({},uV),t.lazy);this.inactivityTimeout=new pV(()=>{if(this.requestManager.hasOutgoingRequests()||this.requestManager.hasPendingRequests()){this.inactivityTimeout.reset();return}this.close().catch(()=>null)},n.closeMs),this.activeConnection=new CR({WebSocketPonyfill:t.WebSocket,urlOptions:t,keepAlive:(0,Jl.default)((0,Jl.default)({},hV),t.keepAlive)}),this.activeConnection.wsObservable.subscribe({next:i=>{i&&this.setupWebSocketListeners(i)}}),this.reconnectRetryDelay=(e=t.retryDelayMs)!==null&&e!==void 0?e:fV,this.lazyMode=n.enabled,this.connectionState=dR({type:"state",state:n.enabled?"idle":"connecting",error:null}),this.lazyMode||this.open().catch(()=>null)}async open(){var t=this;t.allowReconnect=!0,t.connectionState.get().state==="idle"&&t.connectionState.next({type:"state",state:"connecting",error:null});try{await t.activeConnection.open()}catch(e){return t.reconnect(new Kl({message:"Initialization error",cause:e})),t.reconnecting}}async close(){var t=this;t.allowReconnect=!1,t.inactivityTimeout.stop();const e=[];for(const n of t.requestManager.getRequests())n.message.method==="subscription"?n.callbacks.complete():n.state==="outgoing"?n.callbacks.error(_s.from(new Kl({message:"Closed before connection was established"}))):e.push(n.end);await Promise.all(e).catch(()=>null),await t.activeConnection.close().catch(()=>null),t.connectionState.next({type:"state",state:"idle",error:null})}request({op:{id:t,type:e,path:n,input:i,signal:r},transformer:s,lastEventId:o}){return sl(l=>{const c=this.batchSend({id:t,method:e,params:{input:s.input.serialize(i),path:n,lastEventId:o}},(0,Jl.default)((0,Jl.default)({},l),{},{next(h){const d=SR(h,s.output);if(!d.ok){l.error(_s.from(d.error));return}l.next({result:d.result})}}));return()=>{c(),e==="subscription"&&this.activeConnection.isOpen()&&this.send({id:t,method:"subscription.stop"}),r==null||r.removeEventListener("abort",c)}})}get connection(){return xV(this.activeConnection)}reconnect(t){var e=this;if(this.connectionState.next({type:"state",state:"connecting",error:_s.from(t)}),this.reconnecting)return;const n=async i=>{try{await nQ(e.reconnectRetryDelay(i)),e.allowReconnect&&(await e.activeConnection.close(),await e.activeConnection.open(),e.requestManager.hasPendingRequests()&&e.send(e.requestManager.getPendingRequests().map(({message:r})=>r))),e.reconnecting=null}catch{await n(i+1)}};this.reconnecting=n(0)}setupWebSocketListeners(t){var e=this;const n=i=>{const r=this.requestManager.getPendingRequests();for(const{message:s,callbacks:o}of r)s.method!=="subscription"&&(o.error(_s.from(i??new Kl({message:"WebSocket closed",cause:i}))),this.requestManager.delete(s.id))};t.addEventListener("open",()=>{$x(async()=>{var i,r;e.lazyMode&&e.inactivityTimeout.start(),(i=(r=e.callbacks).onOpen)===null||i===void 0||i.call(r),e.connectionState.next({type:"state",state:"pending",error:null})}).catch(i=>{t.close(3e3),n(i)})}),t.addEventListener("message",({data:i})=>{if(this.inactivityTimeout.reset(),typeof i!="string"||["PING","PONG"].includes(i))return;const r=JSON.parse(i);if("method"in r){this.handleIncomingRequest(r);return}this.handleResponseMessage(r)}),t.addEventListener("close",i=>{var r,s;n(i),(r=(s=this.callbacks).onClose)===null||r===void 0||r.call(s,i),(!this.lazyMode||this.requestManager.hasPendingSubscriptions())&&this.reconnect(new Kl({message:"WebSocket closed",cause:i}))}),t.addEventListener("error",i=>{var r,s;n(i),(r=(s=this.callbacks).onError)===null||r===void 0||r.call(s,i),this.reconnect(new Kl({message:"WebSocket closed",cause:i}))})}handleResponseMessage(t){const e=this.requestManager.getPendingRequest(t.id);if(!e)return;e.callbacks.next(t);let n=!0;"result"in t&&e.message.method==="subscription"&&(t.result.type==="data"&&(e.message.params.lastEventId=t.result.id),t.result.type!=="stopped"&&(n=!1)),n&&(e.callbacks.complete(),this.requestManager.delete(t.id))}handleIncomingRequest(t){t.method==="reconnect"&&this.reconnect(new Kl({message:"Server requested reconnect"}))}send(t){if(!this.activeConnection.isOpen())throw new Error("Active connection is not open");const e=t instanceof Array?t:[t];this.activeConnection.ws.send(JSON.stringify(e.length===1?e[0]:e))}batchSend(t,e){var n=this;return this.inactivityTimeout.reset(),$x(async()=>{n.activeConnection.isOpen()||await n.open(),await nQ(0),n.requestManager.hasOutgoingRequests()&&n.send(n.requestManager.flush().map(({message:i})=>i))}).catch(i=>{this.requestManager.delete(t.id),e.error(_s.from(i))}),this.requestManager.register(t,e)}};function SV(t){return new vV(t)}function _V(t){const{client:e}=t,n=_R(t.transformer);return()=>({op:i})=>sl(r=>{const s=i.type==="subscription"?e.connectionState.subscribe({next(l){r.next({result:l,context:i.context})}}):null,o=e.request({op:i,transformer:n}).subscribe(r);return()=>{o.unsubscribe(),s==null||s.unsubscribe()}})}var eb=Xt(rl()),uQ=Xt(pr()),ER=class{constructor(t){(0,eb.default)(this,"links",void 0),(0,eb.default)(this,"runtime",void 0),(0,eb.default)(this,"requestId",void 0),this.requestId=0,this.runtime={},this.links=t.links.map(e=>e(this.runtime))}$request(t){var e;return pR({links:this.links,op:(0,uQ.default)((0,uQ.default)({},t),{},{context:(e=t.context)!==null&&e!==void 0?e:{},id:++this.requestId})}).pipe(EX())}async requestAsPromise(t){var e=this;try{const n=e.$request(t);return(await CX(n)).result.data}catch(n){throw _s.from(n)}}query(t,e,n){return this.requestAsPromise({type:"query",path:t,input:e,context:n==null?void 0:n.context,signal:n==null?void 0:n.signal})}mutation(t,e,n){return this.requestAsPromise({type:"mutation",path:t,input:e,context:n==null?void 0:n.context,signal:n==null?void 0:n.signal})}subscription(t,e,n){return this.$request({type:"subscription",path:t,input:e,context:n.context,signal:n.signal}).subscribe({next(r){switch(r.result.type){case"state":{var s;(s=n.onConnectionStateChange)===null||s===void 0||s.call(n,r.result);break}case"started":{var o;(o=n.onStarted)===null||o===void 0||o.call(n,{context:r.context});break}case"stopped":{var l;(l=n.onStopped)===null||l===void 0||l.call(n);break}case"data":case void 0:{var c;(c=n.onData)===null||c===void 0||c.call(n,r.result.data);break}}},error(r){var s;(s=n.onError)===null||s===void 0||s.call(n,r)},complete(){var r;(r=n.onComplete)===null||r===void 0||r.call(n)}})}};const AR=Symbol.for("trpc_untypedClient"),kV={query:"query",mutate:"mutation",subscribe:"subscription"},wV=t=>kV[t];function PV(t){const e=bR(({path:n,args:i})=>{const r=[...n],s=wV(r.pop()),o=r.join(".");return t[s](o,...i)});return IX(n=>n===AR?t:e[n])}function TV(t){const e=new ER(t);return PV(e)}function QV(t){return t[AR]}Xt(pr());Xt(pr());var CV=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,e){function n(r){var s,o,l,c=2;for(typeof Symbol<"u"&&(o=Symbol.asyncIterator,l=Symbol.iterator);c--;){if(o&&(s=r[o])!=null)return s.call(r);if(l&&(s=r[l])!=null)return new i(s.call(r));o="@@asyncIterator",l="@@iterator"}throw new TypeError("Object is not async iterable")}function i(r){function s(o){if(Object(o)!==o)return Promise.reject(new TypeError(o+" is not an object."));var l=o.done;return Promise.resolve(o.value).then(function(c){return{value:c,done:l}})}return i=function(l){this.s=l,this.n=l.next},i.prototype={s:null,n:null,next:function(){return s(this.n.apply(this.s,arguments))},return:function(l){var c=this.s.return;return c===void 0?Promise.resolve({value:l,done:!0}):s(c.apply(this.s,arguments))},throw:function(l){var c=this.s.return;return c===void 0?Promise.reject(l):s(c.apply(this.s,arguments))}},new i(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}});Xt(CV());Xt(pr());var EV=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/usingCtx.js"(t,e){function n(){var i=typeof SuppressedError=="function"?SuppressedError:function(l,c){var h=Error();return h.name="SuppressedError",h.error=l,h.suppressed=c,h},r={},s=[];function o(l,c){if(c!=null){if(Object(c)!==c)throw new TypeError("using declarations can only be used with objects, functions, null, or undefined.");if(l)var h=c[Symbol.asyncDispose||Symbol.for("Symbol.asyncDispose")];if(h===void 0&&(h=c[Symbol.dispose||Symbol.for("Symbol.dispose")],l))var d=h;if(typeof h!="function")throw new TypeError("Object is not disposable.");d&&(h=function(){try{d.call(c)}catch(g){return Promise.reject(g)}}),s.push({v:c,d:h,a:l})}else l&&s.push({d:c,a:l});return c}return{e:r,u:o.bind(null,!1),a:o.bind(null,!0),d:function(){var c,h=this.e,d=0;function p(){for(;c=s.pop();)try{if(!c.a&&d===1)return d=0,s.push(c),Promise.resolve().then(p);if(c.d){var O=c.d.call(c.v);if(c.a)return d|=2,Promise.resolve(O).then(p,g)}else d|=1}catch(x){return g(x)}if(d===1)return h!==r?Promise.reject(h):Promise.resolve();if(h!==r)throw h}function g(O){return h=h!==r?new i(O,h):O,p()}return p()}}}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),RR=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/OverloadYield.js"(t,e){function n(i,r){this.v=i,this.k=r}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),AV=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/awaitAsyncGenerator.js"(t,e){var n=RR();function i(r){return new n(r,0)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),RV=Br({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/wrapAsyncGenerator.js"(t,e){var n=RR();function i(s){return function(){return new r(s.apply(this,arguments))}}function r(s){var o,l;function c(d,p){try{var g=s[d](p),O=g.value,x=O instanceof n;Promise.resolve(x?O.v:O).then(function(S){if(x){var _=d==="return"?"return":"next";if(!O.k||S.done)return c(_,S);S=s[_](S).value}h(g.done?"return":"normal",S)},function(S){c("throw",S)})}catch(S){h("throw",S)}}function h(d,p){switch(d){case"return":o.resolve({value:p,done:!0});break;case"throw":o.reject(p);break;default:o.resolve({value:p,done:!1})}(o=o.next)?c(o.key,o.arg):l=null}this._invoke=function(d,p){return new Promise(function(g,O){var x={key:d,arg:p,resolve:g,reject:O,next:null};l?l=l.next=x:(o=l=x,c(d,p))})},typeof s.return!="function"&&(this.return=void 0)}r.prototype[typeof Symbol=="function"&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},r.prototype.next=function(s){return this._invoke("next",s)},r.prototype.throw=function(s){return this._invoke("throw",s)},r.prototype.return=function(s){return this._invoke("return",s)},e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}});Xt(EV());Xt(AV());Xt(RV());Xt(pr());var $V=Object.create,$R=Object.defineProperty,LV=Object.getOwnPropertyDescriptor,LR=Object.getOwnPropertyNames,MV=Object.getPrototypeOf,DV=Object.prototype.hasOwnProperty,Yo=(t,e)=>function(){return e||(0,t[LR(t)[0]])((e={exports:{}}).exports,e),e.exports},jV=(t,e,n,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(var r=LR(e),s=0,o=r.length,l;s<o;s++)l=r[s],!DV.call(t,l)&&l!==n&&$R(t,l,{get:(c=>e[c]).bind(null,l),enumerable:!(i=LV(e,l))||i.enumerable});return t},Go=(t,e,n)=>(n=t!=null?$V(MV(t)):{},jV(e||!t||!t.__esModule?$R(n,"default",{value:t,enumerable:!0}):n,t)),MR=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/typeof.js"(t,e){function n(i){"@babel/helpers - typeof";return e.exports=n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(r){return typeof r}:function(r){return r&&typeof Symbol=="function"&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r},e.exports.__esModule=!0,e.exports.default=e.exports,n(i)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),NV=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPrimitive.js"(t,e){var n=MR().default;function i(r,s){if(n(r)!="object"||!r)return r;var o=r[Symbol.toPrimitive];if(o!==void 0){var l=o.call(r,s||"default");if(n(l)!="object")return l;throw new TypeError("@@toPrimitive must return a primitive value.")}return(s==="string"?String:Number)(r)}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),zV=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/toPropertyKey.js"(t,e){var n=MR().default,i=NV();function r(s){var o=i(s,"string");return n(o)=="symbol"?o:o+""}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),IV=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/defineProperty.js"(t,e){var n=zV();function i(r,s,o){return(s=n(s))in r?Object.defineProperty(r,s,{value:o,enumerable:!0,configurable:!0,writable:!0}):r[s]=o,r}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),su=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectSpread2.js"(t,e){var n=IV();function i(s,o){var l=Object.keys(s);if(Object.getOwnPropertySymbols){var c=Object.getOwnPropertySymbols(s);o&&(c=c.filter(function(h){return Object.getOwnPropertyDescriptor(s,h).enumerable})),l.push.apply(l,c)}return l}function r(s){for(var o=1;o<arguments.length;o++){var l=arguments[o]!=null?arguments[o]:{};o%2?i(Object(l),!0).forEach(function(c){n(s,c,l[c])}):Object.getOwnPropertyDescriptors?Object.defineProperties(s,Object.getOwnPropertyDescriptors(l)):i(Object(l)).forEach(function(c){Object.defineProperty(s,c,Object.getOwnPropertyDescriptor(l,c))})}return s}e.exports=r,e.exports.__esModule=!0,e.exports.default=e.exports}}),XV=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/asyncIterator.js"(t,e){function n(r){var s,o,l,c=2;for(typeof Symbol<"u"&&(o=Symbol.asyncIterator,l=Symbol.iterator);c--;){if(o&&(s=r[o])!=null)return s.call(r);if(l&&(s=r[l])!=null)return new i(s.call(r));o="@@asyncIterator",l="@@iterator"}throw new TypeError("Object is not async iterable")}function i(r){function s(o){if(Object(o)!==o)return Promise.reject(new TypeError(o+" is not an object."));var l=o.done;return Promise.resolve(o.value).then(function(c){return{value:c,done:l}})}return i=function(l){this.s=l,this.n=l.next},i.prototype={s:null,n:null,next:function(){return s(this.n.apply(this.s,arguments))},return:function(l){var c=this.s.return;return c===void 0?Promise.resolve({value:l,done:!0}):s(c.apply(this.s,arguments))},throw:function(l){var c=this.s.return;return c===void 0?Promise.reject(l):s(c.apply(this.s,arguments))}},new i(r)}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),VV=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutPropertiesLoose.js"(t,e){function n(i,r){if(i==null)return{};var s={};for(var o in i)if({}.hasOwnProperty.call(i,o)){if(r.includes(o))continue;s[o]=i[o]}return s}e.exports=n,e.exports.__esModule=!0,e.exports.default=e.exports}}),BV=Yo({"../../node_modules/.pnpm/@oxc-project+runtime@0.72.2/node_modules/@oxc-project/runtime/src/helpers/objectWithoutProperties.js"(t,e){var n=VV();function i(r,s){if(r==null)return{};var o,l,c=n(r,s);if(Object.getOwnPropertySymbols){var h=Object.getOwnPropertySymbols(r);for(l=0;l<h.length;l++)o=h[l],s.includes(o)||{}.propertyIsEnumerable.call(r,o)&&(c[o]=r[o])}return c}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports}}),Dh=Go(su(),1),ZV=Go(XV(),1),qV=Go(BV(),1);const UV=["cursor","direction"];function Bg(t){return{path:t.path.join(".")}}function YV(t){return t.length>=3}function DR(t){return YV(t)?{type:"prefixed",prefix:t[0],path:t[1],args:t[2]}:{type:"unprefixed",prefix:void 0,path:t[0],args:t[1]}}function Tv(t,e,n){var i;const r=DR(t);let s=(i=r.args)===null||i===void 0?void 0:i.input;if(n){var o,l;s=(0,Dh.default)((0,Dh.default)((0,Dh.default)({},(o=(l=r.args)===null||l===void 0?void 0:l.input)!==null&&o!==void 0?o:{}),n.pageParam!==void 0?{cursor:n.pageParam}:{}),{},{direction:n.direction})}return[r.path.join("."),s,e==null?void 0:e.trpc]}async function GV(t,e,n){const r=e.getQueryCache().build(e,{queryKey:n});r.setState({data:[],status:"success"});const s=[];var o=!1,l=!1,c;try{for(var h=(0,ZV.default)(t),d;o=!(d=await h.next()).done;o=!1){const p=d.value;s.push(p),r.setState({data:[...s]})}}catch(p){l=!0,c=p}finally{try{o&&h.return!=null&&await h.return()}finally{if(l)throw c}}return s}function ms(t){const e=$x(()=>{const{input:n,type:i}=t,r=t.path.flatMap(s=>s.split("."));if(!n&&i==="any")return r.length?[r]:[];if(i==="infinite"&&Io(n)&&("direction"in n||"cursor"in n)){const{cursor:s,direction:o}=n,l=(0,qV.default)(n,UV);return[r,{input:l,type:"infinite"}]}return[r,(0,Dh.default)((0,Dh.default)({},typeof n<"u"&&n!==As&&{input:n}),i&&i!=="any"&&{type:i})]});return t.prefix&&e.unshift([t.prefix]),e}function jR(t){const e=[t.path.flatMap(n=>n.split("."))];return t.prefix&&e.unshift([t.prefix]),e}function Qv(t){return RX(t)?t():t}var ec=Go(su());function WV(t){var e;const{input:n,query:i,path:r,queryKey:s,opts:o}=t,l=n===As,c=async h=>{var d;const p=(0,ec.default)((0,ec.default)({},o),{},{trpc:(0,ec.default)((0,ec.default)({},o==null?void 0:o.trpc),!(o==null||(d=o.trpc)===null||d===void 0)&&d.abortOnUnmount?{signal:h.signal}:{signal:null})});return await i(...Tv(s,p,{direction:h.direction,pageParam:h.pageParam}))};return Object.assign((0,ec.default)((0,ec.default)({},o??{}),{},{queryKey:s,queryFn:l?As:c,initialPageParam:(e=o==null?void 0:o.initialCursor)!==null&&e!==void 0?e:n==null?void 0:n.cursor}),{trpc:Bg({path:r})})}var hQ=Go(su());function HV(t){var e;const{mutate:n,path:i,opts:r,overrides:s}=t,o=Qv(t.queryClient),l=jR({path:i,prefix:r==null?void 0:r.keyPrefix}),c=o.defaultMutationOptions(o.getMutationDefaults(l)),h=(e=s==null?void 0:s.onSuccess)!==null&&e!==void 0?e:p=>p.originalFn(),d=async p=>await n(...Tv([...l,{input:p}],r));return(0,hQ.default)((0,hQ.default)({},r),{},{mutationKey:l,mutationFn:d,onSuccess(...p){var g,O;return h({originalFn:()=>{var S,_,k;return(S=r==null||(_=r.onSuccess)===null||_===void 0?void 0:_.call(r,...p))!==null&&S!==void 0?S:c==null||(k=c.onSuccess)===null||k===void 0?void 0:k.call(c,...p)},queryClient:o,meta:(g=(O=r==null?void 0:r.meta)!==null&&O!==void 0?O:c==null?void 0:c.meta)!==null&&g!==void 0?g:{}})},trpc:Bg({path:i})})}var tc=Go(su());function FV(t){const{input:e,query:n,path:i,queryKey:r,opts:s}=t,o=Qv(t.queryClient),l=e===As,c=async h=>{var d;const p=(0,tc.default)((0,tc.default)({},s),{},{trpc:(0,tc.default)((0,tc.default)({},s==null?void 0:s.trpc),!(s==null||(d=s.trpc)===null||d===void 0)&&d.abortOnUnmount?{signal:h.signal}:{signal:null})}),g=h.queryKey,O=await n(...Tv(g,p));return LX(O)?GV(O,o,g):O};return Object.assign((0,tc.default)((0,tc.default)({},s),{},{queryKey:r,queryFn:l?As:c}),{trpc:Bg({path:i})})}var fQ=Go(su(),1);const KV=t=>{var e;const{subscribe:n,path:i,queryKey:r,opts:s={}}=t,o=(e=DR(r))===null||e===void 0||(e=e.args)===null||e===void 0?void 0:e.input,l="enabled"in s?!!s.enabled:o!==As,c=h=>n(i.join("."),o??void 0,h);return(0,fQ.default)((0,fQ.default)({},s),{},{enabled:l,subscribe:c,queryKey:r,trpc:Bg({path:i})})};var nc=Go(su(),1);function JV(t){const e=t.keyPrefix,n=i=>(r,s,o)=>"router"in t?Promise.resolve(Qv(t.ctx)).then(c=>GX({router:t.router,path:r,getRawInput:async()=>s,ctx:c,type:i,signal:void 0})):(t.client instanceof ER?t.client:QV(t.client))[i](r,s,o);return bR(({args:i,path:r})=>{const s=[...r],o=s.pop(),[l,c]=i;return{"~types":void 0,pathKey:()=>ms({path:s,type:"any",prefix:e}),pathFilter:()=>(0,nc.default)((0,nc.default)({},l),{},{queryKey:ms({path:s,type:"any",prefix:e})}),queryOptions:()=>FV({input:l,opts:c,path:s,queryClient:t.queryClient,queryKey:ms({path:s,input:l,type:"query",prefix:e}),query:n("query")}),queryKey:()=>ms({path:s,input:l,type:"query",prefix:e}),queryFilter:()=>(0,nc.default)((0,nc.default)({},c),{},{queryKey:ms({path:s,input:l,type:"query",prefix:e})}),infiniteQueryOptions:()=>WV({input:l,opts:c,path:s,queryKey:ms({path:s,input:l,type:"infinite",prefix:e}),query:n("query")}),infiniteQueryKey:()=>ms({path:s,input:l,type:"infinite",prefix:e}),infiniteQueryFilter:()=>(0,nc.default)((0,nc.default)({},c),{},{queryKey:ms({path:s,input:l,type:"infinite",prefix:e})}),mutationOptions:()=>{var d;return HV({opts:l,path:s,queryClient:t.queryClient,mutate:n("mutation"),overrides:(d=t.overrides)===null||d===void 0?void 0:d.mutations})},mutationKey:()=>jR({path:s,prefix:e}),subscriptionOptions:()=>KV({opts:c,path:s,queryKey:ms({path:s,input:l,type:"any",prefix:e}),subscribe:n("subscription")})}[o]()})}function pc(){const e=new URLSearchParams(window.location.search).get("api");return e?e.replace(/\/$/,""):""}function eB(){const t=pc();if(t){const n=new URL(t);return`${n.protocol==="https:"?"wss:":"ws:"}//${n.host}/trpc`}return`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/trpc`}function tB(){const t=pc();return t?`${t}/trpc`:"/trpc"}function nB(){const t=pc();return t?`${t}/api/health`:"/api/health"}const NR=new kI({defaultOptions:{queries:{staleTime:60*1e3}}}),Mx=3e3,zR=SV({url:eB(),retryDelayMs:()=>Mx}),At=TV({links:[AX({condition:t=>t.type==="subscription",true:_V({client:zR}),false:cV({url:tB()})})]}),tb=JV({client:At,queryClient:NR});function iB(t){const e=new MutationObserver(n=>{for(const i of n)i.attributeName==="class"&&t()});return e.observe(document.documentElement,{attributes:!0}),()=>e.disconnect()}function rB(){return document.documentElement.classList.contains("dark")}function sB(){return!1}function IR(){return B.useSyncExternalStore(iB,rB,sB)}/**
67
+ * @license lucide-react v0.472.0 - ISC
68
+ *
69
+ * This source code is licensed under the ISC license.
70
+ * See the LICENSE file in the root directory of this source tree.
71
+ */const oB=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),XR=(...t)=>t.filter((e,n,i)=>!!e&&e.trim()!==""&&i.indexOf(e)===n).join(" ").trim();/**
72
+ * @license lucide-react v0.472.0 - ISC
73
+ *
74
+ * This source code is licensed under the ISC license.
75
+ * See the LICENSE file in the root directory of this source tree.
76
+ */var aB={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"};/**
77
+ * @license lucide-react v0.472.0 - ISC
78
+ *
79
+ * This source code is licensed under the ISC license.
80
+ * See the LICENSE file in the root directory of this source tree.
81
+ */const lB=B.forwardRef(({color:t="currentColor",size:e=24,strokeWidth:n=2,absoluteStrokeWidth:i,className:r="",children:s,iconNode:o,...l},c)=>B.createElement("svg",{ref:c,...aB,width:e,height:e,stroke:t,strokeWidth:i?Number(n)*24/Number(e):n,className:XR("lucide",r),...l},[...o.map(([h,d])=>B.createElement(h,d)),...Array.isArray(s)?s:[s]]));/**
82
+ * @license lucide-react v0.472.0 - ISC
83
+ *
84
+ * This source code is licensed under the ISC license.
85
+ * See the LICENSE file in the root directory of this source tree.
86
+ */const Ve=(t,e)=>{const n=B.forwardRef(({className:i,...r},s)=>B.createElement(lB,{ref:s,iconNode:e,className:XR(`lucide-${oB(t)}`,i),...r}));return n.displayName=`${t}`,n};/**
87
+ * @license lucide-react v0.472.0 - ISC
88
+ *
89
+ * This source code is licensed under the ISC license.
90
+ * See the LICENSE file in the root directory of this source tree.
91
+ */const cB=[["rect",{width:"20",height:"5",x:"2",y:"3",rx:"1",key:"1wp1u1"}],["path",{d:"M4 8v11a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8",key:"1s80jp"}],["path",{d:"M10 12h4",key:"a56b0p"}]],Ts=Ve("Archive",cB);/**
92
+ * @license lucide-react v0.472.0 - ISC
93
+ *
94
+ * This source code is licensed under the ISC license.
95
+ * See the LICENSE file in the root directory of this source tree.
96
+ */const uB=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],Cv=Ve("ArrowLeft",uB);/**
97
+ * @license lucide-react v0.472.0 - ISC
98
+ *
99
+ * This source code is licensed under the ISC license.
100
+ * See the LICENSE file in the root directory of this source tree.
101
+ */const hB=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],dQ=Ve("ArrowUp",hB);/**
102
+ * @license lucide-react v0.472.0 - ISC
103
+ *
104
+ * This source code is licensed under the ISC license.
105
+ * See the LICENSE file in the root directory of this source tree.
106
+ */const fB=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],dB=Ve("Bot",fB);/**
107
+ * @license lucide-react v0.472.0 - ISC
108
+ *
109
+ * This source code is licensed under the ISC license.
110
+ * See the LICENSE file in the root directory of this source tree.
111
+ */const pB=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Vm=Ve("Check",pB);/**
112
+ * @license lucide-react v0.472.0 - ISC
113
+ *
114
+ * This source code is licensed under the ISC license.
115
+ * See the LICENSE file in the root directory of this source tree.
116
+ */const mB=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],gB=Ve("ChevronDown",mB);/**
117
+ * @license lucide-react v0.472.0 - ISC
118
+ *
119
+ * This source code is licensed under the ISC license.
120
+ * See the LICENSE file in the root directory of this source tree.
121
+ */const OB=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Zg=Ve("ChevronRight",OB);/**
122
+ * @license lucide-react v0.472.0 - ISC
123
+ *
124
+ * This source code is licensed under the ISC license.
125
+ * See the LICENSE file in the root directory of this source tree.
126
+ */const yB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Dx=Ve("CircleAlert",yB);/**
127
+ * @license lucide-react v0.472.0 - ISC
128
+ *
129
+ * This source code is licensed under the ISC license.
130
+ * See the LICENSE file in the root directory of this source tree.
131
+ */const bB=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],Xo=Ve("CircleCheckBig",bB);/**
132
+ * @license lucide-react v0.472.0 - ISC
133
+ *
134
+ * This source code is licensed under the ISC license.
135
+ * See the LICENSE file in the root directory of this source tree.
136
+ */const xB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],pQ=Ve("CircleX",xB);/**
137
+ * @license lucide-react v0.472.0 - ISC
138
+ *
139
+ * This source code is licensed under the ISC license.
140
+ * See the LICENSE file in the root directory of this source tree.
141
+ */const vB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],SB=Ve("Circle",vB);/**
142
+ * @license lucide-react v0.472.0 - ISC
143
+ *
144
+ * This source code is licensed under the ISC license.
145
+ * See the LICENSE file in the root directory of this source tree.
146
+ */const _B=[["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"}]],VR=Ve("Copy",_B);/**
147
+ * @license lucide-react v0.472.0 - ISC
148
+ *
149
+ * This source code is licensed under the ISC license.
150
+ * See the LICENSE file in the root directory of this source tree.
151
+ */const kB=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]],wB=Ve("Download",kB);/**
152
+ * @license lucide-react v0.472.0 - ISC
153
+ *
154
+ * This source code is licensed under the ISC license.
155
+ * See the LICENSE file in the root directory of this source tree.
156
+ */const PB=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],Pi=Ve("FileText",PB);/**
157
+ * @license lucide-react v0.472.0 - ISC
158
+ *
159
+ * This source code is licensed under the ISC license.
160
+ * See the LICENSE file in the root directory of this source tree.
161
+ */const TB=[["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z",key:"1rqfz7"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}]],Ev=Ve("File",TB);/**
162
+ * @license lucide-react v0.472.0 - ISC
163
+ *
164
+ * This source code is licensed under the ISC license.
165
+ * See the LICENSE file in the root directory of this source tree.
166
+ */const QB=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],BR=Ve("FolderOpen",QB);/**
167
+ * @license lucide-react v0.472.0 - ISC
168
+ *
169
+ * This source code is licensed under the ISC license.
170
+ * See the LICENSE file in the root directory of this source tree.
171
+ */const CB=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],EB=Ve("FolderPlus",CB);/**
172
+ * @license lucide-react v0.472.0 - ISC
173
+ *
174
+ * This source code is licensed under the ISC license.
175
+ * See the LICENSE file in the root directory of this source tree.
176
+ */const AB=[["path",{d:"M20 10a1 1 0 0 0 1-1V6a1 1 0 0 0-1-1h-2.5a1 1 0 0 1-.8-.4l-.9-1.2A1 1 0 0 0 15 3h-2a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"hod4my"}],["path",{d:"M20 21a1 1 0 0 0 1-1v-3a1 1 0 0 0-1-1h-2.9a1 1 0 0 1-.88-.55l-.42-.85a1 1 0 0 0-.92-.6H13a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1Z",key:"w4yl2u"}],["path",{d:"M3 5a2 2 0 0 0 2 2h3",key:"f2jnh7"}],["path",{d:"M3 3v13a2 2 0 0 0 2 2h3",key:"k8epm1"}]],ZR=Ve("FolderTree",AB);/**
177
+ * @license lucide-react v0.472.0 - ISC
178
+ *
179
+ * This source code is licensed under the ISC license.
180
+ * See the LICENSE file in the root directory of this source tree.
181
+ */const RB=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],mc=Ve("Folder",RB);/**
182
+ * @license lucide-react v0.472.0 - ISC
183
+ *
184
+ * This source code is licensed under the ISC license.
185
+ * See the LICENSE file in the root directory of this source tree.
186
+ */const $B=[["line",{x1:"6",x2:"6",y1:"3",y2:"15",key:"17qcm7"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}],["path",{d:"M18 9a9 9 0 0 1-9 9",key:"n2h4wq"}]],tf=Ve("GitBranch",$B);/**
187
+ * @license lucide-react v0.472.0 - ISC
188
+ *
189
+ * This source code is licensed under the ISC license.
190
+ * See the LICENSE file in the root directory of this source tree.
191
+ */const LB=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],MB=Ve("Info",LB);/**
192
+ * @license lucide-react v0.472.0 - ISC
193
+ *
194
+ * This source code is licensed under the ISC license.
195
+ * See the LICENSE file in the root directory of this source tree.
196
+ */const DB=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],jx=Ve("LayoutDashboard",DB);/**
197
+ * @license lucide-react v0.472.0 - ISC
198
+ *
199
+ * This source code is licensed under the ISC license.
200
+ * See the LICENSE file in the root directory of this source tree.
201
+ */const jB=[["path",{d:"m3 17 2 2 4-4",key:"1jhpwq"}],["path",{d:"m3 7 2 2 4-4",key:"1obspn"}],["path",{d:"M13 6h8",key:"15sg57"}],["path",{d:"M13 12h8",key:"h98zly"}],["path",{d:"M13 18h8",key:"oe0vm4"}]],qR=Ve("ListChecks",jB);/**
202
+ * @license lucide-react v0.472.0 - ISC
203
+ *
204
+ * This source code is licensed under the ISC license.
205
+ * See the LICENSE file in the root directory of this source tree.
206
+ */const NB=[["path",{d:"M3 12h.01",key:"nlz23k"}],["path",{d:"M3 18h.01",key:"1tta3j"}],["path",{d:"M3 6h.01",key:"1rqtza"}],["path",{d:"M8 12h13",key:"1za7za"}],["path",{d:"M8 18h13",key:"1lx6n3"}],["path",{d:"M8 6h13",key:"ik3vkj"}]],mQ=Ve("List",NB);/**
207
+ * @license lucide-react v0.472.0 - ISC
208
+ *
209
+ * This source code is licensed under the ISC license.
210
+ * See the LICENSE file in the root directory of this source tree.
211
+ */const zB=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],nf=Ve("LoaderCircle",zB);/**
212
+ * @license lucide-react v0.472.0 - ISC
213
+ *
214
+ * This source code is licensed under the ISC license.
215
+ * See the LICENSE file in the root directory of this source tree.
216
+ */const IB=[["line",{x1:"4",x2:"20",y1:"12",y2:"12",key:"1e0a9i"}],["line",{x1:"4",x2:"20",y1:"6",y2:"6",key:"1owob3"}],["line",{x1:"4",x2:"20",y1:"18",y2:"18",key:"yk5zj1"}]],XB=Ve("Menu",IB);/**
217
+ * @license lucide-react v0.472.0 - ISC
218
+ *
219
+ * This source code is licensed under the ISC license.
220
+ * See the LICENSE file in the root directory of this source tree.
221
+ */const VB=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],BB=Ve("Monitor",VB);/**
222
+ * @license lucide-react v0.472.0 - ISC
223
+ *
224
+ * This source code is licensed under the ISC license.
225
+ * See the LICENSE file in the root directory of this source tree.
226
+ */const ZB=[["path",{d:"M12 3a6 6 0 0 0 9 9 9 9 0 1 1-9-9Z",key:"a7tn18"}]],qB=Ve("Moon",ZB);/**
227
+ * @license lucide-react v0.472.0 - ISC
228
+ *
229
+ * This source code is licensed under the ISC license.
230
+ * See the LICENSE file in the root directory of this source tree.
231
+ */const UB=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["path",{d:"m3.3 7 7.703 4.734a2 2 0 0 0 1.994 0L20.7 7",key:"yx3hmr"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],YB=Ve("Package",UB);/**
232
+ * @license lucide-react v0.472.0 - ISC
233
+ *
234
+ * This source code is licensed under the ISC license.
235
+ * See the LICENSE file in the root directory of this source tree.
236
+ */const GB=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]],WB=Ve("Pen",GB);/**
237
+ * @license lucide-react v0.472.0 - ISC
238
+ *
239
+ * This source code is licensed under the ISC license.
240
+ * See the LICENSE file in the root directory of this source tree.
241
+ */const HB=[["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"}]],FB=Ve("RefreshCw",HB);/**
242
+ * @license lucide-react v0.472.0 - ISC
243
+ *
244
+ * This source code is licensed under the ISC license.
245
+ * See the LICENSE file in the root directory of this source tree.
246
+ */const KB=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],JB=Ve("Save",KB);/**
247
+ * @license lucide-react v0.472.0 - ISC
248
+ *
249
+ * This source code is licensed under the ISC license.
250
+ * See the LICENSE file in the root directory of this source tree.
251
+ */const eZ=[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z",key:"1qme2f"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],UR=Ve("Settings",eZ);/**
252
+ * @license lucide-react v0.472.0 - ISC
253
+ *
254
+ * This source code is licensed under the ISC license.
255
+ * See the LICENSE file in the root directory of this source tree.
256
+ */const tZ=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],nZ=Ve("Sun",tZ);/**
257
+ * @license lucide-react v0.472.0 - ISC
258
+ *
259
+ * This source code is licensed under the ISC license.
260
+ * See the LICENSE file in the root directory of this source tree.
261
+ */const iZ=[["polyline",{points:"4 17 10 11 4 5",key:"akl6gq"}],["line",{x1:"12",x2:"20",y1:"19",y2:"19",key:"q2wloq"}]],YR=Ve("Terminal",iZ);/**
262
+ * @license lucide-react v0.472.0 - ISC
263
+ *
264
+ * This source code is licensed under the ISC license.
265
+ * See the LICENSE file in the root directory of this source tree.
266
+ */const rZ=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],Av=Ve("TriangleAlert",rZ);/**
267
+ * @license lucide-react v0.472.0 - ISC
268
+ *
269
+ * This source code is licensed under the ISC license.
270
+ * See the LICENSE file in the root directory of this source tree.
271
+ */const sZ=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}],["path",{d:"M5 12.859a10 10 0 0 1 5.17-2.69",key:"1dl1wf"}],["path",{d:"M19 12.859a10 10 0 0 0-2.007-1.523",key:"4k23kn"}],["path",{d:"M2 8.82a15 15 0 0 1 4.177-2.643",key:"1grhjp"}],["path",{d:"M22 8.82a15 15 0 0 0-11.288-3.764",key:"z3jwby"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],GR=Ve("WifiOff",sZ);/**
272
+ * @license lucide-react v0.472.0 - ISC
273
+ *
274
+ * This source code is licensed under the ISC license.
275
+ * See the LICENSE file in the root directory of this source tree.
276
+ */const oZ=[["path",{d:"M12 20h.01",key:"zekei9"}],["path",{d:"M2 8.82a15 15 0 0 1 20 0",key:"dnpr2z"}],["path",{d:"M5 12.859a10 10 0 0 1 14 0",key:"1x1e6c"}],["path",{d:"M8.5 16.429a5 5 0 0 1 7 0",key:"1bycff"}]],WR=Ve("Wifi",oZ);/**
277
+ * @license lucide-react v0.472.0 - ISC
278
+ *
279
+ * This source code is licensed under the ISC license.
280
+ * See the LICENSE file in the root directory of this source tree.
281
+ */const aZ=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Rv=Ve("X",aZ),$v=[{to:"/",icon:jx,label:"Dashboard"},{to:"/project",icon:mc,label:"Project"},{to:"/specs",icon:Pi,label:"Specs"},{to:"/changes",icon:tf,label:"Changes"},{to:"/archive",icon:Ts,label:"Archive"}],gc={to:"/settings",icon:UR,label:"Settings"};function lZ(){const t=IR();return v.jsxs("nav",{className:"desktop-sidebar border-border bg-muted/30 flex w-64 shrink-0 flex-col border-r p-4",children:[v.jsx("div",{className:"mb-6",children:v.jsx("img",{src:t?"/openspec_pixel_dark.svg":"/openspec_pixel_light.svg",alt:"OpenSpec",className:"h-6"})}),v.jsx("ul",{className:"flex-1 space-y-1",children:$v.map(e=>v.jsx("li",{children:v.jsxs(It,{to:e.to,className:"hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2",children:[v.jsx(e.icon,{className:"h-4 w-4 shrink-0"}),v.jsx("span",{className:"font-nav text-base tracking-[0.04em]",children:e.label})]})},e.to))}),v.jsx("div",{className:"border-border border-t pt-4",children:v.jsxs(It,{to:gc.to,className:"hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2",children:[v.jsx(gc.icon,{className:"h-4 w-4 shrink-0"}),v.jsx("span",{className:"font-nav text-base tracking-[0.04em]",children:gc.label})]})})]})}function qg(){const[t,e]=B.useState({connected:!1,projectDir:null,dirName:null,watcherEnabled:!1,error:null,wsState:"idle",reconnectCountdown:null}),n=B.useRef(null),i=B.useRef(null),r=B.useCallback(()=>{i.current=Date.now(),n.current&&clearInterval(n.current),e(o=>({...o,reconnectCountdown:Math.ceil(Mx/1e3)})),n.current=setInterval(()=>{if(i.current===null)return;const o=Date.now()-i.current,l=Math.max(0,Math.ceil((Mx-o)/1e3));e(c=>({...c,reconnectCountdown:l>0?l:null})),l<=0&&n.current&&(clearInterval(n.current),n.current=null,i.current=null)},200)},[]),s=B.useCallback(()=>{n.current&&(clearInterval(n.current),n.current=null),i.current=null,e(o=>({...o,reconnectCountdown:null}))},[]);return B.useEffect(()=>{const o=zR.connectionState.subscribe({next:l=>{e(c=>({...c,wsState:l.state})),l.state==="connecting"&&l.error?r():s()}});return()=>{o.unsubscribe(),s()}},[r,s]),B.useEffect(()=>{let o=!0,l;async function c(){try{const d=await fetch(nB());if(!d.ok)throw new Error(`HTTP ${d.status}`);const p=await d.json();if(o){const g=p.projectDir,O=g.split("/").pop()||g;e(x=>({...x,connected:!0,projectDir:g,dirName:O,watcherEnabled:p.watcherEnabled,error:null})),document.title=`${O} - OpenSpec UI`}}catch(d){o&&(e(p=>({...p,connected:!1,error:d instanceof Error?d.message:"Connection failed"})),document.title="OpenSpec UI (Disconnected)",l=setTimeout(c,3e3))}}c();const h=setInterval(()=>{o&&c()},3e4);return()=>{o=!1,clearInterval(h),clearTimeout(l)}},[]),t}function cZ(){return B.useCallback(()=>{window.location.reload()},[])}function uZ({path:t,maxWidth:e=300,duration:n=10,gap:i=20,className:r=""}){const[s,o]=B.useState(!1),[l,c]=B.useState(!1),h=B.useRef(null),d=B.useRef(null);B.useEffect(()=>{const O=()=>{if(h.current&&d.current){const x=h.current.offsetWidth,S=d.current.scrollWidth;c(S>x)}};return O(),window.addEventListener("resize",O),()=>window.removeEventListener("resize",O)},[t]);const p=B.useCallback(async()=>{try{await navigator.clipboard.writeText(t),o(!0),setTimeout(()=>o(!1),2e3)}catch(O){console.error("Failed to copy path:",O)}},[t]),g=typeof e=="number"?`${e}px`:e;return v.jsxs("button",{onClick:p,className:`hover:bg-muted/50 group flex cursor-pointer items-center gap-1.5 rounded transition-colors ${r}`,title:`${t}
282
+
283
+ Click to copy`,children:[v.jsx("div",{ref:h,className:"relative overflow-hidden whitespace-nowrap",style:{maxWidth:g},children:v.jsx("div",{ref:d,"data-content":t,className:`relative inline-block ${l?"animate-marquee group-hover:[animation-play-state:paused]":""}`,style:l?{"--marquee-duration":`${n}s`,"--marquee-gap":`${i}px`}:void 0,children:t})}),v.jsx("span",{className:"text-muted-foreground group-hover:text-foreground shrink-0 transition-colors",children:s?v.jsx(Vm,{className:"h-3.5 w-3.5 text-green-500"}):v.jsx(VR,{className:"h-3.5 w-3.5"})})]})}function HR(){const t=qg(),e=cZ();return t.connected?v.jsxs("div",{className:"status-indicator flex items-center gap-1.5 text-xs",children:[v.jsx(WR,{className:"h-3.5 w-3.5 text-green-500"}),v.jsx("span",{className:"status-text text-green-600",children:"Live"})]}):v.jsxs("div",{className:"status-indicator flex items-center gap-1.5 text-xs",children:[v.jsx(GR,{className:"h-3.5 w-3.5 text-red-500"}),v.jsx("span",{className:"status-text text-red-600",children:"Offline"}),t.reconnectCountdown!==null&&v.jsxs("button",{onClick:e,className:"text-muted-foreground hover:text-foreground flex cursor-pointer items-center gap-1 transition-colors",title:"Click to reconnect now",children:[v.jsxs("span",{className:"text-xs",children:["(",t.reconnectCountdown,"s)"]}),v.jsx(FB,{className:"h-3 w-3"})]})]})}function hZ(){const t=qg();return v.jsxs("div",{className:"desktop-status border-border bg-muted/30 text-muted-foreground flex h-8 items-center justify-between border-t px-4 text-xs",children:[v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx(HR,{}),t.projectDir&&v.jsxs("div",{className:"flex items-center gap-1.5",children:[v.jsx(BR,{className:"h-3.5 w-3.5 shrink-0"}),v.jsx(uZ,{path:t.projectDir,maxWidth:300,duration:12,className:"text-xs"})]})]}),t.connected&&v.jsx("div",{className:"flex items-center gap-1.5",children:t.watcherEnabled?v.jsx("span",{className:"text-green-600",children:"Watching for changes"}):v.jsx("span",{className:"text-yellow-600",children:"File watcher disabled"})})]})}function fZ(){const[t,e]=B.useState(!1),n=IR(),r=qg().dirName??"OpenSpec";return v.jsxs(v.Fragment,{children:[v.jsxs("header",{className:"mobile-header border-border bg-background flex h-12 items-center justify-between border-b px-4",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("button",{onClick:()=>e(!0),className:"hover:bg-muted -ml-1.5 rounded-md p-1.5","aria-label":"Open menu",children:v.jsx(XB,{className:"h-5 w-5"})}),v.jsx("span",{className:"font-nav text-[12px] tracking-[0.04em]",children:r})]}),v.jsx(HR,{})]}),t&&v.jsxs("div",{className:"fixed inset-0 z-50 flex",children:[v.jsx("div",{className:"animate-in fade-in absolute inset-0 bg-black/50 duration-200",onClick:()=>e(!1)}),v.jsxs("nav",{className:"bg-background border-border animate-in slide-in-from-left relative flex w-64 max-w-[80vw] flex-col border-r p-4 duration-200",children:[v.jsxs("div",{className:"mb-6 flex items-center justify-between",children:[v.jsx("img",{src:n?"/openspec_pixel_dark.svg":"/openspec_pixel_light.svg",alt:"OpenSpec",className:"h-5"}),v.jsx("button",{onClick:()=>e(!1),className:"hover:bg-muted rounded-md p-1.5","aria-label":"Close menu",children:v.jsx(Rv,{className:"h-5 w-5"})})]}),v.jsx("ul",{className:"flex-1 space-y-1",children:$v.map(s=>v.jsx("li",{children:v.jsxs(It,{to:s.to,onClick:()=>e(!1),className:"hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2",children:[v.jsx(s.icon,{className:"h-4 w-4 shrink-0"}),v.jsx("span",{className:"text-[12px] font-nav tracking-[0.04em]",children:s.label})]})},s.to))}),v.jsx("div",{className:"border-border border-t pt-4",children:v.jsxs(It,{to:gc.to,onClick:()=>e(!1),className:"hover:bg-muted [&.active]:bg-primary [&.active]:text-primary-foreground flex items-center gap-2 rounded-md px-3 py-2",children:[v.jsx(gc.icon,{className:"h-4 w-4 shrink-0"}),v.jsx("span",{className:"font-nav text-[12px] tracking-[0.04em]",children:gc.label})]})})]})]})]})}function dZ(){return v.jsx("nav",{className:"mobile-tabbar h-14 border-t border-border bg-background flex items-stretch",children:$v.slice(0,5).map(t=>v.jsxs(It,{to:t.to,className:"flex-1 flex flex-col items-center justify-center gap-0.5 text-muted-foreground hover:text-foreground [&.active]:text-primary",children:[v.jsx(t.icon,{className:"w-5 h-5 shrink-0"}),v.jsx("span",{className:"text-[10px] font-nav tracking-[0.03em]",children:t.label})]},t.to))})}const FR=B.createContext(null);function pZ({children:t}){const[e,n]=B.useState({open:!1,changeId:"",changeName:""}),i=B.useCallback((s,o)=>{n({open:!0,changeId:s,changeName:o})},[]),r=B.useCallback(()=>{n(s=>({...s,open:!1}))},[]);return v.jsx(FR.Provider,{value:{state:e,openArchiveModal:i,closeArchiveModal:r},children:t})}function KR(){const t=B.useContext(FR);if(!t)throw new Error("useArchiveModal must be used within ArchiveModalProvider");return t}function mZ({open:t,title:e,onClose:n,children:i,footer:r,className:s="",bodyClassName:o="",maxHeight:l="86vh",borderVariant:c="default"}){if(!t)return null;const h=c==="error"?"border-red-500/60":c==="success"?"border-green-500/50":"border-border";return v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[v.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:n}),v.jsxs("div",{className:`bg-background relative mx-4 flex w-full max-w-2xl flex-col overflow-hidden rounded-lg border shadow-xl ${h} ${s}`,style:{maxHeight:l},children:[v.jsxs("div",{className:"border-border flex flex-none shrink-0 items-center justify-between border-b px-4 py-3",children:[v.jsx("div",{className:"flex items-center gap-2",children:e}),v.jsx("button",{onClick:n,className:"hover:bg-muted rounded p-1","aria-label":"Close dialog",children:v.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",className:"h-4 w-4",stroke:"currentColor",fill:"none",strokeWidth:"2",children:v.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M6 6l12 12M6 18L18 6"})})})]}),v.jsx("div",{className:`min-h-0 flex-1 overflow-auto px-4 py-3 ${o}`,children:i}),r&&v.jsx("div",{className:"border-border flex flex-none shrink-0 items-center justify-end gap-2 border-t px-4 py-3",children:r})]})]})}const gZ=B.forwardRef(function({lines:e,status:n,exitCode:i,maxHeight:r="60vh",scrollRef:s},o){const l=s??o;return v.jsxs("div",{ref:l,className:"scrollbar-thin scrollbar-track-transparent scrollbar-thumb-zinc-700 overflow-auto bg-zinc-900 p-4 font-mono text-sm text-zinc-100",style:{maxHeight:r},children:[e.length===0&&n==="running"&&v.jsx("span",{className:"text-zinc-500",children:"Starting..."}),e.map((c,h)=>v.jsx("div",{className:"whitespace-pre-wrap break-all",children:OZ(c)},h)),n==="success"&&v.jsxs("div",{className:"mt-2 text-green-400",children:["Process exited with code ",i]}),n==="error"&&i!==null&&v.jsxs("div",{className:"mt-2 text-red-400",children:["Process exited with code ",i]}),n==="error"&&i===null&&v.jsx("div",{className:"mt-2 text-red-400",children:"Process exited with unknown code"})]})});function OZ(t){const e=[];let n=0,i=null;const r=/\x1b\[(\d+)m/g;let s;for(;(s=r.exec(t))!==null;){if(s.index>n){const l=t.slice(n,s.index);e.push(i?v.jsx("span",{className:i,children:l},n):l)}const o=parseInt(s[1],10);o===0?i=null:o===31?i="text-red-400":o===32?i="text-green-400":o===33?i="text-yellow-400":o===34&&(i="text-blue-400"),n=s.index+s[0].length}if(n<t.length){const o=t.slice(n);e.push(i?v.jsx("span",{className:i,children:o},n):o)}return e.length>0?e:t}function Nx({title:t,open:e,onClose:n,onSuccess:i,successConfig:r,type:s,initOptions:o,archiveOptions:l,validateOptions:c,onArchiveDetected:h}){const[d,p]=B.useState([]),[g,O]=B.useState("idle"),[x,S]=B.useState(null),[_,k]=B.useState("idle"),P=B.useRef(null),Q=B.useRef(null);B.useEffect(()=>{P.current&&(P.current.scrollTop=P.current.scrollHeight)},[d]);const R=B.useCallback(J=>{if(J.type==="command"&&J.data)p(K=>[...K,`\x1B[34m$ ${J.data}\x1B[0m`]);else if(J.type==="stdout"&&J.data){p(ie=>[...ie,J.data]);const K=/Change ['"](.+?)['"] archived as ['"](.+?)['"]/.exec(J.data);K!=null&&K[2]&&(h==null||h(K[2]))}else if(J.type==="stderr"&&J.data)p(K=>[...K,`\x1B[31m${J.data}\x1B[0m`]);else if(J.type==="exit"){if(S(J.exitCode??null),_==="validating"){if(J.exitCode===0)return;O("error");return}O(J.exitCode===0?"success":"error")}},[h,_]),$=B.useMemo(()=>o?JSON.stringify(o):null,[o==null?void 0:o.tools]),C=B.useMemo(()=>l?JSON.stringify(l):null,[l==null?void 0:l.changeId,l==null?void 0:l.skipSpecs,l==null?void 0:l.noValidate]),D=B.useMemo(()=>c?JSON.stringify(c):null,[c==null?void 0:c.changeId]);B.useEffect(()=>{if(e){if(p([]),O("running"),S(null),k("command"),s==="init"&&o)Q.current=At.cli.initStream.subscribe({tools:o.tools},{onData:R,onError:J=>{p(K=>[...K,`\x1B[31mError: ${J.message}\x1B[0m`]),O("error")}});else if(s==="archive"&&l){const J=()=>{k("archiving"),Q.current=At.cli.archiveStream.subscribe({changeId:l.changeId,skipSpecs:l.skipSpecs,noValidate:l.noValidate},{onData:R,onError:K=>{p(ie=>[...ie,`\x1B[31mError: ${K.message}\x1B[0m`]),O("error")}})};l.noValidate?J():(k("validating"),Q.current=At.cli.validateStream.subscribe({id:l.changeId},{onData:K=>{var ie;K.type==="exit"&&K.exitCode===0?((ie=Q.current)==null||ie.unsubscribe(),J()):R(K)},onError:K=>{p(ie=>[...ie,`\x1B[31mError: ${K.message}\x1B[0m`]),O("error")}}))}else s==="validate"&&c?(k("validating"),Q.current=At.cli.validateStream.subscribe({id:c.changeId},{onData:R,onError:J=>{p(K=>[...K,`\x1B[31mError: ${J.message}\x1B[0m`]),O("error")}})):s==="install-global"&&(Q.current=At.cli.installGlobalCliStream.subscribe(void 0,{onData:R,onError:J=>{p(K=>[...K,`\x1B[31mError: ${J.message}\x1B[0m`]),O("error")}}));return()=>{var J;(J=Q.current)==null||J.unsubscribe(),Q.current=null}}},[e,s,$,C,D,R]),B.useEffect(()=>{g==="success"&&!r&&(i==null||i())},[g,i,r]);const Z=()=>{var J;(J=Q.current)==null||J.unsubscribe(),Q.current=null,n()};if(!e)return null;const U=g==="success"&&!!r,M=g==="error"?"error":U?"success":"default",V=v.jsxs(v.Fragment,{children:[U?v.jsx(Xo,{className:"h-5 w-5 text-green-500"}):v.jsx(YR,{className:"text-muted-foreground h-5 w-5"}),v.jsx("h2",{className:"font-semibold",children:U?r.title:t}),g==="running"&&v.jsx(nf,{className:"text-primary h-4 w-4 animate-spin"}),g==="success"&&!r&&v.jsx(Xo,{className:"h-4 w-4 text-green-500"}),g==="error"&&v.jsx(Av,{className:"h-4 w-4 text-red-500"})]}),G=U?r.actions.map((J,K)=>v.jsx("button",{onClick:J.onClick,disabled:J.disabled,className:J.primary?`bg-primary text-primary-foreground rounded-md px-4 py-2 ${J.disabled?"opacity-50 cursor-not-allowed":"hover:opacity-90"}`:`bg-muted rounded-md px-4 py-2 ${J.disabled?"opacity-50 cursor-not-allowed":"hover:bg-muted/80"}`,children:J.label},K)):v.jsx("button",{onClick:Z,className:"bg-muted hover:bg-muted/80 rounded-md px-4 py-2",children:g==="running"?"Cancel":"Close"});return v.jsxs(mZ,{open:e,onClose:Z,title:V,footer:G,borderVariant:M,children:[v.jsx(gZ,{lines:d,status:g==="success"&&!r?"success":g,exitCode:x,scrollRef:P,maxHeight:U?"40vh":"60vh"}),U&&r.description&&v.jsx("div",{className:"border-border bg-muted/30 mt-3 rounded border px-4 py-3",children:v.jsxs("div",{className:"flex items-start gap-3",children:[v.jsx(YB,{className:"mt-0.5 h-5 w-5 shrink-0 text-green-500"}),v.jsx("p",{className:"text-muted-foreground text-sm",children:r.description})]})})]})}function yZ(){const t=ru(),{state:e,closeArchiveModal:n}=KR(),{open:i,changeId:r,changeName:s}=e,[o,l]=B.useState("options"),[c,h]=B.useState(!1),[d,p]=B.useState(!1),[g,O]=B.useState(null);B.useEffect(()=>{i&&(l("options"),h(!1),p(!1),O(null))},[i]);const x=B.useMemo(()=>r?`${new Date().toISOString().split("T")[0]}-${r}`:"",[r]),S=B.useCallback(()=>{l("options"),h(!1),p(!1),O(null),n()},[n]),_=B.useCallback(()=>{r&&l("terminal")},[r]),k=B.useMemo(()=>({title:"Archive Successful",description:`"${s}" has been archived as ${g??x}`,actions:[{label:"Close",onClick:S},{label:"View Archive",disabled:!g,onClick:()=>{S(),g&&t({to:"/archive/$changeId",params:{changeId:g}})},primary:!0}]}),[s,x,g,t,S]);return!i||!r?null:o==="terminal"?v.jsx(Nx,{title:`Archive: ${s}`,open:!0,onClose:S,successConfig:k,type:"archive",archiveOptions:{changeId:r,skipSpecs:c,noValidate:d},onArchiveDetected:O}):v.jsxs("div",{className:"fixed inset-0 z-50 flex items-center justify-center",children:[v.jsx("div",{className:"absolute inset-0 bg-black/50",onClick:S}),v.jsxs("div",{className:"bg-background border-border relative mx-4 w-full max-w-md rounded-lg border shadow-xl",children:[v.jsxs("div",{className:"border-border flex items-center justify-between border-b px-4 py-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(Ts,{className:"h-5 w-5 text-red-500"}),v.jsx("h2",{className:"font-semibold",children:"Archive Change"})]}),v.jsx("button",{onClick:S,className:"hover:bg-muted rounded p-1",children:v.jsx(Rv,{className:"h-5 w-5"})})]}),v.jsxs("div",{className:"space-y-4 p-4",children:[v.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-amber-500/30 bg-amber-500/10 p-3",children:[v.jsx(Av,{className:"mt-0.5 h-5 w-5 shrink-0 text-amber-500"}),v.jsxs("div",{className:"text-sm",children:[v.jsx("p",{className:"font-medium text-amber-600 dark:text-amber-400",children:"This action will archive the change"}),v.jsx("p",{className:"text-muted-foreground mt-1",children:"Archiving moves the change to the archive directory and updates affected specs."})]})]}),v.jsxs("div",{className:"bg-muted/50 rounded-lg p-3",children:[v.jsx("p",{className:"text-muted-foreground text-sm",children:"Change to archive:"}),v.jsx("p",{className:"font-medium",children:s}),v.jsxs("p",{className:"text-muted-foreground mt-1 text-xs",children:["ID: ",r]})]}),v.jsxs("div",{className:"space-y-3",children:[v.jsx("p",{className:"text-sm font-medium",children:"Options"}),v.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[v.jsx("input",{type:"checkbox",checked:c,onChange:P=>h(P.target.checked),className:"border-border mt-1 h-4 w-4 rounded"}),v.jsxs("div",{children:[v.jsx("p",{className:"text-sm font-medium",children:"Skip specs update"}),v.jsx("p",{className:"text-muted-foreground text-xs",children:"Don't update spec files with delta changes (--skip-specs)"})]})]}),v.jsxs("label",{className:"flex cursor-pointer items-start gap-3",children:[v.jsx("input",{type:"checkbox",checked:d,onChange:P=>p(P.target.checked),className:"border-border mt-1 h-4 w-4 rounded"}),v.jsxs("div",{children:[v.jsx("p",{className:"text-sm font-medium",children:"Skip validation"}),v.jsx("p",{className:"text-muted-foreground text-xs",children:"Don't validate the change before archiving (--no-validate)"})]})]})]})]}),v.jsxs("div",{className:"border-border flex items-center justify-end gap-2 border-t px-4 py-3",children:[v.jsx("button",{onClick:S,className:"bg-muted hover:bg-muted/80 rounded-md px-4 py-2",children:"Cancel"}),v.jsxs("button",{onClick:_,className:"flex items-center gap-2 rounded-md bg-red-600 px-4 py-2 text-white hover:bg-red-700",children:[v.jsx(Ts,{className:"h-4 w-4"}),"Archive"]})]})]})]})}function bZ(){const t=Nn({select:i=>`${i.location.pathname}${i.location.search}`}),[e,n]=B.useState(t);return B.useLayoutEffect(()=>{if(t===e)return;const i=document,r=()=>n(t);typeof i.startViewTransition=="function"?(document.documentElement.dataset.vtRunning="1",i.startViewTransition(()=>{oR.flushSync(r)}).finished.catch(()=>{}).finally(()=>{delete document.documentElement.dataset.vtRunning})):r()},[t,e]),v.jsx(cR,{},e)}function xZ(){return v.jsxs("div",{className:"fixed inset-0 @container/app",style:{containerName:"app"},children:[v.jsxs("div",{className:"app-layout h-full",children:[v.jsx(lZ,{}),v.jsxs("div",{className:"app-body flex flex-col flex-1 min-h-0",children:[v.jsx(fZ,{}),v.jsx("main",{className:"main-content flex flex-col view-transition-route",children:v.jsx(bZ,{})}),v.jsx(dZ,{}),v.jsx(hZ,{})]})]}),v.jsx(yZ,{})]})}function ri(t,e=[]){const[n,i]=B.useState({data:void 0,isLoading:!0,error:null}),r=B.useRef(null);return B.useEffect(()=>{var o;(o=r.current)==null||o.unsubscribe(),i(l=>({...l,isLoading:!0,error:null}));const s=t({onData:l=>{i({data:l,isLoading:!1,error:null})},onError:l=>{console.error("Subscription error:",l),i(c=>({...c,isLoading:!1,error:l}))}});return r.current=s,()=>{s.unsubscribe()}},e),n}function vZ(){return ri(t=>At.dashboard.subscribe.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function SZ(){return ri(t=>At.dashboard.subscribeInitialized.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function _Z(){return ri(t=>At.spec.subscribe.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function kZ(t){return ri(e=>At.spec.subscribeOne.subscribe({id:t},{onData:e.onData,onError:e.onError}),[t])}function wZ(){return ri(t=>At.change.subscribe.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function PZ(t){return ri(e=>At.change.subscribeOne.subscribe({id:t},{onData:e.onData,onError:e.onError}),[t])}function TZ(t){return ri(e=>At.change.subscribeFiles.subscribe({id:t},{onData:e.onData,onError:e.onError}),[t])}function QZ(){return ri(t=>At.archive.subscribe.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function CZ(t){return ri(e=>At.archive.subscribeOne.subscribe({id:t},{onData:e.onData,onError:e.onError}),[t])}function EZ(t){return ri(e=>At.archive.subscribeFiles.subscribe({id:t},{onData:e.onData,onError:e.onError}),[t])}function AZ(){return ri(t=>At.project.subscribeProjectMd.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function RZ(){return ri(t=>At.project.subscribeAgentsMd.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function $Z(){return ri(t=>At.config.subscribe.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function LZ(){return ri(t=>At.cli.subscribeConfiguredTools.subscribe(void 0,{onData:t.onData,onError:t.onError}),[])}function MZ(){const{data:t,isLoading:e,error:n}=vZ(),{data:i}=SZ(),r=B.useMemo(()=>t!=null&&t.specs?[...t.specs].sort((o,l)=>l.requirements.length-o.requirements.length):[],[t==null?void 0:t.specs]);if(e&&!t)return v.jsx("div",{className:"route-loading animate-pulse",children:"Loading dashboard..."});if(n)return v.jsxs("div",{className:"text-destructive flex items-center gap-2",children:[v.jsx(Dx,{className:"h-5 w-5"}),"Error loading dashboard: ",n.message]});if(!i)return v.jsxs("div",{className:"py-12 text-center",children:[v.jsxs("h2",{className:"font-nav mb-4 flex items-center justify-center gap-2 text-2xl font-bold",children:[v.jsx(jx,{className:"h-6 w-6 shrink-0"}),"OpenSpec Not Initialized"]}),v.jsx("p",{className:"text-muted-foreground mb-6",children:"This project doesn't have an OpenSpec directory yet."}),v.jsx(It,{to:"/settings",className:"bg-primary text-primary-foreground inline-flex items-center gap-2 rounded-md px-4 py-2 hover:opacity-90",children:"Initialize OpenSpec"})]});if(!t)return null;const{summary:s}=t;return v.jsxs("div",{className:"space-y-6",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(jx,{className:"h-6 w-6 shrink-0"}),"Dashboard"]}),v.jsxs("div",{className:"grid grid-cols-1 gap-4 md:grid-cols-2 lg:grid-cols-4",children:[v.jsx(Qp,{icon:v.jsx(Pi,{className:"h-5 w-5"}),label:"Specifications",value:s.specCount,sublabel:`${s.requirementCount} requirements`}),v.jsx(Qp,{icon:v.jsx(tf,{className:"h-5 w-5"}),label:"Active Changes",value:s.activeChangeCount,sublabel:"in progress"}),v.jsx(Qp,{icon:v.jsx(Ts,{className:"h-5 w-5"}),label:"Completed",value:s.archivedChangeCount,sublabel:"archived"}),v.jsx(Qp,{icon:v.jsx(Xo,{className:"h-5 w-5"}),label:"Task Progress",value:`${s.completedTasks}/${s.totalTasks}`,sublabel:`${s.progressPercent}% complete`})]}),v.jsxs("section",{children:[v.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"Active Changes"}),t.changes.length>0&&v.jsx(It,{to:"/changes",className:"text-primary text-sm hover:underline",children:"View all"})]}),v.jsxs("div",{className:"border-border divide-border divide-y rounded-lg border",children:[t.changes.map(o=>{const l=o.progress.total>0?Math.round(o.progress.completed/o.progress.total*100):0;return v.jsxs(It,{to:"/changes/$changeId",params:{changeId:o.id},className:"hover:bg-muted/50 block p-4",children:[v.jsxs("div",{className:"mb-2 flex items-center justify-between",children:[v.jsx("div",{className:"font-medium",children:o.name}),v.jsxs("span",{className:"text-muted-foreground text-sm",children:[o.progress.completed,"/",o.progress.total," tasks"]})]}),v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx("div",{className:"bg-muted h-2 flex-1 rounded-full",children:v.jsx("div",{className:"bg-primary h-2 rounded-full transition-all",style:{width:`${l}%`}})}),v.jsxs("span",{className:"w-12 text-right text-sm font-medium",children:[l,"%"]})]})]},o.id)}),t.changes.length===0&&v.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:["No active changes. Create one in"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:"openspec/changes/"})]})]})]}),v.jsxs("section",{children:[v.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"Specifications"}),r.length>0&&v.jsx(It,{to:"/specs",className:"text-primary text-sm hover:underline",children:"View all"})]}),v.jsxs("div",{className:"border-border divide-border divide-y rounded-lg border",children:[r.map(o=>v.jsxs(It,{to:"/specs/$specId",params:{specId:o.id},className:"hover:bg-muted/50 flex items-center justify-between p-3",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Pi,{className:"text-muted-foreground h-4 w-4"}),v.jsx("span",{className:"font-medium",children:o.name})]}),v.jsxs("span",{className:"text-muted-foreground text-sm",children:[o.requirements.length," requirement",o.requirements.length!==1?"s":""]})]},o.id)),r.length===0&&v.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:["No specs yet. Create one in"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:"openspec/specs/"})]})]})]})]})}function Qp({icon:t,label:e,value:n,sublabel:i}){return v.jsxs("div",{className:"border-border rounded-lg border p-4",children:[v.jsxs("div",{className:"text-muted-foreground mb-2 flex items-center gap-2",children:[t,v.jsx("span",{className:"text-sm",children:e})]}),v.jsx("div",{className:"text-2xl font-bold",children:n}),v.jsx("div",{className:"text-muted-foreground text-sm",children:i})]})}function Lv(t){if(!t)return"";const n=Date.now()-t,i=Math.floor(n/1e3),r=Math.floor(i/60),s=Math.floor(r/60),o=Math.floor(s/24),l=Math.floor(o/7),c=Math.floor(o/30),h=Math.floor(o/365);return i<60?"just now":r<60?`${r}m ago`:s<24?`${s}h ago`:o<7?`${o}d ago`:l<4?`${l}w ago`:c<12?`${c}mo ago`:`${h}y ago`}function DZ(){const{data:t,isLoading:e}=_Z();return e&&!t?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading specs..."}):v.jsxs("div",{className:"space-y-6",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(Pi,{className:"h-6 w-6 shrink-0"}),"Specifications"]}),v.jsxs("div",{className:"border-border divide-border divide-y rounded-lg border",children:[t==null?void 0:t.map(n=>v.jsxs(It,{to:"/specs/$specId",params:{specId:n.id},className:"hover:bg-muted/50 flex items-center justify-between p-4",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Pi,{className:"text-muted-foreground h-5 w-5"}),v.jsxs("div",{children:[v.jsx("div",{className:"font-medium",children:n.name}),v.jsxs("div",{className:"text-muted-foreground text-sm",children:[n.id,n.updatedAt>0&&v.jsxs(v.Fragment,{children:[" · ",Lv(n.updatedAt)]})]})]})]}),v.jsx(Zg,{className:"text-muted-foreground h-4 w-4"})]},n.id)),(t==null?void 0:t.length)===0&&v.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:["No specs found. Create a spec in ",v.jsx("code",{children:"openspec/specs/"})]})]})]})}function JR(t,e){const n=e||{};return(t[t.length-1]===""?[...t,""]:t).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const jZ=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NZ=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,zZ={};function gQ(t,e){return(zZ.jsx?NZ:jZ).test(t)}const IZ=/[ \t\n\f\r]/g;function Ug(t){return typeof t=="object"?t.type==="text"?OQ(t.value):!1:OQ(t)}function OQ(t){return t.replace(IZ,"")===""}let Bf=class{constructor(e,n,i){this.normal=n,this.property=e,i&&(this.space=i)}};Bf.prototype.normal={};Bf.prototype.property={};Bf.prototype.space=void 0;function e$(t,e){const n={},i={};for(const r of t)Object.assign(n,r.property),Object.assign(i,r.normal);return new Bf(n,i,e)}function zx(t){return t.toLowerCase()}class si{constructor(e,n){this.attribute=n,this.property=e}}si.prototype.attribute="";si.prototype.booleanish=!1;si.prototype.boolean=!1;si.prototype.commaOrSpaceSeparated=!1;si.prototype.commaSeparated=!1;si.prototype.defined=!1;si.prototype.mustUseProperty=!1;si.prototype.number=!1;si.prototype.overloadedBoolean=!1;si.prototype.property="";si.prototype.spaceSeparated=!1;si.prototype.space=void 0;let XZ=0;const Ie=ol(),Ut=ol(),Ix=ol(),de=ol(),kt=ol(),Oc=ol(),bi=ol();function ol(){return 2**++XZ}const Xx=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ie,booleanish:Ut,commaOrSpaceSeparated:bi,commaSeparated:Oc,number:de,overloadedBoolean:Ix,spaceSeparated:kt},Symbol.toStringTag,{value:"Module"})),nb=Object.keys(Xx);class Mv extends si{constructor(e,n,i,r){let s=-1;if(super(e,n),yQ(this,"space",r),typeof i=="number")for(;++s<nb.length;){const o=nb[s];yQ(this,nb[s],(i&Xx[o])===Xx[o])}}}Mv.prototype.defined=!0;function yQ(t,e,n){n&&(t[e]=n)}function ou(t){const e={},n={};for(const[i,r]of Object.entries(t.properties)){const s=new Mv(i,t.transform(t.attributes||{},i),r,t.space);t.mustUseProperty&&t.mustUseProperty.includes(i)&&(s.mustUseProperty=!0),e[i]=s,n[zx(i)]=i,n[zx(s.attribute)]=i}return new Bf(e,n,t.space)}const t$=ou({properties:{ariaActiveDescendant:null,ariaAtomic:Ut,ariaAutoComplete:null,ariaBusy:Ut,ariaChecked:Ut,ariaColCount:de,ariaColIndex:de,ariaColSpan:de,ariaControls:kt,ariaCurrent:null,ariaDescribedBy:kt,ariaDetails:null,ariaDisabled:Ut,ariaDropEffect:kt,ariaErrorMessage:null,ariaExpanded:Ut,ariaFlowTo:kt,ariaGrabbed:Ut,ariaHasPopup:null,ariaHidden:Ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:kt,ariaLevel:de,ariaLive:null,ariaModal:Ut,ariaMultiLine:Ut,ariaMultiSelectable:Ut,ariaOrientation:null,ariaOwns:kt,ariaPlaceholder:null,ariaPosInSet:de,ariaPressed:Ut,ariaReadOnly:Ut,ariaRelevant:null,ariaRequired:Ut,ariaRoleDescription:kt,ariaRowCount:de,ariaRowIndex:de,ariaRowSpan:de,ariaSelected:Ut,ariaSetSize:de,ariaSort:null,ariaValueMax:de,ariaValueMin:de,ariaValueNow:de,ariaValueText:null,role:null},transform(t,e){return e==="role"?e:"aria-"+e.slice(4).toLowerCase()}});function n$(t,e){return e in t?t[e]:e}function i$(t,e){return n$(t,e.toLowerCase())}const VZ=ou({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Oc,acceptCharset:kt,accessKey:kt,action:null,allow:null,allowFullScreen:Ie,allowPaymentRequest:Ie,allowUserMedia:Ie,alt:null,as:null,async:Ie,autoCapitalize:null,autoComplete:kt,autoFocus:Ie,autoPlay:Ie,blocking:kt,capture:null,charSet:null,checked:Ie,cite:null,className:kt,cols:de,colSpan:null,content:null,contentEditable:Ut,controls:Ie,controlsList:kt,coords:de|Oc,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ie,defer:Ie,dir:null,dirName:null,disabled:Ie,download:Ix,draggable:Ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ie,formTarget:null,headers:kt,height:de,hidden:Ix,high:de,href:null,hrefLang:null,htmlFor:kt,httpEquiv:kt,id:null,imageSizes:null,imageSrcSet:null,inert:Ie,inputMode:null,integrity:null,is:null,isMap:Ie,itemId:null,itemProp:kt,itemRef:kt,itemScope:Ie,itemType:kt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ie,low:de,manifest:null,max:null,maxLength:de,media:null,method:null,min:null,minLength:de,multiple:Ie,muted:Ie,name:null,nonce:null,noModule:Ie,noValidate:Ie,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:Ie,optimum:de,pattern:null,ping:kt,placeholder:null,playsInline:Ie,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ie,referrerPolicy:null,rel:kt,required:Ie,reversed:Ie,rows:de,rowSpan:de,sandbox:kt,scope:null,scoped:Ie,seamless:Ie,selected:Ie,shadowRootClonable:Ie,shadowRootDelegatesFocus:Ie,shadowRootMode:null,shape:null,size:de,sizes:null,slot:null,span:de,spellCheck:Ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:de,step:null,style:null,tabIndex:de,target:null,title:null,translate:null,type:null,typeMustMatch:Ie,useMap:null,value:Ut,width:de,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:kt,axis:null,background:null,bgColor:null,border:de,borderColor:null,bottomMargin:de,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ie,declare:Ie,event:null,face:null,frame:null,frameBorder:null,hSpace:de,leftMargin:de,link:null,longDesc:null,lowSrc:null,marginHeight:de,marginWidth:de,noResize:Ie,noHref:Ie,noShade:Ie,noWrap:Ie,object:null,profile:null,prompt:null,rev:null,rightMargin:de,rules:null,scheme:null,scrolling:Ut,standby:null,summary:null,text:null,topMargin:de,valueType:null,version:null,vAlign:null,vLink:null,vSpace:de,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ie,disableRemotePlayback:Ie,prefix:null,property:null,results:de,security:null,unselectable:null},space:"html",transform:i$}),BZ=ou({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:bi,accentHeight:de,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:de,amplitude:de,arabicForm:null,ascent:de,attributeName:null,attributeType:null,azimuth:de,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:de,by:null,calcMode:null,capHeight:de,className:kt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:de,diffuseConstant:de,direction:null,display:null,dur:null,divisor:de,dominantBaseline:null,download:Ie,dx:null,dy:null,edgeMode:null,editable:null,elevation:de,enableBackground:null,end:null,event:null,exponent:de,externalResourcesRequired:null,fill:null,fillOpacity:de,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:Oc,g2:Oc,glyphName:Oc,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:de,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:de,horizOriginX:de,horizOriginY:de,id:null,ideographic:de,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:de,k:de,k1:de,k2:de,k3:de,k4:de,kernelMatrix:bi,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:de,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:de,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:de,overlineThickness:de,paintOrder:null,panose1:null,path:null,pathLength:de,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:kt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:de,pointsAtY:de,pointsAtZ:de,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:bi,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:bi,rev:bi,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:bi,requiredFeatures:bi,requiredFonts:bi,requiredFormats:bi,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:de,specularExponent:de,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:de,strikethroughThickness:de,string:null,stroke:null,strokeDashArray:bi,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:de,strokeOpacity:de,strokeWidth:null,style:null,surfaceScale:de,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:bi,tabIndex:de,tableValues:null,target:null,targetX:de,targetY:de,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:bi,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:de,underlineThickness:de,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:de,values:null,vAlphabetic:de,vMathematical:de,vectorEffect:null,vHanging:de,vIdeographic:de,version:null,vertAdvY:de,vertOriginX:de,vertOriginY:de,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:de,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:n$}),r$=ou({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,e){return"xlink:"+e.slice(5).toLowerCase()}}),s$=ou({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:i$}),o$=ou({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,e){return"xml:"+e.slice(3).toLowerCase()}}),ZZ={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},qZ=/[A-Z]/g,bQ=/-[a-z]/g,UZ=/^data[-\w.:]+$/i;function a$(t,e){const n=zx(e);let i=e,r=si;if(n in t.normal)return t.property[t.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&UZ.test(e)){if(e.charAt(4)==="-"){const s=e.slice(5).replace(bQ,GZ);i="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=e.slice(4);if(!bQ.test(s)){let o=s.replace(qZ,YZ);o.charAt(0)!=="-"&&(o="-"+o),e="data"+o}}r=Mv}return new r(i,e)}function YZ(t){return"-"+t.toLowerCase()}function GZ(t){return t.charAt(1).toUpperCase()}const l$=e$([t$,VZ,r$,s$,o$],"html"),Zf=e$([t$,BZ,r$,s$,o$],"svg");function c$(t){return t.join(" ").trim()}var ic={},ib,xQ;function WZ(){if(xQ)return ib;xQ=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,e=/\n/g,n=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,r=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,o=/^[;\s]*/,l=/^\s+|\s+$/g,c=`
284
+ `,h="/",d="*",p="",g="comment",O="declaration";function x(_,k){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];k=k||{};var P=1,Q=1;function R(K){var ie=K.match(e);ie&&(P+=ie.length);var q=K.lastIndexOf(c);Q=~q?K.length-q:Q+K.length}function $(){var K={line:P,column:Q};return function(ie){return ie.position=new C(K),U(),ie}}function C(K){this.start=K,this.end={line:P,column:Q},this.source=k.source}C.prototype.content=_;function D(K){var ie=new Error(k.source+":"+P+":"+Q+": "+K);if(ie.reason=K,ie.filename=k.source,ie.line=P,ie.column=Q,ie.source=_,!k.silent)throw ie}function Z(K){var ie=K.exec(_);if(ie){var q=ie[0];return R(q),_=_.slice(q.length),ie}}function U(){Z(n)}function M(K){var ie;for(K=K||[];ie=V();)ie!==!1&&K.push(ie);return K}function V(){var K=$();if(!(h!=_.charAt(0)||d!=_.charAt(1))){for(var ie=2;p!=_.charAt(ie)&&(d!=_.charAt(ie)||h!=_.charAt(ie+1));)++ie;if(ie+=2,p===_.charAt(ie-1))return D("End of comment missing");var q=_.slice(2,ie-2);return Q+=2,R(q),_=_.slice(ie),Q+=2,K({type:g,comment:q})}}function G(){var K=$(),ie=Z(i);if(ie){if(V(),!Z(r))return D("property missing ':'");var q=Z(s),se=K({type:O,property:S(ie[0].replace(t,p)),value:q?S(q[0].replace(t,p)):p});return Z(o),se}}function J(){var K=[];M(K);for(var ie;ie=G();)ie!==!1&&(K.push(ie),M(K));return K}return U(),J()}function S(_){return _?_.replace(l,p):p}return ib=x,ib}var vQ;function HZ(){if(vQ)return ic;vQ=1;var t=ic&&ic.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(ic,"__esModule",{value:!0}),ic.default=n;const e=t(WZ());function n(i,r){let s=null;if(!i||typeof i!="string")return s;const o=(0,e.default)(i),l=typeof r=="function";return o.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:d}=c;l?r(h,d,c):d&&(s=s||{},s[h]=d)}),s}return ic}var uh={},SQ;function FZ(){if(SQ)return uh;SQ=1,Object.defineProperty(uh,"__esModule",{value:!0}),uh.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,e=/-([a-z])/g,n=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,r=/^-(ms)-/,s=function(h){return!h||n.test(h)||t.test(h)},o=function(h,d){return d.toUpperCase()},l=function(h,d){return"".concat(d,"-")},c=function(h,d){return d===void 0&&(d={}),s(h)?h:(h=h.toLowerCase(),d.reactCompat?h=h.replace(r,l):h=h.replace(i,l),h.replace(e,o))};return uh.camelCase=c,uh}var hh,_Q;function KZ(){if(_Q)return hh;_Q=1;var t=hh&&hh.__importDefault||function(r){return r&&r.__esModule?r:{default:r}},e=t(HZ()),n=FZ();function i(r,s){var o={};return!r||typeof r!="string"||(0,e.default)(r,function(l,c){l&&c&&(o[(0,n.camelCase)(l,s)]=c)}),o}return i.default=i,hh=i,hh}var JZ=KZ();const eq=Ov(JZ),u$=h$("end"),Dv=h$("start");function h$(t){return e;function e(n){const i=n&&n.position&&n.position[t]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function tq(t){const e=Dv(t),n=u$(t);if(e&&n)return{start:e,end:n}}function jh(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?kQ(t.position):"start"in t||"end"in t?kQ(t):"line"in t||"column"in t?Vx(t):""}function Vx(t){return wQ(t&&t.line)+":"+wQ(t&&t.column)}function kQ(t){return Vx(t&&t.start)+"-"+Vx(t&&t.end)}function wQ(t){return t&&typeof t=="number"?t:1}class Qn extends Error{constructor(e,n,i){super(),typeof n=="string"&&(i=n,n=void 0);let r="",s={},o=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s={...n}),typeof e=="string"?r=e:!s.cause&&e&&(o=!0,r=e.message,s.cause=e),!s.ruleId&&!s.source&&typeof i=="string"){const c=i.indexOf(":");c===-1?s.ruleId=i:(s.source=i.slice(0,c),s.ruleId=i.slice(c+1))}if(!s.place&&s.ancestors&&s.ancestors){const c=s.ancestors[s.ancestors.length-1];c&&(s.place=c.position)}const l=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=r,this.line=l?l.line:void 0,this.name=jh(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=o&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Qn.prototype.file="";Qn.prototype.name="";Qn.prototype.reason="";Qn.prototype.message="";Qn.prototype.stack="";Qn.prototype.column=void 0;Qn.prototype.line=void 0;Qn.prototype.ancestors=void 0;Qn.prototype.cause=void 0;Qn.prototype.fatal=void 0;Qn.prototype.place=void 0;Qn.prototype.ruleId=void 0;Qn.prototype.source=void 0;const jv={}.hasOwnProperty,nq=new Map,iq=/[A-Z]/g,rq=new Set(["table","tbody","thead","tfoot","tr"]),sq=new Set(["td","th"]),f$="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function oq(t,e){if(!e||e.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=e.filePath||void 0;let i;if(e.development){if(typeof e.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=pq(n,e.jsxDEV)}else{if(typeof e.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof e.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=dq(n,e.jsx,e.jsxs)}const r={Fragment:e.Fragment,ancestors:[],components:e.components||{},create:i,elementAttributeNameCase:e.elementAttributeNameCase||"react",evaluater:e.createEvaluater?e.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:e.ignoreInvalidStyle||!1,passKeys:e.passKeys!==!1,passNode:e.passNode||!1,schema:e.space==="svg"?Zf:l$,stylePropertyNameCase:e.stylePropertyNameCase||"dom",tableCellAlignToStyle:e.tableCellAlignToStyle!==!1},s=d$(r,t,void 0);return s&&typeof s!="string"?s:r.create(t,r.Fragment,{children:s||void 0},void 0)}function d$(t,e,n){if(e.type==="element")return aq(t,e,n);if(e.type==="mdxFlowExpression"||e.type==="mdxTextExpression")return lq(t,e);if(e.type==="mdxJsxFlowElement"||e.type==="mdxJsxTextElement")return uq(t,e,n);if(e.type==="mdxjsEsm")return cq(t,e);if(e.type==="root")return hq(t,e,n);if(e.type==="text")return fq(t,e)}function aq(t,e,n){const i=t.schema;let r=i;e.tagName.toLowerCase()==="svg"&&i.space==="html"&&(r=Zf,t.schema=r),t.ancestors.push(e);const s=m$(t,e.tagName,!1),o=mq(t,e);let l=zv(t,e);return rq.has(e.tagName)&&(l=l.filter(function(c){return typeof c=="string"?!Ug(c):!0})),p$(t,o,s,e),Nv(o,l),t.ancestors.pop(),t.schema=i,t.create(e,s,o,n)}function lq(t,e){if(e.data&&e.data.estree&&t.evaluater){const i=e.data.estree.body[0];return i.type,t.evaluater.evaluateExpression(i.expression)}rf(t,e.position)}function cq(t,e){if(e.data&&e.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(e.data.estree);rf(t,e.position)}function uq(t,e,n){const i=t.schema;let r=i;e.name==="svg"&&i.space==="html"&&(r=Zf,t.schema=r),t.ancestors.push(e);const s=e.name===null?t.Fragment:m$(t,e.name,!0),o=gq(t,e),l=zv(t,e);return p$(t,o,s,e),Nv(o,l),t.ancestors.pop(),t.schema=i,t.create(e,s,o,n)}function hq(t,e,n){const i={};return Nv(i,zv(t,e)),t.create(e,t.Fragment,i,n)}function fq(t,e){return e.value}function p$(t,e,n,i){typeof n!="string"&&n!==t.Fragment&&t.passNode&&(e.node=i)}function Nv(t,e){if(e.length>0){const n=e.length>1?e:e[0];n&&(t.children=n)}}function dq(t,e,n){return i;function i(r,s,o,l){const h=Array.isArray(o.children)?n:e;return l?h(s,o,l):h(s,o)}}function pq(t,e){return n;function n(i,r,s,o){const l=Array.isArray(s.children),c=Dv(i);return e(r,s,o,l,{columnNumber:c?c.column-1:void 0,fileName:t,lineNumber:c?c.line:void 0},void 0)}}function mq(t,e){const n={};let i,r;for(r in e.properties)if(r!=="children"&&jv.call(e.properties,r)){const s=Oq(t,r,e.properties[r]);if(s){const[o,l]=s;t.tableCellAlignToStyle&&o==="align"&&typeof l=="string"&&sq.has(e.tagName)?i=l:n[o]=l}}if(i){const s=n.style||(n.style={});s[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return n}function gq(t,e){const n={};for(const i of e.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&t.evaluater){const s=i.data.estree.body[0];s.type;const o=s.expression;o.type;const l=o.properties[0];l.type,Object.assign(n,t.evaluater.evaluateExpression(l.argument))}else rf(t,e.position);else{const r=i.name;let s;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&t.evaluater){const l=i.value.data.estree.body[0];l.type,s=t.evaluater.evaluateExpression(l.expression)}else rf(t,e.position);else s=i.value===null?!0:i.value;n[r]=s}return n}function zv(t,e){const n=[];let i=-1;const r=t.passKeys?new Map:nq;for(;++i<e.children.length;){const s=e.children[i];let o;if(t.passKeys){const c=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(c){const h=r.get(c)||0;o=c+"-"+h,r.set(c,h+1)}}const l=d$(t,s,o);l!==void 0&&n.push(l)}return n}function Oq(t,e,n){const i=a$(t.schema,e);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=i.commaSeparated?JR(n):c$(n)),i.property==="style"){let r=typeof n=="object"?n:yq(t,String(n));return t.stylePropertyNameCase==="css"&&(r=bq(r)),["style",r]}return[t.elementAttributeNameCase==="react"&&i.space?ZZ[i.property]||i.property:i.attribute,n]}}function yq(t,e){try{return eq(e,{reactCompat:!0})}catch(n){if(t.ignoreInvalidStyle)return{};const i=n,r=new Qn("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=f$+"#cannot-parse-style-attribute",r}}function m$(t,e,n){let i;if(!n)i={type:"Literal",value:e};else if(e.includes(".")){const r=e.split(".");let s=-1,o;for(;++s<r.length;){const l=gQ(r[s])?{type:"Identifier",name:r[s]}:{type:"Literal",value:r[s]};o=o?{type:"MemberExpression",object:o,property:l,computed:!!(s&&l.type==="Literal"),optional:!1}:l}i=o}else i=gQ(e)&&!/^[a-z]/.test(e)?{type:"Identifier",name:e}:{type:"Literal",value:e};if(i.type==="Literal"){const r=i.value;return jv.call(t.components,r)?t.components[r]:r}if(t.evaluater)return t.evaluater.evaluateExpression(i);rf(t)}function rf(t,e){const n=new Qn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:e,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=t.filePath||void 0,n.url=f$+"#cannot-handle-mdx-estrees-without-createevaluater",n}function bq(t){const e={};let n;for(n in t)jv.call(t,n)&&(e[xq(n)]=t[n]);return e}function xq(t){let e=t.replace(iq,vq);return e.slice(0,3)==="ms-"&&(e="-"+e),e}function vq(t){return"-"+t.toLowerCase()}const rb={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},Sq={};function Iv(t,e){const n=Sq,i=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,r=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return g$(t,i,r)}function g$(t,e,n){if(_q(t)){if("value"in t)return t.type==="html"&&!n?"":t.value;if(e&&"alt"in t&&t.alt)return t.alt;if("children"in t)return PQ(t.children,e,n)}return Array.isArray(t)?PQ(t,e,n):""}function PQ(t,e,n){const i=[];let r=-1;for(;++r<t.length;)i[r]=g$(t[r],e,n);return i.join("")}function _q(t){return!!(t&&typeof t=="object")}const TQ=document.createElement("i");function Xv(t){const e="&"+t+";";TQ.innerHTML=e;const n=TQ.textContent;return n.charCodeAt(n.length-1)===59&&t!=="semi"||n===e?!1:n}function wi(t,e,n,i){const r=t.length;let s=0,o;if(e<0?e=-e>r?0:r+e:e=e>r?r:e,n=n>0?n:0,i.length<1e4)o=Array.from(i),o.unshift(e,n),t.splice(...o);else for(n&&t.splice(e,n);s<i.length;)o=i.slice(s,s+1e4),o.unshift(e,0),t.splice(...o),s+=1e4,e+=1e4}function Vi(t,e){return t.length>0?(wi(t,t.length,0,e),t):e}const QQ={}.hasOwnProperty;function O$(t){const e={};let n=-1;for(;++n<t.length;)kq(e,t[n]);return e}function kq(t,e){let n;for(n in e){const r=(QQ.call(t,n)?t[n]:void 0)||(t[n]={}),s=e[n];let o;if(s)for(o in s){QQ.call(r,o)||(r[o]=[]);const l=s[o];wq(r[o],Array.isArray(l)?l:l?[l]:[])}}}function wq(t,e){let n=-1;const i=[];for(;++n<e.length;)(e[n].add==="after"?t:i).push(e[n]);wi(t,0,0,i)}function y$(t,e){const n=Number.parseInt(t,e);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function ur(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const jn=Wo(/[A-Za-z]/),Pn=Wo(/[\dA-Za-z]/),Pq=Wo(/[#-'*+\--9=?A-Z^-~]/);function Bm(t){return t!==null&&(t<32||t===127)}const Bx=Wo(/\d/),Tq=Wo(/[\dA-Fa-f]/),Qq=Wo(/[!-/:-@[-`{-~]/);function Re(t){return t!==null&&t<-2}function _t(t){return t!==null&&(t<0||t===32)}function Ye(t){return t===-2||t===-1||t===32}const Yg=Wo(new RegExp("\\p{P}|\\p{S}","u")),Ha=Wo(/\s/);function Wo(t){return e;function e(n){return n!==null&&n>-1&&t.test(String.fromCharCode(n))}}function au(t){const e=[];let n=-1,i=0,r=0;for(;++n<t.length;){const s=t.charCodeAt(n);let o="";if(s===37&&Pn(t.charCodeAt(n+1))&&Pn(t.charCodeAt(n+2)))r=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(o=String.fromCharCode(s));else if(s>55295&&s<57344){const l=t.charCodeAt(n+1);s<56320&&l>56319&&l<57344?(o=String.fromCharCode(s,l),r=1):o="�"}else o=String.fromCharCode(s);o&&(e.push(t.slice(i,n),encodeURIComponent(o)),i=n+r+1,o=""),r&&(n+=r,r=0)}return e.join("")+t.slice(i)}function nt(t,e,n,i){const r=i?i-1:Number.POSITIVE_INFINITY;let s=0;return o;function o(c){return Ye(c)?(t.enter(n),l(c)):e(c)}function l(c){return Ye(c)&&s++<r?(t.consume(c),l):(t.exit(n),e(c))}}const Cq={tokenize:Eq};function Eq(t){const e=t.attempt(this.parser.constructs.contentInitial,i,r);let n;return e;function i(l){if(l===null){t.consume(l);return}return t.enter("lineEnding"),t.consume(l),t.exit("lineEnding"),nt(t,e,"linePrefix")}function r(l){return t.enter("paragraph"),s(l)}function s(l){const c=t.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=c),n=c,o(l)}function o(l){if(l===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(l);return}return Re(l)?(t.consume(l),t.exit("chunkText"),s):(t.consume(l),o)}}const Aq={tokenize:Rq},CQ={tokenize:$q};function Rq(t){const e=this,n=[];let i=0,r,s,o;return l;function l(Q){if(i<n.length){const R=n[i];return e.containerState=R[1],t.attempt(R[0].continuation,c,h)(Q)}return h(Q)}function c(Q){if(i++,e.containerState._closeFlow){e.containerState._closeFlow=void 0,r&&P();const R=e.events.length;let $=R,C;for(;$--;)if(e.events[$][0]==="exit"&&e.events[$][1].type==="chunkFlow"){C=e.events[$][1].end;break}k(i);let D=R;for(;D<e.events.length;)e.events[D][1].end={...C},D++;return wi(e.events,$+1,0,e.events.slice(R)),e.events.length=D,h(Q)}return l(Q)}function h(Q){if(i===n.length){if(!r)return g(Q);if(r.currentConstruct&&r.currentConstruct.concrete)return x(Q);e.interrupt=!!(r.currentConstruct&&!r._gfmTableDynamicInterruptHack)}return e.containerState={},t.check(CQ,d,p)(Q)}function d(Q){return r&&P(),k(i),g(Q)}function p(Q){return e.parser.lazy[e.now().line]=i!==n.length,o=e.now().offset,x(Q)}function g(Q){return e.containerState={},t.attempt(CQ,O,x)(Q)}function O(Q){return i++,n.push([e.currentConstruct,e.containerState]),g(Q)}function x(Q){if(Q===null){r&&P(),k(0),t.consume(Q);return}return r=r||e.parser.flow(e.now()),t.enter("chunkFlow",{_tokenizer:r,contentType:"flow",previous:s}),S(Q)}function S(Q){if(Q===null){_(t.exit("chunkFlow"),!0),k(0),t.consume(Q);return}return Re(Q)?(t.consume(Q),_(t.exit("chunkFlow")),i=0,e.interrupt=void 0,l):(t.consume(Q),S)}function _(Q,R){const $=e.sliceStream(Q);if(R&&$.push(null),Q.previous=s,s&&(s.next=Q),s=Q,r.defineSkip(Q.start),r.write($),e.parser.lazy[Q.start.line]){let C=r.events.length;for(;C--;)if(r.events[C][1].start.offset<o&&(!r.events[C][1].end||r.events[C][1].end.offset>o))return;const D=e.events.length;let Z=D,U,M;for(;Z--;)if(e.events[Z][0]==="exit"&&e.events[Z][1].type==="chunkFlow"){if(U){M=e.events[Z][1].end;break}U=!0}for(k(i),C=D;C<e.events.length;)e.events[C][1].end={...M},C++;wi(e.events,Z+1,0,e.events.slice(D)),e.events.length=C}}function k(Q){let R=n.length;for(;R-- >Q;){const $=n[R];e.containerState=$[1],$[0].exit.call(e,t)}n.length=Q}function P(){r.write([null]),s=void 0,r=void 0,e.containerState._closeFlow=void 0}}function $q(t,e,n){return nt(t,t.attempt(this.parser.constructs.document,e,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xc(t){if(t===null||_t(t)||Ha(t))return 1;if(Yg(t))return 2}function Gg(t,e,n){const i=[];let r=-1;for(;++r<t.length;){const s=t[r].resolveAll;s&&!i.includes(s)&&(e=s(e,n),i.push(s))}return e}const Zx={name:"attention",resolveAll:Lq,tokenize:Mq};function Lq(t,e){let n=-1,i,r,s,o,l,c,h,d;for(;++n<t.length;)if(t[n][0]==="enter"&&t[n][1].type==="attentionSequence"&&t[n][1]._close){for(i=n;i--;)if(t[i][0]==="exit"&&t[i][1].type==="attentionSequence"&&t[i][1]._open&&e.sliceSerialize(t[i][1]).charCodeAt(0)===e.sliceSerialize(t[n][1]).charCodeAt(0)){if((t[i][1]._close||t[n][1]._open)&&(t[n][1].end.offset-t[n][1].start.offset)%3&&!((t[i][1].end.offset-t[i][1].start.offset+t[n][1].end.offset-t[n][1].start.offset)%3))continue;c=t[i][1].end.offset-t[i][1].start.offset>1&&t[n][1].end.offset-t[n][1].start.offset>1?2:1;const p={...t[i][1].end},g={...t[n][1].start};EQ(p,-c),EQ(g,c),o={type:c>1?"strongSequence":"emphasisSequence",start:p,end:{...t[i][1].end}},l={type:c>1?"strongSequence":"emphasisSequence",start:{...t[n][1].start},end:g},s={type:c>1?"strongText":"emphasisText",start:{...t[i][1].end},end:{...t[n][1].start}},r={type:c>1?"strong":"emphasis",start:{...o.start},end:{...l.end}},t[i][1].end={...o.start},t[n][1].start={...l.end},h=[],t[i][1].end.offset-t[i][1].start.offset&&(h=Vi(h,[["enter",t[i][1],e],["exit",t[i][1],e]])),h=Vi(h,[["enter",r,e],["enter",o,e],["exit",o,e],["enter",s,e]]),h=Vi(h,Gg(e.parser.constructs.insideSpan.null,t.slice(i+1,n),e)),h=Vi(h,[["exit",s,e],["enter",l,e],["exit",l,e],["exit",r,e]]),t[n][1].end.offset-t[n][1].start.offset?(d=2,h=Vi(h,[["enter",t[n][1],e],["exit",t[n][1],e]])):d=0,wi(t,i-1,n-i+3,h),n=i+h.length-d-2;break}}for(n=-1;++n<t.length;)t[n][1].type==="attentionSequence"&&(t[n][1].type="data");return t}function Mq(t,e){const n=this.parser.constructs.attentionMarkers.null,i=this.previous,r=Xc(i);let s;return o;function o(c){return s=c,t.enter("attentionSequence"),l(c)}function l(c){if(c===s)return t.consume(c),l;const h=t.exit("attentionSequence"),d=Xc(c),p=!d||d===2&&r||n.includes(c),g=!r||r===2&&d||n.includes(i);return h._open=!!(s===42?p:p&&(r||!g)),h._close=!!(s===42?g:g&&(d||!p)),e(c)}}function EQ(t,e){t.column+=e,t.offset+=e,t._bufferIndex+=e}const Dq={name:"autolink",tokenize:jq};function jq(t,e,n){let i=0;return r;function r(O){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(O),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),s}function s(O){return jn(O)?(t.consume(O),o):O===64?n(O):h(O)}function o(O){return O===43||O===45||O===46||Pn(O)?(i=1,l(O)):h(O)}function l(O){return O===58?(t.consume(O),i=0,c):(O===43||O===45||O===46||Pn(O))&&i++<32?(t.consume(O),l):(i=0,h(O))}function c(O){return O===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(O),t.exit("autolinkMarker"),t.exit("autolink"),e):O===null||O===32||O===60||Bm(O)?n(O):(t.consume(O),c)}function h(O){return O===64?(t.consume(O),d):Pq(O)?(t.consume(O),h):n(O)}function d(O){return Pn(O)?p(O):n(O)}function p(O){return O===46?(t.consume(O),i=0,d):O===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(O),t.exit("autolinkMarker"),t.exit("autolink"),e):g(O)}function g(O){if((O===45||Pn(O))&&i++<63){const x=O===45?g:p;return t.consume(O),x}return n(O)}}const qf={partial:!0,tokenize:Nq};function Nq(t,e,n){return i;function i(s){return Ye(s)?nt(t,r,"linePrefix")(s):r(s)}function r(s){return s===null||Re(s)?e(s):n(s)}}const b$={continuation:{tokenize:Iq},exit:Xq,name:"blockQuote",tokenize:zq};function zq(t,e,n){const i=this;return r;function r(o){if(o===62){const l=i.containerState;return l.open||(t.enter("blockQuote",{_container:!0}),l.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(o),t.exit("blockQuoteMarker"),s}return n(o)}function s(o){return Ye(o)?(t.enter("blockQuotePrefixWhitespace"),t.consume(o),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),e):(t.exit("blockQuotePrefix"),e(o))}}function Iq(t,e,n){const i=this;return r;function r(o){return Ye(o)?nt(t,s,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o):s(o)}function s(o){return t.attempt(b$,e,n)(o)}}function Xq(t){t.exit("blockQuote")}const x$={name:"characterEscape",tokenize:Vq};function Vq(t,e,n){return i;function i(s){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(s),t.exit("escapeMarker"),r}function r(s){return Qq(s)?(t.enter("characterEscapeValue"),t.consume(s),t.exit("characterEscapeValue"),t.exit("characterEscape"),e):n(s)}}const v$={name:"characterReference",tokenize:Bq};function Bq(t,e,n){const i=this;let r=0,s,o;return l;function l(p){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),c}function c(p){return p===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(p),t.exit("characterReferenceMarkerNumeric"),h):(t.enter("characterReferenceValue"),s=31,o=Pn,d(p))}function h(p){return p===88||p===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(p),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),s=6,o=Tq,d):(t.enter("characterReferenceValue"),s=7,o=Bx,d(p))}function d(p){if(p===59&&r){const g=t.exit("characterReferenceValue");return o===Pn&&!Xv(i.sliceSerialize(g))?n(p):(t.enter("characterReferenceMarker"),t.consume(p),t.exit("characterReferenceMarker"),t.exit("characterReference"),e)}return o(p)&&r++<s?(t.consume(p),d):n(p)}}const AQ={partial:!0,tokenize:qq},RQ={concrete:!0,name:"codeFenced",tokenize:Zq};function Zq(t,e,n){const i=this,r={partial:!0,tokenize:$};let s=0,o=0,l;return c;function c(C){return h(C)}function h(C){const D=i.events[i.events.length-1];return s=D&&D[1].type==="linePrefix"?D[2].sliceSerialize(D[1],!0).length:0,l=C,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),d(C)}function d(C){return C===l?(o++,t.consume(C),d):o<3?n(C):(t.exit("codeFencedFenceSequence"),Ye(C)?nt(t,p,"whitespace")(C):p(C))}function p(C){return C===null||Re(C)?(t.exit("codeFencedFence"),i.interrupt?e(C):t.check(AQ,S,R)(C)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),g(C))}function g(C){return C===null||Re(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),p(C)):Ye(C)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),nt(t,O,"whitespace")(C)):C===96&&C===l?n(C):(t.consume(C),g)}function O(C){return C===null||Re(C)?p(C):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),x(C))}function x(C){return C===null||Re(C)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),p(C)):C===96&&C===l?n(C):(t.consume(C),x)}function S(C){return t.attempt(r,R,_)(C)}function _(C){return t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),k}function k(C){return s>0&&Ye(C)?nt(t,P,"linePrefix",s+1)(C):P(C)}function P(C){return C===null||Re(C)?t.check(AQ,S,R)(C):(t.enter("codeFlowValue"),Q(C))}function Q(C){return C===null||Re(C)?(t.exit("codeFlowValue"),P(C)):(t.consume(C),Q)}function R(C){return t.exit("codeFenced"),e(C)}function $(C,D,Z){let U=0;return M;function M(ie){return C.enter("lineEnding"),C.consume(ie),C.exit("lineEnding"),V}function V(ie){return C.enter("codeFencedFence"),Ye(ie)?nt(C,G,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):G(ie)}function G(ie){return ie===l?(C.enter("codeFencedFenceSequence"),J(ie)):Z(ie)}function J(ie){return ie===l?(U++,C.consume(ie),J):U>=o?(C.exit("codeFencedFenceSequence"),Ye(ie)?nt(C,K,"whitespace")(ie):K(ie)):Z(ie)}function K(ie){return ie===null||Re(ie)?(C.exit("codeFencedFence"),D(ie)):Z(ie)}}}function qq(t,e,n){const i=this;return r;function r(o){return o===null?n(o):(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s)}function s(o){return i.parser.lazy[i.now().line]?n(o):e(o)}}const sb={name:"codeIndented",tokenize:Yq},Uq={partial:!0,tokenize:Gq};function Yq(t,e,n){const i=this;return r;function r(h){return t.enter("codeIndented"),nt(t,s,"linePrefix",5)(h)}function s(h){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?o(h):n(h)}function o(h){return h===null?c(h):Re(h)?t.attempt(Uq,o,c)(h):(t.enter("codeFlowValue"),l(h))}function l(h){return h===null||Re(h)?(t.exit("codeFlowValue"),o(h)):(t.consume(h),l)}function c(h){return t.exit("codeIndented"),e(h)}}function Gq(t,e,n){const i=this;return r;function r(o){return i.parser.lazy[i.now().line]?n(o):Re(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r):nt(t,s,"linePrefix",5)(o)}function s(o){const l=i.events[i.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):Re(o)?r(o):n(o)}}const Wq={name:"codeText",previous:Fq,resolve:Hq,tokenize:Kq};function Hq(t){let e=t.length-4,n=3,i,r;if((t[n][1].type==="lineEnding"||t[n][1].type==="space")&&(t[e][1].type==="lineEnding"||t[e][1].type==="space")){for(i=n;++i<e;)if(t[i][1].type==="codeTextData"){t[n][1].type="codeTextPadding",t[e][1].type="codeTextPadding",n+=2,e-=2;break}}for(i=n-1,e++;++i<=e;)r===void 0?i!==e&&t[i][1].type!=="lineEnding"&&(r=i):(i===e||t[i][1].type==="lineEnding")&&(t[r][1].type="codeTextData",i!==r+2&&(t[r][1].end=t[i-1][1].end,t.splice(r+2,i-r-2),e-=i-r-2,i=r+2),r=void 0);return t}function Fq(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Kq(t,e,n){let i=0,r,s;return o;function o(p){return t.enter("codeText"),t.enter("codeTextSequence"),l(p)}function l(p){return p===96?(t.consume(p),i++,l):(t.exit("codeTextSequence"),c(p))}function c(p){return p===null?n(p):p===32?(t.enter("space"),t.consume(p),t.exit("space"),c):p===96?(s=t.enter("codeTextSequence"),r=0,d(p)):Re(p)?(t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),c):(t.enter("codeTextData"),h(p))}function h(p){return p===null||p===32||p===96||Re(p)?(t.exit("codeTextData"),c(p)):(t.consume(p),h)}function d(p){return p===96?(t.consume(p),r++,d):r===i?(t.exit("codeTextSequence"),t.exit("codeText"),e(p)):(s.type="codeTextData",h(p))}}class Jq{constructor(e){this.left=e?[...e]:[],this.right=[]}get(e){if(e<0||e>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+e+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return e<this.left.length?this.left[e]:this.right[this.right.length-e+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(e,n){const i=n??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(e,i):e>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-e+this.left.length).reverse():this.left.slice(e).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(e,n,i){const r=n||0;this.setCursor(Math.trunc(e));const s=this.right.splice(this.right.length-r,Number.POSITIVE_INFINITY);return i&&fh(this.left,i),s.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(e){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(e)}pushMany(e){this.setCursor(Number.POSITIVE_INFINITY),fh(this.left,e)}unshift(e){this.setCursor(0),this.right.push(e)}unshiftMany(e){this.setCursor(0),fh(this.right,e.reverse())}setCursor(e){if(!(e===this.left.length||e>this.left.length&&this.right.length===0||e<0&&this.left.length===0))if(e<this.left.length){const n=this.left.splice(e,Number.POSITIVE_INFINITY);fh(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-e,Number.POSITIVE_INFINITY);fh(this.left,n.reverse())}}}function fh(t,e){let n=0;if(e.length<1e4)t.push(...e);else for(;n<e.length;)t.push(...e.slice(n,n+1e4)),n+=1e4}function S$(t){const e={};let n=-1,i,r,s,o,l,c,h;const d=new Jq(t);for(;++n<d.length;){for(;n in e;)n=e[n];if(i=d.get(n),n&&i[1].type==="chunkFlow"&&d.get(n-1)[1].type==="listItemPrefix"&&(c=i[1]._tokenizer.events,s=0,s<c.length&&c[s][1].type==="lineEndingBlank"&&(s+=2),s<c.length&&c[s][1].type==="content"))for(;++s<c.length&&c[s][1].type!=="content";)c[s][1].type==="chunkText"&&(c[s][1]._isInFirstContentOfListItem=!0,s++);if(i[0]==="enter")i[1].contentType&&(Object.assign(e,e6(d,n)),n=e[n],h=!0);else if(i[1]._container){for(s=n,r=void 0;s--;)if(o=d.get(s),o[1].type==="lineEnding"||o[1].type==="lineEndingBlank")o[0]==="enter"&&(r&&(d.get(r)[1].type="lineEndingBlank"),o[1].type="lineEnding",r=s);else if(!(o[1].type==="linePrefix"||o[1].type==="listItemIndent"))break;r&&(i[1].end={...d.get(r)[1].start},l=d.slice(r,n),l.unshift(i),d.splice(r,n-r+1,l))}}return wi(t,0,Number.POSITIVE_INFINITY,d.slice(0)),!h}function e6(t,e){const n=t.get(e)[1],i=t.get(e)[2];let r=e-1;const s=[];let o=n._tokenizer;o||(o=i.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(o._contentTypeTextTrailing=!0));const l=o.events,c=[],h={};let d,p,g=-1,O=n,x=0,S=0;const _=[S];for(;O;){for(;t.get(++r)[1]!==O;);s.push(r),O._tokenizer||(d=i.sliceStream(O),O.next||d.push(null),p&&o.defineSkip(O.start),O._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=!0),o.write(d),O._isInFirstContentOfListItem&&(o._gfmTasklistFirstContentOfListItem=void 0)),p=O,O=O.next}for(O=n;++g<l.length;)l[g][0]==="exit"&&l[g-1][0]==="enter"&&l[g][1].type===l[g-1][1].type&&l[g][1].start.line!==l[g][1].end.line&&(S=g+1,_.push(S),O._tokenizer=void 0,O.previous=void 0,O=O.next);for(o.events=[],O?(O._tokenizer=void 0,O.previous=void 0):_.pop(),g=_.length;g--;){const k=l.slice(_[g],_[g+1]),P=s.pop();c.push([P,P+k.length-1]),t.splice(P,2,k)}for(c.reverse(),g=-1;++g<c.length;)h[x+c[g][0]]=x+c[g][1],x+=c[g][1]-c[g][0]-1;return h}const t6={resolve:i6,tokenize:r6},n6={partial:!0,tokenize:s6};function i6(t){return S$(t),t}function r6(t,e){let n;return i;function i(l){return t.enter("content"),n=t.enter("chunkContent",{contentType:"content"}),r(l)}function r(l){return l===null?s(l):Re(l)?t.check(n6,o,s)(l):(t.consume(l),r)}function s(l){return t.exit("chunkContent"),t.exit("content"),e(l)}function o(l){return t.consume(l),t.exit("chunkContent"),n.next=t.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,r}}function s6(t,e,n){const i=this;return r;function r(o){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),nt(t,s,"linePrefix")}function s(o){if(o===null||Re(o))return n(o);const l=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?e(o):t.interrupt(i.parser.constructs.flow,n,e)(o)}}function _$(t,e,n,i,r,s,o,l,c){const h=c||Number.POSITIVE_INFINITY;let d=0;return p;function p(k){return k===60?(t.enter(i),t.enter(r),t.enter(s),t.consume(k),t.exit(s),g):k===null||k===32||k===41||Bm(k)?n(k):(t.enter(i),t.enter(o),t.enter(l),t.enter("chunkString",{contentType:"string"}),S(k))}function g(k){return k===62?(t.enter(s),t.consume(k),t.exit(s),t.exit(r),t.exit(i),e):(t.enter(l),t.enter("chunkString",{contentType:"string"}),O(k))}function O(k){return k===62?(t.exit("chunkString"),t.exit(l),g(k)):k===null||k===60||Re(k)?n(k):(t.consume(k),k===92?x:O)}function x(k){return k===60||k===62||k===92?(t.consume(k),O):O(k)}function S(k){return!d&&(k===null||k===41||_t(k))?(t.exit("chunkString"),t.exit(l),t.exit(o),t.exit(i),e(k)):d<h&&k===40?(t.consume(k),d++,S):k===41?(t.consume(k),d--,S):k===null||k===32||k===40||Bm(k)?n(k):(t.consume(k),k===92?_:S)}function _(k){return k===40||k===41||k===92?(t.consume(k),S):S(k)}}function k$(t,e,n,i,r,s){const o=this;let l=0,c;return h;function h(O){return t.enter(i),t.enter(r),t.consume(O),t.exit(r),t.enter(s),d}function d(O){return l>999||O===null||O===91||O===93&&!c||O===94&&!l&&"_hiddenFootnoteSupport"in o.parser.constructs?n(O):O===93?(t.exit(s),t.enter(r),t.consume(O),t.exit(r),t.exit(i),e):Re(O)?(t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),d):(t.enter("chunkString",{contentType:"string"}),p(O))}function p(O){return O===null||O===91||O===93||Re(O)||l++>999?(t.exit("chunkString"),d(O)):(t.consume(O),c||(c=!Ye(O)),O===92?g:p)}function g(O){return O===91||O===92||O===93?(t.consume(O),l++,p):p(O)}}function w$(t,e,n,i,r,s){let o;return l;function l(g){return g===34||g===39||g===40?(t.enter(i),t.enter(r),t.consume(g),t.exit(r),o=g===40?41:g,c):n(g)}function c(g){return g===o?(t.enter(r),t.consume(g),t.exit(r),t.exit(i),e):(t.enter(s),h(g))}function h(g){return g===o?(t.exit(s),c(o)):g===null?n(g):Re(g)?(t.enter("lineEnding"),t.consume(g),t.exit("lineEnding"),nt(t,h,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),d(g))}function d(g){return g===o||g===null||Re(g)?(t.exit("chunkString"),h(g)):(t.consume(g),g===92?p:d)}function p(g){return g===o||g===92?(t.consume(g),d):d(g)}}function Nh(t,e){let n;return i;function i(r){return Re(r)?(t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),n=!0,i):Ye(r)?nt(t,i,n?"linePrefix":"lineSuffix")(r):e(r)}}const o6={name:"definition",tokenize:l6},a6={partial:!0,tokenize:c6};function l6(t,e,n){const i=this;let r;return s;function s(O){return t.enter("definition"),o(O)}function o(O){return k$.call(i,t,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(O)}function l(O){return r=ur(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),O===58?(t.enter("definitionMarker"),t.consume(O),t.exit("definitionMarker"),c):n(O)}function c(O){return _t(O)?Nh(t,h)(O):h(O)}function h(O){return _$(t,d,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(O)}function d(O){return t.attempt(a6,p,p)(O)}function p(O){return Ye(O)?nt(t,g,"whitespace")(O):g(O)}function g(O){return O===null||Re(O)?(t.exit("definition"),i.parser.defined.push(r),e(O)):n(O)}}function c6(t,e,n){return i;function i(l){return _t(l)?Nh(t,r)(l):n(l)}function r(l){return w$(t,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function s(l){return Ye(l)?nt(t,o,"whitespace")(l):o(l)}function o(l){return l===null||Re(l)?e(l):n(l)}}const u6={name:"hardBreakEscape",tokenize:h6};function h6(t,e,n){return i;function i(s){return t.enter("hardBreakEscape"),t.consume(s),r}function r(s){return Re(s)?(t.exit("hardBreakEscape"),e(s)):n(s)}}const f6={name:"headingAtx",resolve:d6,tokenize:p6};function d6(t,e){let n=t.length-2,i=3,r,s;return t[i][1].type==="whitespace"&&(i+=2),n-2>i&&t[n][1].type==="whitespace"&&(n-=2),t[n][1].type==="atxHeadingSequence"&&(i===n-1||n-4>i&&t[n-2][1].type==="whitespace")&&(n-=i+1===n?2:4),n>i&&(r={type:"atxHeadingText",start:t[i][1].start,end:t[n][1].end},s={type:"chunkText",start:t[i][1].start,end:t[n][1].end,contentType:"text"},wi(t,i,n-i+1,[["enter",r,e],["enter",s,e],["exit",s,e],["exit",r,e]])),t}function p6(t,e,n){let i=0;return r;function r(d){return t.enter("atxHeading"),s(d)}function s(d){return t.enter("atxHeadingSequence"),o(d)}function o(d){return d===35&&i++<6?(t.consume(d),o):d===null||_t(d)?(t.exit("atxHeadingSequence"),l(d)):n(d)}function l(d){return d===35?(t.enter("atxHeadingSequence"),c(d)):d===null||Re(d)?(t.exit("atxHeading"),e(d)):Ye(d)?nt(t,l,"whitespace")(d):(t.enter("atxHeadingText"),h(d))}function c(d){return d===35?(t.consume(d),c):(t.exit("atxHeadingSequence"),l(d))}function h(d){return d===null||d===35||_t(d)?(t.exit("atxHeadingText"),l(d)):(t.consume(d),h)}}const m6=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],$Q=["pre","script","style","textarea"],g6={concrete:!0,name:"htmlFlow",resolveTo:b6,tokenize:x6},O6={partial:!0,tokenize:S6},y6={partial:!0,tokenize:v6};function b6(t){let e=t.length;for(;e--&&!(t[e][0]==="enter"&&t[e][1].type==="htmlFlow"););return e>1&&t[e-2][1].type==="linePrefix"&&(t[e][1].start=t[e-2][1].start,t[e+1][1].start=t[e-2][1].start,t.splice(e-2,2)),t}function x6(t,e,n){const i=this;let r,s,o,l,c;return h;function h(L){return d(L)}function d(L){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(L),p}function p(L){return L===33?(t.consume(L),g):L===47?(t.consume(L),s=!0,S):L===63?(t.consume(L),r=3,i.interrupt?e:j):jn(L)?(t.consume(L),o=String.fromCharCode(L),_):n(L)}function g(L){return L===45?(t.consume(L),r=2,O):L===91?(t.consume(L),r=5,l=0,x):jn(L)?(t.consume(L),r=4,i.interrupt?e:j):n(L)}function O(L){return L===45?(t.consume(L),i.interrupt?e:j):n(L)}function x(L){const re="CDATA[";return L===re.charCodeAt(l++)?(t.consume(L),l===re.length?i.interrupt?e:G:x):n(L)}function S(L){return jn(L)?(t.consume(L),o=String.fromCharCode(L),_):n(L)}function _(L){if(L===null||L===47||L===62||_t(L)){const re=L===47,ge=o.toLowerCase();return!re&&!s&&$Q.includes(ge)?(r=1,i.interrupt?e(L):G(L)):m6.includes(o.toLowerCase())?(r=6,re?(t.consume(L),k):i.interrupt?e(L):G(L)):(r=7,i.interrupt&&!i.parser.lazy[i.now().line]?n(L):s?P(L):Q(L))}return L===45||Pn(L)?(t.consume(L),o+=String.fromCharCode(L),_):n(L)}function k(L){return L===62?(t.consume(L),i.interrupt?e:G):n(L)}function P(L){return Ye(L)?(t.consume(L),P):M(L)}function Q(L){return L===47?(t.consume(L),M):L===58||L===95||jn(L)?(t.consume(L),R):Ye(L)?(t.consume(L),Q):M(L)}function R(L){return L===45||L===46||L===58||L===95||Pn(L)?(t.consume(L),R):$(L)}function $(L){return L===61?(t.consume(L),C):Ye(L)?(t.consume(L),$):Q(L)}function C(L){return L===null||L===60||L===61||L===62||L===96?n(L):L===34||L===39?(t.consume(L),c=L,D):Ye(L)?(t.consume(L),C):Z(L)}function D(L){return L===c?(t.consume(L),c=null,U):L===null||Re(L)?n(L):(t.consume(L),D)}function Z(L){return L===null||L===34||L===39||L===47||L===60||L===61||L===62||L===96||_t(L)?$(L):(t.consume(L),Z)}function U(L){return L===47||L===62||Ye(L)?Q(L):n(L)}function M(L){return L===62?(t.consume(L),V):n(L)}function V(L){return L===null||Re(L)?G(L):Ye(L)?(t.consume(L),V):n(L)}function G(L){return L===45&&r===2?(t.consume(L),q):L===60&&r===1?(t.consume(L),se):L===62&&r===4?(t.consume(L),N):L===63&&r===3?(t.consume(L),j):L===93&&r===5?(t.consume(L),ve):Re(L)&&(r===6||r===7)?(t.exit("htmlFlowData"),t.check(O6,te,J)(L)):L===null||Re(L)?(t.exit("htmlFlowData"),J(L)):(t.consume(L),G)}function J(L){return t.check(y6,K,te)(L)}function K(L){return t.enter("lineEnding"),t.consume(L),t.exit("lineEnding"),ie}function ie(L){return L===null||Re(L)?J(L):(t.enter("htmlFlowData"),G(L))}function q(L){return L===45?(t.consume(L),j):G(L)}function se(L){return L===47?(t.consume(L),o="",pe):G(L)}function pe(L){if(L===62){const re=o.toLowerCase();return $Q.includes(re)?(t.consume(L),N):G(L)}return jn(L)&&o.length<8?(t.consume(L),o+=String.fromCharCode(L),pe):G(L)}function ve(L){return L===93?(t.consume(L),j):G(L)}function j(L){return L===62?(t.consume(L),N):L===45&&r===2?(t.consume(L),j):G(L)}function N(L){return L===null||Re(L)?(t.exit("htmlFlowData"),te(L)):(t.consume(L),N)}function te(L){return t.exit("htmlFlow"),e(L)}}function v6(t,e,n){const i=this;return r;function r(o){return Re(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),s):n(o)}function s(o){return i.parser.lazy[i.now().line]?n(o):e(o)}}function S6(t,e,n){return i;function i(r){return t.enter("lineEnding"),t.consume(r),t.exit("lineEnding"),t.attempt(qf,e,n)}}const _6={name:"htmlText",tokenize:k6};function k6(t,e,n){const i=this;let r,s,o;return l;function l(j){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(j),c}function c(j){return j===33?(t.consume(j),h):j===47?(t.consume(j),$):j===63?(t.consume(j),Q):jn(j)?(t.consume(j),Z):n(j)}function h(j){return j===45?(t.consume(j),d):j===91?(t.consume(j),s=0,x):jn(j)?(t.consume(j),P):n(j)}function d(j){return j===45?(t.consume(j),O):n(j)}function p(j){return j===null?n(j):j===45?(t.consume(j),g):Re(j)?(o=p,se(j)):(t.consume(j),p)}function g(j){return j===45?(t.consume(j),O):p(j)}function O(j){return j===62?q(j):j===45?g(j):p(j)}function x(j){const N="CDATA[";return j===N.charCodeAt(s++)?(t.consume(j),s===N.length?S:x):n(j)}function S(j){return j===null?n(j):j===93?(t.consume(j),_):Re(j)?(o=S,se(j)):(t.consume(j),S)}function _(j){return j===93?(t.consume(j),k):S(j)}function k(j){return j===62?q(j):j===93?(t.consume(j),k):S(j)}function P(j){return j===null||j===62?q(j):Re(j)?(o=P,se(j)):(t.consume(j),P)}function Q(j){return j===null?n(j):j===63?(t.consume(j),R):Re(j)?(o=Q,se(j)):(t.consume(j),Q)}function R(j){return j===62?q(j):Q(j)}function $(j){return jn(j)?(t.consume(j),C):n(j)}function C(j){return j===45||Pn(j)?(t.consume(j),C):D(j)}function D(j){return Re(j)?(o=D,se(j)):Ye(j)?(t.consume(j),D):q(j)}function Z(j){return j===45||Pn(j)?(t.consume(j),Z):j===47||j===62||_t(j)?U(j):n(j)}function U(j){return j===47?(t.consume(j),q):j===58||j===95||jn(j)?(t.consume(j),M):Re(j)?(o=U,se(j)):Ye(j)?(t.consume(j),U):q(j)}function M(j){return j===45||j===46||j===58||j===95||Pn(j)?(t.consume(j),M):V(j)}function V(j){return j===61?(t.consume(j),G):Re(j)?(o=V,se(j)):Ye(j)?(t.consume(j),V):U(j)}function G(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(t.consume(j),r=j,J):Re(j)?(o=G,se(j)):Ye(j)?(t.consume(j),G):(t.consume(j),K)}function J(j){return j===r?(t.consume(j),r=void 0,ie):j===null?n(j):Re(j)?(o=J,se(j)):(t.consume(j),J)}function K(j){return j===null||j===34||j===39||j===60||j===61||j===96?n(j):j===47||j===62||_t(j)?U(j):(t.consume(j),K)}function ie(j){return j===47||j===62||_t(j)?U(j):n(j)}function q(j){return j===62?(t.consume(j),t.exit("htmlTextData"),t.exit("htmlText"),e):n(j)}function se(j){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(j),t.exit("lineEnding"),pe}function pe(j){return Ye(j)?nt(t,ve,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):ve(j)}function ve(j){return t.enter("htmlTextData"),o(j)}}const Vv={name:"labelEnd",resolveAll:Q6,resolveTo:C6,tokenize:E6},w6={tokenize:A6},P6={tokenize:R6},T6={tokenize:$6};function Q6(t){let e=-1;const n=[];for(;++e<t.length;){const i=t[e][1];if(n.push(t[e]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const r=i.type==="labelImage"?4:2;i.type="data",e+=r}}return t.length!==n.length&&wi(t,0,t.length,n),t}function C6(t,e){let n=t.length,i=0,r,s,o,l;for(;n--;)if(r=t[n][1],s){if(r.type==="link"||r.type==="labelLink"&&r._inactive)break;t[n][0]==="enter"&&r.type==="labelLink"&&(r._inactive=!0)}else if(o){if(t[n][0]==="enter"&&(r.type==="labelImage"||r.type==="labelLink")&&!r._balanced&&(s=n,r.type!=="labelLink")){i=2;break}}else r.type==="labelEnd"&&(o=n);const c={type:t[s][1].type==="labelLink"?"link":"image",start:{...t[s][1].start},end:{...t[t.length-1][1].end}},h={type:"label",start:{...t[s][1].start},end:{...t[o][1].end}},d={type:"labelText",start:{...t[s+i+2][1].end},end:{...t[o-2][1].start}};return l=[["enter",c,e],["enter",h,e]],l=Vi(l,t.slice(s+1,s+i+3)),l=Vi(l,[["enter",d,e]]),l=Vi(l,Gg(e.parser.constructs.insideSpan.null,t.slice(s+i+4,o-3),e)),l=Vi(l,[["exit",d,e],t[o-2],t[o-1],["exit",h,e]]),l=Vi(l,t.slice(o+1)),l=Vi(l,[["exit",c,e]]),wi(t,s,t.length,l),t}function E6(t,e,n){const i=this;let r=i.events.length,s,o;for(;r--;)if((i.events[r][1].type==="labelImage"||i.events[r][1].type==="labelLink")&&!i.events[r][1]._balanced){s=i.events[r][1];break}return l;function l(g){return s?s._inactive?p(g):(o=i.parser.defined.includes(ur(i.sliceSerialize({start:s.end,end:i.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(g),t.exit("labelMarker"),t.exit("labelEnd"),c):n(g)}function c(g){return g===40?t.attempt(w6,d,o?d:p)(g):g===91?t.attempt(P6,d,o?h:p)(g):o?d(g):p(g)}function h(g){return t.attempt(T6,d,p)(g)}function d(g){return e(g)}function p(g){return s._balanced=!0,n(g)}}function A6(t,e,n){return i;function i(p){return t.enter("resource"),t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),r}function r(p){return _t(p)?Nh(t,s)(p):s(p)}function s(p){return p===41?d(p):_$(t,o,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(p)}function o(p){return _t(p)?Nh(t,c)(p):d(p)}function l(p){return n(p)}function c(p){return p===34||p===39||p===40?w$(t,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(p):d(p)}function h(p){return _t(p)?Nh(t,d)(p):d(p)}function d(p){return p===41?(t.enter("resourceMarker"),t.consume(p),t.exit("resourceMarker"),t.exit("resource"),e):n(p)}}function R6(t,e,n){const i=this;return r;function r(l){return k$.call(i,t,s,o,"reference","referenceMarker","referenceString")(l)}function s(l){return i.parser.defined.includes(ur(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?e(l):n(l)}function o(l){return n(l)}}function $6(t,e,n){return i;function i(s){return t.enter("reference"),t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),r}function r(s){return s===93?(t.enter("referenceMarker"),t.consume(s),t.exit("referenceMarker"),t.exit("reference"),e):n(s)}}const L6={name:"labelStartImage",resolveAll:Vv.resolveAll,tokenize:M6};function M6(t,e,n){const i=this;return r;function r(l){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(l),t.exit("labelImageMarker"),s}function s(l){return l===91?(t.enter("labelMarker"),t.consume(l),t.exit("labelMarker"),t.exit("labelImage"),o):n(l)}function o(l){return l===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(l):e(l)}}const D6={name:"labelStartLink",resolveAll:Vv.resolveAll,tokenize:j6};function j6(t,e,n){const i=this;return r;function r(o){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(o),t.exit("labelMarker"),t.exit("labelLink"),s}function s(o){return o===94&&"_hiddenFootnoteSupport"in i.parser.constructs?n(o):e(o)}}const ob={name:"lineEnding",tokenize:N6};function N6(t,e){return n;function n(i){return t.enter("lineEnding"),t.consume(i),t.exit("lineEnding"),nt(t,e,"linePrefix")}}const mm={name:"thematicBreak",tokenize:z6};function z6(t,e,n){let i=0,r;return s;function s(h){return t.enter("thematicBreak"),o(h)}function o(h){return r=h,l(h)}function l(h){return h===r?(t.enter("thematicBreakSequence"),c(h)):i>=3&&(h===null||Re(h))?(t.exit("thematicBreak"),e(h)):n(h)}function c(h){return h===r?(t.consume(h),i++,c):(t.exit("thematicBreakSequence"),Ye(h)?nt(t,l,"whitespace")(h):l(h))}}const Hn={continuation:{tokenize:B6},exit:q6,name:"list",tokenize:V6},I6={partial:!0,tokenize:U6},X6={partial:!0,tokenize:Z6};function V6(t,e,n){const i=this,r=i.events[i.events.length-1];let s=r&&r[1].type==="linePrefix"?r[2].sliceSerialize(r[1],!0).length:0,o=0;return l;function l(O){const x=i.containerState.type||(O===42||O===43||O===45?"listUnordered":"listOrdered");if(x==="listUnordered"?!i.containerState.marker||O===i.containerState.marker:Bx(O)){if(i.containerState.type||(i.containerState.type=x,t.enter(x,{_container:!0})),x==="listUnordered")return t.enter("listItemPrefix"),O===42||O===45?t.check(mm,n,h)(O):h(O);if(!i.interrupt||O===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),c(O)}return n(O)}function c(O){return Bx(O)&&++o<10?(t.consume(O),c):(!i.interrupt||o<2)&&(i.containerState.marker?O===i.containerState.marker:O===41||O===46)?(t.exit("listItemValue"),h(O)):n(O)}function h(O){return t.enter("listItemMarker"),t.consume(O),t.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||O,t.check(qf,i.interrupt?n:d,t.attempt(I6,g,p))}function d(O){return i.containerState.initialBlankLine=!0,s++,g(O)}function p(O){return Ye(O)?(t.enter("listItemPrefixWhitespace"),t.consume(O),t.exit("listItemPrefixWhitespace"),g):n(O)}function g(O){return i.containerState.size=s+i.sliceSerialize(t.exit("listItemPrefix"),!0).length,e(O)}}function B6(t,e,n){const i=this;return i.containerState._closeFlow=void 0,t.check(qf,r,s);function r(l){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,nt(t,e,"listItemIndent",i.containerState.size+1)(l)}function s(l){return i.containerState.furtherBlankLines||!Ye(l)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,o(l)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,t.attempt(X6,e,o)(l))}function o(l){return i.containerState._closeFlow=!0,i.interrupt=void 0,nt(t,t.attempt(Hn,e,n),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function Z6(t,e,n){const i=this;return nt(t,r,"listItemIndent",i.containerState.size+1);function r(s){const o=i.events[i.events.length-1];return o&&o[1].type==="listItemIndent"&&o[2].sliceSerialize(o[1],!0).length===i.containerState.size?e(s):n(s)}}function q6(t){t.exit(this.containerState.type)}function U6(t,e,n){const i=this;return nt(t,r,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function r(s){const o=i.events[i.events.length-1];return!Ye(s)&&o&&o[1].type==="listItemPrefixWhitespace"?e(s):n(s)}}const LQ={name:"setextUnderline",resolveTo:Y6,tokenize:G6};function Y6(t,e){let n=t.length,i,r,s;for(;n--;)if(t[n][0]==="enter"){if(t[n][1].type==="content"){i=n;break}t[n][1].type==="paragraph"&&(r=n)}else t[n][1].type==="content"&&t.splice(n,1),!s&&t[n][1].type==="definition"&&(s=n);const o={type:"setextHeading",start:{...t[i][1].start},end:{...t[t.length-1][1].end}};return t[r][1].type="setextHeadingText",s?(t.splice(r,0,["enter",o,e]),t.splice(s+1,0,["exit",t[i][1],e]),t[i][1].end={...t[s][1].end}):t[i][1]=o,t.push(["exit",o,e]),t}function G6(t,e,n){const i=this;let r;return s;function s(h){let d=i.events.length,p;for(;d--;)if(i.events[d][1].type!=="lineEnding"&&i.events[d][1].type!=="linePrefix"&&i.events[d][1].type!=="content"){p=i.events[d][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||p)?(t.enter("setextHeadingLine"),r=h,o(h)):n(h)}function o(h){return t.enter("setextHeadingLineSequence"),l(h)}function l(h){return h===r?(t.consume(h),l):(t.exit("setextHeadingLineSequence"),Ye(h)?nt(t,c,"lineSuffix")(h):c(h))}function c(h){return h===null||Re(h)?(t.exit("setextHeadingLine"),e(h)):n(h)}}const W6={tokenize:H6};function H6(t){const e=this,n=t.attempt(qf,i,t.attempt(this.parser.constructs.flowInitial,r,nt(t,t.attempt(this.parser.constructs.flow,r,t.attempt(t6,r)),"linePrefix")));return n;function i(s){if(s===null){t.consume(s);return}return t.enter("lineEndingBlank"),t.consume(s),t.exit("lineEndingBlank"),e.currentConstruct=void 0,n}function r(s){if(s===null){t.consume(s);return}return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),e.currentConstruct=void 0,n}}const F6={resolveAll:T$()},K6=P$("string"),J6=P$("text");function P$(t){return{resolveAll:T$(t==="text"?e9:void 0),tokenize:e};function e(n){const i=this,r=this.parser.constructs[t],s=n.attempt(r,o,l);return o;function o(d){return h(d)?s(d):l(d)}function l(d){if(d===null){n.consume(d);return}return n.enter("data"),n.consume(d),c}function c(d){return h(d)?(n.exit("data"),s(d)):(n.consume(d),c)}function h(d){if(d===null)return!0;const p=r[d];let g=-1;if(p)for(;++g<p.length;){const O=p[g];if(!O.previous||O.previous.call(i,i.previous))return!0}return!1}}}function T$(t){return e;function e(n,i){let r=-1,s;for(;++r<=n.length;)s===void 0?n[r]&&n[r][1].type==="data"&&(s=r,r++):(!n[r]||n[r][1].type!=="data")&&(r!==s+2&&(n[s][1].end=n[r-1][1].end,n.splice(s+2,r-s-2),r=s+2),s=void 0);return t?t(n,i):n}}function e9(t,e){let n=0;for(;++n<=t.length;)if((n===t.length||t[n][1].type==="lineEnding")&&t[n-1][1].type==="data"){const i=t[n-1][1],r=e.sliceStream(i);let s=r.length,o=-1,l=0,c;for(;s--;){const h=r[s];if(typeof h=="string"){for(o=h.length;h.charCodeAt(o-1)===32;)l++,o--;if(o)break;o=-1}else if(h===-2)c=!0,l++;else if(h!==-1){s++;break}}if(e._contentTypeTextTrailing&&n===t.length&&(l=0),l){const h={type:n===t.length||c||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?o:i.start._bufferIndex+o,_index:i.start._index+s,line:i.end.line,column:i.end.column-l,offset:i.end.offset-l},end:{...i.end}};i.end={...h.start},i.start.offset===i.end.offset?Object.assign(i,h):(t.splice(n,0,["enter",h,e],["exit",h,e]),n+=2)}n++}return t}const t9={42:Hn,43:Hn,45:Hn,48:Hn,49:Hn,50:Hn,51:Hn,52:Hn,53:Hn,54:Hn,55:Hn,56:Hn,57:Hn,62:b$},n9={91:o6},i9={[-2]:sb,[-1]:sb,32:sb},r9={35:f6,42:mm,45:[LQ,mm],60:g6,61:LQ,95:mm,96:RQ,126:RQ},s9={38:v$,92:x$},o9={[-5]:ob,[-4]:ob,[-3]:ob,33:L6,38:v$,42:Zx,60:[Dq,_6],91:D6,92:[u6,x$],93:Vv,95:Zx,96:Wq},a9={null:[Zx,F6]},l9={null:[42,95]},c9={null:[]},u9=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:l9,contentInitial:n9,disable:c9,document:t9,flow:r9,flowInitial:i9,insideSpan:a9,string:s9,text:o9},Symbol.toStringTag,{value:"Module"}));function h9(t,e,n){let i={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const r={},s=[];let o=[],l=[];const c={attempt:D($),check:D(C),consume:P,enter:Q,exit:R,interrupt:D(C,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:x,parser:t,previous:null,sliceSerialize:g,sliceStream:O,write:p};let d=e.tokenize.call(h,c);return e.resolveAll&&s.push(e),h;function p(V){return o=Vi(o,V),_(),o[o.length-1]!==null?[]:(Z(e,0),h.events=Gg(s,h.events,h),h.events)}function g(V,G){return d9(O(V),G)}function O(V){return f9(o,V)}function x(){const{_bufferIndex:V,_index:G,line:J,column:K,offset:ie}=i;return{_bufferIndex:V,_index:G,line:J,column:K,offset:ie}}function S(V){r[V.line]=V.column,M()}function _(){let V;for(;i._index<o.length;){const G=o[i._index];if(typeof G=="string")for(V=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===V&&i._bufferIndex<G.length;)k(G.charCodeAt(i._bufferIndex));else k(G)}}function k(V){d=d(V)}function P(V){Re(V)?(i.line++,i.column=1,i.offset+=V===-3?2:1,M()):V!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===o[i._index].length&&(i._bufferIndex=-1,i._index++)),h.previous=V}function Q(V,G){const J=G||{};return J.type=V,J.start=x(),h.events.push(["enter",J,h]),l.push(J),J}function R(V){const G=l.pop();return G.end=x(),h.events.push(["exit",G,h]),G}function $(V,G){Z(V,G.from)}function C(V,G){G.restore()}function D(V,G){return J;function J(K,ie,q){let se,pe,ve,j;return Array.isArray(K)?te(K):"tokenize"in K?te([K]):N(K);function N(be){return Ce;function Ce(st){const Fe=st!==null&&be[st],xn=st!==null&&be.null,oi=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(xn)?xn:xn?[xn]:[]];return te(oi)(st)}}function te(be){return se=be,pe=0,be.length===0?q:L(be[pe])}function L(be){return Ce;function Ce(st){return j=U(),ve=be,be.partial||(h.currentConstruct=be),be.name&&h.parser.constructs.disable.null.includes(be.name)?ge():be.tokenize.call(G?Object.assign(Object.create(h),G):h,c,re,ge)(st)}}function re(be){return V(ve,j),ie}function ge(be){return j.restore(),++pe<se.length?L(se[pe]):q}}}function Z(V,G){V.resolveAll&&!s.includes(V)&&s.push(V),V.resolve&&wi(h.events,G,h.events.length-G,V.resolve(h.events.slice(G),h)),V.resolveTo&&(h.events=V.resolveTo(h.events,h))}function U(){const V=x(),G=h.previous,J=h.currentConstruct,K=h.events.length,ie=Array.from(l);return{from:K,restore:q};function q(){i=V,h.previous=G,h.currentConstruct=J,h.events.length=K,l=ie,M()}}function M(){i.line in r&&i.column<2&&(i.column=r[i.line],i.offset+=r[i.line]-1)}}function f9(t,e){const n=e.start._index,i=e.start._bufferIndex,r=e.end._index,s=e.end._bufferIndex;let o;if(n===r)o=[t[n].slice(i,s)];else{if(o=t.slice(n,r),i>-1){const l=o[0];typeof l=="string"?o[0]=l.slice(i):o.shift()}s>0&&o.push(t[r].slice(0,s))}return o}function d9(t,e){let n=-1;const i=[];let r;for(;++n<t.length;){const s=t[n];let o;if(typeof s=="string")o=s;else switch(s){case-5:{o="\r";break}case-4:{o=`
285
+ `;break}case-3:{o=`\r
286
+ `;break}case-2:{o=e?" ":" ";break}case-1:{if(!e&&r)continue;o=" ";break}default:o=String.fromCharCode(s)}r=s===-2,i.push(o)}return i.join("")}function p9(t){const i={constructs:O$([u9,...(t||{}).extensions||[]]),content:r(Cq),defined:[],document:r(Aq),flow:r(W6),lazy:{},string:r(K6),text:r(J6)};return i;function r(s){return o;function o(l){return h9(i,s,l)}}}function m9(t){for(;!S$(t););return t}const MQ=/[\0\t\n\r]/g;function g9(){let t=1,e="",n=!0,i;return r;function r(s,o,l){const c=[];let h,d,p,g,O;for(s=e+(typeof s=="string"?s.toString():new TextDecoder(o||void 0).decode(s)),p=0,e="",n&&(s.charCodeAt(0)===65279&&p++,n=void 0);p<s.length;){if(MQ.lastIndex=p,h=MQ.exec(s),g=h&&h.index!==void 0?h.index:s.length,O=s.charCodeAt(g),!h){e=s.slice(p);break}if(O===10&&p===g&&i)c.push(-3),i=void 0;else switch(i&&(c.push(-5),i=void 0),p<g&&(c.push(s.slice(p,g)),t+=g-p),O){case 0:{c.push(65533),t++;break}case 9:{for(d=Math.ceil(t/4)*4,c.push(-2);t++<d;)c.push(-1);break}case 10:{c.push(-4),t=1;break}default:i=!0,t=1}p=g+1}return l&&(i&&c.push(-5),e&&c.push(e),c.push(null)),c}}const O9=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function y9(t){return t.replace(O9,b9)}function b9(t,e,n){if(e)return e;if(n.charCodeAt(0)===35){const r=n.charCodeAt(1),s=r===120||r===88;return y$(n.slice(s?2:1),s?16:10)}return Xv(n)||t}const Q$={}.hasOwnProperty;function x9(t,e,n){return typeof e!="string"&&(n=e,e=void 0),v9(n)(m9(p9(n).document().write(g9()(t,e,!0))))}function v9(t){const e={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(tr),autolinkProtocol:U,autolinkEmail:U,atxHeading:s(Gr),blockQuote:s(xn),characterEscape:U,characterReference:U,codeFenced:s(oi),codeFencedFenceInfo:o,codeFencedFenceMeta:o,codeIndented:s(oi,o),codeText:s(ai,o),codeTextData:U,data:U,codeFlowValue:U,definition:s(cl),definitionDestinationString:o,definitionLabelString:o,definitionTitleString:o,emphasis:s(er),hardBreakEscape:s(Vs),hardBreakTrailing:s(Vs),htmlFlow:s(ul,o),htmlFlowData:U,htmlText:s(ul,o),htmlTextData:U,image:s(hl),label:o,link:s(tr),listItem:s(Bs),listItemValue:g,listOrdered:s(nr,p),listUnordered:s(nr),paragraph:s(fl),reference:L,referenceString:o,resourceDestinationString:o,resourceTitleString:o,setextHeading:s(Gr),strong:s(ot),thematicBreak:s(En)},exit:{atxHeading:c(),atxHeadingSequence:$,autolink:c(),autolinkEmail:Fe,autolinkProtocol:st,blockQuote:c(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:ge,characterReferenceMarkerNumeric:ge,characterReferenceValue:be,characterReference:Ce,codeFenced:c(_),codeFencedFence:S,codeFencedFenceInfo:O,codeFencedFenceMeta:x,codeFlowValue:M,codeIndented:c(k),codeText:c(ie),codeTextData:M,data:M,definition:c(),definitionDestinationString:R,definitionLabelString:P,definitionTitleString:Q,emphasis:c(),hardBreakEscape:c(G),hardBreakTrailing:c(G),htmlFlow:c(J),htmlFlowData:M,htmlText:c(K),htmlTextData:M,image:c(se),label:ve,labelText:pe,lineEnding:V,link:c(q),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:j,resourceTitleString:N,resource:te,setextHeading:c(Z),setextHeadingLineSequence:D,setextHeadingText:C,strong:c(),thematicBreak:c()}};C$(e,(t||{}).mdastExtensions||[]);const n={};return i;function i(le){let Oe={type:"root",children:[]};const Le={stack:[Oe],tokenStack:[],config:e,enter:l,exit:h,buffer:o,resume:d,data:n},Be=[];let ut=-1;for(;++ut<le.length;)if(le[ut][1].type==="listOrdered"||le[ut][1].type==="listUnordered")if(le[ut][0]==="enter")Be.push(ut);else{const li=Be.pop();ut=r(le,li,ut)}for(ut=-1;++ut<le.length;){const li=e[le[ut][0]];Q$.call(li,le[ut][1].type)&&li[le[ut][1].type].call(Object.assign({sliceSerialize:le[ut][2].sliceSerialize},Le),le[ut][1])}if(Le.tokenStack.length>0){const li=Le.tokenStack[Le.tokenStack.length-1];(li[1]||DQ).call(Le,void 0,li[0])}for(Oe.position={start:go(le.length>0?le[0][1].start:{line:1,column:1,offset:0}),end:go(le.length>0?le[le.length-2][1].end:{line:1,column:1,offset:0})},ut=-1;++ut<e.transforms.length;)Oe=e.transforms[ut](Oe)||Oe;return Oe}function r(le,Oe,Le){let Be=Oe-1,ut=-1,li=!1,Wr,An,Ft,Vn;for(;++Be<=Le;){const bt=le[Be];switch(bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{bt[0]==="enter"?ut++:ut--,Vn=void 0;break}case"lineEndingBlank":{bt[0]==="enter"&&(Wr&&!Vn&&!ut&&!Ft&&(Ft=Be),Vn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Vn=void 0}if(!ut&&bt[0]==="enter"&&bt[1].type==="listItemPrefix"||ut===-1&&bt[0]==="exit"&&(bt[1].type==="listUnordered"||bt[1].type==="listOrdered")){if(Wr){let Zs=Be;for(An=void 0;Zs--;){const ir=le[Zs];if(ir[1].type==="lineEnding"||ir[1].type==="lineEndingBlank"){if(ir[0]==="exit")continue;An&&(le[An][1].type="lineEndingBlank",li=!0),ir[1].type="lineEnding",An=Zs}else if(!(ir[1].type==="linePrefix"||ir[1].type==="blockQuotePrefix"||ir[1].type==="blockQuotePrefixWhitespace"||ir[1].type==="blockQuoteMarker"||ir[1].type==="listItemIndent"))break}Ft&&(!An||Ft<An)&&(Wr._spread=!0),Wr.end=Object.assign({},An?le[An][1].start:bt[1].end),le.splice(An||Be,0,["exit",Wr,bt[2]]),Be++,Le++}if(bt[1].type==="listItemPrefix"){const Zs={type:"listItem",_spread:!1,start:Object.assign({},bt[1].start),end:void 0};Wr=Zs,le.splice(Be,0,["enter",Zs,bt[2]]),Be++,Le++,Ft=void 0,Vn=!0}}}return le[Oe][1]._spread=li,Le}function s(le,Oe){return Le;function Le(Be){l.call(this,le(Be),Be),Oe&&Oe.call(this,Be)}}function o(){this.stack.push({type:"fragment",children:[]})}function l(le,Oe,Le){this.stack[this.stack.length-1].children.push(le),this.stack.push(le),this.tokenStack.push([Oe,Le||void 0]),le.position={start:go(Oe.start),end:void 0}}function c(le){return Oe;function Oe(Le){le&&le.call(this,Le),h.call(this,Le)}}function h(le,Oe){const Le=this.stack.pop(),Be=this.tokenStack.pop();if(Be)Be[0].type!==le.type&&(Oe?Oe.call(this,le,Be[0]):(Be[1]||DQ).call(this,le,Be[0]));else throw new Error("Cannot close `"+le.type+"` ("+jh({start:le.start,end:le.end})+"): it’s not open");Le.position.end=go(le.end)}function d(){return Iv(this.stack.pop())}function p(){this.data.expectingFirstListItemValue=!0}function g(le){if(this.data.expectingFirstListItemValue){const Oe=this.stack[this.stack.length-2];Oe.start=Number.parseInt(this.sliceSerialize(le),10),this.data.expectingFirstListItemValue=void 0}}function O(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.lang=le}function x(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.meta=le}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.value=le.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function k(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.value=le.replace(/(\r?\n|\r)$/g,"")}function P(le){const Oe=this.resume(),Le=this.stack[this.stack.length-1];Le.label=Oe,Le.identifier=ur(this.sliceSerialize(le)).toLowerCase()}function Q(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.title=le}function R(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.url=le}function $(le){const Oe=this.stack[this.stack.length-1];if(!Oe.depth){const Le=this.sliceSerialize(le).length;Oe.depth=Le}}function C(){this.data.setextHeadingSlurpLineEnding=!0}function D(le){const Oe=this.stack[this.stack.length-1];Oe.depth=this.sliceSerialize(le).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function U(le){const Le=this.stack[this.stack.length-1].children;let Be=Le[Le.length-1];(!Be||Be.type!=="text")&&(Be=it(),Be.position={start:go(le.start),end:void 0},Le.push(Be)),this.stack.push(Be)}function M(le){const Oe=this.stack.pop();Oe.value+=this.sliceSerialize(le),Oe.position.end=go(le.end)}function V(le){const Oe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Le=Oe.children[Oe.children.length-1];Le.position.end=go(le.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&e.canContainEols.includes(Oe.type)&&(U.call(this,le),M.call(this,le))}function G(){this.data.atHardBreak=!0}function J(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.value=le}function K(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.value=le}function ie(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.value=le}function q(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const Oe=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=Oe,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function se(){const le=this.stack[this.stack.length-1];if(this.data.inReference){const Oe=this.data.referenceType||"shortcut";le.type+="Reference",le.referenceType=Oe,delete le.url,delete le.title}else delete le.identifier,delete le.label;this.data.referenceType=void 0}function pe(le){const Oe=this.sliceSerialize(le),Le=this.stack[this.stack.length-2];Le.label=y9(Oe),Le.identifier=ur(Oe).toLowerCase()}function ve(){const le=this.stack[this.stack.length-1],Oe=this.resume(),Le=this.stack[this.stack.length-1];if(this.data.inReference=!0,Le.type==="link"){const Be=le.children;Le.children=Be}else Le.alt=Oe}function j(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.url=le}function N(){const le=this.resume(),Oe=this.stack[this.stack.length-1];Oe.title=le}function te(){this.data.inReference=void 0}function L(){this.data.referenceType="collapsed"}function re(le){const Oe=this.resume(),Le=this.stack[this.stack.length-1];Le.label=Oe,Le.identifier=ur(this.sliceSerialize(le)).toLowerCase(),this.data.referenceType="full"}function ge(le){this.data.characterReferenceType=le.type}function be(le){const Oe=this.sliceSerialize(le),Le=this.data.characterReferenceType;let Be;Le?(Be=y$(Oe,Le==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Be=Xv(Oe);const ut=this.stack[this.stack.length-1];ut.value+=Be}function Ce(le){const Oe=this.stack.pop();Oe.position.end=go(le.end)}function st(le){M.call(this,le);const Oe=this.stack[this.stack.length-1];Oe.url=this.sliceSerialize(le)}function Fe(le){M.call(this,le);const Oe=this.stack[this.stack.length-1];Oe.url="mailto:"+this.sliceSerialize(le)}function xn(){return{type:"blockquote",children:[]}}function oi(){return{type:"code",lang:null,meta:null,value:""}}function ai(){return{type:"inlineCode",value:""}}function cl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function er(){return{type:"emphasis",children:[]}}function Gr(){return{type:"heading",depth:0,children:[]}}function Vs(){return{type:"break"}}function ul(){return{type:"html",value:""}}function hl(){return{type:"image",title:null,url:"",alt:null}}function tr(){return{type:"link",title:null,url:"",children:[]}}function nr(le){return{type:"list",ordered:le.type==="listOrdered",start:null,spread:le._spread,children:[]}}function Bs(le){return{type:"listItem",spread:le._spread,checked:null,children:[]}}function fl(){return{type:"paragraph",children:[]}}function ot(){return{type:"strong",children:[]}}function it(){return{type:"text",value:""}}function En(){return{type:"thematicBreak"}}}function go(t){return{line:t.line,column:t.column,offset:t.offset}}function C$(t,e){let n=-1;for(;++n<e.length;){const i=e[n];Array.isArray(i)?C$(t,i):S9(t,i)}}function S9(t,e){let n;for(n in e)if(Q$.call(e,n))switch(n){case"canContainEols":{const i=e[n];i&&t[n].push(...i);break}case"transforms":{const i=e[n];i&&t[n].push(...i);break}case"enter":case"exit":{const i=e[n];i&&Object.assign(t[n],i);break}}}function DQ(t,e){throw t?new Error("Cannot close `"+t.type+"` ("+jh({start:t.start,end:t.end})+"): a different token (`"+e.type+"`, "+jh({start:e.start,end:e.end})+") is open"):new Error("Cannot close document, a token (`"+e.type+"`, "+jh({start:e.start,end:e.end})+") is still open")}function _9(t){const e=this;e.parser=n;function n(i){return x9(i,{...e.data("settings"),...t,extensions:e.data("micromarkExtensions")||[],mdastExtensions:e.data("fromMarkdownExtensions")||[]})}}function k9(t,e){const n={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(e),!0)};return t.patch(e,n),t.applyData(e,n)}function w9(t,e){const n={type:"element",tagName:"br",properties:{},children:[]};return t.patch(e,n),[t.applyData(e,n),{type:"text",value:`
287
+ `}]}function P9(t,e){const n=e.value?e.value+`
288
+ `:"",i={},r=e.lang?e.lang.split(/\s+/):[];r.length>0&&(i.className=["language-"+r[0]]);let s={type:"element",tagName:"code",properties:i,children:[{type:"text",value:n}]};return e.meta&&(s.data={meta:e.meta}),t.patch(e,s),s=t.applyData(e,s),s={type:"element",tagName:"pre",properties:{},children:[s]},t.patch(e,s),s}function T9(t,e){const n={type:"element",tagName:"del",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function Q9(t,e){const n={type:"element",tagName:"em",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function C9(t,e){const n=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",i=String(e.identifier).toUpperCase(),r=au(i.toLowerCase()),s=t.footnoteOrder.indexOf(i);let o,l=t.footnoteCounts.get(i);l===void 0?(l=0,t.footnoteOrder.push(i),o=t.footnoteOrder.length):o=s+1,l+=1,t.footnoteCounts.set(i,l);const c={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+r,id:n+"fnref-"+r+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(o)}]};t.patch(e,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return t.patch(e,h),t.applyData(e,h)}function E9(t,e){const n={type:"element",tagName:"h"+e.depth,properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function A9(t,e){if(t.options.allowDangerousHtml){const n={type:"raw",value:e.value};return t.patch(e,n),t.applyData(e,n)}}function E$(t,e){const n=e.referenceType;let i="]";if(n==="collapsed"?i+="[]":n==="full"&&(i+="["+(e.label||e.identifier)+"]"),e.type==="imageReference")return[{type:"text",value:"!["+e.alt+i}];const r=t.all(e),s=r[0];s&&s.type==="text"?s.value="["+s.value:r.unshift({type:"text",value:"["});const o=r[r.length-1];return o&&o.type==="text"?o.value+=i:r.push({type:"text",value:i}),r}function R9(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return E$(t,e);const r={src:au(i.url||""),alt:e.alt};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"img",properties:r,children:[]};return t.patch(e,s),t.applyData(e,s)}function $9(t,e){const n={src:au(e.url)};e.alt!==null&&e.alt!==void 0&&(n.alt=e.alt),e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"img",properties:n,children:[]};return t.patch(e,i),t.applyData(e,i)}function L9(t,e){const n={type:"text",value:e.value.replace(/\r?\n|\r/g," ")};t.patch(e,n);const i={type:"element",tagName:"code",properties:{},children:[n]};return t.patch(e,i),t.applyData(e,i)}function M9(t,e){const n=String(e.identifier).toUpperCase(),i=t.definitionById.get(n);if(!i)return E$(t,e);const r={href:au(i.url||"")};i.title!==null&&i.title!==void 0&&(r.title=i.title);const s={type:"element",tagName:"a",properties:r,children:t.all(e)};return t.patch(e,s),t.applyData(e,s)}function D9(t,e){const n={href:au(e.url)};e.title!==null&&e.title!==void 0&&(n.title=e.title);const i={type:"element",tagName:"a",properties:n,children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function j9(t,e,n){const i=t.all(e),r=n?N9(n):A$(e),s={},o=[];if(typeof e.checked=="boolean"){const d=i[0];let p;d&&d.type==="element"&&d.tagName==="p"?p=d:(p={type:"element",tagName:"p",properties:{},children:[]},i.unshift(p)),p.children.length>0&&p.children.unshift({type:"text",value:" "}),p.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:e.checked,disabled:!0},children:[]}),s.className=["task-list-item"]}let l=-1;for(;++l<i.length;){const d=i[l];(r||l!==0||d.type!=="element"||d.tagName!=="p")&&o.push({type:"text",value:`
289
+ `}),d.type==="element"&&d.tagName==="p"&&!r?o.push(...d.children):o.push(d)}const c=i[i.length-1];c&&(r||c.type!=="element"||c.tagName!=="p")&&o.push({type:"text",value:`
290
+ `});const h={type:"element",tagName:"li",properties:s,children:o};return t.patch(e,h),t.applyData(e,h)}function N9(t){let e=!1;if(t.type==="list"){e=t.spread||!1;const n=t.children;let i=-1;for(;!e&&++i<n.length;)e=A$(n[i])}return e}function A$(t){const e=t.spread;return e??t.children.length>1}function z9(t,e){const n={},i=t.all(e);let r=-1;for(typeof e.start=="number"&&e.start!==1&&(n.start=e.start);++r<i.length;){const o=i[r];if(o.type==="element"&&o.tagName==="li"&&o.properties&&Array.isArray(o.properties.className)&&o.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const s={type:"element",tagName:e.ordered?"ol":"ul",properties:n,children:t.wrap(i,!0)};return t.patch(e,s),t.applyData(e,s)}function I9(t,e){const n={type:"element",tagName:"p",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function X9(t,e){const n={type:"root",children:t.wrap(t.all(e))};return t.patch(e,n),t.applyData(e,n)}function V9(t,e){const n={type:"element",tagName:"strong",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}function B9(t,e){const n=t.all(e),i=n.shift(),r=[];if(i){const o={type:"element",tagName:"thead",properties:{},children:t.wrap([i],!0)};t.patch(e.children[0],o),r.push(o)}if(n.length>0){const o={type:"element",tagName:"tbody",properties:{},children:t.wrap(n,!0)},l=Dv(e.children[1]),c=u$(e.children[e.children.length-1]);l&&c&&(o.position={start:l,end:c}),r.push(o)}const s={type:"element",tagName:"table",properties:{},children:t.wrap(r,!0)};return t.patch(e,s),t.applyData(e,s)}function Z9(t,e,n){const i=n?n.children:void 0,s=(i?i.indexOf(e):1)===0?"th":"td",o=n&&n.type==="table"?n.align:void 0,l=o?o.length:e.children.length;let c=-1;const h=[];for(;++c<l;){const p=e.children[c],g={},O=o?o[c]:void 0;O&&(g.align=O);let x={type:"element",tagName:s,properties:g,children:[]};p&&(x.children=t.all(p),t.patch(p,x),x=t.applyData(p,x)),h.push(x)}const d={type:"element",tagName:"tr",properties:{},children:t.wrap(h,!0)};return t.patch(e,d),t.applyData(e,d)}function q9(t,e){const n={type:"element",tagName:"td",properties:{},children:t.all(e)};return t.patch(e,n),t.applyData(e,n)}const jQ=9,NQ=32;function U9(t){const e=String(t),n=/\r?\n|\r/g;let i=n.exec(e),r=0;const s=[];for(;i;)s.push(zQ(e.slice(r,i.index),r>0,!0),i[0]),r=i.index+i[0].length,i=n.exec(e);return s.push(zQ(e.slice(r),r>0,!1)),s.join("")}function zQ(t,e,n){let i=0,r=t.length;if(e){let s=t.codePointAt(i);for(;s===jQ||s===NQ;)i++,s=t.codePointAt(i)}if(n){let s=t.codePointAt(r-1);for(;s===jQ||s===NQ;)r--,s=t.codePointAt(r-1)}return r>i?t.slice(i,r):""}function Y9(t,e){const n={type:"text",value:U9(String(e.value))};return t.patch(e,n),t.applyData(e,n)}function G9(t,e){const n={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(e,n),t.applyData(e,n)}const W9={blockquote:k9,break:w9,code:P9,delete:T9,emphasis:Q9,footnoteReference:C9,heading:E9,html:A9,imageReference:R9,image:$9,inlineCode:L9,linkReference:M9,link:D9,listItem:j9,list:z9,paragraph:I9,root:X9,strong:V9,table:B9,tableCell:q9,tableRow:Z9,text:Y9,thematicBreak:G9,toml:Cp,yaml:Cp,definition:Cp,footnoteDefinition:Cp};function Cp(){}const R$=-1,Wg=0,zh=1,Zm=2,Bv=3,Zv=4,qv=5,Uv=6,$$=7,L$=8,IQ=typeof self=="object"?self:globalThis,H9=(t,e)=>{const n=(r,s)=>(t.set(s,r),r),i=r=>{if(t.has(r))return t.get(r);const[s,o]=e[r];switch(s){case Wg:case R$:return n(o,r);case zh:{const l=n([],r);for(const c of o)l.push(i(c));return l}case Zm:{const l=n({},r);for(const[c,h]of o)l[i(c)]=i(h);return l}case Bv:return n(new Date(o),r);case Zv:{const{source:l,flags:c}=o;return n(new RegExp(l,c),r)}case qv:{const l=n(new Map,r);for(const[c,h]of o)l.set(i(c),i(h));return l}case Uv:{const l=n(new Set,r);for(const c of o)l.add(i(c));return l}case $$:{const{name:l,message:c}=o;return n(new IQ[l](c),r)}case L$:return n(BigInt(o),r);case"BigInt":return n(Object(BigInt(o)),r);case"ArrayBuffer":return n(new Uint8Array(o).buffer,o);case"DataView":{const{buffer:l}=new Uint8Array(o);return n(new DataView(l),o)}}return n(new IQ[s](o),r)};return i},XQ=t=>H9(new Map,t)(0),rc="",{toString:F9}={},{keys:K9}=Object,dh=t=>{const e=typeof t;if(e!=="object"||!t)return[Wg,e];const n=F9.call(t).slice(8,-1);switch(n){case"Array":return[zh,rc];case"Object":return[Zm,rc];case"Date":return[Bv,rc];case"RegExp":return[Zv,rc];case"Map":return[qv,rc];case"Set":return[Uv,rc];case"DataView":return[zh,n]}return n.includes("Array")?[zh,n]:n.includes("Error")?[$$,n]:[Zm,n]},Ep=([t,e])=>t===Wg&&(e==="function"||e==="symbol"),J9=(t,e,n,i)=>{const r=(o,l)=>{const c=i.push(o)-1;return n.set(l,c),c},s=o=>{if(n.has(o))return n.get(o);let[l,c]=dh(o);switch(l){case Wg:{let d=o;switch(c){case"bigint":l=L$,d=o.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+c);d=null;break;case"undefined":return r([R$],o)}return r([l,d],o)}case zh:{if(c){let g=o;return c==="DataView"?g=new Uint8Array(o.buffer):c==="ArrayBuffer"&&(g=new Uint8Array(o)),r([c,[...g]],o)}const d=[],p=r([l,d],o);for(const g of o)d.push(s(g));return p}case Zm:{if(c)switch(c){case"BigInt":return r([c,o.toString()],o);case"Boolean":case"Number":case"String":return r([c,o.valueOf()],o)}if(e&&"toJSON"in o)return s(o.toJSON());const d=[],p=r([l,d],o);for(const g of K9(o))(t||!Ep(dh(o[g])))&&d.push([s(g),s(o[g])]);return p}case Bv:return r([l,o.toISOString()],o);case Zv:{const{source:d,flags:p}=o;return r([l,{source:d,flags:p}],o)}case qv:{const d=[],p=r([l,d],o);for(const[g,O]of o)(t||!(Ep(dh(g))||Ep(dh(O))))&&d.push([s(g),s(O)]);return p}case Uv:{const d=[],p=r([l,d],o);for(const g of o)(t||!Ep(dh(g)))&&d.push(s(g));return p}}const{message:h}=o;return r([l,{name:c,message:h}],o)};return s},VQ=(t,{json:e,lossy:n}={})=>{const i=[];return J9(!(e||n),!!e,new Map,i)(t),i},qm=typeof structuredClone=="function"?(t,e)=>e&&("json"in e||"lossy"in e)?XQ(VQ(t,e)):structuredClone(t):(t,e)=>XQ(VQ(t,e));function e7(t,e){const n=[{type:"text",value:"↩"}];return e>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(e)}]}),n}function t7(t,e){return"Back to reference "+(t+1)+(e>1?"-"+e:"")}function n7(t){const e=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",n=t.options.footnoteBackContent||e7,i=t.options.footnoteBackLabel||t7,r=t.options.footnoteLabel||"Footnotes",s=t.options.footnoteLabelTagName||"h2",o=t.options.footnoteLabelProperties||{className:["sr-only"]},l=[];let c=-1;for(;++c<t.footnoteOrder.length;){const h=t.footnoteById.get(t.footnoteOrder[c]);if(!h)continue;const d=t.all(h),p=String(h.identifier).toUpperCase(),g=au(p.toLowerCase());let O=0;const x=[],S=t.footnoteCounts.get(p);for(;S!==void 0&&++O<=S;){x.length>0&&x.push({type:"text",value:" "});let P=typeof n=="string"?n:n(c,O);typeof P=="string"&&(P={type:"text",value:P}),x.push({type:"element",tagName:"a",properties:{href:"#"+e+"fnref-"+g+(O>1?"-"+O:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(c,O),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const _=d[d.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const P=_.children[_.children.length-1];P&&P.type==="text"?P.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...x)}else d.push(...x);const k={type:"element",tagName:"li",properties:{id:e+"fn-"+g},children:t.wrap(d,!0)};t.patch(h,k),l.push(k)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:{...qm(o),id:"footnote-label"},children:[{type:"text",value:r}]},{type:"text",value:`
291
+ `},{type:"element",tagName:"ol",properties:{},children:t.wrap(l,!0)},{type:"text",value:`
292
+ `}]}}const Hg=(function(t){if(t==null)return o7;if(typeof t=="function")return Fg(t);if(typeof t=="object")return Array.isArray(t)?i7(t):r7(t);if(typeof t=="string")return s7(t);throw new Error("Expected function, string, or object as test")});function i7(t){const e=[];let n=-1;for(;++n<t.length;)e[n]=Hg(t[n]);return Fg(i);function i(...r){let s=-1;for(;++s<e.length;)if(e[s].apply(this,r))return!0;return!1}}function r7(t){const e=t;return Fg(n);function n(i){const r=i;let s;for(s in t)if(r[s]!==e[s])return!1;return!0}}function s7(t){return Fg(e);function e(n){return n&&n.type===t}}function Fg(t){return e;function e(n,i,r){return!!(a7(n)&&t.call(this,n,typeof i=="number"?i:void 0,r||void 0))}}function o7(){return!0}function a7(t){return t!==null&&typeof t=="object"&&"type"in t}const M$=[],l7=!0,qx=!1,c7="skip";function D$(t,e,n,i){let r;typeof e=="function"&&typeof n!="function"?(i=n,n=e):r=e;const s=Hg(r),o=i?-1:1;l(t,void 0,[])();function l(c,h,d){const p=c&&typeof c=="object"?c:{};if(typeof p.type=="string"){const O=typeof p.tagName=="string"?p.tagName:typeof p.name=="string"?p.name:void 0;Object.defineProperty(g,"name",{value:"node ("+(c.type+(O?"<"+O+">":""))+")"})}return g;function g(){let O=M$,x,S,_;if((!e||s(c,h,d[d.length-1]||void 0))&&(O=u7(n(c,d)),O[0]===qx))return O;if("children"in c&&c.children){const k=c;if(k.children&&O[0]!==c7)for(S=(i?k.children.length:-1)+o,_=d.concat(k);S>-1&&S<k.children.length;){const P=k.children[S];if(x=l(P,S,_)(),x[0]===qx)return x;S=typeof x[1]=="number"?x[1]:S+o}}return O}}}function u7(t){return Array.isArray(t)?t:typeof t=="number"?[l7,t]:t==null?M$:[t]}function Yv(t,e,n,i){let r,s,o;typeof e=="function"&&typeof n!="function"?(s=void 0,o=e,r=n):(s=e,o=n,r=i),D$(t,s,l,r);function l(c,h){const d=h[h.length-1],p=d?d.children.indexOf(c):void 0;return o(c,p,d)}}const Ux={}.hasOwnProperty,h7={};function f7(t,e){const n=e||h7,i=new Map,r=new Map,s=new Map,o={...W9,...n.handlers},l={all:h,applyData:p7,definitionById:i,footnoteById:r,footnoteCounts:s,footnoteOrder:[],handlers:o,one:c,options:n,patch:d7,wrap:g7};return Yv(t,function(d){if(d.type==="definition"||d.type==="footnoteDefinition"){const p=d.type==="definition"?i:r,g=String(d.identifier).toUpperCase();p.has(g)||p.set(g,d)}}),l;function c(d,p){const g=d.type,O=l.handlers[g];if(Ux.call(l.handlers,g)&&O)return O(l,d,p);if(l.options.passThrough&&l.options.passThrough.includes(g)){if("children"in d){const{children:S,..._}=d,k=qm(_);return k.children=l.all(d),k}return qm(d)}return(l.options.unknownHandler||m7)(l,d,p)}function h(d){const p=[];if("children"in d){const g=d.children;let O=-1;for(;++O<g.length;){const x=l.one(g[O],d);if(x){if(O&&g[O-1].type==="break"&&(!Array.isArray(x)&&x.type==="text"&&(x.value=BQ(x.value)),!Array.isArray(x)&&x.type==="element")){const S=x.children[0];S&&S.type==="text"&&(S.value=BQ(S.value))}Array.isArray(x)?p.push(...x):p.push(x)}}}return p}}function d7(t,e){t.position&&(e.position=tq(t))}function p7(t,e){let n=e;if(t&&t.data){const i=t.data.hName,r=t.data.hChildren,s=t.data.hProperties;if(typeof i=="string")if(n.type==="element")n.tagName=i;else{const o="children"in n?n.children:[n];n={type:"element",tagName:i,properties:{},children:o}}n.type==="element"&&s&&Object.assign(n.properties,qm(s)),"children"in n&&n.children&&r!==null&&r!==void 0&&(n.children=r)}return n}function m7(t,e){const n=e.data||{},i="value"in e&&!(Ux.call(n,"hProperties")||Ux.call(n,"hChildren"))?{type:"text",value:e.value}:{type:"element",tagName:"div",properties:{},children:t.all(e)};return t.patch(e,i),t.applyData(e,i)}function g7(t,e){const n=[];let i=-1;for(e&&n.push({type:"text",value:`
293
+ `});++i<t.length;)i&&n.push({type:"text",value:`
294
+ `}),n.push(t[i]);return e&&t.length>0&&n.push({type:"text",value:`
295
+ `}),n}function BQ(t){let e=0,n=t.charCodeAt(e);for(;n===9||n===32;)e++,n=t.charCodeAt(e);return t.slice(e)}function ZQ(t,e){const n=f7(t,e),i=n.one(t,void 0),r=n7(n),s=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return r&&s.children.push({type:"text",value:`
296
+ `},r),s}function O7(t,e){return t&&"run"in t?async function(n,i){const r=ZQ(n,{file:i,...e});await t.run(r,i)}:function(n,i){return ZQ(n,{file:i,...t||e})}}function qQ(t){if(t)throw t}var ab,UQ;function y7(){if(UQ)return ab;UQ=1;var t=Object.prototype.hasOwnProperty,e=Object.prototype.toString,n=Object.defineProperty,i=Object.getOwnPropertyDescriptor,r=function(h){return typeof Array.isArray=="function"?Array.isArray(h):e.call(h)==="[object Array]"},s=function(h){if(!h||e.call(h)!=="[object Object]")return!1;var d=t.call(h,"constructor"),p=h.constructor&&h.constructor.prototype&&t.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!d&&!p)return!1;var g;for(g in h);return typeof g>"u"||t.call(h,g)},o=function(h,d){n&&d.name==="__proto__"?n(h,d.name,{enumerable:!0,configurable:!0,value:d.newValue,writable:!0}):h[d.name]=d.newValue},l=function(h,d){if(d==="__proto__")if(t.call(h,d)){if(i)return i(h,d).value}else return;return h[d]};return ab=function c(){var h,d,p,g,O,x,S=arguments[0],_=1,k=arguments.length,P=!1;for(typeof S=="boolean"&&(P=S,S=arguments[1]||{},_=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});_<k;++_)if(h=arguments[_],h!=null)for(d in h)p=l(S,d),g=l(h,d),S!==g&&(P&&g&&(s(g)||(O=r(g)))?(O?(O=!1,x=p&&r(p)?p:[]):x=p&&s(p)?p:{},o(S,{name:d,newValue:c(P,x,g)})):typeof g<"u"&&o(S,{name:d,newValue:g}));return S},ab}var b7=y7();const lb=Ov(b7);function Yx(t){if(typeof t!="object"||t===null)return!1;const e=Object.getPrototypeOf(t);return(e===null||e===Object.prototype||Object.getPrototypeOf(e)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function x7(){const t=[],e={run:n,use:i};return e;function n(...r){let s=-1;const o=r.pop();if(typeof o!="function")throw new TypeError("Expected function as last argument, not "+o);l(null,...r);function l(c,...h){const d=t[++s];let p=-1;if(c){o(c);return}for(;++p<r.length;)(h[p]===null||h[p]===void 0)&&(h[p]=r[p]);r=h,d?v7(d,l)(...h):o(null,...h)}}function i(r){if(typeof r!="function")throw new TypeError("Expected `middelware` to be a function, not "+r);return t.push(r),e}}function v7(t,e){let n;return i;function i(...o){const l=t.length>o.length;let c;l&&o.push(r);try{c=t.apply(this,o)}catch(h){const d=h;if(l&&n)throw d;return r(d)}l||(c&&c.then&&typeof c.then=="function"?c.then(s,r):c instanceof Error?r(c):s(c))}function r(o,...l){n||(n=!0,e(o,...l))}function s(o){r(null,o)}}const Tr={basename:S7,dirname:_7,extname:k7,join:w7,sep:"/"};function S7(t,e){if(e!==void 0&&typeof e!="string")throw new TypeError('"ext" argument must be a string');Uf(t);let n=0,i=-1,r=t.length,s;if(e===void 0||e.length===0||e.length>t.length){for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else i<0&&(s=!0,i=r+1);return i<0?"":t.slice(n,i)}if(e===t)return"";let o=-1,l=e.length-1;for(;r--;)if(t.codePointAt(r)===47){if(s){n=r+1;break}}else o<0&&(s=!0,o=r+1),l>-1&&(t.codePointAt(r)===e.codePointAt(l--)?l<0&&(i=r):(l=-1,i=o));return n===i?i=o:i<0&&(i=t.length),t.slice(n,i)}function _7(t){if(Uf(t),t.length===0)return".";let e=-1,n=t.length,i;for(;--n;)if(t.codePointAt(n)===47){if(i){e=n;break}}else i||(i=!0);return e<0?t.codePointAt(0)===47?"/":".":e===1&&t.codePointAt(0)===47?"//":t.slice(0,e)}function k7(t){Uf(t);let e=t.length,n=-1,i=0,r=-1,s=0,o;for(;e--;){const l=t.codePointAt(e);if(l===47){if(o){i=e+1;break}continue}n<0&&(o=!0,n=e+1),l===46?r<0?r=e:s!==1&&(s=1):r>-1&&(s=-1)}return r<0||n<0||s===0||s===1&&r===n-1&&r===i+1?"":t.slice(r,n)}function w7(...t){let e=-1,n;for(;++e<t.length;)Uf(t[e]),t[e]&&(n=n===void 0?t[e]:n+"/"+t[e]);return n===void 0?".":P7(n)}function P7(t){Uf(t);const e=t.codePointAt(0)===47;let n=T7(t,!e);return n.length===0&&!e&&(n="."),n.length>0&&t.codePointAt(t.length-1)===47&&(n+="/"),e?"/"+n:n}function T7(t,e){let n="",i=0,r=-1,s=0,o=-1,l,c;for(;++o<=t.length;){if(o<t.length)l=t.codePointAt(o);else{if(l===47)break;l=47}if(l===47){if(!(r===o-1||s===1))if(r!==o-1&&s===2){if(n.length<2||i!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(c=n.lastIndexOf("/"),c!==n.length-1){c<0?(n="",i=0):(n=n.slice(0,c),i=n.length-1-n.lastIndexOf("/")),r=o,s=0;continue}}else if(n.length>0){n="",i=0,r=o,s=0;continue}}e&&(n=n.length>0?n+"/..":"..",i=2)}else n.length>0?n+="/"+t.slice(r+1,o):n=t.slice(r+1,o),i=o-r-1;r=o,s=0}else l===46&&s>-1?s++:s=-1}return n}function Uf(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Q7={cwd:C7};function C7(){return"/"}function Gx(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function E7(t){if(typeof t=="string")t=new URL(t);else if(!Gx(t)){const e=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw e.code="ERR_INVALID_ARG_TYPE",e}if(t.protocol!=="file:"){const e=new TypeError("The URL must be of scheme file");throw e.code="ERR_INVALID_URL_SCHEME",e}return A7(t)}function A7(t){if(t.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const e=t.pathname;let n=-1;for(;++n<e.length;)if(e.codePointAt(n)===37&&e.codePointAt(n+1)===50){const i=e.codePointAt(n+2);if(i===70||i===102){const r=new TypeError("File URL path must not include encoded / characters");throw r.code="ERR_INVALID_FILE_URL_PATH",r}}return decodeURIComponent(e)}const cb=["history","path","basename","stem","extname","dirname"];class j${constructor(e){let n;e?Gx(e)?n={path:e}:typeof e=="string"||R7(e)?n={value:e}:n=e:n={},this.cwd="cwd"in n?"":Q7.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<cb.length;){const s=cb[i];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let r;for(r in n)cb.includes(r)||(this[r]=n[r])}get basename(){return typeof this.path=="string"?Tr.basename(this.path):void 0}set basename(e){hb(e,"basename"),ub(e,"basename"),this.path=Tr.join(this.dirname||"",e)}get dirname(){return typeof this.path=="string"?Tr.dirname(this.path):void 0}set dirname(e){YQ(this.basename,"dirname"),this.path=Tr.join(e||"",this.basename)}get extname(){return typeof this.path=="string"?Tr.extname(this.path):void 0}set extname(e){if(ub(e,"extname"),YQ(this.dirname,"extname"),e){if(e.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(e.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Tr.join(this.dirname,this.stem+(e||""))}get path(){return this.history[this.history.length-1]}set path(e){Gx(e)&&(e=E7(e)),hb(e,"path"),this.path!==e&&this.history.push(e)}get stem(){return typeof this.path=="string"?Tr.basename(this.path,this.extname):void 0}set stem(e){hb(e,"stem"),ub(e,"stem"),this.path=Tr.join(this.dirname||"",e+(this.extname||""))}fail(e,n,i){const r=this.message(e,n,i);throw r.fatal=!0,r}info(e,n,i){const r=this.message(e,n,i);return r.fatal=void 0,r}message(e,n,i){const r=new Qn(e,n,i);return this.path&&(r.name=this.path+":"+r.name,r.file=this.path),r.fatal=!1,this.messages.push(r),r}toString(e){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(e||void 0).decode(this.value)}}function ub(t,e){if(t&&t.includes(Tr.sep))throw new Error("`"+e+"` cannot be a path: did not expect `"+Tr.sep+"`")}function hb(t,e){if(!t)throw new Error("`"+e+"` cannot be empty")}function YQ(t,e){if(!t)throw new Error("Setting `"+e+"` requires `path` to be set too")}function R7(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const $7=(function(t){const i=this.constructor.prototype,r=i[t],s=function(){return r.apply(s,arguments)};return Object.setPrototypeOf(s,i),s}),L7={}.hasOwnProperty;class Gv extends $7{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=x7()}copy(){const e=new Gv;let n=-1;for(;++n<this.attachers.length;){const i=this.attachers[n];e.use(...i)}return e.data(lb(!0,{},this.namespace)),e}data(e,n){return typeof e=="string"?arguments.length===2?(pb("data",this.frozen),this.namespace[e]=n,this):L7.call(this.namespace,e)&&this.namespace[e]||void 0:e?(pb("data",this.frozen),this.namespace=e,this):this.namespace}freeze(){if(this.frozen)return this;const e=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const r=n.call(e,...i);typeof r=="function"&&this.transformers.use(r)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(e){this.freeze();const n=Ap(e),i=this.parser||this.Parser;return fb("parse",i),i(String(n),n)}process(e,n){const i=this;return this.freeze(),fb("process",this.parser||this.Parser),db("process",this.compiler||this.Compiler),n?r(void 0,n):new Promise(r);function r(s,o){const l=Ap(e),c=i.parse(l);i.run(c,l,function(d,p,g){if(d||!p||!g)return h(d);const O=p,x=i.stringify(O,g);j7(x)?g.value=x:g.result=x,h(d,g)});function h(d,p){d||!p?o(d):s?s(p):n(void 0,p)}}}processSync(e){let n=!1,i;return this.freeze(),fb("processSync",this.parser||this.Parser),db("processSync",this.compiler||this.Compiler),this.process(e,r),WQ("processSync","process",n),i;function r(s,o){n=!0,qQ(s),i=o}}run(e,n,i){GQ(e),this.freeze();const r=this.transformers;return!i&&typeof n=="function"&&(i=n,n=void 0),i?s(void 0,i):new Promise(s);function s(o,l){const c=Ap(n);r.run(e,c,h);function h(d,p,g){const O=p||e;d?l(d):o?o(O):i(void 0,O,g)}}}runSync(e,n){let i=!1,r;return this.run(e,n,s),WQ("runSync","run",i),r;function s(o,l){qQ(o),r=l,i=!0}}stringify(e,n){this.freeze();const i=Ap(n),r=this.compiler||this.Compiler;return db("stringify",r),GQ(e),r(e,i)}use(e,...n){const i=this.attachers,r=this.namespace;if(pb("use",this.frozen),e!=null)if(typeof e=="function")c(e,n);else if(typeof e=="object")Array.isArray(e)?l(e):o(e);else throw new TypeError("Expected usable value, not `"+e+"`");return this;function s(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[d,...p]=h;c(d,p)}else o(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function o(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(h.plugins),h.settings&&(r.settings=lb(!0,r.settings,h.settings))}function l(h){let d=-1;if(h!=null)if(Array.isArray(h))for(;++d<h.length;){const p=h[d];s(p)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,d){let p=-1,g=-1;for(;++p<i.length;)if(i[p][0]===h){g=p;break}if(g===-1)i.push([h,...d]);else if(d.length>0){let[O,...x]=d;const S=i[g][1];Yx(S)&&Yx(O)&&(O=lb(!0,S,O)),i[g]=[h,O,...x]}}}}const M7=new Gv().freeze();function fb(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function db(t,e){if(typeof e!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function pb(t,e){if(e)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GQ(t){if(!Yx(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function WQ(t,e,n){if(!n)throw new Error("`"+t+"` finished async. Use `"+e+"` instead")}function Ap(t){return D7(t)?t:new j$(t)}function D7(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function j7(t){return typeof t=="string"||N7(t)}function N7(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const z7="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",HQ=[],FQ={allowDangerousHtml:!0},I7=/^(https?|ircs?|mailto|xmpp)$/i,X7=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function V7(t){const e=B7(t),n=Z7(t);return q7(e.runSync(e.parse(n),n),t)}function B7(t){const e=t.rehypePlugins||HQ,n=t.remarkPlugins||HQ,i=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...FQ}:FQ;return M7().use(_9).use(n).use(O7,i).use(e)}function Z7(t){const e=t.children||"",n=new j$;return typeof e=="string"&&(n.value=e),n}function q7(t,e){const n=e.allowedElements,i=e.allowElement,r=e.components,s=e.disallowedElements,o=e.skipHtml,l=e.unwrapDisallowed,c=e.urlTransform||U7;for(const d of X7)Object.hasOwn(e,d.from)&&(""+d.from+(d.to?"use `"+d.to+"` instead":"remove it")+z7+d.id,void 0);return Yv(t,h),oq(t,{Fragment:v.Fragment,components:r,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(d,p,g){if(d.type==="raw"&&g&&typeof p=="number")return o?g.children.splice(p,1):g.children[p]={type:"text",value:d.value},p;if(d.type==="element"){let O;for(O in rb)if(Object.hasOwn(rb,O)&&Object.hasOwn(d.properties,O)){const x=d.properties[O],S=rb[O];(S===null||S.includes(d.tagName))&&(d.properties[O]=c(String(x||""),O,d))}}if(d.type==="element"){let O=n?!n.includes(d.tagName):s?s.includes(d.tagName):!1;if(!O&&i&&typeof p=="number"&&(O=!i(d,p,g)),O&&g&&typeof p=="number")return l&&d.children?g.children.splice(p,1,...d.children):g.children.splice(p,1),p}}}function U7(t){const e=t.indexOf(":"),n=t.indexOf("?"),i=t.indexOf("#"),r=t.indexOf("/");return e===-1||r!==-1&&e>r||n!==-1&&e>n||i!==-1&&e>i||I7.test(t.slice(0,e))?t:""}function Um(t,e){const n=String(t);if(typeof e!="string")throw new TypeError("Expected character");let i=0,r=n.indexOf(e);for(;r!==-1;)i++,r=n.indexOf(e,r+e.length);return i}function Y7(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function G7(t,e,n){const r=Hg((n||{}).ignore||[]),s=W7(e);let o=-1;for(;++o<s.length;)D$(t,"text",l);function l(h,d){let p=-1,g;for(;++p<d.length;){const O=d[p],x=g?g.children:void 0;if(r(O,x?x.indexOf(O):void 0,g))return;g=O}if(g)return c(h,d)}function c(h,d){const p=d[d.length-1],g=s[o][0],O=s[o][1];let x=0;const _=p.children.indexOf(h);let k=!1,P=[];g.lastIndex=0;let Q=g.exec(h.value);for(;Q;){const R=Q.index,$={index:Q.index,input:Q.input,stack:[...d,h]};let C=O(...Q,$);if(typeof C=="string"&&(C=C.length>0?{type:"text",value:C}:void 0),C===!1?g.lastIndex=R+1:(x!==R&&P.push({type:"text",value:h.value.slice(x,R)}),Array.isArray(C)?P.push(...C):C&&P.push(C),x=R+Q[0].length,k=!0),!g.global)break;Q=g.exec(h.value)}return k?(x<h.value.length&&P.push({type:"text",value:h.value.slice(x)}),p.children.splice(_,1,...P)):P=[h],_+P.length}}function W7(t){const e=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!t[0]||Array.isArray(t[0])?t:[t];let i=-1;for(;++i<n.length;){const r=n[i];e.push([H7(r[0]),F7(r[1])])}return e}function H7(t){return typeof t=="string"?new RegExp(Y7(t),"g"):t}function F7(t){return typeof t=="function"?t:function(){return t}}const mb="phrasing",gb=["autolink","link","image","label"];function K7(){return{transforms:[s8],enter:{literalAutolink:e8,literalAutolinkEmail:Ob,literalAutolinkHttp:Ob,literalAutolinkWww:Ob},exit:{literalAutolink:r8,literalAutolinkEmail:i8,literalAutolinkHttp:t8,literalAutolinkWww:n8}}}function J7(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:mb,notInConstruct:gb},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:mb,notInConstruct:gb},{character:":",before:"[ps]",after:"\\/",inConstruct:mb,notInConstruct:gb}]}}function e8(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Ob(t){this.config.enter.autolinkProtocol.call(this,t)}function t8(t){this.config.exit.autolinkProtocol.call(this,t)}function n8(t){this.config.exit.data.call(this,t);const e=this.stack[this.stack.length-1];e.type,e.url="http://"+this.sliceSerialize(t)}function i8(t){this.config.exit.autolinkEmail.call(this,t)}function r8(t){this.exit(t)}function s8(t){G7(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,o8],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),a8]],{ignore:["link","linkReference"]})}function o8(t,e,n,i,r){let s="";if(!N$(r)||(/^w/i.test(e)&&(n=e+n,e="",s="http://"),!l8(n)))return!1;const o=c8(n+i);if(!o[0])return!1;const l={type:"link",title:null,url:s+e+o[0],children:[{type:"text",value:e+o[0]}]};return o[1]?[l,{type:"text",value:o[1]}]:l}function a8(t,e,n,i){return!N$(i,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+e+"@"+n,children:[{type:"text",value:e+"@"+n}]}}function l8(t){const e=t.split(".");return!(e.length<2||e[e.length-1]&&(/_/.test(e[e.length-1])||!/[a-zA-Z\d]/.test(e[e.length-1]))||e[e.length-2]&&(/_/.test(e[e.length-2])||!/[a-zA-Z\d]/.test(e[e.length-2])))}function c8(t){const e=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!e)return[t,void 0];t=t.slice(0,e.index);let n=e[0],i=n.indexOf(")");const r=Um(t,"(");let s=Um(t,")");for(;i!==-1&&r>s;)t+=n.slice(0,i+1),n=n.slice(i+1),i=n.indexOf(")"),s++;return[t,n]}function N$(t,e){const n=t.input.charCodeAt(t.index-1);return(t.index===0||Ha(n)||Yg(n))&&(!e||n!==47)}z$.peek=y8;function u8(){this.buffer()}function h8(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function f8(){this.buffer()}function d8(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function p8(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ur(this.sliceSerialize(t)).toLowerCase(),n.label=e}function m8(t){this.exit(t)}function g8(t){const e=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ur(this.sliceSerialize(t)).toLowerCase(),n.label=e}function O8(t){this.exit(t)}function y8(){return"["}function z$(t,e,n,i){const r=n.createTracker(i);let s=r.move("[^");const o=n.enter("footnoteReference"),l=n.enter("reference");return s+=r.move(n.safe(n.associationId(t),{after:"]",before:s})),l(),o(),s+=r.move("]"),s}function b8(){return{enter:{gfmFootnoteCallString:u8,gfmFootnoteCall:h8,gfmFootnoteDefinitionLabelString:f8,gfmFootnoteDefinition:d8},exit:{gfmFootnoteCallString:p8,gfmFootnoteCall:m8,gfmFootnoteDefinitionLabelString:g8,gfmFootnoteDefinition:O8}}}function x8(t){let e=!1;return t&&t.firstLineBlank&&(e=!0),{handlers:{footnoteDefinition:n,footnoteReference:z$},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(i,r,s,o){const l=s.createTracker(o);let c=l.move("[^");const h=s.enter("footnoteDefinition"),d=s.enter("label");return c+=l.move(s.safe(s.associationId(i),{before:c,after:"]"})),d(),c+=l.move("]:"),i.children&&i.children.length>0&&(l.shift(4),c+=l.move((e?`
297
+ `:" ")+s.indentLines(s.containerFlow(i,l.current()),e?I$:v8))),h(),c}}function v8(t,e,n){return e===0?t:I$(t,e,n)}function I$(t,e,n){return(n?"":" ")+t}const S8=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];X$.peek=T8;function _8(){return{canContainEols:["delete"],enter:{strikethrough:w8},exit:{strikethrough:P8}}}function k8(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:S8}],handlers:{delete:X$}}}function w8(t){this.enter({type:"delete",children:[]},t)}function P8(t){this.exit(t)}function X$(t,e,n,i){const r=n.createTracker(i),s=n.enter("strikethrough");let o=r.move("~~");return o+=n.containerPhrasing(t,{...r.current(),before:o,after:"~"}),o+=r.move("~~"),s(),o}function T8(){return"~"}function Q8(t){return t.length}function C8(t,e){const n=e||{},i=(n.align||[]).concat(),r=n.stringLength||Q8,s=[],o=[],l=[],c=[];let h=0,d=-1;for(;++d<t.length;){const S=[],_=[];let k=-1;for(t[d].length>h&&(h=t[d].length);++k<t[d].length;){const P=E8(t[d][k]);if(n.alignDelimiters!==!1){const Q=r(P);_[k]=Q,(c[k]===void 0||Q>c[k])&&(c[k]=Q)}S.push(P)}o[d]=S,l[d]=_}let p=-1;if(typeof i=="object"&&"length"in i)for(;++p<h;)s[p]=KQ(i[p]);else{const S=KQ(i);for(;++p<h;)s[p]=S}p=-1;const g=[],O=[];for(;++p<h;){const S=s[p];let _="",k="";S===99?(_=":",k=":"):S===108?_=":":S===114&&(k=":");let P=n.alignDelimiters===!1?1:Math.max(1,c[p]-_.length-k.length);const Q=_+"-".repeat(P)+k;n.alignDelimiters!==!1&&(P=_.length+P+k.length,P>c[p]&&(c[p]=P),O[p]=P),g[p]=Q}o.splice(1,0,g),l.splice(1,0,O),d=-1;const x=[];for(;++d<o.length;){const S=o[d],_=l[d];p=-1;const k=[];for(;++p<h;){const P=S[p]||"";let Q="",R="";if(n.alignDelimiters!==!1){const $=c[p]-(_[p]||0),C=s[p];C===114?Q=" ".repeat($):C===99?$%2?(Q=" ".repeat($/2+.5),R=" ".repeat($/2-.5)):(Q=" ".repeat($/2),R=Q):R=" ".repeat($)}n.delimiterStart!==!1&&!p&&k.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&P==="")&&(n.delimiterStart!==!1||p)&&k.push(" "),n.alignDelimiters!==!1&&k.push(Q),k.push(P),n.alignDelimiters!==!1&&k.push(R),n.padding!==!1&&k.push(" "),(n.delimiterEnd!==!1||p!==h-1)&&k.push("|")}x.push(n.delimiterEnd===!1?k.join("").replace(/ +$/,""):k.join(""))}return x.join(`
298
+ `)}function E8(t){return t==null?"":String(t)}function KQ(t){const e=typeof t=="string"?t.codePointAt(0):0;return e===67||e===99?99:e===76||e===108?108:e===82||e===114?114:0}const JQ={}.hasOwnProperty;function A8(t,e){const n=e||{};function i(r,...s){let o=i.invalid;const l=i.handlers;if(r&&JQ.call(r,t)){const c=String(r[t]);o=JQ.call(l,c)?l[c]:i.unknown}if(o)return o.call(this,r,...s)}return i.handlers=n.handlers||{},i.invalid=n.invalid,i.unknown=n.unknown,i}function R8(t,e,n,i){const r=n.enter("blockquote"),s=n.createTracker(i);s.move("> "),s.shift(2);const o=n.indentLines(n.containerFlow(t,s.current()),$8);return r(),o}function $8(t,e,n){return">"+(n?"":" ")+t}function L8(t,e){return eC(t,e.inConstruct,!0)&&!eC(t,e.notInConstruct,!1)}function eC(t,e,n){if(typeof e=="string"&&(e=[e]),!e||e.length===0)return n;let i=-1;for(;++i<e.length;)if(t.includes(e[i]))return!0;return!1}function tC(t,e,n,i){let r=-1;for(;++r<n.unsafe.length;)if(n.unsafe[r].character===`
299
+ `&&L8(n.stack,n.unsafe[r]))return/[ \t]/.test(i.before)?"":" ";return`\\
300
+ `}function M8(t,e){const n=String(t);let i=n.indexOf(e),r=i,s=0,o=0;if(typeof e!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===r?++s>o&&(o=s):s=1,r=i+e.length,i=n.indexOf(e,r);return o}function D8(t,e){return!!(e.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function j8(t){const e=t.options.fence||"`";if(e!=="`"&&e!=="~")throw new Error("Cannot serialize code with `"+e+"` for `options.fence`, expected `` ` `` or `~`");return e}function N8(t,e,n,i){const r=j8(n),s=t.value||"",o=r==="`"?"GraveAccent":"Tilde";if(D8(t,n)){const p=n.enter("codeIndented"),g=n.indentLines(s,z8);return p(),g}const l=n.createTracker(i),c=r.repeat(Math.max(M8(s,r)+1,3)),h=n.enter("codeFenced");let d=l.move(c);if(t.lang){const p=n.enter(`codeFencedLang${o}`);d+=l.move(n.safe(t.lang,{before:d,after:" ",encode:["`"],...l.current()})),p()}if(t.lang&&t.meta){const p=n.enter(`codeFencedMeta${o}`);d+=l.move(" "),d+=l.move(n.safe(t.meta,{before:d,after:`
301
+ `,encode:["`"],...l.current()})),p()}return d+=l.move(`
302
+ `),s&&(d+=l.move(s+`
303
+ `)),d+=l.move(c),h(),d}function z8(t,e,n){return(n?"":" ")+t}function Wv(t){const e=t.options.quote||'"';if(e!=='"'&&e!=="'")throw new Error("Cannot serialize title with `"+e+"` for `options.quote`, expected `\"`, or `'`");return e}function I8(t,e,n,i){const r=Wv(n),s=r==='"'?"Quote":"Apostrophe",o=n.enter("definition");let l=n.enter("label");const c=n.createTracker(i);let h=c.move("[");return h+=c.move(n.safe(n.associationId(t),{before:h,after:"]",...c.current()})),h+=c.move("]: "),l(),!t.url||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(t.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(l=n.enter("destinationRaw"),h+=c.move(n.safe(t.url,{before:h,after:t.title?" ":`
304
+ `,...c.current()}))),l(),t.title&&(l=n.enter(`title${s}`),h+=c.move(" "+r),h+=c.move(n.safe(t.title,{before:h,after:r,...c.current()})),h+=c.move(r),l()),o(),h}function X8(t){const e=t.options.emphasis||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize emphasis with `"+e+"` for `options.emphasis`, expected `*`, or `_`");return e}function sf(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ym(t,e,n){const i=Xc(t),r=Xc(e);return i===void 0?r===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:r===void 0?{inside:!1,outside:!1}:r===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}V$.peek=V8;function V$(t,e,n,i){const r=X8(n),s=n.enter("emphasis"),o=n.createTracker(i),l=o.move(r);let c=o.move(n.containerPhrasing(t,{after:r,before:l,...o.current()}));const h=c.charCodeAt(0),d=Ym(i.before.charCodeAt(i.before.length-1),h,r);d.inside&&(c=sf(h)+c.slice(1));const p=c.charCodeAt(c.length-1),g=Ym(i.after.charCodeAt(0),p,r);g.inside&&(c=c.slice(0,-1)+sf(p));const O=o.move(r);return s(),n.attentionEncodeSurroundingInfo={after:g.outside,before:d.outside},l+c+O}function V8(t,e,n){return n.options.emphasis||"*"}function B8(t,e){let n=!1;return Yv(t,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return n=!0,qx}),!!((!t.depth||t.depth<3)&&Iv(t)&&(e.options.setext||n))}function Z8(t,e,n,i){const r=Math.max(Math.min(6,t.depth||1),1),s=n.createTracker(i);if(B8(t,n)){const d=n.enter("headingSetext"),p=n.enter("phrasing"),g=n.containerPhrasing(t,{...s.current(),before:`
305
+ `,after:`
306
+ `});return p(),d(),g+`
307
+ `+(r===1?"=":"-").repeat(g.length-(Math.max(g.lastIndexOf("\r"),g.lastIndexOf(`
308
+ `))+1))}const o="#".repeat(r),l=n.enter("headingAtx"),c=n.enter("phrasing");s.move(o+" ");let h=n.containerPhrasing(t,{before:"# ",after:`
309
+ `,...s.current()});return/^[\t ]/.test(h)&&(h=sf(h.charCodeAt(0))+h.slice(1)),h=h?o+" "+h:o,n.options.closeAtx&&(h+=" "+o),c(),l(),h}B$.peek=q8;function B$(t){return t.value||""}function q8(){return"<"}Z$.peek=U8;function Z$(t,e,n,i){const r=Wv(n),s=r==='"'?"Quote":"Apostrophe",o=n.enter("image");let l=n.enter("label");const c=n.createTracker(i);let h=c.move("![");return h+=c.move(n.safe(t.alt,{before:h,after:"]",...c.current()})),h+=c.move("]("),l(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(l=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(t.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(l=n.enter("destinationRaw"),h+=c.move(n.safe(t.url,{before:h,after:t.title?" ":")",...c.current()}))),l(),t.title&&(l=n.enter(`title${s}`),h+=c.move(" "+r),h+=c.move(n.safe(t.title,{before:h,after:r,...c.current()})),h+=c.move(r),l()),h+=c.move(")"),o(),h}function U8(){return"!"}q$.peek=Y8;function q$(t,e,n,i){const r=t.referenceType,s=n.enter("imageReference");let o=n.enter("label");const l=n.createTracker(i);let c=l.move("![");const h=n.safe(t.alt,{before:c,after:"]",...l.current()});c+=l.move(h+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(t),{before:c,after:"]",...l.current()});return o(),n.stack=d,s(),r==="full"||!h||h!==p?c+=l.move(p+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function Y8(){return"!"}U$.peek=G8;function U$(t,e,n){let i=t.value||"",r="`",s=-1;for(;new RegExp("(^|[^`])"+r+"([^`]|$)").test(i);)r+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++s<n.unsafe.length;){const o=n.unsafe[s],l=n.compilePattern(o);let c;if(o.atBreak)for(;c=l.exec(i);){let h=c.index;i.charCodeAt(h)===10&&i.charCodeAt(h-1)===13&&h--,i=i.slice(0,h)+" "+i.slice(c.index+1)}}return r+i+r}function G8(){return"`"}function Y$(t,e){const n=Iv(t);return!!(!e.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(n===t.url||"mailto:"+n===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}G$.peek=W8;function G$(t,e,n,i){const r=Wv(n),s=r==='"'?"Quote":"Apostrophe",o=n.createTracker(i);let l,c;if(Y$(t,n)){const d=n.stack;n.stack=[],l=n.enter("autolink");let p=o.move("<");return p+=o.move(n.containerPhrasing(t,{before:p,after:">",...o.current()})),p+=o.move(">"),l(),n.stack=d,p}l=n.enter("link"),c=n.enter("label");let h=o.move("[");return h+=o.move(n.containerPhrasing(t,{before:h,after:"](",...o.current()})),h+=o.move("]("),c(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(c=n.enter("destinationLiteral"),h+=o.move("<"),h+=o.move(n.safe(t.url,{before:h,after:">",...o.current()})),h+=o.move(">")):(c=n.enter("destinationRaw"),h+=o.move(n.safe(t.url,{before:h,after:t.title?" ":")",...o.current()}))),c(),t.title&&(c=n.enter(`title${s}`),h+=o.move(" "+r),h+=o.move(n.safe(t.title,{before:h,after:r,...o.current()})),h+=o.move(r),c()),h+=o.move(")"),l(),h}function W8(t,e,n){return Y$(t,n)?"<":"["}W$.peek=H8;function W$(t,e,n,i){const r=t.referenceType,s=n.enter("linkReference");let o=n.enter("label");const l=n.createTracker(i);let c=l.move("[");const h=n.containerPhrasing(t,{before:c,after:"]",...l.current()});c+=l.move(h+"]["),o();const d=n.stack;n.stack=[],o=n.enter("reference");const p=n.safe(n.associationId(t),{before:c,after:"]",...l.current()});return o(),n.stack=d,s(),r==="full"||!h||h!==p?c+=l.move(p+"]"):r==="shortcut"?c=c.slice(0,-1):c+=l.move("]"),c}function H8(){return"["}function Hv(t){const e=t.options.bullet||"*";if(e!=="*"&&e!=="+"&&e!=="-")throw new Error("Cannot serialize items with `"+e+"` for `options.bullet`, expected `*`, `+`, or `-`");return e}function F8(t){const e=Hv(t),n=t.options.bulletOther;if(!n)return e==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===e)throw new Error("Expected `bullet` (`"+e+"`) and `bulletOther` (`"+n+"`) to be different");return n}function K8(t){const e=t.options.bulletOrdered||".";if(e!=="."&&e!==")")throw new Error("Cannot serialize items with `"+e+"` for `options.bulletOrdered`, expected `.` or `)`");return e}function H$(t){const e=t.options.rule||"*";if(e!=="*"&&e!=="-"&&e!=="_")throw new Error("Cannot serialize rules with `"+e+"` for `options.rule`, expected `*`, `-`, or `_`");return e}function J8(t,e,n,i){const r=n.enter("list"),s=n.bulletCurrent;let o=t.ordered?K8(n):Hv(n);const l=t.ordered?o==="."?")":".":F8(n);let c=e&&n.bulletLastUsed?o===n.bulletLastUsed:!1;if(!t.ordered){const d=t.children?t.children[0]:void 0;if((o==="*"||o==="-")&&d&&(!d.children||!d.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(c=!0),H$(n)===o&&d){let p=-1;for(;++p<t.children.length;){const g=t.children[p];if(g&&g.type==="listItem"&&g.children&&g.children[0]&&g.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(o=l),n.bulletCurrent=o;const h=n.containerFlow(t,i);return n.bulletLastUsed=o,n.bulletCurrent=s,r(),h}function eU(t){const e=t.options.listItemIndent||"one";if(e!=="tab"&&e!=="one"&&e!=="mixed")throw new Error("Cannot serialize items with `"+e+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return e}function tU(t,e,n,i){const r=eU(n);let s=n.bulletCurrent||Hv(n);e&&e.type==="list"&&e.ordered&&(s=(typeof e.start=="number"&&e.start>-1?e.start:1)+(n.options.incrementListMarker===!1?0:e.children.indexOf(t))+s);let o=s.length+1;(r==="tab"||r==="mixed"&&(e&&e.type==="list"&&e.spread||t.spread))&&(o=Math.ceil(o/4)*4);const l=n.createTracker(i);l.move(s+" ".repeat(o-s.length)),l.shift(o);const c=n.enter("listItem"),h=n.indentLines(n.containerFlow(t,l.current()),d);return c(),h;function d(p,g,O){return g?(O?"":" ".repeat(o))+p:(O?s:s+" ".repeat(o-s.length))+p}}function nU(t,e,n,i){const r=n.enter("paragraph"),s=n.enter("phrasing"),o=n.containerPhrasing(t,i);return s(),r(),o}const iU=Hg(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function rU(t,e,n,i){return(t.children.some(function(o){return iU(o)})?n.containerPhrasing:n.containerFlow).call(n,t,i)}function sU(t){const e=t.options.strong||"*";if(e!=="*"&&e!=="_")throw new Error("Cannot serialize strong with `"+e+"` for `options.strong`, expected `*`, or `_`");return e}F$.peek=oU;function F$(t,e,n,i){const r=sU(n),s=n.enter("strong"),o=n.createTracker(i),l=o.move(r+r);let c=o.move(n.containerPhrasing(t,{after:r,before:l,...o.current()}));const h=c.charCodeAt(0),d=Ym(i.before.charCodeAt(i.before.length-1),h,r);d.inside&&(c=sf(h)+c.slice(1));const p=c.charCodeAt(c.length-1),g=Ym(i.after.charCodeAt(0),p,r);g.inside&&(c=c.slice(0,-1)+sf(p));const O=o.move(r+r);return s(),n.attentionEncodeSurroundingInfo={after:g.outside,before:d.outside},l+c+O}function oU(t,e,n){return n.options.strong||"*"}function aU(t,e,n,i){return n.safe(t.value,i)}function lU(t){const e=t.options.ruleRepetition||3;if(e<3)throw new Error("Cannot serialize rules with repetition `"+e+"` for `options.ruleRepetition`, expected `3` or more");return e}function cU(t,e,n){const i=(H$(n)+(n.options.ruleSpaces?" ":"")).repeat(lU(n));return n.options.ruleSpaces?i.slice(0,-1):i}const K$={blockquote:R8,break:tC,code:N8,definition:I8,emphasis:V$,hardBreak:tC,heading:Z8,html:B$,image:Z$,imageReference:q$,inlineCode:U$,link:G$,linkReference:W$,list:J8,listItem:tU,paragraph:nU,root:rU,strong:F$,text:aU,thematicBreak:cU};function uU(){return{enter:{table:hU,tableData:nC,tableHeader:nC,tableRow:dU},exit:{codeText:pU,table:fU,tableData:yb,tableHeader:yb,tableRow:yb}}}function hU(t){const e=t._align;this.enter({type:"table",align:e.map(function(n){return n==="none"?null:n}),children:[]},t),this.data.inTable=!0}function fU(t){this.exit(t),this.data.inTable=void 0}function dU(t){this.enter({type:"tableRow",children:[]},t)}function yb(t){this.exit(t)}function nC(t){this.enter({type:"tableCell",children:[]},t)}function pU(t){let e=this.resume();this.data.inTable&&(e=e.replace(/\\([\\|])/g,mU));const n=this.stack[this.stack.length-1];n.type,n.value=e,this.exit(t)}function mU(t,e){return e==="|"?e:t}function gU(t){const e=t||{},n=e.tableCellPadding,i=e.tablePipeAlign,r=e.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
310
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:g,table:o,tableCell:c,tableRow:l}};function o(O,x,S,_){return h(d(O,S,_),O.align)}function l(O,x,S,_){const k=p(O,S,_),P=h([k]);return P.slice(0,P.indexOf(`
311
+ `))}function c(O,x,S,_){const k=S.enter("tableCell"),P=S.enter("phrasing"),Q=S.containerPhrasing(O,{..._,before:s,after:s});return P(),k(),Q}function h(O,x){return C8(O,{align:x,alignDelimiters:i,padding:n,stringLength:r})}function d(O,x,S){const _=O.children;let k=-1;const P=[],Q=x.enter("table");for(;++k<_.length;)P[k]=p(_[k],x,S);return Q(),P}function p(O,x,S){const _=O.children;let k=-1;const P=[],Q=x.enter("tableRow");for(;++k<_.length;)P[k]=c(_[k],O,x,S);return Q(),P}function g(O,x,S){let _=K$.inlineCode(O,x,S);return S.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function OU(){return{exit:{taskListCheckValueChecked:iC,taskListCheckValueUnchecked:iC,paragraph:bU}}}function yU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:xU}}}function iC(t){const e=this.stack[this.stack.length-2];e.type,e.checked=t.type==="taskListCheckValueChecked"}function bU(t){const e=this.stack[this.stack.length-2];if(e&&e.type==="listItem"&&typeof e.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const i=n.children[0];if(i&&i.type==="text"){const r=e.children;let s=-1,o;for(;++s<r.length;){const l=r[s];if(l.type==="paragraph"){o=l;break}}o===n&&(i.value=i.value.slice(1),i.value.length===0?n.children.shift():n.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,n.position.start=Object.assign({},i.position.start)))}}this.exit(t)}function xU(t,e,n,i){const r=t.children[0],s=typeof t.checked=="boolean"&&r&&r.type==="paragraph",o="["+(t.checked?"x":" ")+"] ",l=n.createTracker(i);s&&l.move(o);let c=K$.listItem(t,e,n,{...i,...l.current()});return s&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(d){return d+o}}function vU(){return[K7(),b8(),_8(),uU(),OU()]}function SU(t){return{extensions:[J7(),x8(t),k8(),gU(t),yU()]}}const _U={tokenize:CU,partial:!0},J$={tokenize:EU,partial:!0},eL={tokenize:AU,partial:!0},tL={tokenize:RU,partial:!0},kU={tokenize:$U,partial:!0},nL={name:"wwwAutolink",tokenize:TU,previous:rL},iL={name:"protocolAutolink",tokenize:QU,previous:sL},zs={name:"emailAutolink",tokenize:PU,previous:oL},Zr={};function wU(){return{text:Zr}}let Oa=48;for(;Oa<123;)Zr[Oa]=zs,Oa++,Oa===58?Oa=65:Oa===91&&(Oa=97);Zr[43]=zs;Zr[45]=zs;Zr[46]=zs;Zr[95]=zs;Zr[72]=[zs,iL];Zr[104]=[zs,iL];Zr[87]=[zs,nL];Zr[119]=[zs,nL];function PU(t,e,n){const i=this;let r,s;return o;function o(p){return!Wx(p)||!oL.call(i,i.previous)||Fv(i.events)?n(p):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),l(p))}function l(p){return Wx(p)?(t.consume(p),l):p===64?(t.consume(p),c):n(p)}function c(p){return p===46?t.check(kU,d,h)(p):p===45||p===95||Pn(p)?(s=!0,t.consume(p),c):d(p)}function h(p){return t.consume(p),r=!0,c}function d(p){return s&&r&&jn(i.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),e(p)):n(p)}}function TU(t,e,n){const i=this;return r;function r(o){return o!==87&&o!==119||!rL.call(i,i.previous)||Fv(i.events)?n(o):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(_U,t.attempt(J$,t.attempt(eL,s),n),n)(o))}function s(o){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),e(o)}}function QU(t,e,n){const i=this;let r="",s=!1;return o;function o(p){return(p===72||p===104)&&sL.call(i,i.previous)&&!Fv(i.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),r+=String.fromCodePoint(p),t.consume(p),l):n(p)}function l(p){if(jn(p)&&r.length<5)return r+=String.fromCodePoint(p),t.consume(p),l;if(p===58){const g=r.toLowerCase();if(g==="http"||g==="https")return t.consume(p),c}return n(p)}function c(p){return p===47?(t.consume(p),s?h:(s=!0,c)):n(p)}function h(p){return p===null||Bm(p)||_t(p)||Ha(p)||Yg(p)?n(p):t.attempt(J$,t.attempt(eL,d),n)(p)}function d(p){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),e(p)}}function CU(t,e,n){let i=0;return r;function r(o){return(o===87||o===119)&&i<3?(i++,t.consume(o),r):o===46&&i===3?(t.consume(o),s):n(o)}function s(o){return o===null?n(o):e(o)}}function EU(t,e,n){let i,r,s;return o;function o(h){return h===46||h===95?t.check(tL,c,l)(h):h===null||_t(h)||Ha(h)||h!==45&&Yg(h)?c(h):(s=!0,t.consume(h),o)}function l(h){return h===95?i=!0:(r=i,i=void 0),t.consume(h),o}function c(h){return r||i||!s?n(h):e(h)}}function AU(t,e){let n=0,i=0;return r;function r(o){return o===40?(n++,t.consume(o),r):o===41&&i<n?s(o):o===33||o===34||o===38||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===60||o===63||o===93||o===95||o===126?t.check(tL,e,s)(o):o===null||_t(o)||Ha(o)?e(o):(t.consume(o),r)}function s(o){return o===41&&i++,t.consume(o),r}}function RU(t,e,n){return i;function i(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(t.consume(l),i):l===38?(t.consume(l),s):l===93?(t.consume(l),r):l===60||l===null||_t(l)||Ha(l)?e(l):n(l)}function r(l){return l===null||l===40||l===91||_t(l)||Ha(l)?e(l):i(l)}function s(l){return jn(l)?o(l):n(l)}function o(l){return l===59?(t.consume(l),i):jn(l)?(t.consume(l),o):n(l)}}function $U(t,e,n){return i;function i(s){return t.consume(s),r}function r(s){return Pn(s)?n(s):e(s)}}function rL(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||_t(t)}function sL(t){return!jn(t)}function oL(t){return!(t===47||Wx(t))}function Wx(t){return t===43||t===45||t===46||t===95||Pn(t)}function Fv(t){let e=t.length,n=!1;for(;e--;){const i=t[e][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){n=!0;break}if(i._gfmAutolinkLiteralWalkedInto){n=!1;break}}return t.length>0&&!n&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const LU={tokenize:VU,partial:!0};function MU(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zU,continuation:{tokenize:IU},exit:XU}},text:{91:{name:"gfmFootnoteCall",tokenize:NU},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:DU,resolveTo:jU}}}}function DU(t,e,n){const i=this;let r=i.events.length;const s=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let o;for(;r--;){const c=i.events[r][1];if(c.type==="labelImage"){o=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return l;function l(c){if(!o||!o._balanced)return n(c);const h=ur(i.sliceSerialize({start:o.end,end:i.now()}));return h.codePointAt(0)!==94||!s.includes(h.slice(1))?n(c):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(c),t.exit("gfmFootnoteCallLabelMarker"),e(c))}}function jU(t,e){let n=t.length;for(;n--;)if(t[n][1].type==="labelImage"&&t[n][0]==="enter"){t[n][1];break}t[n+1][1].type="data",t[n+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},t[n+3][1].start),end:Object.assign({},t[t.length-1][1].end)},r={type:"gfmFootnoteCallMarker",start:Object.assign({},t[n+3][1].end),end:Object.assign({},t[n+3][1].end)};r.end.column++,r.end.offset++,r.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},r.end),end:Object.assign({},t[t.length-1][1].start)},o={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},l=[t[n+1],t[n+2],["enter",i,e],t[n+3],t[n+4],["enter",r,e],["exit",r,e],["enter",s,e],["enter",o,e],["exit",o,e],["exit",s,e],t[t.length-2],t[t.length-1],["exit",i,e]];return t.splice(n,t.length-n+1,...l),t}function NU(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s=0,o;return l;function l(p){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),c}function c(p){return p!==94?n(p):(t.enter("gfmFootnoteCallMarker"),t.consume(p),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",h)}function h(p){if(s>999||p===93&&!o||p===null||p===91||_t(p))return n(p);if(p===93){t.exit("chunkString");const g=t.exit("gfmFootnoteCallString");return r.includes(ur(i.sliceSerialize(g)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(p),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),e):n(p)}return _t(p)||(o=!0),s++,t.consume(p),p===92?d:h}function d(p){return p===91||p===92||p===93?(t.consume(p),s++,h):h(p)}}function zU(t,e,n){const i=this,r=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let s,o=0,l;return c;function c(x){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(x){return x===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",d):n(x)}function d(x){if(o>999||x===93&&!l||x===null||x===91||_t(x))return n(x);if(x===93){t.exit("chunkString");const S=t.exit("gfmFootnoteDefinitionLabelString");return s=ur(i.sliceSerialize(S)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(x),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),g}return _t(x)||(l=!0),o++,t.consume(x),x===92?p:d}function p(x){return x===91||x===92||x===93?(t.consume(x),o++,d):d(x)}function g(x){return x===58?(t.enter("definitionMarker"),t.consume(x),t.exit("definitionMarker"),r.includes(s)||r.push(s),nt(t,O,"gfmFootnoteDefinitionWhitespace")):n(x)}function O(x){return e(x)}}function IU(t,e,n){return t.check(qf,e,t.attempt(LU,e,n))}function XU(t){t.exit("gfmFootnoteDefinition")}function VU(t,e,n){const i=this;return nt(t,r,"gfmFootnoteDefinitionIndent",5);function r(s){const o=i.events[i.events.length-1];return o&&o[1].type==="gfmFootnoteDefinitionIndent"&&o[2].sliceSerialize(o[1],!0).length===4?e(s):n(s)}}function BU(t){let n=(t||{}).singleTilde;const i={name:"strikethrough",tokenize:s,resolveAll:r};return n==null&&(n=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function r(o,l){let c=-1;for(;++c<o.length;)if(o[c][0]==="enter"&&o[c][1].type==="strikethroughSequenceTemporary"&&o[c][1]._close){let h=c;for(;h--;)if(o[h][0]==="exit"&&o[h][1].type==="strikethroughSequenceTemporary"&&o[h][1]._open&&o[c][1].end.offset-o[c][1].start.offset===o[h][1].end.offset-o[h][1].start.offset){o[c][1].type="strikethroughSequence",o[h][1].type="strikethroughSequence";const d={type:"strikethrough",start:Object.assign({},o[h][1].start),end:Object.assign({},o[c][1].end)},p={type:"strikethroughText",start:Object.assign({},o[h][1].end),end:Object.assign({},o[c][1].start)},g=[["enter",d,l],["enter",o[h][1],l],["exit",o[h][1],l],["enter",p,l]],O=l.parser.constructs.insideSpan.null;O&&wi(g,g.length,0,Gg(O,o.slice(h+1,c),l)),wi(g,g.length,0,[["exit",p,l],["enter",o[c][1],l],["exit",o[c][1],l],["exit",d,l]]),wi(o,h-1,c-h+3,g),c=h+g.length-2;break}}for(c=-1;++c<o.length;)o[c][1].type==="strikethroughSequenceTemporary"&&(o[c][1].type="data");return o}function s(o,l,c){const h=this.previous,d=this.events;let p=0;return g;function g(x){return h===126&&d[d.length-1][1].type!=="characterEscape"?c(x):(o.enter("strikethroughSequenceTemporary"),O(x))}function O(x){const S=Xc(h);if(x===126)return p>1?c(x):(o.consume(x),p++,O);if(p<2&&!n)return c(x);const _=o.exit("strikethroughSequenceTemporary"),k=Xc(x);return _._open=!k||k===2&&!!S,_._close=!S||S===2&&!!k,l(x)}}}class ZU{constructor(){this.map=[]}add(e,n,i){qU(this,e,n,i)}consume(e){if(this.map.sort(function(s,o){return s[0]-o[0]}),this.map.length===0)return;let n=this.map.length;const i=[];for(;n>0;)n-=1,i.push(e.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),e.length=this.map[n][0];i.push(e.slice()),e.length=0;let r=i.pop();for(;r;){for(const s of r)e.push(s);r=i.pop()}this.map.length=0}}function qU(t,e,n,i){let r=0;if(!(n===0&&i.length===0)){for(;r<t.map.length;){if(t.map[r][0]===e){t.map[r][1]+=n,t.map[r][2].push(...i);return}r+=1}t.map.push([e,n,i])}}function UU(t,e){let n=!1;const i=[];for(;e<t.length;){const r=t[e];if(n){if(r[0]==="enter")r[1].type==="tableContent"&&i.push(t[e+1][1].type==="tableDelimiterMarker"?"left":"none");else if(r[1].type==="tableContent"){if(t[e-1][1].type==="tableDelimiterMarker"){const s=i.length-1;i[s]=i[s]==="left"?"center":"right"}}else if(r[1].type==="tableDelimiterRow")break}else r[0]==="enter"&&r[1].type==="tableDelimiterRow"&&(n=!0);e+=1}return i}function YU(){return{flow:{null:{name:"table",tokenize:GU,resolveAll:WU}}}}function GU(t,e,n){const i=this;let r=0,s=0,o;return l;function l(M){let V=i.events.length-1;for(;V>-1;){const K=i.events[V][1].type;if(K==="lineEnding"||K==="linePrefix")V--;else break}const G=V>-1?i.events[V][1].type:null,J=G==="tableHead"||G==="tableRow"?C:c;return J===C&&i.parser.lazy[i.now().line]?n(M):J(M)}function c(M){return t.enter("tableHead"),t.enter("tableRow"),h(M)}function h(M){return M===124||(o=!0,s+=1),d(M)}function d(M){return M===null?n(M):Re(M)?s>1?(s=0,i.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),O):n(M):Ye(M)?nt(t,d,"whitespace")(M):(s+=1,o&&(o=!1,r+=1),M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),o=!0,d):(t.enter("data"),p(M)))}function p(M){return M===null||M===124||_t(M)?(t.exit("data"),d(M)):(t.consume(M),M===92?g:p)}function g(M){return M===92||M===124?(t.consume(M),p):p(M)}function O(M){return i.interrupt=!1,i.parser.lazy[i.now().line]?n(M):(t.enter("tableDelimiterRow"),o=!1,Ye(M)?nt(t,x,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):x(M))}function x(M){return M===45||M===58?_(M):M===124?(o=!0,t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),S):$(M)}function S(M){return Ye(M)?nt(t,_,"whitespace")(M):_(M)}function _(M){return M===58?(s+=1,o=!0,t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),k):M===45?(s+=1,k(M)):M===null||Re(M)?R(M):$(M)}function k(M){return M===45?(t.enter("tableDelimiterFiller"),P(M)):$(M)}function P(M){return M===45?(t.consume(M),P):M===58?(o=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(M),t.exit("tableDelimiterMarker"),Q):(t.exit("tableDelimiterFiller"),Q(M))}function Q(M){return Ye(M)?nt(t,R,"whitespace")(M):R(M)}function R(M){return M===124?x(M):M===null||Re(M)?!o||r!==s?$(M):(t.exit("tableDelimiterRow"),t.exit("tableHead"),e(M)):$(M)}function $(M){return n(M)}function C(M){return t.enter("tableRow"),D(M)}function D(M){return M===124?(t.enter("tableCellDivider"),t.consume(M),t.exit("tableCellDivider"),D):M===null||Re(M)?(t.exit("tableRow"),e(M)):Ye(M)?nt(t,D,"whitespace")(M):(t.enter("data"),Z(M))}function Z(M){return M===null||M===124||_t(M)?(t.exit("data"),D(M)):(t.consume(M),M===92?U:Z)}function U(M){return M===92||M===124?(t.consume(M),Z):Z(M)}}function WU(t,e){let n=-1,i=!0,r=0,s=[0,0,0,0],o=[0,0,0,0],l=!1,c=0,h,d,p;const g=new ZU;for(;++n<t.length;){const O=t[n],x=O[1];O[0]==="enter"?x.type==="tableHead"?(l=!1,c!==0&&(rC(g,e,c,h,d),d=void 0,c=0),h={type:"table",start:Object.assign({},x.start),end:Object.assign({},x.end)},g.add(n,0,[["enter",h,e]])):x.type==="tableRow"||x.type==="tableDelimiterRow"?(i=!0,p=void 0,s=[0,0,0,0],o=[0,n+1,0,0],l&&(l=!1,d={type:"tableBody",start:Object.assign({},x.start),end:Object.assign({},x.end)},g.add(n,0,[["enter",d,e]])),r=x.type==="tableDelimiterRow"?2:d?3:1):r&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")?(i=!1,o[2]===0&&(s[1]!==0&&(o[0]=o[1],p=Rp(g,e,s,r,void 0,p),s=[0,0,0,0]),o[2]=n)):x.type==="tableCellDivider"&&(i?i=!1:(s[1]!==0&&(o[0]=o[1],p=Rp(g,e,s,r,void 0,p)),s=o,o=[s[1],n,0,0])):x.type==="tableHead"?(l=!0,c=n):x.type==="tableRow"||x.type==="tableDelimiterRow"?(c=n,s[1]!==0?(o[0]=o[1],p=Rp(g,e,s,r,n,p)):o[1]!==0&&(p=Rp(g,e,o,r,n,p)),r=0):r&&(x.type==="data"||x.type==="tableDelimiterMarker"||x.type==="tableDelimiterFiller")&&(o[3]=n)}for(c!==0&&rC(g,e,c,h,d),g.consume(e.events),n=-1;++n<e.events.length;){const O=e.events[n];O[0]==="enter"&&O[1].type==="table"&&(O[1]._align=UU(e.events,n))}return t}function Rp(t,e,n,i,r,s){const o=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(s.end=Object.assign({},oc(e.events,n[0])),t.add(n[0],0,[["exit",s,e]]));const c=oc(e.events,n[1]);if(s={type:o,start:Object.assign({},c),end:Object.assign({},c)},t.add(n[1],0,[["enter",s,e]]),n[2]!==0){const h=oc(e.events,n[2]),d=oc(e.events,n[3]),p={type:l,start:Object.assign({},h),end:Object.assign({},d)};if(t.add(n[2],0,[["enter",p,e]]),i!==2){const g=e.events[n[2]],O=e.events[n[3]];if(g[1].end=Object.assign({},O[1].end),g[1].type="chunkText",g[1].contentType="text",n[3]>n[2]+1){const x=n[2]+1,S=n[3]-n[2]-1;t.add(x,S,[])}}t.add(n[3]+1,0,[["exit",p,e]])}return r!==void 0&&(s.end=Object.assign({},oc(e.events,r)),t.add(r,0,[["exit",s,e]]),s=void 0),s}function rC(t,e,n,i,r){const s=[],o=oc(e.events,n);r&&(r.end=Object.assign({},o),s.push(["exit",r,e])),i.end=Object.assign({},o),s.push(["exit",i,e]),t.add(n+1,0,s)}function oc(t,e){const n=t[e],i=n[0]==="enter"?"start":"end";return n[1][i]}const HU={name:"tasklistCheck",tokenize:KU};function FU(){return{text:{91:HU}}}function KU(t,e,n){const i=this;return r;function r(c){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?n(c):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),s)}function s(c){return _t(c)?(t.enter("taskListCheckValueUnchecked"),t.consume(c),t.exit("taskListCheckValueUnchecked"),o):c===88||c===120?(t.enter("taskListCheckValueChecked"),t.consume(c),t.exit("taskListCheckValueChecked"),o):n(c)}function o(c){return c===93?(t.enter("taskListCheckMarker"),t.consume(c),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),l):n(c)}function l(c){return Re(c)?e(c):Ye(c)?t.check({tokenize:JU},e,n)(c):n(c)}}function JU(t,e,n){return nt(t,i,"whitespace");function i(r){return r===null?n(r):e(r)}}function eY(t){return O$([wU(),MU(),BU(t),YU(),FU()])}const tY={};function nY(t){const e=this,n=t||tY,i=e.data(),r=i.micromarkExtensions||(i.micromarkExtensions=[]),s=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),o=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);r.push(eY(n)),s.push(vU()),o.push(SU(n))}const iY="modulepreload",rY=function(t){return"/"+t},sC={},T=function(e,n,i){let r=Promise.resolve();if(n&&n.length>0){let o=function(h){return Promise.all(h.map(d=>Promise.resolve(d).then(p=>({status:"fulfilled",value:p}),p=>({status:"rejected",reason:p}))))};document.getElementsByTagName("link");const l=document.querySelector("meta[property=csp-nonce]"),c=(l==null?void 0:l.nonce)||(l==null?void 0:l.getAttribute("nonce"));r=o(n.map(h=>{if(h=rY(h),h in sC)return;sC[h]=!0;const d=h.endsWith(".css"),p=d?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${h}"]${p}`))return;const g=document.createElement("link");if(g.rel=d?"stylesheet":iY,d||(g.as="script"),g.crossOrigin="",g.href=h,c&&g.setAttribute("nonce",c),document.head.appendChild(g),d)return new Promise((O,x)=>{g.addEventListener("load",O),g.addEventListener("error",()=>x(new Error(`Unable to preload CSS for ${h}`)))})}))}function s(o){const l=new Event("vite:preloadError",{cancelable:!0});if(l.payload=o,window.dispatchEvent(l),!l.defaultPrevented)throw o}return r.then(o=>{for(const l of o||[])l.status==="rejected"&&s(l.reason);return e().catch(s)})};let Gt=class extends Error{constructor(e){super(e),this.name="ShikiError"}};function sY(t){return Kv(t)}function Kv(t){return Array.isArray(t)?oY(t):t instanceof RegExp?t:typeof t=="object"?aY(t):t}function oY(t){let e=[];for(let n=0,i=t.length;n<i;n++)e[n]=Kv(t[n]);return e}function aY(t){let e={};for(let n in t)e[n]=Kv(t[n]);return e}function aL(t,...e){return e.forEach(n=>{for(let i in n)t[i]=n[i]}),t}function lL(t){const e=~t.lastIndexOf("/")||~t.lastIndexOf("\\");return e===0?t:~e===t.length-1?lL(t.substring(0,t.length-1)):t.substr(~e+1)}var bb=/\$(\d+)|\${(\d+):\/(downcase|upcase)}/g,$p=class{static hasCaptures(t){return t===null?!1:(bb.lastIndex=0,bb.test(t))}static replaceCaptures(t,e,n){return t.replace(bb,(i,r,s,o)=>{let l=n[parseInt(r||s,10)];if(l){let c=e.substring(l.start,l.end);for(;c[0]===".";)c=c.substring(1);switch(o){case"downcase":return c.toLowerCase();case"upcase":return c.toUpperCase();default:return c}}else return i})}};function cL(t,e){return t<e?-1:t>e?1:0}function uL(t,e){if(t===null&&e===null)return 0;if(!t)return-1;if(!e)return 1;let n=t.length,i=e.length;if(n===i){for(let r=0;r<n;r++){let s=cL(t[r],e[r]);if(s!==0)return s}return 0}return n-i}function oC(t){return!!(/^#[0-9a-f]{6}$/i.test(t)||/^#[0-9a-f]{8}$/i.test(t)||/^#[0-9a-f]{3}$/i.test(t)||/^#[0-9a-f]{4}$/i.test(t))}function hL(t){return t.replace(/[\-\\\{\}\*\+\?\|\^\$\.\,\[\]\(\)\#\s]/g,"\\$&")}var fL=class{constructor(t){ce(this,"cache",new Map);this.fn=t}get(t){if(this.cache.has(t))return this.cache.get(t);const e=this.fn(t);return this.cache.set(t,e),e}},Gm=class{constructor(t,e,n){ce(this,"_cachedMatchRoot",new fL(t=>this._root.match(t)));this._colorMap=t,this._defaults=e,this._root=n}static createFromRawTheme(t,e){return this.createFromParsedTheme(uY(t),e)}static createFromParsedTheme(t,e){return fY(t,e)}getColorMap(){return this._colorMap.getColorMap()}getDefaults(){return this._defaults}match(t){if(t===null)return this._defaults;const e=t.scopeName,i=this._cachedMatchRoot.get(e).find(r=>lY(t.parent,r.parentScopes));return i?new dL(i.fontStyle,i.foreground,i.background):null}},xb=class gm{constructor(e,n){this.parent=e,this.scopeName=n}static push(e,n){for(const i of n)e=new gm(e,i);return e}static from(...e){let n=null;for(let i=0;i<e.length;i++)n=new gm(n,e[i]);return n}push(e){return new gm(this,e)}getSegments(){let e=this;const n=[];for(;e;)n.push(e.scopeName),e=e.parent;return n.reverse(),n}toString(){return this.getSegments().join(" ")}extends(e){return this===e?!0:this.parent===null?!1:this.parent.extends(e)}getExtensionIfDefined(e){const n=[];let i=this;for(;i&&i!==e;)n.push(i.scopeName),i=i.parent;return i===e?n.reverse():void 0}};function lY(t,e){if(e.length===0)return!0;for(let n=0;n<e.length;n++){let i=e[n],r=!1;if(i===">"){if(n===e.length-1)return!1;i=e[++n],r=!0}for(;t&&!cY(t.scopeName,i);){if(r)return!1;t=t.parent}if(!t)return!1;t=t.parent}return!0}function cY(t,e){return e===t||t.startsWith(e)&&t[e.length]==="."}var dL=class{constructor(t,e,n){this.fontStyle=t,this.foregroundId=e,this.backgroundId=n}};function uY(t){if(!t)return[];if(!t.settings||!Array.isArray(t.settings))return[];let e=t.settings,n=[],i=0;for(let r=0,s=e.length;r<s;r++){let o=e[r];if(!o.settings)continue;let l;if(typeof o.scope=="string"){let p=o.scope;p=p.replace(/^[,]+/,""),p=p.replace(/[,]+$/,""),l=p.split(",")}else Array.isArray(o.scope)?l=o.scope:l=[""];let c=-1;if(typeof o.settings.fontStyle=="string"){c=0;let p=o.settings.fontStyle.split(" ");for(let g=0,O=p.length;g<O;g++)switch(p[g]){case"italic":c=c|1;break;case"bold":c=c|2;break;case"underline":c=c|4;break;case"strikethrough":c=c|8;break}}let h=null;typeof o.settings.foreground=="string"&&oC(o.settings.foreground)&&(h=o.settings.foreground);let d=null;typeof o.settings.background=="string"&&oC(o.settings.background)&&(d=o.settings.background);for(let p=0,g=l.length;p<g;p++){let x=l[p].trim().split(" "),S=x[x.length-1],_=null;x.length>1&&(_=x.slice(0,x.length-1),_.reverse()),n[i++]=new hY(S,_,r,c,h,d)}}return n}var hY=class{constructor(t,e,n,i,r,s){this.scope=t,this.parentScopes=e,this.index=n,this.fontStyle=i,this.foreground=r,this.background=s}},kn=(t=>(t[t.NotSet=-1]="NotSet",t[t.None=0]="None",t[t.Italic=1]="Italic",t[t.Bold=2]="Bold",t[t.Underline=4]="Underline",t[t.Strikethrough=8]="Strikethrough",t))(kn||{});function fY(t,e){t.sort((c,h)=>{let d=cL(c.scope,h.scope);return d!==0||(d=uL(c.parentScopes,h.parentScopes),d!==0)?d:c.index-h.index});let n=0,i="#000000",r="#ffffff";for(;t.length>=1&&t[0].scope==="";){let c=t.shift();c.fontStyle!==-1&&(n=c.fontStyle),c.foreground!==null&&(i=c.foreground),c.background!==null&&(r=c.background)}let s=new dY(e),o=new dL(n,s.getId(i),s.getId(r)),l=new mY(new Hx(0,null,-1,0,0),[]);for(let c=0,h=t.length;c<h;c++){let d=t[c];l.insert(0,d.scope,d.parentScopes,d.fontStyle,s.getId(d.foreground),s.getId(d.background))}return new Gm(s,o,l)}var dY=class{constructor(t){ce(this,"_isFrozen");ce(this,"_lastColorId");ce(this,"_id2color");ce(this,"_color2id");if(this._lastColorId=0,this._id2color=[],this._color2id=Object.create(null),Array.isArray(t)){this._isFrozen=!0;for(let e=0,n=t.length;e<n;e++)this._color2id[t[e]]=e,this._id2color[e]=t[e]}else this._isFrozen=!1}getId(t){if(t===null)return 0;t=t.toUpperCase();let e=this._color2id[t];if(e)return e;if(this._isFrozen)throw new Error(`Missing color in color map - ${t}`);return e=++this._lastColorId,this._color2id[t]=e,this._id2color[e]=t,e}getColorMap(){return this._id2color.slice(0)}},pY=Object.freeze([]),Hx=class pL{constructor(e,n,i,r,s){ce(this,"scopeDepth");ce(this,"parentScopes");ce(this,"fontStyle");ce(this,"foreground");ce(this,"background");this.scopeDepth=e,this.parentScopes=n||pY,this.fontStyle=i,this.foreground=r,this.background=s}clone(){return new pL(this.scopeDepth,this.parentScopes,this.fontStyle,this.foreground,this.background)}static cloneArr(e){let n=[];for(let i=0,r=e.length;i<r;i++)n[i]=e[i].clone();return n}acceptOverwrite(e,n,i,r){this.scopeDepth>e?console.log("how did this happen?"):this.scopeDepth=e,n!==-1&&(this.fontStyle=n),i!==0&&(this.foreground=i),r!==0&&(this.background=r)}},mY=class Fx{constructor(e,n=[],i={}){ce(this,"_rulesWithParentScopes");this._mainRule=e,this._children=i,this._rulesWithParentScopes=n}static _cmpBySpecificity(e,n){if(e.scopeDepth!==n.scopeDepth)return n.scopeDepth-e.scopeDepth;let i=0,r=0;for(;e.parentScopes[i]===">"&&i++,n.parentScopes[r]===">"&&r++,!(i>=e.parentScopes.length||r>=n.parentScopes.length);){const s=n.parentScopes[r].length-e.parentScopes[i].length;if(s!==0)return s;i++,r++}return n.parentScopes.length-e.parentScopes.length}match(e){if(e!==""){let i=e.indexOf("."),r,s;if(i===-1?(r=e,s=""):(r=e.substring(0,i),s=e.substring(i+1)),this._children.hasOwnProperty(r))return this._children[r].match(s)}const n=this._rulesWithParentScopes.concat(this._mainRule);return n.sort(Fx._cmpBySpecificity),n}insert(e,n,i,r,s,o){if(n===""){this._doInsertHere(e,i,r,s,o);return}let l=n.indexOf("."),c,h;l===-1?(c=n,h=""):(c=n.substring(0,l),h=n.substring(l+1));let d;this._children.hasOwnProperty(c)?d=this._children[c]:(d=new Fx(this._mainRule.clone(),Hx.cloneArr(this._rulesWithParentScopes)),this._children[c]=d),d.insert(e+1,h,i,r,s,o)}_doInsertHere(e,n,i,r,s){if(n===null){this._mainRule.acceptOverwrite(e,i,r,s);return}for(let o=0,l=this._rulesWithParentScopes.length;o<l;o++){let c=this._rulesWithParentScopes[o];if(uL(c.parentScopes,n)===0){c.acceptOverwrite(e,i,r,s);return}}i===-1&&(i=this._mainRule.fontStyle),r===0&&(r=this._mainRule.foreground),s===0&&(s=this._mainRule.background),this._rulesWithParentScopes.push(new Hx(e,n,i,r,s))}},Vc=class Ni{static toBinaryStr(e){return e.toString(2).padStart(32,"0")}static print(e){const n=Ni.getLanguageId(e),i=Ni.getTokenType(e),r=Ni.getFontStyle(e),s=Ni.getForeground(e),o=Ni.getBackground(e);console.log({languageId:n,tokenType:i,fontStyle:r,foreground:s,background:o})}static getLanguageId(e){return(e&255)>>>0}static getTokenType(e){return(e&768)>>>8}static containsBalancedBrackets(e){return(e&1024)!==0}static getFontStyle(e){return(e&30720)>>>11}static getForeground(e){return(e&16744448)>>>15}static getBackground(e){return(e&4278190080)>>>24}static set(e,n,i,r,s,o,l){let c=Ni.getLanguageId(e),h=Ni.getTokenType(e),d=Ni.containsBalancedBrackets(e)?1:0,p=Ni.getFontStyle(e),g=Ni.getForeground(e),O=Ni.getBackground(e);return n!==0&&(c=n),i!==8&&(h=i),r!==null&&(d=r?1:0),s!==-1&&(p=s),o!==0&&(g=o),l!==0&&(O=l),(c<<0|h<<8|d<<10|p<<11|g<<15|O<<24)>>>0}};function Wm(t,e){const n=[],i=gY(t);let r=i.next();for(;r!==null;){let c=0;if(r.length===2&&r.charAt(1)===":"){switch(r.charAt(0)){case"R":c=1;break;case"L":c=-1;break;default:console.log(`Unknown priority ${r} in scope selector`)}r=i.next()}let h=o();if(n.push({matcher:h,priority:c}),r!==",")break;r=i.next()}return n;function s(){if(r==="-"){r=i.next();const c=s();return h=>!!c&&!c(h)}if(r==="("){r=i.next();const c=l();return r===")"&&(r=i.next()),c}if(aC(r)){const c=[];do c.push(r),r=i.next();while(aC(r));return h=>e(c,h)}return null}function o(){const c=[];let h=s();for(;h;)c.push(h),h=s();return d=>c.every(p=>p(d))}function l(){const c=[];let h=o();for(;h&&(c.push(h),r==="|"||r===",");){do r=i.next();while(r==="|"||r===",");h=o()}return d=>c.some(p=>p(d))}}function aC(t){return!!t&&!!t.match(/[\w\.:]+/)}function gY(t){let e=/([LR]:|[\w\.:][\w\.:\-]*|[\,\|\-\(\)])/g,n=e.exec(t);return{next:()=>{if(!n)return null;const i=n[0];return n=e.exec(t),i}}}function mL(t){typeof t.dispose=="function"&&t.dispose()}var of=class{constructor(t){this.scopeName=t}toKey(){return this.scopeName}},OY=class{constructor(t,e){this.scopeName=t,this.ruleName=e}toKey(){return`${this.scopeName}#${this.ruleName}`}},yY=class{constructor(){ce(this,"_references",[]);ce(this,"_seenReferenceKeys",new Set);ce(this,"visitedRule",new Set)}get references(){return this._references}add(t){const e=t.toKey();this._seenReferenceKeys.has(e)||(this._seenReferenceKeys.add(e),this._references.push(t))}},bY=class{constructor(t,e){ce(this,"seenFullScopeRequests",new Set);ce(this,"seenPartialScopeRequests",new Set);ce(this,"Q");this.repo=t,this.initialScopeName=e,this.seenFullScopeRequests.add(this.initialScopeName),this.Q=[new of(this.initialScopeName)]}processQueue(){const t=this.Q;this.Q=[];const e=new yY;for(const n of t)xY(n,this.initialScopeName,this.repo,e);for(const n of e.references)if(n instanceof of){if(this.seenFullScopeRequests.has(n.scopeName))continue;this.seenFullScopeRequests.add(n.scopeName),this.Q.push(n)}else{if(this.seenFullScopeRequests.has(n.scopeName)||this.seenPartialScopeRequests.has(n.toKey()))continue;this.seenPartialScopeRequests.add(n.toKey()),this.Q.push(n)}}};function xY(t,e,n,i){const r=n.lookup(t.scopeName);if(!r){if(t.scopeName===e)throw new Error(`No grammar provided for <${e}>`);return}const s=n.lookup(e);t instanceof of?Om({baseGrammar:s,selfGrammar:r},i):Kx(t.ruleName,{baseGrammar:s,selfGrammar:r,repository:r.repository},i);const o=n.injections(t.scopeName);if(o)for(const l of o)i.add(new of(l))}function Kx(t,e,n){if(e.repository&&e.repository[t]){const i=e.repository[t];Hm([i],e,n)}}function Om(t,e){t.selfGrammar.patterns&&Array.isArray(t.selfGrammar.patterns)&&Hm(t.selfGrammar.patterns,{...t,repository:t.selfGrammar.repository},e),t.selfGrammar.injections&&Hm(Object.values(t.selfGrammar.injections),{...t,repository:t.selfGrammar.repository},e)}function Hm(t,e,n){for(const i of t){if(n.visitedRule.has(i))continue;n.visitedRule.add(i);const r=i.repository?aL({},e.repository,i.repository):e.repository;Array.isArray(i.patterns)&&Hm(i.patterns,{...e,repository:r},n);const s=i.include;if(!s)continue;const o=gL(s);switch(o.kind){case 0:Om({...e,selfGrammar:e.baseGrammar},n);break;case 1:Om(e,n);break;case 2:Kx(o.ruleName,{...e,repository:r},n);break;case 3:case 4:const l=o.scopeName===e.selfGrammar.scopeName?e.selfGrammar:o.scopeName===e.baseGrammar.scopeName?e.baseGrammar:void 0;if(l){const c={baseGrammar:e.baseGrammar,selfGrammar:l,repository:r};o.kind===4?Kx(o.ruleName,c,n):Om(c,n)}else o.kind===4?n.add(new OY(o.scopeName,o.ruleName)):n.add(new of(o.scopeName));break}}}var vY=class{constructor(){ce(this,"kind",0)}},SY=class{constructor(){ce(this,"kind",1)}},_Y=class{constructor(t){ce(this,"kind",2);this.ruleName=t}},kY=class{constructor(t){ce(this,"kind",3);this.scopeName=t}},wY=class{constructor(t,e){ce(this,"kind",4);this.scopeName=t,this.ruleName=e}};function gL(t){if(t==="$base")return new vY;if(t==="$self")return new SY;const e=t.indexOf("#");if(e===-1)return new kY(t);if(e===0)return new _Y(t.substring(1));{const n=t.substring(0,e),i=t.substring(e+1);return new wY(n,i)}}var PY=/\\(\d+)/,lC=/\\(\d+)/g,TY=-1,OL=-2;var Yf=class{constructor(e,n,i,r){ce(this,"$location");ce(this,"id");ce(this,"_nameIsCapturing");ce(this,"_name");ce(this,"_contentNameIsCapturing");ce(this,"_contentName");this.$location=e,this.id=n,this._name=i||null,this._nameIsCapturing=$p.hasCaptures(this._name),this._contentName=r||null,this._contentNameIsCapturing=$p.hasCaptures(this._contentName)}get debugName(){const e=this.$location?`${lL(this.$location.filename)}:${this.$location.line}`:"unknown";return`${this.constructor.name}#${this.id} @ ${e}`}getName(e,n){return!this._nameIsCapturing||this._name===null||e===null||n===null?this._name:$p.replaceCaptures(this._name,e,n)}getContentName(e,n){return!this._contentNameIsCapturing||this._contentName===null?this._contentName:$p.replaceCaptures(this._contentName,e,n)}},QY=class extends Yf{constructor(e,n,i,r,s){super(e,n,i,r);ce(this,"retokenizeCapturedWithRuleId");this.retokenizeCapturedWithRuleId=s}dispose(){}collectPatterns(e,n){throw new Error("Not supported!")}compile(e,n){throw new Error("Not supported!")}compileAG(e,n,i,r){throw new Error("Not supported!")}},CY=class extends Yf{constructor(e,n,i,r,s){super(e,n,i,null);ce(this,"_match");ce(this,"captures");ce(this,"_cachedCompiledPatterns");this._match=new af(r,this.id),this.captures=s,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}get debugMatchRegExp(){return`${this._match.source}`}collectPatterns(e,n){n.push(this._match)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,i,r){return this._getCachedCompiledPatterns(e).compileAG(e,i,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new lf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},cC=class extends Yf{constructor(e,n,i,r,s){super(e,n,i,r);ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this.patterns=s.patterns,this.hasMissingPatterns=s.hasMissingPatterns,this._cachedCompiledPatterns=null}dispose(){this._cachedCompiledPatterns&&(this._cachedCompiledPatterns.dispose(),this._cachedCompiledPatterns=null)}collectPatterns(e,n){for(const i of this.patterns)e.getRule(i).collectPatterns(e,n)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,i,r){return this._getCachedCompiledPatterns(e).compileAG(e,i,r)}_getCachedCompiledPatterns(e){return this._cachedCompiledPatterns||(this._cachedCompiledPatterns=new lf,this.collectPatterns(e,this._cachedCompiledPatterns)),this._cachedCompiledPatterns}},Jx=class extends Yf{constructor(e,n,i,r,s,o,l,c,h,d){super(e,n,i,r);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"_end");ce(this,"endHasBackReferences");ce(this,"endCaptures");ce(this,"applyEndPatternLast");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");this._begin=new af(s,this.id),this.beginCaptures=o,this._end=new af(l||"￿",-1),this.endHasBackReferences=this._end.hasBackReferences,this.endCaptures=c,this.applyEndPatternLast=h||!1,this.patterns=d.patterns,this.hasMissingPatterns=d.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,n){return this._end.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e,n).compile(e)}compileAG(e,n,i,r){return this._getCachedCompiledPatterns(e,n).compileAG(e,i,r)}_getCachedCompiledPatterns(e,n){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new lf;for(const i of this.patterns)e.getRule(i).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,n):this._cachedCompiledPatterns.setSource(0,n)),this._cachedCompiledPatterns}},Fm=class extends Yf{constructor(e,n,i,r,s,o,l,c,h){super(e,n,i,r);ce(this,"_begin");ce(this,"beginCaptures");ce(this,"whileCaptures");ce(this,"_while");ce(this,"whileHasBackReferences");ce(this,"hasMissingPatterns");ce(this,"patterns");ce(this,"_cachedCompiledPatterns");ce(this,"_cachedCompiledWhilePatterns");this._begin=new af(s,this.id),this.beginCaptures=o,this.whileCaptures=c,this._while=new af(l,OL),this.whileHasBackReferences=this._while.hasBackReferences,this.patterns=h.patterns,this.hasMissingPatterns=h.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,n){return this._while.resolveBackReferences(e,n)}collectPatterns(e,n){n.push(this._begin)}compile(e,n){return this._getCachedCompiledPatterns(e).compile(e)}compileAG(e,n,i,r){return this._getCachedCompiledPatterns(e).compileAG(e,i,r)}_getCachedCompiledPatterns(e){if(!this._cachedCompiledPatterns){this._cachedCompiledPatterns=new lf;for(const n of this.patterns)e.getRule(n).collectPatterns(e,this._cachedCompiledPatterns)}return this._cachedCompiledPatterns}compileWhile(e,n){return this._getCachedCompiledWhilePatterns(e,n).compile(e)}compileWhileAG(e,n,i,r){return this._getCachedCompiledWhilePatterns(e,n).compileAG(e,i,r)}_getCachedCompiledWhilePatterns(e,n){return this._cachedCompiledWhilePatterns||(this._cachedCompiledWhilePatterns=new lf,this._cachedCompiledWhilePatterns.push(this._while.hasBackReferences?this._while.clone():this._while)),this._while.hasBackReferences&&this._cachedCompiledWhilePatterns.setSource(0,n||"￿"),this._cachedCompiledWhilePatterns}},yL=class Sn{static createCaptureRule(e,n,i,r,s){return e.registerRule(o=>new QY(n,o,i,r,s))}static getCompiledRuleId(e,n,i){return e.id||n.registerRule(r=>{if(e.id=r,e.match)return new CY(e.$vscodeTextmateLocation,e.id,e.name,e.match,Sn._compileCaptures(e.captures,n,i));if(typeof e.begin>"u"){e.repository&&(i=aL({},i,e.repository));let s=e.patterns;return typeof s>"u"&&e.include&&(s=[{include:e.include}]),new cC(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,Sn._compilePatterns(s,n,i))}return e.while?new Fm(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Sn._compileCaptures(e.beginCaptures||e.captures,n,i),e.while,Sn._compileCaptures(e.whileCaptures||e.captures,n,i),Sn._compilePatterns(e.patterns,n,i)):new Jx(e.$vscodeTextmateLocation,e.id,e.name,e.contentName,e.begin,Sn._compileCaptures(e.beginCaptures||e.captures,n,i),e.end,Sn._compileCaptures(e.endCaptures||e.captures,n,i),e.applyEndPatternLast,Sn._compilePatterns(e.patterns,n,i))}),e.id}static _compileCaptures(e,n,i){let r=[];if(e){let s=0;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const l=parseInt(o,10);l>s&&(s=l)}for(let o=0;o<=s;o++)r[o]=null;for(const o in e){if(o==="$vscodeTextmateLocation")continue;const l=parseInt(o,10);let c=0;e[o].patterns&&(c=Sn.getCompiledRuleId(e[o],n,i)),r[l]=Sn.createCaptureRule(n,e[o].$vscodeTextmateLocation,e[o].name,e[o].contentName,c)}}return r}static _compilePatterns(e,n,i){let r=[];if(e)for(let s=0,o=e.length;s<o;s++){const l=e[s];let c=-1;if(l.include){const h=gL(l.include);switch(h.kind){case 0:case 1:c=Sn.getCompiledRuleId(i[l.include],n,i);break;case 2:let d=i[h.ruleName];d&&(c=Sn.getCompiledRuleId(d,n,i));break;case 3:case 4:const p=h.scopeName,g=h.kind===4?h.ruleName:null,O=n.getExternalGrammar(p,i);if(O)if(g){let x=O.repository[g];x&&(c=Sn.getCompiledRuleId(x,n,O.repository))}else c=Sn.getCompiledRuleId(O.repository.$self,n,O.repository);break}}else c=Sn.getCompiledRuleId(l,n,i);if(c!==-1){const h=n.getRule(c);let d=!1;if((h instanceof cC||h instanceof Jx||h instanceof Fm)&&h.hasMissingPatterns&&h.patterns.length===0&&(d=!0),d)continue;r.push(c)}}return{patterns:r,hasMissingPatterns:(e?e.length:0)!==r.length}}},af=class bL{constructor(e,n){ce(this,"source");ce(this,"ruleId");ce(this,"hasAnchor");ce(this,"hasBackReferences");ce(this,"_anchorCache");if(e&&typeof e=="string"){const i=e.length;let r=0,s=[],o=!1;for(let l=0;l<i;l++)if(e.charAt(l)==="\\"&&l+1<i){const h=e.charAt(l+1);h==="z"?(s.push(e.substring(r,l)),s.push("$(?!\\n)(?<!\\n)"),r=l+2):(h==="A"||h==="G")&&(o=!0),l++}this.hasAnchor=o,r===0?this.source=e:(s.push(e.substring(r,i)),this.source=s.join(""))}else this.hasAnchor=!1,this.source=e;this.hasAnchor?this._anchorCache=this._buildAnchorCache():this._anchorCache=null,this.ruleId=n,typeof this.source=="string"?this.hasBackReferences=PY.test(this.source):this.hasBackReferences=!1}clone(){return new bL(this.source,this.ruleId)}setSource(e){this.source!==e&&(this.source=e,this.hasAnchor&&(this._anchorCache=this._buildAnchorCache()))}resolveBackReferences(e,n){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let i=n.map(r=>e.substring(r.start,r.end));return lC.lastIndex=0,this.source.replace(lC,(r,s)=>hL(i[parseInt(s,10)]||""))}_buildAnchorCache(){if(typeof this.source!="string")throw new Error("This method should only be called if the source is a string");let e=[],n=[],i=[],r=[],s,o,l,c;for(s=0,o=this.source.length;s<o;s++)l=this.source.charAt(s),e[s]=l,n[s]=l,i[s]=l,r[s]=l,l==="\\"&&s+1<o&&(c=this.source.charAt(s+1),c==="A"?(e[s+1]="￿",n[s+1]="￿",i[s+1]="A",r[s+1]="A"):c==="G"?(e[s+1]="￿",n[s+1]="G",i[s+1]="￿",r[s+1]="G"):(e[s+1]=c,n[s+1]=c,i[s+1]=c,r[s+1]=c),s++);return{A0_G0:e.join(""),A0_G1:n.join(""),A1_G0:i.join(""),A1_G1:r.join("")}}resolveAnchors(e,n){return!this.hasAnchor||!this._anchorCache||typeof this.source!="string"?this.source:e?n?this._anchorCache.A1_G1:this._anchorCache.A1_G0:n?this._anchorCache.A0_G1:this._anchorCache.A0_G0}},lf=class{constructor(){ce(this,"_items");ce(this,"_hasAnchors");ce(this,"_cached");ce(this,"_anchorCache");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(t){this._items.push(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}unshift(t){this._items.unshift(t),this._hasAnchors=this._hasAnchors||t.hasAnchor}length(){return this._items.length}setSource(t,e){this._items[t].source!==e&&(this._disposeCaches(),this._items[t].setSource(e))}compile(t){if(!this._cached){let e=this._items.map(n=>n.source);this._cached=new uC(t,e,this._items.map(n=>n.ruleId))}return this._cached}compileAG(t,e,n){return this._hasAnchors?e?n?(this._anchorCache.A1_G1||(this._anchorCache.A1_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G1):(this._anchorCache.A1_G0||(this._anchorCache.A1_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A1_G0):n?(this._anchorCache.A0_G1||(this._anchorCache.A0_G1=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G1):(this._anchorCache.A0_G0||(this._anchorCache.A0_G0=this._resolveAnchors(t,e,n)),this._anchorCache.A0_G0):this.compile(t)}_resolveAnchors(t,e,n){let i=this._items.map(r=>r.resolveAnchors(e,n));return new uC(t,i,this._items.map(r=>r.ruleId))}},uC=class{constructor(t,e,n){ce(this,"scanner");this.regExps=e,this.rules=n,this.scanner=t.createOnigScanner(e)}dispose(){typeof this.scanner.dispose=="function"&&this.scanner.dispose()}toString(){const t=[];for(let e=0,n=this.rules.length;e<n;e++)t.push(" - "+this.rules[e]+": "+this.regExps[e]);return t.join(`
312
+ `)}findNextMatchSync(t,e,n){const i=this.scanner.findNextMatchSync(t,e,n);return i?{ruleId:this.rules[i.index],captureIndices:i.captureIndices}:null}},vb=class{constructor(t,e){this.languageId=t,this.tokenType=e}},ws,EY=(ws=class{constructor(e,n){ce(this,"_defaultAttributes");ce(this,"_embeddedLanguagesMatcher");ce(this,"_getBasicScopeAttributes",new fL(e=>{const n=this._scopeToLanguage(e),i=this._toStandardTokenType(e);return new vb(n,i)}));this._defaultAttributes=new vb(e,8),this._embeddedLanguagesMatcher=new AY(Object.entries(n||{}))}getDefaultAttributes(){return this._defaultAttributes}getBasicScopeAttributes(e){return e===null?ws._NULL_SCOPE_METADATA:this._getBasicScopeAttributes.get(e)}_scopeToLanguage(e){return this._embeddedLanguagesMatcher.match(e)||0}_toStandardTokenType(e){const n=e.match(ws.STANDARD_TOKEN_TYPE_REGEXP);if(!n)return 8;switch(n[1]){case"comment":return 1;case"string":return 2;case"regex":return 3;case"meta.embedded":return 0}throw new Error("Unexpected match for standard token type!")}},ce(ws,"_NULL_SCOPE_METADATA",new vb(0,0)),ce(ws,"STANDARD_TOKEN_TYPE_REGEXP",/\b(comment|string|regex|meta\.embedded)\b/),ws),AY=class{constructor(t){ce(this,"values");ce(this,"scopesRegExp");if(t.length===0)this.values=null,this.scopesRegExp=null;else{this.values=new Map(t);const e=t.map(([n,i])=>hL(n));e.sort(),e.reverse(),this.scopesRegExp=new RegExp(`^((${e.join(")|(")}))($|\\.)`,"")}}match(t){if(!this.scopesRegExp)return;const e=t.match(this.scopesRegExp);if(e)return this.values.get(e[1])}},hC=class{constructor(t,e){this.stack=t,this.stoppedEarly=e}};function xL(t,e,n,i,r,s,o,l){const c=e.content.length;let h=!1,d=-1;if(o){const O=RY(t,e,n,i,r,s);r=O.stack,i=O.linePos,n=O.isFirstLine,d=O.anchorPosition}const p=Date.now();for(;!h;){if(l!==0&&Date.now()-p>l)return new hC(r,!0);g()}return new hC(r,!1);function g(){const O=$Y(t,e,n,i,r,d);if(!O){s.produce(r,c),h=!0;return}const x=O.captureIndices,S=O.matchedRuleId,_=x&&x.length>0?x[0].end>i:!1;if(S===TY){const k=r.getRule(t);s.produce(r,x[0].start),r=r.withContentNameScopesList(r.nameScopesList),Ph(t,e,n,r,s,k.endCaptures,x),s.produce(r,x[0].end);const P=r;if(r=r.parent,d=P.getAnchorPos(),!_&&P.getEnterPos()===i){r=P,s.produce(r,c),h=!0;return}}else{const k=t.getRule(S);s.produce(r,x[0].start);const P=r,Q=k.getName(e.content,x),R=r.contentNameScopesList.pushAttributed(Q,t);if(r=r.push(S,i,d,x[0].end===c,null,R,R),k instanceof Jx){const $=k;Ph(t,e,n,r,s,$.beginCaptures,x),s.produce(r,x[0].end),d=x[0].end;const C=$.getContentName(e.content,x),D=R.pushAttributed(C,t);if(r=r.withContentNameScopesList(D),$.endHasBackReferences&&(r=r.withEndRule($.getEndWithResolvedBackReferences(e.content,x))),!_&&P.hasSameRuleAs(r)){r=r.pop(),s.produce(r,c),h=!0;return}}else if(k instanceof Fm){const $=k;Ph(t,e,n,r,s,$.beginCaptures,x),s.produce(r,x[0].end),d=x[0].end;const C=$.getContentName(e.content,x),D=R.pushAttributed(C,t);if(r=r.withContentNameScopesList(D),$.whileHasBackReferences&&(r=r.withEndRule($.getWhileWithResolvedBackReferences(e.content,x))),!_&&P.hasSameRuleAs(r)){r=r.pop(),s.produce(r,c),h=!0;return}}else if(Ph(t,e,n,r,s,k.captures,x),s.produce(r,x[0].end),r=r.pop(),!_){r=r.safePop(),s.produce(r,c),h=!0;return}}x[0].end>i&&(i=x[0].end,n=!1)}}function RY(t,e,n,i,r,s){let o=r.beginRuleCapturedEOL?0:-1;const l=[];for(let c=r;c;c=c.pop()){const h=c.getRule(t);h instanceof Fm&&l.push({rule:h,stack:c})}for(let c=l.pop();c;c=l.pop()){const{ruleScanner:h,findOptions:d}=DY(c.rule,t,c.stack.endRule,n,i===o),p=h.findNextMatchSync(e,i,d);if(p){if(p.ruleId!==OL){r=c.stack.pop();break}p.captureIndices&&p.captureIndices.length&&(s.produce(c.stack,p.captureIndices[0].start),Ph(t,e,n,c.stack,s,c.rule.whileCaptures,p.captureIndices),s.produce(c.stack,p.captureIndices[0].end),o=p.captureIndices[0].end,p.captureIndices[0].end>i&&(i=p.captureIndices[0].end,n=!1))}else{r=c.stack.pop();break}}return{stack:r,linePos:i,anchorPosition:o,isFirstLine:n}}function $Y(t,e,n,i,r,s){const o=LY(t,e,n,i,r,s),l=t.getInjections();if(l.length===0)return o;const c=MY(l,t,e,n,i,r,s);if(!c)return o;if(!o)return c;const h=o.captureIndices[0].start,d=c.captureIndices[0].start;return d<h||c.priorityMatch&&d===h?c:o}function LY(t,e,n,i,r,s){const o=r.getRule(t),{ruleScanner:l,findOptions:c}=vL(o,t,r.endRule,n,i===s),h=l.findNextMatchSync(e,i,c);return h?{captureIndices:h.captureIndices,matchedRuleId:h.ruleId}:null}function MY(t,e,n,i,r,s,o){let l=Number.MAX_VALUE,c=null,h,d=0;const p=s.contentNameScopesList.getScopeNames();for(let g=0,O=t.length;g<O;g++){const x=t[g];if(!x.matcher(p))continue;const S=e.getRule(x.ruleId),{ruleScanner:_,findOptions:k}=vL(S,e,null,i,r===o),P=_.findNextMatchSync(n,r,k);if(!P)continue;const Q=P.captureIndices[0].start;if(!(Q>=l)&&(l=Q,c=P.captureIndices,h=P.ruleId,d=x.priority,l===r))break}return c?{priorityMatch:d===-1,captureIndices:c,matchedRuleId:h}:null}function vL(t,e,n,i,r){return{ruleScanner:t.compileAG(e,n,i,r),findOptions:0}}function DY(t,e,n,i,r){return{ruleScanner:t.compileWhileAG(e,n,i,r),findOptions:0}}function Ph(t,e,n,i,r,s,o){if(s.length===0)return;const l=e.content,c=Math.min(s.length,o.length),h=[],d=o[0].end;for(let p=0;p<c;p++){const g=s[p];if(g===null)continue;const O=o[p];if(O.length===0)continue;if(O.start>d)break;for(;h.length>0&&h[h.length-1].endPos<=O.start;)r.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop();if(h.length>0?r.produceFromScopes(h[h.length-1].scopes,O.start):r.produce(i,O.start),g.retokenizeCapturedWithRuleId){const S=g.getName(l,o),_=i.contentNameScopesList.pushAttributed(S,t),k=g.getContentName(l,o),P=_.pushAttributed(k,t),Q=i.push(g.retokenizeCapturedWithRuleId,O.start,-1,!1,null,_,P),R=t.createOnigString(l.substring(0,O.end));xL(t,R,n&&O.start===0,O.start,Q,r,!1,0),mL(R);continue}const x=g.getName(l,o);if(x!==null){const _=(h.length>0?h[h.length-1].scopes:i.contentNameScopesList).pushAttributed(x,t);h.push(new jY(_,O.end))}}for(;h.length>0;)r.produceFromScopes(h[h.length-1].scopes,h[h.length-1].endPos),h.pop()}var jY=class{constructor(t,e){ce(this,"scopes");ce(this,"endPos");this.scopes=t,this.endPos=e}};function NY(t,e,n,i,r,s,o,l){return new IY(t,e,n,i,r,s,o,l)}function fC(t,e,n,i,r){const s=Wm(e,Km),o=yL.getCompiledRuleId(n,i,r.repository);for(const l of s)t.push({debugSelector:e,matcher:l.matcher,ruleId:o,grammar:r,priority:l.priority})}function Km(t,e){if(e.length<t.length)return!1;let n=0;return t.every(i=>{for(let r=n;r<e.length;r++)if(zY(e[r],i))return n=r+1,!0;return!1})}function zY(t,e){if(!t)return!1;if(t===e)return!0;const n=e.length;return t.length>n&&t.substr(0,n)===e&&t[n]==="."}var IY=class{constructor(t,e,n,i,r,s,o,l){ce(this,"_rootId");ce(this,"_lastRuleId");ce(this,"_ruleId2desc");ce(this,"_includedGrammars");ce(this,"_grammarRepository");ce(this,"_grammar");ce(this,"_injections");ce(this,"_basicScopeAttributesProvider");ce(this,"_tokenTypeMatchers");if(this._rootScopeName=t,this.balancedBracketSelectors=s,this._onigLib=l,this._basicScopeAttributesProvider=new EY(n,i),this._rootId=-1,this._lastRuleId=0,this._ruleId2desc=[null],this._includedGrammars={},this._grammarRepository=o,this._grammar=dC(e,null),this._injections=null,this._tokenTypeMatchers=[],r)for(const c of Object.keys(r)){const h=Wm(c,Km);for(const d of h)this._tokenTypeMatchers.push({matcher:d.matcher,type:r[c]})}}get themeProvider(){return this._grammarRepository}dispose(){for(const t of this._ruleId2desc)t&&t.dispose()}createOnigScanner(t){return this._onigLib.createOnigScanner(t)}createOnigString(t){return this._onigLib.createOnigString(t)}getMetadataForScope(t){return this._basicScopeAttributesProvider.getBasicScopeAttributes(t)}_collectInjections(){const t={lookup:r=>r===this._rootScopeName?this._grammar:this.getExternalGrammar(r),injections:r=>this._grammarRepository.injections(r)},e=[],n=this._rootScopeName,i=t.lookup(n);if(i){const r=i.injections;if(r)for(let o in r)fC(e,o,r[o],this,i);const s=this._grammarRepository.injections(n);s&&s.forEach(o=>{const l=this.getExternalGrammar(o);if(l){const c=l.injectionSelector;c&&fC(e,c,l,this,l)}})}return e.sort((r,s)=>r.priority-s.priority),e}getInjections(){return this._injections===null&&(this._injections=this._collectInjections()),this._injections}registerRule(t){const e=++this._lastRuleId,n=t(e);return this._ruleId2desc[e]=n,n}getRule(t){return this._ruleId2desc[t]}getExternalGrammar(t,e){if(this._includedGrammars[t])return this._includedGrammars[t];if(this._grammarRepository){const n=this._grammarRepository.lookup(t);if(n)return this._includedGrammars[t]=dC(n,e&&e.$base),this._includedGrammars[t]}}tokenizeLine(t,e,n=0){const i=this._tokenize(t,e,!1,n);return{tokens:i.lineTokens.getResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}tokenizeLine2(t,e,n=0){const i=this._tokenize(t,e,!0,n);return{tokens:i.lineTokens.getBinaryResult(i.ruleStack,i.lineLength),ruleStack:i.ruleStack,stoppedEarly:i.stoppedEarly}}_tokenize(t,e,n,i){this._rootId===-1&&(this._rootId=yL.getCompiledRuleId(this._grammar.repository.$self,this,this._grammar.repository),this.getInjections());let r;if(!e||e===e1.NULL){r=!0;const h=this._basicScopeAttributesProvider.getDefaultAttributes(),d=this.themeProvider.getDefaults(),p=Vc.set(0,h.languageId,h.tokenType,null,d.fontStyle,d.foregroundId,d.backgroundId),g=this.getRule(this._rootId).getName(null,null);let O;g?O=Ih.createRootAndLookUpScopeName(g,p,this):O=Ih.createRoot("unknown",p),e=new e1(null,this._rootId,-1,-1,!1,null,O,O)}else r=!1,e.reset();t=t+`
313
+ `;const s=this.createOnigString(t),o=s.content.length,l=new VY(n,t,this._tokenTypeMatchers,this.balancedBracketSelectors),c=xL(this,s,r,0,e,l,!0,i);return mL(s),{lineLength:o,lineTokens:l,ruleStack:c.stack,stoppedEarly:c.stoppedEarly}}};function dC(t,e){return t=sY(t),t.repository=t.repository||{},t.repository.$self={$vscodeTextmateLocation:t.$vscodeTextmateLocation,patterns:t.patterns,name:t.scopeName},t.repository.$base=e||t.repository.$self,t}var Ih=class kr{constructor(e,n,i){this.parent=e,this.scopePath=n,this.tokenAttributes=i}static fromExtension(e,n){let i=e,r=(e==null?void 0:e.scopePath)??null;for(const s of n)r=xb.push(r,s.scopeNames),i=new kr(i,r,s.encodedTokenAttributes);return i}static createRoot(e,n){return new kr(null,new xb(null,e),n)}static createRootAndLookUpScopeName(e,n,i){const r=i.getMetadataForScope(e),s=new xb(null,e),o=i.themeProvider.themeMatch(s),l=kr.mergeAttributes(n,r,o);return new kr(null,s,l)}get scopeName(){return this.scopePath.scopeName}toString(){return this.getScopeNames().join(" ")}equals(e){return kr.equals(this,e)}static equals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.scopeName!==n.scopeName||e.tokenAttributes!==n.tokenAttributes)return!1;e=e.parent,n=n.parent}while(!0)}static mergeAttributes(e,n,i){let r=-1,s=0,o=0;return i!==null&&(r=i.fontStyle,s=i.foregroundId,o=i.backgroundId),Vc.set(e,n.languageId,n.tokenType,null,r,s,o)}pushAttributed(e,n){if(e===null)return this;if(e.indexOf(" ")===-1)return kr._pushAttributed(this,e,n);const i=e.split(/ /g);let r=this;for(const s of i)r=kr._pushAttributed(r,s,n);return r}static _pushAttributed(e,n,i){const r=i.getMetadataForScope(n),s=e.scopePath.push(n),o=i.themeProvider.themeMatch(s),l=kr.mergeAttributes(e.tokenAttributes,r,o);return new kr(e,s,l)}getScopeNames(){return this.scopePath.getSegments()}getExtensionIfDefined(e){var r;const n=[];let i=this;for(;i&&i!==e;)n.push({encodedTokenAttributes:i.tokenAttributes,scopeNames:i.scopePath.getExtensionIfDefined(((r=i.parent)==null?void 0:r.scopePath)??null)}),i=i.parent;return i===e?n.reverse():void 0}},Bi,e1=(Bi=class{constructor(e,n,i,r,s,o,l,c){ce(this,"_stackElementBrand");ce(this,"_enterPos");ce(this,"_anchorPos");ce(this,"depth");this.parent=e,this.ruleId=n,this.beginRuleCapturedEOL=s,this.endRule=o,this.nameScopesList=l,this.contentNameScopesList=c,this.depth=this.parent?this.parent.depth+1:1,this._enterPos=i,this._anchorPos=r}equals(e){return e===null?!1:Bi._equals(this,e)}static _equals(e,n){return e===n?!0:this._structuralEquals(e,n)?Ih.equals(e.contentNameScopesList,n.contentNameScopesList):!1}static _structuralEquals(e,n){do{if(e===n||!e&&!n)return!0;if(!e||!n||e.depth!==n.depth||e.ruleId!==n.ruleId||e.endRule!==n.endRule)return!1;e=e.parent,n=n.parent}while(!0)}clone(){return this}static _reset(e){for(;e;)e._enterPos=-1,e._anchorPos=-1,e=e.parent}reset(){Bi._reset(this)}pop(){return this.parent}safePop(){return this.parent?this.parent:this}push(e,n,i,r,s,o,l){return new Bi(this,e,n,i,r,s,o,l)}getEnterPos(){return this._enterPos}getAnchorPos(){return this._anchorPos}getRule(e){return e.getRule(this.ruleId)}toString(){const e=[];return this._writeString(e,0),"["+e.join(",")+"]"}_writeString(e,n){var i,r;return this.parent&&(n=this.parent._writeString(e,n)),e[n++]=`(${this.ruleId}, ${(i=this.nameScopesList)==null?void 0:i.toString()}, ${(r=this.contentNameScopesList)==null?void 0:r.toString()})`,n}withContentNameScopesList(e){return this.contentNameScopesList===e?this:this.parent.push(this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,this.endRule,this.nameScopesList,e)}withEndRule(e){return this.endRule===e?this:new Bi(this.parent,this.ruleId,this._enterPos,this._anchorPos,this.beginRuleCapturedEOL,e,this.nameScopesList,this.contentNameScopesList)}hasSameRuleAs(e){let n=this;for(;n&&n._enterPos===e._enterPos;){if(n.ruleId===e.ruleId)return!0;n=n.parent}return!1}toStateStackFrame(){var e,n,i;return{ruleId:this.ruleId,beginRuleCapturedEOL:this.beginRuleCapturedEOL,endRule:this.endRule,nameScopesList:((n=this.nameScopesList)==null?void 0:n.getExtensionIfDefined(((e=this.parent)==null?void 0:e.nameScopesList)??null))??[],contentNameScopesList:((i=this.contentNameScopesList)==null?void 0:i.getExtensionIfDefined(this.nameScopesList))??[]}}static pushFrame(e,n){const i=Ih.fromExtension((e==null?void 0:e.nameScopesList)??null,n.nameScopesList);return new Bi(e,n.ruleId,n.enterPos??-1,n.anchorPos??-1,n.beginRuleCapturedEOL,n.endRule,i,Ih.fromExtension(i,n.contentNameScopesList))}},ce(Bi,"NULL",new Bi(null,0,0,0,!1,null,null,null)),Bi),XY=class{constructor(t,e){ce(this,"balancedBracketScopes");ce(this,"unbalancedBracketScopes");ce(this,"allowAny",!1);this.balancedBracketScopes=t.flatMap(n=>n==="*"?(this.allowAny=!0,[]):Wm(n,Km).map(i=>i.matcher)),this.unbalancedBracketScopes=e.flatMap(n=>Wm(n,Km).map(i=>i.matcher))}get matchesAlways(){return this.allowAny&&this.unbalancedBracketScopes.length===0}get matchesNever(){return this.balancedBracketScopes.length===0&&!this.allowAny}match(t){for(const e of this.unbalancedBracketScopes)if(e(t))return!1;for(const e of this.balancedBracketScopes)if(e(t))return!0;return this.allowAny}},VY=class{constructor(t,e,n,i){ce(this,"_emitBinaryTokens");ce(this,"_lineText");ce(this,"_tokens");ce(this,"_binaryTokens");ce(this,"_lastTokenEndIndex");ce(this,"_tokenTypeOverrides");this.balancedBracketSelectors=i,this._emitBinaryTokens=t,this._tokenTypeOverrides=n,this._lineText=null,this._tokens=[],this._binaryTokens=[],this._lastTokenEndIndex=0}produce(t,e){this.produceFromScopes(t.contentNameScopesList,e)}produceFromScopes(t,e){var i;if(this._lastTokenEndIndex>=e)return;if(this._emitBinaryTokens){let r=(t==null?void 0:t.tokenAttributes)??0,s=!1;if((i=this.balancedBracketSelectors)!=null&&i.matchesAlways&&(s=!0),this._tokenTypeOverrides.length>0||this.balancedBracketSelectors&&!this.balancedBracketSelectors.matchesAlways&&!this.balancedBracketSelectors.matchesNever){const o=(t==null?void 0:t.getScopeNames())??[];for(const l of this._tokenTypeOverrides)l.matcher(o)&&(r=Vc.set(r,0,l.type,null,-1,0,0));this.balancedBracketSelectors&&(s=this.balancedBracketSelectors.match(o))}if(s&&(r=Vc.set(r,0,8,s,-1,0,0)),this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-1]===r){this._lastTokenEndIndex=e;return}this._binaryTokens.push(this._lastTokenEndIndex),this._binaryTokens.push(r),this._lastTokenEndIndex=e;return}const n=(t==null?void 0:t.getScopeNames())??[];this._tokens.push({startIndex:this._lastTokenEndIndex,endIndex:e,scopes:n}),this._lastTokenEndIndex=e}getResult(t,e){return this._tokens.length>0&&this._tokens[this._tokens.length-1].startIndex===e-1&&this._tokens.pop(),this._tokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._tokens[this._tokens.length-1].startIndex=0),this._tokens}getBinaryResult(t,e){this._binaryTokens.length>0&&this._binaryTokens[this._binaryTokens.length-2]===e-1&&(this._binaryTokens.pop(),this._binaryTokens.pop()),this._binaryTokens.length===0&&(this._lastTokenEndIndex=-1,this.produce(t,e),this._binaryTokens[this._binaryTokens.length-2]=0);const n=new Uint32Array(this._binaryTokens.length);for(let i=0,r=this._binaryTokens.length;i<r;i++)n[i]=this._binaryTokens[i];return n}},BY=class{constructor(t,e){ce(this,"_grammars",new Map);ce(this,"_rawGrammars",new Map);ce(this,"_injectionGrammars",new Map);ce(this,"_theme");this._onigLib=e,this._theme=t}dispose(){for(const t of this._grammars.values())t.dispose()}setTheme(t){this._theme=t}getColorMap(){return this._theme.getColorMap()}addGrammar(t,e){this._rawGrammars.set(t.scopeName,t),e&&this._injectionGrammars.set(t.scopeName,e)}lookup(t){return this._rawGrammars.get(t)}injections(t){return this._injectionGrammars.get(t)}getDefaults(){return this._theme.getDefaults()}themeMatch(t){return this._theme.match(t)}grammarForScopeName(t,e,n,i,r){if(!this._grammars.has(t)){let s=this._rawGrammars.get(t);if(!s)return null;this._grammars.set(t,NY(t,s,e,n,i,r,this,this._onigLib))}return this._grammars.get(t)}},ZY=class{constructor(e){ce(this,"_options");ce(this,"_syncRegistry");ce(this,"_ensureGrammarCache");this._options=e,this._syncRegistry=new BY(Gm.createFromRawTheme(e.theme,e.colorMap),e.onigLib),this._ensureGrammarCache=new Map}dispose(){this._syncRegistry.dispose()}setTheme(e,n){this._syncRegistry.setTheme(Gm.createFromRawTheme(e,n))}getColorMap(){return this._syncRegistry.getColorMap()}loadGrammarWithEmbeddedLanguages(e,n,i){return this.loadGrammarWithConfiguration(e,n,{embeddedLanguages:i})}loadGrammarWithConfiguration(e,n,i){return this._loadGrammar(e,n,i.embeddedLanguages,i.tokenTypes,new XY(i.balancedBracketSelectors||[],i.unbalancedBracketSelectors||[]))}loadGrammar(e){return this._loadGrammar(e,0,null,null,null)}_loadGrammar(e,n,i,r,s){const o=new bY(this._syncRegistry,e);for(;o.Q.length>0;)o.Q.map(l=>this._loadSingleGrammar(l.scopeName)),o.processQueue();return this._grammarForScopeName(e,n,i,r,s)}_loadSingleGrammar(e){this._ensureGrammarCache.has(e)||(this._doLoadSingleGrammar(e),this._ensureGrammarCache.set(e,!0))}_doLoadSingleGrammar(e){const n=this._options.loadGrammar(e);if(n){const i=typeof this._options.getInjections=="function"?this._options.getInjections(e):void 0;this._syncRegistry.addGrammar(n,i)}}addGrammar(e,n=[],i=0,r=null){return this._syncRegistry.addGrammar(e,n),this._grammarForScopeName(e.scopeName,i,r)}_grammarForScopeName(e,n=0,i=null,r=null,s=null){return this._syncRegistry.grammarForScopeName(e,n,i,r,s)}},t1=e1.NULL;const qY=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],UY=/["&'<>`]/g,YY=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,GY=/[\x01-\t\v\f\x0E-\x1F\x7F\x81\x8D\x8F\x90\x9D\xA0-\uFFFF]/g,WY=/[|\\{}()[\]^$+*?.]/g,pC=new WeakMap;function HY(t,e){if(t=t.replace(e.subset?FY(e.subset):UY,i),e.subset||e.escapeOnly)return t;return t.replace(YY,n).replace(GY,i);function n(r,s,o){return e.format((r.charCodeAt(0)-55296)*1024+r.charCodeAt(1)-56320+65536,o.charCodeAt(s+2),e)}function i(r,s,o){return e.format(r.charCodeAt(0),o.charCodeAt(s+1),e)}}function FY(t){let e=pC.get(t);return e||(e=KY(t),pC.set(t,e)),e}function KY(t){const e=[];let n=-1;for(;++n<t.length;)e.push(t[n].replace(WY,"\\$&"));return new RegExp("(?:"+e.join("|")+")","g")}const JY=/[\dA-Fa-f]/;function eG(t,e,n){const i="&#x"+t.toString(16).toUpperCase();return n&&e&&!JY.test(String.fromCharCode(e))?i:i+";"}const tG=/\d/;function nG(t,e,n){const i="&#"+String(t);return n&&e&&!tG.test(String.fromCharCode(e))?i:i+";"}const iG=["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"],Sb={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:"€"},rG=["cent","copy","divide","gt","lt","not","para","times"],SL={}.hasOwnProperty,n1={};let Lp;for(Lp in Sb)SL.call(Sb,Lp)&&(n1[Sb[Lp]]=Lp);const sG=/[^\dA-Za-z]/;function oG(t,e,n,i){const r=String.fromCharCode(t);if(SL.call(n1,r)){const s=n1[r],o="&"+s;return n&&iG.includes(s)&&!rG.includes(s)&&(!i||e&&e!==61&&sG.test(String.fromCharCode(e)))?o:o+";"}return""}function aG(t,e,n){let i=eG(t,e,n.omitOptionalSemicolons),r;if((n.useNamedReferences||n.useShortestReferences)&&(r=oG(t,e,n.omitOptionalSemicolons,n.attribute)),(n.useShortestReferences||!r)&&n.useShortestReferences){const s=nG(t,e,n.omitOptionalSemicolons);s.length<i.length&&(i=s)}return r&&(!n.useShortestReferences||r.length<i.length)?r:i}function yc(t,e){return HY(t,Object.assign({format:aG},e))}const lG=/^>|^->|<!--|-->|--!>|<!-$/g,cG=[">"],uG=["<",">"];function hG(t,e,n,i){return i.settings.bogusComments?"<?"+yc(t.value,Object.assign({},i.settings.characterReferences,{subset:cG}))+">":"<!--"+t.value.replace(lG,r)+"-->";function r(s){return yc(s,Object.assign({},i.settings.characterReferences,{subset:uG}))}}function fG(t,e,n,i){return"<!"+(i.settings.upperDoctype?"DOCTYPE":"doctype")+(i.settings.tightDoctype?"":" ")+"html>"}const nn=kL(1),_L=kL(-1),dG=[];function kL(t){return e;function e(n,i,r){const s=n?n.children:dG;let o=(i||0)+t,l=s[o];if(!r)for(;l&&Ug(l);)o+=t,l=s[o];return l}}const pG={}.hasOwnProperty;function wL(t){return e;function e(n,i,r){return pG.call(t,n.tagName)&&t[n.tagName](n,i,r)}}const Jv=wL({body:gG,caption:_b,colgroup:_b,dd:xG,dt:bG,head:_b,html:mG,li:yG,optgroup:vG,option:SG,p:OG,rp:mC,rt:mC,tbody:kG,td:gC,tfoot:wG,th:gC,thead:_G,tr:PG});function _b(t,e,n){const i=nn(n,e,!0);return!i||i.type!=="comment"&&!(i.type==="text"&&Ug(i.value.charAt(0)))}function mG(t,e,n){const i=nn(n,e);return!i||i.type!=="comment"}function gG(t,e,n){const i=nn(n,e);return!i||i.type!=="comment"}function OG(t,e,n){const i=nn(n,e);return i?i.type==="element"&&(i.tagName==="address"||i.tagName==="article"||i.tagName==="aside"||i.tagName==="blockquote"||i.tagName==="details"||i.tagName==="div"||i.tagName==="dl"||i.tagName==="fieldset"||i.tagName==="figcaption"||i.tagName==="figure"||i.tagName==="footer"||i.tagName==="form"||i.tagName==="h1"||i.tagName==="h2"||i.tagName==="h3"||i.tagName==="h4"||i.tagName==="h5"||i.tagName==="h6"||i.tagName==="header"||i.tagName==="hgroup"||i.tagName==="hr"||i.tagName==="main"||i.tagName==="menu"||i.tagName==="nav"||i.tagName==="ol"||i.tagName==="p"||i.tagName==="pre"||i.tagName==="section"||i.tagName==="table"||i.tagName==="ul"):!n||!(n.type==="element"&&(n.tagName==="a"||n.tagName==="audio"||n.tagName==="del"||n.tagName==="ins"||n.tagName==="map"||n.tagName==="noscript"||n.tagName==="video"))}function yG(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&i.tagName==="li"}function bG(t,e,n){const i=nn(n,e);return!!(i&&i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd"))}function xG(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&(i.tagName==="dt"||i.tagName==="dd")}function mC(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&(i.tagName==="rp"||i.tagName==="rt")}function vG(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&i.tagName==="optgroup"}function SG(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&(i.tagName==="option"||i.tagName==="optgroup")}function _G(t,e,n){const i=nn(n,e);return!!(i&&i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot"))}function kG(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&(i.tagName==="tbody"||i.tagName==="tfoot")}function wG(t,e,n){return!nn(n,e)}function PG(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&i.tagName==="tr"}function gC(t,e,n){const i=nn(n,e);return!i||i.type==="element"&&(i.tagName==="td"||i.tagName==="th")}const TG=wL({body:EG,colgroup:AG,head:CG,html:QG,tbody:RG});function QG(t){const e=nn(t,-1);return!e||e.type!=="comment"}function CG(t){const e=new Set;for(const i of t.children)if(i.type==="element"&&(i.tagName==="base"||i.tagName==="title")){if(e.has(i.tagName))return!1;e.add(i.tagName)}const n=t.children[0];return!n||n.type==="element"}function EG(t){const e=nn(t,-1,!0);return!e||e.type!=="comment"&&!(e.type==="text"&&Ug(e.value.charAt(0)))&&!(e.type==="element"&&(e.tagName==="meta"||e.tagName==="link"||e.tagName==="script"||e.tagName==="style"||e.tagName==="template"))}function AG(t,e,n){const i=_L(n,e),r=nn(t,-1,!0);return n&&i&&i.type==="element"&&i.tagName==="colgroup"&&Jv(i,n.children.indexOf(i),n)?!1:!!(r&&r.type==="element"&&r.tagName==="col")}function RG(t,e,n){const i=_L(n,e),r=nn(t,-1);return n&&i&&i.type==="element"&&(i.tagName==="thead"||i.tagName==="tbody")&&Jv(i,n.children.indexOf(i),n)?!1:!!(r&&r.type==="element"&&r.tagName==="tr")}const Mp={name:[[`
314
+ \f\r &/=>`.split(""),`
315
+ \f\r "&'/=>\``.split("")],[`\0
316
+ \f\r "&'/<=>`.split(""),`\0
317
+ \f\r "&'/<=>\``.split("")]],unquoted:[[`
318
+ \f\r &>`.split(""),`\0
319
+ \f\r "&'<=>\``.split("")],[`\0
320
+ \f\r "&'<=>\``.split(""),`\0
321
+ \f\r "&'<=>\``.split("")]],single:[["&'".split(""),"\"&'`".split("")],["\0&'".split(""),"\0\"&'`".split("")]],double:[['"&'.split(""),"\"&'`".split("")],['\0"&'.split(""),"\0\"&'`".split("")]]};function $G(t,e,n,i){const r=i.schema,s=r.space==="svg"?!1:i.settings.omitOptionalTags;let o=r.space==="svg"?i.settings.closeEmptyElements:i.settings.voids.includes(t.tagName.toLowerCase());const l=[];let c;r.space==="html"&&t.tagName==="svg"&&(i.schema=Zf);const h=LG(i,t.properties),d=i.all(r.space==="html"&&t.tagName==="template"?t.content:t);return i.schema=r,d&&(o=!1),(h||!s||!TG(t,e,n))&&(l.push("<",t.tagName,h?" "+h:""),o&&(r.space==="svg"||i.settings.closeSelfClosing)&&(c=h.charAt(h.length-1),(!i.settings.tightSelfClosing||c==="/"||c&&c!=='"'&&c!=="'")&&l.push(" "),l.push("/")),l.push(">")),l.push(d),!o&&(!s||!Jv(t,e,n))&&l.push("</"+t.tagName+">"),l.join("")}function LG(t,e){const n=[];let i=-1,r;if(e){for(r in e)if(e[r]!==null&&e[r]!==void 0){const s=MG(t,r,e[r]);s&&n.push(s)}}for(;++i<n.length;){const s=t.settings.tightAttributes?n[i].charAt(n[i].length-1):void 0;i!==n.length-1&&s!=='"'&&s!=="'"&&(n[i]+=" ")}return n.join("")}function MG(t,e,n){const i=a$(t.schema,e),r=t.settings.allowParseErrors&&t.schema.space==="html"?0:1,s=t.settings.allowDangerousCharacters?0:1;let o=t.quote,l;if(i.overloadedBoolean&&(n===i.attribute||n==="")?n=!0:(i.boolean||i.overloadedBoolean)&&(typeof n!="string"||n===i.attribute||n==="")&&(n=!!n),n==null||n===!1||typeof n=="number"&&Number.isNaN(n))return"";const c=yc(i.attribute,Object.assign({},t.settings.characterReferences,{subset:Mp.name[r][s]}));return n===!0||(n=Array.isArray(n)?(i.commaSeparated?JR:c$)(n,{padLeft:!t.settings.tightCommaSeparatedLists}):String(n),t.settings.collapseEmptyAttributes&&!n)?c:(t.settings.preferUnquoted&&(l=yc(n,Object.assign({},t.settings.characterReferences,{attribute:!0,subset:Mp.unquoted[r][s]}))),l!==n&&(t.settings.quoteSmart&&Um(n,o)>Um(n,t.alternative)&&(o=t.alternative),l=o+yc(n,Object.assign({},t.settings.characterReferences,{subset:(o==="'"?Mp.single:Mp.double)[r][s],attribute:!0}))+o),c+(l&&"="+l))}const DG=["<","&"];function PL(t,e,n,i){return n&&n.type==="element"&&(n.tagName==="script"||n.tagName==="style")?t.value:yc(t.value,Object.assign({},i.settings.characterReferences,{subset:DG}))}function jG(t,e,n,i){return i.settings.allowDangerousHtml?t.value:PL(t,e,n,i)}function NG(t,e,n,i){return i.all(t)}const zG=A8("type",{invalid:IG,unknown:XG,handlers:{comment:hG,doctype:fG,element:$G,raw:jG,root:NG,text:PL}});function IG(t){throw new Error("Expected node, not `"+t+"`")}function XG(t){const e=t;throw new Error("Cannot compile unknown node `"+e.type+"`")}const VG={},BG={},ZG=[];function qG(t,e){const n=e||VG,i=n.quote||'"',r=i==='"'?"'":'"';if(i!=='"'&&i!=="'")throw new Error("Invalid quote `"+i+"`, expected `'` or `\"`");return{one:UG,all:YG,settings:{omitOptionalTags:n.omitOptionalTags||!1,allowParseErrors:n.allowParseErrors||!1,allowDangerousCharacters:n.allowDangerousCharacters||!1,quoteSmart:n.quoteSmart||!1,preferUnquoted:n.preferUnquoted||!1,tightAttributes:n.tightAttributes||!1,upperDoctype:n.upperDoctype||!1,tightDoctype:n.tightDoctype||!1,bogusComments:n.bogusComments||!1,tightCommaSeparatedLists:n.tightCommaSeparatedLists||!1,tightSelfClosing:n.tightSelfClosing||!1,collapseEmptyAttributes:n.collapseEmptyAttributes||!1,allowDangerousHtml:n.allowDangerousHtml||!1,voids:n.voids||qY,characterReferences:n.characterReferences||BG,closeSelfClosing:n.closeSelfClosing||!1,closeEmptyElements:n.closeEmptyElements||!1},schema:n.space==="svg"?Zf:l$,quote:i,alternative:r}.one(Array.isArray(t)?{type:"root",children:t}:t,void 0,void 0)}function UG(t,e,n){return zG(t,e,n,this)}function YG(t){const e=[],n=t&&t.children||ZG;let i=-1;for(;++i<n.length;)e[i]=this.one(n[i],i,t);return e.join("")}function Jm(t,e){const n=typeof t=="string"?{}:{...t.colorReplacements},i=typeof t=="string"?t:t.name;for(const[r,s]of Object.entries((e==null?void 0:e.colorReplacements)||{}))typeof s=="string"?n[r]=s:r===i&&Object.assign(n,s);return n}function No(t,e){return t&&((e==null?void 0:e[t==null?void 0:t.toLowerCase()])||t)}function GG(t){return Array.isArray(t)?t:[t]}async function TL(t){return Promise.resolve(typeof t=="function"?t():t).then(e=>e.default||e)}function eS(t){return!t||["plaintext","txt","text","plain"].includes(t)}function QL(t){return t==="ansi"||eS(t)}function tS(t){return t==="none"}function CL(t){return tS(t)}function EL(t,e){var i;if(!e)return t;t.properties||(t.properties={}),(i=t.properties).class||(i.class=[]),typeof t.properties.class=="string"&&(t.properties.class=t.properties.class.split(/\s+/g)),Array.isArray(t.properties.class)||(t.properties.class=[]);const n=Array.isArray(e)?e:e.split(/\s+/g);for(const r of n)r&&!t.properties.class.includes(r)&&t.properties.class.push(r);return t}function Kg(t,e=!1){var s;const n=t.split(/(\r?\n)/g);let i=0;const r=[];for(let o=0;o<n.length;o+=2){const l=e?n[o]+(n[o+1]||""):n[o];r.push([l,i]),i+=n[o].length,i+=((s=n[o+1])==null?void 0:s.length)||0}return r}function WG(t){const e=Kg(t,!0).map(([r])=>r);function n(r){if(r===t.length)return{line:e.length-1,character:e[e.length-1].length};let s=r,o=0;for(const l of e){if(s<l.length)break;s-=l.length,o++}return{line:o,character:s}}function i(r,s){let o=0;for(let l=0;l<r;l++)o+=e[l].length;return o+=s,o}return{lines:e,indexToPos:n,posToIndex:i}}function HG(t,e,n){const i=new Set;for(const s of t.matchAll(/lang=["']([\w-]+)["']/g))i.add(s[1]);for(const s of t.matchAll(/(?:```|~~~)([\w-]+)/g))i.add(s[1]);for(const s of t.matchAll(/\\begin\{([\w-]+)\}/g))i.add(s[1]);if(!n)return Array.from(i);const r=n.getBundledLanguages();return Array.from(i).filter(s=>s&&r[s])}const nS="light-dark()",FG=["color","background-color"];function KG(t,e){let n=0;const i=[];for(const r of e)r>n&&i.push({...t,content:t.content.slice(n,r),offset:t.offset+n}),n=r;return n<t.content.length&&i.push({...t,content:t.content.slice(n),offset:t.offset+n}),i}function JG(t,e){const n=Array.from(e instanceof Set?e:new Set(e)).sort((i,r)=>i-r);return n.length?t.map(i=>i.flatMap(r=>{const s=n.filter(o=>r.offset<o&&o<r.offset+r.content.length).map(o=>o-r.offset).sort((o,l)=>o-l);return s.length?KG(r,s):r})):t}function eW(t,e,n,i,r="css-vars"){const s={content:t.content,explanation:t.explanation,offset:t.offset},o=e.map(d=>eg(t.variants[d])),l=new Set(o.flatMap(d=>Object.keys(d))),c={},h=(d,p)=>{const g=p==="color"?"":p==="background-color"?"-bg":`-${p}`;return n+e[d]+(p==="color"?"":g)};return o.forEach((d,p)=>{for(const g of l){const O=d[g]||"inherit";if(p===0&&i&&FG.includes(g))if(i===nS&&o.length>1){const x=e.findIndex(P=>P==="light"),S=e.findIndex(P=>P==="dark");if(x===-1||S===-1)throw new Gt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const _=o[x][g]||"inherit",k=o[S][g]||"inherit";c[g]=`light-dark(${_}, ${k})`,r==="css-vars"&&(c[h(p,g)]=O)}else c[g]=O;else r==="css-vars"&&(c[h(p,g)]=O)}}),s.htmlStyle=c,s}function eg(t){const e={};if(t.color&&(e.color=t.color),t.bgColor&&(e["background-color"]=t.bgColor),t.fontStyle){t.fontStyle&kn.Italic&&(e["font-style"]="italic"),t.fontStyle&kn.Bold&&(e["font-weight"]="bold");const n=[];t.fontStyle&kn.Underline&&n.push("underline"),t.fontStyle&kn.Strikethrough&&n.push("line-through"),n.length&&(e["text-decoration"]=n.join(" "))}return e}function i1(t){return typeof t=="string"?t:Object.entries(t).map(([e,n])=>`${e}:${n}`).join(";")}const AL=new WeakMap;function Jg(t,e){AL.set(t,e)}function cf(t){return AL.get(t)}class lu{constructor(...e){ce(this,"_stacks",{});ce(this,"lang");if(e.length===2){const[n,i]=e;this.lang=i,this._stacks=n}else{const[n,i,r]=e;this.lang=i,this._stacks={[r]:n}}}get themes(){return Object.keys(this._stacks)}get theme(){return this.themes[0]}get _stack(){return this._stacks[this.theme]}static initial(e,n){return new lu(Object.fromEntries(GG(n).map(i=>[i,t1])),e)}getInternalStack(e=this.theme){return this._stacks[e]}getScopes(e=this.theme){return tW(this._stacks[e])}toJSON(){return{lang:this.lang,theme:this.theme,themes:this.themes,scopes:this.getScopes()}}}function tW(t){const e=[],n=new Set;function i(r){var o;if(n.has(r))return;n.add(r);const s=(o=r==null?void 0:r.nameScopesList)==null?void 0:o.scopeName;s&&e.push(s),r.parent&&i(r.parent)}return i(t),e}function nW(t,e){if(!(t instanceof lu))throw new Gt("Invalid grammar state");return t.getInternalStack(e)}function iW(){const t=new WeakMap;function e(n){if(!t.has(n.meta)){let i=function(o){if(typeof o=="number"){if(o<0||o>n.source.length)throw new Gt(`Invalid decoration offset: ${o}. Code length: ${n.source.length}`);return{...r.indexToPos(o),offset:o}}else{const l=r.lines[o.line];if(l===void 0)throw new Gt(`Invalid decoration position ${JSON.stringify(o)}. Lines length: ${r.lines.length}`);let c=o.character;if(c<0&&(c=l.length+c),c<0||c>l.length)throw new Gt(`Invalid decoration position ${JSON.stringify(o)}. Line ${o.line} length: ${l.length}`);return{...o,character:c,offset:r.posToIndex(o.line,c)}}};const r=WG(n.source),s=(n.options.decorations||[]).map(o=>({...o,start:i(o.start),end:i(o.end)}));rW(s),t.set(n.meta,{decorations:s,converter:r,source:n.source})}return t.get(n.meta)}return{name:"shiki:decorations",tokens(n){var o;if(!((o=this.options.decorations)!=null&&o.length))return;const r=e(this).decorations.flatMap(l=>[l.start.offset,l.end.offset]);return JG(n,r)},code(n){var d;if(!((d=this.options.decorations)!=null&&d.length))return;const i=e(this),r=Array.from(n.children).filter(p=>p.type==="element"&&p.tagName==="span");if(r.length!==i.converter.lines.length)throw new Gt(`Number of lines in code element (${r.length}) does not match the number of lines in the source (${i.converter.lines.length}). Failed to apply decorations.`);function s(p,g,O,x){const S=r[p];let _="",k=-1,P=-1;if(g===0&&(k=0),O===0&&(P=0),O===Number.POSITIVE_INFINITY&&(P=S.children.length),k===-1||P===-1)for(let R=0;R<S.children.length;R++)_+=RL(S.children[R]),k===-1&&_.length===g&&(k=R+1),P===-1&&_.length===O&&(P=R+1);if(k===-1)throw new Gt(`Failed to find start index for decoration ${JSON.stringify(x.start)}`);if(P===-1)throw new Gt(`Failed to find end index for decoration ${JSON.stringify(x.end)}`);const Q=S.children.slice(k,P);if(!x.alwaysWrap&&Q.length===S.children.length)l(S,x,"line");else if(!x.alwaysWrap&&Q.length===1&&Q[0].type==="element")l(Q[0],x,"token");else{const R={type:"element",tagName:"span",properties:{},children:Q};l(R,x,"wrapper"),S.children.splice(k,Q.length,R)}}function o(p,g){r[p]=l(r[p],g,"line")}function l(p,g,O){var _;const x=g.properties||{},S=g.transform||(k=>k);return p.tagName=g.tagName||"span",p.properties={...p.properties,...x,class:p.properties.class},(_=g.properties)!=null&&_.class&&EL(p,g.properties.class),p=S(p,O)||p,p}const c=[],h=i.decorations.sort((p,g)=>g.start.offset-p.start.offset||p.end.offset-g.end.offset);for(const p of h){const{start:g,end:O}=p;if(g.line===O.line)s(g.line,g.character,O.character,p);else if(g.line<O.line){s(g.line,g.character,Number.POSITIVE_INFINITY,p);for(let x=g.line+1;x<O.line;x++)c.unshift(()=>o(x,p));s(O.line,0,O.character,p)}}c.forEach(p=>p())}}}function rW(t){for(let e=0;e<t.length;e++){const n=t[e];if(n.start.offset>n.end.offset)throw new Gt(`Invalid decoration range: ${JSON.stringify(n.start)} - ${JSON.stringify(n.end)}`);for(let i=e+1;i<t.length;i++){const r=t[i],s=n.start.offset<=r.start.offset&&r.start.offset<n.end.offset,o=n.start.offset<r.end.offset&&r.end.offset<=n.end.offset,l=r.start.offset<=n.start.offset&&n.start.offset<r.end.offset,c=r.start.offset<n.end.offset&&n.end.offset<=r.end.offset;if(s||o||l||c){if(s&&o||l&&c||l&&n.start.offset===n.end.offset||o&&r.start.offset===r.end.offset)continue;throw new Gt(`Decorations ${JSON.stringify(n.start)} and ${JSON.stringify(r.start)} intersect.`)}}}}function RL(t){return t.type==="text"?t.value:t.type==="element"?t.children.map(RL).join(""):""}const sW=[iW()];function tg(t){const e=oW(t.transformers||[]);return[...e.pre,...e.normal,...e.post,...sW]}function oW(t){const e=[],n=[],i=[];for(const r of t)switch(r.enforce){case"pre":e.push(r);break;case"post":n.push(r);break;default:i.push(r)}return{pre:e,post:n,normal:i}}var Qa=["black","red","green","yellow","blue","magenta","cyan","white","brightBlack","brightRed","brightGreen","brightYellow","brightBlue","brightMagenta","brightCyan","brightWhite"],kb={1:"bold",2:"dim",3:"italic",4:"underline",7:"reverse",8:"hidden",9:"strikethrough"};function aW(t,e){const n=t.indexOf("\x1B",e);if(n!==-1&&t[n+1]==="["){const i=t.indexOf("m",n);if(i!==-1)return{sequence:t.substring(n+2,i).split(";"),startPosition:n,position:i+1}}return{position:t.length}}function OC(t){const e=t.shift();if(e==="2"){const n=t.splice(0,3).map(i=>Number.parseInt(i));return n.length!==3||n.some(i=>Number.isNaN(i))?void 0:{type:"rgb",rgb:n}}else if(e==="5"){const n=t.shift();if(n)return{type:"table",index:Number(n)}}}function lW(t){const e=[];for(;t.length>0;){const n=t.shift();if(!n)continue;const i=Number.parseInt(n);if(!Number.isNaN(i))if(i===0)e.push({type:"resetAll"});else if(i<=9)kb[i]&&e.push({type:"setDecoration",value:kb[i]});else if(i<=29){const r=kb[i-20];r&&(e.push({type:"resetDecoration",value:r}),r==="dim"&&e.push({type:"resetDecoration",value:"bold"}))}else if(i<=37)e.push({type:"setForegroundColor",value:{type:"named",name:Qa[i-30]}});else if(i===38){const r=OC(t);r&&e.push({type:"setForegroundColor",value:r})}else if(i===39)e.push({type:"resetForegroundColor"});else if(i<=47)e.push({type:"setBackgroundColor",value:{type:"named",name:Qa[i-40]}});else if(i===48){const r=OC(t);r&&e.push({type:"setBackgroundColor",value:r})}else i===49?e.push({type:"resetBackgroundColor"}):i===53?e.push({type:"setDecoration",value:"overline"}):i===55?e.push({type:"resetDecoration",value:"overline"}):i>=90&&i<=97?e.push({type:"setForegroundColor",value:{type:"named",name:Qa[i-90+8]}}):i>=100&&i<=107&&e.push({type:"setBackgroundColor",value:{type:"named",name:Qa[i-100+8]}})}return e}function cW(){let t=null,e=null,n=new Set;return{parse(i){const r=[];let s=0;do{const o=aW(i,s),l=o.sequence?i.substring(s,o.startPosition):i.substring(s);if(l.length>0&&r.push({value:l,foreground:t,background:e,decorations:new Set(n)}),o.sequence){const c=lW(o.sequence);for(const h of c)h.type==="resetAll"?(t=null,e=null,n.clear()):h.type==="resetForegroundColor"?t=null:h.type==="resetBackgroundColor"?e=null:h.type==="resetDecoration"&&n.delete(h.value);for(const h of c)h.type==="setForegroundColor"?t=h.value:h.type==="setBackgroundColor"?e=h.value:h.type==="setDecoration"&&n.add(h.value)}s=o.position}while(s<i.length);return r}}}var uW={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 hW(t=uW){function e(l){return t[l]}function n(l){return`#${l.map(c=>Math.max(0,Math.min(c,255)).toString(16).padStart(2,"0")).join("")}`}let i;function r(){if(i)return i;i=[];for(let h=0;h<Qa.length;h++)i.push(e(Qa[h]));let l=[0,95,135,175,215,255];for(let h=0;h<6;h++)for(let d=0;d<6;d++)for(let p=0;p<6;p++)i.push(n([l[h],l[d],l[p]]));let c=8;for(let h=0;h<24;h++,c+=10)i.push(n([c,c,c]));return i}function s(l){return r()[l]}function o(l){switch(l.type){case"named":return e(l.name);case"rgb":return n(l.rgb);case"table":return s(l.index)}}return{value:o}}const fW={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 dW(t,e,n){const i=Jm(t,n),r=Kg(e),s=Object.fromEntries(Qa.map(c=>{var p;const h=`terminal.ansi${c[0].toUpperCase()}${c.substring(1)}`,d=(p=t.colors)==null?void 0:p[h];return[c,d||fW[c]]})),o=hW(s),l=cW();return r.map(c=>l.parse(c[0]).map(h=>{let d,p;h.decorations.has("reverse")?(d=h.background?o.value(h.background):t.bg,p=h.foreground?o.value(h.foreground):t.fg):(d=h.foreground?o.value(h.foreground):t.fg,p=h.background?o.value(h.background):void 0),d=No(d,i),p=No(p,i),h.decorations.has("dim")&&(d=pW(d));let g=kn.None;return h.decorations.has("bold")&&(g|=kn.Bold),h.decorations.has("italic")&&(g|=kn.Italic),h.decorations.has("underline")&&(g|=kn.Underline),h.decorations.has("strikethrough")&&(g|=kn.Strikethrough),{content:h.value,offset:c[1],color:d,bgColor:p,fontStyle:g}}))}function pW(t){const e=t.match(/#([0-9a-f]{3})([0-9a-f]{3})?([0-9a-f]{2})?/i);if(e)if(e[3]){const i=Math.round(Number.parseInt(e[3],16)/2).toString(16).padStart(2,"0");return`#${e[1]}${e[2]}${i}`}else return e[2]?`#${e[1]}${e[2]}80`:`#${Array.from(e[1]).map(i=>`${i}${i}`).join("")}80`;const n=t.match(/var\((--[\w-]+-ansi-[\w-]+)\)/);return n?`var(${n[1]}-dim)`:t}function iS(t,e,n={}){const{lang:i="text",theme:r=t.getLoadedThemes()[0]}=n;if(eS(i)||tS(r))return Kg(e).map(c=>[{content:c[0],offset:c[1]}]);const{theme:s,colorMap:o}=t.setTheme(r);if(i==="ansi")return dW(s,e,n);const l=t.getLanguage(i);if(n.grammarState){if(n.grammarState.lang!==l.name)throw new Gt(`Grammar state language "${n.grammarState.lang}" does not match highlight language "${l.name}"`);if(!n.grammarState.themes.includes(s.name))throw new Gt(`Grammar state themes "${n.grammarState.themes}" do not contain highlight theme "${s.name}"`)}return gW(e,l,s,o,n)}function mW(...t){if(t.length===2)return cf(t[1]);const[e,n,i={}]=t,{lang:r="text",theme:s=e.getLoadedThemes()[0]}=i;if(eS(r)||tS(s))throw new Gt("Plain language does not have grammar state");if(r==="ansi")throw new Gt("ANSI language does not have grammar state");const{theme:o,colorMap:l}=e.setTheme(s),c=e.getLanguage(r);return new lu(ng(n,c,o,l,i).stateStack,c.name,o.name)}function gW(t,e,n,i,r){const s=ng(t,e,n,i,r),o=new lu(ng(t,e,n,i,r).stateStack,e.name,n.name);return Jg(s.tokens,o),s.tokens}function ng(t,e,n,i,r){const s=Jm(n,r),{tokenizeMaxLineLength:o=0,tokenizeTimeLimit:l=500}=r,c=Kg(t);let h=r.grammarState?nW(r.grammarState,n.name)??t1:r.grammarContextCode!=null?ng(r.grammarContextCode,e,n,i,{...r,grammarState:void 0,grammarContextCode:void 0}).stateStack:t1,d=[];const p=[];for(let g=0,O=c.length;g<O;g++){const[x,S]=c[g];if(x===""){d=[],p.push([]);continue}if(o>0&&x.length>=o){d=[],p.push([{content:x,offset:S,color:"",fontStyle:0}]);continue}let _,k,P;r.includeExplanation&&(_=e.tokenizeLine(x,h,l),k=_.tokens,P=0);const Q=e.tokenizeLine2(x,h,l),R=Q.tokens.length/2;for(let $=0;$<R;$++){const C=Q.tokens[2*$],D=$+1<R?Q.tokens[2*$+2]:x.length;if(C===D)continue;const Z=Q.tokens[2*$+1],U=No(i[Vc.getForeground(Z)],s),M=Vc.getFontStyle(Z),V={content:x.substring(C,D),offset:S+C,color:U,fontStyle:M};if(r.includeExplanation){const G=[];if(r.includeExplanation!=="scopeName")for(const K of n.settings){let ie;switch(typeof K.scope){case"string":ie=K.scope.split(/,/).map(q=>q.trim());break;case"object":ie=K.scope;break;default:continue}G.push({settings:K,selectors:ie.map(q=>q.split(/ /))})}V.explanation=[];let J=0;for(;C+J<D;){const K=k[P],ie=x.substring(K.startIndex,K.endIndex);J+=ie.length,V.explanation.push({content:ie,scopes:r.includeExplanation==="scopeName"?OW(K.scopes):yW(G,K.scopes)}),P+=1}}d.push(V)}p.push(d),d=[],h=Q.ruleStack}return{tokens:p,stateStack:h}}function OW(t){return t.map(e=>({scopeName:e}))}function yW(t,e){const n=[];for(let i=0,r=e.length;i<r;i++){const s=e[i];n[i]={scopeName:s,themeMatches:xW(t,s,e.slice(0,i))}}return n}function yC(t,e){return t===e||e.substring(0,t.length)===t&&e[t.length]==="."}function bW(t,e,n){if(!yC(t[t.length-1],e))return!1;let i=t.length-2,r=n.length-1;for(;i>=0&&r>=0;)yC(t[i],n[r])&&(i-=1),r-=1;return i===-1}function xW(t,e,n){const i=[];for(const{selectors:r,settings:s}of t)for(const o of r)if(bW(o,e,n)){i.push(s);break}return i}function $L(t,e,n){const i=Object.entries(n.themes).filter(c=>c[1]).map(c=>({color:c[0],theme:c[1]})),r=i.map(c=>{const h=iS(t,e,{...n,theme:c.theme}),d=cf(h),p=typeof c.theme=="string"?c.theme:c.theme.name;return{tokens:h,state:d,theme:p}}),s=vW(...r.map(c=>c.tokens)),o=s[0].map((c,h)=>c.map((d,p)=>{const g={content:d.content,variants:{},offset:d.offset};return"includeExplanation"in n&&n.includeExplanation&&(g.explanation=d.explanation),s.forEach((O,x)=>{const{content:S,explanation:_,offset:k,...P}=O[h][p];g.variants[i[x].color]=P}),g})),l=r[0].state?new lu(Object.fromEntries(r.map(c=>{var h;return[c.theme,(h=c.state)==null?void 0:h.getInternalStack(c.theme)]})),r[0].state.lang):void 0;return l&&Jg(o,l),o}function vW(...t){const e=t.map(()=>[]),n=t.length;for(let i=0;i<t[0].length;i++){const r=t.map(c=>c[i]),s=e.map(()=>[]);e.forEach((c,h)=>c.push(s[h]));const o=r.map(()=>0),l=r.map(c=>c[0]);for(;l.every(c=>c);){const c=Math.min(...l.map(h=>h.content.length));for(let h=0;h<n;h++){const d=l[h];d.content.length===c?(s[h].push(d),o[h]+=1,l[h]=r[h][o[h]]):(s[h].push({...d,content:d.content.slice(0,c)}),l[h]={...d,content:d.content.slice(c),offset:d.offset+c})}}}return e}function ig(t,e,n){let i,r,s,o,l,c;if("themes"in n){const{defaultColor:h="light",cssVariablePrefix:d="--shiki-",colorsRendering:p="css-vars"}=n,g=Object.entries(n.themes).filter(k=>k[1]).map(k=>({color:k[0],theme:k[1]})).sort((k,P)=>k.color===h?-1:P.color===h?1:0);if(g.length===0)throw new Gt("`themes` option must not be empty");const O=$L(t,e,n);if(c=cf(O),h&&nS!==h&&!g.find(k=>k.color===h))throw new Gt(`\`themes\` option must contain the defaultColor key \`${h}\``);const x=g.map(k=>t.getTheme(k.theme)),S=g.map(k=>k.color);s=O.map(k=>k.map(P=>eW(P,S,d,h,p))),c&&Jg(s,c);const _=g.map(k=>Jm(k.theme,n));r=bC(g,x,_,d,h,"fg",p),i=bC(g,x,_,d,h,"bg",p),o=`shiki-themes ${x.map(k=>k.name).join(" ")}`,l=h?void 0:[r,i].join(";")}else if("theme"in n){const h=Jm(n.theme,n);s=iS(t,e,n);const d=t.getTheme(n.theme);i=No(d.bg,h),r=No(d.fg,h),o=d.name,c=cf(s)}else throw new Gt("Invalid options, either `theme` or `themes` must be provided");return{tokens:s,fg:r,bg:i,themeName:o,rootStyle:l,grammarState:c}}function bC(t,e,n,i,r,s,o){return t.map((l,c)=>{const h=No(e[c][s],n[c])||"inherit",d=`${i+l.color}${s==="bg"?"-bg":""}:${h}`;if(c===0&&r){if(r===nS&&t.length>1){const p=t.findIndex(S=>S.color==="light"),g=t.findIndex(S=>S.color==="dark");if(p===-1||g===-1)throw new Gt('When using `defaultColor: "light-dark()"`, you must provide both `light` and `dark` themes');const O=No(e[p][s],n[p])||"inherit",x=No(e[g][s],n[g])||"inherit";return`light-dark(${O}, ${x});${d}`}return h}return o==="css-vars"?d:null}).filter(l=>!!l).join(";")}function rg(t,e,n,i={meta:{},options:n,codeToHast:(r,s)=>rg(t,r,s),codeToTokens:(r,s)=>ig(t,r,s)}){var x,S;let r=e;for(const _ of tg(n))r=((x=_.preprocess)==null?void 0:x.call(i,r,n))||r;let{tokens:s,fg:o,bg:l,themeName:c,rootStyle:h,grammarState:d}=ig(t,r,n);const{mergeWhitespaces:p=!0,mergeSameStyleTokens:g=!1}=n;p===!0?s=_W(s):p==="never"&&(s=kW(s)),g&&(s=wW(s));const O={...i,get source(){return r}};for(const _ of tg(n))s=((S=_.tokens)==null?void 0:S.call(O,s))||s;return SW(s,{...n,fg:o,bg:l,themeName:c,rootStyle:h},O,d)}function SW(t,e,n,i=cf(t)){var x,S,_,k;const r=tg(e),s=[],o={type:"root",children:[]},{structure:l="classic",tabindex:c="0"}=e;let h={type:"element",tagName:"pre",properties:{class:`shiki ${e.themeName||""}`,style:e.rootStyle||`background-color:${e.bg};color:${e.fg}`,...c!==!1&&c!=null?{tabindex:c.toString()}:{},...Object.fromEntries(Array.from(Object.entries(e.meta||{})).filter(([P])=>!P.startsWith("_")))},children:[]},d={type:"element",tagName:"code",properties:{},children:s};const p=[],g={...n,structure:l,addClassToHast:EL,get source(){return n.source},get tokens(){return t},get options(){return e},get root(){return o},get pre(){return h},get code(){return d},get lines(){return p}};if(t.forEach((P,Q)=>{var C,D;Q&&(l==="inline"?o.children.push({type:"element",tagName:"br",properties:{},children:[]}):l==="classic"&&s.push({type:"text",value:`
322
+ `}));let R={type:"element",tagName:"span",properties:{class:"line"},children:[]},$=0;for(const Z of P){let U={type:"element",tagName:"span",properties:{...Z.htmlAttrs},children:[{type:"text",value:Z.content}]};const M=i1(Z.htmlStyle||eg(Z));M&&(U.properties.style=M);for(const V of r)U=((C=V==null?void 0:V.span)==null?void 0:C.call(g,U,Q+1,$,R,Z))||U;l==="inline"?o.children.push(U):l==="classic"&&R.children.push(U),$+=Z.content.length}if(l==="classic"){for(const Z of r)R=((D=Z==null?void 0:Z.line)==null?void 0:D.call(g,R,Q+1))||R;p.push(R),s.push(R)}else l==="inline"&&p.push(R)}),l==="classic"){for(const P of r)d=((x=P==null?void 0:P.code)==null?void 0:x.call(g,d))||d;h.children.push(d);for(const P of r)h=((S=P==null?void 0:P.pre)==null?void 0:S.call(g,h))||h;o.children.push(h)}else if(l==="inline"){const P=[];let Q={type:"element",tagName:"span",properties:{class:"line"},children:[]};for(const C of o.children)C.type==="element"&&C.tagName==="br"?(P.push(Q),Q={type:"element",tagName:"span",properties:{class:"line"},children:[]}):(C.type==="element"||C.type==="text")&&Q.children.push(C);P.push(Q);let $={type:"element",tagName:"code",properties:{},children:P};for(const C of r)$=((_=C==null?void 0:C.code)==null?void 0:_.call(g,$))||$;o.children=[];for(let C=0;C<$.children.length;C++){C>0&&o.children.push({type:"element",tagName:"br",properties:{},children:[]});const D=$.children[C];D.type==="element"&&o.children.push(...D.children)}}let O=o;for(const P of r)O=((k=P==null?void 0:P.root)==null?void 0:k.call(g,O))||O;return i&&Jg(O,i),O}function _W(t){return t.map(e=>{const n=[];let i="",r=0;return e.forEach((s,o)=>{const c=!(s.fontStyle&&(s.fontStyle&kn.Underline||s.fontStyle&kn.Strikethrough));c&&s.content.match(/^\s+$/)&&e[o+1]?(r||(r=s.offset),i+=s.content):i?(c?n.push({...s,offset:r,content:i+s.content}):n.push({content:i,offset:r},s),r=0,i=""):n.push(s)}),n})}function kW(t){return t.map(e=>e.flatMap(n=>{if(n.content.match(/^\s+$/))return n;const i=n.content.match(/^(\s*)(.*?)(\s*)$/);if(!i)return n;const[,r,s,o]=i;if(!r&&!o)return n;const l=[{...n,offset:n.offset+r.length,content:s}];return r&&l.unshift({content:r,offset:n.offset}),o&&l.push({content:o,offset:n.offset+r.length+s.length}),l}))}function wW(t){return t.map(e=>{const n=[];for(const i of e){if(n.length===0){n.push({...i});continue}const r=n[n.length-1],s=i1(r.htmlStyle||eg(r)),o=i1(i.htmlStyle||eg(i)),l=r.fontStyle&&(r.fontStyle&kn.Underline||r.fontStyle&kn.Strikethrough),c=i.fontStyle&&(i.fontStyle&kn.Underline||i.fontStyle&kn.Strikethrough);!l&&!c&&s===o?r.content+=i.content:n.push({...i})}return n})}const PW=qG;function TW(t,e,n){var s;const i={meta:{},options:n,codeToHast:(o,l)=>rg(t,o,l),codeToTokens:(o,l)=>ig(t,o,l)};let r=PW(rg(t,e,n,i));for(const o of tg(n))r=((s=o.postprocess)==null?void 0:s.call(i,r,n))||r;return r}const xC={light:"#333333",dark:"#bbbbbb"},vC={light:"#fffffe",dark:"#1e1e1e"},SC="__shiki_resolved";function rS(t){var l,c,h,d,p;if(t!=null&&t[SC])return t;const e={...t};e.tokenColors&&!e.settings&&(e.settings=e.tokenColors,delete e.tokenColors),e.type||(e.type="dark"),e.colorReplacements={...e.colorReplacements},e.settings||(e.settings=[]);let{bg:n,fg:i}=e;if(!n||!i){const g=e.settings?e.settings.find(O=>!O.name&&!O.scope):void 0;(l=g==null?void 0:g.settings)!=null&&l.foreground&&(i=g.settings.foreground),(c=g==null?void 0:g.settings)!=null&&c.background&&(n=g.settings.background),!i&&((h=e==null?void 0:e.colors)!=null&&h["editor.foreground"])&&(i=e.colors["editor.foreground"]),!n&&((d=e==null?void 0:e.colors)!=null&&d["editor.background"])&&(n=e.colors["editor.background"]),i||(i=e.type==="light"?xC.light:xC.dark),n||(n=e.type==="light"?vC.light:vC.dark),e.fg=i,e.bg=n}e.settings[0]&&e.settings[0].settings&&!e.settings[0].scope||e.settings.unshift({settings:{foreground:e.fg,background:e.bg}});let r=0;const s=new Map;function o(g){var x;if(s.has(g))return s.get(g);r+=1;const O=`#${r.toString(16).padStart(8,"0").toLowerCase()}`;return(x=e.colorReplacements)!=null&&x[`#${O}`]?o(g):(s.set(g,O),O)}e.settings=e.settings.map(g=>{var _,k;const O=((_=g.settings)==null?void 0:_.foreground)&&!g.settings.foreground.startsWith("#"),x=((k=g.settings)==null?void 0:k.background)&&!g.settings.background.startsWith("#");if(!O&&!x)return g;const S={...g,settings:{...g.settings}};if(O){const P=o(g.settings.foreground);e.colorReplacements[P]=g.settings.foreground,S.settings.foreground=P}if(x){const P=o(g.settings.background);e.colorReplacements[P]=g.settings.background,S.settings.background=P}return S});for(const g of Object.keys(e.colors||{}))if((g==="editor.foreground"||g==="editor.background"||g.startsWith("terminal.ansi"))&&!((p=e.colors[g])!=null&&p.startsWith("#"))){const O=o(e.colors[g]);e.colorReplacements[O]=e.colors[g],e.colors[g]=O}return Object.defineProperty(e,SC,{enumerable:!1,writable:!1,value:!0}),e}async function LL(t){return Array.from(new Set((await Promise.all(t.filter(e=>!QL(e)).map(async e=>await TL(e).then(n=>Array.isArray(n)?n:[n])))).flat()))}async function ML(t){return(await Promise.all(t.map(async n=>CL(n)?null:rS(await TL(n))))).filter(n=>!!n)}let QW=3;function CW(t,e=3){e>QW||console.trace(`[SHIKI DEPRECATE]: ${t}`)}let uc=class extends Error{constructor(e){super(e),this.name="ShikiError"}};class EW extends ZY{constructor(n,i,r,s={}){super(n);ce(this,"_resolvedThemes",new Map);ce(this,"_resolvedGrammars",new Map);ce(this,"_langMap",new Map);ce(this,"_langGraph",new Map);ce(this,"_textmateThemeCache",new WeakMap);ce(this,"_loadedThemesCache",null);ce(this,"_loadedLanguagesCache",null);this._resolver=n,this._themes=i,this._langs=r,this._alias=s,this._themes.map(o=>this.loadTheme(o)),this.loadLanguages(this._langs)}getTheme(n){return typeof n=="string"?this._resolvedThemes.get(n):this.loadTheme(n)}loadTheme(n){const i=rS(n);return i.name&&(this._resolvedThemes.set(i.name,i),this._loadedThemesCache=null),i}getLoadedThemes(){return this._loadedThemesCache||(this._loadedThemesCache=[...this._resolvedThemes.keys()]),this._loadedThemesCache}setTheme(n){let i=this._textmateThemeCache.get(n);i||(i=Gm.createFromRawTheme(n),this._textmateThemeCache.set(n,i)),this._syncRegistry.setTheme(i)}getGrammar(n){if(this._alias[n]){const i=new Set([n]);for(;this._alias[n];){if(n=this._alias[n],i.has(n))throw new uc(`Circular alias \`${Array.from(i).join(" -> ")} -> ${n}\``);i.add(n)}}return this._resolvedGrammars.get(n)}loadLanguage(n){var o,l,c,h;if(this.getGrammar(n.name))return;const i=new Set([...this._langMap.values()].filter(d=>{var p;return(p=d.embeddedLangsLazy)==null?void 0:p.includes(n.name)}));this._resolver.addLanguage(n);const r={balancedBracketSelectors:n.balancedBracketSelectors||["*"],unbalancedBracketSelectors:n.unbalancedBracketSelectors||[]};this._syncRegistry._rawGrammars.set(n.scopeName,n);const s=this.loadGrammarWithConfiguration(n.scopeName,1,r);if(s.name=n.name,this._resolvedGrammars.set(n.name,s),n.aliases&&n.aliases.forEach(d=>{this._alias[d]=n.name}),this._loadedLanguagesCache=null,i.size)for(const d of i)this._resolvedGrammars.delete(d.name),this._loadedLanguagesCache=null,(l=(o=this._syncRegistry)==null?void 0:o._injectionGrammars)==null||l.delete(d.scopeName),(h=(c=this._syncRegistry)==null?void 0:c._grammars)==null||h.delete(d.scopeName),this.loadLanguage(this._langMap.get(d.name))}dispose(){super.dispose(),this._resolvedThemes.clear(),this._resolvedGrammars.clear(),this._langMap.clear(),this._langGraph.clear(),this._loadedThemesCache=null}loadLanguages(n){for(const s of n)this.resolveEmbeddedLanguages(s);const i=Array.from(this._langGraph.entries()),r=i.filter(([s,o])=>!o);if(r.length){const s=i.filter(([o,l])=>{var c;return l&&((c=l.embeddedLangs)==null?void 0:c.some(h=>r.map(([d])=>d).includes(h)))}).filter(o=>!r.includes(o));throw new uc(`Missing languages ${r.map(([o])=>`\`${o}\``).join(", ")}, required by ${s.map(([o])=>`\`${o}\``).join(", ")}`)}for(const[s,o]of i)this._resolver.addLanguage(o);for(const[s,o]of i)this.loadLanguage(o)}getLoadedLanguages(){return this._loadedLanguagesCache||(this._loadedLanguagesCache=[...new Set([...this._resolvedGrammars.keys(),...Object.keys(this._alias)])]),this._loadedLanguagesCache}resolveEmbeddedLanguages(n){this._langMap.set(n.name,n),this._langGraph.set(n.name,n);const i=n.embeddedLanguages??n.embeddedLangs;if(i)for(const r of i)this._langGraph.set(r,this._langMap.get(r))}}class AW{constructor(e,n){ce(this,"_langs",new Map);ce(this,"_scopeToLang",new Map);ce(this,"_injections",new Map);ce(this,"_onigLib");this._onigLib={createOnigScanner:i=>e.createScanner(i),createOnigString:i=>e.createString(i)},n.forEach(i=>this.addLanguage(i))}get onigLib(){return this._onigLib}getLangRegistration(e){return this._langs.get(e)}loadGrammar(e){return this._scopeToLang.get(e)}addLanguage(e){this._langs.set(e.name,e),e.aliases&&e.aliases.forEach(n=>{this._langs.set(n,e)}),this._scopeToLang.set(e.scopeName,e),e.injectTo&&e.injectTo.forEach(n=>{this._injections.get(n)||this._injections.set(n,[]),this._injections.get(n).push(e.scopeName)})}getInjections(e){const n=e.split(".");let i=[];for(let r=1;r<=n.length;r++){const s=n.slice(0,r).join(".");i=[...i,...this._injections.get(s)||[]]}return i}}let ph=0;function RW(t){ph+=1,t.warnings!==!1&&ph>=10&&ph%10===0&&console.warn(`[Shiki] ${ph} 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 e=!1;if(!t.engine)throw new uc("`engine` option is required for synchronous mode");const n=(t.langs||[]).flat(1),i=(t.themes||[]).flat(1).map(rS),r=new AW(t.engine,n),s=new EW(r,i,n,t.langAlias);let o;function l(P){_();const Q=s.getGrammar(typeof P=="string"?P:P.name);if(!Q)throw new uc(`Language \`${P}\` not found, you may need to load it first`);return Q}function c(P){if(P==="none")return{bg:"",fg:"",name:"none",settings:[],type:"dark"};_();const Q=s.getTheme(P);if(!Q)throw new uc(`Theme \`${P}\` not found, you may need to load it first`);return Q}function h(P){_();const Q=c(P);o!==P&&(s.setTheme(Q),o=P);const R=s.getColorMap();return{theme:Q,colorMap:R}}function d(){return _(),s.getLoadedThemes()}function p(){return _(),s.getLoadedLanguages()}function g(...P){_(),s.loadLanguages(P.flat(1))}async function O(...P){return g(await LL(P))}function x(...P){_();for(const Q of P.flat(1))s.loadTheme(Q)}async function S(...P){return _(),x(await ML(P))}function _(){if(e)throw new uc("Shiki instance has been disposed")}function k(){e||(e=!0,s.dispose(),ph-=1)}return{setTheme:h,getTheme:c,getLanguage:l,getLoadedThemes:d,getLoadedLanguages:p,loadLanguage:O,loadLanguageSync:g,loadTheme:S,loadThemeSync:x,dispose:k,[Symbol.dispose]:k}}async function $W(t){t.engine||CW("`engine` option is required. Use `createOnigurumaEngine` or `createJavaScriptRegexEngine` to create an engine.");const[e,n,i]=await Promise.all([ML(t.themes||[]),LL(t.langs||[]),t.engine]);return RW({...t,themes:e,langs:n,engine:i})}async function LW(t){const e=await $W(t);return{getLastGrammarState:(...n)=>mW(e,...n),codeToTokensBase:(n,i)=>iS(e,n,i),codeToTokensWithThemes:(n,i)=>$L(e,n,i),codeToTokens:(n,i)=>ig(e,n,i),codeToHast:(n,i)=>rg(e,n,i),codeToHtml:(n,i)=>TW(e,n,i),getBundledLanguages:()=>({}),getBundledThemes:()=>({}),...e,getInternalContext:()=>e}}function MW(t){const e=t.langs,n=t.themes,i=t.engine;async function r(s){function o(p){var g;if(typeof p=="string"){if(QL(p))return[];p=((g=s.langAlias)==null?void 0:g[p])||p;const O=e[p];if(!O)throw new Gt(`Language \`${p}\` is not included in this bundle. You may want to load it from external source.`);return O}return p}function l(p){if(CL(p))return"none";if(typeof p=="string"){const g=n[p];if(!g)throw new Gt(`Theme \`${p}\` is not included in this bundle. You may want to load it from external source.`);return g}return p}const c=(s.themes??[]).map(p=>l(p)),h=(s.langs??[]).map(p=>o(p)),d=await LW({engine:s.engine??i(),...s,themes:c,langs:h});return{...d,loadLanguage(...p){return d.loadLanguage(...p.map(o))},loadTheme(...p){return d.loadTheme(...p.map(l))},getBundledLanguages(){return e},getBundledThemes(){return n}}}return r}function DW(t){let e;async function n(i={}){if(e){const r=await e;return await Promise.all([r.loadTheme(...i.themes||[]),r.loadLanguage(...i.langs||[])]),r}else{e=t({...i,themes:[],langs:[]});const r=await e;return await Promise.all([r.loadTheme(...i.themes||[]),r.loadLanguage(...i.langs||[])]),r}}return n}function jW(t,e){const n=DW(t);async function i(r,s){var c;const o=await n({langs:[s.lang],themes:"theme"in s?[s.theme]:Object.values(s.themes)}),l=await((c=e==null?void 0:e.guessEmbeddedLanguages)==null?void 0:c.call(e,r,s.lang,o));return l&&await o.loadLanguage(...l),o}return{getSingletonHighlighter(r){return n(r)},async codeToHtml(r,s){return(await i(r,s)).codeToHtml(r,s)},async codeToHast(r,s){return(await i(r,s)).codeToHast(r,s)},async codeToTokens(r,s){return(await i(r,s)).codeToTokens(r,s)},async codeToTokensBase(r,s){return(await i(r,s)).codeToTokensBase(r,s)},async codeToTokensWithThemes(r,s){return(await i(r,s)).codeToTokensWithThemes(r,s)},async getLastGrammarState(r,s){return(await n({langs:[s.lang],themes:[s.theme]})).getLastGrammarState(r,s)}}}const DL=[{id:"abap",name:"ABAP",import:(()=>T(()=>import("./abap-BdImnpbu.js"),[]))},{id:"actionscript-3",name:"ActionScript",import:(()=>T(()=>import("./actionscript-3-CfeIJUat.js"),[]))},{id:"ada",name:"Ada",import:(()=>T(()=>import("./ada-bCR0ucgS.js"),[]))},{id:"angular-html",name:"Angular HTML",import:(()=>T(()=>import("./angular-html-CU67Zn6k.js").then(t=>t.f),__vite__mapDeps([0,1,2,3])))},{id:"angular-ts",name:"Angular TypeScript",import:(()=>T(()=>import("./angular-ts-BwZT4LLn.js"),__vite__mapDeps([4,0,1,2,3,5])))},{id:"apache",name:"Apache Conf",import:(()=>T(()=>import("./apache-Pmp26Uib.js"),[]))},{id:"apex",name:"Apex",import:(()=>T(()=>import("./apex-DDbsPZ6N.js"),[]))},{id:"apl",name:"APL",import:(()=>T(()=>import("./apl-dKokRX4l.js"),__vite__mapDeps([6,1,2,3,7,8,9])))},{id:"applescript",name:"AppleScript",import:(()=>T(()=>import("./applescript-Co6uUVPk.js"),[]))},{id:"ara",name:"Ara",import:(()=>T(()=>import("./ara-BRHolxvo.js"),[]))},{id:"asciidoc",name:"AsciiDoc",aliases:["adoc"],import:(()=>T(()=>import("./asciidoc-Dv7Oe6Be.js"),[]))},{id:"asm",name:"Assembly",import:(()=>T(()=>import("./asm-D_Q5rh1f.js"),[]))},{id:"astro",name:"Astro",import:(()=>T(()=>import("./astro-CbQHKStN.js"),__vite__mapDeps([10,9,2,11,3,12,13])))},{id:"awk",name:"AWK",import:(()=>T(()=>import("./awk-DMzUqQB5.js"),[]))},{id:"ballerina",name:"Ballerina",import:(()=>T(()=>import("./ballerina-BFfxhgS-.js"),[]))},{id:"bat",name:"Batch File",aliases:["batch"],import:(()=>T(()=>import("./bat-BkioyH1T.js"),[]))},{id:"beancount",name:"Beancount",import:(()=>T(()=>import("./beancount-k_qm7-4y.js"),[]))},{id:"berry",name:"Berry",aliases:["be"],import:(()=>T(()=>import("./berry-uYugtg8r.js"),[]))},{id:"bibtex",name:"BibTeX",import:(()=>T(()=>import("./bibtex-CHM0blh-.js"),[]))},{id:"bicep",name:"Bicep",import:(()=>T(()=>import("./bicep-Bmn6On1c.js"),[]))},{id:"blade",name:"Blade",import:(()=>T(()=>import("./blade-DVc8C-J4.js"),__vite__mapDeps([14,15,1,2,3,7,8,16,9])))},{id:"bsl",name:"1C (Enterprise)",aliases:["1c"],import:(()=>T(()=>import("./bsl-BO_Y6i37.js"),__vite__mapDeps([17,18])))},{id:"c",name:"C",import:(()=>T(()=>import("./c-BIGW1oBm.js"),[]))},{id:"cadence",name:"Cadence",aliases:["cdc"],import:(()=>T(()=>import("./cadence-Bv_4Rxtq.js"),[]))},{id:"cairo",name:"Cairo",import:(()=>T(()=>import("./cairo-KRGpt6FW.js"),__vite__mapDeps([19,20])))},{id:"clarity",name:"Clarity",import:(()=>T(()=>import("./clarity-D53aC0YG.js"),[]))},{id:"clojure",name:"Clojure",aliases:["clj"],import:(()=>T(()=>import("./clojure-P80f7IUj.js"),[]))},{id:"cmake",name:"CMake",import:(()=>T(()=>import("./cmake-D1j8_8rp.js"),[]))},{id:"cobol",name:"COBOL",import:(()=>T(()=>import("./cobol-nwyudZeR.js"),__vite__mapDeps([21,1,2,3,8])))},{id:"codeowners",name:"CODEOWNERS",import:(()=>T(()=>import("./codeowners-Bp6g37R7.js"),[]))},{id:"codeql",name:"CodeQL",aliases:["ql"],import:(()=>T(()=>import("./codeql-DsOJ9woJ.js"),[]))},{id:"coffee",name:"CoffeeScript",aliases:["coffeescript"],import:(()=>T(()=>import("./coffee-Ch7k5sss.js"),__vite__mapDeps([22,2])))},{id:"common-lisp",name:"Common Lisp",aliases:["lisp"],import:(()=>T(()=>import("./common-lisp-Cg-RD9OK.js"),[]))},{id:"coq",name:"Coq",import:(()=>T(()=>import("./coq-DkFqJrB1.js"),[]))},{id:"cpp",name:"C++",aliases:["c++"],import:(()=>T(()=>import("./cpp-CofmeUqb.js"),__vite__mapDeps([23,24,25,26,16])))},{id:"crystal",name:"Crystal",import:(()=>T(()=>import("./crystal-tKQVLTB8.js"),__vite__mapDeps([27,1,2,3,16,26,28])))},{id:"csharp",name:"C#",aliases:["c#","cs"],import:(()=>T(()=>import("./csharp-K5feNrxe.js"),[]))},{id:"css",name:"CSS",import:(()=>T(()=>import("./css-DPfMkruS.js"),[]))},{id:"csv",name:"CSV",import:(()=>T(()=>import("./csv-fuZLfV_i.js"),[]))},{id:"cue",name:"CUE",import:(()=>T(()=>import("./cue-D82EKSYY.js"),[]))},{id:"cypher",name:"Cypher",aliases:["cql"],import:(()=>T(()=>import("./cypher-COkxafJQ.js"),[]))},{id:"d",name:"D",import:(()=>T(()=>import("./d-85-TOEBH.js"),[]))},{id:"dart",name:"Dart",import:(()=>T(()=>import("./dart-CF10PKvl.js"),[]))},{id:"dax",name:"DAX",import:(()=>T(()=>import("./dax-CEL-wOlO.js"),[]))},{id:"desktop",name:"Desktop",import:(()=>T(()=>import("./desktop-BmXAJ9_W.js"),[]))},{id:"diff",name:"Diff",import:(()=>T(()=>import("./diff-D97Zzqfu.js"),[]))},{id:"docker",name:"Dockerfile",aliases:["dockerfile"],import:(()=>T(()=>import("./docker-BcOcwvcX.js"),[]))},{id:"dotenv",name:"dotEnv",import:(()=>T(()=>import("./dotenv-Da5cRb03.js"),[]))},{id:"dream-maker",name:"Dream Maker",import:(()=>T(()=>import("./dream-maker-BtqSS_iP.js"),[]))},{id:"edge",name:"Edge",import:(()=>T(()=>import("./edge-BkV0erSs.js"),__vite__mapDeps([29,11,1,2,3,15])))},{id:"elixir",name:"Elixir",import:(()=>T(()=>import("./elixir-CDX3lj18.js"),__vite__mapDeps([30,1,2,3])))},{id:"elm",name:"Elm",import:(()=>T(()=>import("./elm-DbKCFpqz.js"),__vite__mapDeps([31,25,26])))},{id:"emacs-lisp",name:"Emacs Lisp",aliases:["elisp"],import:(()=>T(()=>import("./emacs-lisp-C9XAeP06.js"),[]))},{id:"erb",name:"ERB",import:(()=>T(()=>import("./erb-BOJIQeun.js"),__vite__mapDeps([32,1,2,3,33,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"erlang",name:"Erlang",aliases:["erl"],import:(()=>T(()=>import("./erlang-DsQrWhSR.js"),__vite__mapDeps([39,40])))},{id:"fennel",name:"Fennel",import:(()=>T(()=>import("./fennel-BYunw83y.js"),[]))},{id:"fish",name:"Fish",import:(()=>T(()=>import("./fish-BvzEVeQv.js"),[]))},{id:"fluent",name:"Fluent",aliases:["ftl"],import:(()=>T(()=>import("./fluent-C4IJs8-o.js"),[]))},{id:"fortran-fixed-form",name:"Fortran (Fixed Form)",aliases:["f","for","f77"],import:(()=>T(()=>import("./fortran-fixed-form-BZjJHVRy.js"),__vite__mapDeps([41,42])))},{id:"fortran-free-form",name:"Fortran (Free Form)",aliases:["f90","f95","f03","f08","f18"],import:(()=>T(()=>import("./fortran-free-form-D22FLkUw.js"),[]))},{id:"fsharp",name:"F#",aliases:["f#","fs"],import:(()=>T(()=>import("./fsharp-CXgrBDvD.js"),__vite__mapDeps([43,40])))},{id:"gdresource",name:"GDResource",import:(()=>T(()=>import("./gdresource-B7Tvp0Sc.js"),__vite__mapDeps([44,45,46])))},{id:"gdscript",name:"GDScript",import:(()=>T(()=>import("./gdscript-DTMYz4Jt.js"),[]))},{id:"gdshader",name:"GDShader",import:(()=>T(()=>import("./gdshader-DkwncUOv.js"),[]))},{id:"genie",name:"Genie",import:(()=>T(()=>import("./genie-D0YGMca9.js"),[]))},{id:"gherkin",name:"Gherkin",import:(()=>T(()=>import("./gherkin-DyxjwDmM.js"),[]))},{id:"git-commit",name:"Git Commit Message",import:(()=>T(()=>import("./git-commit-F4YmCXRG.js"),__vite__mapDeps([47,48])))},{id:"git-rebase",name:"Git Rebase Message",import:(()=>T(()=>import("./git-rebase-r7XF79zn.js"),__vite__mapDeps([49,28])))},{id:"gleam",name:"Gleam",import:(()=>T(()=>import("./gleam-BspZqrRM.js"),[]))},{id:"glimmer-js",name:"Glimmer JS",aliases:["gjs"],import:(()=>T(()=>import("./glimmer-js-Rg0-pVw9.js"),__vite__mapDeps([50,2,11,3,1])))},{id:"glimmer-ts",name:"Glimmer TS",aliases:["gts"],import:(()=>T(()=>import("./glimmer-ts-U6CK756n.js"),__vite__mapDeps([51,11,3,2,1])))},{id:"glsl",name:"GLSL",import:(()=>T(()=>import("./glsl-DplSGwfg.js"),__vite__mapDeps([25,26])))},{id:"gnuplot",name:"Gnuplot",import:(()=>T(()=>import("./gnuplot-DdkO51Og.js"),[]))},{id:"go",name:"Go",import:(()=>T(()=>import("./go-Dn2_MT6a.js"),[]))},{id:"graphql",name:"GraphQL",aliases:["gql"],import:(()=>T(()=>import("./graphql-ChdNCCLP.js"),__vite__mapDeps([35,2,11,36,13])))},{id:"groovy",name:"Groovy",import:(()=>T(()=>import("./groovy-gcz8RCvz.js"),[]))},{id:"hack",name:"Hack",import:(()=>T(()=>import("./hack-CaT9iCJl.js"),__vite__mapDeps([52,1,2,3,16])))},{id:"haml",name:"Ruby Haml",import:(()=>T(()=>import("./haml-B8DHNrY2.js"),__vite__mapDeps([34,2,3])))},{id:"handlebars",name:"Handlebars",aliases:["hbs"],import:(()=>T(()=>import("./handlebars-BL8al0AC.js"),__vite__mapDeps([53,1,2,3,38])))},{id:"haskell",name:"Haskell",aliases:["hs"],import:(()=>T(()=>import("./haskell-Df6bDoY_.js"),[]))},{id:"haxe",name:"Haxe",import:(()=>T(()=>import("./haxe-CzTSHFRz.js"),[]))},{id:"hcl",name:"HashiCorp HCL",import:(()=>T(()=>import("./hcl-BWvSN4gD.js"),[]))},{id:"hjson",name:"Hjson",import:(()=>T(()=>import("./hjson-D5-asLiD.js"),[]))},{id:"hlsl",name:"HLSL",import:(()=>T(()=>import("./hlsl-D3lLCCz7.js"),[]))},{id:"html",name:"HTML",import:(()=>T(()=>import("./html-GMplVEZG.js"),__vite__mapDeps([1,2,3])))},{id:"html-derivative",name:"HTML (Derivative)",import:(()=>T(()=>import("./html-derivative-BFtXZ54Q.js"),__vite__mapDeps([15,1,2,3])))},{id:"http",name:"HTTP",import:(()=>T(()=>import("./http-jrhK8wxY.js"),__vite__mapDeps([54,28,9,7,8,35,2,11,36,13])))},{id:"hurl",name:"Hurl",import:(()=>T(()=>import("./hurl-irOxFIW8.js"),__vite__mapDeps([55,35,2,11,36,13,7,8,56])))},{id:"hxml",name:"HXML",import:(()=>T(()=>import("./hxml-Bvhsp5Yf.js"),__vite__mapDeps([57,58])))},{id:"hy",name:"Hy",import:(()=>T(()=>import("./hy-DFXneXwc.js"),[]))},{id:"imba",name:"Imba",import:(()=>T(()=>import("./imba-DGztddWO.js"),[]))},{id:"ini",name:"INI",aliases:["properties"],import:(()=>T(()=>import("./ini-BEwlwnbL.js"),[]))},{id:"java",name:"Java",import:(()=>T(()=>import("./java-CylS5w8V.js"),[]))},{id:"javascript",name:"JavaScript",aliases:["js","cjs","mjs"],import:(()=>T(()=>import("./javascript-wDzz0qaB.js"),[]))},{id:"jinja",name:"Jinja",import:(()=>T(()=>import("./jinja-4LBKfQ-Z.js"),__vite__mapDeps([59,1,2,3])))},{id:"jison",name:"Jison",import:(()=>T(()=>import("./jison-wvAkD_A8.js"),__vite__mapDeps([60,2])))},{id:"json",name:"JSON",import:(()=>T(()=>import("./json-Cp-IABpG.js"),[]))},{id:"json5",name:"JSON5",import:(()=>T(()=>import("./json5-C9tS-k6U.js"),[]))},{id:"jsonc",name:"JSON with Comments",import:(()=>T(()=>import("./jsonc-Des-eS-w.js"),[]))},{id:"jsonl",name:"JSON Lines",import:(()=>T(()=>import("./jsonl-DcaNXYhu.js"),[]))},{id:"jsonnet",name:"Jsonnet",import:(()=>T(()=>import("./jsonnet-DFQXde-d.js"),[]))},{id:"jssm",name:"JSSM",aliases:["fsl"],import:(()=>T(()=>import("./jssm-C2t-YnRu.js"),[]))},{id:"jsx",name:"JSX",import:(()=>T(()=>import("./jsx-g9-lgVsj.js"),[]))},{id:"julia",name:"Julia",aliases:["jl"],import:(()=>T(()=>import("./julia-C8NyazO9.js"),__vite__mapDeps([61,23,24,25,26,16,20,2,62])))},{id:"kdl",name:"KDL",import:(()=>T(()=>import("./kdl-DV7GczEv.js"),[]))},{id:"kotlin",name:"Kotlin",aliases:["kt","kts"],import:(()=>T(()=>import("./kotlin-BdnUsdx6.js"),[]))},{id:"kusto",name:"Kusto",aliases:["kql"],import:(()=>T(()=>import("./kusto-BvAqAH-y.js"),[]))},{id:"latex",name:"LaTeX",import:(()=>T(()=>import("./latex-BdAV_C_H.js"),__vite__mapDeps([63,64,62])))},{id:"lean",name:"Lean 4",aliases:["lean4"],import:(()=>T(()=>import("./lean-Bc6EcWN3.js"),[]))},{id:"less",name:"Less",import:(()=>T(()=>import("./less-B1dDrJ26.js"),[]))},{id:"liquid",name:"Liquid",import:(()=>T(()=>import("./liquid-DYVedYrR.js"),__vite__mapDeps([65,1,2,3,9])))},{id:"llvm",name:"LLVM IR",import:(()=>T(()=>import("./llvm-BtvRca6l.js"),[]))},{id:"log",name:"Log file",import:(()=>T(()=>import("./log-2UxHyX5q.js"),[]))},{id:"logo",name:"Logo",import:(()=>T(()=>import("./logo-BtOb2qkB.js"),[]))},{id:"lua",name:"Lua",import:(()=>T(()=>import("./lua-BbnMAYS6.js"),__vite__mapDeps([37,26])))},{id:"luau",name:"Luau",import:(()=>T(()=>import("./luau-CXu1NL6O.js"),[]))},{id:"make",name:"Makefile",aliases:["makefile"],import:(()=>T(()=>import("./make-CHLpvVh8.js"),[]))},{id:"markdown",name:"Markdown",aliases:["md"],import:(()=>T(()=>import("./markdown-Cvjx9yec.js"),[]))},{id:"marko",name:"Marko",import:(()=>T(()=>import("./marko-CPi9NSCl.js"),__vite__mapDeps([66,3,67,5,11])))},{id:"matlab",name:"MATLAB",import:(()=>T(()=>import("./matlab-D7o27uSR.js"),[]))},{id:"mdc",name:"MDC",import:(()=>T(()=>import("./mdc-DUICxH0z.js"),__vite__mapDeps([68,40,38,15,1,2,3])))},{id:"mdx",name:"MDX",import:(()=>T(()=>import("./mdx-Cmh6b_Ma.js"),[]))},{id:"mermaid",name:"Mermaid",aliases:["mmd"],import:(()=>T(()=>import("./mermaid-DKYwYmdq.js"),[]))},{id:"mipsasm",name:"MIPS Assembly",aliases:["mips"],import:(()=>T(()=>import("./mipsasm-CKIfxQSi.js"),[]))},{id:"mojo",name:"Mojo",import:(()=>T(()=>import("./mojo-1DNp92w6.js"),[]))},{id:"move",name:"Move",import:(()=>T(()=>import("./move-Bu9oaDYs.js"),[]))},{id:"narrat",name:"Narrat Language",aliases:["nar"],import:(()=>T(()=>import("./narrat-DRg8JJMk.js"),[]))},{id:"nextflow",name:"Nextflow",aliases:["nf"],import:(()=>T(()=>import("./nextflow-BrzmwbiE.js"),[]))},{id:"nginx",name:"Nginx",import:(()=>T(()=>import("./nginx-DknmC5AR.js"),__vite__mapDeps([69,37,26])))},{id:"nim",name:"Nim",import:(()=>T(()=>import("./nim-CVrawwO9.js"),__vite__mapDeps([70,26,1,2,3,7,8,25,40])))},{id:"nix",name:"Nix",import:(()=>T(()=>import("./nix-c8nO5XWb.js"),[]))},{id:"nushell",name:"nushell",aliases:["nu"],import:(()=>T(()=>import("./nushell-C-sUppwS.js"),[]))},{id:"objective-c",name:"Objective-C",aliases:["objc"],import:(()=>T(()=>import("./objective-c-DXmwc3jG.js"),[]))},{id:"objective-cpp",name:"Objective-C++",import:(()=>T(()=>import("./objective-cpp-CLxacb5B.js"),[]))},{id:"ocaml",name:"OCaml",import:(()=>T(()=>import("./ocaml-C0hk2d4L.js"),[]))},{id:"openscad",name:"OpenSCAD",aliases:["scad"],import:(()=>T(()=>import("./openscad-C4EeE6gA.js"),[]))},{id:"pascal",name:"Pascal",import:(()=>T(()=>import("./pascal-D93ZcfNL.js"),[]))},{id:"perl",name:"Perl",import:(()=>T(()=>import("./perl-C0TMdlhV.js"),__vite__mapDeps([71,1,2,3,7,8,16])))},{id:"php",name:"PHP",import:(()=>T(()=>import("./php-CDn_0X-4.js"),__vite__mapDeps([72,1,2,3,7,8,16,9])))},{id:"pkl",name:"Pkl",import:(()=>T(()=>import("./pkl-u5AG7uiY.js"),[]))},{id:"plsql",name:"PL/SQL",import:(()=>T(()=>import("./plsql-ChMvpjG-.js"),[]))},{id:"po",name:"Gettext PO",aliases:["pot","potx"],import:(()=>T(()=>import("./po-BTJTHyun.js"),[]))},{id:"polar",name:"Polar",import:(()=>T(()=>import("./polar-C0HS_06l.js"),[]))},{id:"postcss",name:"PostCSS",import:(()=>T(()=>import("./postcss-CXtECtnM.js"),[]))},{id:"powerquery",name:"PowerQuery",import:(()=>T(()=>import("./powerquery-CEu0bR-o.js"),[]))},{id:"powershell",name:"PowerShell",aliases:["ps","ps1"],import:(()=>T(()=>import("./powershell-Dpen1YoG.js"),[]))},{id:"prisma",name:"Prisma",import:(()=>T(()=>import("./prisma-Dd19v3D-.js"),[]))},{id:"prolog",name:"Prolog",import:(()=>T(()=>import("./prolog-CbFg5uaA.js"),[]))},{id:"proto",name:"Protocol Buffer 3",aliases:["protobuf"],import:(()=>T(()=>import("./proto-DyJlTyXw.js"),[]))},{id:"pug",name:"Pug",aliases:["jade"],import:(()=>T(()=>import("./pug-CGlum2m_.js"),__vite__mapDeps([73,2,3,1])))},{id:"puppet",name:"Puppet",import:(()=>T(()=>import("./puppet-BMWR74SV.js"),[]))},{id:"purescript",name:"PureScript",import:(()=>T(()=>import("./purescript-CklMAg4u.js"),[]))},{id:"python",name:"Python",aliases:["py"],import:(()=>T(()=>import("./python-B6aJPvgy.js"),[]))},{id:"qml",name:"QML",import:(()=>T(()=>import("./qml-3beO22l8.js"),__vite__mapDeps([74,2])))},{id:"qmldir",name:"QML Directory",import:(()=>T(()=>import("./qmldir-C8lEn-DE.js"),[]))},{id:"qss",name:"Qt Style Sheets",import:(()=>T(()=>import("./qss-IeuSbFQv.js"),[]))},{id:"r",name:"R",import:(()=>T(()=>import("./r-DiinP2Uv.js"),[]))},{id:"racket",name:"Racket",import:(()=>T(()=>import("./racket-BqYA7rlc.js"),[]))},{id:"raku",name:"Raku",aliases:["perl6"],import:(()=>T(()=>import("./raku-DXvB9xmW.js"),[]))},{id:"razor",name:"ASP.NET Razor",import:(()=>T(()=>import("./razor-CE9lU5zL.js"),__vite__mapDeps([75,1,2,3,76])))},{id:"reg",name:"Windows Registry Script",import:(()=>T(()=>import("./reg-C-SQnVFl.js"),[]))},{id:"regexp",name:"RegExp",aliases:["regex"],import:(()=>T(()=>import("./regexp-CDVJQ6XC.js"),[]))},{id:"rel",name:"Rel",import:(()=>T(()=>import("./rel-C3B-1QV4.js"),[]))},{id:"riscv",name:"RISC-V",import:(()=>T(()=>import("./riscv-BM1_JUlF.js"),[]))},{id:"rosmsg",name:"ROS Interface",import:(()=>T(()=>import("./rosmsg-BJDFO7_C.js"),[]))},{id:"rst",name:"reStructuredText",import:(()=>T(()=>import("./rst-B0xPkSld.js"),__vite__mapDeps([77,15,1,2,3,23,24,25,26,16,20,28,38,78,33,34,7,8,35,11,36,13,37])))},{id:"ruby",name:"Ruby",aliases:["rb"],import:(()=>T(()=>import("./ruby-BvKwtOVI.js"),__vite__mapDeps([33,1,2,3,34,7,8,16,35,11,36,13,23,24,25,26,28,37,38])))},{id:"rust",name:"Rust",aliases:["rs"],import:(()=>T(()=>import("./rust-B1yitclQ.js"),[]))},{id:"sas",name:"SAS",import:(()=>T(()=>import("./sas-cz2c8ADy.js"),__vite__mapDeps([79,16])))},{id:"sass",name:"Sass",import:(()=>T(()=>import("./sass-Cj5Yp3dK.js"),[]))},{id:"scala",name:"Scala",import:(()=>T(()=>import("./scala-C151Ov-r.js"),[]))},{id:"scheme",name:"Scheme",import:(()=>T(()=>import("./scheme-C98Dy4si.js"),[]))},{id:"scss",name:"SCSS",import:(()=>T(()=>import("./scss-OYdSNvt2.js"),__vite__mapDeps([5,3])))},{id:"sdbl",name:"1C (Query)",aliases:["1c-query"],import:(()=>T(()=>import("./sdbl-DVxCFoDh.js"),[]))},{id:"shaderlab",name:"ShaderLab",aliases:["shader"],import:(()=>T(()=>import("./shaderlab-Dg9Lc6iA.js"),__vite__mapDeps([80,81])))},{id:"shellscript",name:"Shell",aliases:["bash","sh","shell","zsh"],import:(()=>T(()=>import("./shellscript-Yzrsuije.js"),[]))},{id:"shellsession",name:"Shell Session",aliases:["console"],import:(()=>T(()=>import("./shellsession-BADoaaVG.js"),__vite__mapDeps([82,28])))},{id:"smalltalk",name:"Smalltalk",import:(()=>T(()=>import("./smalltalk-BERRCDM3.js"),[]))},{id:"solidity",name:"Solidity",import:(()=>T(()=>import("./solidity-rGO070M0.js"),[]))},{id:"soy",name:"Closure Templates",aliases:["closure-templates"],import:(()=>T(()=>import("./soy-Brmx7dQM.js"),__vite__mapDeps([83,1,2,3])))},{id:"sparql",name:"SPARQL",import:(()=>T(()=>import("./sparql-rVzFXLq3.js"),__vite__mapDeps([84,85])))},{id:"splunk",name:"Splunk Query Language",aliases:["spl"],import:(()=>T(()=>import("./splunk-BtCnVYZw.js"),[]))},{id:"sql",name:"SQL",import:(()=>T(()=>import("./sql-BLtJtn59.js"),[]))},{id:"ssh-config",name:"SSH Config",import:(()=>T(()=>import("./ssh-config-_ykCGR6B.js"),[]))},{id:"stata",name:"Stata",import:(()=>T(()=>import("./stata-BH5u7GGu.js"),__vite__mapDeps([86,16])))},{id:"stylus",name:"Stylus",aliases:["styl"],import:(()=>T(()=>import("./stylus-BEDo0Tqx.js"),[]))},{id:"svelte",name:"Svelte",import:(()=>T(()=>import("./svelte-3Dk4HxPD.js"),__vite__mapDeps([87,2,11,3,12])))},{id:"swift",name:"Swift",import:(()=>T(()=>import("./swift-Dg5xB15N.js"),[]))},{id:"system-verilog",name:"SystemVerilog",import:(()=>T(()=>import("./system-verilog-CnnmHF94.js"),[]))},{id:"systemd",name:"Systemd Units",import:(()=>T(()=>import("./systemd-4A_iFExJ.js"),[]))},{id:"talonscript",name:"TalonScript",aliases:["talon"],import:(()=>T(()=>import("./talonscript-CkByrt1z.js"),[]))},{id:"tasl",name:"Tasl",import:(()=>T(()=>import("./tasl-QIJgUcNo.js"),[]))},{id:"tcl",name:"Tcl",import:(()=>T(()=>import("./tcl-dwOrl1Do.js"),[]))},{id:"templ",name:"Templ",import:(()=>T(()=>import("./templ-W15q3VgB.js"),__vite__mapDeps([88,89,2,3])))},{id:"terraform",name:"Terraform",aliases:["tf","tfvars"],import:(()=>T(()=>import("./terraform-BETggiCN.js"),[]))},{id:"tex",name:"TeX",import:(()=>T(()=>import("./tex-CxkMU7Pf.js"),__vite__mapDeps([64,62])))},{id:"toml",name:"TOML",import:(()=>T(()=>import("./toml-vGWfd6FD.js"),[]))},{id:"ts-tags",name:"TypeScript with Tags",aliases:["lit"],import:(()=>T(()=>import("./ts-tags-zn1MmPIZ.js"),__vite__mapDeps([90,11,3,2,25,26,1,16,7,8])))},{id:"tsv",name:"TSV",import:(()=>T(()=>import("./tsv-B_m7g4N7.js"),[]))},{id:"tsx",name:"TSX",import:(()=>T(()=>import("./tsx-COt5Ahok.js"),[]))},{id:"turtle",name:"Turtle",import:(()=>T(()=>import("./turtle-BsS91CYL.js"),[]))},{id:"twig",name:"Twig",import:(()=>T(()=>import("./twig-CO9l9SDP.js"),__vite__mapDeps([91,3,2,5,72,1,7,8,16,9,20,33,34,35,11,36,13,23,24,25,26,28,37,38])))},{id:"typescript",name:"TypeScript",aliases:["ts","cts","mts"],import:(()=>T(()=>import("./typescript-BPQ3VLAy.js"),[]))},{id:"typespec",name:"TypeSpec",aliases:["tsp"],import:(()=>T(()=>import("./typespec-BGHnOYBU.js"),[]))},{id:"typst",name:"Typst",aliases:["typ"],import:(()=>T(()=>import("./typst-DHCkPAjA.js"),[]))},{id:"v",name:"V",import:(()=>T(()=>import("./v-BcVCzyr7.js"),[]))},{id:"vala",name:"Vala",import:(()=>T(()=>import("./vala-CsfeWuGM.js"),[]))},{id:"vb",name:"Visual Basic",aliases:["cmd"],import:(()=>T(()=>import("./vb-D17OF-Vu.js"),[]))},{id:"verilog",name:"Verilog",import:(()=>T(()=>import("./verilog-BQ8w6xss.js"),[]))},{id:"vhdl",name:"VHDL",import:(()=>T(()=>import("./vhdl-CeAyd5Ju.js"),[]))},{id:"viml",name:"Vim Script",aliases:["vim","vimscript"],import:(()=>T(()=>import("./viml-CJc9bBzg.js"),[]))},{id:"vue",name:"Vue",import:(()=>T(()=>import("./vue-DnHKYNfI.js"),__vite__mapDeps([92,3,2,11,9,15,1])))},{id:"vue-html",name:"Vue HTML",import:(()=>T(()=>import("./vue-html-CChd_i61.js"),__vite__mapDeps([93,92,3,2,11,9,15,1])))},{id:"vue-vine",name:"Vue Vine",import:(()=>T(()=>import("./vue-vine-8moa0y9V.js"),__vite__mapDeps([94,3,5,67,95,12,92,2,11,9,15,1])))},{id:"vyper",name:"Vyper",aliases:["vy"],import:(()=>T(()=>import("./vyper-CDx5xZoG.js"),[]))},{id:"wasm",name:"WebAssembly",import:(()=>T(()=>import("./wasm-MzD3tlZU.js"),[]))},{id:"wenyan",name:"Wenyan",aliases:["文言"],import:(()=>T(()=>import("./wenyan-BV7otONQ.js"),[]))},{id:"wgsl",name:"WGSL",import:(()=>T(()=>import("./wgsl-Dx-B1_4e.js"),[]))},{id:"wikitext",name:"Wikitext",aliases:["mediawiki","wiki"],import:(()=>T(()=>import("./wikitext-BhOHFoWU.js"),[]))},{id:"wit",name:"WebAssembly Interface Types",import:(()=>T(()=>import("./wit-5i3qLPDT.js"),[]))},{id:"wolfram",name:"Wolfram",aliases:["wl"],import:(()=>T(()=>import("./wolfram-lXgVvXCa.js"),[]))},{id:"xml",name:"XML",import:(()=>T(()=>import("./xml-sdJ4AIDG.js"),__vite__mapDeps([7,8])))},{id:"xsl",name:"XSL",import:(()=>T(()=>import("./xsl-CtQFsRM5.js"),__vite__mapDeps([96,7,8])))},{id:"yaml",name:"YAML",aliases:["yml"],import:(()=>T(()=>import("./yaml-Buea-lGh.js"),[]))},{id:"zenscript",name:"ZenScript",import:(()=>T(()=>import("./zenscript-DVFEvuxE.js"),[]))},{id:"zig",name:"Zig",import:(()=>T(()=>import("./zig-VOosw3JB.js"),[]))}],NW=Object.fromEntries(DL.map(t=>[t.id,t.import])),zW=Object.fromEntries(DL.flatMap(t=>{var e;return((e=t.aliases)==null?void 0:e.map(n=>[n,t.import]))||[]})),IW={...NW,...zW},XW=[{id:"andromeeda",displayName:"Andromeeda",type:"dark",import:(()=>T(()=>import("./andromeeda-C-Jbm3Hp.js"),[]))},{id:"aurora-x",displayName:"Aurora X",type:"dark",import:(()=>T(()=>import("./aurora-x-D-2ljcwZ.js"),[]))},{id:"ayu-dark",displayName:"Ayu Dark",type:"dark",import:(()=>T(()=>import("./ayu-dark-Cv9koXgw.js"),[]))},{id:"catppuccin-frappe",displayName:"Catppuccin Frappé",type:"dark",import:(()=>T(()=>import("./catppuccin-frappe-DFWUc33u.js"),[]))},{id:"catppuccin-latte",displayName:"Catppuccin Latte",type:"light",import:(()=>T(()=>import("./catppuccin-latte-C9dUb6Cb.js"),[]))},{id:"catppuccin-macchiato",displayName:"Catppuccin Macchiato",type:"dark",import:(()=>T(()=>import("./catppuccin-macchiato-DQyhUUbL.js"),[]))},{id:"catppuccin-mocha",displayName:"Catppuccin Mocha",type:"dark",import:(()=>T(()=>import("./catppuccin-mocha-D87Tk5Gz.js"),[]))},{id:"dark-plus",displayName:"Dark Plus",type:"dark",import:(()=>T(()=>import("./dark-plus-C3mMm8J8.js"),[]))},{id:"dracula",displayName:"Dracula Theme",type:"dark",import:(()=>T(()=>import("./dracula-BzJJZx-M.js"),[]))},{id:"dracula-soft",displayName:"Dracula Theme Soft",type:"dark",import:(()=>T(()=>import("./dracula-soft-BXkSAIEj.js"),[]))},{id:"everforest-dark",displayName:"Everforest Dark",type:"dark",import:(()=>T(()=>import("./everforest-dark-BgDCqdQA.js"),[]))},{id:"everforest-light",displayName:"Everforest Light",type:"light",import:(()=>T(()=>import("./everforest-light-C8M2exoo.js"),[]))},{id:"github-dark",displayName:"GitHub Dark",type:"dark",import:(()=>T(()=>import("./github-dark-DHJKELXO.js"),[]))},{id:"github-dark-default",displayName:"GitHub Dark Default",type:"dark",import:(()=>T(()=>import("./github-dark-default-Cuk6v7N8.js"),[]))},{id:"github-dark-dimmed",displayName:"GitHub Dark Dimmed",type:"dark",import:(()=>T(()=>import("./github-dark-dimmed-DH5Ifo-i.js"),[]))},{id:"github-dark-high-contrast",displayName:"GitHub Dark High Contrast",type:"dark",import:(()=>T(()=>import("./github-dark-high-contrast-E3gJ1_iC.js"),[]))},{id:"github-light",displayName:"GitHub Light",type:"light",import:(()=>T(()=>import("./github-light-DAi9KRSo.js"),[]))},{id:"github-light-default",displayName:"GitHub Light Default",type:"light",import:(()=>T(()=>import("./github-light-default-D7oLnXFd.js"),[]))},{id:"github-light-high-contrast",displayName:"GitHub Light High Contrast",type:"light",import:(()=>T(()=>import("./github-light-high-contrast-BfjtVDDH.js"),[]))},{id:"gruvbox-dark-hard",displayName:"Gruvbox Dark Hard",type:"dark",import:(()=>T(()=>import("./gruvbox-dark-hard-CFHQjOhq.js"),[]))},{id:"gruvbox-dark-medium",displayName:"Gruvbox Dark Medium",type:"dark",import:(()=>T(()=>import("./gruvbox-dark-medium-GsRaNv29.js"),[]))},{id:"gruvbox-dark-soft",displayName:"Gruvbox Dark Soft",type:"dark",import:(()=>T(()=>import("./gruvbox-dark-soft-CVdnzihN.js"),[]))},{id:"gruvbox-light-hard",displayName:"Gruvbox Light Hard",type:"light",import:(()=>T(()=>import("./gruvbox-light-hard-CH1njM8p.js"),[]))},{id:"gruvbox-light-medium",displayName:"Gruvbox Light Medium",type:"light",import:(()=>T(()=>import("./gruvbox-light-medium-DRw_LuNl.js"),[]))},{id:"gruvbox-light-soft",displayName:"Gruvbox Light Soft",type:"light",import:(()=>T(()=>import("./gruvbox-light-soft-hJgmCMqR.js"),[]))},{id:"houston",displayName:"Houston",type:"dark",import:(()=>T(()=>import("./houston-DnULxvSX.js"),[]))},{id:"kanagawa-dragon",displayName:"Kanagawa Dragon",type:"dark",import:(()=>T(()=>import("./kanagawa-dragon-CkXjmgJE.js"),[]))},{id:"kanagawa-lotus",displayName:"Kanagawa Lotus",type:"light",import:(()=>T(()=>import("./kanagawa-lotus-CfQXZHmo.js"),[]))},{id:"kanagawa-wave",displayName:"Kanagawa Wave",type:"dark",import:(()=>T(()=>import("./kanagawa-wave-DWedfzmr.js"),[]))},{id:"laserwave",displayName:"LaserWave",type:"dark",import:(()=>T(()=>import("./laserwave-DUszq2jm.js"),[]))},{id:"light-plus",displayName:"Light Plus",type:"light",import:(()=>T(()=>import("./light-plus-B7mTdjB0.js"),[]))},{id:"material-theme",displayName:"Material Theme",type:"dark",import:(()=>T(()=>import("./material-theme-D5KoaKCx.js"),[]))},{id:"material-theme-darker",displayName:"Material Theme Darker",type:"dark",import:(()=>T(()=>import("./material-theme-darker-BfHTSMKl.js"),[]))},{id:"material-theme-lighter",displayName:"Material Theme Lighter",type:"light",import:(()=>T(()=>import("./material-theme-lighter-B0m2ddpp.js"),[]))},{id:"material-theme-ocean",displayName:"Material Theme Ocean",type:"dark",import:(()=>T(()=>import("./material-theme-ocean-CyktbL80.js"),[]))},{id:"material-theme-palenight",displayName:"Material Theme Palenight",type:"dark",import:(()=>T(()=>import("./material-theme-palenight-Csfq5Kiy.js"),[]))},{id:"min-dark",displayName:"Min Dark",type:"dark",import:(()=>T(()=>import("./min-dark-CafNBF8u.js"),[]))},{id:"min-light",displayName:"Min Light",type:"light",import:(()=>T(()=>import("./min-light-CTRr51gU.js"),[]))},{id:"monokai",displayName:"Monokai",type:"dark",import:(()=>T(()=>import("./monokai-D4h5O-jR.js"),[]))},{id:"night-owl",displayName:"Night Owl",type:"dark",import:(()=>T(()=>import("./night-owl-C39BiMTA.js"),[]))},{id:"nord",displayName:"Nord",type:"dark",import:(()=>T(()=>import("./nord-Ddv68eIx.js"),[]))},{id:"one-dark-pro",displayName:"One Dark Pro",type:"dark",import:(()=>T(()=>import("./one-dark-pro-DVMEJ2y_.js"),[]))},{id:"one-light",displayName:"One Light",type:"light",import:(()=>T(()=>import("./one-light-PoHY5YXO.js"),[]))},{id:"plastic",displayName:"Plastic",type:"dark",import:(()=>T(()=>import("./plastic-3e1v2bzS.js"),[]))},{id:"poimandres",displayName:"Poimandres",type:"dark",import:(()=>T(()=>import("./poimandres-CS3Unz2-.js"),[]))},{id:"red",displayName:"Red",type:"dark",import:(()=>T(()=>import("./red-bN70gL4F.js"),[]))},{id:"rose-pine",displayName:"Rosé Pine",type:"dark",import:(()=>T(()=>import("./rose-pine-qdsjHGoJ.js"),[]))},{id:"rose-pine-dawn",displayName:"Rosé Pine Dawn",type:"light",import:(()=>T(()=>import("./rose-pine-dawn-DHQR4-dF.js"),[]))},{id:"rose-pine-moon",displayName:"Rosé Pine Moon",type:"dark",import:(()=>T(()=>import("./rose-pine-moon-D4_iv3hh.js"),[]))},{id:"slack-dark",displayName:"Slack Dark",type:"dark",import:(()=>T(()=>import("./slack-dark-BthQWCQV.js"),[]))},{id:"slack-ochin",displayName:"Slack Ochin",type:"light",import:(()=>T(()=>import("./slack-ochin-DqwNpetd.js"),[]))},{id:"snazzy-light",displayName:"Snazzy Light",type:"light",import:(()=>T(()=>import("./snazzy-light-Bw305WKR.js"),[]))},{id:"solarized-dark",displayName:"Solarized Dark",type:"dark",import:(()=>T(()=>import("./solarized-dark-DXbdFlpD.js"),[]))},{id:"solarized-light",displayName:"Solarized Light",type:"light",import:(()=>T(()=>import("./solarized-light-L9t79GZl.js"),[]))},{id:"synthwave-84",displayName:"Synthwave '84",type:"dark",import:(()=>T(()=>import("./synthwave-84-CbfX1IO0.js"),[]))},{id:"tokyo-night",displayName:"Tokyo Night",type:"dark",import:(()=>T(()=>import("./tokyo-night-hegEt444.js"),[]))},{id:"vesper",displayName:"Vesper",type:"dark",import:(()=>T(()=>import("./vesper-DU1UobuO.js"),[]))},{id:"vitesse-black",displayName:"Vitesse Black",type:"dark",import:(()=>T(()=>import("./vitesse-black-Bkuqu6BP.js"),[]))},{id:"vitesse-dark",displayName:"Vitesse Dark",type:"dark",import:(()=>T(()=>import("./vitesse-dark-D0r3Knsf.js"),[]))},{id:"vitesse-light",displayName:"Vitesse Light",type:"light",import:(()=>T(()=>import("./vitesse-light-CVO1_9PV.js"),[]))}],VW=Object.fromEntries(XW.map(t=>[t.id,t.import]));class sS extends Error{constructor(e){super(e),this.name="ShikiError"}}function BW(){return 2147483648}function ZW(){return typeof performance<"u"?performance.now():Date.now()}const qW=(t,e)=>t+(e-t%e)%e;async function UW(t){let e,n;const i={};function r(O){n=O,i.HEAPU8=new Uint8Array(O),i.HEAPU32=new Uint32Array(O)}function s(O,x,S){i.HEAPU8.copyWithin(O,x,x+S)}function o(O){try{return e.grow(O-n.byteLength+65535>>>16),r(e.buffer),1}catch{}}function l(O){const x=i.HEAPU8.length;O=O>>>0;const S=BW();if(O>S)return!1;for(let _=1;_<=4;_*=2){let k=x*(1+.2/_);k=Math.min(k,O+100663296);const P=Math.min(S,qW(Math.max(O,k),65536));if(o(P))return!0}return!1}const c=typeof TextDecoder<"u"?new TextDecoder("utf8"):void 0;function h(O,x,S=1024){const _=x+S;let k=x;for(;O[k]&&!(k>=_);)++k;if(k-x>16&&O.buffer&&c)return c.decode(O.subarray(x,k));let P="";for(;x<k;){let Q=O[x++];if(!(Q&128)){P+=String.fromCharCode(Q);continue}const R=O[x++]&63;if((Q&224)===192){P+=String.fromCharCode((Q&31)<<6|R);continue}const $=O[x++]&63;if((Q&240)===224?Q=(Q&15)<<12|R<<6|$:Q=(Q&7)<<18|R<<12|$<<6|O[x++]&63,Q<65536)P+=String.fromCharCode(Q);else{const C=Q-65536;P+=String.fromCharCode(55296|C>>10,56320|C&1023)}}return P}function d(O,x){return O?h(i.HEAPU8,O,x):""}const p={emscripten_get_now:ZW,emscripten_memcpy_big:s,emscripten_resize_heap:l,fd_write:()=>0};async function g(){const x=await t({env:p,wasi_snapshot_preview1:p});e=x.memory,r(e.buffer),Object.assign(i,x),i.UTF8ToString=d}return await g(),i}var YW=Object.defineProperty,GW=(t,e,n)=>e in t?YW(t,e,{enumerable:!0,configurable:!0,writable:!0,value:n}):t[e]=n,Jt=(t,e,n)=>GW(t,typeof e!="symbol"?e+"":e,n);let an=null;function WW(t){throw new sS(t.UTF8ToString(t.getLastOnigError()))}class eO{constructor(e){Jt(this,"utf16Length"),Jt(this,"utf8Length"),Jt(this,"utf16Value"),Jt(this,"utf8Value"),Jt(this,"utf16OffsetToUtf8"),Jt(this,"utf8OffsetToUtf16");const n=e.length,i=eO._utf8ByteLength(e),r=i!==n,s=r?new Uint32Array(n+1):null;r&&(s[n]=i);const o=r?new Uint32Array(i+1):null;r&&(o[i]=n);const l=new Uint8Array(i);let c=0;for(let h=0;h<n;h++){const d=e.charCodeAt(h);let p=d,g=!1;if(d>=55296&&d<=56319&&h+1<n){const O=e.charCodeAt(h+1);O>=56320&&O<=57343&&(p=(d-55296<<10)+65536|O-56320,g=!0)}r&&(s[h]=c,g&&(s[h+1]=c),p<=127?o[c+0]=h:p<=2047?(o[c+0]=h,o[c+1]=h):p<=65535?(o[c+0]=h,o[c+1]=h,o[c+2]=h):(o[c+0]=h,o[c+1]=h,o[c+2]=h,o[c+3]=h)),p<=127?l[c++]=p:p<=2047?(l[c++]=192|(p&1984)>>>6,l[c++]=128|(p&63)>>>0):p<=65535?(l[c++]=224|(p&61440)>>>12,l[c++]=128|(p&4032)>>>6,l[c++]=128|(p&63)>>>0):(l[c++]=240|(p&1835008)>>>18,l[c++]=128|(p&258048)>>>12,l[c++]=128|(p&4032)>>>6,l[c++]=128|(p&63)>>>0),g&&h++}this.utf16Length=n,this.utf8Length=i,this.utf16Value=e,this.utf8Value=l,this.utf16OffsetToUtf8=s,this.utf8OffsetToUtf16=o}static _utf8ByteLength(e){let n=0;for(let i=0,r=e.length;i<r;i++){const s=e.charCodeAt(i);let o=s,l=!1;if(s>=55296&&s<=56319&&i+1<r){const c=e.charCodeAt(i+1);c>=56320&&c<=57343&&(o=(s-55296<<10)+65536|c-56320,l=!0)}o<=127?n+=1:o<=2047?n+=2:o<=65535?n+=3:n+=4,l&&i++}return n}createString(e){const n=e.omalloc(this.utf8Length);return e.HEAPU8.set(this.utf8Value,n),n}}const tO=class wr{constructor(e){if(Jt(this,"id",++wr.LAST_ID),Jt(this,"_onigBinding"),Jt(this,"content"),Jt(this,"utf16Length"),Jt(this,"utf8Length"),Jt(this,"utf16OffsetToUtf8"),Jt(this,"utf8OffsetToUtf16"),Jt(this,"ptr"),!an)throw new sS("Must invoke loadWasm first.");this._onigBinding=an,this.content=e;const n=new eO(e);this.utf16Length=n.utf16Length,this.utf8Length=n.utf8Length,this.utf16OffsetToUtf8=n.utf16OffsetToUtf8,this.utf8OffsetToUtf16=n.utf8OffsetToUtf16,this.utf8Length<1e4&&!wr._sharedPtrInUse?(wr._sharedPtr||(wr._sharedPtr=an.omalloc(1e4)),wr._sharedPtrInUse=!0,an.HEAPU8.set(n.utf8Value,wr._sharedPtr),this.ptr=wr._sharedPtr):this.ptr=n.createString(an)}convertUtf8OffsetToUtf16(e){return this.utf8OffsetToUtf16?e<0?0:e>this.utf8Length?this.utf16Length:this.utf8OffsetToUtf16[e]:e}convertUtf16OffsetToUtf8(e){return this.utf16OffsetToUtf8?e<0?0:e>this.utf16Length?this.utf8Length:this.utf16OffsetToUtf8[e]:e}dispose(){this.ptr===wr._sharedPtr?wr._sharedPtrInUse=!1:this._onigBinding.ofree(this.ptr)}};Jt(tO,"LAST_ID",0);Jt(tO,"_sharedPtr",0);Jt(tO,"_sharedPtrInUse",!1);let jL=tO;class HW{constructor(e){if(Jt(this,"_onigBinding"),Jt(this,"_ptr"),!an)throw new sS("Must invoke loadWasm first.");const n=[],i=[];for(let l=0,c=e.length;l<c;l++){const h=new eO(e[l]);n[l]=h.createString(an),i[l]=h.utf8Length}const r=an.omalloc(4*e.length);an.HEAPU32.set(n,r/4);const s=an.omalloc(4*e.length);an.HEAPU32.set(i,s/4);const o=an.createOnigScanner(r,s,e.length);for(let l=0,c=e.length;l<c;l++)an.ofree(n[l]);an.ofree(s),an.ofree(r),o===0&&WW(an),this._onigBinding=an,this._ptr=o}dispose(){this._onigBinding.freeOnigScanner(this._ptr)}findNextMatchSync(e,n,i){let r=0;if(typeof i=="number"&&(r=i),typeof e=="string"){e=new jL(e);const s=this._findNextMatchSync(e,n,!1,r);return e.dispose(),s}return this._findNextMatchSync(e,n,!1,r)}_findNextMatchSync(e,n,i,r){const s=this._onigBinding,o=s.findNextOnigScannerMatch(this._ptr,e.id,e.ptr,e.utf8Length,e.convertUtf16OffsetToUtf8(n),r);if(o===0)return null;const l=s.HEAPU32;let c=o/4;const h=l[c++],d=l[c++],p=[];for(let g=0;g<d;g++){const O=e.convertUtf8OffsetToUtf16(l[c++]),x=e.convertUtf8OffsetToUtf16(l[c++]);p[g]={start:O,end:x,length:x-O}}return{index:h,captureIndices:p}}}function FW(t){return typeof t.instantiator=="function"}function KW(t){return typeof t.default=="function"}function JW(t){return typeof t.data<"u"}function eH(t){return typeof Response<"u"&&t instanceof Response}function tH(t){var e;return typeof ArrayBuffer<"u"&&(t instanceof ArrayBuffer||ArrayBuffer.isView(t))||typeof Buffer<"u"&&((e=Buffer.isBuffer)==null?void 0:e.call(Buffer,t))||typeof SharedArrayBuffer<"u"&&t instanceof SharedArrayBuffer||typeof Uint32Array<"u"&&t instanceof Uint32Array}let Dp;function nH(t){if(Dp)return Dp;async function e(){an=await UW(async n=>{let i=t;return i=await i,typeof i=="function"&&(i=await i(n)),typeof i=="function"&&(i=await i(n)),FW(i)?i=await i.instantiator(n):KW(i)?i=await i.default(n):(JW(i)&&(i=i.data),eH(i)?typeof WebAssembly.instantiateStreaming=="function"?i=await iH(i)(n):i=await rH(i)(n):tH(i)?i=await wb(i)(n):i instanceof WebAssembly.Module?i=await wb(i)(n):"default"in i&&i.default instanceof WebAssembly.Module&&(i=await wb(i.default)(n))),"instance"in i&&(i=i.instance),"exports"in i&&(i=i.exports),i})}return Dp=e(),Dp}function wb(t){return e=>WebAssembly.instantiate(t,e)}function iH(t){return e=>WebAssembly.instantiateStreaming(t,e)}function rH(t){return async e=>{const n=await t.arrayBuffer();return WebAssembly.instantiate(n,e)}}async function sH(t){return t&&await nH(t),{createScanner(e){return new HW(e.map(n=>typeof n=="string"?n:n.source))},createString(e){return new jL(e)}}}const oH=MW({langs:IW,themes:VW,engine:()=>sH(T(()=>import("./wasm-CG6Dc4jp.js"),[]))}),{codeToHtml:_C}=jW(oH,{guessEmbeddedLanguages:HG});function aH({children:t,className:e="",components:n}){return v.jsx("div",{className:`markdown-content ${e}`,children:v.jsx(V7,{remarkPlugins:[nY],components:{code:lH,pre:({children:i})=>v.jsx(v.Fragment,{children:i}),...n},children:t})})}function lH({children:t,className:e}){const[n,i]=B.useState(null),r=String(t).replace(/\n$/,""),s=/language-(\w+)/.exec(e||""),o=s?s[1]:void 0,l=!o&&!r.includes(`
323
+ `);return B.useEffect(()=>{if(l)return;let c=!0;return(async()=>{try{const d=await _C(r,{lang:o||"text",themes:{light:"github-light",dark:"github-dark"}});c&&i(d)}catch{const d=await _C(r,{lang:"text",themes:{light:"github-light",dark:"github-dark"}});c&&i(d)}})(),()=>{c=!1}},[r,o,l]),l?v.jsx("code",{className:"bg-muted text-foreground rounded px-1.5 py-0.5 font-mono text-sm",children:r}):n?v.jsx("div",{className:"shiki-wrapper overflow-x-auto rounded-md text-sm [&_pre]:m-0 [&_pre]:bg-transparent [&_pre]:p-4",dangerouslySetInnerHTML:{__html:n}}):v.jsx("pre",{className:"bg-muted/50 border-border overflow-x-auto rounded-md border p-4",children:v.jsx("code",{className:"text-foreground font-mono text-sm",children:r})})}function cH(t){const e=[],n=[];return t.forEach((i,r)=>{const s={item:i,index:r,children:[]},o=i.level??1;for(;n.length>0;){const l=n[n.length-1];if((l.item.level??1)<o){l.children.push(s),n.push(s);return}n.pop()}e.push(s),n.push(s)}),e}function uH({items:t,defaultCollapsed:e=!0,className:n=""}){const[i,r]=B.useState(e),s=B.useMemo(()=>cH(t),[t]);return t.length===0?v.jsx("aside",{className:`hidden ${n}`}):v.jsxs("aside",{className:`toc-root scrollbar-none sticky top-0 z-10 max-h-[calc(100cqh-3rem)] self-start overflow-y-auto ${n}`,children:[v.jsx("style",{children:pH}),v.jsxs("div",{className:"toc-narrow border-border bg-background overflow-hidden rounded border",children:[v.jsxs("button",{onClick:()=>r(!i),className:`text-foreground flex w-full items-center gap-2 px-3 py-2 ${i?"":"border-border border-b"}`,"aria-label":i?"Show table of contents":"Hide table of contents",children:[v.jsx(mQ,{className:"h-4 w-4"}),v.jsx("span",{className:"text-sm",children:"Contents"}),v.jsx(gB,{className:`ml-auto h-4 w-4 transition-transform ${i?"":"rotate-180"}`})]}),!i&&v.jsx(r1,{nodes:s})]}),v.jsxs("nav",{className:"toc-wide flex flex-col",children:[v.jsxs("div",{className:"text-muted-foreground flex items-center gap-2 px-3 py-2 text-xs font-medium uppercase tracking-wide",children:[v.jsx(mQ,{className:"h-3.5 w-3.5"}),v.jsx("span",{children:"On this page"})]}),v.jsx("div",{className:"scrollbar-thin scrollbar-track-transparent min-h-0 flex-1 overflow-y-auto p-2",children:v.jsx(r1,{nodes:s})})]})]})}function hH(t){return t.closest(".toc-root")}function fH(t){const e=hH(t);if(!e)return;const n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.top-i.top,s=n.bottom-i.top;r<0?e.scrollTo({top:e.scrollTop+r,behavior:"smooth"}):s>i.height&&e.scrollTo({top:e.scrollTop+s-i.height,behavior:"smooth"})}function r1({nodes:t,depth:e=0}){const n=B.useCallback(i=>{i.animationName==="toc-activate"&&fH(i.currentTarget)},[]);return t.length===0?null:v.jsx("ul",{className:"toc-list",children:t.map(i=>v.jsxs("li",{className:"toc-item",children:[v.jsx("a",{href:`#${i.item.id}`,className:`toc-link text-muted-foreground hover:text-foreground block overflow-hidden text-ellipsis whitespace-nowrap border-l-2 border-transparent py-1 pr-3 ${e===0?"text-[13px]":e===1?"text-[12px]":e===2?"text-[11px]":"text-[10px]"}`,style:{"--target":`--toc-${i.index}`,paddingLeft:`${.75+e*.5}rem`},title:i.item.label,onAnimationStart:n,children:i.item.label}),i.children.length>0&&v.jsx(r1,{nodes:i.children,depth:e+1})]},i.item.id))})}const dH=String.raw,pH=dH`
324
+ /* Default: narrow mode (collapsible) */
325
+ .toc-narrow {
326
+ display: block;
327
+ }
328
+ .toc-wide {
329
+ display: none;
330
+ }
331
+
332
+ /* Wide container: show sidebar mode */
333
+ @container (min-width: 768px) {
334
+ .toc-narrow {
335
+ display: none;
336
+ }
337
+ .toc-wide {
338
+ display: block;
339
+ }
340
+ }
341
+
342
+ /* Tree structure styling */
343
+ .toc-list {
344
+ list-style: none;
345
+ margin: 0;
346
+ padding: 0;
347
+ }
348
+
349
+ /* Scroll-driven ToC highlighting animation */
350
+ @keyframes toc-activate {
351
+ 0%,
352
+ 100% {
353
+ color: var(--muted-foreground);
354
+ border-left-color: transparent;
355
+ }
356
+ 1%,
357
+ 99% {
358
+ color: var(--foreground);
359
+ border-left-color: var(--primary);
360
+ }
361
+ }
362
+ .toc-link {
363
+ animation-timeline: var(--target);
364
+ animation-name: toc-activate;
365
+ animation-fill-mode: both;
366
+ animation-range: cover 0% cover 100%;
367
+ }
368
+ `;function mH(t){return t.map((e,n)=>`--toc-${n}`).join(", ")}function kC({id:t,index:e,children:n,className:i="",as:r="section"}){return v.jsx(r,{id:t,className:i,style:{viewTimelineName:`--toc-${e}`},children:n})}class oS{constructor(e=0){ce(this,"items",[]);ce(this,"slugCount",new Map);ce(this,"levelOffset");this.levelOffset=e}add(e,n,i){const r=Math.min(n+this.levelOffset,6),s=i??(aS(e)||"heading"),o=this.slugCount.get(s)??0;this.slugCount.set(s,o+1);const l=o>0?`${s}-${o+1}`:s,c=this.items.length;return this.items.push({id:l,label:e,level:r}),{id:l,index:c}}addAll(e){const n=this.items.length;for(const i of e){const r=Math.min((i.level??1)+this.levelOffset,6);this.items.push({...i,level:r})}return n}getItems(){return[...this.items]}getNextIndex(){return this.items.length}reset(){this.items=[],this.slugCount.clear()}createChild(e=1){return new oS(this.levelOffset+e)}}function aS(t){return t.toLowerCase().replace(/[^a-z0-9\u4e00-\u9fa5]+/g,"-").replace(/^-+|-+$/g,"")}const lS=B.createContext(null);function nO(){return B.useContext(lS)}function gH({children:t,collector:e,levelOffset:n=0,isRoot:i=!0}){const r=B.useMemo(()=>({collector:e,levelOffset:n,isRoot:i}),[e,n,i]);return v.jsx(lS.Provider,{value:r,children:t})}function OH({children:t,additionalOffset:e=1}){const n=nO();if(!n)return v.jsx(v.Fragment,{children:t});const i=B.useMemo(()=>({collector:n.collector,levelOffset:n.levelOffset+e,isRoot:!1}),[n,e]);return v.jsx(lS.Provider,{value:i,children:t})}function Mr({markdown:t,className:e="",onReady:n}){return nO()?v.jsx(bH,{markdown:t,className:e}):v.jsx(yH,{markdown:t,className:e,onReady:n})}function yH({markdown:t,className:e,onReady:n}){const[i,r]=B.useState([]),s=B.useRef(null),o=B.useRef(!1);s.current=new oS;const l=s.current;B.useLayoutEffect(()=>{const d=s.current.getItems();r(p=>vH(p,d)?p:d)}),B.useEffect(()=>{o.current||(o.current=!0,n==null||n())},[n,i]);const c=B.useMemo(()=>mH(i),[i]),h=typeof t=="string"?v.jsx(NL,{markdown:t,collector:l,levelOffset:0}):v.jsx(zL,{builder:t,collector:l,levelOffset:0});return v.jsx(gH,{collector:l,levelOffset:0,isRoot:!0,children:v.jsxs("div",{className:`@container-[size] h-full ${e}`,children:[v.jsx("style",{children:_H}),v.jsxs(xH,{className:"viewer-layout gap-6",timelineScope:c,children:[v.jsx(uH,{items:i,className:"viewer-toc"}),v.jsx("div",{className:"viewer-content min-w-0",children:h})]})]})})}function bH({markdown:t,className:e}){const n=nO(),{collector:i,levelOffset:r}=n;return typeof t=="string"?v.jsx(NL,{markdown:t,className:e,collector:i,levelOffset:r}):v.jsx(zL,{builder:t,className:e,collector:i,levelOffset:r})}function NL({markdown:t,collector:e,levelOffset:n,className:i}){const r=B.useMemo(()=>{const s=new Map,o=l=>function({children:h}){const d=sg(h),p=aS(d)||"heading",g=s.get(p)??0;s.set(p,g+1);const O=g>0?`${p}-${g+1}`:p,x=Math.min(l+n,6),{index:S}=e.add(d,x,O);return v.jsx(IL,{level:x,id:O,index:S,children:h})};return{h1:o(1),h2:o(2),h3:o(3),h4:o(4),h5:o(5),h6:o(6)}},[e,n]);return v.jsx(aH,{className:i,components:r,children:t})}function zL({builder:t,collector:e,levelOffset:n,className:i}){const r=B.useMemo(()=>{const s=new Map,o=c=>function({id:d,className:p,children:g}){const O=nO(),x=(O==null?void 0:O.levelOffset)??n,S=sg(g),_=d??(aS(S)||"heading"),k=s.get(_)??0;s.set(_,k+1);const P=k>0?`${_}-${k+1}`:_,Q=Math.min(c+x,6),{index:R}=e.add(S,Q,P);return v.jsx(IL,{level:Q,id:P,index:R,className:p,children:g})},l=({children:c,className:h})=>v.jsx(OH,{additionalOffset:1,children:v.jsx("section",{className:`markdown-section ${h}`,children:c})});return{H1:o(1),H2:o(2),H3:o(3),H4:o(4),H5:o(5),H6:o(6),Section:l}},[e,n]);return v.jsx("div",{className:`markdown-content ${i}`,children:t(r)})}function IL({level:t,id:e,index:n,children:i,className:r}){const s={viewTimelineName:`--toc-${n}`};switch(t){case 1:return v.jsx("h1",{id:e,className:r,style:s,children:i});case 2:return v.jsx("h2",{id:e,className:r,style:s,children:i});case 3:return v.jsx("h3",{id:e,className:r,style:s,children:i});case 4:return v.jsx("h4",{id:e,className:r,style:s,children:i});case 5:return v.jsx("h5",{id:e,className:r,style:s,children:i});case 6:return v.jsx("h6",{id:e,className:r,style:s,children:i})}}function xH({children:t,className:e="",timelineScope:n}){return v.jsx("div",{className:`scrollbar-thin scrollbar-track-transparent h-full overflow-auto scroll-smooth p-4 ${e}`,style:n?{timelineScope:n}:void 0,children:t})}function sg(t){var e;return t==null||typeof t=="boolean"?"":typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(sg).join(""):typeof t=="object"&&"props"in t?sg((e=t.props)==null?void 0:e.children):""}function vH(t,e){return t.length!==e.length?!1:t.every((n,i)=>n.id===e[i].id&&n.label===e[i].label&&n.level===e[i].level)}const SH=String.raw,_H=SH`
369
+ /* Container query based layout */
370
+ .viewer-layout {
371
+ display: block;
372
+ }
373
+ .viewer-toc {
374
+ margin-bottom: 1rem;
375
+ }
376
+
377
+ /* Wide container: grid layout with ToC on right */
378
+ @container (min-width: 768px) {
379
+ .viewer-layout {
380
+ display: grid;
381
+ grid-template-columns: 1fr 180px;
382
+ }
383
+ .viewer-toc {
384
+ order: 2;
385
+ margin-bottom: 0;
386
+ }
387
+ .viewer-content {
388
+ order: 1;
389
+ }
390
+ }
391
+ `;function kH(){const{specId:t}=iu({from:"/specs/$specId"}),{data:e,isLoading:n}=kZ(t),i=null;return n&&!e?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading spec..."}):e?v.jsx(wH,{spec:e,validation:i}):v.jsx("div",{className:"text-red-600",children:"Spec not found"})}function wH({spec:t,validation:e}){return v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6",children:[v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx(It,{to:"/specs",className:"hover:bg-muted rounded-md p-2",children:v.jsx(Cv,{className:"h-5 w-5"})}),v.jsxs("div",{children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(Pi,{className:"h-6 w-6 shrink-0"}),t.name]}),v.jsxs("p",{className:"text-muted-foreground",children:["ID: ",t.id]})]})]}),e&&v.jsx(PH,{validation:e}),v.jsx(Mr,{className:"min-h-0 flex-1",markdown:({H1:n,H2:i,Section:r})=>v.jsxs("div",{className:"space-y-6",children:[v.jsxs(r,{children:[v.jsx(n,{id:"overview",children:"Overview"}),v.jsx("div",{className:"bg-muted/30 mt-2 rounded-lg p-4",children:t.overview?v.jsx(Mr,{markdown:t.overview}):v.jsx("span",{className:"text-muted-foreground",children:"No overview"})})]}),v.jsxs(r,{children:[v.jsxs(n,{id:"requirements",children:["Requirements (",t.requirements.length,")"]}),v.jsxs("div",{className:"mt-3 space-y-4",children:[t.requirements.map(s=>v.jsxs(r,{className:"border-border rounded-lg border p-4",children:[v.jsx(i,{className:"text-base",id:`req-${s.id}`,children:s.text}),s.scenarios.length>0&&v.jsxs("div",{className:"mt-3",children:[v.jsxs("div",{className:"text-muted-foreground mb-2 text-sm font-medium",children:["Scenarios (",s.scenarios.length,")"]}),s.scenarios.map((o,l)=>{const c=o.rawText.replace(/^---\n?/,"").replace(/\n?---$/,"").trim();return v.jsx("div",{className:"bg-muted/50 rounded-md p-3",children:v.jsx(Mr,{markdown:c})},l)})]})]},s.id)),t.requirements.length===0&&v.jsx("div",{className:"text-muted-foreground",children:"No requirements defined"})]})]})]})})]})}function PH({validation:t}){const e=t.issues.filter(r=>r.severity==="ERROR"),n=t.issues.filter(r=>r.severity==="WARNING"),i=t.issues.filter(r=>r.severity==="INFO");return v.jsxs("div",{className:`flex rounded-lg border p-4 ${t.valid?"border-green-500 bg-green-500/10":"border-red-500 bg-red-500/10"}`,children:[v.jsxs("div",{className:"align-content flex gap-2",children:[t.valid?v.jsx(Xo,{className:"h-5 w-5 text-green-500"}):v.jsx(Dx,{className:"h-5 w-5 text-red-500"}),v.jsx("span",{className:`font-medium ${t.valid?"text-green-600":"text-red-600"}`,children:t.valid?"Validation Passed":"Validation Failed"})]}),t.issues.length>0&&v.jsxs("div",{className:"space-y-1 text-sm",children:[e.map((r,s)=>v.jsxs("div",{className:"flex items-start gap-2 text-red-600",children:[v.jsx(Dx,{className:"mt-0.5 h-4 w-4 shrink-0"}),v.jsx("span",{children:r.message})]},s)),n.map((r,s)=>v.jsxs("div",{className:"flex items-start gap-2 text-yellow-600",children:[v.jsx(Av,{className:"mt-0.5 h-4 w-4 shrink-0"}),v.jsx("span",{children:r.message})]},s)),i.map((r,s)=>v.jsxs("div",{className:"text-muted-foreground flex items-start gap-2",children:[v.jsx(MB,{className:"mt-0.5 h-4 w-4 shrink-0"}),v.jsx("span",{children:r.message})]},s))]})]})}function TH(){const{data:t,isLoading:e}=wZ(),[n,i]=B.useState(!0);return B.useEffect(()=>{const r=requestAnimationFrame(()=>i(!1));return()=>cancelAnimationFrame(r)},[]),n||e&&!t?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading changes..."}):v.jsxs("div",{className:"space-y-6",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(tf,{className:"h-6 w-6 shrink-0"}),"Changes"]}),v.jsxs("p",{className:"text-muted-foreground",children:["Active change proposals. Completed changes are moved to"," ",v.jsx(It,{to:"/archive",className:"text-primary hover:underline",children:"Archive"}),"."]}),v.jsxs("div",{className:"border-border divide-border divide-y rounded-lg border",children:[t==null?void 0:t.map(r=>v.jsxs(It,{to:"/changes/$changeId",params:{changeId:r.id},className:"hover:bg-muted/50 flex items-center justify-between p-4",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(tf,{className:"text-muted-foreground h-5 w-5"}),v.jsxs("div",{children:[v.jsx("div",{className:"font-medium",children:r.name}),v.jsxs("div",{className:"text-muted-foreground text-sm",children:[r.progress.completed,"/",r.progress.total," tasks",r.updatedAt>0&&v.jsxs(v.Fragment,{children:[" · ",Lv(r.updatedAt)]})]})]})]}),v.jsx(Zg,{className:"text-muted-foreground h-4 w-4"})]},r.id)),(t==null?void 0:t.length)===0&&v.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:["No active changes. Create one in ",v.jsx("code",{children:"openspec/changes/"})]})]})]})}function cS({tabs:t,defaultTab:e,activeTab:n,onTabChange:i,className:r=""}){var h;const[s,o]=B.useState(e||((h=t[0])==null?void 0:h.id)),l=n??s;if(t.length===0)return null;const c=d=>{n||o(d),i==null||i(d)};return v.jsxs("div",{className:`flex min-h-0 flex-1 flex-col ${r}`,children:[v.jsx("div",{className:"z-2 border-border flex gap-1 border-b",children:t.map(d=>v.jsxs("button",{onClick:()=>c(d.id),className:`-mb-px flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors ${l===d.id?"border-primary text-foreground":"text-muted-foreground hover:text-foreground border-transparent"}`,children:[d.icon,d.label]},d.id))}),t.map(d=>d.unmountOnHide?l===d.id&&v.jsx("div",{className:"min-h-0 flex-1",children:d.content},d.id):v.jsx(B.Activity,{mode:l===d.id?"visible":"hidden",children:v.jsx("div",{className:"min-h-0 flex-1",children:d.content})},d.id))]})}function QH(t){switch(t){case"ADDED":return"border border-emerald-200 bg-emerald-100 text-emerald-700";case"MODIFIED":return"border border-amber-200 bg-amber-100 text-amber-800";case"REMOVED":return"border border-rose-200 bg-rose-100 text-rose-700";case"RENAMED":return"border border-sky-200 bg-sky-100 text-sky-700";default:return"border border-muted bg-muted text-foreground"}}function XL({change:t}){var s;const e=t.deltaSpecs??[],[n,i]=B.useState(((s=e[0])==null?void 0:s.specId)??"");B.useEffect(()=>{var o;e.some(l=>l.specId===n)||i(((o=e[0])==null?void 0:o.specId)??"")},[e,n]);const r=B.useMemo(()=>{const o=new Map;return t.deltas.forEach(l=>{const c=o.get(l.spec)??new Set;c.add(l.operation),o.set(l.spec,c)}),Array.from(o.entries()).map(([l,c])=>({spec:l,operation:c.size===1?Array.from(c)[0]:"MIXED"}))},[t.deltas]);return v.jsx(Mr,{className:"h-full",markdown:({H1:o,Section:l})=>v.jsxs("div",{className:"space-y-6",children:[v.jsxs(l,{children:[v.jsx(o,{id:"why",children:"Why"}),v.jsx("div",{className:"bg-muted/30 mt-2 rounded-lg p-4 [zoom:0.86]",children:v.jsx(Mr,{markdown:t.why})})]}),v.jsxs(l,{children:[v.jsx(o,{id:"what-changes",children:"What Changes"}),v.jsx("div",{className:"bg-muted/30 mt-2 rounded-lg p-4 [zoom:0.86]",children:v.jsx(Mr,{markdown:t.whatChanges})})]}),t.design&&v.jsxs(v.Fragment,{children:[v.jsx(o,{id:"design",children:"Design"}),v.jsx(l,{className:"bg-muted/30 mt-2 rounded-lg p-4 [zoom:0.86]",children:v.jsx(Mr,{markdown:t.design})})]}),r.length>0&&v.jsxs(v.Fragment,{children:[v.jsxs(o,{id:"affected-specs",children:["Affected Specs (",r.length,")"]}),v.jsx("div",{className:"divide-border border-border mt-3 divide-y rounded-lg border",children:r.map(({spec:c,operation:h})=>v.jsxs("div",{className:"flex items-center justify-between px-3 py-2",children:[v.jsx("span",{className:"font-medium",children:c}),v.jsx("span",{className:`rounded px-2 py-1 text-xs font-medium ${QH(h)}`,children:h})]},c))})]}),e.length>0&&v.jsxs(v.Fragment,{children:[v.jsxs(o,{id:"delta-specs",children:["Delta Specs (",e.length,")"]}),v.jsx(l,{className:"[zoom:0.86]",children:v.jsx(CH,{deltaSpecs:e,activeId:n,onActiveChange:i})})]})]})})}function CH({deltaSpecs:t,activeId:e,onActiveChange:n}){if(t.length===1){const r=t[0];return v.jsx("div",{className:"bg-muted/20 rounded-lg p-4",children:v.jsx(Mr,{markdown:r.content})})}const i=t.map(r=>({id:r.specId,label:r.specId,icon:v.jsx(Pi,{className:"h-4 w-4"}),content:v.jsx("div",{className:"bg-muted/20 h-full rounded-lg p-4",children:v.jsx(Mr,{markdown:r.content})}),unmountOnHide:!0}));return v.jsx(cS,{tabs:i,activeTab:e,defaultTab:e,onTabChange:n,className:"min-h-80"})}const VL=1024;let EH=0,Zi=class{constructor(e,n){this.from=e,this.to=n}};class Me{constructor(e={}){this.id=EH++,this.perNode=!!e.perNode,this.deserialize=e.deserialize||(()=>{throw new Error("This node type doesn't define a deserialize function")}),this.combine=e.combine||null}add(e){if(this.perNode)throw new RangeError("Can't add per-node props to node types");return typeof e!="function"&&(e=Ht.match(e)),n=>{let i=e(n);return i===void 0?null:[this,i]}}}Me.closedBy=new Me({deserialize:t=>t.split(" ")});Me.openedBy=new Me({deserialize:t=>t.split(" ")});Me.group=new Me({deserialize:t=>t.split(" ")});Me.isolate=new Me({deserialize:t=>{if(t&&t!="rtl"&&t!="ltr"&&t!="auto")throw new RangeError("Invalid value for isolate: "+t);return t||"auto"}});Me.contextHash=new Me({perNode:!0});Me.lookAhead=new Me({perNode:!0});Me.mounted=new Me({perNode:!0});class uf{constructor(e,n,i){this.tree=e,this.overlay=n,this.parser=i}static get(e){return e&&e.props&&e.props[Me.mounted.id]}}const AH=Object.create(null);class Ht{constructor(e,n,i,r=0){this.name=e,this.props=n,this.id=i,this.flags=r}static define(e){let n=e.props&&e.props.length?Object.create(null):AH,i=(e.top?1:0)|(e.skipped?2:0)|(e.error?4:0)|(e.name==null?8:0),r=new Ht(e.name||"",n,e.id,i);if(e.props){for(let s of e.props)if(Array.isArray(s)||(s=s(r)),s){if(s[0].perNode)throw new RangeError("Can't store a per-node prop on a node type");n[s[0].id]=s[1]}}return r}prop(e){return this.props[e.id]}get isTop(){return(this.flags&1)>0}get isSkipped(){return(this.flags&2)>0}get isError(){return(this.flags&4)>0}get isAnonymous(){return(this.flags&8)>0}is(e){if(typeof e=="string"){if(this.name==e)return!0;let n=this.prop(Me.group);return n?n.indexOf(e)>-1:!1}return this.id==e}static match(e){let n=Object.create(null);for(let i in e)for(let r of i.split(" "))n[r]=e[i];return i=>{for(let r=i.prop(Me.group),s=-1;s<(r?r.length:0);s++){let o=n[s<0?i.name:r[s]];if(o)return o}}}}Ht.none=new Ht("",Object.create(null),0,8);class cu{constructor(e){this.types=e;for(let n=0;n<e.length;n++)if(e[n].id!=n)throw new RangeError("Node type ids should correspond to array positions when creating a node set")}extend(...e){let n=[];for(let i of this.types){let r=null;for(let s of e){let o=s(i);if(o){r||(r=Object.assign({},i.props));let l=o[1],c=o[0];c.combine&&c.id in r&&(l=c.combine(r[c.id],l)),r[c.id]=l}}n.push(r?new Ht(i.name,r,i.id,i.flags):i)}return new cu(n)}}const jp=new WeakMap,wC=new WeakMap;var wt;(function(t){t[t.ExcludeBuffers=1]="ExcludeBuffers",t[t.IncludeAnonymous=2]="IncludeAnonymous",t[t.IgnoreMounts=4]="IgnoreMounts",t[t.IgnoreOverlays=8]="IgnoreOverlays"})(wt||(wt={}));class Ge{constructor(e,n,i,r,s){if(this.type=e,this.children=n,this.positions=i,this.length=r,this.props=null,s&&s.length){this.props=Object.create(null);for(let[o,l]of s)this.props[typeof o=="number"?o:o.id]=l}}toString(){let e=uf.get(this);if(e&&!e.overlay)return e.tree.toString();let n="";for(let i of this.children){let r=i.toString();r&&(n&&(n+=","),n+=r)}return this.type.name?(/\W/.test(this.type.name)&&!this.type.isError?JSON.stringify(this.type.name):this.type.name)+(n.length?"("+n+")":""):n}cursor(e=0){return new og(this.topNode,e)}cursorAt(e,n=0,i=0){let r=jp.get(this)||this.topNode,s=new og(r);return s.moveTo(e,n),jp.set(this,s._tree),s}get topNode(){return new Tn(this,0,0,null)}resolve(e,n=0){let i=hf(jp.get(this)||this.topNode,e,n,!1);return jp.set(this,i),i}resolveInner(e,n=0){let i=hf(wC.get(this)||this.topNode,e,n,!0);return wC.set(this,i),i}resolveStack(e,n=0){return LH(this,e,n)}iterate(e){let{enter:n,leave:i,from:r=0,to:s=this.length}=e,o=e.mode||0,l=(o&wt.IncludeAnonymous)>0;for(let c=this.cursor(o|wt.IncludeAnonymous);;){let h=!1;if(c.from<=s&&c.to>=r&&(!l&&c.type.isAnonymous||n(c)!==!1)){if(c.firstChild())continue;h=!0}for(;h&&i&&(l||!c.type.isAnonymous)&&i(c),!c.nextSibling();){if(!c.parent())return;h=!0}}}prop(e){return e.perNode?this.props?this.props[e.id]:void 0:this.type.prop(e)}get propValues(){let e=[];if(this.props)for(let n in this.props)e.push([+n,this.props[n]]);return e}balance(e={}){return this.children.length<=8?this:fS(Ht.none,this.children,this.positions,0,this.children.length,0,this.length,(n,i,r)=>new Ge(this.type,n,i,r,this.propValues),e.makeTree||((n,i,r)=>new Ge(Ht.none,n,i,r)))}static build(e){return MH(e)}}Ge.empty=new Ge(Ht.none,[],[],0);class uS{constructor(e,n){this.buffer=e,this.index=n}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}get pos(){return this.index}next(){this.index-=4}fork(){return new uS(this.buffer,this.index)}}class Vo{constructor(e,n,i){this.buffer=e,this.length=n,this.set=i}get type(){return Ht.none}toString(){let e=[];for(let n=0;n<this.buffer.length;)e.push(this.childString(n)),n=this.buffer[n+3];return e.join(",")}childString(e){let n=this.buffer[e],i=this.buffer[e+3],r=this.set.types[n],s=r.name;if(/\W/.test(s)&&!r.isError&&(s=JSON.stringify(s)),e+=4,i==e)return s;let o=[];for(;e<i;)o.push(this.childString(e)),e=this.buffer[e+3];return s+"("+o.join(",")+")"}findChild(e,n,i,r,s){let{buffer:o}=this,l=-1;for(let c=e;c!=n&&!(BL(s,r,o[c+1],o[c+2])&&(l=c,i>0));c=o[c+3]);return l}slice(e,n,i){let r=this.buffer,s=new Uint16Array(n-e),o=0;for(let l=e,c=0;l<n;){s[c++]=r[l++],s[c++]=r[l++]-i;let h=s[c++]=r[l++]-i;s[c++]=r[l++]-e,o=Math.max(o,h)}return new Vo(s,o,this.set)}}function BL(t,e,n,i){switch(t){case-2:return n<e;case-1:return i>=e&&n<e;case 0:return n<e&&i>e;case 1:return n<=e&&i>e;case 2:return i>e;case 4:return!0}}function hf(t,e,n,i){for(var r;t.from==t.to||(n<1?t.from>=e:t.from>e)||(n>-1?t.to<=e:t.to<e);){let o=!i&&t instanceof Tn&&t.index<0?null:t.parent;if(!o)return t;t=o}let s=i?0:wt.IgnoreOverlays;if(i)for(let o=t,l=o.parent;l;o=l,l=o.parent)o instanceof Tn&&o.index<0&&((r=l.enter(e,n,s))===null||r===void 0?void 0:r.from)!=o.from&&(t=l);for(;;){let o=t.enter(e,n,s);if(!o)return t;t=o}}class ZL{cursor(e=0){return new og(this,e)}getChild(e,n=null,i=null){let r=PC(this,e,n,i);return r.length?r[0]:null}getChildren(e,n=null,i=null){return PC(this,e,n,i)}resolve(e,n=0){return hf(this,e,n,!1)}resolveInner(e,n=0){return hf(this,e,n,!0)}matchContext(e){return s1(this.parent,e)}enterUnfinishedNodesBefore(e){let n=this.childBefore(e),i=this;for(;n;){let r=n.lastChild;if(!r||r.to!=n.to)break;r.type.isError&&r.from==r.to?(i=n,n=r.prevSibling):n=r}return i}get node(){return this}get next(){return this.parent}}class Tn extends ZL{constructor(e,n,i,r){super(),this._tree=e,this.from=n,this.index=i,this._parent=r}get type(){return this._tree.type}get name(){return this._tree.type.name}get to(){return this.from+this._tree.length}nextChild(e,n,i,r,s=0){for(let o=this;;){for(let{children:l,positions:c}=o._tree,h=n>0?l.length:-1;e!=h;e+=n){let d=l[e],p=c[e]+o.from;if(BL(r,i,p,p+d.length)){if(d instanceof Vo){if(s&wt.ExcludeBuffers)continue;let g=d.findChild(0,d.buffer.length,n,i-p,r);if(g>-1)return new Dr(new RH(o,d,e,p),null,g)}else if(s&wt.IncludeAnonymous||!d.type.isAnonymous||hS(d)){let g;if(!(s&wt.IgnoreMounts)&&(g=uf.get(d))&&!g.overlay)return new Tn(g.tree,p,e,o);let O=new Tn(d,p,e,o);return s&wt.IncludeAnonymous||!O.type.isAnonymous?O:O.nextChild(n<0?d.children.length-1:0,n,i,r)}}}if(s&wt.IncludeAnonymous||!o.type.isAnonymous||(o.index>=0?e=o.index+n:e=n<0?-1:o._parent._tree.children.length,o=o._parent,!o))return null}}get firstChild(){return this.nextChild(0,1,0,4)}get lastChild(){return this.nextChild(this._tree.children.length-1,-1,0,4)}childAfter(e){return this.nextChild(0,1,e,2)}childBefore(e){return this.nextChild(this._tree.children.length-1,-1,e,-2)}prop(e){return this._tree.prop(e)}enter(e,n,i=0){let r;if(!(i&wt.IgnoreOverlays)&&(r=uf.get(this._tree))&&r.overlay){let s=e-this.from;for(let{from:o,to:l}of r.overlay)if((n>0?o<=s:o<s)&&(n<0?l>=s:l>s))return new Tn(r.tree,r.overlay[0].from+this.from,-1,this)}return this.nextChild(0,1,e,n,i)}nextSignificantParent(){let e=this;for(;e.type.isAnonymous&&e._parent;)e=e._parent;return e}get parent(){return this._parent?this._parent.nextSignificantParent():null}get nextSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index+1,1,0,4):null}get prevSibling(){return this._parent&&this.index>=0?this._parent.nextChild(this.index-1,-1,0,4):null}get tree(){return this._tree}toTree(){return this._tree}toString(){return this._tree.toString()}}function PC(t,e,n,i){let r=t.cursor(),s=[];if(!r.firstChild())return s;if(n!=null){for(let o=!1;!o;)if(o=r.type.is(n),!r.nextSibling())return s}for(;;){if(i!=null&&r.type.is(i))return s;if(r.type.is(e)&&s.push(r.node),!r.nextSibling())return i==null?s:[]}}function s1(t,e,n=e.length-1){for(let i=t;n>=0;i=i.parent){if(!i)return!1;if(!i.type.isAnonymous){if(e[n]&&e[n]!=i.name)return!1;n--}}return!0}class RH{constructor(e,n,i,r){this.parent=e,this.buffer=n,this.index=i,this.start=r}}class Dr extends ZL{get name(){return this.type.name}get from(){return this.context.start+this.context.buffer.buffer[this.index+1]}get to(){return this.context.start+this.context.buffer.buffer[this.index+2]}constructor(e,n,i){super(),this.context=e,this._parent=n,this.index=i,this.type=e.buffer.set.types[e.buffer.buffer[i]]}child(e,n,i){let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.context.start,i);return s<0?null:new Dr(this.context,this,s)}get firstChild(){return this.child(1,0,4)}get lastChild(){return this.child(-1,0,4)}childAfter(e){return this.child(1,e,2)}childBefore(e){return this.child(-1,e,-2)}prop(e){return this.type.prop(e)}enter(e,n,i=0){if(i&wt.ExcludeBuffers)return null;let{buffer:r}=this.context,s=r.findChild(this.index+4,r.buffer[this.index+3],n>0?1:-1,e-this.context.start,n);return s<0?null:new Dr(this.context,this,s)}get parent(){return this._parent||this.context.parent.nextSignificantParent()}externalSibling(e){return this._parent?null:this.context.parent.nextChild(this.context.index+e,e,0,4)}get nextSibling(){let{buffer:e}=this.context,n=e.buffer[this.index+3];return n<(this._parent?e.buffer[this._parent.index+3]:e.buffer.length)?new Dr(this.context,this._parent,n):this.externalSibling(1)}get prevSibling(){let{buffer:e}=this.context,n=this._parent?this._parent.index+4:0;return this.index==n?this.externalSibling(-1):new Dr(this.context,this._parent,e.findChild(n,this.index,-1,0,4))}get tree(){return null}toTree(){let e=[],n=[],{buffer:i}=this.context,r=this.index+4,s=i.buffer[this.index+3];if(s>r){let o=i.buffer[this.index+1];e.push(i.slice(r,s,o)),n.push(0)}return new Ge(this.type,e,n,this.to-this.from)}toString(){return this.context.buffer.childString(this.index)}}function qL(t){if(!t.length)return null;let e=0,n=t[0];for(let s=1;s<t.length;s++){let o=t[s];(o.from>n.from||o.to<n.to)&&(n=o,e=s)}let i=n instanceof Tn&&n.index<0?null:n.parent,r=t.slice();return i?r[e]=i:r.splice(e,1),new $H(r,n)}class $H{constructor(e,n){this.heads=e,this.node=n}get next(){return qL(this.heads)}}function LH(t,e,n){let i=t.resolveInner(e,n),r=null;for(let s=i instanceof Tn?i:i.context.parent;s;s=s.parent)if(s.index<0){let o=s.parent;(r||(r=[i])).push(o.resolve(e,n)),s=o}else{let o=uf.get(s.tree);if(o&&o.overlay&&o.overlay[0].from<=e&&o.overlay[o.overlay.length-1].to>=e){let l=new Tn(o.tree,o.overlay[0].from+s.from,-1,s);(r||(r=[i])).push(hf(l,e,n,!1))}}return r?qL(r):i}class og{get name(){return this.type.name}constructor(e,n=0){if(this.mode=n,this.buffer=null,this.stack=[],this.index=0,this.bufferNode=null,e instanceof Tn)this.yieldNode(e);else{this._tree=e.context.parent,this.buffer=e.context;for(let i=e._parent;i;i=i._parent)this.stack.unshift(i.index);this.bufferNode=e,this.yieldBuf(e.index)}}yieldNode(e){return e?(this._tree=e,this.type=e.type,this.from=e.from,this.to=e.to,!0):!1}yieldBuf(e,n){this.index=e;let{start:i,buffer:r}=this.buffer;return this.type=n||r.set.types[r.buffer[e]],this.from=i+r.buffer[e+1],this.to=i+r.buffer[e+2],!0}yield(e){return e?e instanceof Tn?(this.buffer=null,this.yieldNode(e)):(this.buffer=e.context,this.yieldBuf(e.index,e.type)):!1}toString(){return this.buffer?this.buffer.buffer.childString(this.index):this._tree.toString()}enterChild(e,n,i){if(!this.buffer)return this.yield(this._tree.nextChild(e<0?this._tree._tree.children.length-1:0,e,n,i,this.mode));let{buffer:r}=this.buffer,s=r.findChild(this.index+4,r.buffer[this.index+3],e,n-this.buffer.start,i);return s<0?!1:(this.stack.push(this.index),this.yieldBuf(s))}firstChild(){return this.enterChild(1,0,4)}lastChild(){return this.enterChild(-1,0,4)}childAfter(e){return this.enterChild(1,e,2)}childBefore(e){return this.enterChild(-1,e,-2)}enter(e,n,i=this.mode){return this.buffer?i&wt.ExcludeBuffers?!1:this.enterChild(1,e,n):this.yield(this._tree.enter(e,n,i))}parent(){if(!this.buffer)return this.yieldNode(this.mode&wt.IncludeAnonymous?this._tree._parent:this._tree.parent);if(this.stack.length)return this.yieldBuf(this.stack.pop());let e=this.mode&wt.IncludeAnonymous?this.buffer.parent:this.buffer.parent.nextSignificantParent();return this.buffer=null,this.yieldNode(e)}sibling(e){if(!this.buffer)return this._tree._parent?this.yield(this._tree.index<0?null:this._tree._parent.nextChild(this._tree.index+e,e,0,4,this.mode)):!1;let{buffer:n}=this.buffer,i=this.stack.length-1;if(e<0){let r=i<0?0:this.stack[i]+4;if(this.index!=r)return this.yieldBuf(n.findChild(r,this.index,-1,0,4))}else{let r=n.buffer[this.index+3];if(r<(i<0?n.buffer.length:n.buffer[this.stack[i]+3]))return this.yieldBuf(r)}return i<0?this.yield(this.buffer.parent.nextChild(this.buffer.index+e,e,0,4,this.mode)):!1}nextSibling(){return this.sibling(1)}prevSibling(){return this.sibling(-1)}atLastNode(e){let n,i,{buffer:r}=this;if(r){if(e>0){if(this.index<r.buffer.buffer.length)return!1}else for(let s=0;s<this.index;s++)if(r.buffer.buffer[s+3]<this.index)return!1;({index:n,parent:i}=r)}else({index:n,_parent:i}=this._tree);for(;i;{index:n,_parent:i}=i)if(n>-1)for(let s=n+e,o=e<0?-1:i._tree.children.length;s!=o;s+=e){let l=i._tree.children[s];if(this.mode&wt.IncludeAnonymous||l instanceof Vo||!l.type.isAnonymous||hS(l))return!1}return!0}move(e,n){if(n&&this.enterChild(e,0,4))return!0;for(;;){if(this.sibling(e))return!0;if(this.atLastNode(e)||!this.parent())return!1}}next(e=!0){return this.move(1,e)}prev(e=!0){return this.move(-1,e)}moveTo(e,n=0){for(;(this.from==this.to||(n<1?this.from>=e:this.from>e)||(n>-1?this.to<=e:this.to<e))&&this.parent(););for(;this.enterChild(1,e,n););return this}get node(){if(!this.buffer)return this._tree;let e=this.bufferNode,n=null,i=0;if(e&&e.context==this.buffer)e:for(let r=this.index,s=this.stack.length;s>=0;){for(let o=e;o;o=o._parent)if(o.index==r){if(r==this.index)return o;n=o,i=s+1;break e}r=this.stack[--s]}for(let r=i;r<this.stack.length;r++)n=new Dr(this.buffer,n,this.stack[r]);return this.bufferNode=new Dr(this.buffer,n,this.index)}get tree(){return this.buffer?null:this._tree._tree}iterate(e,n){for(let i=0;;){let r=!1;if(this.type.isAnonymous||e(this)!==!1){if(this.firstChild()){i++;continue}this.type.isAnonymous||(r=!0)}for(;;){if(r&&n&&n(this),r=this.type.isAnonymous,!i)return;if(this.nextSibling())break;this.parent(),i--,r=!0}}}matchContext(e){if(!this.buffer)return s1(this.node.parent,e);let{buffer:n}=this.buffer,{types:i}=n.set;for(let r=e.length-1,s=this.stack.length-1;r>=0;s--){if(s<0)return s1(this._tree,e,r);let o=i[n.buffer[this.stack[s]]];if(!o.isAnonymous){if(e[r]&&e[r]!=o.name)return!1;r--}}return!0}}function hS(t){return t.children.some(e=>e instanceof Vo||!e.type.isAnonymous||hS(e))}function MH(t){var e;let{buffer:n,nodeSet:i,maxBufferLength:r=VL,reused:s=[],minRepeatType:o=i.types.length}=t,l=Array.isArray(n)?new uS(n,n.length):n,c=i.types,h=0,d=0;function p($,C,D,Z,U,M){let{id:V,start:G,end:J,size:K}=l,ie=d,q=h;if(K<0)if(l.next(),K==-1){let N=s[V];D.push(N),Z.push(G-$);return}else if(K==-3){h=V;return}else if(K==-4){d=V;return}else throw new RangeError(`Unrecognized record size: ${K}`);let se=c[V],pe,ve,j=G-$;if(J-G<=r&&(ve=_(l.pos-C,U))){let N=new Uint16Array(ve.size-ve.skip),te=l.pos-ve.size,L=N.length;for(;l.pos>te;)L=k(ve.start,N,L);pe=new Vo(N,J-ve.start,i),j=ve.start-$}else{let N=l.pos-K;l.next();let te=[],L=[],re=V>=o?V:-1,ge=0,be=J;for(;l.pos>N;)re>=0&&l.id==re&&l.size>=0?(l.end<=be-r&&(x(te,L,G,ge,l.end,be,re,ie,q),ge=te.length,be=l.end),l.next()):M>2500?g(G,N,te,L):p(G,N,te,L,re,M+1);if(re>=0&&ge>0&&ge<te.length&&x(te,L,G,ge,G,be,re,ie,q),te.reverse(),L.reverse(),re>-1&&ge>0){let Ce=O(se,q);pe=fS(se,te,L,0,te.length,0,J-G,Ce,Ce)}else pe=S(se,te,L,J-G,ie-J,q)}D.push(pe),Z.push(j)}function g($,C,D,Z){let U=[],M=0,V=-1;for(;l.pos>C;){let{id:G,start:J,end:K,size:ie}=l;if(ie>4)l.next();else{if(V>-1&&J<V)break;V<0&&(V=K-r),U.push(G,J,K),M++,l.next()}}if(M){let G=new Uint16Array(M*4),J=U[U.length-2];for(let K=U.length-3,ie=0;K>=0;K-=3)G[ie++]=U[K],G[ie++]=U[K+1]-J,G[ie++]=U[K+2]-J,G[ie++]=ie;D.push(new Vo(G,U[2]-J,i)),Z.push(J-$)}}function O($,C){return(D,Z,U)=>{let M=0,V=D.length-1,G,J;if(V>=0&&(G=D[V])instanceof Ge){if(!V&&G.type==$&&G.length==U)return G;(J=G.prop(Me.lookAhead))&&(M=Z[V]+G.length+J)}return S($,D,Z,U,M,C)}}function x($,C,D,Z,U,M,V,G,J){let K=[],ie=[];for(;$.length>Z;)K.push($.pop()),ie.push(C.pop()+D-U);$.push(S(i.types[V],K,ie,M-U,G-M,J)),C.push(U-D)}function S($,C,D,Z,U,M,V){if(M){let G=[Me.contextHash,M];V=V?[G].concat(V):[G]}if(U>25){let G=[Me.lookAhead,U];V=V?[G].concat(V):[G]}return new Ge($,C,D,Z,V)}function _($,C){let D=l.fork(),Z=0,U=0,M=0,V=D.end-r,G={size:0,start:0,skip:0};e:for(let J=D.pos-$;D.pos>J;){let K=D.size;if(D.id==C&&K>=0){G.size=Z,G.start=U,G.skip=M,M+=4,Z+=4,D.next();continue}let ie=D.pos-K;if(K<0||ie<J||D.start<V)break;let q=D.id>=o?4:0,se=D.start;for(D.next();D.pos>ie;){if(D.size<0)if(D.size==-3||D.size==-4)q+=4;else break e;else D.id>=o&&(q+=4);D.next()}U=se,Z+=K,M+=q}return(C<0||Z==$)&&(G.size=Z,G.start=U,G.skip=M),G.size>4?G:void 0}function k($,C,D){let{id:Z,start:U,end:M,size:V}=l;if(l.next(),V>=0&&Z<o){let G=D;if(V>4){let J=l.pos-(V-4);for(;l.pos>J;)D=k($,C,D)}C[--D]=G,C[--D]=M-$,C[--D]=U-$,C[--D]=Z}else V==-3?h=Z:V==-4&&(d=Z);return D}let P=[],Q=[];for(;l.pos>0;)p(t.start||0,t.bufferStart||0,P,Q,-1,0);let R=(e=t.length)!==null&&e!==void 0?e:P.length?Q[0]+P[0].length:0;return new Ge(c[t.topID],P.reverse(),Q.reverse(),R)}const TC=new WeakMap;function ym(t,e){if(!t.isAnonymous||e instanceof Vo||e.type!=t)return 1;let n=TC.get(e);if(n==null){n=1;for(let i of e.children){if(i.type!=t||!(i instanceof Ge)){n=1;break}n+=ym(t,i)}TC.set(e,n)}return n}function fS(t,e,n,i,r,s,o,l,c){let h=0;for(let x=i;x<r;x++)h+=ym(t,e[x]);let d=Math.ceil(h*1.5/8),p=[],g=[];function O(x,S,_,k,P){for(let Q=_;Q<k;){let R=Q,$=S[Q],C=ym(t,x[Q]);for(Q++;Q<k;Q++){let D=ym(t,x[Q]);if(C+D>=d)break;C+=D}if(Q==R+1){if(C>d){let D=x[R];O(D.children,D.positions,0,D.children.length,S[R]+P);continue}p.push(x[R])}else{let D=S[Q-1]+x[Q-1].length-$;p.push(fS(t,x,S,R,Q,$,D,null,c))}g.push($+P-s)}}return O(e,n,i,r,0),(l||c)(p,g,o)}class UL{constructor(){this.map=new WeakMap}setBuffer(e,n,i){let r=this.map.get(e);r||this.map.set(e,r=new Map),r.set(n,i)}getBuffer(e,n){let i=this.map.get(e);return i&&i.get(n)}set(e,n){e instanceof Dr?this.setBuffer(e.context.buffer,e.index,n):e instanceof Tn&&this.map.set(e.tree,n)}get(e){return e instanceof Dr?this.getBuffer(e.context.buffer,e.index):e instanceof Tn?this.map.get(e.tree):void 0}cursorSet(e,n){e.buffer?this.setBuffer(e.buffer.buffer,e.index,n):this.map.set(e.tree,n)}cursorGet(e){return e.buffer?this.getBuffer(e.buffer.buffer,e.index):this.map.get(e.tree)}}class Qs{constructor(e,n,i,r,s=!1,o=!1){this.from=e,this.to=n,this.tree=i,this.offset=r,this.open=(s?1:0)|(o?2:0)}get openStart(){return(this.open&1)>0}get openEnd(){return(this.open&2)>0}static addTree(e,n=[],i=!1){let r=[new Qs(0,e.length,e,0,!1,i)];for(let s of n)s.to>e.length&&r.push(s);return r}static applyChanges(e,n,i=128){if(!n.length)return e;let r=[],s=1,o=e.length?e[0]:null;for(let l=0,c=0,h=0;;l++){let d=l<n.length?n[l]:null,p=d?d.fromA:1e9;if(p-c>=i)for(;o&&o.from<p;){let g=o;if(c>=g.from||p<=g.to||h){let O=Math.max(g.from,c)-h,x=Math.min(g.to,p)-h;g=O>=x?null:new Qs(O,x,g.tree,g.offset+h,l>0,!!d)}if(g&&r.push(g),o.to>p)break;o=s<e.length?e[s++]:null}if(!d)break;c=d.toA,h=d.toA-d.toB}return r}}class iO{startParse(e,n,i){return typeof e=="string"&&(e=new DH(e)),i=i?i.length?i.map(r=>new Zi(r.from,r.to)):[new Zi(0,0)]:[new Zi(0,e.length)],this.createParse(e,n||[],i)}parse(e,n,i){let r=this.startParse(e,n,i);for(;;){let s=r.advance();if(s)return s}}}class DH{constructor(e){this.string=e}get length(){return this.string.length}chunk(e){return this.string.slice(e)}get lineChunks(){return!1}read(e,n){return this.string.slice(e,n)}}function dS(t){return(e,n,i,r)=>new NH(e,t,n,i,r)}class QC{constructor(e,n,i,r,s){this.parser=e,this.parse=n,this.overlay=i,this.target=r,this.from=s}}function CC(t){if(!t.length||t.some(e=>e.from>=e.to))throw new RangeError("Invalid inner parse ranges given: "+JSON.stringify(t))}class jH{constructor(e,n,i,r,s,o,l){this.parser=e,this.predicate=n,this.mounts=i,this.index=r,this.start=s,this.target=o,this.prev=l,this.depth=0,this.ranges=[]}}const o1=new Me({perNode:!0});class NH{constructor(e,n,i,r,s){this.nest=n,this.input=i,this.fragments=r,this.ranges=s,this.inner=[],this.innerDone=0,this.baseTree=null,this.stoppedAt=null,this.baseParse=e}advance(){if(this.baseParse){let i=this.baseParse.advance();if(!i)return null;if(this.baseParse=null,this.baseTree=i,this.startInner(),this.stoppedAt!=null)for(let r of this.inner)r.parse.stopAt(this.stoppedAt)}if(this.innerDone==this.inner.length){let i=this.baseTree;return this.stoppedAt!=null&&(i=new Ge(i.type,i.children,i.positions,i.length,i.propValues.concat([[o1,this.stoppedAt]]))),i}let e=this.inner[this.innerDone],n=e.parse.advance();if(n){this.innerDone++;let i=Object.assign(Object.create(null),e.target.props);i[Me.mounted.id]=new uf(n,e.overlay,e.parser),e.target.props=i}return null}get parsedPos(){if(this.baseParse)return 0;let e=this.input.length;for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].from<e&&(e=Math.min(e,this.inner[n].parse.parsedPos));return e}stopAt(e){if(this.stoppedAt=e,this.baseParse)this.baseParse.stopAt(e);else for(let n=this.innerDone;n<this.inner.length;n++)this.inner[n].parse.stopAt(e)}startInner(){let e=new XH(this.fragments),n=null,i=null,r=new og(new Tn(this.baseTree,this.ranges[0].from,0,null),wt.IncludeAnonymous|wt.IgnoreMounts);e:for(let s,o;;){let l=!0,c;if(this.stoppedAt!=null&&r.from>=this.stoppedAt)l=!1;else if(e.hasNode(r)){if(n){let h=n.mounts.find(d=>d.frag.from<=r.from&&d.frag.to>=r.to&&d.mount.overlay);if(h)for(let d of h.mount.overlay){let p=d.from+h.pos,g=d.to+h.pos;p>=r.from&&g<=r.to&&!n.ranges.some(O=>O.from<g&&O.to>p)&&n.ranges.push({from:p,to:g})}}l=!1}else if(i&&(o=zH(i.ranges,r.from,r.to)))l=o!=2;else if(!r.type.isAnonymous&&(s=this.nest(r,this.input))&&(r.from<r.to||!s.overlay)){r.tree||(IH(r),n&&n.depth++,i&&i.depth++);let h=e.findMounts(r.from,s.parser);if(typeof s.overlay=="function")n=new jH(s.parser,s.overlay,h,this.inner.length,r.from,r.tree,n);else{let d=RC(this.ranges,s.overlay||(r.from<r.to?[new Zi(r.from,r.to)]:[]));d.length&&CC(d),(d.length||!s.overlay)&&this.inner.push(new QC(s.parser,d.length?s.parser.startParse(this.input,$C(h,d),d):s.parser.startParse(""),s.overlay?s.overlay.map(p=>new Zi(p.from-r.from,p.to-r.from)):null,r.tree,d.length?d[0].from:r.from)),s.overlay?d.length&&(i={ranges:d,depth:0,prev:i}):l=!1}}else if(n&&(c=n.predicate(r))&&(c===!0&&(c=new Zi(r.from,r.to)),c.from<c.to)){let h=n.ranges.length-1;h>=0&&n.ranges[h].to==c.from?n.ranges[h]={from:n.ranges[h].from,to:c.to}:n.ranges.push(c)}if(l&&r.firstChild())n&&n.depth++,i&&i.depth++;else for(;!r.nextSibling();){if(!r.parent())break e;if(n&&!--n.depth){let h=RC(this.ranges,n.ranges);h.length&&(CC(h),this.inner.splice(n.index,0,new QC(n.parser,n.parser.startParse(this.input,$C(n.mounts,h),h),n.ranges.map(d=>new Zi(d.from-n.start,d.to-n.start)),n.target,h[0].from))),n=n.prev}i&&!--i.depth&&(i=i.prev)}}}}function zH(t,e,n){for(let i of t){if(i.from>=n)break;if(i.to>e)return i.from<=e&&i.to>=n?2:1}return 0}function EC(t,e,n,i,r,s){if(e<n){let o=t.buffer[e+1];i.push(t.slice(e,n,o)),r.push(o-s)}}function IH(t){let{node:e}=t,n=[],i=e.context.buffer;do n.push(t.index),t.parent();while(!t.tree);let r=t.tree,s=r.children.indexOf(i),o=r.children[s],l=o.buffer,c=[s];function h(d,p,g,O,x,S){let _=n[S],k=[],P=[];EC(o,d,_,k,P,O);let Q=l[_+1],R=l[_+2];c.push(k.length);let $=S?h(_+4,l[_+3],o.set.types[l[_]],Q,R-Q,S-1):e.toTree();return k.push($),P.push(Q-O),EC(o,l[_+3],p,k,P,O),new Ge(g,k,P,x)}r.children[s]=h(0,l.length,Ht.none,0,o.length,n.length-1);for(let d of c){let p=t.tree.children[d],g=t.tree.positions[d];t.yield(new Tn(p,g+t.from,d,t._tree))}}class AC{constructor(e,n){this.offset=n,this.done=!1,this.cursor=e.cursor(wt.IncludeAnonymous|wt.IgnoreMounts)}moveTo(e){let{cursor:n}=this,i=e-this.offset;for(;!this.done&&n.from<i;)n.to>=e&&n.enter(i,1,wt.IgnoreOverlays|wt.ExcludeBuffers)||n.next(!1)||(this.done=!0)}hasNode(e){if(this.moveTo(e.from),!this.done&&this.cursor.from+this.offset==e.from&&this.cursor.tree)for(let n=this.cursor.tree;;){if(n==e.tree)return!0;if(n.children.length&&n.positions[0]==0&&n.children[0]instanceof Ge)n=n.children[0];else break}return!1}}let XH=class{constructor(e){var n;if(this.fragments=e,this.curTo=0,this.fragI=0,e.length){let i=this.curFrag=e[0];this.curTo=(n=i.tree.prop(o1))!==null&&n!==void 0?n:i.to,this.inner=new AC(i.tree,-i.offset)}else this.curFrag=this.inner=null}hasNode(e){for(;this.curFrag&&e.from>=this.curTo;)this.nextFrag();return this.curFrag&&this.curFrag.from<=e.from&&this.curTo>=e.to&&this.inner.hasNode(e)}nextFrag(){var e;if(this.fragI++,this.fragI==this.fragments.length)this.curFrag=this.inner=null;else{let n=this.curFrag=this.fragments[this.fragI];this.curTo=(e=n.tree.prop(o1))!==null&&e!==void 0?e:n.to,this.inner=new AC(n.tree,-n.offset)}}findMounts(e,n){var i;let r=[];if(this.inner){this.inner.cursor.moveTo(e,1);for(let s=this.inner.cursor.node;s;s=s.parent){let o=(i=s.tree)===null||i===void 0?void 0:i.prop(Me.mounted);if(o&&o.parser==n)for(let l=this.fragI;l<this.fragments.length;l++){let c=this.fragments[l];if(c.from>=s.to)break;c.tree==this.curFrag.tree&&r.push({frag:c,pos:s.from-c.offset,mount:o})}}}return r}};function RC(t,e){let n=null,i=e;for(let r=1,s=0;r<t.length;r++){let o=t[r-1].to,l=t[r].from;for(;s<i.length;s++){let c=i[s];if(c.from>=l)break;c.to<=o||(n||(i=n=e.slice()),c.from<o?(n[s]=new Zi(c.from,o),c.to>l&&n.splice(s+1,0,new Zi(l,c.to))):c.to>l?n[s--]=new Zi(l,c.to):n.splice(s--,1))}}return i}function VH(t,e,n,i){let r=0,s=0,o=!1,l=!1,c=-1e9,h=[];for(;;){let d=r==t.length?1e9:o?t[r].to:t[r].from,p=s==e.length?1e9:l?e[s].to:e[s].from;if(o!=l){let g=Math.max(c,n),O=Math.min(d,p,i);g<O&&h.push(new Zi(g,O))}if(c=Math.min(d,p),c==1e9)break;d==c&&(o?(o=!1,r++):o=!0),p==c&&(l?(l=!1,s++):l=!0)}return h}function $C(t,e){let n=[];for(let{pos:i,mount:r,frag:s}of t){let o=i+(r.overlay?r.overlay[0].from:0),l=o+r.tree.length,c=Math.max(s.from,o),h=Math.min(s.to,l);if(r.overlay){let d=r.overlay.map(g=>new Zi(g.from+i,g.to+i)),p=VH(e,d,c,h);for(let g=0,O=c;;g++){let x=g==p.length,S=x?h:p[g].from;if(S>O&&n.push(new Qs(O,S,r.tree,-o,s.from>=O||s.openStart,s.to<=S||s.openEnd)),x)break;O=p[g].to}}else n.push(new Qs(c,h,r.tree,-o,s.from>=o||s.openStart,s.to<=l||s.openEnd))}return n}let a1=[],YL=[];(()=>{let t="lc,34,7n,7,7b,19,,,,2,,2,,,20,b,1c,l,g,,2t,7,2,6,2,2,,4,z,,u,r,2j,b,1m,9,9,,o,4,,9,,3,,5,17,3,3b,f,,w,1j,,,,4,8,4,,3,7,a,2,t,,1m,,,,2,4,8,,9,,a,2,q,,2,2,1l,,4,2,4,2,2,3,3,,u,2,3,,b,2,1l,,4,5,,2,4,,k,2,m,6,,,1m,,,2,,4,8,,7,3,a,2,u,,1n,,,,c,,9,,14,,3,,1l,3,5,3,,4,7,2,b,2,t,,1m,,2,,2,,3,,5,2,7,2,b,2,s,2,1l,2,,,2,4,8,,9,,a,2,t,,20,,4,,2,3,,,8,,29,,2,7,c,8,2q,,2,9,b,6,22,2,r,,,,,,1j,e,,5,,2,5,b,,10,9,,2u,4,,6,,2,2,2,p,2,4,3,g,4,d,,2,2,6,,f,,jj,3,qa,3,t,3,t,2,u,2,1s,2,,7,8,,2,b,9,,19,3,3b,2,y,,3a,3,4,2,9,,6,3,63,2,2,,1m,,,7,,,,,2,8,6,a,2,,1c,h,1r,4,1c,7,,,5,,14,9,c,2,w,4,2,2,,3,1k,,,2,3,,,3,1m,8,2,2,48,3,,d,,7,4,,6,,3,2,5i,1m,,5,ek,,5f,x,2da,3,3x,,2o,w,fe,6,2x,2,n9w,4,,a,w,2,28,2,7k,,3,,4,,p,2,5,,47,2,q,i,d,,12,8,p,b,1a,3,1c,,2,4,2,2,13,,1v,6,2,2,2,2,c,,8,,1b,,1f,,,3,2,2,5,2,,,16,2,8,,6m,,2,,4,,fn4,,kh,g,g,g,a6,2,gt,,6a,,45,5,1ae,3,,2,5,4,14,3,4,,4l,2,fx,4,ar,2,49,b,4w,,1i,f,1k,3,1d,4,2,2,1x,3,10,5,,8,1q,,c,2,1g,9,a,4,2,,2n,3,2,,,2,6,,4g,,3,8,l,2,1l,2,,,,,m,,e,7,3,5,5f,8,2,3,,,n,,29,,2,6,,,2,,,2,,2,6j,,2,4,6,2,,2,r,2,2d,8,2,,,2,2y,,,,2,6,,,2t,3,2,4,,5,77,9,,2,6t,,a,2,,,4,,40,4,2,2,4,,w,a,14,6,2,4,8,,9,6,2,3,1a,d,,2,ba,7,,6,,,2a,m,2,7,,2,,2,3e,6,3,,,2,,7,,,20,2,3,,,,9n,2,f0b,5,1n,7,t4,,1r,4,29,,f5k,2,43q,,,3,4,5,8,8,2,7,u,4,44,3,1iz,1j,4,1e,8,,e,,m,5,,f,11s,7,,h,2,7,,2,,5,79,7,c5,4,15s,7,31,7,240,5,gx7k,2o,3k,6o".split(",").map(e=>e?parseInt(e,36):1);for(let e=0,n=0;e<t.length;e++)(e%2?YL:a1).push(n=n+t[e])})();function BH(t){if(t<768)return!1;for(let e=0,n=a1.length;;){let i=e+n>>1;if(t<a1[i])n=i;else if(t>=YL[i])e=i+1;else return!0;if(e==n)return!1}}function LC(t){return t>=127462&&t<=127487}const MC=8205;function ZH(t,e,n=!0,i=!0){return(n?GL:qH)(t,e,i)}function GL(t,e,n){if(e==t.length)return e;e&&WL(t.charCodeAt(e))&&HL(t.charCodeAt(e-1))&&e--;let i=Pb(t,e);for(e+=DC(i);e<t.length;){let r=Pb(t,e);if(i==MC||r==MC||n&&BH(r))e+=DC(r),i=r;else if(LC(r)){let s=0,o=e-2;for(;o>=0&&LC(Pb(t,o));)s++,o-=2;if(s%2==0)break;e+=2}else break}return e}function qH(t,e,n){for(;e>0;){let i=GL(t,e-2,n);if(i<e)return i;e--}return 0}function Pb(t,e){let n=t.charCodeAt(e);if(!HL(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return WL(i)?(n-55296<<10)+(i-56320)+65536:n}function WL(t){return t>=56320&&t<57344}function HL(t){return t>=55296&&t<56320}function DC(t){return t<65536?1:2}class tt{lineAt(e){if(e<0||e>this.length)throw new RangeError(`Invalid position ${e} in document of length ${this.length}`);return this.lineInner(e,!1,1,0)}line(e){if(e<1||e>this.lines)throw new RangeError(`Invalid line number ${e} in ${this.lines}-line document`);return this.lineInner(e,!0,1,0)}replace(e,n,i){[e,n]=Bc(this,e,n);let r=[];return this.decompose(0,e,r,2),i.length&&i.decompose(0,i.length,r,3),this.decompose(n,this.length,r,1),Rr.from(r,this.length-(n-e)+i.length)}append(e){return this.replace(this.length,this.length,e)}slice(e,n=this.length){[e,n]=Bc(this,e,n);let i=[];return this.decompose(e,n,i,0),Rr.from(i,n-e)}eq(e){if(e==this)return!0;if(e.length!=this.length||e.lines!=this.lines)return!1;let n=this.scanIdentical(e,1),i=this.length-this.scanIdentical(e,-1),r=new Xh(this),s=new Xh(e);for(let o=n,l=n;;){if(r.next(o),s.next(o),o=0,r.lineBreak!=s.lineBreak||r.done!=s.done||r.value!=s.value)return!1;if(l+=r.value.length,r.done||l>=i)return!0}}iter(e=1){return new Xh(this,e)}iterRange(e,n=this.length){return new FL(this,e,n)}iterLines(e,n){let i;if(e==null)i=this.iter();else{n==null&&(n=this.lines+1);let r=this.line(e).from;i=this.iterRange(r,Math.max(r,n==this.lines+1?this.length:n<=1?0:this.line(n-1).to))}return new KL(i)}toString(){return this.sliceString(0)}toJSON(){let e=[];return this.flatten(e),e}constructor(){}static of(e){if(e.length==0)throw new RangeError("A document must have at least one line");return e.length==1&&!e[0]?tt.empty:e.length<=32?new zt(e):Rr.from(zt.split(e,[]))}}class zt extends tt{constructor(e,n=UH(e)){super(),this.text=e,this.length=n}get lines(){return this.text.length}get children(){return null}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.text[s],l=r+o.length;if((n?i:l)>=e)return new YH(r,l,i,o);r=l+1,i++}}decompose(e,n,i,r){let s=e<=0&&n>=this.length?this:new zt(jC(this.text,e,n),Math.min(n,this.length)-Math.max(0,e));if(r&1){let o=i.pop(),l=bm(s.text,o.text.slice(),0,s.length);if(l.length<=32)i.push(new zt(l,o.length+s.length));else{let c=l.length>>1;i.push(new zt(l.slice(0,c)),new zt(l.slice(c)))}}else i.push(s)}replace(e,n,i){if(!(i instanceof zt))return super.replace(e,n,i);[e,n]=Bc(this,e,n);let r=bm(this.text,bm(i.text,jC(this.text,0,e)),n),s=this.length+i.length-(n-e);return r.length<=32?new zt(r,s):Rr.from(zt.split(r,[]),s)}sliceString(e,n=this.length,i=`
392
+ `){[e,n]=Bc(this,e,n);let r="";for(let s=0,o=0;s<=n&&o<this.text.length;o++){let l=this.text[o],c=s+l.length;s>e&&o&&(r+=i),e<c&&n>s&&(r+=l.slice(Math.max(0,e-s),n-s)),s=c+1}return r}flatten(e){for(let n of this.text)e.push(n)}scanIdentical(){return 0}static split(e,n){let i=[],r=-1;for(let s of e)i.push(s),r+=s.length+1,i.length==32&&(n.push(new zt(i,r)),i=[],r=-1);return r>-1&&n.push(new zt(i,r)),n}}class Rr extends tt{constructor(e,n){super(),this.children=e,this.length=n,this.lines=0;for(let i of e)this.lines+=i.lines}lineInner(e,n,i,r){for(let s=0;;s++){let o=this.children[s],l=r+o.length,c=i+o.lines-1;if((n?c:l)>=e)return o.lineInner(e,n,i,r);r=l+1,i=c+1}}decompose(e,n,i,r){for(let s=0,o=0;o<=n&&s<this.children.length;s++){let l=this.children[s],c=o+l.length;if(e<=c&&n>=o){let h=r&((o<=e?1:0)|(c>=n?2:0));o>=e&&c<=n&&!h?i.push(l):l.decompose(e-o,n-o,i,h)}o=c+1}}replace(e,n,i){if([e,n]=Bc(this,e,n),i.lines<this.lines)for(let r=0,s=0;r<this.children.length;r++){let o=this.children[r],l=s+o.length;if(e>=s&&n<=l){let c=o.replace(e-s,n-s,i),h=this.lines-o.lines+c.lines;if(c.lines<h>>4&&c.lines>h>>6){let d=this.children.slice();return d[r]=c,new Rr(d,this.length-(n-e)+i.length)}return super.replace(s,l,c)}s=l+1}return super.replace(e,n,i)}sliceString(e,n=this.length,i=`
393
+ `){[e,n]=Bc(this,e,n);let r="";for(let s=0,o=0;s<this.children.length&&o<=n;s++){let l=this.children[s],c=o+l.length;o>e&&s&&(r+=i),e<c&&n>o&&(r+=l.sliceString(e-o,n-o,i)),o=c+1}return r}flatten(e){for(let n of this.children)n.flatten(e)}scanIdentical(e,n){if(!(e instanceof Rr))return 0;let i=0,[r,s,o,l]=n>0?[0,0,this.children.length,e.children.length]:[this.children.length-1,e.children.length-1,-1,-1];for(;;r+=n,s+=n){if(r==o||s==l)return i;let c=this.children[r],h=e.children[s];if(c!=h)return i+c.scanIdentical(h,n);i+=c.length+1}}static from(e,n=e.reduce((i,r)=>i+r.length+1,-1)){let i=0;for(let O of e)i+=O.lines;if(i<32){let O=[];for(let x of e)x.flatten(O);return new zt(O,n)}let r=Math.max(32,i>>5),s=r<<1,o=r>>1,l=[],c=0,h=-1,d=[];function p(O){let x;if(O.lines>s&&O instanceof Rr)for(let S of O.children)p(S);else O.lines>o&&(c>o||!c)?(g(),l.push(O)):O instanceof zt&&c&&(x=d[d.length-1])instanceof zt&&O.lines+x.lines<=32?(c+=O.lines,h+=O.length+1,d[d.length-1]=new zt(x.text.concat(O.text),x.length+1+O.length)):(c+O.lines>r&&g(),c+=O.lines,h+=O.length+1,d.push(O))}function g(){c!=0&&(l.push(d.length==1?d[0]:Rr.from(d,h)),h=-1,c=d.length=0)}for(let O of e)p(O);return g(),l.length==1?l[0]:new Rr(l,n)}}tt.empty=new zt([""],0);function UH(t){let e=-1;for(let n of t)e+=n.length+1;return e}function bm(t,e,n=0,i=1e9){for(let r=0,s=0,o=!0;s<t.length&&r<=i;s++){let l=t[s],c=r+l.length;c>=n&&(c>i&&(l=l.slice(0,i-r)),r<n&&(l=l.slice(n-r)),o?(e[e.length-1]+=l,o=!1):e.push(l)),r=c+1}return e}function jC(t,e,n){return bm(t,[""],e,n)}class Xh{constructor(e,n=1){this.dir=n,this.done=!1,this.lineBreak=!1,this.value="",this.nodes=[e],this.offsets=[n>0?1:(e instanceof zt?e.text.length:e.children.length)<<1]}nextInner(e,n){for(this.done=this.lineBreak=!1;;){let i=this.nodes.length-1,r=this.nodes[i],s=this.offsets[i],o=s>>1,l=r instanceof zt?r.text.length:r.children.length;if(o==(n>0?l:0)){if(i==0)return this.done=!0,this.value="",this;n>0&&this.offsets[i-1]++,this.nodes.pop(),this.offsets.pop()}else if((s&1)==(n>0?0:1)){if(this.offsets[i]+=n,e==0)return this.lineBreak=!0,this.value=`
394
+ `,this;e--}else if(r instanceof zt){let c=r.text[o+(n<0?-1:0)];if(this.offsets[i]+=n,c.length>Math.max(0,e))return this.value=e==0?c:n>0?c.slice(e):c.slice(0,c.length-e),this;e-=c.length}else{let c=r.children[o+(n<0?-1:0)];e>c.length?(e-=c.length,this.offsets[i]+=n):(n<0&&this.offsets[i]--,this.nodes.push(c),this.offsets.push(n>0?1:(c instanceof zt?c.text.length:c.children.length)<<1))}}}next(e=0){return e<0&&(this.nextInner(-e,-this.dir),e=this.value.length),this.nextInner(e,this.dir)}}class FL{constructor(e,n,i){this.value="",this.done=!1,this.cursor=new Xh(e,n>i?-1:1),this.pos=n>i?e.length:0,this.from=Math.min(n,i),this.to=Math.max(n,i)}nextInner(e,n){if(n<0?this.pos<=this.from:this.pos>=this.to)return this.value="",this.done=!0,this;e+=Math.max(0,n<0?this.pos-this.to:this.from-this.pos);let i=n<0?this.pos-this.from:this.to-this.pos;e>i&&(e=i),i-=e;let{value:r}=this.cursor.next(e);return this.pos+=(r.length+e)*n,this.value=r.length<=i?r:n<0?r.slice(r.length-i):r.slice(0,i),this.done=!this.value,this}next(e=0){return e<0?e=Math.max(e,this.from-this.pos):e>0&&(e=Math.min(e,this.to-this.pos)),this.nextInner(e,this.cursor.dir)}get lineBreak(){return this.cursor.lineBreak&&this.value!=""}}class KL{constructor(e){this.inner=e,this.afterBreak=!0,this.value="",this.done=!1}next(e=0){let{done:n,lineBreak:i,value:r}=this.inner.next(e);return n&&this.afterBreak?(this.value="",this.afterBreak=!1):n?(this.done=!0,this.value=""):i?this.afterBreak?this.value="":(this.afterBreak=!0,this.next()):(this.value=r,this.afterBreak=!1),this}get lineBreak(){return!1}}typeof Symbol<"u"&&(tt.prototype[Symbol.iterator]=function(){return this.iter()},Xh.prototype[Symbol.iterator]=FL.prototype[Symbol.iterator]=KL.prototype[Symbol.iterator]=function(){return this});let YH=class{constructor(e,n,i,r){this.from=e,this.to=n,this.number=i,this.text=r}get length(){return this.to-this.from}};function Bc(t,e,n){return e=Math.max(0,Math.min(t.length,e)),[e,Math.max(e,Math.min(t.length,n))]}function yn(t,e,n=!0,i=!0){return ZH(t,e,n,i)}function GH(t){return t>=56320&&t<57344}function WH(t){return t>=55296&&t<56320}function ei(t,e){let n=t.charCodeAt(e);if(!WH(n)||e+1==t.length)return n;let i=t.charCodeAt(e+1);return GH(i)?(n-55296<<10)+(i-56320)+65536:n}function pS(t){return t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10)+55296,(t&1023)+56320))}function $r(t){return t<65536?1:2}const l1=/\r\n?|\n/;var On=(function(t){return t[t.Simple=0]="Simple",t[t.TrackDel=1]="TrackDel",t[t.TrackBefore=2]="TrackBefore",t[t.TrackAfter=3]="TrackAfter",t})(On||(On={}));class zr{constructor(e){this.sections=e}get length(){let e=0;for(let n=0;n<this.sections.length;n+=2)e+=this.sections[n];return e}get newLength(){let e=0;for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n+1];e+=i<0?this.sections[n]:i}return e}get empty(){return this.sections.length==0||this.sections.length==2&&this.sections[1]<0}iterGaps(e){for(let n=0,i=0,r=0;n<this.sections.length;){let s=this.sections[n++],o=this.sections[n++];o<0?(e(i,r,s),r+=s):r+=o,i+=s}}iterChangedRanges(e,n=!1){c1(this,e,n)}get invertedDesc(){let e=[];for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];r<0?e.push(i,r):e.push(r,i)}return new zr(e)}composeDesc(e){return this.empty?e:e.empty?this:JL(this,e)}mapDesc(e,n=!1){return e.empty?this:u1(this,e,n)}mapPos(e,n=-1,i=On.Simple){let r=0,s=0;for(let o=0;o<this.sections.length;){let l=this.sections[o++],c=this.sections[o++],h=r+l;if(c<0){if(h>e)return s+(e-r);s+=l}else{if(i!=On.Simple&&h>=e&&(i==On.TrackDel&&r<e&&h>e||i==On.TrackBefore&&r<e||i==On.TrackAfter&&h>e))return null;if(h>e||h==e&&n<0&&!l)return e==r||n<0?s:s+c;s+=c}r=h}if(e>r)throw new RangeError(`Position ${e} is out of range for changeset of length ${r}`);return s}touchesRange(e,n=e){for(let i=0,r=0;i<this.sections.length&&r<=n;){let s=this.sections[i++],o=this.sections[i++],l=r+s;if(o>=0&&r<=n&&l>=e)return r<e&&l>n?"cover":!0;r=l}return!1}toString(){let e="";for(let n=0;n<this.sections.length;){let i=this.sections[n++],r=this.sections[n++];e+=(e?" ":"")+i+(r>=0?":"+r:"")}return e}toJSON(){return this.sections}static fromJSON(e){if(!Array.isArray(e)||e.length%2||e.some(n=>typeof n!="number"))throw new RangeError("Invalid JSON representation of ChangeDesc");return new zr(e)}static create(e){return new zr(e)}}class en extends zr{constructor(e,n){super(e),this.inserted=n}apply(e){if(this.length!=e.length)throw new RangeError("Applying change set to a document with the wrong length");return c1(this,(n,i,r,s,o)=>e=e.replace(r,r+(i-n),o),!1),e}mapDesc(e,n=!1){return u1(this,e,n,!0)}invert(e){let n=this.sections.slice(),i=[];for(let r=0,s=0;r<n.length;r+=2){let o=n[r],l=n[r+1];if(l>=0){n[r]=l,n[r+1]=o;let c=r>>1;for(;i.length<c;)i.push(tt.empty);i.push(o?e.slice(s,s+o):tt.empty)}s+=o}return new en(n,i)}compose(e){return this.empty?e:e.empty?this:JL(this,e,!0)}map(e,n=!1){return e.empty?this:u1(this,e,n,!0)}iterChanges(e,n=!1){c1(this,e,n)}get desc(){return zr.create(this.sections)}filter(e){let n=[],i=[],r=[],s=new ff(this);e:for(let o=0,l=0;;){let c=o==e.length?1e9:e[o++];for(;l<c||l==c&&s.len==0;){if(s.done)break e;let d=Math.min(s.len,c-l);_n(r,d,-1);let p=s.ins==-1?-1:s.off==0?s.ins:0;_n(n,d,p),p>0&&Ro(i,n,s.text),s.forward(d),l+=d}let h=e[o++];for(;l<h;){if(s.done)break e;let d=Math.min(s.len,h-l);_n(n,d,-1),_n(r,d,s.ins==-1?-1:s.off==0?s.ins:0),s.forward(d),l+=d}}return{changes:new en(n,i),filtered:zr.create(r)}}toJSON(){let e=[];for(let n=0;n<this.sections.length;n+=2){let i=this.sections[n],r=this.sections[n+1];r<0?e.push(i):r==0?e.push([i]):e.push([i].concat(this.inserted[n>>1].toJSON()))}return e}static of(e,n,i){let r=[],s=[],o=0,l=null;function c(d=!1){if(!d&&!r.length)return;o<n&&_n(r,n-o,-1);let p=new en(r,s);l=l?l.compose(p.map(l)):p,r=[],s=[],o=0}function h(d){if(Array.isArray(d))for(let p of d)h(p);else if(d instanceof en){if(d.length!=n)throw new RangeError(`Mismatched change set length (got ${d.length}, expected ${n})`);c(),l=l?l.compose(d.map(l)):d}else{let{from:p,to:g=p,insert:O}=d;if(p>g||p<0||g>n)throw new RangeError(`Invalid change range ${p} to ${g} (in doc of length ${n})`);let x=O?typeof O=="string"?tt.of(O.split(i||l1)):O:tt.empty,S=x.length;if(p==g&&S==0)return;p<o&&c(),p>o&&_n(r,p-o,-1),_n(r,g-p,S),Ro(s,r,x),o=g}}return h(e),c(!l),l}static empty(e){return new en(e?[e,-1]:[],[])}static fromJSON(e){if(!Array.isArray(e))throw new RangeError("Invalid JSON representation of ChangeSet");let n=[],i=[];for(let r=0;r<e.length;r++){let s=e[r];if(typeof s=="number")n.push(s,-1);else{if(!Array.isArray(s)||typeof s[0]!="number"||s.some((o,l)=>l&&typeof o!="string"))throw new RangeError("Invalid JSON representation of ChangeSet");if(s.length==1)n.push(s[0],0);else{for(;i.length<r;)i.push(tt.empty);i[r]=tt.of(s.slice(1)),n.push(s[0],i[r].length)}}}return new en(n,i)}static createSet(e,n){return new en(e,n)}}function _n(t,e,n,i=!1){if(e==0&&n<=0)return;let r=t.length-2;r>=0&&n<=0&&n==t[r+1]?t[r]+=e:r>=0&&e==0&&t[r]==0?t[r+1]+=n:i?(t[r]+=e,t[r+1]+=n):t.push(e,n)}function Ro(t,e,n){if(n.length==0)return;let i=e.length-2>>1;if(i<t.length)t[t.length-1]=t[t.length-1].append(n);else{for(;t.length<i;)t.push(tt.empty);t.push(n)}}function c1(t,e,n){let i=t.inserted;for(let r=0,s=0,o=0;o<t.sections.length;){let l=t.sections[o++],c=t.sections[o++];if(c<0)r+=l,s+=l;else{let h=r,d=s,p=tt.empty;for(;h+=l,d+=c,c&&i&&(p=p.append(i[o-2>>1])),!(n||o==t.sections.length||t.sections[o+1]<0);)l=t.sections[o++],c=t.sections[o++];e(r,h,s,d,p),r=h,s=d}}}function u1(t,e,n,i=!1){let r=[],s=i?[]:null,o=new ff(t),l=new ff(e);for(let c=-1;;){if(o.done&&l.len||l.done&&o.len)throw new Error("Mismatched change set lengths");if(o.ins==-1&&l.ins==-1){let h=Math.min(o.len,l.len);_n(r,h,-1),o.forward(h),l.forward(h)}else if(l.ins>=0&&(o.ins<0||c==o.i||o.off==0&&(l.len<o.len||l.len==o.len&&!n))){let h=l.len;for(_n(r,l.ins,-1);h;){let d=Math.min(o.len,h);o.ins>=0&&c<o.i&&o.len<=d&&(_n(r,0,o.ins),s&&Ro(s,r,o.text),c=o.i),o.forward(d),h-=d}l.next()}else if(o.ins>=0){let h=0,d=o.len;for(;d;)if(l.ins==-1){let p=Math.min(d,l.len);h+=p,d-=p,l.forward(p)}else if(l.ins==0&&l.len<d)d-=l.len,l.next();else break;_n(r,h,c<o.i?o.ins:0),s&&c<o.i&&Ro(s,r,o.text),c=o.i,o.forward(o.len-d)}else{if(o.done&&l.done)return s?en.createSet(r,s):zr.create(r);throw new Error("Mismatched change set lengths")}}}function JL(t,e,n=!1){let i=[],r=n?[]:null,s=new ff(t),o=new ff(e);for(let l=!1;;){if(s.done&&o.done)return r?en.createSet(i,r):zr.create(i);if(s.ins==0)_n(i,s.len,0,l),s.next();else if(o.len==0&&!o.done)_n(i,0,o.ins,l),r&&Ro(r,i,o.text),o.next();else{if(s.done||o.done)throw new Error("Mismatched change set lengths");{let c=Math.min(s.len2,o.len),h=i.length;if(s.ins==-1){let d=o.ins==-1?-1:o.off?0:o.ins;_n(i,c,d,l),r&&d&&Ro(r,i,o.text)}else o.ins==-1?(_n(i,s.off?0:s.len,c,l),r&&Ro(r,i,s.textBit(c))):(_n(i,s.off?0:s.len,o.off?0:o.ins,l),r&&!o.off&&Ro(r,i,o.text));l=(s.ins>c||o.ins>=0&&o.len>c)&&(l||i.length>h),s.forward2(c),o.forward(c)}}}}class ff{constructor(e){this.set=e,this.i=0,this.next()}next(){let{sections:e}=this.set;this.i<e.length?(this.len=e[this.i++],this.ins=e[this.i++]):(this.len=0,this.ins=-2),this.off=0}get done(){return this.ins==-2}get len2(){return this.ins<0?this.len:this.ins}get text(){let{inserted:e}=this.set,n=this.i-2>>1;return n>=e.length?tt.empty:e[n]}textBit(e){let{inserted:n}=this.set,i=this.i-2>>1;return i>=n.length&&!e?tt.empty:n[i].slice(this.off,e==null?void 0:this.off+e)}forward(e){e==this.len?this.next():(this.len-=e,this.off+=e)}forward2(e){this.ins==-1?this.forward(e):e==this.ins?this.next():(this.ins-=e,this.off+=e)}}class Ca{constructor(e,n,i){this.from=e,this.to=n,this.flags=i}get anchor(){return this.flags&32?this.to:this.from}get head(){return this.flags&32?this.from:this.to}get empty(){return this.from==this.to}get assoc(){return this.flags&8?-1:this.flags&16?1:0}get bidiLevel(){let e=this.flags&7;return e==7?null:e}get goalColumn(){let e=this.flags>>6;return e==16777215?void 0:e}map(e,n=-1){let i,r;return this.empty?i=r=e.mapPos(this.from,n):(i=e.mapPos(this.from,1),r=e.mapPos(this.to,-1)),i==this.from&&r==this.to?this:new Ca(i,r,this.flags)}extend(e,n=e){if(e<=this.anchor&&n>=this.anchor)return ae.range(e,n);let i=Math.abs(e-this.anchor)>Math.abs(n-this.anchor)?e:n;return ae.range(this.anchor,i)}eq(e,n=!1){return this.anchor==e.anchor&&this.head==e.head&&(!n||!this.empty||this.assoc==e.assoc)}toJSON(){return{anchor:this.anchor,head:this.head}}static fromJSON(e){if(!e||typeof e.anchor!="number"||typeof e.head!="number")throw new RangeError("Invalid JSON representation for SelectionRange");return ae.range(e.anchor,e.head)}static create(e,n,i){return new Ca(e,n,i)}}class ae{constructor(e,n){this.ranges=e,this.mainIndex=n}map(e,n=-1){return e.empty?this:ae.create(this.ranges.map(i=>i.map(e,n)),this.mainIndex)}eq(e,n=!1){if(this.ranges.length!=e.ranges.length||this.mainIndex!=e.mainIndex)return!1;for(let i=0;i<this.ranges.length;i++)if(!this.ranges[i].eq(e.ranges[i],n))return!1;return!0}get main(){return this.ranges[this.mainIndex]}asSingle(){return this.ranges.length==1?this:new ae([this.main],0)}addRange(e,n=!0){return ae.create([e].concat(this.ranges),n?0:this.mainIndex+1)}replaceRange(e,n=this.mainIndex){let i=this.ranges.slice();return i[n]=e,ae.create(i,this.mainIndex)}toJSON(){return{ranges:this.ranges.map(e=>e.toJSON()),main:this.mainIndex}}static fromJSON(e){if(!e||!Array.isArray(e.ranges)||typeof e.main!="number"||e.main>=e.ranges.length)throw new RangeError("Invalid JSON representation for EditorSelection");return new ae(e.ranges.map(n=>Ca.fromJSON(n)),e.main)}static single(e,n=e){return new ae([ae.range(e,n)],0)}static create(e,n=0){if(e.length==0)throw new RangeError("A selection needs at least one range");for(let i=0,r=0;r<e.length;r++){let s=e[r];if(s.empty?s.from<=i:s.from<i)return ae.normalized(e.slice(),n);i=s.to}return new ae(e,n)}static cursor(e,n=0,i,r){return Ca.create(e,e,(n==0?0:n<0?8:16)|(i==null?7:Math.min(6,i))|(r??16777215)<<6)}static range(e,n,i,r){let s=(i??16777215)<<6|(r==null?7:Math.min(6,r));return n<e?Ca.create(n,e,48|s):Ca.create(e,n,(n>e?8:0)|s)}static normalized(e,n=0){let i=e[n];e.sort((r,s)=>r.from-s.from),n=e.indexOf(i);for(let r=1;r<e.length;r++){let s=e[r],o=e[r-1];if(s.empty?s.from<=o.to:s.from<o.to){let l=o.from,c=Math.max(s.to,o.to);r<=n&&n--,e.splice(--r,2,s.anchor>s.head?ae.range(c,l):ae.range(l,c))}}return new ae(e,n)}}function eM(t,e){for(let n of t.ranges)if(n.to>e)throw new RangeError("Selection points outside of document")}let mS=0;class we{constructor(e,n,i,r,s){this.combine=e,this.compareInput=n,this.compare=i,this.isStatic=r,this.id=mS++,this.default=e([]),this.extensions=typeof s=="function"?s(this):s}get reader(){return this}static define(e={}){return new we(e.combine||(n=>n),e.compareInput||((n,i)=>n===i),e.compare||(e.combine?(n,i)=>n===i:gS),!!e.static,e.enables)}of(e){return new xm([],this,0,e)}compute(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new xm(e,this,1,n)}computeN(e,n){if(this.isStatic)throw new Error("Can't compute a static facet");return new xm(e,this,2,n)}from(e,n){return n||(n=i=>i),this.compute([e],i=>n(i.field(e)))}}function gS(t,e){return t==e||t.length==e.length&&t.every((n,i)=>n===e[i])}class xm{constructor(e,n,i,r){this.dependencies=e,this.facet=n,this.type=i,this.value=r,this.id=mS++}dynamicSlot(e){var n;let i=this.value,r=this.facet.compareInput,s=this.id,o=e[s]>>1,l=this.type==2,c=!1,h=!1,d=[];for(let p of this.dependencies)p=="doc"?c=!0:p=="selection"?h=!0:(((n=e[p.id])!==null&&n!==void 0?n:1)&1)==0&&d.push(e[p.id]);return{create(p){return p.values[o]=i(p),1},update(p,g){if(c&&g.docChanged||h&&(g.docChanged||g.selection)||h1(p,d)){let O=i(p);if(l?!NC(O,p.values[o],r):!r(O,p.values[o]))return p.values[o]=O,1}return 0},reconfigure:(p,g)=>{let O,x=g.config.address[s];if(x!=null){let S=lg(g,x);if(this.dependencies.every(_=>_ instanceof we?g.facet(_)===p.facet(_):_ instanceof cn?g.field(_,!1)==p.field(_,!1):!0)||(l?NC(O=i(p),S,r):r(O=i(p),S)))return p.values[o]=S,0}else O=i(p);return p.values[o]=O,1}}}}function NC(t,e,n){if(t.length!=e.length)return!1;for(let i=0;i<t.length;i++)if(!n(t[i],e[i]))return!1;return!0}function h1(t,e){let n=!1;for(let i of e)Vh(t,i)&1&&(n=!0);return n}function HH(t,e,n){let i=n.map(c=>t[c.id]),r=n.map(c=>c.type),s=i.filter(c=>!(c&1)),o=t[e.id]>>1;function l(c){let h=[];for(let d=0;d<i.length;d++){let p=lg(c,i[d]);if(r[d]==2)for(let g of p)h.push(g);else h.push(p)}return e.combine(h)}return{create(c){for(let h of i)Vh(c,h);return c.values[o]=l(c),1},update(c,h){if(!h1(c,s))return 0;let d=l(c);return e.compare(d,c.values[o])?0:(c.values[o]=d,1)},reconfigure(c,h){let d=h1(c,i),p=h.config.facets[e.id],g=h.facet(e);if(p&&!d&&gS(n,p))return c.values[o]=g,0;let O=l(c);return e.compare(O,g)?(c.values[o]=g,0):(c.values[o]=O,1)}}}const Np=we.define({static:!0});class cn{constructor(e,n,i,r,s){this.id=e,this.createF=n,this.updateF=i,this.compareF=r,this.spec=s,this.provides=void 0}static define(e){let n=new cn(mS++,e.create,e.update,e.compare||((i,r)=>i===r),e);return e.provide&&(n.provides=e.provide(n)),n}create(e){let n=e.facet(Np).find(i=>i.field==this);return((n==null?void 0:n.create)||this.createF)(e)}slot(e){let n=e[this.id]>>1;return{create:i=>(i.values[n]=this.create(i),1),update:(i,r)=>{let s=i.values[n],o=this.updateF(s,r);return this.compareF(s,o)?0:(i.values[n]=o,1)},reconfigure:(i,r)=>{let s=i.facet(Np),o=r.facet(Np),l;return(l=s.find(c=>c.field==this))&&l!=o.find(c=>c.field==this)?(i.values[n]=l.create(i),1):r.config.address[this.id]!=null?(i.values[n]=r.field(this),0):(i.values[n]=this.create(i),1)}}}init(e){return[this,Np.of({field:this,create:e})]}get extension(){return this}}const _a={lowest:4,low:3,default:2,high:1,highest:0};function mh(t){return e=>new tM(e,t)}const Is={highest:mh(_a.highest),high:mh(_a.high),default:mh(_a.default),low:mh(_a.low),lowest:mh(_a.lowest)};class tM{constructor(e,n){this.inner=e,this.prec=n}}class rO{of(e){return new f1(this,e)}reconfigure(e){return rO.reconfigure.of({compartment:this,extension:e})}get(e){return e.config.compartments.get(this)}}class f1{constructor(e,n){this.compartment=e,this.inner=n}}class ag{constructor(e,n,i,r,s,o){for(this.base=e,this.compartments=n,this.dynamicSlots=i,this.address=r,this.staticValues=s,this.facets=o,this.statusTemplate=[];this.statusTemplate.length<i.length;)this.statusTemplate.push(0)}staticFacet(e){let n=this.address[e.id];return n==null?e.default:this.staticValues[n>>1]}static resolve(e,n,i){let r=[],s=Object.create(null),o=new Map;for(let g of FH(e,n,o))g instanceof cn?r.push(g):(s[g.facet.id]||(s[g.facet.id]=[])).push(g);let l=Object.create(null),c=[],h=[];for(let g of r)l[g.id]=h.length<<1,h.push(O=>g.slot(O));let d=i==null?void 0:i.config.facets;for(let g in s){let O=s[g],x=O[0].facet,S=d&&d[g]||[];if(O.every(_=>_.type==0))if(l[x.id]=c.length<<1|1,gS(S,O))c.push(i.facet(x));else{let _=x.combine(O.map(k=>k.value));c.push(i&&x.compare(_,i.facet(x))?i.facet(x):_)}else{for(let _ of O)_.type==0?(l[_.id]=c.length<<1|1,c.push(_.value)):(l[_.id]=h.length<<1,h.push(k=>_.dynamicSlot(k)));l[x.id]=h.length<<1,h.push(_=>HH(_,x,O))}}let p=h.map(g=>g(l));return new ag(e,o,p,l,c,s)}}function FH(t,e,n){let i=[[],[],[],[],[]],r=new Map;function s(o,l){let c=r.get(o);if(c!=null){if(c<=l)return;let h=i[c].indexOf(o);h>-1&&i[c].splice(h,1),o instanceof f1&&n.delete(o.compartment)}if(r.set(o,l),Array.isArray(o))for(let h of o)s(h,l);else if(o instanceof f1){if(n.has(o.compartment))throw new RangeError("Duplicate use of compartment in extensions");let h=e.get(o.compartment)||o.inner;n.set(o.compartment,h),s(h,l)}else if(o instanceof tM)s(o.inner,o.prec);else if(o instanceof cn)i[l].push(o),o.provides&&s(o.provides,l);else if(o instanceof xm)i[l].push(o),o.facet.extensions&&s(o.facet.extensions,_a.default);else{let h=o.extension;if(!h)throw new Error(`Unrecognized extension value in extension set (${o}). This sometimes happens because multiple instances of @codemirror/state are loaded, breaking instanceof checks.`);s(h,l)}}return s(t,_a.default),i.reduce((o,l)=>o.concat(l))}function Vh(t,e){if(e&1)return 2;let n=e>>1,i=t.status[n];if(i==4)throw new Error("Cyclic dependency between fields and/or facets");if(i&2)return i;t.status[n]=4;let r=t.computeSlot(t,t.config.dynamicSlots[n]);return t.status[n]=2|r}function lg(t,e){return e&1?t.config.staticValues[e>>1]:t.values[e>>1]}const nM=we.define(),d1=we.define({combine:t=>t.some(e=>e),static:!0}),iM=we.define({combine:t=>t.length?t[0]:void 0,static:!0}),rM=we.define(),sM=we.define(),oM=we.define(),aM=we.define({combine:t=>t.length?t[0]:!1});class qr{constructor(e,n){this.type=e,this.value=n}static define(){return new KH}}class KH{of(e){return new qr(this,e)}}class JH{constructor(e){this.map=e}of(e){return new De(this,e)}}class De{constructor(e,n){this.type=e,this.value=n}map(e){let n=this.type.map(this.value,e);return n===void 0?void 0:n==this.value?this:new De(this.type,n)}is(e){return this.type==e}static define(e={}){return new JH(e.map||(n=>n))}static mapEffects(e,n){if(!e.length)return e;let i=[];for(let r of e){let s=r.map(n);s&&i.push(s)}return i}}De.reconfigure=De.define();De.appendConfig=De.define();class Wt{constructor(e,n,i,r,s,o){this.startState=e,this.changes=n,this.selection=i,this.effects=r,this.annotations=s,this.scrollIntoView=o,this._doc=null,this._state=null,i&&eM(i,n.newLength),s.some(l=>l.type==Wt.time)||(this.annotations=s.concat(Wt.time.of(Date.now())))}static create(e,n,i,r,s,o){return new Wt(e,n,i,r,s,o)}get newDoc(){return this._doc||(this._doc=this.changes.apply(this.startState.doc))}get newSelection(){return this.selection||this.startState.selection.map(this.changes)}get state(){return this._state||this.startState.applyTransaction(this),this._state}annotation(e){for(let n of this.annotations)if(n.type==e)return n.value}get docChanged(){return!this.changes.empty}get reconfigured(){return this.startState.config!=this.state.config}isUserEvent(e){let n=this.annotation(Wt.userEvent);return!!(n&&(n==e||n.length>e.length&&n.slice(0,e.length)==e&&n[e.length]=="."))}}Wt.time=qr.define();Wt.userEvent=qr.define();Wt.addToHistory=qr.define();Wt.remote=qr.define();function eF(t,e){let n=[];for(let i=0,r=0;;){let s,o;if(i<t.length&&(r==e.length||e[r]>=t[i]))s=t[i++],o=t[i++];else if(r<e.length)s=e[r++],o=e[r++];else return n;!n.length||n[n.length-1]<s?n.push(s,o):n[n.length-1]<o&&(n[n.length-1]=o)}}function lM(t,e,n){var i;let r,s,o;return n?(r=e.changes,s=en.empty(e.changes.length),o=t.changes.compose(e.changes)):(r=e.changes.map(t.changes),s=t.changes.mapDesc(e.changes,!0),o=t.changes.compose(r)),{changes:o,selection:e.selection?e.selection.map(s):(i=t.selection)===null||i===void 0?void 0:i.map(r),effects:De.mapEffects(t.effects,r).concat(De.mapEffects(e.effects,s)),annotations:t.annotations.length?t.annotations.concat(e.annotations):e.annotations,scrollIntoView:t.scrollIntoView||e.scrollIntoView}}function p1(t,e,n){let i=e.selection,r=bc(e.annotations);return e.userEvent&&(r=r.concat(Wt.userEvent.of(e.userEvent))),{changes:e.changes instanceof en?e.changes:en.of(e.changes||[],n,t.facet(iM)),selection:i&&(i instanceof ae?i:ae.single(i.anchor,i.head)),effects:bc(e.effects),annotations:r,scrollIntoView:!!e.scrollIntoView}}function cM(t,e,n){let i=p1(t,e.length?e[0]:{},t.doc.length);e.length&&e[0].filter===!1&&(n=!1);for(let s=1;s<e.length;s++){e[s].filter===!1&&(n=!1);let o=!!e[s].sequential;i=lM(i,p1(t,e[s],o?i.changes.newLength:t.doc.length),o)}let r=Wt.create(t,i.changes,i.selection,i.effects,i.annotations,i.scrollIntoView);return nF(n?tF(r):r)}function tF(t){let e=t.startState,n=!0;for(let r of e.facet(rM)){let s=r(t);if(s===!1){n=!1;break}Array.isArray(s)&&(n=n===!0?s:eF(n,s))}if(n!==!0){let r,s;if(n===!1)s=t.changes.invertedDesc,r=en.empty(e.doc.length);else{let o=t.changes.filter(n);r=o.changes,s=o.filtered.mapDesc(o.changes).invertedDesc}t=Wt.create(e,r,t.selection&&t.selection.map(s),De.mapEffects(t.effects,s),t.annotations,t.scrollIntoView)}let i=e.facet(sM);for(let r=i.length-1;r>=0;r--){let s=i[r](t);s instanceof Wt?t=s:Array.isArray(s)&&s.length==1&&s[0]instanceof Wt?t=s[0]:t=cM(e,bc(s),!1)}return t}function nF(t){let e=t.startState,n=e.facet(oM),i=t;for(let r=n.length-1;r>=0;r--){let s=n[r](t);s&&Object.keys(s).length&&(i=lM(i,p1(e,s,t.changes.newLength),!0))}return i==t?t:Wt.create(e,t.changes,t.selection,i.effects,i.annotations,i.scrollIntoView)}const iF=[];function bc(t){return t==null?iF:Array.isArray(t)?t:[t]}var Rt=(function(t){return t[t.Word=0]="Word",t[t.Space=1]="Space",t[t.Other=2]="Other",t})(Rt||(Rt={}));const rF=/[\u00df\u0587\u0590-\u05f4\u0600-\u06ff\u3040-\u309f\u30a0-\u30ff\u3400-\u4db5\u4e00-\u9fcc\uac00-\ud7af]/;let m1;try{m1=new RegExp("[\\p{Alphabetic}\\p{Number}_]","u")}catch{}function sF(t){if(m1)return m1.test(t);for(let e=0;e<t.length;e++){let n=t[e];if(/\w/.test(n)||n>"€"&&(n.toUpperCase()!=n.toLowerCase()||rF.test(n)))return!0}return!1}function oF(t){return e=>{if(!/\S/.test(e))return Rt.Space;if(sF(e))return Rt.Word;for(let n=0;n<t.length;n++)if(e.indexOf(t[n])>-1)return Rt.Word;return Rt.Other}}class Ue{constructor(e,n,i,r,s,o){this.config=e,this.doc=n,this.selection=i,this.values=r,this.status=e.statusTemplate.slice(),this.computeSlot=s,o&&(o._state=this);for(let l=0;l<this.config.dynamicSlots.length;l++)Vh(this,l<<1);this.computeSlot=null}field(e,n=!0){let i=this.config.address[e.id];if(i==null){if(n)throw new RangeError("Field is not present in this state");return}return Vh(this,i),lg(this,i)}update(...e){return cM(this,e,!0)}applyTransaction(e){let n=this.config,{base:i,compartments:r}=n;for(let l of e.effects)l.is(rO.reconfigure)?(n&&(r=new Map,n.compartments.forEach((c,h)=>r.set(h,c)),n=null),r.set(l.value.compartment,l.value.extension)):l.is(De.reconfigure)?(n=null,i=l.value):l.is(De.appendConfig)&&(n=null,i=bc(i).concat(l.value));let s;n?s=e.startState.values.slice():(n=ag.resolve(i,r,this),s=new Ue(n,this.doc,this.selection,n.dynamicSlots.map(()=>null),(c,h)=>h.reconfigure(c,this),null).values);let o=e.startState.facet(d1)?e.newSelection:e.newSelection.asSingle();new Ue(n,e.newDoc,o,s,(l,c)=>c.update(l,e),e)}replaceSelection(e){return typeof e=="string"&&(e=this.toText(e)),this.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:e},range:ae.cursor(n.from+e.length)}))}changeByRange(e){let n=this.selection,i=e(n.ranges[0]),r=this.changes(i.changes),s=[i.range],o=bc(i.effects);for(let l=1;l<n.ranges.length;l++){let c=e(n.ranges[l]),h=this.changes(c.changes),d=h.map(r);for(let g=0;g<l;g++)s[g]=s[g].map(d);let p=r.mapDesc(h,!0);s.push(c.range.map(p)),r=r.compose(d),o=De.mapEffects(o,d).concat(De.mapEffects(bc(c.effects),p))}return{changes:r,selection:ae.create(s,n.mainIndex),effects:o}}changes(e=[]){return e instanceof en?e:en.of(e,this.doc.length,this.facet(Ue.lineSeparator))}toText(e){return tt.of(e.split(this.facet(Ue.lineSeparator)||l1))}sliceDoc(e=0,n=this.doc.length){return this.doc.sliceString(e,n,this.lineBreak)}facet(e){let n=this.config.address[e.id];return n==null?e.default:(Vh(this,n),lg(this,n))}toJSON(e){let n={doc:this.sliceDoc(),selection:this.selection.toJSON()};if(e)for(let i in e){let r=e[i];r instanceof cn&&this.config.address[r.id]!=null&&(n[i]=r.spec.toJSON(this.field(e[i]),this))}return n}static fromJSON(e,n={},i){if(!e||typeof e.doc!="string")throw new RangeError("Invalid JSON representation for EditorState");let r=[];if(i){for(let s in i)if(Object.prototype.hasOwnProperty.call(e,s)){let o=i[s],l=e[s];r.push(o.init(c=>o.spec.fromJSON(l,c)))}}return Ue.create({doc:e.doc,selection:ae.fromJSON(e.selection),extensions:n.extensions?r.concat([n.extensions]):r})}static create(e={}){let n=ag.resolve(e.extensions||[],new Map),i=e.doc instanceof tt?e.doc:tt.of((e.doc||"").split(n.staticFacet(Ue.lineSeparator)||l1)),r=e.selection?e.selection instanceof ae?e.selection:ae.single(e.selection.anchor,e.selection.head):ae.single(0);return eM(r,i.length),n.staticFacet(d1)||(r=r.asSingle()),new Ue(n,i,r,n.dynamicSlots.map(()=>null),(s,o)=>o.create(s),null)}get tabSize(){return this.facet(Ue.tabSize)}get lineBreak(){return this.facet(Ue.lineSeparator)||`
395
+ `}get readOnly(){return this.facet(aM)}phrase(e,...n){for(let i of this.facet(Ue.phrases))if(Object.prototype.hasOwnProperty.call(i,e)){e=i[e];break}return n.length&&(e=e.replace(/\$(\$|\d*)/g,(i,r)=>{if(r=="$")return"$";let s=+(r||1);return!s||s>n.length?i:n[s-1]})),e}languageDataAt(e,n,i=-1){let r=[];for(let s of this.facet(nM))for(let o of s(this,n,i))Object.prototype.hasOwnProperty.call(o,e)&&r.push(o[e]);return r}charCategorizer(e){return oF(this.languageDataAt("wordChars",e).join(""))}wordAt(e){let{text:n,from:i,length:r}=this.doc.lineAt(e),s=this.charCategorizer(e),o=e-i,l=e-i;for(;o>0;){let c=yn(n,o,!1);if(s(n.slice(c,o))!=Rt.Word)break;o=c}for(;l<r;){let c=yn(n,l);if(s(n.slice(l,c))!=Rt.Word)break;l=c}return o==l?null:ae.range(o+i,l+i)}}Ue.allowMultipleSelections=d1;Ue.tabSize=we.define({combine:t=>t.length?t[0]:4});Ue.lineSeparator=iM;Ue.readOnly=aM;Ue.phrases=we.define({compare(t,e){let n=Object.keys(t),i=Object.keys(e);return n.length==i.length&&n.every(r=>t[r]==e[r])}});Ue.languageData=nM;Ue.changeFilter=rM;Ue.transactionFilter=sM;Ue.transactionExtender=oM;rO.reconfigure=De.define();function Ur(t,e,n={}){let i={};for(let r of t)for(let s of Object.keys(r)){let o=r[s],l=i[s];if(l===void 0)i[s]=o;else if(!(l===o||o===void 0))if(Object.hasOwnProperty.call(n,s))i[s]=n[s](l,o);else throw new Error("Config merge conflict for field "+s)}for(let r in e)i[r]===void 0&&(i[r]=e[r]);return i}class Fa{eq(e){return this==e}range(e,n=e){return df.create(e,n,this)}}Fa.prototype.startSide=Fa.prototype.endSide=0;Fa.prototype.point=!1;Fa.prototype.mapMode=On.TrackDel;class df{constructor(e,n,i){this.from=e,this.to=n,this.value=i}static create(e,n,i){return new df(e,n,i)}}function g1(t,e){return t.from-e.from||t.value.startSide-e.value.startSide}class OS{constructor(e,n,i,r){this.from=e,this.to=n,this.value=i,this.maxPoint=r}get length(){return this.to[this.to.length-1]}findIndex(e,n,i,r=0){let s=i?this.to:this.from;for(let o=r,l=s.length;;){if(o==l)return o;let c=o+l>>1,h=s[c]-e||(i?this.value[c].endSide:this.value[c].startSide)-n;if(c==o)return h>=0?o:l;h>=0?l=c:o=c+1}}between(e,n,i,r){for(let s=this.findIndex(n,-1e9,!0),o=this.findIndex(i,1e9,!1,s);s<o;s++)if(r(this.from[s]+e,this.to[s]+e,this.value[s])===!1)return!1}map(e,n){let i=[],r=[],s=[],o=-1,l=-1;for(let c=0;c<this.value.length;c++){let h=this.value[c],d=this.from[c]+e,p=this.to[c]+e,g,O;if(d==p){let x=n.mapPos(d,h.startSide,h.mapMode);if(x==null||(g=O=x,h.startSide!=h.endSide&&(O=n.mapPos(d,h.endSide),O<g)))continue}else if(g=n.mapPos(d,h.startSide),O=n.mapPos(p,h.endSide),g>O||g==O&&h.startSide>0&&h.endSide<=0)continue;(O-g||h.endSide-h.startSide)<0||(o<0&&(o=g),h.point&&(l=Math.max(l,O-g)),i.push(h),r.push(g-o),s.push(O-o))}return{mapped:i.length?new OS(r,s,i,l):null,pos:o}}}class rt{constructor(e,n,i,r){this.chunkPos=e,this.chunk=n,this.nextLayer=i,this.maxPoint=r}static create(e,n,i,r){return new rt(e,n,i,r)}get length(){let e=this.chunk.length-1;return e<0?0:Math.max(this.chunkEnd(e),this.nextLayer.length)}get size(){if(this.isEmpty)return 0;let e=this.nextLayer.size;for(let n of this.chunk)e+=n.value.length;return e}chunkEnd(e){return this.chunkPos[e]+this.chunk[e].length}update(e){let{add:n=[],sort:i=!1,filterFrom:r=0,filterTo:s=this.length}=e,o=e.filter;if(n.length==0&&!o)return this;if(i&&(n=n.slice().sort(g1)),this.isEmpty)return n.length?rt.of(n):this;let l=new uM(this,null,-1).goto(0),c=0,h=[],d=new $s;for(;l.value||c<n.length;)if(c<n.length&&(l.from-n[c].from||l.startSide-n[c].value.startSide)>=0){let p=n[c++];d.addInner(p.from,p.to,p.value)||h.push(p)}else l.rangeIndex==1&&l.chunkIndex<this.chunk.length&&(c==n.length||this.chunkEnd(l.chunkIndex)<n[c].from)&&(!o||r>this.chunkEnd(l.chunkIndex)||s<this.chunkPos[l.chunkIndex])&&d.addChunk(this.chunkPos[l.chunkIndex],this.chunk[l.chunkIndex])?l.nextChunk():((!o||r>l.to||s<l.from||o(l.from,l.to,l.value))&&(d.addInner(l.from,l.to,l.value)||h.push(df.create(l.from,l.to,l.value))),l.next());return d.finishInner(this.nextLayer.isEmpty&&!h.length?rt.empty:this.nextLayer.update({add:h,filter:o,filterFrom:r,filterTo:s}))}map(e){if(e.empty||this.isEmpty)return this;let n=[],i=[],r=-1;for(let o=0;o<this.chunk.length;o++){let l=this.chunkPos[o],c=this.chunk[o],h=e.touchesRange(l,l+c.length);if(h===!1)r=Math.max(r,c.maxPoint),n.push(c),i.push(e.mapPos(l));else if(h===!0){let{mapped:d,pos:p}=c.map(l,e);d&&(r=Math.max(r,d.maxPoint),n.push(d),i.push(p))}}let s=this.nextLayer.map(e);return n.length==0?s:new rt(i,n,s||rt.empty,r)}between(e,n,i){if(!this.isEmpty){for(let r=0;r<this.chunk.length;r++){let s=this.chunkPos[r],o=this.chunk[r];if(n>=s&&e<=s+o.length&&o.between(s,e-s,n-s,i)===!1)return}this.nextLayer.between(e,n,i)}}iter(e=0){return pf.from([this]).goto(e)}get isEmpty(){return this.nextLayer==this}static iter(e,n=0){return pf.from(e).goto(n)}static compare(e,n,i,r,s=-1){let o=e.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),l=n.filter(p=>p.maxPoint>0||!p.isEmpty&&p.maxPoint>=s),c=zC(o,l,i),h=new gh(o,c,s),d=new gh(l,c,s);i.iterGaps((p,g,O)=>IC(h,p,d,g,O,r)),i.empty&&i.length==0&&IC(h,0,d,0,0,r)}static eq(e,n,i=0,r){r==null&&(r=999999999);let s=e.filter(d=>!d.isEmpty&&n.indexOf(d)<0),o=n.filter(d=>!d.isEmpty&&e.indexOf(d)<0);if(s.length!=o.length)return!1;if(!s.length)return!0;let l=zC(s,o),c=new gh(s,l,0).goto(i),h=new gh(o,l,0).goto(i);for(;;){if(c.to!=h.to||!O1(c.active,h.active)||c.point&&(!h.point||!c.point.eq(h.point)))return!1;if(c.to>r)return!0;c.next(),h.next()}}static spans(e,n,i,r,s=-1){let o=new gh(e,null,s).goto(n),l=n,c=o.openStart;for(;;){let h=Math.min(o.to,i);if(o.point){let d=o.activeForPoint(o.to),p=o.pointFrom<n?d.length+1:o.point.startSide<0?d.length:Math.min(d.length,c);r.point(l,h,o.point,d,p,o.pointRank),c=Math.min(o.openEnd(h),d.length)}else h>l&&(r.span(l,h,o.active,c),c=o.openEnd(h));if(o.to>i)return c+(o.point&&o.to>i?1:0);l=o.to,o.next()}}static of(e,n=!1){let i=new $s;for(let r of e instanceof df?[e]:n?aF(e):e)i.add(r.from,r.to,r.value);return i.finish()}static join(e){if(!e.length)return rt.empty;let n=e[e.length-1];for(let i=e.length-2;i>=0;i--)for(let r=e[i];r!=rt.empty;r=r.nextLayer)n=new rt(r.chunkPos,r.chunk,n,Math.max(r.maxPoint,n.maxPoint));return n}}rt.empty=new rt([],[],null,-1);function aF(t){if(t.length>1)for(let e=t[0],n=1;n<t.length;n++){let i=t[n];if(g1(e,i)>0)return t.slice().sort(g1);e=i}return t}rt.empty.nextLayer=rt.empty;class $s{finishChunk(e){this.chunks.push(new OS(this.from,this.to,this.value,this.maxPoint)),this.chunkPos.push(this.chunkStart),this.chunkStart=-1,this.setMaxPoint=Math.max(this.setMaxPoint,this.maxPoint),this.maxPoint=-1,e&&(this.from=[],this.to=[],this.value=[])}constructor(){this.chunks=[],this.chunkPos=[],this.chunkStart=-1,this.last=null,this.lastFrom=-1e9,this.lastTo=-1e9,this.from=[],this.to=[],this.value=[],this.maxPoint=-1,this.setMaxPoint=-1,this.nextLayer=null}add(e,n,i){this.addInner(e,n,i)||(this.nextLayer||(this.nextLayer=new $s)).add(e,n,i)}addInner(e,n,i){let r=e-this.lastTo||i.startSide-this.last.endSide;if(r<=0&&(e-this.lastFrom||i.startSide-this.last.startSide)<0)throw new Error("Ranges must be added sorted by `from` position and `startSide`");return r<0?!1:(this.from.length==250&&this.finishChunk(!0),this.chunkStart<0&&(this.chunkStart=e),this.from.push(e-this.chunkStart),this.to.push(n-this.chunkStart),this.last=i,this.lastFrom=e,this.lastTo=n,this.value.push(i),i.point&&(this.maxPoint=Math.max(this.maxPoint,n-e)),!0)}addChunk(e,n){if((e-this.lastTo||n.value[0].startSide-this.last.endSide)<0)return!1;this.from.length&&this.finishChunk(!0),this.setMaxPoint=Math.max(this.setMaxPoint,n.maxPoint),this.chunks.push(n),this.chunkPos.push(e);let i=n.value.length-1;return this.last=n.value[i],this.lastFrom=n.from[i]+e,this.lastTo=n.to[i]+e,!0}finish(){return this.finishInner(rt.empty)}finishInner(e){if(this.from.length&&this.finishChunk(!1),this.chunks.length==0)return e;let n=rt.create(this.chunkPos,this.chunks,this.nextLayer?this.nextLayer.finishInner(e):e,this.setMaxPoint);return this.from=null,n}}function zC(t,e,n){let i=new Map;for(let s of t)for(let o=0;o<s.chunk.length;o++)s.chunk[o].maxPoint<=0&&i.set(s.chunk[o],s.chunkPos[o]);let r=new Set;for(let s of e)for(let o=0;o<s.chunk.length;o++){let l=i.get(s.chunk[o]);l!=null&&(n?n.mapPos(l):l)==s.chunkPos[o]&&!(n!=null&&n.touchesRange(l,l+s.chunk[o].length))&&r.add(s.chunk[o])}return r}class uM{constructor(e,n,i,r=0){this.layer=e,this.skip=n,this.minPoint=i,this.rank=r}get startSide(){return this.value?this.value.startSide:0}get endSide(){return this.value?this.value.endSide:0}goto(e,n=-1e9){return this.chunkIndex=this.rangeIndex=0,this.gotoInner(e,n,!1),this}gotoInner(e,n,i){for(;this.chunkIndex<this.layer.chunk.length;){let r=this.layer.chunk[this.chunkIndex];if(!(this.skip&&this.skip.has(r)||this.layer.chunkEnd(this.chunkIndex)<e||r.maxPoint<this.minPoint))break;this.chunkIndex++,i=!1}if(this.chunkIndex<this.layer.chunk.length){let r=this.layer.chunk[this.chunkIndex].findIndex(e-this.layer.chunkPos[this.chunkIndex],n,!0);(!i||this.rangeIndex<r)&&this.setRangeIndex(r)}this.next()}forward(e,n){(this.to-e||this.endSide-n)<0&&this.gotoInner(e,n,!0)}next(){for(;;)if(this.chunkIndex==this.layer.chunk.length){this.from=this.to=1e9,this.value=null;break}else{let e=this.layer.chunkPos[this.chunkIndex],n=this.layer.chunk[this.chunkIndex],i=e+n.from[this.rangeIndex];if(this.from=i,this.to=e+n.to[this.rangeIndex],this.value=n.value[this.rangeIndex],this.setRangeIndex(this.rangeIndex+1),this.minPoint<0||this.value.point&&this.to-this.from>=this.minPoint)break}}setRangeIndex(e){if(e==this.layer.chunk[this.chunkIndex].value.length){if(this.chunkIndex++,this.skip)for(;this.chunkIndex<this.layer.chunk.length&&this.skip.has(this.layer.chunk[this.chunkIndex]);)this.chunkIndex++;this.rangeIndex=0}else this.rangeIndex=e}nextChunk(){this.chunkIndex++,this.rangeIndex=0,this.next()}compare(e){return this.from-e.from||this.startSide-e.startSide||this.rank-e.rank||this.to-e.to||this.endSide-e.endSide}}class pf{constructor(e){this.heap=e}static from(e,n=null,i=-1){let r=[];for(let s=0;s<e.length;s++)for(let o=e[s];!o.isEmpty;o=o.nextLayer)o.maxPoint>=i&&r.push(new uM(o,n,i,s));return r.length==1?r[0]:new pf(r)}get startSide(){return this.value?this.value.startSide:0}goto(e,n=-1e9){for(let i of this.heap)i.goto(e,n);for(let i=this.heap.length>>1;i>=0;i--)Tb(this.heap,i);return this.next(),this}forward(e,n){for(let i of this.heap)i.forward(e,n);for(let i=this.heap.length>>1;i>=0;i--)Tb(this.heap,i);(this.to-e||this.value.endSide-n)<0&&this.next()}next(){if(this.heap.length==0)this.from=this.to=1e9,this.value=null,this.rank=-1;else{let e=this.heap[0];this.from=e.from,this.to=e.to,this.value=e.value,this.rank=e.rank,e.value&&e.next(),Tb(this.heap,0)}}}function Tb(t,e){for(let n=t[e];;){let i=(e<<1)+1;if(i>=t.length)break;let r=t[i];if(i+1<t.length&&r.compare(t[i+1])>=0&&(r=t[i+1],i++),n.compare(r)<0)break;t[i]=n,t[e]=r,e=i}}class gh{constructor(e,n,i){this.minPoint=i,this.active=[],this.activeTo=[],this.activeRank=[],this.minActive=-1,this.point=null,this.pointFrom=0,this.pointRank=0,this.to=-1e9,this.endSide=0,this.openStart=-1,this.cursor=pf.from(e,n,i)}goto(e,n=-1e9){return this.cursor.goto(e,n),this.active.length=this.activeTo.length=this.activeRank.length=0,this.minActive=-1,this.to=e,this.endSide=n,this.openStart=-1,this.next(),this}forward(e,n){for(;this.minActive>-1&&(this.activeTo[this.minActive]-e||this.active[this.minActive].endSide-n)<0;)this.removeActive(this.minActive);this.cursor.forward(e,n)}removeActive(e){zp(this.active,e),zp(this.activeTo,e),zp(this.activeRank,e),this.minActive=XC(this.active,this.activeTo)}addActive(e){let n=0,{value:i,to:r,rank:s}=this.cursor;for(;n<this.activeRank.length&&(s-this.activeRank[n]||r-this.activeTo[n])>0;)n++;Ip(this.active,n,i),Ip(this.activeTo,n,r),Ip(this.activeRank,n,s),e&&Ip(e,n,this.cursor.from),this.minActive=XC(this.active,this.activeTo)}next(){let e=this.to,n=this.point;this.point=null;let i=this.openStart<0?[]:null;for(;;){let r=this.minActive;if(r>-1&&(this.activeTo[r]-this.cursor.from||this.active[r].endSide-this.cursor.startSide)<0){if(this.activeTo[r]>e){this.to=this.activeTo[r],this.endSide=this.active[r].endSide;break}this.removeActive(r),i&&zp(i,r)}else if(this.cursor.value)if(this.cursor.from>e){this.to=this.cursor.from,this.endSide=this.cursor.startSide;break}else{let s=this.cursor.value;if(!s.point)this.addActive(i),this.cursor.next();else if(n&&this.cursor.to==this.to&&this.cursor.from<this.cursor.to)this.cursor.next();else{this.point=s,this.pointFrom=this.cursor.from,this.pointRank=this.cursor.rank,this.to=this.cursor.to,this.endSide=s.endSide,this.cursor.next(),this.forward(this.to,this.endSide);break}}else{this.to=this.endSide=1e9;break}}if(i){this.openStart=0;for(let r=i.length-1;r>=0&&i[r]<e;r--)this.openStart++}}activeForPoint(e){if(!this.active.length)return this.active;let n=[];for(let i=this.active.length-1;i>=0&&!(this.activeRank[i]<this.pointRank);i--)(this.activeTo[i]>e||this.activeTo[i]==e&&this.active[i].endSide>=this.point.endSide)&&n.push(this.active[i]);return n.reverse()}openEnd(e){let n=0;for(let i=this.activeTo.length-1;i>=0&&this.activeTo[i]>e;i--)n++;return n}}function IC(t,e,n,i,r,s){t.goto(e),n.goto(i);let o=i+r,l=i,c=i-e;for(;;){let h=t.to+c-n.to,d=h||t.endSide-n.endSide,p=d<0?t.to+c:n.to,g=Math.min(p,o);if(t.point||n.point?t.point&&n.point&&(t.point==n.point||t.point.eq(n.point))&&O1(t.activeForPoint(t.to),n.activeForPoint(n.to))||s.comparePoint(l,g,t.point,n.point):g>l&&!O1(t.active,n.active)&&s.compareRange(l,g,t.active,n.active),p>o)break;(h||t.openEnd!=n.openEnd)&&s.boundChange&&s.boundChange(p),l=p,d<=0&&t.next(),d>=0&&n.next()}}function O1(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!=e[n]&&!t[n].eq(e[n]))return!1;return!0}function zp(t,e){for(let n=e,i=t.length-1;n<i;n++)t[n]=t[n+1];t.pop()}function Ip(t,e,n){for(let i=t.length-1;i>=e;i--)t[i+1]=t[i];t[e]=n}function XC(t,e){let n=-1,i=1e9;for(let r=0;r<e.length;r++)(e[r]-i||t[r].endSide-t[n].endSide)<0&&(n=r,i=e[r]);return n}function hr(t,e,n=t.length){let i=0;for(let r=0;r<n&&r<t.length;)t.charCodeAt(r)==9?(i+=e-i%e,r++):(i++,r=yn(t,r));return i}function y1(t,e,n,i){for(let r=0,s=0;;){if(s>=e)return r;if(r==t.length)break;s+=t.charCodeAt(r)==9?n-s%n:1,r=yn(t,r)}return i===!0?-1:t.length}const b1="ͼ",VC=typeof Symbol>"u"?"__"+b1:Symbol.for(b1),x1=typeof Symbol>"u"?"__styleSet"+Math.floor(Math.random()*1e8):Symbol("styleSet"),BC=typeof globalThis<"u"?globalThis:typeof window<"u"?window:{};class Bo{constructor(e,n){this.rules=[];let{finish:i}=n||{};function r(o){return/^@/.test(o)?[o]:o.split(/,\s*/)}function s(o,l,c,h){let d=[],p=/^@(\w+)\b/.exec(o[0]),g=p&&p[1]=="keyframes";if(p&&l==null)return c.push(o[0]+";");for(let O in l){let x=l[O];if(/&/.test(O))s(O.split(/,\s*/).map(S=>o.map(_=>S.replace(/&/,_))).reduce((S,_)=>S.concat(_)),x,c);else if(x&&typeof x=="object"){if(!p)throw new RangeError("The value of a property ("+O+") should be a primitive value.");s(r(O),x,d,g)}else x!=null&&d.push(O.replace(/_.*/,"").replace(/[A-Z]/g,S=>"-"+S.toLowerCase())+": "+x+";")}(d.length||g)&&c.push((i&&!p&&!h?o.map(i):o).join(", ")+" {"+d.join(" ")+"}")}for(let o in e)s(r(o),e[o],this.rules)}getRules(){return this.rules.join(`
396
+ `)}static newName(){let e=BC[VC]||1;return BC[VC]=e+1,b1+e.toString(36)}static mount(e,n,i){let r=e[x1],s=i&&i.nonce;r?s&&r.setNonce(s):r=new lF(e,s),r.mount(Array.isArray(n)?n:[n],e)}}let ZC=new Map;class lF{constructor(e,n){let i=e.ownerDocument||e,r=i.defaultView;if(!e.head&&e.adoptedStyleSheets&&r.CSSStyleSheet){let s=ZC.get(i);if(s)return e[x1]=s;this.sheet=new r.CSSStyleSheet,ZC.set(i,this)}else this.styleTag=i.createElement("style"),n&&this.styleTag.setAttribute("nonce",n);this.modules=[],e[x1]=this}mount(e,n){let i=this.sheet,r=0,s=0;for(let o=0;o<e.length;o++){let l=e[o],c=this.modules.indexOf(l);if(c<s&&c>-1&&(this.modules.splice(c,1),s--,c=-1),c==-1){if(this.modules.splice(s++,0,l),i)for(let h=0;h<l.rules.length;h++)i.insertRule(l.rules[h],r++)}else{for(;s<c;)r+=this.modules[s++].rules.length;r+=l.rules.length,s++}}if(i)n.adoptedStyleSheets.indexOf(this.sheet)<0&&(n.adoptedStyleSheets=[this.sheet,...n.adoptedStyleSheets]);else{let o="";for(let c=0;c<this.modules.length;c++)o+=this.modules[c].getRules()+`
397
+ `;this.styleTag.textContent=o;let l=n.head||n;this.styleTag.parentNode!=l&&l.insertBefore(this.styleTag,l.firstChild)}}setNonce(e){this.styleTag&&this.styleTag.getAttribute("nonce")!=e&&this.styleTag.setAttribute("nonce",e)}}var Zo={8:"Backspace",9:"Tab",10:"Enter",12:"NumLock",13:"Enter",16:"Shift",17:"Control",18:"Alt",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",44:"PrintScreen",45:"Insert",46:"Delete",59:";",61:"=",91:"Meta",92:"Meta",106:"*",107:"+",108:",",109:"-",110:".",111:"/",144:"NumLock",145:"ScrollLock",160:"Shift",161:"Shift",162:"Control",163:"Control",164:"Alt",165:"Alt",173:"-",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},mf={48:")",49:"!",50:"@",51:"#",52:"$",53:"%",54:"^",55:"&",56:"*",57:"(",59:":",61:"+",173:"_",186:":",187:"+",188:"<",189:"_",190:">",191:"?",192:"~",219:"{",220:"|",221:"}",222:'"'},cF=typeof navigator<"u"&&/Mac/.test(navigator.platform),uF=typeof navigator<"u"&&/MSIE \d|Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(navigator.userAgent);for(var gn=0;gn<10;gn++)Zo[48+gn]=Zo[96+gn]=String(gn);for(var gn=1;gn<=24;gn++)Zo[gn+111]="F"+gn;for(var gn=65;gn<=90;gn++)Zo[gn]=String.fromCharCode(gn+32),mf[gn]=String.fromCharCode(gn);for(var Qb in Zo)mf.hasOwnProperty(Qb)||(mf[Qb]=Zo[Qb]);function hF(t){var e=cF&&t.metaKey&&t.shiftKey&&!t.ctrlKey&&!t.altKey||uF&&t.shiftKey&&t.key&&t.key.length==1||t.key=="Unidentified",n=!e&&t.key||(t.shiftKey?mf:Zo)[t.keyCode]||t.key||"Unidentified";return n=="Esc"&&(n="Escape"),n=="Del"&&(n="Delete"),n=="Left"&&(n="ArrowLeft"),n=="Up"&&(n="ArrowUp"),n=="Right"&&(n="ArrowRight"),n=="Down"&&(n="ArrowDown"),n}function vt(){var t=arguments[0];typeof t=="string"&&(t=document.createElement(t));var e=1,n=arguments[1];if(n&&typeof n=="object"&&n.nodeType==null&&!Array.isArray(n)){for(var i in n)if(Object.prototype.hasOwnProperty.call(n,i)){var r=n[i];typeof r=="string"?t.setAttribute(i,r):r!=null&&(t[i]=r)}e++}for(;e<arguments.length;e++)hM(t,arguments[e]);return t}function hM(t,e){if(typeof e=="string")t.appendChild(document.createTextNode(e));else if(e!=null)if(e.nodeType!=null)t.appendChild(e);else if(Array.isArray(e))for(var n=0;n<e.length;n++)hM(t,e[n]);else throw new RangeError("Unsupported child node: "+e)}let Dn=typeof navigator<"u"?navigator:{userAgent:"",vendor:"",platform:""},v1=typeof document<"u"?document:{documentElement:{style:{}}};const S1=/Edge\/(\d+)/.exec(Dn.userAgent),fM=/MSIE \d/.test(Dn.userAgent),_1=/Trident\/(?:[7-9]|\d{2,})\..*rv:(\d+)/.exec(Dn.userAgent),sO=!!(fM||_1||S1),qC=!sO&&/gecko\/(\d+)/i.test(Dn.userAgent),Cb=!sO&&/Chrome\/(\d+)/.exec(Dn.userAgent),fF="webkitFontSmoothing"in v1.documentElement.style,k1=!sO&&/Apple Computer/.test(Dn.vendor),UC=k1&&(/Mobile\/\w+/.test(Dn.userAgent)||Dn.maxTouchPoints>2);var Se={mac:UC||/Mac/.test(Dn.platform),windows:/Win/.test(Dn.platform),linux:/Linux|X11/.test(Dn.platform),ie:sO,ie_version:fM?v1.documentMode||6:_1?+_1[1]:S1?+S1[1]:0,gecko:qC,gecko_version:qC?+(/Firefox\/(\d+)/.exec(Dn.userAgent)||[0,0])[1]:0,chrome:!!Cb,chrome_version:Cb?+Cb[1]:0,ios:UC,android:/Android\b/.test(Dn.userAgent),webkit_version:fF?+(/\bAppleWebKit\/(\d+)/.exec(Dn.userAgent)||[0,0])[1]:0,safari:k1,safari_version:k1?+(/\bVersion\/(\d+(\.\d+)?)/.exec(Dn.userAgent)||[0,0])[1]:0,tabSize:v1.documentElement.style.tabSize!=null?"tab-size":"-moz-tab-size"};function gf(t){let e;return t.nodeType==11?e=t.getSelection?t:t.ownerDocument:e=t,e.getSelection()}function w1(t,e){return e?t==e||t.contains(e.nodeType!=1?e.parentNode:e):!1}function vm(t,e){if(!e.anchorNode)return!1;try{return w1(t,e.anchorNode)}catch{return!1}}function Zc(t){return t.nodeType==3?Ja(t,0,t.nodeValue.length).getClientRects():t.nodeType==1?t.getClientRects():[]}function Bh(t,e,n,i){return n?YC(t,e,n,i,-1)||YC(t,e,n,i,1):!1}function Ka(t){for(var e=0;;e++)if(t=t.previousSibling,!t)return e}function cg(t){return t.nodeType==1&&/^(DIV|P|LI|UL|OL|BLOCKQUOTE|DD|DT|H\d|SECTION|PRE)$/.test(t.nodeName)}function YC(t,e,n,i,r){for(;;){if(t==n&&e==i)return!0;if(e==(r<0?0:Ir(t))){if(t.nodeName=="DIV")return!1;let s=t.parentNode;if(!s||s.nodeType!=1)return!1;e=Ka(t)+(r<0?0:1),t=s}else if(t.nodeType==1){if(t=t.childNodes[e+(r<0?-1:0)],t.nodeType==1&&t.contentEditable=="false")return!1;e=r<0?Ir(t):0}else return!1}}function Ir(t){return t.nodeType==3?t.nodeValue.length:t.childNodes.length}function Gf(t,e){let n=e?t.left:t.right;return{left:n,right:n,top:t.top,bottom:t.bottom}}function dF(t){let e=t.visualViewport;return e?{left:0,right:e.width,top:0,bottom:e.height}:{left:0,right:t.innerWidth,top:0,bottom:t.innerHeight}}function dM(t,e){let n=e.width/t.offsetWidth,i=e.height/t.offsetHeight;return(n>.995&&n<1.005||!isFinite(n)||Math.abs(e.width-t.offsetWidth)<1)&&(n=1),(i>.995&&i<1.005||!isFinite(i)||Math.abs(e.height-t.offsetHeight)<1)&&(i=1),{scaleX:n,scaleY:i}}function pF(t,e,n,i,r,s,o,l){let c=t.ownerDocument,h=c.defaultView||window;for(let d=t,p=!1;d&&!p;)if(d.nodeType==1){let g,O=d==c.body,x=1,S=1;if(O)g=dF(h);else{if(/^(fixed|sticky)$/.test(getComputedStyle(d).position)&&(p=!0),d.scrollHeight<=d.clientHeight&&d.scrollWidth<=d.clientWidth){d=d.assignedSlot||d.parentNode;continue}let P=d.getBoundingClientRect();({scaleX:x,scaleY:S}=dM(d,P)),g={left:P.left,right:P.left+d.clientWidth*x,top:P.top,bottom:P.top+d.clientHeight*S}}let _=0,k=0;if(r=="nearest")e.top<g.top?(k=e.top-(g.top+o),n>0&&e.bottom>g.bottom+k&&(k=e.bottom-g.bottom+o)):e.bottom>g.bottom&&(k=e.bottom-g.bottom+o,n<0&&e.top-k<g.top&&(k=e.top-(g.top+o)));else{let P=e.bottom-e.top,Q=g.bottom-g.top;k=(r=="center"&&P<=Q?e.top+P/2-Q/2:r=="start"||r=="center"&&n<0?e.top-o:e.bottom-Q+o)-g.top}if(i=="nearest"?e.left<g.left?(_=e.left-(g.left+s),n>0&&e.right>g.right+_&&(_=e.right-g.right+s)):e.right>g.right&&(_=e.right-g.right+s,n<0&&e.left<g.left+_&&(_=e.left-(g.left+s))):_=(i=="center"?e.left+(e.right-e.left)/2-(g.right-g.left)/2:i=="start"==l?e.left-s:e.right-(g.right-g.left)+s)-g.left,_||k)if(O)h.scrollBy(_,k);else{let P=0,Q=0;if(k){let R=d.scrollTop;d.scrollTop+=k/S,Q=(d.scrollTop-R)*S}if(_){let R=d.scrollLeft;d.scrollLeft+=_/x,P=(d.scrollLeft-R)*x}e={left:e.left-P,top:e.top-Q,right:e.right-P,bottom:e.bottom-Q},P&&Math.abs(P-_)<1&&(i="nearest"),Q&&Math.abs(Q-k)<1&&(r="nearest")}if(O)break;(e.top<g.top||e.bottom>g.bottom||e.left<g.left||e.right>g.right)&&(e={left:Math.max(e.left,g.left),right:Math.min(e.right,g.right),top:Math.max(e.top,g.top),bottom:Math.min(e.bottom,g.bottom)}),d=d.assignedSlot||d.parentNode}else if(d.nodeType==11)d=d.host;else break}function mF(t){let e=t.ownerDocument,n,i;for(let r=t.parentNode;r&&!(r==e.body||n&&i);)if(r.nodeType==1)!i&&r.scrollHeight>r.clientHeight&&(i=r),!n&&r.scrollWidth>r.clientWidth&&(n=r),r=r.assignedSlot||r.parentNode;else if(r.nodeType==11)r=r.host;else break;return{x:n,y:i}}class gF{constructor(){this.anchorNode=null,this.anchorOffset=0,this.focusNode=null,this.focusOffset=0}eq(e){return this.anchorNode==e.anchorNode&&this.anchorOffset==e.anchorOffset&&this.focusNode==e.focusNode&&this.focusOffset==e.focusOffset}setRange(e){let{anchorNode:n,focusNode:i}=e;this.set(n,Math.min(e.anchorOffset,n?Ir(n):0),i,Math.min(e.focusOffset,i?Ir(i):0))}set(e,n,i,r){this.anchorNode=e,this.anchorOffset=n,this.focusNode=i,this.focusOffset=r}}let va=null;Se.safari&&Se.safari_version>=26&&(va=!1);function pM(t){if(t.setActive)return t.setActive();if(va)return t.focus(va);let e=[];for(let n=t;n&&(e.push(n,n.scrollTop,n.scrollLeft),n!=n.ownerDocument);n=n.parentNode);if(t.focus(va==null?{get preventScroll(){return va={preventScroll:!0},!0}}:void 0),!va){va=!1;for(let n=0;n<e.length;){let i=e[n++],r=e[n++],s=e[n++];i.scrollTop!=r&&(i.scrollTop=r),i.scrollLeft!=s&&(i.scrollLeft=s)}}}let GC;function Ja(t,e,n=e){let i=GC||(GC=document.createRange());return i.setEnd(t,n),i.setStart(t,e),i}function xc(t,e,n,i){let r={key:e,code:e,keyCode:n,which:n,cancelable:!0};i&&({altKey:r.altKey,ctrlKey:r.ctrlKey,shiftKey:r.shiftKey,metaKey:r.metaKey}=i);let s=new KeyboardEvent("keydown",r);s.synthetic=!0,t.dispatchEvent(s);let o=new KeyboardEvent("keyup",r);return o.synthetic=!0,t.dispatchEvent(o),s.defaultPrevented||o.defaultPrevented}function OF(t){for(;t;){if(t&&(t.nodeType==9||t.nodeType==11&&t.host))return t;t=t.assignedSlot||t.parentNode}return null}function mM(t){for(;t.attributes.length;)t.removeAttributeNode(t.attributes[0])}function yF(t,e){let n=e.focusNode,i=e.focusOffset;if(!n||e.anchorNode!=n||e.anchorOffset!=i)return!1;for(i=Math.min(i,Ir(n));;)if(i){if(n.nodeType!=1)return!1;let r=n.childNodes[i-1];r.contentEditable=="false"?i--:(n=r,i=Ir(n))}else{if(n==t)return!0;i=Ka(n),n=n.parentNode}}function gM(t){return t.scrollTop>Math.max(1,t.scrollHeight-t.clientHeight-4)}function OM(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i>0)return{node:n,offset:i};if(n.nodeType==1&&i>0){if(n.contentEditable=="false")return null;n=n.childNodes[i-1],i=Ir(n)}else if(n.parentNode&&!cg(n))i=Ka(n),n=n.parentNode;else return null}}function yM(t,e){for(let n=t,i=e;;){if(n.nodeType==3&&i<n.nodeValue.length)return{node:n,offset:i};if(n.nodeType==1&&i<n.childNodes.length){if(n.contentEditable=="false")return null;n=n.childNodes[i],i=0}else if(n.parentNode&&!cg(n))i=Ka(n)+1,n=n.parentNode;else return null}}class wn{constructor(e,n,i=!0){this.node=e,this.offset=n,this.precise=i}static before(e,n){return new wn(e.parentNode,Ka(e),n)}static after(e,n){return new wn(e.parentNode,Ka(e)+1,n)}}const yS=[];class yt{constructor(){this.parent=null,this.dom=null,this.flags=2}get overrideDOMText(){return null}get posAtStart(){return this.parent?this.parent.posBefore(this):0}get posAtEnd(){return this.posAtStart+this.length}posBefore(e){let n=this.posAtStart;for(let i of this.children){if(i==e)return n;n+=i.length+i.breakAfter}throw new RangeError("Invalid child in posBefore")}posAfter(e){return this.posBefore(e)+e.length}sync(e,n){if(this.flags&2){let i=this.dom,r=null,s;for(let o of this.children){if(o.flags&7){if(!o.dom&&(s=r?r.nextSibling:i.firstChild)){let l=yt.get(s);(!l||!l.parent&&l.canReuseDOM(o))&&o.reuseDOM(s)}o.sync(e,n),o.flags&=-8}if(s=r?r.nextSibling:i.firstChild,n&&!n.written&&n.node==i&&s!=o.dom&&(n.written=!0),o.dom.parentNode==i)for(;s&&s!=o.dom;)s=WC(s);else i.insertBefore(o.dom,s);r=o.dom}for(s=r?r.nextSibling:i.firstChild,s&&n&&n.node==i&&(n.written=!0);s;)s=WC(s)}else if(this.flags&1)for(let i of this.children)i.flags&7&&(i.sync(e,n),i.flags&=-8)}reuseDOM(e){}localPosFromDOM(e,n){let i;if(e==this.dom)i=this.dom.childNodes[n];else{let r=Ir(e)==0?0:n==0?-1:1;for(;;){let s=e.parentNode;if(s==this.dom)break;r==0&&s.firstChild!=s.lastChild&&(e==s.firstChild?r=-1:r=1),e=s}r<0?i=e:i=e.nextSibling}if(i==this.dom.firstChild)return 0;for(;i&&!yt.get(i);)i=i.nextSibling;if(!i)return this.length;for(let r=0,s=0;;r++){let o=this.children[r];if(o.dom==i)return s;s+=o.length+o.breakAfter}}domBoundsAround(e,n,i=0){let r=-1,s=-1,o=-1,l=-1;for(let c=0,h=i,d=i;c<this.children.length;c++){let p=this.children[c],g=h+p.length;if(h<e&&g>n)return p.domBoundsAround(e,n,h);if(g>=e&&r==-1&&(r=c,s=h),h>n&&p.dom.parentNode==this.dom){o=c,l=d;break}d=g,h=g+p.breakAfter}return{from:s,to:l<0?i+this.length:l,startDOM:(r?this.children[r-1].dom.nextSibling:null)||this.dom.firstChild,endDOM:o<this.children.length&&o>=0?this.children[o].dom:null}}markDirty(e=!1){this.flags|=2,this.markParentsDirty(e)}markParentsDirty(e){for(let n=this.parent;n;n=n.parent){if(e&&(n.flags|=2),n.flags&1)return;n.flags|=1,e=!1}}setParent(e){this.parent!=e&&(this.parent=e,this.flags&7&&this.markParentsDirty(!0))}setDOM(e){this.dom!=e&&(this.dom&&(this.dom.cmView=null),this.dom=e,e.cmView=this)}get rootView(){for(let e=this;;){let n=e.parent;if(!n)return e;e=n}}replaceChildren(e,n,i=yS){this.markDirty();for(let r=e;r<n;r++){let s=this.children[r];s.parent==this&&i.indexOf(s)<0&&s.destroy()}i.length<250?this.children.splice(e,n-e,...i):this.children=[].concat(this.children.slice(0,e),i,this.children.slice(n));for(let r=0;r<i.length;r++)i[r].setParent(this)}ignoreMutation(e){return!1}ignoreEvent(e){return!1}childCursor(e=this.length){return new bM(this.children,e,this.children.length)}childPos(e,n=1){return this.childCursor().findPos(e,n)}toString(){let e=this.constructor.name.replace("View","");return e+(this.children.length?"("+this.children.join()+")":this.length?"["+(e=="Text"?this.text:this.length)+"]":"")+(this.breakAfter?"#":"")}static get(e){return e.cmView}get isEditable(){return!0}get isWidget(){return!1}get isHidden(){return!1}merge(e,n,i,r,s,o){return!1}become(e){return!1}canReuseDOM(e){return e.constructor==this.constructor&&!((this.flags|e.flags)&8)}getSide(){return 0}destroy(){for(let e of this.children)e.parent==this&&e.destroy();this.parent=null}}yt.prototype.breakAfter=0;function WC(t){let e=t.nextSibling;return t.parentNode.removeChild(t),e}class bM{constructor(e,n,i){this.children=e,this.pos=n,this.i=i,this.off=0}findPos(e,n=1){for(;;){if(e>this.pos||e==this.pos&&(n>0||this.i==0||this.children[this.i-1].breakAfter))return this.off=e-this.pos,this;let i=this.children[--this.i];this.pos-=i.length+i.breakAfter}}}function xM(t,e,n,i,r,s,o,l,c){let{children:h}=t,d=h.length?h[e]:null,p=s.length?s[s.length-1]:null,g=p?p.breakAfter:o;if(!(e==i&&d&&!o&&!g&&s.length<2&&d.merge(n,r,s.length?p:null,n==0,l,c))){if(i<h.length){let O=h[i];O&&(r<O.length||O.breakAfter&&(p!=null&&p.breakAfter))?(e==i&&(O=O.split(r),r=0),!g&&p&&O.merge(0,r,p,!0,0,c)?s[s.length-1]=O:((r||O.children.length&&!O.children[0].length)&&O.merge(0,r,null,!1,0,c),s.push(O))):O!=null&&O.breakAfter&&(p?p.breakAfter=1:o=1),i++}for(d&&(d.breakAfter=o,n>0&&(!o&&s.length&&d.merge(n,d.length,s[0],!1,l,0)?d.breakAfter=s.shift().breakAfter:(n<d.length||d.children.length&&d.children[d.children.length-1].length==0)&&d.merge(n,d.length,null,!1,l,0),e++));e<i&&s.length;)if(h[i-1].become(s[s.length-1]))i--,s.pop(),c=s.length?0:l;else if(h[e].become(s[0]))e++,s.shift(),l=s.length?0:c;else break;!s.length&&e&&i<h.length&&!h[e-1].breakAfter&&h[i].merge(0,0,h[e-1],!1,l,c)&&e--,(e<i||s.length)&&t.replaceChildren(e,i,s)}}function vM(t,e,n,i,r,s){let o=t.childCursor(),{i:l,off:c}=o.findPos(n,1),{i:h,off:d}=o.findPos(e,-1),p=e-n;for(let g of i)p+=g.length;t.length+=p,xM(t,h,d,l,c,i,0,r,s)}const bF=256;class fr extends yt{constructor(e){super(),this.text=e}get length(){return this.text.length}createDOM(e){this.setDOM(e||document.createTextNode(this.text))}sync(e,n){this.dom||this.createDOM(),this.dom.nodeValue!=this.text&&(n&&n.node==this.dom&&(n.written=!0),this.dom.nodeValue=this.text)}reuseDOM(e){e.nodeType==3&&this.createDOM(e)}merge(e,n,i){return this.flags&8||i&&(!(i instanceof fr)||this.length-(n-e)+i.length>bF||i.flags&8)?!1:(this.text=this.text.slice(0,e)+(i?i.text:"")+this.text.slice(n),this.markDirty(),!0)}split(e){let n=new fr(this.text.slice(e));return this.text=this.text.slice(0,e),this.markDirty(),n.flags|=this.flags&8,n}localPosFromDOM(e,n){return e==this.dom?n:n?this.text.length:0}domAtPos(e){return new wn(this.dom,e)}domBoundsAround(e,n,i){return{from:i,to:i+this.length,startDOM:this.dom,endDOM:this.dom.nextSibling}}coordsAt(e,n){return xF(this.dom,e,n)}}class Ls extends yt{constructor(e,n=[],i=0){super(),this.mark=e,this.children=n,this.length=i;for(let r of n)r.setParent(this)}setAttrs(e){if(mM(e),this.mark.class&&(e.className=this.mark.class),this.mark.attrs)for(let n in this.mark.attrs)e.setAttribute(n,this.mark.attrs[n]);return e}canReuseDOM(e){return super.canReuseDOM(e)&&!((this.flags|e.flags)&8)}reuseDOM(e){e.nodeName==this.mark.tagName.toUpperCase()&&(this.setDOM(e),this.flags|=6)}sync(e,n){this.dom?this.flags&4&&this.setAttrs(this.dom):this.setDOM(this.setAttrs(document.createElement(this.mark.tagName))),super.sync(e,n)}merge(e,n,i,r,s,o){return i&&(!(i instanceof Ls&&i.mark.eq(this.mark))||e&&s<=0||n<this.length&&o<=0)?!1:(vM(this,e,n,i?i.children.slice():[],s-1,o-1),this.markDirty(),!0)}split(e){let n=[],i=0,r=-1,s=0;for(let l of this.children){let c=i+l.length;c>e&&n.push(i<e?l.split(e-i):l),r<0&&i>=e&&(r=s),i=c,s++}let o=this.length-e;return this.length=e,r>-1&&(this.children.length=r,this.markDirty()),new Ls(this.mark,n,o)}domAtPos(e){return SM(this,e)}coordsAt(e,n){return kM(this,e,n)}}function xF(t,e,n){let i=t.nodeValue.length;e>i&&(e=i);let r=e,s=e,o=0;e==0&&n<0||e==i&&n>=0?Se.chrome||Se.gecko||(e?(r--,o=1):s<i&&(s++,o=-1)):n<0?r--:s<i&&s++;let l=Ja(t,r,s).getClientRects();if(!l.length)return null;let c=l[(o?o<0:n>=0)?0:l.length-1];return Se.safari&&!o&&c.width==0&&(c=Array.prototype.find.call(l,h=>h.width)||c),o?Gf(c,o<0):c||null}class Ps extends yt{static create(e,n,i){return new Ps(e,n,i)}constructor(e,n,i){super(),this.widget=e,this.length=n,this.side=i,this.prevWidget=null}split(e){let n=Ps.create(this.widget,this.length-e,this.side);return this.length-=e,n}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}getSide(){return this.side}merge(e,n,i,r,s,o){return i&&(!(i instanceof Ps)||!this.widget.compare(i.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-n),!0)}become(e){return e instanceof Ps&&e.side==this.side&&this.widget.constructor==e.widget.constructor?(this.widget.compare(e.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get overrideDOMText(){if(this.length==0)return tt.empty;let e=this;for(;e.parent;)e=e.parent;let{view:n}=e,i=n&&n.state.doc,r=this.posAtStart;return i?i.slice(r,r+this.length):tt.empty}domAtPos(e){return(this.length?e==0:this.side>0)?wn.before(this.dom):wn.after(this.dom,e==this.length)}domBoundsAround(){return null}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);if(i)return i;let r=this.dom.getClientRects(),s=null;if(!r.length)return null;let o=this.side?this.side<0:e>0;for(let l=o?r.length-1:0;s=r[l],!(e>0?l==0:l==r.length-1||s.top<s.bottom);l+=o?-1:1);return Gf(s,!o)}get isEditable(){return!1}get isWidget(){return!0}get isHidden(){return this.widget.isHidden}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}}class qc extends yt{constructor(e){super(),this.side=e}get length(){return 0}merge(){return!1}become(e){return e instanceof qc&&e.side==this.side}split(){return new qc(this.side)}sync(){if(!this.dom){let e=document.createElement("img");e.className="cm-widgetBuffer",e.setAttribute("aria-hidden","true"),this.setDOM(e)}}getSide(){return this.side}domAtPos(e){return this.side>0?wn.before(this.dom):wn.after(this.dom)}localPosFromDOM(){return 0}domBoundsAround(){return null}coordsAt(e){return this.dom.getBoundingClientRect()}get overrideDOMText(){return tt.empty}get isHidden(){return!0}}fr.prototype.children=Ps.prototype.children=qc.prototype.children=yS;function SM(t,e){let n=t.dom,{children:i}=t,r=0;for(let s=0;r<i.length;r++){let o=i[r],l=s+o.length;if(!(l==s&&o.getSide()<=0)){if(e>s&&e<l&&o.dom.parentNode==n)return o.domAtPos(e-s);if(e<=s)break;s=l}}for(let s=r;s>0;s--){let o=i[s-1];if(o.dom.parentNode==n)return o.domAtPos(o.length)}for(let s=r;s<i.length;s++){let o=i[s];if(o.dom.parentNode==n)return o.domAtPos(0)}return new wn(n,0)}function _M(t,e,n){let i,{children:r}=t;n>0&&e instanceof Ls&&r.length&&(i=r[r.length-1])instanceof Ls&&i.mark.eq(e.mark)?_M(i,e.children[0],n-1):(r.push(e),e.setParent(t)),t.length+=e.length}function kM(t,e,n){let i=null,r=-1,s=null,o=-1;function l(h,d){for(let p=0,g=0;p<h.children.length&&g<=d;p++){let O=h.children[p],x=g+O.length;x>=d&&(O.children.length?l(O,d-g):(!s||s.isHidden&&(n>0||SF(s,O)))&&(x>d||g==x&&O.getSide()>0)?(s=O,o=d-g):(g<d||g==x&&O.getSide()<0&&!O.isHidden)&&(i=O,r=d-g)),g=x}}l(t,e);let c=(n<0?i:s)||i||s;return c?c.coordsAt(Math.max(0,c==i?r:o),n):vF(t)}function vF(t){let e=t.dom.lastChild;if(!e)return t.dom.getBoundingClientRect();let n=Zc(e);return n[n.length-1]||null}function SF(t,e){let n=t.coordsAt(0,1),i=e.coordsAt(0,1);return n&&i&&i.top<n.bottom}function P1(t,e){for(let n in t)n=="class"&&e.class?e.class+=" "+t.class:n=="style"&&e.style?e.style+=";"+t.style:e[n]=t[n];return e}const HC=Object.create(null);function ug(t,e,n){if(t==e)return!0;t||(t=HC),e||(e=HC);let i=Object.keys(t),r=Object.keys(e);if(i.length-(n&&i.indexOf(n)>-1?1:0)!=r.length-(n&&r.indexOf(n)>-1?1:0))return!1;for(let s of i)if(s!=n&&(r.indexOf(s)==-1||t[s]!==e[s]))return!1;return!0}function T1(t,e,n){let i=!1;if(e)for(let r in e)n&&r in n||(i=!0,r=="style"?t.style.cssText="":t.removeAttribute(r));if(n)for(let r in n)e&&e[r]==n[r]||(i=!0,r=="style"?t.style.cssText=n[r]:t.setAttribute(r,n[r]));return i}function _F(t){let e=Object.create(null);for(let n=0;n<t.attributes.length;n++){let i=t.attributes[n];e[i.name]=i.value}return e}class Ti{eq(e){return!1}updateDOM(e,n){return!1}compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}get estimatedHeight(){return-1}get lineBreaks(){return 0}ignoreEvent(e){return!0}coordsAt(e,n,i){return null}get isHidden(){return!1}get editable(){return!1}destroy(e){}}var zn=(function(t){return t[t.Text=0]="Text",t[t.WidgetBefore=1]="WidgetBefore",t[t.WidgetAfter=2]="WidgetAfter",t[t.WidgetRange=3]="WidgetRange",t})(zn||(zn={}));class ke extends Fa{constructor(e,n,i,r){super(),this.startSide=e,this.endSide=n,this.widget=i,this.spec=r}get heightRelevant(){return!1}static mark(e){return new Wf(e)}static widget(e){let n=Math.max(-1e4,Math.min(1e4,e.side||0)),i=!!e.block;return n+=i&&!e.inlineOrder?n>0?3e8:-4e8:n>0?1e8:-1e8,new qo(e,n,n,i,e.widget||null,!1)}static replace(e){let n=!!e.block,i,r;if(e.isBlockGap)i=-5e8,r=4e8;else{let{start:s,end:o}=wM(e,n);i=(s?n?-3e8:-1:5e8)-1,r=(o?n?2e8:1:-6e8)+1}return new qo(e,i,r,n,e.widget||null,!0)}static line(e){return new Hf(e)}static set(e,n=!1){return rt.of(e,n)}hasHeight(){return this.widget?this.widget.estimatedHeight>-1:!1}}ke.none=rt.empty;class Wf extends ke{constructor(e){let{start:n,end:i}=wM(e);super(n?-1:5e8,i?1:-6e8,null,e),this.tagName=e.tagName||"span",this.class=e.class||"",this.attrs=e.attributes||null}eq(e){var n,i;return this==e||e instanceof Wf&&this.tagName==e.tagName&&(this.class||((n=this.attrs)===null||n===void 0?void 0:n.class))==(e.class||((i=e.attrs)===null||i===void 0?void 0:i.class))&&ug(this.attrs,e.attrs,"class")}range(e,n=e){if(e>=n)throw new RangeError("Mark decorations may not be empty");return super.range(e,n)}}Wf.prototype.point=!1;class Hf extends ke{constructor(e){super(-2e8,-2e8,null,e)}eq(e){return e instanceof Hf&&this.spec.class==e.spec.class&&ug(this.spec.attributes,e.spec.attributes)}range(e,n=e){if(n!=e)throw new RangeError("Line decoration ranges must be zero-length");return super.range(e,n)}}Hf.prototype.mapMode=On.TrackBefore;Hf.prototype.point=!0;class qo extends ke{constructor(e,n,i,r,s,o){super(n,i,s,e),this.block=r,this.isReplace=o,this.mapMode=r?n<=0?On.TrackBefore:On.TrackAfter:On.TrackDel}get type(){return this.startSide!=this.endSide?zn.WidgetRange:this.startSide<=0?zn.WidgetBefore:zn.WidgetAfter}get heightRelevant(){return this.block||!!this.widget&&(this.widget.estimatedHeight>=5||this.widget.lineBreaks>0)}eq(e){return e instanceof qo&&kF(this.widget,e.widget)&&this.block==e.block&&this.startSide==e.startSide&&this.endSide==e.endSide}range(e,n=e){if(this.isReplace&&(e>n||e==n&&this.startSide>0&&this.endSide<=0))throw new RangeError("Invalid range for replacement decoration");if(!this.isReplace&&n!=e)throw new RangeError("Widget decorations can only have zero-length ranges");return super.range(e,n)}}qo.prototype.point=!0;function wM(t,e=!1){let{inclusiveStart:n,inclusiveEnd:i}=t;return n==null&&(n=t.inclusive),i==null&&(i=t.inclusive),{start:n??e,end:i??e}}function kF(t,e){return t==e||!!(t&&e&&t.compare(e))}function Sm(t,e,n,i=0){let r=n.length-1;r>=0&&n[r]+i>=t?n[r]=Math.max(n[r],e):n.push(t,e)}class Yt extends yt{constructor(){super(...arguments),this.children=[],this.length=0,this.prevAttrs=void 0,this.attrs=null,this.breakAfter=0}merge(e,n,i,r,s,o){if(i){if(!(i instanceof Yt))return!1;this.dom||i.transferDOM(this)}return r&&this.setDeco(i?i.attrs:null),vM(this,e,n,i?i.children.slice():[],s,o),!0}split(e){let n=new Yt;if(n.breakAfter=this.breakAfter,this.length==0)return n;let{i,off:r}=this.childPos(e);r&&(n.append(this.children[i].split(r),0),this.children[i].merge(r,this.children[i].length,null,!1,0,0),i++);for(let s=i;s<this.children.length;s++)n.append(this.children[s],0);for(;i>0&&this.children[i-1].length==0;)this.children[--i].destroy();return this.children.length=i,this.markDirty(),this.length=e,n}transferDOM(e){this.dom&&(this.markDirty(),e.setDOM(this.dom),e.prevAttrs=this.prevAttrs===void 0?this.attrs:this.prevAttrs,this.prevAttrs=void 0,this.dom=null)}setDeco(e){ug(this.attrs,e)||(this.dom&&(this.prevAttrs=this.attrs,this.markDirty()),this.attrs=e)}append(e,n){_M(this,e,n)}addLineDeco(e){let n=e.spec.attributes,i=e.spec.class;n&&(this.attrs=P1(n,this.attrs||{})),i&&(this.attrs=P1({class:i},this.attrs||{}))}domAtPos(e){return SM(this,e)}reuseDOM(e){e.nodeName=="DIV"&&(this.setDOM(e),this.flags|=6)}sync(e,n){var i;this.dom?this.flags&4&&(mM(this.dom),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0):(this.setDOM(document.createElement("div")),this.dom.className="cm-line",this.prevAttrs=this.attrs?null:void 0),this.prevAttrs!==void 0&&(T1(this.dom,this.prevAttrs,this.attrs),this.dom.classList.add("cm-line"),this.prevAttrs=void 0),super.sync(e,n);let r=this.dom.lastChild;for(;r&&yt.get(r)instanceof Ls;)r=r.lastChild;if(!r||!this.length||r.nodeName!="BR"&&((i=yt.get(r))===null||i===void 0?void 0:i.isEditable)==!1&&(!Se.ios||!this.children.some(s=>s instanceof fr))){let s=document.createElement("BR");s.cmIgnore=!0,this.dom.appendChild(s)}}measureTextSize(){if(this.children.length==0||this.length>20)return null;let e=0,n;for(let i of this.children){if(!(i instanceof fr)||/[^ -~]/.test(i.text))return null;let r=Zc(i.dom);if(r.length!=1)return null;e+=r[0].width,n=r[0].height}return e?{lineHeight:this.dom.getBoundingClientRect().height,charWidth:e/this.length,textHeight:n}:null}coordsAt(e,n){let i=kM(this,e,n);if(!this.children.length&&i&&this.parent){let{heightOracle:r}=this.parent.view.viewState,s=i.bottom-i.top;if(Math.abs(s-r.lineHeight)<2&&r.textHeight<s){let o=(s-r.textHeight)/2;return{top:i.top+o,bottom:i.bottom-o,left:i.left,right:i.left}}}return i}become(e){return e instanceof Yt&&this.children.length==0&&e.children.length==0&&ug(this.attrs,e.attrs)&&this.breakAfter==e.breakAfter}covers(){return!0}static find(e,n){for(let i=0,r=0;i<e.children.length;i++){let s=e.children[i],o=r+s.length;if(o>=n){if(s instanceof Yt)return s;if(o>n)break}r=o+s.breakAfter}return null}}class Cs extends yt{constructor(e,n,i){super(),this.widget=e,this.length=n,this.deco=i,this.breakAfter=0,this.prevWidget=null}merge(e,n,i,r,s,o){return i&&(!(i instanceof Cs)||!this.widget.compare(i.widget)||e>0&&s<=0||n<this.length&&o<=0)?!1:(this.length=e+(i?i.length:0)+(this.length-n),!0)}domAtPos(e){return e==0?wn.before(this.dom):wn.after(this.dom,e==this.length)}split(e){let n=this.length-e;this.length=e;let i=new Cs(this.widget,n,this.deco);return i.breakAfter=this.breakAfter,i}get children(){return yS}sync(e){(!this.dom||!this.widget.updateDOM(this.dom,e))&&(this.dom&&this.prevWidget&&this.prevWidget.destroy(this.dom),this.prevWidget=null,this.setDOM(this.widget.toDOM(e)),this.widget.editable||(this.dom.contentEditable="false"))}get overrideDOMText(){return this.parent?this.parent.view.state.doc.slice(this.posAtStart,this.posAtEnd):tt.empty}domBoundsAround(){return null}become(e){return e instanceof Cs&&e.widget.constructor==this.widget.constructor?(e.widget.compare(this.widget)||this.markDirty(!0),this.dom&&!this.prevWidget&&(this.prevWidget=this.widget),this.widget=e.widget,this.length=e.length,this.deco=e.deco,this.breakAfter=e.breakAfter,!0):!1}ignoreMutation(){return!0}ignoreEvent(e){return this.widget.ignoreEvent(e)}get isEditable(){return!1}get isWidget(){return!0}coordsAt(e,n){let i=this.widget.coordsAt(this.dom,e,n);return i||(this.widget instanceof Q1?null:Gf(this.dom.getBoundingClientRect(),this.length?e==0:n<=0))}destroy(){super.destroy(),this.dom&&this.widget.destroy(this.dom)}covers(e){let{startSide:n,endSide:i}=this.deco;return n==i?!1:e<0?n<0:i>0}}class Q1 extends Ti{constructor(e){super(),this.height=e}toDOM(){let e=document.createElement("div");return e.className="cm-gap",this.updateDOM(e),e}eq(e){return e.height==this.height}updateDOM(e){return e.style.height=this.height+"px",!0}get editable(){return!0}get estimatedHeight(){return this.height}ignoreEvent(){return!1}}class Zh{constructor(e,n,i,r){this.doc=e,this.pos=n,this.end=i,this.disallowBlockEffectsFor=r,this.content=[],this.curLine=null,this.breakAtStart=0,this.pendingBuffer=0,this.bufferMarks=[],this.atCursorPos=!0,this.openStart=-1,this.openEnd=-1,this.text="",this.textOff=0,this.cursor=e.iter(),this.skip=n}posCovered(){if(this.content.length==0)return!this.breakAtStart&&this.doc.lineAt(this.pos).from!=this.pos;let e=this.content[this.content.length-1];return!(e.breakAfter||e instanceof Cs&&e.deco.endSide<0)}getLine(){return this.curLine||(this.content.push(this.curLine=new Yt),this.atCursorPos=!0),this.curLine}flushBuffer(e=this.bufferMarks){this.pendingBuffer&&(this.curLine.append(Xp(new qc(-1),e),e.length),this.pendingBuffer=0)}addBlockWidget(e){this.flushBuffer(),this.curLine=null,this.content.push(e)}finish(e){this.pendingBuffer&&e<=this.bufferMarks.length?this.flushBuffer():this.pendingBuffer=0,!this.posCovered()&&!(e&&this.content.length&&this.content[this.content.length-1]instanceof Cs)&&this.getLine()}buildText(e,n,i){for(;e>0;){if(this.textOff==this.text.length){let{value:o,lineBreak:l,done:c}=this.cursor.next(this.skip);if(this.skip=0,c)throw new Error("Ran out of text content when drawing inline views");if(l){this.posCovered()||this.getLine(),this.content.length?this.content[this.content.length-1].breakAfter=1:this.breakAtStart=1,this.flushBuffer(),this.curLine=null,this.atCursorPos=!0,e--;continue}else this.text=o,this.textOff=0}let r=Math.min(this.text.length-this.textOff,e),s=Math.min(r,512);this.flushBuffer(n.slice(n.length-i)),this.getLine().append(Xp(new fr(this.text.slice(this.textOff,this.textOff+s)),n),i),this.atCursorPos=!0,this.textOff+=s,e-=s,i=r<=s?0:n.length}}span(e,n,i,r){this.buildText(n-e,i,r),this.pos=n,this.openStart<0&&(this.openStart=r)}point(e,n,i,r,s,o){if(this.disallowBlockEffectsFor[o]&&i instanceof qo){if(i.block)throw new RangeError("Block decorations may not be specified via plugins");if(n>this.doc.lineAt(this.pos).to)throw new RangeError("Decorations that replace line breaks may not be specified via plugins")}let l=n-e;if(i instanceof qo)if(i.block)i.startSide>0&&!this.posCovered()&&this.getLine(),this.addBlockWidget(new Cs(i.widget||Uc.block,l,i));else{let c=Ps.create(i.widget||Uc.inline,l,l?0:i.startSide),h=this.atCursorPos&&!c.isEditable&&s<=r.length&&(e<n||i.startSide>0),d=!c.isEditable&&(e<n||s>r.length||i.startSide<=0),p=this.getLine();this.pendingBuffer==2&&!h&&!c.isEditable&&(this.pendingBuffer=0),this.flushBuffer(r),h&&(p.append(Xp(new qc(1),r),s),s=r.length+Math.max(0,s-r.length)),p.append(Xp(c,r),s),this.atCursorPos=d,this.pendingBuffer=d?e<n||s>r.length?1:2:0,this.pendingBuffer&&(this.bufferMarks=r.slice())}else this.doc.lineAt(this.pos).from==this.pos&&this.getLine().addLineDeco(i);l&&(this.textOff+l<=this.text.length?this.textOff+=l:(this.skip+=l-(this.text.length-this.textOff),this.text="",this.textOff=0),this.pos=n),this.openStart<0&&(this.openStart=s)}static build(e,n,i,r,s){let o=new Zh(e,n,i,s);return o.openEnd=rt.spans(r,n,i,o),o.openStart<0&&(o.openStart=o.openEnd),o.finish(o.openEnd),o}}function Xp(t,e){for(let n of e)t=new Ls(n,[t],t.length);return t}class Uc extends Ti{constructor(e){super(),this.tag=e}eq(e){return e.tag==this.tag}toDOM(){return document.createElement(this.tag)}updateDOM(e){return e.nodeName.toLowerCase()==this.tag}get isHidden(){return!0}}Uc.inline=new Uc("span");Uc.block=new Uc("div");var Ct=(function(t){return t[t.LTR=0]="LTR",t[t.RTL=1]="RTL",t})(Ct||(Ct={}));const el=Ct.LTR,bS=Ct.RTL;function PM(t){let e=[];for(let n=0;n<t.length;n++)e.push(1<<+t[n]);return e}const wF=PM("88888888888888888888888888888888888666888888787833333333337888888000000000000000000000000008888880000000000000000000000000088888888888888888888888888888888888887866668888088888663380888308888800000000000000000000000800000000000000000000000000000008"),PF=PM("4444448826627288999999999992222222222222222222222222222222222222222222222229999999999999999999994444444444644222822222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222222999999949999999229989999223333333333"),C1=Object.create(null),vr=[];for(let t of["()","[]","{}"]){let e=t.charCodeAt(0),n=t.charCodeAt(1);C1[e]=n,C1[n]=-e}function TM(t){return t<=247?wF[t]:1424<=t&&t<=1524?2:1536<=t&&t<=1785?PF[t-1536]:1774<=t&&t<=2220?4:8192<=t&&t<=8204?256:64336<=t&&t<=65023?4:1}const TF=/[\u0590-\u05f4\u0600-\u06ff\u0700-\u08ac\ufb50-\ufdff]/;class $o{get dir(){return this.level%2?bS:el}constructor(e,n,i){this.from=e,this.to=n,this.level=i}side(e,n){return this.dir==n==e?this.to:this.from}forward(e,n){return e==(this.dir==n)}static find(e,n,i,r){let s=-1;for(let o=0;o<e.length;o++){let l=e[o];if(l.from<=n&&l.to>=n){if(l.level==i)return o;(s<0||(r!=0?r<0?l.from<n:l.to>n:e[s].level>l.level))&&(s=o)}}if(s<0)throw new RangeError("Index out of range");return s}}function QM(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++){let i=t[n],r=e[n];if(i.from!=r.from||i.to!=r.to||i.direction!=r.direction||!QM(i.inner,r.inner))return!1}return!0}const St=[];function QF(t,e,n,i,r){for(let s=0;s<=i.length;s++){let o=s?i[s-1].to:e,l=s<i.length?i[s].from:n,c=s?256:r;for(let h=o,d=c,p=c;h<l;h++){let g=TM(t.charCodeAt(h));g==512?g=d:g==8&&p==4&&(g=16),St[h]=g==4?2:g,g&7&&(p=g),d=g}for(let h=o,d=c,p=c;h<l;h++){let g=St[h];if(g==128)h<l-1&&d==St[h+1]&&d&24?g=St[h]=d:St[h]=256;else if(g==64){let O=h+1;for(;O<l&&St[O]==64;)O++;let x=h&&d==8||O<n&&St[O]==8?p==1?1:8:256;for(let S=h;S<O;S++)St[S]=x;h=O-1}else g==8&&p==1&&(St[h]=1);d=g,g&7&&(p=g)}}}function CF(t,e,n,i,r){let s=r==1?2:1;for(let o=0,l=0,c=0;o<=i.length;o++){let h=o?i[o-1].to:e,d=o<i.length?i[o].from:n;for(let p=h,g,O,x;p<d;p++)if(O=C1[g=t.charCodeAt(p)])if(O<0){for(let S=l-3;S>=0;S-=3)if(vr[S+1]==-O){let _=vr[S+2],k=_&2?r:_&4?_&1?s:r:0;k&&(St[p]=St[vr[S]]=k),l=S;break}}else{if(vr.length==189)break;vr[l++]=p,vr[l++]=g,vr[l++]=c}else if((x=St[p])==2||x==1){let S=x==r;c=S?0:1;for(let _=l-3;_>=0;_-=3){let k=vr[_+2];if(k&2)break;if(S)vr[_+2]|=2;else{if(k&4)break;vr[_+2]|=4}}}}}function EF(t,e,n,i){for(let r=0,s=i;r<=n.length;r++){let o=r?n[r-1].to:t,l=r<n.length?n[r].from:e;for(let c=o;c<l;){let h=St[c];if(h==256){let d=c+1;for(;;)if(d==l){if(r==n.length)break;d=n[r++].to,l=r<n.length?n[r].from:e}else if(St[d]==256)d++;else break;let p=s==1,g=(d<e?St[d]:i)==1,O=p==g?p?1:2:i;for(let x=d,S=r,_=S?n[S-1].to:t;x>c;)x==_&&(x=n[--S].from,_=S?n[S-1].to:t),St[--x]=O;c=d}else s=h,c++}}}function E1(t,e,n,i,r,s,o){let l=i%2?2:1;if(i%2==r%2)for(let c=e,h=0;c<n;){let d=!0,p=!1;if(h==s.length||c<s[h].from){let S=St[c];S!=l&&(d=!1,p=S==16)}let g=!d&&l==1?[]:null,O=d?i:i+1,x=c;e:for(;;)if(h<s.length&&x==s[h].from){if(p)break e;let S=s[h];if(!d)for(let _=S.to,k=h+1;;){if(_==n)break e;if(k<s.length&&s[k].from==_)_=s[k++].to;else{if(St[_]==l)break e;break}}if(h++,g)g.push(S);else{S.from>c&&o.push(new $o(c,S.from,O));let _=S.direction==el!=!(O%2);A1(t,_?i+1:i,r,S.inner,S.from,S.to,o),c=S.to}x=S.to}else{if(x==n||(d?St[x]!=l:St[x]==l))break;x++}g?E1(t,c,x,i+1,r,g,o):c<x&&o.push(new $o(c,x,O)),c=x}else for(let c=n,h=s.length;c>e;){let d=!0,p=!1;if(!h||c>s[h-1].to){let S=St[c-1];S!=l&&(d=!1,p=S==16)}let g=!d&&l==1?[]:null,O=d?i:i+1,x=c;e:for(;;)if(h&&x==s[h-1].to){if(p)break e;let S=s[--h];if(!d)for(let _=S.from,k=h;;){if(_==e)break e;if(k&&s[k-1].to==_)_=s[--k].from;else{if(St[_-1]==l)break e;break}}if(g)g.push(S);else{S.to<c&&o.push(new $o(S.to,c,O));let _=S.direction==el!=!(O%2);A1(t,_?i+1:i,r,S.inner,S.from,S.to,o),c=S.from}x=S.from}else{if(x==e||(d?St[x-1]!=l:St[x-1]==l))break;x--}g?E1(t,x,c,i+1,r,g,o):x<c&&o.push(new $o(x,c,O)),c=x}}function A1(t,e,n,i,r,s,o){let l=e%2?2:1;QF(t,r,s,i,l),CF(t,r,s,i,l),EF(r,s,i,l),E1(t,r,s,e,n,i,o)}function AF(t,e,n){if(!t)return[new $o(0,0,e==bS?1:0)];if(e==el&&!n.length&&!TF.test(t))return CM(t.length);if(n.length)for(;t.length>St.length;)St[St.length]=256;let i=[],r=e==el?0:1;return A1(t,r,r,n,0,t.length,i),i}function CM(t){return[new $o(0,t,0)]}let EM="";function RF(t,e,n,i,r){var s;let o=i.head-t.from,l=$o.find(e,o,(s=i.bidiLevel)!==null&&s!==void 0?s:-1,i.assoc),c=e[l],h=c.side(r,n);if(o==h){let g=l+=r?1:-1;if(g<0||g>=e.length)return null;c=e[l=g],o=c.side(!r,n),h=c.side(r,n)}let d=yn(t.text,o,c.forward(r,n));(d<c.from||d>c.to)&&(d=h),EM=t.text.slice(Math.min(o,d),Math.max(o,d));let p=l==(r?e.length-1:0)?null:e[l+(r?1:-1)];return p&&d==h&&p.level+(r?0:1)<c.level?ae.cursor(p.side(!r,n)+t.from,p.forward(r,n)?1:-1,p.level):ae.cursor(d+t.from,c.forward(r,n)?-1:1,c.level)}function $F(t,e,n){for(let i=e;i<n;i++){let r=TM(t.charCodeAt(i));if(r==1)return el;if(r==2||r==4)return bS}return el}const AM=we.define(),RM=we.define(),$M=we.define(),LM=we.define(),R1=we.define(),MM=we.define(),DM=we.define(),xS=we.define(),vS=we.define(),jM=we.define({combine:t=>t.some(e=>e)}),NM=we.define({combine:t=>t.some(e=>e)}),zM=we.define();class vc{constructor(e,n="nearest",i="nearest",r=5,s=5,o=!1){this.range=e,this.y=n,this.x=i,this.yMargin=r,this.xMargin=s,this.isSnapshot=o}map(e){return e.empty?this:new vc(this.range.map(e),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}clip(e){return this.range.to<=e.doc.length?this:new vc(ae.cursor(e.doc.length),this.y,this.x,this.yMargin,this.xMargin,this.isSnapshot)}}const Vp=De.define({map:(t,e)=>t.map(e)}),IM=De.define();function ni(t,e,n){let i=t.facet(LM);i.length?i[0](e):window.onerror&&window.onerror(String(e),n,void 0,void 0,e)||(n?console.error(n+":",e):console.error(e))}const ks=we.define({combine:t=>t.length?t[0]:!0});let LF=0;const hc=we.define({combine(t){return t.filter((e,n)=>{for(let i=0;i<n;i++)if(t[i].plugin==e.plugin)return!1;return!0})}});class Dt{constructor(e,n,i,r,s){this.id=e,this.create=n,this.domEventHandlers=i,this.domEventObservers=r,this.baseExtensions=s(this),this.extension=this.baseExtensions.concat(hc.of({plugin:this,arg:void 0}))}of(e){return this.baseExtensions.concat(hc.of({plugin:this,arg:e}))}static define(e,n){const{eventHandlers:i,eventObservers:r,provide:s,decorations:o}=n||{};return new Dt(LF++,e,i,r,l=>{let c=[];return o&&c.push(Of.of(h=>{let d=h.plugin(l);return d?o(d):ke.none})),s&&c.push(s(l)),c})}static fromClass(e,n){return Dt.define((i,r)=>new e(i,r),n)}}class Eb{constructor(e){this.spec=e,this.mustUpdate=null,this.value=null}get plugin(){return this.spec&&this.spec.plugin}update(e){if(this.value){if(this.mustUpdate){let n=this.mustUpdate;if(this.mustUpdate=null,this.value.update)try{this.value.update(n)}catch(i){if(ni(n.state,i,"CodeMirror plugin crashed"),this.value.destroy)try{this.value.destroy()}catch{}this.deactivate()}}}else if(this.spec)try{this.value=this.spec.plugin.create(e,this.spec.arg)}catch(n){ni(e.state,n,"CodeMirror plugin crashed"),this.deactivate()}return this}destroy(e){var n;if(!((n=this.value)===null||n===void 0)&&n.destroy)try{this.value.destroy()}catch(i){ni(e.state,i,"CodeMirror plugin crashed")}}deactivate(){this.spec=this.value=null}}const XM=we.define(),SS=we.define(),Of=we.define(),VM=we.define(),Ff=we.define(),BM=we.define();function FC(t,e){let n=t.state.facet(BM);if(!n.length)return n;let i=n.map(s=>s instanceof Function?s(t):s),r=[];return rt.spans(i,e.from,e.to,{point(){},span(s,o,l,c){let h=s-e.from,d=o-e.from,p=r;for(let g=l.length-1;g>=0;g--,c--){let O=l[g].spec.bidiIsolate,x;if(O==null&&(O=$F(e.text,h,d)),c>0&&p.length&&(x=p[p.length-1]).to==h&&x.direction==O)x.to=d,p=x.inner;else{let S={from:h,to:d,direction:O,inner:[]};p.push(S),p=S.inner}}}}),r}const ZM=we.define();function _S(t){let e=0,n=0,i=0,r=0;for(let s of t.state.facet(ZM)){let o=s(t);o&&(o.left!=null&&(e=Math.max(e,o.left)),o.right!=null&&(n=Math.max(n,o.right)),o.top!=null&&(i=Math.max(i,o.top)),o.bottom!=null&&(r=Math.max(r,o.bottom)))}return{left:e,right:n,top:i,bottom:r}}const Th=we.define();class Gi{constructor(e,n,i,r){this.fromA=e,this.toA=n,this.fromB=i,this.toB=r}join(e){return new Gi(Math.min(this.fromA,e.fromA),Math.max(this.toA,e.toA),Math.min(this.fromB,e.fromB),Math.max(this.toB,e.toB))}addToSet(e){let n=e.length,i=this;for(;n>0;n--){let r=e[n-1];if(!(r.fromA>i.toA)){if(r.toA<i.fromA)break;i=i.join(r),e.splice(n-1,1)}}return e.splice(n,0,i),e}static extendWithRanges(e,n){if(n.length==0)return e;let i=[];for(let r=0,s=0,o=0,l=0;;r++){let c=r==e.length?null:e[r],h=o-l,d=c?c.fromB:1e9;for(;s<n.length&&n[s]<d;){let p=n[s],g=n[s+1],O=Math.max(l,p),x=Math.min(d,g);if(O<=x&&new Gi(O+h,x+h,O,x).addToSet(i),g>d)break;s+=2}if(!c)return i;new Gi(c.fromA,c.toA,c.fromB,c.toB).addToSet(i),o=c.toA,l=c.toB}}}class hg{constructor(e,n,i){this.view=e,this.state=n,this.transactions=i,this.flags=0,this.startState=e.state,this.changes=en.empty(this.startState.doc.length);for(let s of i)this.changes=this.changes.compose(s.changes);let r=[];this.changes.iterChangedRanges((s,o,l,c)=>r.push(new Gi(s,o,l,c))),this.changedRanges=r}static create(e,n,i){return new hg(e,n,i)}get viewportChanged(){return(this.flags&4)>0}get viewportMoved(){return(this.flags&8)>0}get heightChanged(){return(this.flags&2)>0}get geometryChanged(){return this.docChanged||(this.flags&18)>0}get focusChanged(){return(this.flags&1)>0}get docChanged(){return!this.changes.empty}get selectionSet(){return this.transactions.some(e=>e.selection)}get empty(){return this.flags==0&&this.transactions.length==0}}class KC extends yt{get length(){return this.view.state.doc.length}constructor(e){super(),this.view=e,this.decorations=[],this.dynamicDecorationMap=[!1],this.domChanged=null,this.hasComposition=null,this.markedForComposition=new Set,this.editContextFormatting=ke.none,this.lastCompositionAfterCursor=!1,this.minWidth=0,this.minWidthFrom=0,this.minWidthTo=0,this.impreciseAnchor=null,this.impreciseHead=null,this.forceSelection=!1,this.lastUpdate=Date.now(),this.setDOM(e.contentDOM),this.children=[new Yt],this.children[0].setParent(this),this.updateDeco(),this.updateInner([new Gi(0,0,0,e.state.doc.length)],0,null)}update(e){var n;let i=e.changedRanges;this.minWidth>0&&i.length&&(i.every(({fromA:h,toA:d})=>d<this.minWidthFrom||h>this.minWidthTo)?(this.minWidthFrom=e.changes.mapPos(this.minWidthFrom,1),this.minWidthTo=e.changes.mapPos(this.minWidthTo,1)):this.minWidth=this.minWidthFrom=this.minWidthTo=0),this.updateEditContextFormatting(e);let r=-1;this.view.inputState.composing>=0&&!this.view.observer.editContext&&(!((n=this.domChanged)===null||n===void 0)&&n.newSel?r=this.domChanged.newSel.head:!XF(e.changes,this.hasComposition)&&!e.selectionSet&&(r=e.state.selection.main.head));let s=r>-1?DF(this.view,e.changes,r):null;if(this.domChanged=null,this.hasComposition){this.markedForComposition.clear();let{from:h,to:d}=this.hasComposition;i=new Gi(h,d,e.changes.mapPos(h,-1),e.changes.mapPos(d,1)).addToSet(i.slice())}this.hasComposition=s?{from:s.range.fromB,to:s.range.toB}:null,(Se.ie||Se.chrome)&&!s&&e&&e.state.doc.lines!=e.startState.doc.lines&&(this.forceSelection=!0);let o=this.decorations,l=this.updateDeco(),c=zF(o,l,e.changes);return i=Gi.extendWithRanges(i,c),!(this.flags&7)&&i.length==0?!1:(this.updateInner(i,e.startState.doc.length,s),e.transactions.length&&(this.lastUpdate=Date.now()),!0)}updateInner(e,n,i){this.view.viewState.mustMeasureContent=!0,this.updateChildren(e,n,i);let{observer:r}=this.view;r.ignore(()=>{this.dom.style.height=this.view.viewState.contentHeight/this.view.scaleY+"px",this.dom.style.flexBasis=this.minWidth?this.minWidth+"px":"";let o=Se.chrome||Se.ios?{node:r.selectionRange.focusNode,written:!1}:void 0;this.sync(this.view,o),this.flags&=-8,o&&(o.written||r.selectionRange.focusNode!=o.node)&&(this.forceSelection=!0),this.dom.style.height=""}),this.markedForComposition.forEach(o=>o.flags&=-9);let s=[];if(this.view.viewport.from||this.view.viewport.to<this.view.state.doc.length)for(let o of this.children)o instanceof Cs&&o.widget instanceof Q1&&s.push(o.dom);r.updateGaps(s)}updateChildren(e,n,i){let r=i?i.range.addToSet(e.slice()):e,s=this.childCursor(n);for(let o=r.length-1;;o--){let l=o>=0?r[o]:null;if(!l)break;let{fromA:c,toA:h,fromB:d,toB:p}=l,g,O,x,S;if(i&&i.range.fromB<p&&i.range.toB>d){let R=Zh.build(this.view.state.doc,d,i.range.fromB,this.decorations,this.dynamicDecorationMap),$=Zh.build(this.view.state.doc,i.range.toB,p,this.decorations,this.dynamicDecorationMap);O=R.breakAtStart,x=R.openStart,S=$.openEnd;let C=this.compositionView(i);$.breakAtStart?C.breakAfter=1:$.content.length&&C.merge(C.length,C.length,$.content[0],!1,$.openStart,0)&&(C.breakAfter=$.content[0].breakAfter,$.content.shift()),R.content.length&&C.merge(0,0,R.content[R.content.length-1],!0,0,R.openEnd)&&R.content.pop(),g=R.content.concat(C).concat($.content)}else({content:g,breakAtStart:O,openStart:x,openEnd:S}=Zh.build(this.view.state.doc,d,p,this.decorations,this.dynamicDecorationMap));let{i:_,off:k}=s.findPos(h,1),{i:P,off:Q}=s.findPos(c,-1);xM(this,P,Q,_,k,g,O,x,S)}i&&this.fixCompositionDOM(i)}updateEditContextFormatting(e){this.editContextFormatting=this.editContextFormatting.map(e.changes);for(let n of e.transactions)for(let i of n.effects)i.is(IM)&&(this.editContextFormatting=i.value)}compositionView(e){let n=new fr(e.text.nodeValue);n.flags|=8;for(let{deco:r}of e.marks)n=new Ls(r,[n],n.length);let i=new Yt;return i.append(n,0),i}fixCompositionDOM(e){let n=(s,o)=>{o.flags|=8|(o.children.some(c=>c.flags&7)?1:0),this.markedForComposition.add(o);let l=yt.get(s);l&&l!=o&&(l.dom=null),o.setDOM(s)},i=this.childPos(e.range.fromB,1),r=this.children[i.i];n(e.line,r);for(let s=e.marks.length-1;s>=-1;s--)i=r.childPos(i.off,1),r=r.children[i.i],n(s>=0?e.marks[s].node:e.text,r)}updateSelection(e=!1,n=!1){(e||!this.view.observer.selectionRange.focusNode)&&this.view.observer.readSelectionRange();let i=this.view.root.activeElement,r=i==this.dom,s=!r&&!(this.view.state.facet(ks)||this.dom.tabIndex>-1)&&vm(this.dom,this.view.observer.selectionRange)&&!(i&&this.dom.contains(i));if(!(r||n||s))return;let o=this.forceSelection;this.forceSelection=!1;let l=this.view.state.selection.main,c=this.moveToLine(this.domAtPos(l.anchor)),h=l.empty?c:this.moveToLine(this.domAtPos(l.head));if(Se.gecko&&l.empty&&!this.hasComposition&&MF(c)){let p=document.createTextNode("");this.view.observer.ignore(()=>c.node.insertBefore(p,c.node.childNodes[c.offset]||null)),c=h=new wn(p,0),o=!0}let d=this.view.observer.selectionRange;(o||!d.focusNode||(!Bh(c.node,c.offset,d.anchorNode,d.anchorOffset)||!Bh(h.node,h.offset,d.focusNode,d.focusOffset))&&!this.suppressWidgetCursorChange(d,l))&&(this.view.observer.ignore(()=>{Se.android&&Se.chrome&&this.dom.contains(d.focusNode)&&IF(d.focusNode,this.dom)&&(this.dom.blur(),this.dom.focus({preventScroll:!0}));let p=gf(this.view.root);if(p)if(l.empty){if(Se.gecko){let g=jF(c.node,c.offset);if(g&&g!=3){let O=(g==1?OM:yM)(c.node,c.offset);O&&(c=new wn(O.node,O.offset))}}p.collapse(c.node,c.offset),l.bidiLevel!=null&&p.caretBidiLevel!==void 0&&(p.caretBidiLevel=l.bidiLevel)}else if(p.extend){p.collapse(c.node,c.offset);try{p.extend(h.node,h.offset)}catch{}}else{let g=document.createRange();l.anchor>l.head&&([c,h]=[h,c]),g.setEnd(h.node,h.offset),g.setStart(c.node,c.offset),p.removeAllRanges(),p.addRange(g)}s&&this.view.root.activeElement==this.dom&&(this.dom.blur(),i&&i.focus())}),this.view.observer.setSelectionRange(c,h)),this.impreciseAnchor=c.precise?null:new wn(d.anchorNode,d.anchorOffset),this.impreciseHead=h.precise?null:new wn(d.focusNode,d.focusOffset)}suppressWidgetCursorChange(e,n){return this.hasComposition&&n.empty&&Bh(e.focusNode,e.focusOffset,e.anchorNode,e.anchorOffset)&&this.posFromDOM(e.focusNode,e.focusOffset)==n.head}enforceCursorAssoc(){if(this.hasComposition)return;let{view:e}=this,n=e.state.selection.main,i=gf(e.root),{anchorNode:r,anchorOffset:s}=e.observer.selectionRange;if(!i||!n.empty||!n.assoc||!i.modify)return;let o=Yt.find(this,n.head);if(!o)return;let l=o.posAtStart;if(n.head==l||n.head==l+o.length)return;let c=this.coordsAt(n.head,-1),h=this.coordsAt(n.head,1);if(!c||!h||c.bottom>h.top)return;let d=this.domAtPos(n.head+n.assoc);i.collapse(d.node,d.offset),i.modify("move",n.assoc<0?"forward":"backward","lineboundary"),e.observer.readSelectionRange();let p=e.observer.selectionRange;e.docView.posFromDOM(p.anchorNode,p.anchorOffset)!=n.from&&i.collapse(r,s)}moveToLine(e){let n=this.dom,i;if(e.node!=n)return e;for(let r=e.offset;!i&&r<n.childNodes.length;r++){let s=yt.get(n.childNodes[r]);s instanceof Yt&&(i=s.domAtPos(0))}for(let r=e.offset-1;!i&&r>=0;r--){let s=yt.get(n.childNodes[r]);s instanceof Yt&&(i=s.domAtPos(s.length))}return i?new wn(i.node,i.offset,!0):e}nearest(e){for(let n=e;n;){let i=yt.get(n);if(i&&i.rootView==this)return i;n=n.parentNode}return null}posFromDOM(e,n){let i=this.nearest(e);if(!i)throw new RangeError("Trying to find position for a DOM position outside of the document");return i.localPosFromDOM(e,n)+i.posAtStart}domAtPos(e){let{i:n,off:i}=this.childCursor().findPos(e,-1);for(;n<this.children.length-1;){let r=this.children[n];if(i<r.length||r instanceof Yt)break;n++,i=0}return this.children[n].domAtPos(i)}coordsAt(e,n){let i=null,r=0;for(let s=this.length,o=this.children.length-1;o>=0;o--){let l=this.children[o],c=s-l.breakAfter,h=c-l.length;if(c<e)break;if(h<=e&&(h<e||l.covers(-1))&&(c>e||l.covers(1))&&(!i||l instanceof Yt&&!(i instanceof Yt&&n>=0)))i=l,r=h;else if(i&&h==e&&c==e&&l instanceof Cs&&Math.abs(n)<2){if(l.deco.startSide<0)break;o&&(i=null)}s=h}return i?i.coordsAt(e-r,n):null}coordsForChar(e){let{i:n,off:i}=this.childPos(e,1),r=this.children[n];if(!(r instanceof Yt))return null;for(;r.children.length;){let{i:l,off:c}=r.childPos(i,1);for(;;l++){if(l==r.children.length)return null;if((r=r.children[l]).length)break}i=c}if(!(r instanceof fr))return null;let s=yn(r.text,i);if(s==i)return null;let o=Ja(r.dom,i,s).getClientRects();for(let l=0;l<o.length;l++){let c=o[l];if(l==o.length-1||c.top<c.bottom&&c.left<c.right)return c}return null}measureVisibleLineHeights(e){let n=[],{from:i,to:r}=e,s=this.view.contentDOM.clientWidth,o=s>Math.max(this.view.scrollDOM.clientWidth,this.minWidth)+1,l=-1,c=this.view.textDirection==Ct.LTR;for(let h=0,d=0;d<this.children.length;d++){let p=this.children[d],g=h+p.length;if(g>r)break;if(h>=i){let O=p.dom.getBoundingClientRect();if(n.push(O.height),o){let x=p.dom.lastChild,S=x?Zc(x):[];if(S.length){let _=S[S.length-1],k=c?_.right-O.left:O.right-_.left;k>l&&(l=k,this.minWidth=s,this.minWidthFrom=h,this.minWidthTo=g)}}}h=g+p.breakAfter}return n}textDirectionAt(e){let{i:n}=this.childPos(e,1);return getComputedStyle(this.children[n].dom).direction=="rtl"?Ct.RTL:Ct.LTR}measureTextSize(){for(let s of this.children)if(s instanceof Yt){let o=s.measureTextSize();if(o)return o}let e=document.createElement("div"),n,i,r;return e.className="cm-line",e.style.width="99999px",e.style.position="absolute",e.textContent="abc def ghi jkl mno pqr stu",this.view.observer.ignore(()=>{this.dom.appendChild(e);let s=Zc(e.firstChild)[0];n=e.getBoundingClientRect().height,i=s?s.width/27:7,r=s?s.height:n,e.remove()}),{lineHeight:n,charWidth:i,textHeight:r}}childCursor(e=this.length){let n=this.children.length;return n&&(e-=this.children[--n].length),new bM(this.children,e,n)}computeBlockGapDeco(){let e=[],n=this.view.viewState;for(let i=0,r=0;;r++){let s=r==n.viewports.length?null:n.viewports[r],o=s?s.from-1:this.length;if(o>i){let l=(n.lineBlockAt(o).bottom-n.lineBlockAt(i).top)/this.view.scaleY;e.push(ke.replace({widget:new Q1(l),block:!0,inclusive:!0,isBlockGap:!0}).range(i,o))}if(!s)break;i=s.to+1}return ke.set(e)}updateDeco(){let e=1,n=this.view.state.facet(Of).map(s=>(this.dynamicDecorationMap[e++]=typeof s=="function")?s(this.view):s),i=!1,r=this.view.state.facet(VM).map((s,o)=>{let l=typeof s=="function";return l&&(i=!0),l?s(this.view):s});for(r.length&&(this.dynamicDecorationMap[e++]=i,n.push(rt.join(r))),this.decorations=[this.editContextFormatting,...n,this.computeBlockGapDeco(),this.view.viewState.lineGapDeco];e<this.decorations.length;)this.dynamicDecorationMap[e++]=!1;return this.decorations}scrollIntoView(e){if(e.isSnapshot){let h=this.view.viewState.lineBlockAt(e.range.head);this.view.scrollDOM.scrollTop=h.top-e.yMargin,this.view.scrollDOM.scrollLeft=e.xMargin;return}for(let h of this.view.state.facet(zM))try{if(h(this.view,e.range,e))return!0}catch(d){ni(this.view.state,d,"scroll handler")}let{range:n}=e,i=this.coordsAt(n.head,n.empty?n.assoc:n.head>n.anchor?-1:1),r;if(!i)return;!n.empty&&(r=this.coordsAt(n.anchor,n.anchor>n.head?-1:1))&&(i={left:Math.min(i.left,r.left),top:Math.min(i.top,r.top),right:Math.max(i.right,r.right),bottom:Math.max(i.bottom,r.bottom)});let s=_S(this.view),o={left:i.left-s.left,top:i.top-s.top,right:i.right+s.right,bottom:i.bottom+s.bottom},{offsetWidth:l,offsetHeight:c}=this.view.scrollDOM;pF(this.view.scrollDOM,o,n.head<n.anchor?-1:1,e.x,e.y,Math.max(Math.min(e.xMargin,l),-l),Math.max(Math.min(e.yMargin,c),-c),this.view.textDirection==Ct.LTR)}lineHasWidget(e){let{i:n}=this.childCursor().findPos(e);if(n==this.children.length)return!1;let i=r=>r instanceof Ps||r.children.some(i);return i(this.children[n])}}function MF(t){return t.node.nodeType==1&&t.node.firstChild&&(t.offset==0||t.node.childNodes[t.offset-1].contentEditable=="false")&&(t.offset==t.node.childNodes.length||t.node.childNodes[t.offset].contentEditable=="false")}function qM(t,e){let n=t.observer.selectionRange;if(!n.focusNode)return null;let i=OM(n.focusNode,n.focusOffset),r=yM(n.focusNode,n.focusOffset),s=i||r;if(r&&i&&r.node!=i.node){let l=yt.get(r.node);if(!l||l instanceof fr&&l.text!=r.node.nodeValue)s=r;else if(t.docView.lastCompositionAfterCursor){let c=yt.get(i.node);!c||c instanceof fr&&c.text!=i.node.nodeValue||(s=r)}}if(t.docView.lastCompositionAfterCursor=s!=i,!s)return null;let o=e-s.offset;return{from:o,to:o+s.node.nodeValue.length,node:s.node}}function DF(t,e,n){let i=qM(t,n);if(!i)return null;let{node:r,from:s,to:o}=i,l=r.nodeValue;if(/[\n\r]/.test(l)||t.state.doc.sliceString(i.from,i.to)!=l)return null;let c=e.invertedDesc,h=new Gi(c.mapPos(s),c.mapPos(o),s,o),d=[];for(let p=r.parentNode;;p=p.parentNode){let g=yt.get(p);if(g instanceof Ls)d.push({node:p,deco:g.mark});else{if(g instanceof Yt||p.nodeName=="DIV"&&p.parentNode==t.contentDOM)return{range:h,text:r,marks:d,line:p};if(p!=t.contentDOM)d.push({node:p,deco:new Wf({inclusive:!0,attributes:_F(p),tagName:p.tagName.toLowerCase()})});else return null}}}function jF(t,e){return t.nodeType!=1?0:(e&&t.childNodes[e-1].contentEditable=="false"?1:0)|(e<t.childNodes.length&&t.childNodes[e].contentEditable=="false"?2:0)}let NF=class{constructor(){this.changes=[]}compareRange(e,n){Sm(e,n,this.changes)}comparePoint(e,n){Sm(e,n,this.changes)}boundChange(e){Sm(e,e,this.changes)}};function zF(t,e,n){let i=new NF;return rt.compare(t,e,n,i),i.changes}function IF(t,e){for(let n=t;n&&n!=e;n=n.assignedSlot||n.parentNode)if(n.nodeType==1&&n.contentEditable=="false")return!0;return!1}function XF(t,e){let n=!1;return e&&t.iterChangedRanges((i,r)=>{i<e.to&&r>e.from&&(n=!0)}),n}function VF(t,e,n=1){let i=t.charCategorizer(e),r=t.doc.lineAt(e),s=e-r.from;if(r.length==0)return ae.cursor(e);s==0?n=1:s==r.length&&(n=-1);let o=s,l=s;n<0?o=yn(r.text,s,!1):l=yn(r.text,s);let c=i(r.text.slice(o,l));for(;o>0;){let h=yn(r.text,o,!1);if(i(r.text.slice(h,o))!=c)break;o=h}for(;l<r.length;){let h=yn(r.text,l);if(i(r.text.slice(l,h))!=c)break;l=h}return ae.range(o+r.from,l+r.from)}function BF(t,e){return e.left>t?e.left-t:Math.max(0,t-e.right)}function ZF(t,e){return e.top>t?e.top-t:Math.max(0,t-e.bottom)}function Ab(t,e){return t.top<e.bottom-1&&t.bottom>e.top+1}function JC(t,e){return e<t.top?{top:e,left:t.left,right:t.right,bottom:t.bottom}:t}function eE(t,e){return e>t.bottom?{top:t.top,left:t.left,right:t.right,bottom:e}:t}function $1(t,e,n){let i,r,s,o,l=!1,c,h,d,p;for(let x=t.firstChild;x;x=x.nextSibling){let S=Zc(x);for(let _=0;_<S.length;_++){let k=S[_];r&&Ab(r,k)&&(k=JC(eE(k,r.bottom),r.top));let P=BF(e,k),Q=ZF(n,k);if(P==0&&Q==0)return x.nodeType==3?tE(x,e,n):$1(x,e,n);(!i||o>Q||o==Q&&s>P)&&(i=x,r=k,s=P,o=Q,l=P?e<k.left?_>0:_<S.length-1:!0),P==0?n>k.bottom&&(!d||d.bottom<k.bottom)?(c=x,d=k):n<k.top&&(!p||p.top>k.top)&&(h=x,p=k):d&&Ab(d,k)?d=eE(d,k.bottom):p&&Ab(p,k)&&(p=JC(p,k.top))}}if(d&&d.bottom>=n?(i=c,r=d):p&&p.top<=n&&(i=h,r=p),!i)return{node:t,offset:0};let g=Math.max(r.left,Math.min(r.right,e));if(i.nodeType==3)return tE(i,g,n);if(l&&i.contentEditable!="false")return $1(i,g,n);let O=Array.prototype.indexOf.call(t.childNodes,i)+(e>=(r.left+r.right)/2?1:0);return{node:t,offset:O}}function tE(t,e,n){let i=t.nodeValue.length,r=-1,s=1e9,o=0;for(let l=0;l<i;l++){let c=Ja(t,l,l+1).getClientRects();for(let h=0;h<c.length;h++){let d=c[h];if(d.top==d.bottom)continue;o||(o=e-d.left);let p=(d.top>n?d.top-n:n-d.bottom)-1;if(d.left-1<=e&&d.right+1>=e&&p<s){let g=e>=(d.left+d.right)/2,O=g;if(Se.chrome||Se.gecko){let x=Ja(t,l).getBoundingClientRect();Math.abs(x.left-d.right)<.1&&(O=!g)}if(p<=0)return{node:t,offset:l+(O?1:0)};r=l+(O?1:0),s=p}}}return{node:t,offset:r>-1?r:o>0?t.nodeValue.length:0}}function UM(t,e,n,i=-1){var r,s;let o=t.contentDOM.getBoundingClientRect(),l=o.top+t.viewState.paddingTop,c,{docHeight:h}=t.viewState,{x:d,y:p}=e,g=p-l;if(g<0)return 0;if(g>h)return t.state.doc.length;for(let R=t.viewState.heightOracle.textHeight/2,$=!1;c=t.elementAtHeight(g),c.type!=zn.Text;)for(;g=i>0?c.bottom+R:c.top-R,!(g>=0&&g<=h);){if($)return n?null:0;$=!0,i=-i}p=l+g;let O=c.from;if(O<t.viewport.from)return t.viewport.from==0?0:n?null:nE(t,o,c,d,p);if(O>t.viewport.to)return t.viewport.to==t.state.doc.length?t.state.doc.length:n?null:nE(t,o,c,d,p);let x=t.dom.ownerDocument,S=t.root.elementFromPoint?t.root:x,_=S.elementFromPoint(d,p);_&&!t.contentDOM.contains(_)&&(_=null),_||(d=Math.max(o.left+1,Math.min(o.right-1,d)),_=S.elementFromPoint(d,p),_&&!t.contentDOM.contains(_)&&(_=null));let k,P=-1;if(_&&((r=t.docView.nearest(_))===null||r===void 0?void 0:r.isEditable)!=!1){if(x.caretPositionFromPoint){let R=x.caretPositionFromPoint(d,p);R&&({offsetNode:k,offset:P}=R)}else if(x.caretRangeFromPoint){let R=x.caretRangeFromPoint(d,p);R&&({startContainer:k,startOffset:P}=R)}k&&(!t.contentDOM.contains(k)||Se.safari&&qF(k,P,d)||Se.chrome&&UF(k,P,d))&&(k=void 0),k&&(P=Math.min(Ir(k),P))}if(!k||!t.docView.dom.contains(k)){let R=Yt.find(t.docView,O);if(!R)return g>c.top+c.height/2?c.to:c.from;({node:k,offset:P}=$1(R.dom,d,p))}let Q=t.docView.nearest(k);if(!Q)return null;if(Q.isWidget&&((s=Q.dom)===null||s===void 0?void 0:s.nodeType)==1){let R=Q.dom.getBoundingClientRect();return e.y<R.top||e.y<=R.bottom&&e.x<=(R.left+R.right)/2?Q.posAtStart:Q.posAtEnd}else return Q.localPosFromDOM(k,P)+Q.posAtStart}function nE(t,e,n,i,r){let s=Math.round((i-e.left)*t.defaultCharacterWidth);if(t.lineWrapping&&n.height>t.defaultLineHeight*1.5){let l=t.viewState.heightOracle.textHeight,c=Math.floor((r-n.top-(t.defaultLineHeight-l)*.5)/l);s+=c*t.viewState.heightOracle.lineLength}let o=t.state.sliceDoc(n.from,n.to);return n.from+y1(o,s,t.state.tabSize)}function YM(t,e,n){let i,r=t;if(t.nodeType!=3||e!=(i=t.nodeValue.length))return!1;for(;;){let s=r.nextSibling;if(s){if(s.nodeName=="BR")break;return!1}else{let o=r.parentNode;if(!o||o.nodeName=="DIV")break;r=o}}return Ja(t,i-1,i).getBoundingClientRect().right>n}function qF(t,e,n){return YM(t,e,n)}function UF(t,e,n){if(e!=0)return YM(t,e,n);for(let r=t;;){let s=r.parentNode;if(!s||s.nodeType!=1||s.firstChild!=r)return!1;if(s.classList.contains("cm-line"))break;r=s}let i=t.nodeType==1?t.getBoundingClientRect():Ja(t,0,Math.max(t.nodeValue.length,1)).getBoundingClientRect();return n-i.left>5}function L1(t,e,n){let i=t.lineBlockAt(e);if(Array.isArray(i.type)){let r;for(let s of i.type){if(s.from>e)break;if(!(s.to<e)){if(s.from<e&&s.to>e)return s;(!r||s.type==zn.Text&&(r.type!=s.type||(n<0?s.from<e:s.to>e)))&&(r=s)}}return r||i}return i}function YF(t,e,n,i){let r=L1(t,e.head,e.assoc||-1),s=!i||r.type!=zn.Text||!(t.lineWrapping||r.widgetLineBreaks)?null:t.coordsAtPos(e.assoc<0&&e.head>r.from?e.head-1:e.head);if(s){let o=t.dom.getBoundingClientRect(),l=t.textDirectionAt(r.from),c=t.posAtCoords({x:n==(l==Ct.LTR)?o.right-1:o.left+1,y:(s.top+s.bottom)/2});if(c!=null)return ae.cursor(c,n?-1:1)}return ae.cursor(n?r.to:r.from,n?-1:1)}function iE(t,e,n,i){let r=t.state.doc.lineAt(e.head),s=t.bidiSpans(r),o=t.textDirectionAt(r.from);for(let l=e,c=null;;){let h=RF(r,s,o,l,n),d=EM;if(!h){if(r.number==(n?t.state.doc.lines:1))return l;d=`
398
+ `,r=t.state.doc.line(r.number+(n?1:-1)),s=t.bidiSpans(r),h=t.visualLineSide(r,!n)}if(c){if(!c(d))return l}else{if(!i)return h;c=i(d)}l=h}}function GF(t,e,n){let i=t.state.charCategorizer(e),r=i(n);return s=>{let o=i(s);return r==Rt.Space&&(r=o),r==o}}function WF(t,e,n,i){let r=e.head,s=n?1:-1;if(r==(n?t.state.doc.length:0))return ae.cursor(r,e.assoc);let o=e.goalColumn,l,c=t.contentDOM.getBoundingClientRect(),h=t.coordsAtPos(r,e.assoc||-1),d=t.documentTop;if(h)o==null&&(o=h.left-c.left),l=s<0?h.top:h.bottom;else{let O=t.viewState.lineBlockAt(r);o==null&&(o=Math.min(c.right-c.left,t.defaultCharacterWidth*(r-O.from))),l=(s<0?O.top:O.bottom)+d}let p=c.left+o,g=i??t.viewState.heightOracle.textHeight>>1;for(let O=0;;O+=10){let x=l+(g+O)*s,S=UM(t,{x:p,y:x},!1,s);if(x<c.top||x>c.bottom||(s<0?S<r:S>r)){let _=t.docView.coordsForChar(S),k=!_||x<_.top?-1:1;return ae.cursor(S,k,void 0,o)}}}function qh(t,e,n){for(;;){let i=0;for(let r of t)r.between(e-1,e+1,(s,o,l)=>{if(e>s&&e<o){let c=i||n||(e-s<o-e?-1:1);e=c<0?s:o,i=c}});if(!i)return e}}function GM(t,e){let n=null;for(let i=0;i<e.ranges.length;i++){let r=e.ranges[i],s=null;if(r.empty){let o=qh(t,r.from,0);o!=r.from&&(s=ae.cursor(o,-1))}else{let o=qh(t,r.from,-1),l=qh(t,r.to,1);(o!=r.from||l!=r.to)&&(s=ae.range(r.from==r.anchor?o:l,r.from==r.head?o:l))}s&&(n||(n=e.ranges.slice()),n[i]=s)}return n?ae.create(n,e.mainIndex):e}function Rb(t,e,n){let i=qh(t.state.facet(Ff).map(r=>r(t)),n.from,e.head>n.from?-1:1);return i==n.from?n:ae.cursor(i,i<n.from?1:-1)}const Qh="￿";class HF{constructor(e,n){this.points=e,this.text="",this.lineSeparator=n.facet(Ue.lineSeparator)}append(e){this.text+=e}lineBreak(){this.text+=Qh}readRange(e,n){if(!e)return this;let i=e.parentNode;for(let r=e;;){this.findPointBefore(i,r);let s=this.text.length;this.readNode(r);let o=r.nextSibling;if(o==n)break;let l=yt.get(r),c=yt.get(o);(l&&c?l.breakAfter:(l?l.breakAfter:cg(r))||cg(o)&&(r.nodeName!="BR"||r.cmIgnore)&&this.text.length>s)&&!KF(o,n)&&this.lineBreak(),r=o}return this.findPointBefore(i,n),this}readTextNode(e){let n=e.nodeValue;for(let i of this.points)i.node==e&&(i.pos=this.text.length+Math.min(i.offset,n.length));for(let i=0,r=this.lineSeparator?null:/\r\n?|\n/g;;){let s=-1,o=1,l;if(this.lineSeparator?(s=n.indexOf(this.lineSeparator,i),o=this.lineSeparator.length):(l=r.exec(n))&&(s=l.index,o=l[0].length),this.append(n.slice(i,s<0?n.length:s)),s<0)break;if(this.lineBreak(),o>1)for(let c of this.points)c.node==e&&c.pos>this.text.length&&(c.pos-=o-1);i=s+o}}readNode(e){if(e.cmIgnore)return;let n=yt.get(e),i=n&&n.overrideDOMText;if(i!=null){this.findPointInside(e,i.length);for(let r=i.iter();!r.next().done;)r.lineBreak?this.lineBreak():this.append(r.value)}else e.nodeType==3?this.readTextNode(e):e.nodeName=="BR"?e.nextSibling&&this.lineBreak():e.nodeType==1&&this.readRange(e.firstChild,null)}findPointBefore(e,n){for(let i of this.points)i.node==e&&e.childNodes[i.offset]==n&&(i.pos=this.text.length)}findPointInside(e,n){for(let i of this.points)(e.nodeType==3?i.node==e:e.contains(i.node))&&(i.pos=this.text.length+(FF(e,i.node,i.offset)?n:0))}}function FF(t,e,n){for(;;){if(!e||n<Ir(e))return!1;if(e==t)return!0;n=Ka(e)+1,e=e.parentNode}}function KF(t,e){let n;for(;!(t==e||!t);t=t.nextSibling){let i=yt.get(t);if(!(i!=null&&i.isWidget||t.cmIgnore))return!1;i&&(n||(n=[])).push(i)}if(n)for(let i of n){let r=i.overrideDOMText;if(r!=null&&r.length)return!1}return!0}class rE{constructor(e,n){this.node=e,this.offset=n,this.pos=-1}}class JF{constructor(e,n,i,r){this.typeOver=r,this.bounds=null,this.text="",this.domChanged=n>-1;let{impreciseHead:s,impreciseAnchor:o}=e.docView;if(e.state.readOnly&&n>-1)this.newSel=null;else if(n>-1&&(this.bounds=e.docView.domBoundsAround(n,i,0))){let l=s||o?[]:tK(e),c=new HF(l,e.state);c.readRange(this.bounds.startDOM,this.bounds.endDOM),this.text=c.text,this.newSel=nK(l,this.bounds.from)}else{let l=e.observer.selectionRange,c=s&&s.node==l.focusNode&&s.offset==l.focusOffset||!w1(e.contentDOM,l.focusNode)?e.state.selection.main.head:e.docView.posFromDOM(l.focusNode,l.focusOffset),h=o&&o.node==l.anchorNode&&o.offset==l.anchorOffset||!w1(e.contentDOM,l.anchorNode)?e.state.selection.main.anchor:e.docView.posFromDOM(l.anchorNode,l.anchorOffset),d=e.viewport;if((Se.ios||Se.chrome)&&e.state.selection.main.empty&&c!=h&&(d.from>0||d.to<e.state.doc.length)){let p=Math.min(c,h),g=Math.max(c,h),O=d.from-p,x=d.to-g;(O==0||O==1||p==0)&&(x==0||x==-1||g==e.state.doc.length)&&(c=0,h=e.state.doc.length)}e.inputState.composing>-1&&e.state.selection.ranges.length>1?this.newSel=e.state.selection.replaceRange(ae.range(h,c)):this.newSel=ae.single(h,c)}}}function WM(t,e){let n,{newSel:i}=e,r=t.state.selection.main,s=t.inputState.lastKeyTime>Date.now()-100?t.inputState.lastKeyCode:-1;if(e.bounds){let{from:o,to:l}=e.bounds,c=r.from,h=null;(s===8||Se.android&&e.text.length<l-o)&&(c=r.to,h="end");let d=HM(t.state.doc.sliceString(o,l,Qh),e.text,c-o,h);d&&(Se.chrome&&s==13&&d.toB==d.from+2&&e.text.slice(d.from,d.toB)==Qh+Qh&&d.toB--,n={from:o+d.from,to:o+d.toA,insert:tt.of(e.text.slice(d.from,d.toB).split(Qh))})}else i&&(!t.hasFocus&&t.state.facet(ks)||i.main.eq(r))&&(i=null);if(!n&&!i)return!1;if(!n&&e.typeOver&&!r.empty&&i&&i.main.empty?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,r.to)}:(Se.mac||Se.android)&&n&&n.from==n.to&&n.from==r.head-1&&/^\. ?$/.test(n.insert.toString())&&t.contentDOM.getAttribute("autocorrect")=="off"?(i&&n.insert.length==2&&(i=ae.single(i.main.anchor-1,i.main.head-1)),n={from:n.from,to:n.to,insert:tt.of([n.insert.toString().replace("."," ")])}):n&&n.from>=r.from&&n.to<=r.to&&(n.from!=r.from||n.to!=r.to)&&r.to-r.from-(n.to-n.from)<=4?n={from:r.from,to:r.to,insert:t.state.doc.slice(r.from,n.from).append(n.insert).append(t.state.doc.slice(n.to,r.to))}:t.state.doc.lineAt(r.from).to<r.to&&t.docView.lineHasWidget(r.to)&&t.inputState.insertingTextAt>Date.now()-50?n={from:r.from,to:r.to,insert:t.state.toText(t.inputState.insertingText)}:Se.chrome&&n&&n.from==n.to&&n.from==r.head&&n.insert.toString()==`
399
+ `&&t.lineWrapping&&(i&&(i=ae.single(i.main.anchor-1,i.main.head-1)),n={from:r.from,to:r.to,insert:tt.of([" "])}),n)return kS(t,n,i,s);if(i&&!i.main.eq(r)){let o=!1,l="select";return t.inputState.lastSelectionTime>Date.now()-50&&(t.inputState.lastSelectionOrigin=="select"&&(o=!0),l=t.inputState.lastSelectionOrigin,l=="select.pointer"&&(i=GM(t.state.facet(Ff).map(c=>c(t)),i))),t.dispatch({selection:i,scrollIntoView:o,userEvent:l}),!0}else return!1}function kS(t,e,n,i=-1){if(Se.ios&&t.inputState.flushIOSKey(e))return!0;let r=t.state.selection.main;if(Se.android&&(e.to==r.to&&(e.from==r.from||e.from==r.from-1&&t.state.sliceDoc(e.from,r.from)==" ")&&e.insert.length==1&&e.insert.lines==2&&xc(t.contentDOM,"Enter",13)||(e.from==r.from-1&&e.to==r.to&&e.insert.length==0||i==8&&e.insert.length<e.to-e.from&&e.to>r.head)&&xc(t.contentDOM,"Backspace",8)||e.from==r.from&&e.to==r.to+1&&e.insert.length==0&&xc(t.contentDOM,"Delete",46)))return!0;let s=e.insert.toString();t.inputState.composing>=0&&t.inputState.composing++;let o,l=()=>o||(o=eK(t,e,n));return t.state.facet(MM).some(c=>c(t,e.from,e.to,s,l))||t.dispatch(l()),!0}function eK(t,e,n){let i,r=t.state,s=r.selection.main,o=-1;if(e.from==e.to&&e.from<s.from||e.from>s.to){let c=e.from<s.from?-1:1,h=c<0?s.from:s.to,d=qh(r.facet(Ff).map(p=>p(t)),h,c);e.from==d&&(o=d)}if(o>-1)i={changes:e,selection:ae.cursor(e.from+e.insert.length,-1)};else if(e.from>=s.from&&e.to<=s.to&&e.to-e.from>=(s.to-s.from)/3&&(!n||n.main.empty&&n.main.from==e.from+e.insert.length)&&t.inputState.composing<0){let c=s.from<e.from?r.sliceDoc(s.from,e.from):"",h=s.to>e.to?r.sliceDoc(e.to,s.to):"";i=r.replaceSelection(t.state.toText(c+e.insert.sliceString(0,void 0,t.state.lineBreak)+h))}else{let c=r.changes(e),h=n&&n.main.to<=c.newLength?n.main:void 0;if(r.selection.ranges.length>1&&(t.inputState.composing>=0||t.inputState.compositionPendingChange)&&e.to<=s.to+10&&e.to>=s.to-10){let d=t.state.sliceDoc(e.from,e.to),p,g=n&&qM(t,n.main.head);if(g){let x=e.insert.length-(e.to-e.from);p={from:g.from,to:g.to-x}}else p=t.state.doc.lineAt(s.head);let O=s.to-e.to;i=r.changeByRange(x=>{if(x.from==s.from&&x.to==s.to)return{changes:c,range:h||x.map(c)};let S=x.to-O,_=S-d.length;if(t.state.sliceDoc(_,S)!=d||S>=p.from&&_<=p.to)return{range:x};let k=r.changes({from:_,to:S,insert:e.insert}),P=x.to-s.to;return{changes:k,range:h?ae.range(Math.max(0,h.anchor+P),Math.max(0,h.head+P)):x.map(k)}})}else i={changes:c,selection:h&&r.selection.replaceRange(h)}}let l="input.type";return(t.composing||t.inputState.compositionPendingChange&&t.inputState.compositionEndedAt>Date.now()-50)&&(t.inputState.compositionPendingChange=!1,l+=".compose",t.inputState.compositionFirstChange&&(l+=".start",t.inputState.compositionFirstChange=!1)),r.update(i,{userEvent:l,scrollIntoView:!0})}function HM(t,e,n,i){let r=Math.min(t.length,e.length),s=0;for(;s<r&&t.charCodeAt(s)==e.charCodeAt(s);)s++;if(s==r&&t.length==e.length)return null;let o=t.length,l=e.length;for(;o>0&&l>0&&t.charCodeAt(o-1)==e.charCodeAt(l-1);)o--,l--;if(i=="end"){let c=Math.max(0,s-Math.min(o,l));n-=o+c-s}if(o<s&&t.length<e.length){let c=n<=s&&n>=o?s-n:0;s-=c,l=s+(l-o),o=s}else if(l<s){let c=n<=s&&n>=l?s-n:0;s-=c,o=s+(o-l),l=s}return{from:s,toA:o,toB:l}}function tK(t){let e=[];if(t.root.activeElement!=t.contentDOM)return e;let{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}=t.observer.selectionRange;return n&&(e.push(new rE(n,i)),(r!=n||s!=i)&&e.push(new rE(r,s))),e}function nK(t,e){if(t.length==0)return null;let n=t[0].pos,i=t.length==2?t[1].pos:n;return n>-1&&i>-1?ae.single(n+e,i+e):null}class iK{setSelectionOrigin(e){this.lastSelectionOrigin=e,this.lastSelectionTime=Date.now()}constructor(e){this.view=e,this.lastKeyCode=0,this.lastKeyTime=0,this.lastTouchTime=0,this.lastFocusTime=0,this.lastScrollTop=0,this.lastScrollLeft=0,this.pendingIOSKey=void 0,this.tabFocusMode=-1,this.lastSelectionOrigin=null,this.lastSelectionTime=0,this.lastContextMenu=0,this.scrollHandlers=[],this.handlers=Object.create(null),this.composing=-1,this.compositionFirstChange=null,this.compositionEndedAt=0,this.compositionPendingKey=!1,this.compositionPendingChange=!1,this.insertingText="",this.insertingTextAt=0,this.mouseSelection=null,this.draggedContent=null,this.handleEvent=this.handleEvent.bind(this),this.notifiedFocused=e.hasFocus,Se.safari&&e.contentDOM.addEventListener("input",()=>null),Se.gecko&&bK(e.contentDOM.ownerDocument)}handleEvent(e){!hK(this.view,e)||this.ignoreDuringComposition(e)||e.type=="keydown"&&this.keydown(e)||(this.view.updateState!=0?Promise.resolve().then(()=>this.runHandlers(e.type,e)):this.runHandlers(e.type,e))}runHandlers(e,n){let i=this.handlers[e];if(i){for(let r of i.observers)r(this.view,n);for(let r of i.handlers){if(n.defaultPrevented)break;if(r(this.view,n)){n.preventDefault();break}}}}ensureHandlers(e){let n=rK(e),i=this.handlers,r=this.view.contentDOM;for(let s in n)if(s!="scroll"){let o=!n[s].handlers.length,l=i[s];l&&o!=!l.handlers.length&&(r.removeEventListener(s,this.handleEvent),l=null),l||r.addEventListener(s,this.handleEvent,{passive:o})}for(let s in i)s!="scroll"&&!n[s]&&r.removeEventListener(s,this.handleEvent);this.handlers=n}keydown(e){if(this.lastKeyCode=e.keyCode,this.lastKeyTime=Date.now(),e.keyCode==9&&this.tabFocusMode>-1&&(!this.tabFocusMode||Date.now()<=this.tabFocusMode))return!0;if(this.tabFocusMode>0&&e.keyCode!=27&&KM.indexOf(e.keyCode)<0&&(this.tabFocusMode=-1),Se.android&&Se.chrome&&!e.synthetic&&(e.keyCode==13||e.keyCode==8))return this.view.observer.delayAndroidKey(e.key,e.keyCode),!0;let n;return Se.ios&&!e.synthetic&&!e.altKey&&!e.metaKey&&((n=FM.find(i=>i.keyCode==e.keyCode))&&!e.ctrlKey||sK.indexOf(e.key)>-1&&e.ctrlKey&&!e.shiftKey)?(this.pendingIOSKey=n||e,setTimeout(()=>this.flushIOSKey(),250),!0):(e.keyCode!=229&&this.view.observer.forceFlush(),!1)}flushIOSKey(e){let n=this.pendingIOSKey;return!n||n.key=="Enter"&&e&&e.from<e.to&&/^\S+$/.test(e.insert.toString())?!1:(this.pendingIOSKey=void 0,xc(this.view.contentDOM,n.key,n.keyCode,n instanceof KeyboardEvent?n:void 0))}ignoreDuringComposition(e){return!/^key/.test(e.type)||e.synthetic?!1:this.composing>0?!0:Se.safari&&!Se.ios&&this.compositionPendingKey&&Date.now()-this.compositionEndedAt<100?(this.compositionPendingKey=!1,!0):!1}startMouseSelection(e){this.mouseSelection&&this.mouseSelection.destroy(),this.mouseSelection=e}update(e){this.view.observer.update(e),this.mouseSelection&&this.mouseSelection.update(e),this.draggedContent&&e.docChanged&&(this.draggedContent=this.draggedContent.map(e.changes)),e.transactions.length&&(this.lastKeyCode=this.lastSelectionTime=0)}destroy(){this.mouseSelection&&this.mouseSelection.destroy()}}function sE(t,e){return(n,i)=>{try{return e.call(t,i,n)}catch(r){ni(n.state,r)}}}function rK(t){let e=Object.create(null);function n(i){return e[i]||(e[i]={observers:[],handlers:[]})}for(let i of t){let r=i.spec,s=r&&r.plugin.domEventHandlers,o=r&&r.plugin.domEventObservers;if(s)for(let l in s){let c=s[l];c&&n(l).handlers.push(sE(i.value,c))}if(o)for(let l in o){let c=o[l];c&&n(l).observers.push(sE(i.value,c))}}for(let i in dr)n(i).handlers.push(dr[i]);for(let i in Fi)n(i).observers.push(Fi[i]);return e}const FM=[{key:"Backspace",keyCode:8,inputType:"deleteContentBackward"},{key:"Enter",keyCode:13,inputType:"insertParagraph"},{key:"Enter",keyCode:13,inputType:"insertLineBreak"},{key:"Delete",keyCode:46,inputType:"deleteContentForward"}],sK="dthko",KM=[16,17,18,20,91,92,224,225],Bp=6;function Zp(t){return Math.max(0,t)*.7+8}function oK(t,e){return Math.max(Math.abs(t.clientX-e.clientX),Math.abs(t.clientY-e.clientY))}class aK{constructor(e,n,i,r){this.view=e,this.startEvent=n,this.style=i,this.mustSelect=r,this.scrollSpeed={x:0,y:0},this.scrolling=-1,this.lastEvent=n,this.scrollParents=mF(e.contentDOM),this.atoms=e.state.facet(Ff).map(o=>o(e));let s=e.contentDOM.ownerDocument;s.addEventListener("mousemove",this.move=this.move.bind(this)),s.addEventListener("mouseup",this.up=this.up.bind(this)),this.extend=n.shiftKey,this.multiple=e.state.facet(Ue.allowMultipleSelections)&&lK(e,n),this.dragging=uK(e,n)&&tD(n)==1?null:!1}start(e){this.dragging===!1&&this.select(e)}move(e){if(e.buttons==0)return this.destroy();if(this.dragging||this.dragging==null&&oK(this.startEvent,e)<10)return;this.select(this.lastEvent=e);let n=0,i=0,r=0,s=0,o=this.view.win.innerWidth,l=this.view.win.innerHeight;this.scrollParents.x&&({left:r,right:o}=this.scrollParents.x.getBoundingClientRect()),this.scrollParents.y&&({top:s,bottom:l}=this.scrollParents.y.getBoundingClientRect());let c=_S(this.view);e.clientX-c.left<=r+Bp?n=-Zp(r-e.clientX):e.clientX+c.right>=o-Bp&&(n=Zp(e.clientX-o)),e.clientY-c.top<=s+Bp?i=-Zp(s-e.clientY):e.clientY+c.bottom>=l-Bp&&(i=Zp(e.clientY-l)),this.setScrollSpeed(n,i)}up(e){this.dragging==null&&this.select(this.lastEvent),this.dragging||e.preventDefault(),this.destroy()}destroy(){this.setScrollSpeed(0,0);let e=this.view.contentDOM.ownerDocument;e.removeEventListener("mousemove",this.move),e.removeEventListener("mouseup",this.up),this.view.inputState.mouseSelection=this.view.inputState.draggedContent=null}setScrollSpeed(e,n){this.scrollSpeed={x:e,y:n},e||n?this.scrolling<0&&(this.scrolling=setInterval(()=>this.scroll(),50)):this.scrolling>-1&&(clearInterval(this.scrolling),this.scrolling=-1)}scroll(){let{x:e,y:n}=this.scrollSpeed;e&&this.scrollParents.x&&(this.scrollParents.x.scrollLeft+=e,e=0),n&&this.scrollParents.y&&(this.scrollParents.y.scrollTop+=n,n=0),(e||n)&&this.view.win.scrollBy(e,n),this.dragging===!1&&this.select(this.lastEvent)}select(e){let{view:n}=this,i=GM(this.atoms,this.style.get(e,this.extend,this.multiple));(this.mustSelect||!i.eq(n.state.selection,this.dragging===!1))&&this.view.dispatch({selection:i,userEvent:"select.pointer"}),this.mustSelect=!1}update(e){e.transactions.some(n=>n.isUserEvent("input.type"))?this.destroy():this.style.update(e)&&setTimeout(()=>this.select(this.lastEvent),20)}}function lK(t,e){let n=t.state.facet(AM);return n.length?n[0](e):Se.mac?e.metaKey:e.ctrlKey}function cK(t,e){let n=t.state.facet(RM);return n.length?n[0](e):Se.mac?!e.altKey:!e.ctrlKey}function uK(t,e){let{main:n}=t.state.selection;if(n.empty)return!1;let i=gf(t.root);if(!i||i.rangeCount==0)return!0;let r=i.getRangeAt(0).getClientRects();for(let s=0;s<r.length;s++){let o=r[s];if(o.left<=e.clientX&&o.right>=e.clientX&&o.top<=e.clientY&&o.bottom>=e.clientY)return!0}return!1}function hK(t,e){if(!e.bubbles)return!0;if(e.defaultPrevented)return!1;for(let n=e.target,i;n!=t.contentDOM;n=n.parentNode)if(!n||n.nodeType==11||(i=yt.get(n))&&i.ignoreEvent(e))return!1;return!0}const dr=Object.create(null),Fi=Object.create(null),JM=Se.ie&&Se.ie_version<15||Se.ios&&Se.webkit_version<604;function fK(t){let e=t.dom.parentNode;if(!e)return;let n=e.appendChild(document.createElement("textarea"));n.style.cssText="position: fixed; left: -10000px; top: 10px",n.focus(),setTimeout(()=>{t.focus(),n.remove(),eD(t,n.value)},50)}function oO(t,e,n){for(let i of t.facet(e))n=i(n,t);return n}function eD(t,e){e=oO(t.state,xS,e);let{state:n}=t,i,r=1,s=n.toText(e),o=s.lines==n.selection.ranges.length;if(M1!=null&&n.selection.ranges.every(c=>c.empty)&&M1==s.toString()){let c=-1;i=n.changeByRange(h=>{let d=n.doc.lineAt(h.from);if(d.from==c)return{range:h};c=d.from;let p=n.toText((o?s.line(r++).text:e)+n.lineBreak);return{changes:{from:d.from,insert:p},range:ae.cursor(h.from+p.length)}})}else o?i=n.changeByRange(c=>{let h=s.line(r++);return{changes:{from:c.from,to:c.to,insert:h.text},range:ae.cursor(c.from+h.length)}}):i=n.replaceSelection(s);t.dispatch(i,{userEvent:"input.paste",scrollIntoView:!0})}Fi.scroll=t=>{t.inputState.lastScrollTop=t.scrollDOM.scrollTop,t.inputState.lastScrollLeft=t.scrollDOM.scrollLeft};dr.keydown=(t,e)=>(t.inputState.setSelectionOrigin("select"),e.keyCode==27&&t.inputState.tabFocusMode!=0&&(t.inputState.tabFocusMode=Date.now()+2e3),!1);Fi.touchstart=(t,e)=>{t.inputState.lastTouchTime=Date.now(),t.inputState.setSelectionOrigin("select.pointer")};Fi.touchmove=t=>{t.inputState.setSelectionOrigin("select.pointer")};dr.mousedown=(t,e)=>{if(t.observer.flush(),t.inputState.lastTouchTime>Date.now()-2e3)return!1;let n=null;for(let i of t.state.facet($M))if(n=i(t,e),n)break;if(!n&&e.button==0&&(n=mK(t,e)),n){let i=!t.hasFocus;t.inputState.startMouseSelection(new aK(t,e,n,i)),i&&t.observer.ignore(()=>{pM(t.contentDOM);let s=t.root.activeElement;s&&!s.contains(t.contentDOM)&&s.blur()});let r=t.inputState.mouseSelection;if(r)return r.start(e),r.dragging===!1}else t.inputState.setSelectionOrigin("select.pointer");return!1};function oE(t,e,n,i){if(i==1)return ae.cursor(e,n);if(i==2)return VF(t.state,e,n);{let r=Yt.find(t.docView,e),s=t.state.doc.lineAt(r?r.posAtEnd:e),o=r?r.posAtStart:s.from,l=r?r.posAtEnd:s.to;return l<t.state.doc.length&&l==s.to&&l++,ae.range(o,l)}}let aE=(t,e,n)=>e>=n.top&&e<=n.bottom&&t>=n.left&&t<=n.right;function dK(t,e,n,i){let r=Yt.find(t.docView,e);if(!r)return 1;let s=e-r.posAtStart;if(s==0)return 1;if(s==r.length)return-1;let o=r.coordsAt(s,-1);if(o&&aE(n,i,o))return-1;let l=r.coordsAt(s,1);return l&&aE(n,i,l)?1:o&&o.bottom>=i?-1:1}function lE(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1);return{pos:n,bias:dK(t,n,e.clientX,e.clientY)}}const pK=Se.ie&&Se.ie_version<=11;let cE=null,uE=0,hE=0;function tD(t){if(!pK)return t.detail;let e=cE,n=hE;return cE=t,hE=Date.now(),uE=!e||n>Date.now()-400&&Math.abs(e.clientX-t.clientX)<2&&Math.abs(e.clientY-t.clientY)<2?(uE+1)%3:1}function mK(t,e){let n=lE(t,e),i=tD(e),r=t.state.selection;return{update(s){s.docChanged&&(n.pos=s.changes.mapPos(n.pos),r=r.map(s.changes))},get(s,o,l){let c=lE(t,s),h,d=oE(t,c.pos,c.bias,i);if(n.pos!=c.pos&&!o){let p=oE(t,n.pos,n.bias,i),g=Math.min(p.from,d.from),O=Math.max(p.to,d.to);d=g<d.from?ae.range(g,O):ae.range(O,g)}return o?r.replaceRange(r.main.extend(d.from,d.to)):l&&i==1&&r.ranges.length>1&&(h=gK(r,c.pos))?h:l?r.addRange(d):ae.create([d])}}}function gK(t,e){for(let n=0;n<t.ranges.length;n++){let{from:i,to:r}=t.ranges[n];if(i<=e&&r>=e)return ae.create(t.ranges.slice(0,n).concat(t.ranges.slice(n+1)),t.mainIndex==n?0:t.mainIndex-(t.mainIndex>n?1:0))}return null}dr.dragstart=(t,e)=>{let{selection:{main:n}}=t.state;if(e.target.draggable){let r=t.docView.nearest(e.target);if(r&&r.isWidget){let s=r.posAtStart,o=s+r.length;(s>=n.to||o<=n.from)&&(n=ae.range(s,o))}}let{inputState:i}=t;return i.mouseSelection&&(i.mouseSelection.dragging=!0),i.draggedContent=n,e.dataTransfer&&(e.dataTransfer.setData("Text",oO(t.state,vS,t.state.sliceDoc(n.from,n.to))),e.dataTransfer.effectAllowed="copyMove"),!1};dr.dragend=t=>(t.inputState.draggedContent=null,!1);function fE(t,e,n,i){if(n=oO(t.state,xS,n),!n)return;let r=t.posAtCoords({x:e.clientX,y:e.clientY},!1),{draggedContent:s}=t.inputState,o=i&&s&&cK(t,e)?{from:s.from,to:s.to}:null,l={from:r,insert:n},c=t.state.changes(o?[o,l]:l);t.focus(),t.dispatch({changes:c,selection:{anchor:c.mapPos(r,-1),head:c.mapPos(r,1)},userEvent:o?"move.drop":"input.drop"}),t.inputState.draggedContent=null}dr.drop=(t,e)=>{if(!e.dataTransfer)return!1;if(t.state.readOnly)return!0;let n=e.dataTransfer.files;if(n&&n.length){let i=Array(n.length),r=0,s=()=>{++r==n.length&&fE(t,e,i.filter(o=>o!=null).join(t.state.lineBreak),!1)};for(let o=0;o<n.length;o++){let l=new FileReader;l.onerror=s,l.onload=()=>{/[\x00-\x08\x0e-\x1f]{2}/.test(l.result)||(i[o]=l.result),s()},l.readAsText(n[o])}return!0}else{let i=e.dataTransfer.getData("Text");if(i)return fE(t,e,i,!0),!0}return!1};dr.paste=(t,e)=>{if(t.state.readOnly)return!0;t.observer.flush();let n=JM?null:e.clipboardData;return n?(eD(t,n.getData("text/plain")||n.getData("text/uri-list")),!0):(fK(t),!1)};function OK(t,e){let n=t.dom.parentNode;if(!n)return;let i=n.appendChild(document.createElement("textarea"));i.style.cssText="position: fixed; left: -10000px; top: 10px",i.value=e,i.focus(),i.selectionEnd=e.length,i.selectionStart=0,setTimeout(()=>{i.remove(),t.focus()},50)}function yK(t){let e=[],n=[],i=!1;for(let r of t.selection.ranges)r.empty||(e.push(t.sliceDoc(r.from,r.to)),n.push(r));if(!e.length){let r=-1;for(let{from:s}of t.selection.ranges){let o=t.doc.lineAt(s);o.number>r&&(e.push(o.text),n.push({from:o.from,to:Math.min(t.doc.length,o.to+1)})),r=o.number}i=!0}return{text:oO(t,vS,e.join(t.lineBreak)),ranges:n,linewise:i}}let M1=null;dr.copy=dr.cut=(t,e)=>{let{text:n,ranges:i,linewise:r}=yK(t.state);if(!n&&!r)return!1;M1=r?n:null,e.type=="cut"&&!t.state.readOnly&&t.dispatch({changes:i,scrollIntoView:!0,userEvent:"delete.cut"});let s=JM?null:e.clipboardData;return s?(s.clearData(),s.setData("text/plain",n),!0):(OK(t,n),!1)};const nD=qr.define();function iD(t,e){let n=[];for(let i of t.facet(DM)){let r=i(t,e);r&&n.push(r)}return n.length?t.update({effects:n,annotations:nD.of(!0)}):null}function rD(t){setTimeout(()=>{let e=t.hasFocus;if(e!=t.inputState.notifiedFocused){let n=iD(t.state,e);n?t.dispatch(n):t.update([])}},10)}Fi.focus=t=>{t.inputState.lastFocusTime=Date.now(),!t.scrollDOM.scrollTop&&(t.inputState.lastScrollTop||t.inputState.lastScrollLeft)&&(t.scrollDOM.scrollTop=t.inputState.lastScrollTop,t.scrollDOM.scrollLeft=t.inputState.lastScrollLeft),rD(t)};Fi.blur=t=>{t.observer.clearSelectionRange(),rD(t)};Fi.compositionstart=Fi.compositionupdate=t=>{t.observer.editContext||(t.inputState.compositionFirstChange==null&&(t.inputState.compositionFirstChange=!0),t.inputState.composing<0&&(t.inputState.composing=0))};Fi.compositionend=t=>{t.observer.editContext||(t.inputState.composing=-1,t.inputState.compositionEndedAt=Date.now(),t.inputState.compositionPendingKey=!0,t.inputState.compositionPendingChange=t.observer.pendingRecords().length>0,t.inputState.compositionFirstChange=null,Se.chrome&&Se.android?t.observer.flushSoon():t.inputState.compositionPendingChange?Promise.resolve().then(()=>t.observer.flush()):setTimeout(()=>{t.inputState.composing<0&&t.docView.hasComposition&&t.update([])},50))};Fi.contextmenu=t=>{t.inputState.lastContextMenu=Date.now()};dr.beforeinput=(t,e)=>{var n,i;if((e.inputType=="insertText"||e.inputType=="insertCompositionText")&&(t.inputState.insertingText=e.data,t.inputState.insertingTextAt=Date.now()),e.inputType=="insertReplacementText"&&t.observer.editContext){let s=(n=e.dataTransfer)===null||n===void 0?void 0:n.getData("text/plain"),o=e.getTargetRanges();if(s&&o.length){let l=o[0],c=t.posAtDOM(l.startContainer,l.startOffset),h=t.posAtDOM(l.endContainer,l.endOffset);return kS(t,{from:c,to:h,insert:t.state.toText(s)},null),!0}}let r;if(Se.chrome&&Se.android&&(r=FM.find(s=>s.inputType==e.inputType))&&(t.observer.delayAndroidKey(r.key,r.keyCode),r.key=="Backspace"||r.key=="Delete")){let s=((i=window.visualViewport)===null||i===void 0?void 0:i.height)||0;setTimeout(()=>{var o;(((o=window.visualViewport)===null||o===void 0?void 0:o.height)||0)>s+10&&t.hasFocus&&(t.contentDOM.blur(),t.focus())},100)}return Se.ios&&e.inputType=="deleteContentForward"&&t.observer.flushSoon(),Se.safari&&e.inputType=="insertText"&&t.inputState.composing>=0&&setTimeout(()=>Fi.compositionend(t,e),20),!1};const dE=new Set;function bK(t){dE.has(t)||(dE.add(t),t.addEventListener("copy",()=>{}),t.addEventListener("cut",()=>{}))}const pE=["pre-wrap","normal","pre-line","break-spaces"];let Yc=!1;function mE(){Yc=!1}class xK{constructor(e){this.lineWrapping=e,this.doc=tt.empty,this.heightSamples={},this.lineHeight=14,this.charWidth=7,this.textHeight=14,this.lineLength=30}heightForGap(e,n){let i=this.doc.lineAt(n).number-this.doc.lineAt(e).number+1;return this.lineWrapping&&(i+=Math.max(0,Math.ceil((n-e-i*this.lineLength*.5)/this.lineLength))),this.lineHeight*i}heightForLine(e){return this.lineWrapping?(1+Math.max(0,Math.ceil((e-this.lineLength)/Math.max(1,this.lineLength-5))))*this.lineHeight:this.lineHeight}setDoc(e){return this.doc=e,this}mustRefreshForWrapping(e){return pE.indexOf(e)>-1!=this.lineWrapping}mustRefreshForHeights(e){let n=!1;for(let i=0;i<e.length;i++){let r=e[i];r<0?i++:this.heightSamples[Math.floor(r*10)]||(n=!0,this.heightSamples[Math.floor(r*10)]=!0)}return n}refresh(e,n,i,r,s,o){let l=pE.indexOf(e)>-1,c=Math.round(n)!=Math.round(this.lineHeight)||this.lineWrapping!=l;if(this.lineWrapping=l,this.lineHeight=n,this.charWidth=i,this.textHeight=r,this.lineLength=s,c){this.heightSamples={};for(let h=0;h<o.length;h++){let d=o[h];d<0?h++:this.heightSamples[Math.floor(d*10)]=!0}}return c}}class vK{constructor(e,n){this.from=e,this.heights=n,this.index=0}get more(){return this.index<this.heights.length}}class Lr{constructor(e,n,i,r,s){this.from=e,this.length=n,this.top=i,this.height=r,this._content=s}get type(){return typeof this._content=="number"?zn.Text:Array.isArray(this._content)?this._content:this._content.type}get to(){return this.from+this.length}get bottom(){return this.top+this.height}get widget(){return this._content instanceof qo?this._content.widget:null}get widgetLineBreaks(){return typeof this._content=="number"?this._content:0}join(e){let n=(Array.isArray(this._content)?this._content:[this]).concat(Array.isArray(e._content)?e._content:[e]);return new Lr(this.from,this.length+e.length,this.top,this.height+e.height,n)}}var Qt=(function(t){return t[t.ByPos=0]="ByPos",t[t.ByHeight=1]="ByHeight",t[t.ByPosNoHeight=2]="ByPosNoHeight",t})(Qt||(Qt={}));const _m=.001;class In{constructor(e,n,i=2){this.length=e,this.height=n,this.flags=i}get outdated(){return(this.flags&2)>0}set outdated(e){this.flags=(e?2:0)|this.flags&-3}setHeight(e){this.height!=e&&(Math.abs(this.height-e)>_m&&(Yc=!0),this.height=e)}replace(e,n,i){return In.of(i)}decomposeLeft(e,n){n.push(this)}decomposeRight(e,n){n.push(this)}applyChanges(e,n,i,r){let s=this,o=i.doc;for(let l=r.length-1;l>=0;l--){let{fromA:c,toA:h,fromB:d,toB:p}=r[l],g=s.lineAt(c,Qt.ByPosNoHeight,i.setDoc(n),0,0),O=g.to>=h?g:s.lineAt(h,Qt.ByPosNoHeight,i,0,0);for(p+=O.to-h,h=O.to;l>0&&g.from<=r[l-1].toA;)c=r[l-1].fromA,d=r[l-1].fromB,l--,c<g.from&&(g=s.lineAt(c,Qt.ByPosNoHeight,i,0,0));d+=g.from-c,c=g.from;let x=wS.build(i.setDoc(o),e,d,p);s=fg(s,s.replace(c,h,x))}return s.updateHeight(i,0)}static empty(){return new xi(0,0)}static of(e){if(e.length==1)return e[0];let n=0,i=e.length,r=0,s=0;for(;;)if(n==i)if(r>s*2){let l=e[n-1];l.break?e.splice(--n,1,l.left,null,l.right):e.splice(--n,1,l.left,l.right),i+=1+l.break,r-=l.size}else if(s>r*2){let l=e[i];l.break?e.splice(i,1,l.left,null,l.right):e.splice(i,1,l.left,l.right),i+=2+l.break,s-=l.size}else break;else if(r<s){let l=e[n++];l&&(r+=l.size)}else{let l=e[--i];l&&(s+=l.size)}let o=0;return e[n-1]==null?(o=1,n--):e[n]==null&&(o=1,i++),new SK(In.of(e.slice(0,n)),o,In.of(e.slice(i)))}}function fg(t,e){return t==e?t:(t.constructor!=e.constructor&&(Yc=!0),e)}In.prototype.size=1;class sD extends In{constructor(e,n,i){super(e,n),this.deco=i}blockAt(e,n,i,r){return new Lr(r,this.length,i,this.height,this.deco||0)}lineAt(e,n,i,r,s){return this.blockAt(0,i,r,s)}forEachLine(e,n,i,r,s,o){e<=s+this.length&&n>=s&&o(this.blockAt(0,i,r,s))}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more&&this.setHeight(r.heights[r.index++]),this.outdated=!1,this}toString(){return`block(${this.length})`}}class xi extends sD{constructor(e,n){super(e,n,null),this.collapsed=0,this.widgetHeight=0,this.breaks=0}blockAt(e,n,i,r){return new Lr(r,this.length,i,this.height,this.breaks)}replace(e,n,i){let r=i[0];return i.length==1&&(r instanceof xi||r instanceof mn&&r.flags&4)&&Math.abs(this.length-r.length)<10?(r instanceof mn?r=new xi(r.length,this.height):r.height=this.height,this.outdated||(r.outdated=!1),r):In.of(i)}updateHeight(e,n=0,i=!1,r){return r&&r.from<=n&&r.more?this.setHeight(r.heights[r.index++]):(i||this.outdated)&&this.setHeight(Math.max(this.widgetHeight,e.heightForLine(this.length-this.collapsed))+this.breaks*e.lineHeight),this.outdated=!1,this}toString(){return`line(${this.length}${this.collapsed?-this.collapsed:""}${this.widgetHeight?":"+this.widgetHeight:""})`}}class mn extends In{constructor(e){super(e,0)}heightMetrics(e,n){let i=e.doc.lineAt(n).number,r=e.doc.lineAt(n+this.length).number,s=r-i+1,o,l=0;if(e.lineWrapping){let c=Math.min(this.height,e.lineHeight*s);o=c/s,this.length>s+1&&(l=(this.height-c)/(this.length-s-1))}else o=this.height/s;return{firstLine:i,lastLine:r,perLine:o,perChar:l}}blockAt(e,n,i,r){let{firstLine:s,lastLine:o,perLine:l,perChar:c}=this.heightMetrics(n,r);if(n.lineWrapping){let h=r+(e<n.lineHeight?0:Math.round(Math.max(0,Math.min(1,(e-i)/this.height))*this.length)),d=n.doc.lineAt(h),p=l+d.length*c,g=Math.max(i,e-p/2);return new Lr(d.from,d.length,g,p,0)}else{let h=Math.max(0,Math.min(o-s,Math.floor((e-i)/l))),{from:d,length:p}=n.doc.line(s+h);return new Lr(d,p,i+l*h,l,0)}}lineAt(e,n,i,r,s){if(n==Qt.ByHeight)return this.blockAt(e,i,r,s);if(n==Qt.ByPosNoHeight){let{from:O,to:x}=i.doc.lineAt(e);return new Lr(O,x-O,0,0,0)}let{firstLine:o,perLine:l,perChar:c}=this.heightMetrics(i,s),h=i.doc.lineAt(e),d=l+h.length*c,p=h.number-o,g=r+l*p+c*(h.from-s-p);return new Lr(h.from,h.length,Math.max(r,Math.min(g,r+this.height-d)),d,0)}forEachLine(e,n,i,r,s,o){e=Math.max(e,s),n=Math.min(n,s+this.length);let{firstLine:l,perLine:c,perChar:h}=this.heightMetrics(i,s);for(let d=e,p=r;d<=n;){let g=i.doc.lineAt(d);if(d==e){let x=g.number-l;p+=c*x+h*(e-s-x)}let O=c+h*g.length;o(new Lr(g.from,g.length,p,O,0)),p+=O,d=g.to+1}}replace(e,n,i){let r=this.length-n;if(r>0){let s=i[i.length-1];s instanceof mn?i[i.length-1]=new mn(s.length+r):i.push(null,new mn(r-1))}if(e>0){let s=i[0];s instanceof mn?i[0]=new mn(e+s.length):i.unshift(new mn(e-1),null)}return In.of(i)}decomposeLeft(e,n){n.push(new mn(e-1),null)}decomposeRight(e,n){n.push(null,new mn(this.length-e-1))}updateHeight(e,n=0,i=!1,r){let s=n+this.length;if(r&&r.from<=n+this.length&&r.more){let o=[],l=Math.max(n,r.from),c=-1;for(r.from>n&&o.push(new mn(r.from-n-1).updateHeight(e,n));l<=s&&r.more;){let d=e.doc.lineAt(l).length;o.length&&o.push(null);let p=r.heights[r.index++];c==-1?c=p:Math.abs(p-c)>=_m&&(c=-2);let g=new xi(d,p);g.outdated=!1,o.push(g),l+=d+1}l<=s&&o.push(null,new mn(s-l).updateHeight(e,l));let h=In.of(o);return(c<0||Math.abs(h.height-this.height)>=_m||Math.abs(c-this.heightMetrics(e,n).perLine)>=_m)&&(Yc=!0),fg(this,h)}else(i||this.outdated)&&(this.setHeight(e.heightForGap(n,n+this.length)),this.outdated=!1);return this}toString(){return`gap(${this.length})`}}class SK extends In{constructor(e,n,i){super(e.length+n+i.length,e.height+i.height,n|(e.outdated||i.outdated?2:0)),this.left=e,this.right=i,this.size=e.size+i.size}get break(){return this.flags&1}blockAt(e,n,i,r){let s=i+this.left.height;return e<s?this.left.blockAt(e,n,i,r):this.right.blockAt(e,n,s,r+this.left.length+this.break)}lineAt(e,n,i,r,s){let o=r+this.left.height,l=s+this.left.length+this.break,c=n==Qt.ByHeight?e<o:e<l,h=c?this.left.lineAt(e,n,i,r,s):this.right.lineAt(e,n,i,o,l);if(this.break||(c?h.to<l:h.from>l))return h;let d=n==Qt.ByPosNoHeight?Qt.ByPosNoHeight:Qt.ByPos;return c?h.join(this.right.lineAt(l,d,i,o,l)):this.left.lineAt(l,d,i,r,s).join(h)}forEachLine(e,n,i,r,s,o){let l=r+this.left.height,c=s+this.left.length+this.break;if(this.break)e<c&&this.left.forEachLine(e,n,i,r,s,o),n>=c&&this.right.forEachLine(e,n,i,l,c,o);else{let h=this.lineAt(c,Qt.ByPos,i,r,s);e<h.from&&this.left.forEachLine(e,h.from-1,i,r,s,o),h.to>=e&&h.from<=n&&o(h),n>h.to&&this.right.forEachLine(h.to+1,n,i,l,c,o)}}replace(e,n,i){let r=this.left.length+this.break;if(n<r)return this.balanced(this.left.replace(e,n,i),this.right);if(e>this.left.length)return this.balanced(this.left,this.right.replace(e-r,n-r,i));let s=[];e>0&&this.decomposeLeft(e,s);let o=s.length;for(let l of i)s.push(l);if(e>0&&gE(s,o-1),n<this.length){let l=s.length;this.decomposeRight(n,s),gE(s,l)}return In.of(s)}decomposeLeft(e,n){let i=this.left.length;if(e<=i)return this.left.decomposeLeft(e,n);n.push(this.left),this.break&&(i++,e>=i&&n.push(null)),e>i&&this.right.decomposeLeft(e-i,n)}decomposeRight(e,n){let i=this.left.length,r=i+this.break;if(e>=r)return this.right.decomposeRight(e-r,n);e<i&&this.left.decomposeRight(e,n),this.break&&e<r&&n.push(null),n.push(this.right)}balanced(e,n){return e.size>2*n.size||n.size>2*e.size?In.of(this.break?[e,null,n]:[e,n]):(this.left=fg(this.left,e),this.right=fg(this.right,n),this.setHeight(e.height+n.height),this.outdated=e.outdated||n.outdated,this.size=e.size+n.size,this.length=e.length+this.break+n.length,this)}updateHeight(e,n=0,i=!1,r){let{left:s,right:o}=this,l=n+s.length+this.break,c=null;return r&&r.from<=n+s.length&&r.more?c=s=s.updateHeight(e,n,i,r):s.updateHeight(e,n,i),r&&r.from<=l+o.length&&r.more?c=o=o.updateHeight(e,l,i,r):o.updateHeight(e,l,i),c?this.balanced(s,o):(this.height=this.left.height+this.right.height,this.outdated=!1,this)}toString(){return this.left+(this.break?" ":"-")+this.right}}function gE(t,e){let n,i;t[e]==null&&(n=t[e-1])instanceof mn&&(i=t[e+1])instanceof mn&&t.splice(e-1,3,new mn(n.length+1+i.length))}const _K=5;class wS{constructor(e,n){this.pos=e,this.oracle=n,this.nodes=[],this.lineStart=-1,this.lineEnd=-1,this.covering=null,this.writtenTo=e}get isCovered(){return this.covering&&this.nodes[this.nodes.length-1]==this.covering}span(e,n){if(this.lineStart>-1){let i=Math.min(n,this.lineEnd),r=this.nodes[this.nodes.length-1];r instanceof xi?r.length+=i-this.pos:(i>this.pos||!this.isCovered)&&this.nodes.push(new xi(i-this.pos,-1)),this.writtenTo=i,n>i&&(this.nodes.push(null),this.writtenTo++,this.lineStart=-1)}this.pos=n}point(e,n,i){if(e<n||i.heightRelevant){let r=i.widget?i.widget.estimatedHeight:0,s=i.widget?i.widget.lineBreaks:0;r<0&&(r=this.oracle.lineHeight);let o=n-e;i.block?this.addBlock(new sD(o,r,i)):(o||s||r>=_K)&&this.addLineDeco(r,s,o)}else n>e&&this.span(e,n);this.lineEnd>-1&&this.lineEnd<this.pos&&(this.lineEnd=this.oracle.doc.lineAt(this.pos).to)}enterLine(){if(this.lineStart>-1)return;let{from:e,to:n}=this.oracle.doc.lineAt(this.pos);this.lineStart=e,this.lineEnd=n,this.writtenTo<e&&((this.writtenTo<e-1||this.nodes[this.nodes.length-1]==null)&&this.nodes.push(this.blankContent(this.writtenTo,e-1)),this.nodes.push(null)),this.pos>e&&this.nodes.push(new xi(this.pos-e,-1)),this.writtenTo=this.pos}blankContent(e,n){let i=new mn(n-e);return this.oracle.doc.lineAt(e).to==n&&(i.flags|=4),i}ensureLine(){this.enterLine();let e=this.nodes.length?this.nodes[this.nodes.length-1]:null;if(e instanceof xi)return e;let n=new xi(0,-1);return this.nodes.push(n),n}addBlock(e){this.enterLine();let n=e.deco;n&&n.startSide>0&&!this.isCovered&&this.ensureLine(),this.nodes.push(e),this.writtenTo=this.pos=this.pos+e.length,n&&n.endSide>0&&(this.covering=e)}addLineDeco(e,n,i){let r=this.ensureLine();r.length+=i,r.collapsed+=i,r.widgetHeight=Math.max(r.widgetHeight,e),r.breaks+=n,this.writtenTo=this.pos=this.pos+i}finish(e){let n=this.nodes.length==0?null:this.nodes[this.nodes.length-1];this.lineStart>-1&&!(n instanceof xi)&&!this.isCovered?this.nodes.push(new xi(0,-1)):(this.writtenTo<this.pos||n==null)&&this.nodes.push(this.blankContent(this.writtenTo,this.pos));let i=e;for(let r of this.nodes)r instanceof xi&&r.updateHeight(this.oracle,i),i+=r?r.length:1;return this.nodes}static build(e,n,i,r){let s=new wS(i,e);return rt.spans(n,i,r,s,0),s.finish(i)}}function kK(t,e,n){let i=new wK;return rt.compare(t,e,n,i,0),i.changes}class wK{constructor(){this.changes=[]}compareRange(){}comparePoint(e,n,i,r){(e<n||i&&i.heightRelevant||r&&r.heightRelevant)&&Sm(e,n,this.changes,5)}}function PK(t,e){let n=t.getBoundingClientRect(),i=t.ownerDocument,r=i.defaultView||window,s=Math.max(0,n.left),o=Math.min(r.innerWidth,n.right),l=Math.max(0,n.top),c=Math.min(r.innerHeight,n.bottom);for(let h=t.parentNode;h&&h!=i.body;)if(h.nodeType==1){let d=h,p=window.getComputedStyle(d);if((d.scrollHeight>d.clientHeight||d.scrollWidth>d.clientWidth)&&p.overflow!="visible"){let g=d.getBoundingClientRect();s=Math.max(s,g.left),o=Math.min(o,g.right),l=Math.max(l,g.top),c=Math.min(h==t.parentNode?r.innerHeight:c,g.bottom)}h=p.position=="absolute"||p.position=="fixed"?d.offsetParent:d.parentNode}else if(h.nodeType==11)h=h.host;else break;return{left:s-n.left,right:Math.max(s,o)-n.left,top:l-(n.top+e),bottom:Math.max(l,c)-(n.top+e)}}function TK(t){let e=t.getBoundingClientRect(),n=t.ownerDocument.defaultView||window;return e.left<n.innerWidth&&e.right>0&&e.top<n.innerHeight&&e.bottom>0}function QK(t,e){let n=t.getBoundingClientRect();return{left:0,right:n.right-n.left,top:e,bottom:n.bottom-(n.top+e)}}class $b{constructor(e,n,i,r){this.from=e,this.to=n,this.size=i,this.displaySize=r}static same(e,n){if(e.length!=n.length)return!1;for(let i=0;i<e.length;i++){let r=e[i],s=n[i];if(r.from!=s.from||r.to!=s.to||r.size!=s.size)return!1}return!0}draw(e,n){return ke.replace({widget:new CK(this.displaySize*(n?e.scaleY:e.scaleX),n)}).range(this.from,this.to)}}class CK extends Ti{constructor(e,n){super(),this.size=e,this.vertical=n}eq(e){return e.size==this.size&&e.vertical==this.vertical}toDOM(){let e=document.createElement("div");return this.vertical?e.style.height=this.size+"px":(e.style.width=this.size+"px",e.style.height="2px",e.style.display="inline-block"),e}get estimatedHeight(){return this.vertical?this.size:-1}}class OE{constructor(e){this.state=e,this.pixelViewport={left:0,right:window.innerWidth,top:0,bottom:0},this.inView=!0,this.paddingTop=0,this.paddingBottom=0,this.contentDOMWidth=0,this.contentDOMHeight=0,this.editorHeight=0,this.editorWidth=0,this.scrollTop=0,this.scrolledToBottom=!1,this.scaleX=1,this.scaleY=1,this.scrollAnchorPos=0,this.scrollAnchorHeight=-1,this.scaler=yE,this.scrollTarget=null,this.printing=!1,this.mustMeasureContent=!0,this.defaultTextDirection=Ct.LTR,this.visibleRanges=[],this.mustEnforceCursorAssoc=!1;let n=e.facet(SS).some(i=>typeof i!="function"&&i.class=="cm-lineWrapping");this.heightOracle=new xK(n),this.stateDeco=e.facet(Of).filter(i=>typeof i!="function"),this.heightMap=In.empty().applyChanges(this.stateDeco,tt.empty,this.heightOracle.setDoc(e.doc),[new Gi(0,0,0,e.doc.length)]);for(let i=0;i<2&&(this.viewport=this.getViewport(0,null),!!this.updateForViewport());i++);this.updateViewportLines(),this.lineGaps=this.ensureLineGaps([]),this.lineGapDeco=ke.set(this.lineGaps.map(i=>i.draw(this,!1))),this.computeVisibleRanges()}updateForViewport(){let e=[this.viewport],{main:n}=this.state.selection;for(let i=0;i<=1;i++){let r=i?n.head:n.anchor;if(!e.some(({from:s,to:o})=>r>=s&&r<=o)){let{from:s,to:o}=this.lineBlockAt(r);e.push(new qp(s,o))}}return this.viewports=e.sort((i,r)=>i.from-r.from),this.updateScaler()}updateScaler(){let e=this.scaler;return this.scaler=this.heightMap.height<=7e6?yE:new PS(this.heightOracle,this.heightMap,this.viewports),e.eq(this.scaler)?0:2}updateViewportLines(){this.viewportLines=[],this.heightMap.forEachLine(this.viewport.from,this.viewport.to,this.heightOracle.setDoc(this.state.doc),0,0,e=>{this.viewportLines.push(Ch(e,this.scaler))})}update(e,n=null){this.state=e.state;let i=this.stateDeco;this.stateDeco=this.state.facet(Of).filter(d=>typeof d!="function");let r=e.changedRanges,s=Gi.extendWithRanges(r,kK(i,this.stateDeco,e?e.changes:en.empty(this.state.doc.length))),o=this.heightMap.height,l=this.scrolledToBottom?null:this.scrollAnchorAt(this.scrollTop);mE(),this.heightMap=this.heightMap.applyChanges(this.stateDeco,e.startState.doc,this.heightOracle.setDoc(this.state.doc),s),(this.heightMap.height!=o||Yc)&&(e.flags|=2),l?(this.scrollAnchorPos=e.changes.mapPos(l.from,-1),this.scrollAnchorHeight=l.top):(this.scrollAnchorPos=-1,this.scrollAnchorHeight=o);let c=s.length?this.mapViewport(this.viewport,e.changes):this.viewport;(n&&(n.range.head<c.from||n.range.head>c.to)||!this.viewportIsAppropriate(c))&&(c=this.getViewport(0,n));let h=c.from!=this.viewport.from||c.to!=this.viewport.to;this.viewport=c,e.flags|=this.updateForViewport(),(h||!e.changes.empty||e.flags&2)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(this.mapLineGaps(this.lineGaps,e.changes))),e.flags|=this.computeVisibleRanges(e.changes),n&&(this.scrollTarget=n),!this.mustEnforceCursorAssoc&&e.selectionSet&&e.view.lineWrapping&&e.state.selection.main.empty&&e.state.selection.main.assoc&&!e.state.facet(NM)&&(this.mustEnforceCursorAssoc=!0)}measure(e){let n=e.contentDOM,i=window.getComputedStyle(n),r=this.heightOracle,s=i.whiteSpace;this.defaultTextDirection=i.direction=="rtl"?Ct.RTL:Ct.LTR;let o=this.heightOracle.mustRefreshForWrapping(s),l=n.getBoundingClientRect(),c=o||this.mustMeasureContent||this.contentDOMHeight!=l.height;this.contentDOMHeight=l.height,this.mustMeasureContent=!1;let h=0,d=0;if(l.width&&l.height){let{scaleX:R,scaleY:$}=dM(n,l);(R>.005&&Math.abs(this.scaleX-R)>.005||$>.005&&Math.abs(this.scaleY-$)>.005)&&(this.scaleX=R,this.scaleY=$,h|=16,o=c=!0)}let p=(parseInt(i.paddingTop)||0)*this.scaleY,g=(parseInt(i.paddingBottom)||0)*this.scaleY;(this.paddingTop!=p||this.paddingBottom!=g)&&(this.paddingTop=p,this.paddingBottom=g,h|=18),this.editorWidth!=e.scrollDOM.clientWidth&&(r.lineWrapping&&(c=!0),this.editorWidth=e.scrollDOM.clientWidth,h|=16);let O=e.scrollDOM.scrollTop*this.scaleY;this.scrollTop!=O&&(this.scrollAnchorHeight=-1,this.scrollTop=O),this.scrolledToBottom=gM(e.scrollDOM);let x=(this.printing?QK:PK)(n,this.paddingTop),S=x.top-this.pixelViewport.top,_=x.bottom-this.pixelViewport.bottom;this.pixelViewport=x;let k=this.pixelViewport.bottom>this.pixelViewport.top&&this.pixelViewport.right>this.pixelViewport.left;if(k!=this.inView&&(this.inView=k,k&&(c=!0)),!this.inView&&!this.scrollTarget&&!TK(e.dom))return 0;let P=l.width;if((this.contentDOMWidth!=P||this.editorHeight!=e.scrollDOM.clientHeight)&&(this.contentDOMWidth=l.width,this.editorHeight=e.scrollDOM.clientHeight,h|=16),c){let R=e.docView.measureVisibleLineHeights(this.viewport);if(r.mustRefreshForHeights(R)&&(o=!0),o||r.lineWrapping&&Math.abs(P-this.contentDOMWidth)>r.charWidth){let{lineHeight:$,charWidth:C,textHeight:D}=e.docView.measureTextSize();o=$>0&&r.refresh(s,$,C,D,Math.max(5,P/C),R),o&&(e.docView.minWidth=0,h|=16)}S>0&&_>0?d=Math.max(S,_):S<0&&_<0&&(d=Math.min(S,_)),mE();for(let $ of this.viewports){let C=$.from==this.viewport.from?R:e.docView.measureVisibleLineHeights($);this.heightMap=(o?In.empty().applyChanges(this.stateDeco,tt.empty,this.heightOracle,[new Gi(0,0,0,e.state.doc.length)]):this.heightMap).updateHeight(r,0,o,new vK($.from,C))}Yc&&(h|=2)}let Q=!this.viewportIsAppropriate(this.viewport,d)||this.scrollTarget&&(this.scrollTarget.range.head<this.viewport.from||this.scrollTarget.range.head>this.viewport.to);return Q&&(h&2&&(h|=this.updateScaler()),this.viewport=this.getViewport(d,this.scrollTarget),h|=this.updateForViewport()),(h&2||Q)&&this.updateViewportLines(),(this.lineGaps.length||this.viewport.to-this.viewport.from>4e3)&&this.updateLineGaps(this.ensureLineGaps(o?[]:this.lineGaps,e)),h|=this.computeVisibleRanges(),this.mustEnforceCursorAssoc&&(this.mustEnforceCursorAssoc=!1,e.docView.enforceCursorAssoc()),h}get visibleTop(){return this.scaler.fromDOM(this.pixelViewport.top)}get visibleBottom(){return this.scaler.fromDOM(this.pixelViewport.bottom)}getViewport(e,n){let i=.5-Math.max(-.5,Math.min(.5,e/1e3/2)),r=this.heightMap,s=this.heightOracle,{visibleTop:o,visibleBottom:l}=this,c=new qp(r.lineAt(o-i*1e3,Qt.ByHeight,s,0,0).from,r.lineAt(l+(1-i)*1e3,Qt.ByHeight,s,0,0).to);if(n){let{head:h}=n.range;if(h<c.from||h>c.to){let d=Math.min(this.editorHeight,this.pixelViewport.bottom-this.pixelViewport.top),p=r.lineAt(h,Qt.ByPos,s,0,0),g;n.y=="center"?g=(p.top+p.bottom)/2-d/2:n.y=="start"||n.y=="nearest"&&h<c.from?g=p.top:g=p.bottom-d,c=new qp(r.lineAt(g-1e3/2,Qt.ByHeight,s,0,0).from,r.lineAt(g+d+1e3/2,Qt.ByHeight,s,0,0).to)}}return c}mapViewport(e,n){let i=n.mapPos(e.from,-1),r=n.mapPos(e.to,1);return new qp(this.heightMap.lineAt(i,Qt.ByPos,this.heightOracle,0,0).from,this.heightMap.lineAt(r,Qt.ByPos,this.heightOracle,0,0).to)}viewportIsAppropriate({from:e,to:n},i=0){if(!this.inView)return!0;let{top:r}=this.heightMap.lineAt(e,Qt.ByPos,this.heightOracle,0,0),{bottom:s}=this.heightMap.lineAt(n,Qt.ByPos,this.heightOracle,0,0),{visibleTop:o,visibleBottom:l}=this;return(e==0||r<=o-Math.max(10,Math.min(-i,250)))&&(n==this.state.doc.length||s>=l+Math.max(10,Math.min(i,250)))&&r>o-2*1e3&&s<l+2*1e3}mapLineGaps(e,n){if(!e.length||n.empty)return e;let i=[];for(let r of e)n.touchesRange(r.from,r.to)||i.push(new $b(n.mapPos(r.from),n.mapPos(r.to),r.size,r.displaySize));return i}ensureLineGaps(e,n){let i=this.heightOracle.lineWrapping,r=i?1e4:2e3,s=r>>1,o=r<<1;if(this.defaultTextDirection!=Ct.LTR&&!i)return[];let l=[],c=(d,p,g,O)=>{if(p-d<s)return;let x=this.state.selection.main,S=[x.from];x.empty||S.push(x.to);for(let k of S)if(k>d&&k<p){c(d,k-10,g,O),c(k+10,p,g,O);return}let _=AK(e,k=>k.from>=g.from&&k.to<=g.to&&Math.abs(k.from-d)<s&&Math.abs(k.to-p)<s&&!S.some(P=>k.from<P&&k.to>P));if(!_){if(p<g.to&&n&&i&&n.visibleRanges.some(Q=>Q.from<=p&&Q.to>=p)){let Q=n.moveToLineBoundary(ae.cursor(p),!1,!0).head;Q>d&&(p=Q)}let k=this.gapSize(g,d,p,O),P=i||k<2e6?k:2e6;_=new $b(d,p,k,P)}l.push(_)},h=d=>{if(d.length<o||d.type!=zn.Text)return;let p=EK(d.from,d.to,this.stateDeco);if(p.total<o)return;let g=this.scrollTarget?this.scrollTarget.range.head:null,O,x;if(i){let S=r/this.heightOracle.lineLength*this.heightOracle.lineHeight,_,k;if(g!=null){let P=Yp(p,g),Q=((this.visibleBottom-this.visibleTop)/2+S)/d.height;_=P-Q,k=P+Q}else _=(this.visibleTop-d.top-S)/d.height,k=(this.visibleBottom-d.top+S)/d.height;O=Up(p,_),x=Up(p,k)}else{let S=p.total*this.heightOracle.charWidth,_=r*this.heightOracle.charWidth,k=0;if(S>2e6)for(let C of e)C.from>=d.from&&C.from<d.to&&C.size!=C.displaySize&&C.from*this.heightOracle.charWidth+k<this.pixelViewport.left&&(k=C.size-C.displaySize);let P=this.pixelViewport.left+k,Q=this.pixelViewport.right+k,R,$;if(g!=null){let C=Yp(p,g),D=((Q-P)/2+_)/S;R=C-D,$=C+D}else R=(P-_)/S,$=(Q+_)/S;O=Up(p,R),x=Up(p,$)}O>d.from&&c(d.from,O,d,p),x<d.to&&c(x,d.to,d,p)};for(let d of this.viewportLines)Array.isArray(d.type)?d.type.forEach(h):h(d);return l}gapSize(e,n,i,r){let s=Yp(r,i)-Yp(r,n);return this.heightOracle.lineWrapping?e.height*s:r.total*this.heightOracle.charWidth*s}updateLineGaps(e){$b.same(e,this.lineGaps)||(this.lineGaps=e,this.lineGapDeco=ke.set(e.map(n=>n.draw(this,this.heightOracle.lineWrapping))))}computeVisibleRanges(e){let n=this.stateDeco;this.lineGaps.length&&(n=n.concat(this.lineGapDeco));let i=[];rt.spans(n,this.viewport.from,this.viewport.to,{span(s,o){i.push({from:s,to:o})},point(){}},20);let r=0;if(i.length!=this.visibleRanges.length)r=12;else for(let s=0;s<i.length&&!(r&8);s++){let o=this.visibleRanges[s],l=i[s];(o.from!=l.from||o.to!=l.to)&&(r|=4,e&&e.mapPos(o.from,-1)==l.from&&e.mapPos(o.to,1)==l.to||(r|=8))}return this.visibleRanges=i,r}lineBlockAt(e){return e>=this.viewport.from&&e<=this.viewport.to&&this.viewportLines.find(n=>n.from<=e&&n.to>=e)||Ch(this.heightMap.lineAt(e,Qt.ByPos,this.heightOracle,0,0),this.scaler)}lineBlockAtHeight(e){return e>=this.viewportLines[0].top&&e<=this.viewportLines[this.viewportLines.length-1].bottom&&this.viewportLines.find(n=>n.top<=e&&n.bottom>=e)||Ch(this.heightMap.lineAt(this.scaler.fromDOM(e),Qt.ByHeight,this.heightOracle,0,0),this.scaler)}scrollAnchorAt(e){let n=this.lineBlockAtHeight(e+8);return n.from>=this.viewport.from||this.viewportLines[0].top-e>200?n:this.viewportLines[0]}elementAtHeight(e){return Ch(this.heightMap.blockAt(this.scaler.fromDOM(e),this.heightOracle,0,0),this.scaler)}get docHeight(){return this.scaler.toDOM(this.heightMap.height)}get contentHeight(){return this.docHeight+this.paddingTop+this.paddingBottom}}class qp{constructor(e,n){this.from=e,this.to=n}}function EK(t,e,n){let i=[],r=t,s=0;return rt.spans(n,t,e,{span(){},point(o,l){o>r&&(i.push({from:r,to:o}),s+=o-r),r=l}},20),r<e&&(i.push({from:r,to:e}),s+=e-r),{total:s,ranges:i}}function Up({total:t,ranges:e},n){if(n<=0)return e[0].from;if(n>=1)return e[e.length-1].to;let i=Math.floor(t*n);for(let r=0;;r++){let{from:s,to:o}=e[r],l=o-s;if(i<=l)return s+i;i-=l}}function Yp(t,e){let n=0;for(let{from:i,to:r}of t.ranges){if(e<=r){n+=e-i;break}n+=r-i}return n/t.total}function AK(t,e){for(let n of t)if(e(n))return n}const yE={toDOM(t){return t},fromDOM(t){return t},scale:1,eq(t){return t==this}};class PS{constructor(e,n,i){let r=0,s=0,o=0;this.viewports=i.map(({from:l,to:c})=>{let h=n.lineAt(l,Qt.ByPos,e,0,0).top,d=n.lineAt(c,Qt.ByPos,e,0,0).bottom;return r+=d-h,{from:l,to:c,top:h,bottom:d,domTop:0,domBottom:0}}),this.scale=(7e6-r)/(n.height-r);for(let l of this.viewports)l.domTop=o+(l.top-s)*this.scale,o=l.domBottom=l.domTop+(l.bottom-l.top),s=l.bottom}toDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.top)return r+(e-i)*this.scale;if(e<=s.bottom)return s.domTop+(e-s.top);i=s.bottom,r=s.domBottom}}fromDOM(e){for(let n=0,i=0,r=0;;n++){let s=n<this.viewports.length?this.viewports[n]:null;if(!s||e<s.domTop)return i+(e-r)/this.scale;if(e<=s.domBottom)return s.top+(e-s.domTop);i=s.bottom,r=s.domBottom}}eq(e){return e instanceof PS?this.scale==e.scale&&this.viewports.length==e.viewports.length&&this.viewports.every((n,i)=>n.from==e.viewports[i].from&&n.to==e.viewports[i].to):!1}}function Ch(t,e){if(e.scale==1)return t;let n=e.toDOM(t.top),i=e.toDOM(t.bottom);return new Lr(t.from,t.length,n,i-n,Array.isArray(t._content)?t._content.map(r=>Ch(r,e)):t._content)}const Gp=we.define({combine:t=>t.join(" ")}),D1=we.define({combine:t=>t.indexOf(!0)>-1}),j1=Bo.newName(),oD=Bo.newName(),aD=Bo.newName(),lD={"&light":"."+oD,"&dark":"."+aD};function N1(t,e,n){return new Bo(e,{finish(i){return/&/.test(i)?i.replace(/&\w*/,r=>{if(r=="&")return t;if(!n||!n[r])throw new RangeError(`Unsupported selector: ${r}`);return n[r]}):t+" "+i}})}const RK=N1("."+j1,{"&":{position:"relative !important",boxSizing:"border-box","&.cm-focused":{outline:"1px dotted #212121"},display:"flex !important",flexDirection:"column"},".cm-scroller":{display:"flex !important",alignItems:"flex-start !important",fontFamily:"monospace",lineHeight:1.4,height:"100%",overflowX:"auto",position:"relative",zIndex:0,overflowAnchor:"none"},".cm-content":{margin:0,flexGrow:2,flexShrink:0,display:"block",whiteSpace:"pre",wordWrap:"normal",boxSizing:"border-box",minHeight:"100%",padding:"4px 0",outline:"none","&[contenteditable=true]":{WebkitUserModify:"read-write-plaintext-only"}},".cm-lineWrapping":{whiteSpace_fallback:"pre-wrap",whiteSpace:"break-spaces",wordBreak:"break-word",overflowWrap:"anywhere",flexShrink:1},"&light .cm-content":{caretColor:"black"},"&dark .cm-content":{caretColor:"white"},".cm-line":{display:"block",padding:"0 2px 0 6px"},".cm-layer":{position:"absolute",left:0,top:0,contain:"size style","& > *":{position:"absolute"}},"&light .cm-selectionBackground":{background:"#d9d9d9"},"&dark .cm-selectionBackground":{background:"#222"},"&light.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#d7d4f0"},"&dark.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground":{background:"#233"},".cm-cursorLayer":{pointerEvents:"none"},"&.cm-focused > .cm-scroller > .cm-cursorLayer":{animation:"steps(1) cm-blink 1.2s infinite"},"@keyframes cm-blink":{"0%":{},"50%":{opacity:0},"100%":{}},"@keyframes cm-blink2":{"0%":{},"50%":{opacity:0},"100%":{}},".cm-cursor, .cm-dropCursor":{borderLeft:"1.2px solid black",marginLeft:"-0.6px",pointerEvents:"none"},".cm-cursor":{display:"none"},"&dark .cm-cursor":{borderLeftColor:"#ddd"},".cm-dropCursor":{position:"absolute"},"&.cm-focused > .cm-scroller > .cm-cursorLayer .cm-cursor":{display:"block"},".cm-iso":{unicodeBidi:"isolate"},".cm-announced":{position:"fixed",top:"-10000px"},"@media print":{".cm-announced":{display:"none"}},"&light .cm-activeLine":{backgroundColor:"#cceeff44"},"&dark .cm-activeLine":{backgroundColor:"#99eeff33"},"&light .cm-specialChar":{color:"red"},"&dark .cm-specialChar":{color:"#f78"},".cm-gutters":{flexShrink:0,display:"flex",height:"100%",boxSizing:"border-box",zIndex:200},".cm-gutters-before":{insetInlineStart:0},".cm-gutters-after":{insetInlineEnd:0},"&light .cm-gutters":{backgroundColor:"#f5f5f5",color:"#6c6c6c",border:"0px solid #ddd","&.cm-gutters-before":{borderRightWidth:"1px"},"&.cm-gutters-after":{borderLeftWidth:"1px"}},"&dark .cm-gutters":{backgroundColor:"#333338",color:"#ccc"},".cm-gutter":{display:"flex !important",flexDirection:"column",flexShrink:0,boxSizing:"border-box",minHeight:"100%",overflow:"hidden"},".cm-gutterElement":{boxSizing:"border-box"},".cm-lineNumbers .cm-gutterElement":{padding:"0 3px 0 5px",minWidth:"20px",textAlign:"right",whiteSpace:"nowrap"},"&light .cm-activeLineGutter":{backgroundColor:"#e2f2ff"},"&dark .cm-activeLineGutter":{backgroundColor:"#222227"},".cm-panels":{boxSizing:"border-box",position:"sticky",left:0,right:0,zIndex:300},"&light .cm-panels":{backgroundColor:"#f5f5f5",color:"black"},"&light .cm-panels-top":{borderBottom:"1px solid #ddd"},"&light .cm-panels-bottom":{borderTop:"1px solid #ddd"},"&dark .cm-panels":{backgroundColor:"#333338",color:"white"},".cm-dialog":{padding:"2px 19px 4px 6px",position:"relative","& label":{fontSize:"80%"}},".cm-dialog-close":{position:"absolute",top:"3px",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",fontSize:"14px",padding:"0"},".cm-tab":{display:"inline-block",overflow:"hidden",verticalAlign:"bottom"},".cm-widgetBuffer":{verticalAlign:"text-top",height:"1em",width:0,display:"inline"},".cm-placeholder":{color:"#888",display:"inline-block",verticalAlign:"top",userSelect:"none"},".cm-highlightSpace":{backgroundImage:"radial-gradient(circle at 50% 55%, #aaa 20%, transparent 5%)",backgroundPosition:"center"},".cm-highlightTab":{backgroundImage:`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="200" height="20"><path stroke="%23888" stroke-width="1" fill="none" d="M1 10H196L190 5M190 15L196 10M197 4L197 16"/></svg>')`,backgroundSize:"auto 100%",backgroundPosition:"right 90%",backgroundRepeat:"no-repeat"},".cm-trailingSpace":{backgroundColor:"#ff332255"},".cm-button":{verticalAlign:"middle",color:"inherit",fontSize:"70%",padding:".2em 1em",borderRadius:"1px"},"&light .cm-button":{backgroundImage:"linear-gradient(#eff1f5, #d9d9df)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#b4b4b4, #d0d3d6)"}},"&dark .cm-button":{backgroundImage:"linear-gradient(#393939, #111)",border:"1px solid #888","&:active":{backgroundImage:"linear-gradient(#111, #333)"}},".cm-textfield":{verticalAlign:"middle",color:"inherit",fontSize:"70%",border:"1px solid silver",padding:".2em .5em"},"&light .cm-textfield":{backgroundColor:"white"},"&dark .cm-textfield":{border:"1px solid #555",backgroundColor:"inherit"}},lD),$K={childList:!0,characterData:!0,subtree:!0,attributes:!0,characterDataOldValue:!0},Lb=Se.ie&&Se.ie_version<=11;class LK{constructor(e){this.view=e,this.active=!1,this.editContext=null,this.selectionRange=new gF,this.selectionChanged=!1,this.delayedFlush=-1,this.resizeTimeout=-1,this.queue=[],this.delayedAndroidKey=null,this.flushingAndroidKey=-1,this.lastChange=0,this.scrollTargets=[],this.intersection=null,this.resizeScroll=null,this.intersecting=!1,this.gapIntersection=null,this.gaps=[],this.printQuery=null,this.parentCheck=-1,this.dom=e.contentDOM,this.observer=new MutationObserver(n=>{for(let i of n)this.queue.push(i);(Se.ie&&Se.ie_version<=11||Se.ios&&e.composing)&&n.some(i=>i.type=="childList"&&i.removedNodes.length||i.type=="characterData"&&i.oldValue.length>i.target.nodeValue.length)?this.flushSoon():this.flush()}),window.EditContext&&Se.android&&e.constructor.EDIT_CONTEXT!==!1&&!(Se.chrome&&Se.chrome_version<126)&&(this.editContext=new DK(e),e.state.facet(ks)&&(e.contentDOM.editContext=this.editContext.editContext)),Lb&&(this.onCharData=n=>{this.queue.push({target:n.target,type:"characterData",oldValue:n.prevValue}),this.flushSoon()}),this.onSelectionChange=this.onSelectionChange.bind(this),this.onResize=this.onResize.bind(this),this.onPrint=this.onPrint.bind(this),this.onScroll=this.onScroll.bind(this),window.matchMedia&&(this.printQuery=window.matchMedia("print")),typeof ResizeObserver=="function"&&(this.resizeScroll=new ResizeObserver(()=>{var n;((n=this.view.docView)===null||n===void 0?void 0:n.lastUpdate)<Date.now()-75&&this.onResize()}),this.resizeScroll.observe(e.scrollDOM)),this.addWindowListeners(this.win=e.win),this.start(),typeof IntersectionObserver=="function"&&(this.intersection=new IntersectionObserver(n=>{this.parentCheck<0&&(this.parentCheck=setTimeout(this.listenForScroll.bind(this),1e3)),n.length>0&&n[n.length-1].intersectionRatio>0!=this.intersecting&&(this.intersecting=!this.intersecting,this.intersecting!=this.view.inView&&this.onScrollChanged(document.createEvent("Event")))},{threshold:[0,.001]}),this.intersection.observe(this.dom),this.gapIntersection=new IntersectionObserver(n=>{n.length>0&&n[n.length-1].intersectionRatio>0&&this.onScrollChanged(document.createEvent("Event"))},{})),this.listenForScroll(),this.readSelectionRange()}onScrollChanged(e){this.view.inputState.runHandlers("scroll",e),this.intersecting&&this.view.measure()}onScroll(e){this.intersecting&&this.flush(!1),this.editContext&&this.view.requestMeasure(this.editContext.measureReq),this.onScrollChanged(e)}onResize(){this.resizeTimeout<0&&(this.resizeTimeout=setTimeout(()=>{this.resizeTimeout=-1,this.view.requestMeasure()},50))}onPrint(e){(e.type=="change"||!e.type)&&!e.matches||(this.view.viewState.printing=!0,this.view.measure(),setTimeout(()=>{this.view.viewState.printing=!1,this.view.requestMeasure()},500))}updateGaps(e){if(this.gapIntersection&&(e.length!=this.gaps.length||this.gaps.some((n,i)=>n!=e[i]))){this.gapIntersection.disconnect();for(let n of e)this.gapIntersection.observe(n);this.gaps=e}}onSelectionChange(e){let n=this.selectionChanged;if(!this.readSelectionRange()||this.delayedAndroidKey)return;let{view:i}=this,r=this.selectionRange;if(i.state.facet(ks)?i.root.activeElement!=this.dom:!vm(this.dom,r))return;let s=r.anchorNode&&i.docView.nearest(r.anchorNode);if(s&&s.ignoreEvent(e)){n||(this.selectionChanged=!1);return}(Se.ie&&Se.ie_version<=11||Se.android&&Se.chrome)&&!i.state.selection.main.empty&&r.focusNode&&Bh(r.focusNode,r.focusOffset,r.anchorNode,r.anchorOffset)?this.flushSoon():this.flush(!1)}readSelectionRange(){let{view:e}=this,n=gf(e.root);if(!n)return!1;let i=Se.safari&&e.root.nodeType==11&&e.root.activeElement==this.dom&&MK(this.view,n)||n;if(!i||this.selectionRange.eq(i))return!1;let r=vm(this.dom,i);return r&&!this.selectionChanged&&e.inputState.lastFocusTime>Date.now()-200&&e.inputState.lastTouchTime<Date.now()-300&&yF(this.dom,i)?(this.view.inputState.lastFocusTime=0,e.docView.updateSelection(),!1):(this.selectionRange.setRange(i),r&&(this.selectionChanged=!0),!0)}setSelectionRange(e,n){this.selectionRange.set(e.node,e.offset,n.node,n.offset),this.selectionChanged=!1}clearSelectionRange(){this.selectionRange.set(null,0,null,0)}listenForScroll(){this.parentCheck=-1;let e=0,n=null;for(let i=this.dom;i;)if(i.nodeType==1)!n&&e<this.scrollTargets.length&&this.scrollTargets[e]==i?e++:n||(n=this.scrollTargets.slice(0,e)),n&&n.push(i),i=i.assignedSlot||i.parentNode;else if(i.nodeType==11)i=i.host;else break;if(e<this.scrollTargets.length&&!n&&(n=this.scrollTargets.slice(0,e)),n){for(let i of this.scrollTargets)i.removeEventListener("scroll",this.onScroll);for(let i of this.scrollTargets=n)i.addEventListener("scroll",this.onScroll)}}ignore(e){if(!this.active)return e();try{return this.stop(),e()}finally{this.start(),this.clear()}}start(){this.active||(this.observer.observe(this.dom,$K),Lb&&this.dom.addEventListener("DOMCharacterDataModified",this.onCharData),this.active=!0)}stop(){this.active&&(this.active=!1,this.observer.disconnect(),Lb&&this.dom.removeEventListener("DOMCharacterDataModified",this.onCharData))}clear(){this.processRecords(),this.queue.length=0,this.selectionChanged=!1}delayAndroidKey(e,n){var i;if(!this.delayedAndroidKey){let r=()=>{let s=this.delayedAndroidKey;s&&(this.clearDelayedAndroidKey(),this.view.inputState.lastKeyCode=s.keyCode,this.view.inputState.lastKeyTime=Date.now(),!this.flush()&&s.force&&xc(this.dom,s.key,s.keyCode))};this.flushingAndroidKey=this.view.win.requestAnimationFrame(r)}(!this.delayedAndroidKey||e=="Enter")&&(this.delayedAndroidKey={key:e,keyCode:n,force:this.lastChange<Date.now()-50||!!(!((i=this.delayedAndroidKey)===null||i===void 0)&&i.force)})}clearDelayedAndroidKey(){this.win.cancelAnimationFrame(this.flushingAndroidKey),this.delayedAndroidKey=null,this.flushingAndroidKey=-1}flushSoon(){this.delayedFlush<0&&(this.delayedFlush=this.view.win.requestAnimationFrame(()=>{this.delayedFlush=-1,this.flush()}))}forceFlush(){this.delayedFlush>=0&&(this.view.win.cancelAnimationFrame(this.delayedFlush),this.delayedFlush=-1),this.flush()}pendingRecords(){for(let e of this.observer.takeRecords())this.queue.push(e);return this.queue}processRecords(){let e=this.pendingRecords();e.length&&(this.queue=[]);let n=-1,i=-1,r=!1;for(let s of e){let o=this.readMutation(s);o&&(o.typeOver&&(r=!0),n==-1?{from:n,to:i}=o:(n=Math.min(o.from,n),i=Math.max(o.to,i)))}return{from:n,to:i,typeOver:r}}readChange(){let{from:e,to:n,typeOver:i}=this.processRecords(),r=this.selectionChanged&&vm(this.dom,this.selectionRange);if(e<0&&!r)return null;e>-1&&(this.lastChange=Date.now()),this.view.inputState.lastFocusTime=0,this.selectionChanged=!1;let s=new JF(this.view,e,n,i);return this.view.docView.domChanged={newSel:s.newSel?s.newSel.main:null},s}flush(e=!0){if(this.delayedFlush>=0||this.delayedAndroidKey)return!1;e&&this.readSelectionRange();let n=this.readChange();if(!n)return this.view.requestMeasure(),!1;let i=this.view.state,r=WM(this.view,n);return this.view.state==i&&(n.domChanged||n.newSel&&!n.newSel.main.eq(this.view.state.selection.main))&&this.view.update([]),r}readMutation(e){let n=this.view.docView.nearest(e.target);if(!n||n.ignoreMutation(e))return null;if(n.markDirty(e.type=="attributes"),e.type=="attributes"&&(n.flags|=4),e.type=="childList"){let i=bE(n,e.previousSibling||e.target.previousSibling,-1),r=bE(n,e.nextSibling||e.target.nextSibling,1);return{from:i?n.posAfter(i):n.posAtStart,to:r?n.posBefore(r):n.posAtEnd,typeOver:!1}}else return e.type=="characterData"?{from:n.posAtStart,to:n.posAtEnd,typeOver:e.target.nodeValue==e.oldValue}:null}setWindow(e){e!=this.win&&(this.removeWindowListeners(this.win),this.win=e,this.addWindowListeners(this.win))}addWindowListeners(e){e.addEventListener("resize",this.onResize),this.printQuery?this.printQuery.addEventListener?this.printQuery.addEventListener("change",this.onPrint):this.printQuery.addListener(this.onPrint):e.addEventListener("beforeprint",this.onPrint),e.addEventListener("scroll",this.onScroll),e.document.addEventListener("selectionchange",this.onSelectionChange)}removeWindowListeners(e){e.removeEventListener("scroll",this.onScroll),e.removeEventListener("resize",this.onResize),this.printQuery?this.printQuery.removeEventListener?this.printQuery.removeEventListener("change",this.onPrint):this.printQuery.removeListener(this.onPrint):e.removeEventListener("beforeprint",this.onPrint),e.document.removeEventListener("selectionchange",this.onSelectionChange)}update(e){this.editContext&&(this.editContext.update(e),e.startState.facet(ks)!=e.state.facet(ks)&&(e.view.contentDOM.editContext=e.state.facet(ks)?this.editContext.editContext:null))}destroy(){var e,n,i;this.stop(),(e=this.intersection)===null||e===void 0||e.disconnect(),(n=this.gapIntersection)===null||n===void 0||n.disconnect(),(i=this.resizeScroll)===null||i===void 0||i.disconnect();for(let r of this.scrollTargets)r.removeEventListener("scroll",this.onScroll);this.removeWindowListeners(this.win),clearTimeout(this.parentCheck),clearTimeout(this.resizeTimeout),this.win.cancelAnimationFrame(this.delayedFlush),this.win.cancelAnimationFrame(this.flushingAndroidKey),this.editContext&&(this.view.contentDOM.editContext=null,this.editContext.destroy())}}function bE(t,e,n){for(;e;){let i=yt.get(e);if(i&&i.parent==t)return i;let r=e.parentNode;e=r!=t.dom?r:n>0?e.nextSibling:e.previousSibling}return null}function xE(t,e){let n=e.startContainer,i=e.startOffset,r=e.endContainer,s=e.endOffset,o=t.docView.domAtPos(t.state.selection.main.anchor);return Bh(o.node,o.offset,r,s)&&([n,i,r,s]=[r,s,n,i]),{anchorNode:n,anchorOffset:i,focusNode:r,focusOffset:s}}function MK(t,e){if(e.getComposedRanges){let r=e.getComposedRanges(t.root)[0];if(r)return xE(t,r)}let n=null;function i(r){r.preventDefault(),r.stopImmediatePropagation(),n=r.getTargetRanges()[0]}return t.contentDOM.addEventListener("beforeinput",i,!0),t.dom.ownerDocument.execCommand("indent"),t.contentDOM.removeEventListener("beforeinput",i,!0),n?xE(t,n):null}class DK{constructor(e){this.from=0,this.to=0,this.pendingContextChange=null,this.handlers=Object.create(null),this.composing=null,this.resetRange(e.state);let n=this.editContext=new window.EditContext({text:e.state.doc.sliceString(this.from,this.to),selectionStart:this.toContextPos(Math.max(this.from,Math.min(this.to,e.state.selection.main.anchor))),selectionEnd:this.toContextPos(e.state.selection.main.head)});this.handlers.textupdate=i=>{let r=e.state.selection.main,{anchor:s,head:o}=r,l=this.toEditorPos(i.updateRangeStart),c=this.toEditorPos(i.updateRangeEnd);e.inputState.composing>=0&&!this.composing&&(this.composing={contextBase:i.updateRangeStart,editorBase:l,drifted:!1});let h=c-l>i.text.length;l==this.from&&s<this.from?l=s:c==this.to&&s>this.to&&(c=s);let d=HM(e.state.sliceDoc(l,c),i.text,(h?r.from:r.to)-l,h?"end":null);if(!d){let g=ae.single(this.toEditorPos(i.selectionStart),this.toEditorPos(i.selectionEnd));g.main.eq(r)||e.dispatch({selection:g,userEvent:"select"});return}let p={from:d.from+l,to:d.toA+l,insert:tt.of(i.text.slice(d.from,d.toB).split(`
400
+ `))};if((Se.mac||Se.android)&&p.from==o-1&&/^\. ?$/.test(i.text)&&e.contentDOM.getAttribute("autocorrect")=="off"&&(p={from:l,to:c,insert:tt.of([i.text.replace("."," ")])}),this.pendingContextChange=p,!e.state.readOnly){let g=this.to-this.from+(p.to-p.from+p.insert.length);kS(e,p,ae.single(this.toEditorPos(i.selectionStart,g),this.toEditorPos(i.selectionEnd,g)))}this.pendingContextChange&&(this.revertPending(e.state),this.setSelection(e.state)),p.from<p.to&&!p.insert.length&&e.inputState.composing>=0&&!/[\\p{Alphabetic}\\p{Number}_]/.test(n.text.slice(Math.max(0,i.updateRangeStart-1),Math.min(n.text.length,i.updateRangeStart+1)))&&this.handlers.compositionend(i)},this.handlers.characterboundsupdate=i=>{let r=[],s=null;for(let o=this.toEditorPos(i.rangeStart),l=this.toEditorPos(i.rangeEnd);o<l;o++){let c=e.coordsForChar(o);s=c&&new DOMRect(c.left,c.top,c.right-c.left,c.bottom-c.top)||s||new DOMRect,r.push(s)}n.updateCharacterBounds(i.rangeStart,r)},this.handlers.textformatupdate=i=>{let r=[];for(let s of i.getTextFormats()){let o=s.underlineStyle,l=s.underlineThickness;if(!/none/i.test(o)&&!/none/i.test(l)){let c=this.toEditorPos(s.rangeStart),h=this.toEditorPos(s.rangeEnd);if(c<h){let d=`text-decoration: underline ${/^[a-z]/.test(o)?o+" ":o=="Dashed"?"dashed ":o=="Squiggle"?"wavy ":""}${/thin/i.test(l)?1:2}px`;r.push(ke.mark({attributes:{style:d}}).range(c,h))}}}e.dispatch({effects:IM.of(ke.set(r))})},this.handlers.compositionstart=()=>{e.inputState.composing<0&&(e.inputState.composing=0,e.inputState.compositionFirstChange=!0)},this.handlers.compositionend=()=>{if(e.inputState.composing=-1,e.inputState.compositionFirstChange=null,this.composing){let{drifted:i}=this.composing;this.composing=null,i&&this.reset(e.state)}};for(let i in this.handlers)n.addEventListener(i,this.handlers[i]);this.measureReq={read:i=>{this.editContext.updateControlBounds(i.contentDOM.getBoundingClientRect());let r=gf(i.root);r&&r.rangeCount&&this.editContext.updateSelectionBounds(r.getRangeAt(0).getBoundingClientRect())}}}applyEdits(e){let n=0,i=!1,r=this.pendingContextChange;return e.changes.iterChanges((s,o,l,c,h)=>{if(i)return;let d=h.length-(o-s);if(r&&o>=r.to)if(r.from==s&&r.to==o&&r.insert.eq(h)){r=this.pendingContextChange=null,n+=d,this.to+=d;return}else r=null,this.revertPending(e.state);if(s+=n,o+=n,o<=this.from)this.from+=d,this.to+=d;else if(s<this.to){if(s<this.from||o>this.to||this.to-this.from+h.length>3e4){i=!0;return}this.editContext.updateText(this.toContextPos(s),this.toContextPos(o),h.toString()),this.to+=d}n+=d}),r&&!i&&this.revertPending(e.state),!i}update(e){let n=this.pendingContextChange,i=e.startState.selection.main;this.composing&&(this.composing.drifted||!e.changes.touchesRange(i.from,i.to)&&e.transactions.some(r=>!r.isUserEvent("input.type")&&r.changes.touchesRange(this.from,this.to)))?(this.composing.drifted=!0,this.composing.editorBase=e.changes.mapPos(this.composing.editorBase)):!this.applyEdits(e)||!this.rangeIsValid(e.state)?(this.pendingContextChange=null,this.reset(e.state)):(e.docChanged||e.selectionSet||n)&&this.setSelection(e.state),(e.geometryChanged||e.docChanged||e.selectionSet)&&e.view.requestMeasure(this.measureReq)}resetRange(e){let{head:n}=e.selection.main;this.from=Math.max(0,n-1e4),this.to=Math.min(e.doc.length,n+1e4)}reset(e){this.resetRange(e),this.editContext.updateText(0,this.editContext.text.length,e.doc.sliceString(this.from,this.to)),this.setSelection(e)}revertPending(e){let n=this.pendingContextChange;this.pendingContextChange=null,this.editContext.updateText(this.toContextPos(n.from),this.toContextPos(n.from+n.insert.length),e.doc.sliceString(n.from,n.to))}setSelection(e){let{main:n}=e.selection,i=this.toContextPos(Math.max(this.from,Math.min(this.to,n.anchor))),r=this.toContextPos(n.head);(this.editContext.selectionStart!=i||this.editContext.selectionEnd!=r)&&this.editContext.updateSelection(i,r)}rangeIsValid(e){let{head:n}=e.selection.main;return!(this.from>0&&n-this.from<500||this.to<e.doc.length&&this.to-n<500||this.to-this.from>1e4*3)}toEditorPos(e,n=this.to-this.from){e=Math.min(e,n);let i=this.composing;return i&&i.drifted?i.editorBase+(e-i.contextBase):e+this.from}toContextPos(e){let n=this.composing;return n&&n.drifted?n.contextBase+(e-n.editorBase):e-this.from}destroy(){for(let e in this.handlers)this.editContext.removeEventListener(e,this.handlers[e])}}class ye{get state(){return this.viewState.state}get viewport(){return this.viewState.viewport}get visibleRanges(){return this.viewState.visibleRanges}get inView(){return this.viewState.inView}get composing(){return!!this.inputState&&this.inputState.composing>0}get compositionStarted(){return!!this.inputState&&this.inputState.composing>=0}get root(){return this._root}get win(){return this.dom.ownerDocument.defaultView||window}constructor(e={}){var n;this.plugins=[],this.pluginMap=new Map,this.editorAttrs={},this.contentAttrs={},this.bidiCache=[],this.destroyed=!1,this.updateState=2,this.measureScheduled=-1,this.measureRequests=[],this.contentDOM=document.createElement("div"),this.scrollDOM=document.createElement("div"),this.scrollDOM.tabIndex=-1,this.scrollDOM.className="cm-scroller",this.scrollDOM.appendChild(this.contentDOM),this.announceDOM=document.createElement("div"),this.announceDOM.className="cm-announced",this.announceDOM.setAttribute("aria-live","polite"),this.dom=document.createElement("div"),this.dom.appendChild(this.announceDOM),this.dom.appendChild(this.scrollDOM),e.parent&&e.parent.appendChild(this.dom);let{dispatch:i}=e;this.dispatchTransactions=e.dispatchTransactions||i&&(r=>r.forEach(s=>i(s,this)))||(r=>this.update(r)),this.dispatch=this.dispatch.bind(this),this._root=e.root||OF(e.parent)||document,this.viewState=new OE(e.state||Ue.create(e)),e.scrollTo&&e.scrollTo.is(Vp)&&(this.viewState.scrollTarget=e.scrollTo.value.clip(this.viewState.state)),this.plugins=this.state.facet(hc).map(r=>new Eb(r));for(let r of this.plugins)r.update(this);this.observer=new LK(this),this.inputState=new iK(this),this.inputState.ensureHandlers(this.plugins),this.docView=new KC(this),this.mountStyles(),this.updateAttrs(),this.updateState=0,this.requestMeasure(),!((n=document.fonts)===null||n===void 0)&&n.ready&&document.fonts.ready.then(()=>this.requestMeasure())}dispatch(...e){let n=e.length==1&&e[0]instanceof Wt?e:e.length==1&&Array.isArray(e[0])?e[0]:[this.state.update(...e)];this.dispatchTransactions(n,this)}update(e){if(this.updateState!=0)throw new Error("Calls to EditorView.update are not allowed while an update is in progress");let n=!1,i=!1,r,s=this.state;for(let g of e){if(g.startState!=s)throw new RangeError("Trying to update state with a transaction that doesn't start from the previous state.");s=g.state}if(this.destroyed){this.viewState.state=s;return}let o=this.hasFocus,l=0,c=null;e.some(g=>g.annotation(nD))?(this.inputState.notifiedFocused=o,l=1):o!=this.inputState.notifiedFocused&&(this.inputState.notifiedFocused=o,c=iD(s,o),c||(l=1));let h=this.observer.delayedAndroidKey,d=null;if(h?(this.observer.clearDelayedAndroidKey(),d=this.observer.readChange(),(d&&!this.state.doc.eq(s.doc)||!this.state.selection.eq(s.selection))&&(d=null)):this.observer.clear(),s.facet(Ue.phrases)!=this.state.facet(Ue.phrases))return this.setState(s);r=hg.create(this,s,e),r.flags|=l;let p=this.viewState.scrollTarget;try{this.updateState=2;for(let g of e){if(p&&(p=p.map(g.changes)),g.scrollIntoView){let{main:O}=g.state.selection;p=new vc(O.empty?O:ae.cursor(O.head,O.head>O.anchor?-1:1))}for(let O of g.effects)O.is(Vp)&&(p=O.value.clip(this.state))}this.viewState.update(r,p),this.bidiCache=dg.update(this.bidiCache,r.changes),r.empty||(this.updatePlugins(r),this.inputState.update(r)),n=this.docView.update(r),this.state.facet(Th)!=this.styleModules&&this.mountStyles(),i=this.updateAttrs(),this.showAnnouncements(e),this.docView.updateSelection(n,e.some(g=>g.isUserEvent("select.pointer")))}finally{this.updateState=0}if(r.startState.facet(Gp)!=r.state.facet(Gp)&&(this.viewState.mustMeasureContent=!0),(n||i||p||this.viewState.mustEnforceCursorAssoc||this.viewState.mustMeasureContent)&&this.requestMeasure(),n&&this.docViewUpdate(),!r.empty)for(let g of this.state.facet(R1))try{g(r)}catch(O){ni(this.state,O,"update listener")}(c||d)&&Promise.resolve().then(()=>{c&&this.state==c.startState&&this.dispatch(c),d&&!WM(this,d)&&h.force&&xc(this.contentDOM,h.key,h.keyCode)})}setState(e){if(this.updateState!=0)throw new Error("Calls to EditorView.setState are not allowed while an update is in progress");if(this.destroyed){this.viewState.state=e;return}this.updateState=2;let n=this.hasFocus;try{for(let i of this.plugins)i.destroy(this);this.viewState=new OE(e),this.plugins=e.facet(hc).map(i=>new Eb(i)),this.pluginMap.clear();for(let i of this.plugins)i.update(this);this.docView.destroy(),this.docView=new KC(this),this.inputState.ensureHandlers(this.plugins),this.mountStyles(),this.updateAttrs(),this.bidiCache=[]}finally{this.updateState=0}n&&this.focus(),this.requestMeasure()}updatePlugins(e){let n=e.startState.facet(hc),i=e.state.facet(hc);if(n!=i){let r=[];for(let s of i){let o=n.indexOf(s);if(o<0)r.push(new Eb(s));else{let l=this.plugins[o];l.mustUpdate=e,r.push(l)}}for(let s of this.plugins)s.mustUpdate!=e&&s.destroy(this);this.plugins=r,this.pluginMap.clear()}else for(let r of this.plugins)r.mustUpdate=e;for(let r=0;r<this.plugins.length;r++)this.plugins[r].update(this);n!=i&&this.inputState.ensureHandlers(this.plugins)}docViewUpdate(){for(let e of this.plugins){let n=e.value;if(n&&n.docViewUpdate)try{n.docViewUpdate(this)}catch(i){ni(this.state,i,"doc view update listener")}}}measure(e=!0){if(this.destroyed)return;if(this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.observer.delayedAndroidKey){this.measureScheduled=-1,this.requestMeasure();return}this.measureScheduled=0,e&&this.observer.forceFlush();let n=null,i=this.scrollDOM,r=i.scrollTop*this.scaleY,{scrollAnchorPos:s,scrollAnchorHeight:o}=this.viewState;Math.abs(r-this.viewState.scrollTop)>1&&(o=-1),this.viewState.scrollAnchorHeight=-1;try{for(let l=0;;l++){if(o<0)if(gM(i))s=-1,o=this.viewState.heightMap.height;else{let O=this.viewState.scrollAnchorAt(r);s=O.from,o=O.top}this.updateState=1;let c=this.viewState.measure(this);if(!c&&!this.measureRequests.length&&this.viewState.scrollTarget==null)break;if(l>5){console.warn(this.measureRequests.length?"Measure loop restarted more than 5 times":"Viewport failed to stabilize");break}let h=[];c&4||([this.measureRequests,h]=[h,this.measureRequests]);let d=h.map(O=>{try{return O.read(this)}catch(x){return ni(this.state,x),vE}}),p=hg.create(this,this.state,[]),g=!1;p.flags|=c,n?n.flags|=c:n=p,this.updateState=2,p.empty||(this.updatePlugins(p),this.inputState.update(p),this.updateAttrs(),g=this.docView.update(p),g&&this.docViewUpdate());for(let O=0;O<h.length;O++)if(d[O]!=vE)try{let x=h[O];x.write&&x.write(d[O],this)}catch(x){ni(this.state,x)}if(g&&this.docView.updateSelection(!0),!p.viewportChanged&&this.measureRequests.length==0){if(this.viewState.editorHeight)if(this.viewState.scrollTarget){this.docView.scrollIntoView(this.viewState.scrollTarget),this.viewState.scrollTarget=null,o=-1;continue}else{let x=(s<0?this.viewState.heightMap.height:this.viewState.lineBlockAt(s).top)-o;if(x>1||x<-1){r=r+x,i.scrollTop=r/this.scaleY,o=-1;continue}}break}}}finally{this.updateState=0,this.measureScheduled=-1}if(n&&!n.empty)for(let l of this.state.facet(R1))l(n)}get themeClasses(){return j1+" "+(this.state.facet(D1)?aD:oD)+" "+this.state.facet(Gp)}updateAttrs(){let e=SE(this,XM,{class:"cm-editor"+(this.hasFocus?" cm-focused ":" ")+this.themeClasses}),n={spellcheck:"false",autocorrect:"off",autocapitalize:"off",writingsuggestions:"false",translate:"no",contenteditable:this.state.facet(ks)?"true":"false",class:"cm-content",style:`${Se.tabSize}: ${this.state.tabSize}`,role:"textbox","aria-multiline":"true"};this.state.readOnly&&(n["aria-readonly"]="true"),SE(this,SS,n);let i=this.observer.ignore(()=>{let r=T1(this.contentDOM,this.contentAttrs,n),s=T1(this.dom,this.editorAttrs,e);return r||s});return this.editorAttrs=e,this.contentAttrs=n,i}showAnnouncements(e){let n=!0;for(let i of e)for(let r of i.effects)if(r.is(ye.announce)){n&&(this.announceDOM.textContent=""),n=!1;let s=this.announceDOM.appendChild(document.createElement("div"));s.textContent=r.value}}mountStyles(){this.styleModules=this.state.facet(Th);let e=this.state.facet(ye.cspNonce);Bo.mount(this.root,this.styleModules.concat(RK).reverse(),e?{nonce:e}:void 0)}readMeasured(){if(this.updateState==2)throw new Error("Reading the editor layout isn't allowed during an update");this.updateState==0&&this.measureScheduled>-1&&this.measure(!1)}requestMeasure(e){if(this.measureScheduled<0&&(this.measureScheduled=this.win.requestAnimationFrame(()=>this.measure())),e){if(this.measureRequests.indexOf(e)>-1)return;if(e.key!=null){for(let n=0;n<this.measureRequests.length;n++)if(this.measureRequests[n].key===e.key){this.measureRequests[n]=e;return}}this.measureRequests.push(e)}}plugin(e){let n=this.pluginMap.get(e);return(n===void 0||n&&n.plugin!=e)&&this.pluginMap.set(e,n=this.plugins.find(i=>i.plugin==e)||null),n&&n.update(this).value}get documentTop(){return this.contentDOM.getBoundingClientRect().top+this.viewState.paddingTop}get documentPadding(){return{top:this.viewState.paddingTop,bottom:this.viewState.paddingBottom}}get scaleX(){return this.viewState.scaleX}get scaleY(){return this.viewState.scaleY}elementAtHeight(e){return this.readMeasured(),this.viewState.elementAtHeight(e)}lineBlockAtHeight(e){return this.readMeasured(),this.viewState.lineBlockAtHeight(e)}get viewportLineBlocks(){return this.viewState.viewportLines}lineBlockAt(e){return this.viewState.lineBlockAt(e)}get contentHeight(){return this.viewState.contentHeight}moveByChar(e,n,i){return Rb(this,e,iE(this,e,n,i))}moveByGroup(e,n){return Rb(this,e,iE(this,e,n,i=>GF(this,e.head,i)))}visualLineSide(e,n){let i=this.bidiSpans(e),r=this.textDirectionAt(e.from),s=i[n?i.length-1:0];return ae.cursor(s.side(n,r)+e.from,s.forward(!n,r)?1:-1)}moveToLineBoundary(e,n,i=!0){return YF(this,e,n,i)}moveVertically(e,n,i){return Rb(this,e,WF(this,e,n,i))}domAtPos(e){return this.docView.domAtPos(e)}posAtDOM(e,n=0){return this.docView.posFromDOM(e,n)}posAtCoords(e,n=!0){return this.readMeasured(),UM(this,e,n)}coordsAtPos(e,n=1){this.readMeasured();let i=this.docView.coordsAt(e,n);if(!i||i.left==i.right)return i;let r=this.state.doc.lineAt(e),s=this.bidiSpans(r),o=s[$o.find(s,e-r.from,-1,n)];return Gf(i,o.dir==Ct.LTR==n>0)}coordsForChar(e){return this.readMeasured(),this.docView.coordsForChar(e)}get defaultCharacterWidth(){return this.viewState.heightOracle.charWidth}get defaultLineHeight(){return this.viewState.heightOracle.lineHeight}get textDirection(){return this.viewState.defaultTextDirection}textDirectionAt(e){return!this.state.facet(jM)||e<this.viewport.from||e>this.viewport.to?this.textDirection:(this.readMeasured(),this.docView.textDirectionAt(e))}get lineWrapping(){return this.viewState.heightOracle.lineWrapping}bidiSpans(e){if(e.length>jK)return CM(e.length);let n=this.textDirectionAt(e.from),i;for(let s of this.bidiCache)if(s.from==e.from&&s.dir==n&&(s.fresh||QM(s.isolates,i=FC(this,e))))return s.order;i||(i=FC(this,e));let r=AF(e.text,n,i);return this.bidiCache.push(new dg(e.from,e.to,n,i,!0,r)),r}get hasFocus(){var e;return(this.dom.ownerDocument.hasFocus()||Se.safari&&((e=this.inputState)===null||e===void 0?void 0:e.lastContextMenu)>Date.now()-3e4)&&this.root.activeElement==this.contentDOM}focus(){this.observer.ignore(()=>{pM(this.contentDOM),this.docView.updateSelection()})}setRoot(e){this._root!=e&&(this._root=e,this.observer.setWindow((e.nodeType==9?e:e.ownerDocument).defaultView||window),this.mountStyles())}destroy(){this.root.activeElement==this.contentDOM&&this.contentDOM.blur();for(let e of this.plugins)e.destroy(this);this.plugins=[],this.inputState.destroy(),this.docView.destroy(),this.dom.remove(),this.observer.destroy(),this.measureScheduled>-1&&this.win.cancelAnimationFrame(this.measureScheduled),this.destroyed=!0}static scrollIntoView(e,n={}){return Vp.of(new vc(typeof e=="number"?ae.cursor(e):e,n.y,n.x,n.yMargin,n.xMargin))}scrollSnapshot(){let{scrollTop:e,scrollLeft:n}=this.scrollDOM,i=this.viewState.scrollAnchorAt(e);return Vp.of(new vc(ae.cursor(i.from),"start","start",i.top-e,n,!0))}setTabFocusMode(e){e==null?this.inputState.tabFocusMode=this.inputState.tabFocusMode<0?0:-1:typeof e=="boolean"?this.inputState.tabFocusMode=e?0:-1:this.inputState.tabFocusMode!=0&&(this.inputState.tabFocusMode=Date.now()+e)}static domEventHandlers(e){return Dt.define(()=>({}),{eventHandlers:e})}static domEventObservers(e){return Dt.define(()=>({}),{eventObservers:e})}static theme(e,n){let i=Bo.newName(),r=[Gp.of(i),Th.of(N1(`.${i}`,e))];return n&&n.dark&&r.push(D1.of(!0)),r}static baseTheme(e){return Is.lowest(Th.of(N1("."+j1,e,lD)))}static findFromDOM(e){var n;let i=e.querySelector(".cm-content"),r=i&&yt.get(i)||yt.get(e);return((n=r==null?void 0:r.rootView)===null||n===void 0?void 0:n.view)||null}}ye.styleModule=Th;ye.inputHandler=MM;ye.clipboardInputFilter=xS;ye.clipboardOutputFilter=vS;ye.scrollHandler=zM;ye.focusChangeEffect=DM;ye.perLineTextDirection=jM;ye.exceptionSink=LM;ye.updateListener=R1;ye.editable=ks;ye.mouseSelectionStyle=$M;ye.dragMovesSelection=RM;ye.clickAddsSelectionRange=AM;ye.decorations=Of;ye.outerDecorations=VM;ye.atomicRanges=Ff;ye.bidiIsolatedRanges=BM;ye.scrollMargins=ZM;ye.darkTheme=D1;ye.cspNonce=we.define({combine:t=>t.length?t[0]:""});ye.contentAttributes=SS;ye.editorAttributes=XM;ye.lineWrapping=ye.contentAttributes.of({class:"cm-lineWrapping"});ye.announce=De.define();const jK=4096,vE={};class dg{constructor(e,n,i,r,s,o){this.from=e,this.to=n,this.dir=i,this.isolates=r,this.fresh=s,this.order=o}static update(e,n){if(n.empty&&!e.some(s=>s.fresh))return e;let i=[],r=e.length?e[e.length-1].dir:Ct.LTR;for(let s=Math.max(0,e.length-10);s<e.length;s++){let o=e[s];o.dir==r&&!n.touchesRange(o.from,o.to)&&i.push(new dg(n.mapPos(o.from,1),n.mapPos(o.to,-1),o.dir,o.isolates,!1,o.order))}return i}}function SE(t,e,n){for(let i=t.state.facet(e),r=i.length-1;r>=0;r--){let s=i[r],o=typeof s=="function"?s(t):s;o&&P1(o,n)}return n}const NK=Se.mac?"mac":Se.windows?"win":Se.linux?"linux":"key";function zK(t,e){const n=t.split(/-(?!$)/);let i=n[n.length-1];i=="Space"&&(i=" ");let r,s,o,l;for(let c=0;c<n.length-1;++c){const h=n[c];if(/^(cmd|meta|m)$/i.test(h))l=!0;else if(/^a(lt)?$/i.test(h))r=!0;else if(/^(c|ctrl|control)$/i.test(h))s=!0;else if(/^s(hift)?$/i.test(h))o=!0;else if(/^mod$/i.test(h))e=="mac"?l=!0:s=!0;else throw new Error("Unrecognized modifier name: "+h)}return r&&(i="Alt-"+i),s&&(i="Ctrl-"+i),l&&(i="Meta-"+i),o&&(i="Shift-"+i),i}function Wp(t,e,n){return e.altKey&&(t="Alt-"+t),e.ctrlKey&&(t="Ctrl-"+t),e.metaKey&&(t="Meta-"+t),n!==!1&&e.shiftKey&&(t="Shift-"+t),t}const IK=Is.default(ye.domEventHandlers({keydown(t,e){return uD(cD(e.state),t,e,"editor")}})),al=we.define({enables:IK}),_E=new WeakMap;function cD(t){let e=t.facet(al),n=_E.get(e);return n||_E.set(e,n=BK(e.reduce((i,r)=>i.concat(r),[]))),n}function XK(t,e,n){return uD(cD(t.state),e,t,n)}let vo=null;const VK=4e3;function BK(t,e=NK){let n=Object.create(null),i=Object.create(null),r=(o,l)=>{let c=i[o];if(c==null)i[o]=l;else if(c!=l)throw new Error("Key binding "+o+" is used both as a regular binding and as a multi-stroke prefix")},s=(o,l,c,h,d)=>{var p,g;let O=n[o]||(n[o]=Object.create(null)),x=l.split(/ (?!$)/).map(k=>zK(k,e));for(let k=1;k<x.length;k++){let P=x.slice(0,k).join(" ");r(P,!0),O[P]||(O[P]={preventDefault:!0,stopPropagation:!1,run:[Q=>{let R=vo={view:Q,prefix:P,scope:o};return setTimeout(()=>{vo==R&&(vo=null)},VK),!0}]})}let S=x.join(" ");r(S,!1);let _=O[S]||(O[S]={preventDefault:!1,stopPropagation:!1,run:((g=(p=O._any)===null||p===void 0?void 0:p.run)===null||g===void 0?void 0:g.slice())||[]});c&&_.run.push(c),h&&(_.preventDefault=!0),d&&(_.stopPropagation=!0)};for(let o of t){let l=o.scope?o.scope.split(" "):["editor"];if(o.any)for(let h of l){let d=n[h]||(n[h]=Object.create(null));d._any||(d._any={preventDefault:!1,stopPropagation:!1,run:[]});let{any:p}=o;for(let g in d)d[g].run.push(O=>p(O,z1))}let c=o[e]||o.key;if(c)for(let h of l)s(h,c,o.run,o.preventDefault,o.stopPropagation),o.shift&&s(h,"Shift-"+c,o.shift,o.preventDefault,o.stopPropagation)}return n}let z1=null;function uD(t,e,n,i){z1=e;let r=hF(e),s=ei(r,0),o=$r(s)==r.length&&r!=" ",l="",c=!1,h=!1,d=!1;vo&&vo.view==n&&vo.scope==i&&(l=vo.prefix+" ",KM.indexOf(e.keyCode)<0&&(h=!0,vo=null));let p=new Set,g=_=>{if(_){for(let k of _.run)if(!p.has(k)&&(p.add(k),k(n)))return _.stopPropagation&&(d=!0),!0;_.preventDefault&&(_.stopPropagation&&(d=!0),h=!0)}return!1},O=t[i],x,S;return O&&(g(O[l+Wp(r,e,!o)])?c=!0:o&&(e.altKey||e.metaKey||e.ctrlKey)&&!(Se.windows&&e.ctrlKey&&e.altKey)&&!(Se.mac&&e.altKey&&!(e.ctrlKey||e.metaKey))&&(x=Zo[e.keyCode])&&x!=r?(g(O[l+Wp(x,e,!0)])||e.shiftKey&&(S=mf[e.keyCode])!=r&&S!=x&&g(O[l+Wp(S,e,!1)]))&&(c=!0):o&&e.shiftKey&&g(O[l+Wp(r,e,!0)])&&(c=!0),!c&&g(O._any)&&(c=!0)),h&&(c=!0),c&&d&&e.stopPropagation(),z1=null,c}class Kf{constructor(e,n,i,r,s){this.className=e,this.left=n,this.top=i,this.width=r,this.height=s}draw(){let e=document.createElement("div");return e.className=this.className,this.adjust(e),e}update(e,n){return n.className!=this.className?!1:(this.adjust(e),!0)}adjust(e){e.style.left=this.left+"px",e.style.top=this.top+"px",this.width!=null&&(e.style.width=this.width+"px"),e.style.height=this.height+"px"}eq(e){return this.left==e.left&&this.top==e.top&&this.width==e.width&&this.height==e.height&&this.className==e.className}static forRange(e,n,i){if(i.empty){let r=e.coordsAtPos(i.head,i.assoc||1);if(!r)return[];let s=hD(e);return[new Kf(n,r.left-s.left,r.top-s.top,null,r.bottom-r.top)]}else return ZK(e,n,i)}}function hD(t){let e=t.scrollDOM.getBoundingClientRect();return{left:(t.textDirection==Ct.LTR?e.left:e.right-t.scrollDOM.clientWidth*t.scaleX)-t.scrollDOM.scrollLeft*t.scaleX,top:e.top-t.scrollDOM.scrollTop*t.scaleY}}function kE(t,e,n,i){let r=t.coordsAtPos(e,n*2);if(!r)return i;let s=t.dom.getBoundingClientRect(),o=(r.top+r.bottom)/2,l=t.posAtCoords({x:s.left+1,y:o}),c=t.posAtCoords({x:s.right-1,y:o});return l==null||c==null?i:{from:Math.max(i.from,Math.min(l,c)),to:Math.min(i.to,Math.max(l,c))}}function ZK(t,e,n){if(n.to<=t.viewport.from||n.from>=t.viewport.to)return[];let i=Math.max(n.from,t.viewport.from),r=Math.min(n.to,t.viewport.to),s=t.textDirection==Ct.LTR,o=t.contentDOM,l=o.getBoundingClientRect(),c=hD(t),h=o.querySelector(".cm-line"),d=h&&window.getComputedStyle(h),p=l.left+(d?parseInt(d.paddingLeft)+Math.min(0,parseInt(d.textIndent)):0),g=l.right-(d?parseInt(d.paddingRight):0),O=L1(t,i,1),x=L1(t,r,-1),S=O.type==zn.Text?O:null,_=x.type==zn.Text?x:null;if(S&&(t.lineWrapping||O.widgetLineBreaks)&&(S=kE(t,i,1,S)),_&&(t.lineWrapping||x.widgetLineBreaks)&&(_=kE(t,r,-1,_)),S&&_&&S.from==_.from&&S.to==_.to)return P(Q(n.from,n.to,S));{let $=S?Q(n.from,null,S):R(O,!1),C=_?Q(null,n.to,_):R(x,!0),D=[];return(S||O).to<(_||x).from-(S&&_?1:0)||O.widgetLineBreaks>1&&$.bottom+t.defaultLineHeight/2<C.top?D.push(k(p,$.bottom,g,C.top)):$.bottom<C.top&&t.elementAtHeight(($.bottom+C.top)/2).type==zn.Text&&($.bottom=C.top=($.bottom+C.top)/2),P($).concat(D).concat(P(C))}function k($,C,D,Z){return new Kf(e,$-c.left,C-c.top,D-$,Z-C)}function P({top:$,bottom:C,horizontal:D}){let Z=[];for(let U=0;U<D.length;U+=2)Z.push(k(D[U],$,D[U+1],C));return Z}function Q($,C,D){let Z=1e9,U=-1e9,M=[];function V(K,ie,q,se,pe){let ve=t.coordsAtPos(K,K==D.to?-2:2),j=t.coordsAtPos(q,q==D.from?2:-2);!ve||!j||(Z=Math.min(ve.top,j.top,Z),U=Math.max(ve.bottom,j.bottom,U),pe==Ct.LTR?M.push(s&&ie?p:ve.left,s&&se?g:j.right):M.push(!s&&se?p:j.left,!s&&ie?g:ve.right))}let G=$??D.from,J=C??D.to;for(let K of t.visibleRanges)if(K.to>G&&K.from<J)for(let ie=Math.max(K.from,G),q=Math.min(K.to,J);;){let se=t.state.doc.lineAt(ie);for(let pe of t.bidiSpans(se)){let ve=pe.from+se.from,j=pe.to+se.from;if(ve>=q)break;j>ie&&V(Math.max(ve,ie),$==null&&ve<=G,Math.min(j,q),C==null&&j>=J,pe.dir)}if(ie=se.to+1,ie>=q)break}return M.length==0&&V(G,$==null,J,C==null,t.textDirection),{top:Z,bottom:U,horizontal:M}}function R($,C){let D=l.top+(C?$.top:$.bottom);return{top:D,bottom:D,horizontal:[]}}}function qK(t,e){return t.constructor==e.constructor&&t.eq(e)}class UK{constructor(e,n){this.view=e,this.layer=n,this.drawn=[],this.scaleX=1,this.scaleY=1,this.measureReq={read:this.measure.bind(this),write:this.draw.bind(this)},this.dom=e.scrollDOM.appendChild(document.createElement("div")),this.dom.classList.add("cm-layer"),n.above&&this.dom.classList.add("cm-layer-above"),n.class&&this.dom.classList.add(n.class),this.scale(),this.dom.setAttribute("aria-hidden","true"),this.setOrder(e.state),e.requestMeasure(this.measureReq),n.mount&&n.mount(this.dom,e)}update(e){e.startState.facet(km)!=e.state.facet(km)&&this.setOrder(e.state),(this.layer.update(e,this.dom)||e.geometryChanged)&&(this.scale(),e.view.requestMeasure(this.measureReq))}docViewUpdate(e){this.layer.updateOnDocViewUpdate!==!1&&e.requestMeasure(this.measureReq)}setOrder(e){let n=0,i=e.facet(km);for(;n<i.length&&i[n]!=this.layer;)n++;this.dom.style.zIndex=String((this.layer.above?150:-1)-n)}measure(){return this.layer.markers(this.view)}scale(){let{scaleX:e,scaleY:n}=this.view;(e!=this.scaleX||n!=this.scaleY)&&(this.scaleX=e,this.scaleY=n,this.dom.style.transform=`scale(${1/e}, ${1/n})`)}draw(e){if(e.length!=this.drawn.length||e.some((n,i)=>!qK(n,this.drawn[i]))){let n=this.dom.firstChild,i=0;for(let r of e)r.update&&n&&r.constructor&&this.drawn[i].constructor&&r.update(n,this.drawn[i])?(n=n.nextSibling,i++):this.dom.insertBefore(r.draw(),n);for(;n;){let r=n.nextSibling;n.remove(),n=r}this.drawn=e,Se.safari&&Se.safari_version>=26&&(this.dom.style.display=this.dom.firstChild?"":"none")}}destroy(){this.layer.destroy&&this.layer.destroy(this.dom,this.view),this.dom.remove()}}const km=we.define();function fD(t){return[Dt.define(e=>new UK(e,t)),km.of(t)]}const yf=we.define({combine(t){return Ur(t,{cursorBlinkRate:1200,drawRangeCursor:!0},{cursorBlinkRate:(e,n)=>Math.min(e,n),drawRangeCursor:(e,n)=>e||n})}});function YK(t={}){return[yf.of(t),GK,WK,HK,NM.of(!0)]}function dD(t){return t.startState.facet(yf)!=t.state.facet(yf)}const GK=fD({above:!0,markers(t){let{state:e}=t,n=e.facet(yf),i=[];for(let r of e.selection.ranges){let s=r==e.selection.main;if(r.empty||n.drawRangeCursor){let o=s?"cm-cursor cm-cursor-primary":"cm-cursor cm-cursor-secondary",l=r.empty?r:ae.cursor(r.head,r.head>r.anchor?-1:1);for(let c of Kf.forRange(t,o,l))i.push(c)}}return i},update(t,e){t.transactions.some(i=>i.selection)&&(e.style.animationName=e.style.animationName=="cm-blink"?"cm-blink2":"cm-blink");let n=dD(t);return n&&wE(t.state,e),t.docChanged||t.selectionSet||n},mount(t,e){wE(e.state,t)},class:"cm-cursorLayer"});function wE(t,e){e.style.animationDuration=t.facet(yf).cursorBlinkRate+"ms"}const WK=fD({above:!1,markers(t){return t.state.selection.ranges.map(e=>e.empty?[]:Kf.forRange(t,"cm-selectionBackground",e)).reduce((e,n)=>e.concat(n))},update(t,e){return t.docChanged||t.selectionSet||t.viewportChanged||dD(t)},class:"cm-selectionLayer"}),HK=Is.highest(ye.theme({".cm-line":{"& ::selection, &::selection":{backgroundColor:"transparent !important"},caretColor:"transparent !important"},".cm-content":{caretColor:"transparent !important","& :focus":{caretColor:"initial !important","&::selection, & ::selection":{backgroundColor:"Highlight !important"}}}})),pD=De.define({map(t,e){return t==null?null:e.mapPos(t)}}),Eh=cn.define({create(){return null},update(t,e){return t!=null&&(t=e.changes.mapPos(t)),e.effects.reduce((n,i)=>i.is(pD)?i.value:n,t)}}),FK=Dt.fromClass(class{constructor(t){this.view=t,this.cursor=null,this.measureReq={read:this.readPos.bind(this),write:this.drawCursor.bind(this)}}update(t){var e;let n=t.state.field(Eh);n==null?this.cursor!=null&&((e=this.cursor)===null||e===void 0||e.remove(),this.cursor=null):(this.cursor||(this.cursor=this.view.scrollDOM.appendChild(document.createElement("div")),this.cursor.className="cm-dropCursor"),(t.startState.field(Eh)!=n||t.docChanged||t.geometryChanged)&&this.view.requestMeasure(this.measureReq))}readPos(){let{view:t}=this,e=t.state.field(Eh),n=e!=null&&t.coordsAtPos(e);if(!n)return null;let i=t.scrollDOM.getBoundingClientRect();return{left:n.left-i.left+t.scrollDOM.scrollLeft*t.scaleX,top:n.top-i.top+t.scrollDOM.scrollTop*t.scaleY,height:n.bottom-n.top}}drawCursor(t){if(this.cursor){let{scaleX:e,scaleY:n}=this.view;t?(this.cursor.style.left=t.left/e+"px",this.cursor.style.top=t.top/n+"px",this.cursor.style.height=t.height/n+"px"):this.cursor.style.left="-100000px"}}destroy(){this.cursor&&this.cursor.remove()}setDropPos(t){this.view.state.field(Eh)!=t&&this.view.dispatch({effects:pD.of(t)})}},{eventObservers:{dragover(t){this.setDropPos(this.view.posAtCoords({x:t.clientX,y:t.clientY}))},dragleave(t){(t.target==this.view.contentDOM||!this.view.contentDOM.contains(t.relatedTarget))&&this.setDropPos(null)},dragend(){this.setDropPos(null)},drop(){this.setDropPos(null)}}});function KK(){return[Eh,FK]}function PE(t,e,n,i,r){e.lastIndex=0;for(let s=t.iterRange(n,i),o=n,l;!s.next().done;o+=s.value.length)if(!s.lineBreak)for(;l=e.exec(s.value);)r(o+l.index,l)}function JK(t,e){let n=t.visibleRanges;if(n.length==1&&n[0].from==t.viewport.from&&n[0].to==t.viewport.to)return n;let i=[];for(let{from:r,to:s}of n)r=Math.max(t.state.doc.lineAt(r).from,r-e),s=Math.min(t.state.doc.lineAt(s).to,s+e),i.length&&i[i.length-1].to>=r?i[i.length-1].to=s:i.push({from:r,to:s});return i}class eJ{constructor(e){const{regexp:n,decoration:i,decorate:r,boundary:s,maxLength:o=1e3}=e;if(!n.global)throw new RangeError("The regular expression given to MatchDecorator should have its 'g' flag set");if(this.regexp=n,r)this.addMatch=(l,c,h,d)=>r(d,h,h+l[0].length,l,c);else if(typeof i=="function")this.addMatch=(l,c,h,d)=>{let p=i(l,c,h);p&&d(h,h+l[0].length,p)};else if(i)this.addMatch=(l,c,h,d)=>d(h,h+l[0].length,i);else throw new RangeError("Either 'decorate' or 'decoration' should be provided to MatchDecorator");this.boundary=s,this.maxLength=o}createDeco(e){let n=new $s,i=n.add.bind(n);for(let{from:r,to:s}of JK(e,this.maxLength))PE(e.state.doc,this.regexp,r,s,(o,l)=>this.addMatch(l,e,o,i));return n.finish()}updateDeco(e,n){let i=1e9,r=-1;return e.docChanged&&e.changes.iterChanges((s,o,l,c)=>{c>=e.view.viewport.from&&l<=e.view.viewport.to&&(i=Math.min(l,i),r=Math.max(c,r))}),e.viewportMoved||r-i>1e3?this.createDeco(e.view):r>-1?this.updateRange(e.view,n.map(e.changes),i,r):n}updateRange(e,n,i,r){for(let s of e.visibleRanges){let o=Math.max(s.from,i),l=Math.min(s.to,r);if(l>=o){let c=e.state.doc.lineAt(o),h=c.to<l?e.state.doc.lineAt(l):c,d=Math.max(s.from,c.from),p=Math.min(s.to,h.to);if(this.boundary){for(;o>c.from;o--)if(this.boundary.test(c.text[o-1-c.from])){d=o;break}for(;l<h.to;l++)if(this.boundary.test(h.text[l-h.from])){p=l;break}}let g=[],O,x=(S,_,k)=>g.push(k.range(S,_));if(c==h)for(this.regexp.lastIndex=d-c.from;(O=this.regexp.exec(c.text))&&O.index<p-c.from;)this.addMatch(O,e,O.index+c.from,x);else PE(e.state.doc,this.regexp,d,p,(S,_)=>this.addMatch(_,e,S,x));n=n.update({filterFrom:d,filterTo:p,filter:(S,_)=>S<d||_>p,add:g})}}return n}}const I1=/x/.unicode!=null?"gu":"g",tJ=new RegExp(`[\0-\b
401
+ --Ÿ­؜​‎‏\u2028\u2029‭‮⁦⁧⁩\uFEFF-]`,I1),nJ={0:"null",7:"bell",8:"backspace",10:"newline",11:"vertical tab",13:"carriage return",27:"escape",8203:"zero width space",8204:"zero width non-joiner",8205:"zero width joiner",8206:"left-to-right mark",8207:"right-to-left mark",8232:"line separator",8237:"left-to-right override",8238:"right-to-left override",8294:"left-to-right isolate",8295:"right-to-left isolate",8297:"pop directional isolate",8233:"paragraph separator",65279:"zero width no-break space",65532:"object replacement"};let Mb=null;function iJ(){var t;if(Mb==null&&typeof document<"u"&&document.body){let e=document.body.style;Mb=((t=e.tabSize)!==null&&t!==void 0?t:e.MozTabSize)!=null}return Mb||!1}const wm=we.define({combine(t){let e=Ur(t,{render:null,specialChars:tJ,addSpecialChars:null});return(e.replaceTabs=!iJ())&&(e.specialChars=new RegExp(" |"+e.specialChars.source,I1)),e.addSpecialChars&&(e.specialChars=new RegExp(e.specialChars.source+"|"+e.addSpecialChars.source,I1)),e}});function rJ(t={}){return[wm.of(t),sJ()]}let TE=null;function sJ(){return TE||(TE=Dt.fromClass(class{constructor(t){this.view=t,this.decorations=ke.none,this.decorationCache=Object.create(null),this.decorator=this.makeDecorator(t.state.facet(wm)),this.decorations=this.decorator.createDeco(t)}makeDecorator(t){return new eJ({regexp:t.specialChars,decoration:(e,n,i)=>{let{doc:r}=n.state,s=ei(e[0],0);if(s==9){let o=r.lineAt(i),l=n.state.tabSize,c=hr(o.text,l,i-o.from);return ke.replace({widget:new cJ((l-c%l)*this.view.defaultCharacterWidth/this.view.scaleX)})}return this.decorationCache[s]||(this.decorationCache[s]=ke.replace({widget:new lJ(t,s)}))},boundary:t.replaceTabs?void 0:/[^]/})}update(t){let e=t.state.facet(wm);t.startState.facet(wm)!=e?(this.decorator=this.makeDecorator(e),this.decorations=this.decorator.createDeco(t.view)):this.decorations=this.decorator.updateDeco(t,this.decorations)}},{decorations:t=>t.decorations}))}const oJ="•";function aJ(t){return t>=32?oJ:t==10?"␤":String.fromCharCode(9216+t)}class lJ extends Ti{constructor(e,n){super(),this.options=e,this.code=n}eq(e){return e.code==this.code}toDOM(e){let n=aJ(this.code),i=e.state.phrase("Control character")+" "+(nJ[this.code]||"0x"+this.code.toString(16)),r=this.options.render&&this.options.render(this.code,i,n);if(r)return r;let s=document.createElement("span");return s.textContent=n,s.title=i,s.setAttribute("aria-label",i),s.className="cm-specialChar",s}ignoreEvent(){return!1}}class cJ extends Ti{constructor(e){super(),this.width=e}eq(e){return e.width==this.width}toDOM(){let e=document.createElement("span");return e.textContent=" ",e.className="cm-tab",e.style.width=this.width+"px",e}ignoreEvent(){return!1}}function uJ(){return fJ}const hJ=ke.line({class:"cm-activeLine"}),fJ=Dt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.docChanged||t.selectionSet)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=-1,n=[];for(let i of t.state.selection.ranges){let r=t.lineBlockAt(i.head);r.from>e&&(n.push(hJ.range(r.from)),e=r.from)}return ke.set(n)}},{decorations:t=>t.decorations});class dJ extends Ti{constructor(e){super(),this.content=e}toDOM(e){let n=document.createElement("span");return n.className="cm-placeholder",n.style.pointerEvents="none",n.appendChild(typeof this.content=="string"?document.createTextNode(this.content):typeof this.content=="function"?this.content(e):this.content.cloneNode(!0)),n.setAttribute("aria-hidden","true"),n}coordsAt(e){let n=e.firstChild?Zc(e.firstChild):[];if(!n.length)return null;let i=window.getComputedStyle(e.parentNode),r=Gf(n[0],i.direction!="rtl"),s=parseInt(i.lineHeight);return r.bottom-r.top>s*1.5?{left:r.left,right:r.right,top:r.top,bottom:r.top+s}:r}ignoreEvent(){return!1}}function pJ(t){let e=Dt.fromClass(class{constructor(n){this.view=n,this.placeholder=t?ke.set([ke.widget({widget:new dJ(t),side:1}).range(0)]):ke.none}get decorations(){return this.view.state.doc.length?ke.none:this.placeholder}},{decorations:n=>n.decorations});return typeof t=="string"?[e,ye.contentAttributes.of({"aria-placeholder":t})]:e}const X1=2e3;function mJ(t,e,n){let i=Math.min(e.line,n.line),r=Math.max(e.line,n.line),s=[];if(e.off>X1||n.off>X1||e.col<0||n.col<0){let o=Math.min(e.off,n.off),l=Math.max(e.off,n.off);for(let c=i;c<=r;c++){let h=t.doc.line(c);h.length<=l&&s.push(ae.range(h.from+o,h.to+l))}}else{let o=Math.min(e.col,n.col),l=Math.max(e.col,n.col);for(let c=i;c<=r;c++){let h=t.doc.line(c),d=y1(h.text,o,t.tabSize,!0);if(d<0)s.push(ae.cursor(h.to));else{let p=y1(h.text,l,t.tabSize);s.push(ae.range(h.from+d,h.from+p))}}}return s}function gJ(t,e){let n=t.coordsAtPos(t.viewport.from);return n?Math.round(Math.abs((n.left-e)/t.defaultCharacterWidth)):-1}function QE(t,e){let n=t.posAtCoords({x:e.clientX,y:e.clientY},!1),i=t.state.doc.lineAt(n),r=n-i.from,s=r>X1?-1:r==i.length?gJ(t,e.clientX):hr(i.text,t.state.tabSize,n-i.from);return{line:i.number,col:s,off:r}}function OJ(t,e){let n=QE(t,e),i=t.state.selection;return n?{update(r){if(r.docChanged){let s=r.changes.mapPos(r.startState.doc.line(n.line).from),o=r.state.doc.lineAt(s);n={line:o.number,col:n.col,off:Math.min(n.off,o.length)},i=i.map(r.changes)}},get(r,s,o){let l=QE(t,r);if(!l)return i;let c=mJ(t.state,n,l);return c.length?o?ae.create(c.concat(i.ranges)):ae.create(c):i}}:null}function yJ(t){let e=(n=>n.altKey&&n.button==0);return ye.mouseSelectionStyle.of((n,i)=>e(i)?OJ(n,i):null)}const bJ={Alt:[18,t=>!!t.altKey],Control:[17,t=>!!t.ctrlKey],Shift:[16,t=>!!t.shiftKey],Meta:[91,t=>!!t.metaKey]},xJ={style:"cursor: crosshair"};function vJ(t={}){let[e,n]=bJ[t.key||"Alt"],i=Dt.fromClass(class{constructor(r){this.view=r,this.isDown=!1}set(r){this.isDown!=r&&(this.isDown=r,this.view.update([]))}},{eventObservers:{keydown(r){this.set(r.keyCode==e||n(r))},keyup(r){(r.keyCode==e||!n(r))&&this.set(!1)},mousemove(r){this.set(n(r))}}});return[i,ye.contentAttributes.of(r=>{var s;return!((s=r.plugin(i))===null||s===void 0)&&s.isDown?xJ:null})]}const Hp="-10000px";class mD{constructor(e,n,i,r){this.facet=n,this.createTooltipView=i,this.removeTooltipView=r,this.input=e.state.facet(n),this.tooltips=this.input.filter(o=>o);let s=null;this.tooltipViews=this.tooltips.map(o=>s=i(o,s))}update(e,n){var i;let r=e.state.facet(this.facet),s=r.filter(c=>c);if(r===this.input){for(let c of this.tooltipViews)c.update&&c.update(e);return!1}let o=[],l=n?[]:null;for(let c=0;c<s.length;c++){let h=s[c],d=-1;if(h){for(let p=0;p<this.tooltips.length;p++){let g=this.tooltips[p];g&&g.create==h.create&&(d=p)}if(d<0)o[c]=this.createTooltipView(h,c?o[c-1]:null),l&&(l[c]=!!h.above);else{let p=o[c]=this.tooltipViews[d];l&&(l[c]=n[d]),p.update&&p.update(e)}}}for(let c of this.tooltipViews)o.indexOf(c)<0&&(this.removeTooltipView(c),(i=c.destroy)===null||i===void 0||i.call(c));return n&&(l.forEach((c,h)=>n[h]=c),n.length=l.length),this.input=r,this.tooltips=s,this.tooltipViews=o,!0}}function SJ(t){let e=t.dom.ownerDocument.documentElement;return{top:0,left:0,bottom:e.clientHeight,right:e.clientWidth}}const Db=we.define({combine:t=>{var e,n,i;return{position:Se.ios?"absolute":((e=t.find(r=>r.position))===null||e===void 0?void 0:e.position)||"fixed",parent:((n=t.find(r=>r.parent))===null||n===void 0?void 0:n.parent)||null,tooltipSpace:((i=t.find(r=>r.tooltipSpace))===null||i===void 0?void 0:i.tooltipSpace)||SJ}}}),CE=new WeakMap,TS=Dt.fromClass(class{constructor(t){this.view=t,this.above=[],this.inView=!0,this.madeAbsolute=!1,this.lastTransaction=0,this.measureTimeout=-1;let e=t.state.facet(Db);this.position=e.position,this.parent=e.parent,this.classes=t.themeClasses,this.createContainer(),this.measureReq={read:this.readMeasure.bind(this),write:this.writeMeasure.bind(this),key:this},this.resizeObserver=typeof ResizeObserver=="function"?new ResizeObserver(()=>this.measureSoon()):null,this.manager=new mD(t,QS,(n,i)=>this.createTooltip(n,i),n=>{this.resizeObserver&&this.resizeObserver.unobserve(n.dom),n.dom.remove()}),this.above=this.manager.tooltips.map(n=>!!n.above),this.intersectionObserver=typeof IntersectionObserver=="function"?new IntersectionObserver(n=>{Date.now()>this.lastTransaction-50&&n.length>0&&n[n.length-1].intersectionRatio<1&&this.measureSoon()},{threshold:[1]}):null,this.observeIntersection(),t.win.addEventListener("resize",this.measureSoon=this.measureSoon.bind(this)),this.maybeMeasure()}createContainer(){this.parent?(this.container=document.createElement("div"),this.container.style.position="relative",this.container.className=this.view.themeClasses,this.parent.appendChild(this.container)):this.container=this.view.dom}observeIntersection(){if(this.intersectionObserver){this.intersectionObserver.disconnect();for(let t of this.manager.tooltipViews)this.intersectionObserver.observe(t.dom)}}measureSoon(){this.measureTimeout<0&&(this.measureTimeout=setTimeout(()=>{this.measureTimeout=-1,this.maybeMeasure()},50))}update(t){t.transactions.length&&(this.lastTransaction=Date.now());let e=this.manager.update(t,this.above);e&&this.observeIntersection();let n=e||t.geometryChanged,i=t.state.facet(Db);if(i.position!=this.position&&!this.madeAbsolute){this.position=i.position;for(let r of this.manager.tooltipViews)r.dom.style.position=this.position;n=!0}if(i.parent!=this.parent){this.parent&&this.container.remove(),this.parent=i.parent,this.createContainer();for(let r of this.manager.tooltipViews)this.container.appendChild(r.dom);n=!0}else this.parent&&this.view.themeClasses!=this.classes&&(this.classes=this.container.className=this.view.themeClasses);n&&this.maybeMeasure()}createTooltip(t,e){let n=t.create(this.view),i=e?e.dom:null;if(n.dom.classList.add("cm-tooltip"),t.arrow&&!n.dom.querySelector(".cm-tooltip > .cm-tooltip-arrow")){let r=document.createElement("div");r.className="cm-tooltip-arrow",n.dom.appendChild(r)}return n.dom.style.position=this.position,n.dom.style.top=Hp,n.dom.style.left="0px",this.container.insertBefore(n.dom,i),n.mount&&n.mount(this.view),this.resizeObserver&&this.resizeObserver.observe(n.dom),n}destroy(){var t,e,n;this.view.win.removeEventListener("resize",this.measureSoon);for(let i of this.manager.tooltipViews)i.dom.remove(),(t=i.destroy)===null||t===void 0||t.call(i);this.parent&&this.container.remove(),(e=this.resizeObserver)===null||e===void 0||e.disconnect(),(n=this.intersectionObserver)===null||n===void 0||n.disconnect(),clearTimeout(this.measureTimeout)}readMeasure(){let t=1,e=1,n=!1;if(this.position=="fixed"&&this.manager.tooltipViews.length){let{dom:s}=this.manager.tooltipViews[0];if(Se.safari){let o=s.getBoundingClientRect();n=Math.abs(o.top+1e4)>1||Math.abs(o.left)>1}else n=!!s.offsetParent&&s.offsetParent!=this.container.ownerDocument.body}if(n||this.position=="absolute")if(this.parent){let s=this.parent.getBoundingClientRect();s.width&&s.height&&(t=s.width/this.parent.offsetWidth,e=s.height/this.parent.offsetHeight)}else({scaleX:t,scaleY:e}=this.view.viewState);let i=this.view.scrollDOM.getBoundingClientRect(),r=_S(this.view);return{visible:{left:i.left+r.left,top:i.top+r.top,right:i.right-r.right,bottom:i.bottom-r.bottom},parent:this.parent?this.container.getBoundingClientRect():this.view.dom.getBoundingClientRect(),pos:this.manager.tooltips.map((s,o)=>{let l=this.manager.tooltipViews[o];return l.getCoords?l.getCoords(s.pos):this.view.coordsAtPos(s.pos)}),size:this.manager.tooltipViews.map(({dom:s})=>s.getBoundingClientRect()),space:this.view.state.facet(Db).tooltipSpace(this.view),scaleX:t,scaleY:e,makeAbsolute:n}}writeMeasure(t){var e;if(t.makeAbsolute){this.madeAbsolute=!0,this.position="absolute";for(let l of this.manager.tooltipViews)l.dom.style.position="absolute"}let{visible:n,space:i,scaleX:r,scaleY:s}=t,o=[];for(let l=0;l<this.manager.tooltips.length;l++){let c=this.manager.tooltips[l],h=this.manager.tooltipViews[l],{dom:d}=h,p=t.pos[l],g=t.size[l];if(!p||c.clip!==!1&&(p.bottom<=Math.max(n.top,i.top)||p.top>=Math.min(n.bottom,i.bottom)||p.right<Math.max(n.left,i.left)-.1||p.left>Math.min(n.right,i.right)+.1)){d.style.top=Hp;continue}let O=c.arrow?h.dom.querySelector(".cm-tooltip-arrow"):null,x=O?7:0,S=g.right-g.left,_=(e=CE.get(h))!==null&&e!==void 0?e:g.bottom-g.top,k=h.offset||kJ,P=this.view.textDirection==Ct.LTR,Q=g.width>i.right-i.left?P?i.left:i.right-g.width:P?Math.max(i.left,Math.min(p.left-(O?14:0)+k.x,i.right-S)):Math.min(Math.max(i.left,p.left-S+(O?14:0)-k.x),i.right-S),R=this.above[l];!c.strictSide&&(R?p.top-_-x-k.y<i.top:p.bottom+_+x+k.y>i.bottom)&&R==i.bottom-p.bottom>p.top-i.top&&(R=this.above[l]=!R);let $=(R?p.top-i.top:i.bottom-p.bottom)-x;if($<_&&h.resize!==!1){if($<this.view.defaultLineHeight){d.style.top=Hp;continue}CE.set(h,_),d.style.height=(_=$)/s+"px"}else d.style.height&&(d.style.height="");let C=R?p.top-_-x-k.y:p.bottom+x+k.y,D=Q+S;if(h.overlap!==!0)for(let Z of o)Z.left<D&&Z.right>Q&&Z.top<C+_&&Z.bottom>C&&(C=R?Z.top-_-2-x:Z.bottom+x+2);if(this.position=="absolute"?(d.style.top=(C-t.parent.top)/s+"px",EE(d,(Q-t.parent.left)/r)):(d.style.top=C/s+"px",EE(d,Q/r)),O){let Z=p.left+(P?k.x:-k.x)-(Q+14-7);O.style.left=Z/r+"px"}h.overlap!==!0&&o.push({left:Q,top:C,right:D,bottom:C+_}),d.classList.toggle("cm-tooltip-above",R),d.classList.toggle("cm-tooltip-below",!R),h.positioned&&h.positioned(t.space)}}maybeMeasure(){if(this.manager.tooltips.length&&(this.view.inView&&this.view.requestMeasure(this.measureReq),this.inView!=this.view.inView&&(this.inView=this.view.inView,!this.inView)))for(let t of this.manager.tooltipViews)t.dom.style.top=Hp}},{eventObservers:{scroll(){this.maybeMeasure()}}});function EE(t,e){let n=parseInt(t.style.left,10);(isNaN(n)||Math.abs(e-n)>1)&&(t.style.left=e+"px")}const _J=ye.baseTheme({".cm-tooltip":{zIndex:500,boxSizing:"border-box"},"&light .cm-tooltip":{border:"1px solid #bbb",backgroundColor:"#f5f5f5"},"&light .cm-tooltip-section:not(:first-child)":{borderTop:"1px solid #bbb"},"&dark .cm-tooltip":{backgroundColor:"#333338",color:"white"},".cm-tooltip-arrow":{height:"7px",width:"14px",position:"absolute",zIndex:-1,overflow:"hidden","&:before, &:after":{content:"''",position:"absolute",width:0,height:0,borderLeft:"7px solid transparent",borderRight:"7px solid transparent"},".cm-tooltip-above &":{bottom:"-7px","&:before":{borderTop:"7px solid #bbb"},"&:after":{borderTop:"7px solid #f5f5f5",bottom:"1px"}},".cm-tooltip-below &":{top:"-7px","&:before":{borderBottom:"7px solid #bbb"},"&:after":{borderBottom:"7px solid #f5f5f5",top:"1px"}}},"&dark .cm-tooltip .cm-tooltip-arrow":{"&:before":{borderTopColor:"#333338",borderBottomColor:"#333338"},"&:after":{borderTopColor:"transparent",borderBottomColor:"transparent"}}}),kJ={x:0,y:0},QS=we.define({enables:[TS,_J]}),pg=we.define({combine:t=>t.reduce((e,n)=>e.concat(n),[])});class aO{static create(e){return new aO(e)}constructor(e){this.view=e,this.mounted=!1,this.dom=document.createElement("div"),this.dom.classList.add("cm-tooltip-hover"),this.manager=new mD(e,pg,(n,i)=>this.createHostedView(n,i),n=>n.dom.remove())}createHostedView(e,n){let i=e.create(this.view);return i.dom.classList.add("cm-tooltip-section"),this.dom.insertBefore(i.dom,n?n.dom.nextSibling:this.dom.firstChild),this.mounted&&i.mount&&i.mount(this.view),i}mount(e){for(let n of this.manager.tooltipViews)n.mount&&n.mount(e);this.mounted=!0}positioned(e){for(let n of this.manager.tooltipViews)n.positioned&&n.positioned(e)}update(e){this.manager.update(e)}destroy(){var e;for(let n of this.manager.tooltipViews)(e=n.destroy)===null||e===void 0||e.call(n)}passProp(e){let n;for(let i of this.manager.tooltipViews){let r=i[e];if(r!==void 0){if(n===void 0)n=r;else if(n!==r)return}}return n}get offset(){return this.passProp("offset")}get getCoords(){return this.passProp("getCoords")}get overlap(){return this.passProp("overlap")}get resize(){return this.passProp("resize")}}const wJ=QS.compute([pg],t=>{let e=t.facet(pg);return e.length===0?null:{pos:Math.min(...e.map(n=>n.pos)),end:Math.max(...e.map(n=>{var i;return(i=n.end)!==null&&i!==void 0?i:n.pos})),create:aO.create,above:e[0].above,arrow:e.some(n=>n.arrow)}});class PJ{constructor(e,n,i,r,s){this.view=e,this.source=n,this.field=i,this.setHover=r,this.hoverTime=s,this.hoverTimeout=-1,this.restartTimeout=-1,this.pending=null,this.lastMove={x:0,y:0,target:e.dom,time:0},this.checkHover=this.checkHover.bind(this),e.dom.addEventListener("mouseleave",this.mouseleave=this.mouseleave.bind(this)),e.dom.addEventListener("mousemove",this.mousemove=this.mousemove.bind(this))}update(){this.pending&&(this.pending=null,clearTimeout(this.restartTimeout),this.restartTimeout=setTimeout(()=>this.startHover(),20))}get active(){return this.view.state.field(this.field)}checkHover(){if(this.hoverTimeout=-1,this.active.length)return;let e=Date.now()-this.lastMove.time;e<this.hoverTime?this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime-e):this.startHover()}startHover(){clearTimeout(this.restartTimeout);let{view:e,lastMove:n}=this,i=e.docView.nearest(n.target);if(!i)return;let r,s=1;if(i instanceof Ps)r=i.posAtStart;else{if(r=e.posAtCoords(n),r==null)return;let l=e.coordsAtPos(r);if(!l||n.y<l.top||n.y>l.bottom||n.x<l.left-e.defaultCharacterWidth||n.x>l.right+e.defaultCharacterWidth)return;let c=e.bidiSpans(e.state.doc.lineAt(r)).find(d=>d.from<=r&&d.to>=r),h=c&&c.dir==Ct.RTL?-1:1;s=n.x<l.left?-h:h}let o=this.source(e,r,s);if(o!=null&&o.then){let l=this.pending={pos:r};o.then(c=>{this.pending==l&&(this.pending=null,c&&!(Array.isArray(c)&&!c.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(c)?c:[c])}))},c=>ni(e.state,c,"hover tooltip"))}else o&&!(Array.isArray(o)&&!o.length)&&e.dispatch({effects:this.setHover.of(Array.isArray(o)?o:[o])})}get tooltip(){let e=this.view.plugin(TS),n=e?e.manager.tooltips.findIndex(i=>i.create==aO.create):-1;return n>-1?e.manager.tooltipViews[n]:null}mousemove(e){var n,i;this.lastMove={x:e.clientX,y:e.clientY,target:e.target,time:Date.now()},this.hoverTimeout<0&&(this.hoverTimeout=setTimeout(this.checkHover,this.hoverTime));let{active:r,tooltip:s}=this;if(r.length&&s&&!TJ(s.dom,e)||this.pending){let{pos:o}=r[0]||this.pending,l=(i=(n=r[0])===null||n===void 0?void 0:n.end)!==null&&i!==void 0?i:o;(o==l?this.view.posAtCoords(this.lastMove)!=o:!QJ(this.view,o,l,e.clientX,e.clientY))&&(this.view.dispatch({effects:this.setHover.of([])}),this.pending=null)}}mouseleave(e){clearTimeout(this.hoverTimeout),this.hoverTimeout=-1;let{active:n}=this;if(n.length){let{tooltip:i}=this;i&&i.dom.contains(e.relatedTarget)?this.watchTooltipLeave(i.dom):this.view.dispatch({effects:this.setHover.of([])})}}watchTooltipLeave(e){let n=i=>{e.removeEventListener("mouseleave",n),this.active.length&&!this.view.dom.contains(i.relatedTarget)&&this.view.dispatch({effects:this.setHover.of([])})};e.addEventListener("mouseleave",n)}destroy(){clearTimeout(this.hoverTimeout),this.view.dom.removeEventListener("mouseleave",this.mouseleave),this.view.dom.removeEventListener("mousemove",this.mousemove)}}const Fp=4;function TJ(t,e){let{left:n,right:i,top:r,bottom:s}=t.getBoundingClientRect(),o;if(o=t.querySelector(".cm-tooltip-arrow")){let l=o.getBoundingClientRect();r=Math.min(l.top,r),s=Math.max(l.bottom,s)}return e.clientX>=n-Fp&&e.clientX<=i+Fp&&e.clientY>=r-Fp&&e.clientY<=s+Fp}function QJ(t,e,n,i,r,s){let o=t.scrollDOM.getBoundingClientRect(),l=t.documentTop+t.documentPadding.top+t.contentHeight;if(o.left>i||o.right<i||o.top>r||Math.min(o.bottom,l)<r)return!1;let c=t.posAtCoords({x:i,y:r},!1);return c>=e&&c<=n}function CJ(t,e={}){let n=De.define(),i=cn.define({create(){return[]},update(r,s){if(r.length&&(e.hideOnChange&&(s.docChanged||s.selection)?r=[]:e.hideOn&&(r=r.filter(o=>!e.hideOn(s,o))),s.docChanged)){let o=[];for(let l of r){let c=s.changes.mapPos(l.pos,-1,On.TrackDel);if(c!=null){let h=Object.assign(Object.create(null),l);h.pos=c,h.end!=null&&(h.end=s.changes.mapPos(h.end)),o.push(h)}}r=o}for(let o of s.effects)o.is(n)&&(r=o.value),o.is(EJ)&&(r=[]);return r},provide:r=>pg.from(r)});return{active:i,extension:[i,Dt.define(r=>new PJ(r,t,i,n,e.hoverTime||300)),wJ]}}function gD(t,e){let n=t.plugin(TS);if(!n)return null;let i=n.manager.tooltips.indexOf(e);return i<0?null:n.manager.tooltipViews[i]}const EJ=De.define(),AE=we.define({combine(t){let e,n;for(let i of t)e=e||i.topContainer,n=n||i.bottomContainer;return{topContainer:e,bottomContainer:n}}});function bf(t,e){let n=t.plugin(OD),i=n?n.specs.indexOf(e):-1;return i>-1?n.panels[i]:null}const OD=Dt.fromClass(class{constructor(t){this.input=t.state.facet(xf),this.specs=this.input.filter(n=>n),this.panels=this.specs.map(n=>n(t));let e=t.state.facet(AE);this.top=new Kp(t,!0,e.topContainer),this.bottom=new Kp(t,!1,e.bottomContainer),this.top.sync(this.panels.filter(n=>n.top)),this.bottom.sync(this.panels.filter(n=>!n.top));for(let n of this.panels)n.dom.classList.add("cm-panel"),n.mount&&n.mount()}update(t){let e=t.state.facet(AE);this.top.container!=e.topContainer&&(this.top.sync([]),this.top=new Kp(t.view,!0,e.topContainer)),this.bottom.container!=e.bottomContainer&&(this.bottom.sync([]),this.bottom=new Kp(t.view,!1,e.bottomContainer)),this.top.syncClasses(),this.bottom.syncClasses();let n=t.state.facet(xf);if(n!=this.input){let i=n.filter(c=>c),r=[],s=[],o=[],l=[];for(let c of i){let h=this.specs.indexOf(c),d;h<0?(d=c(t.view),l.push(d)):(d=this.panels[h],d.update&&d.update(t)),r.push(d),(d.top?s:o).push(d)}this.specs=i,this.panels=r,this.top.sync(s),this.bottom.sync(o);for(let c of l)c.dom.classList.add("cm-panel"),c.mount&&c.mount()}else for(let i of this.panels)i.update&&i.update(t)}destroy(){this.top.sync([]),this.bottom.sync([])}},{provide:t=>ye.scrollMargins.of(e=>{let n=e.plugin(t);return n&&{top:n.top.scrollMargin(),bottom:n.bottom.scrollMargin()}})});class Kp{constructor(e,n,i){this.view=e,this.top=n,this.container=i,this.dom=void 0,this.classes="",this.panels=[],this.syncClasses()}sync(e){for(let n of this.panels)n.destroy&&e.indexOf(n)<0&&n.destroy();this.panels=e,this.syncDOM()}syncDOM(){if(this.panels.length==0){this.dom&&(this.dom.remove(),this.dom=void 0);return}if(!this.dom){this.dom=document.createElement("div"),this.dom.className=this.top?"cm-panels cm-panels-top":"cm-panels cm-panels-bottom",this.dom.style[this.top?"top":"bottom"]="0";let n=this.container||this.view.dom;n.insertBefore(this.dom,this.top?n.firstChild:null)}let e=this.dom.firstChild;for(let n of this.panels)if(n.dom.parentNode==this.dom){for(;e!=n.dom;)e=RE(e);e=e.nextSibling}else this.dom.insertBefore(n.dom,e);for(;e;)e=RE(e)}scrollMargin(){return!this.dom||this.container?0:Math.max(0,this.top?this.dom.getBoundingClientRect().bottom-Math.max(0,this.view.scrollDOM.getBoundingClientRect().top):Math.min(innerHeight,this.view.scrollDOM.getBoundingClientRect().bottom)-this.dom.getBoundingClientRect().top)}syncClasses(){if(!(!this.container||this.classes==this.view.themeClasses)){for(let e of this.classes.split(" "))e&&this.container.classList.remove(e);for(let e of(this.classes=this.view.themeClasses).split(" "))e&&this.container.classList.add(e)}}}function RE(t){let e=t.nextSibling;return t.remove(),e}const xf=we.define({enables:OD});class Ms extends Fa{compare(e){return this==e||this.constructor==e.constructor&&this.eq(e)}eq(e){return!1}destroy(e){}}Ms.prototype.elementClass="";Ms.prototype.toDOM=void 0;Ms.prototype.mapMode=On.TrackBefore;Ms.prototype.startSide=Ms.prototype.endSide=-1;Ms.prototype.point=!0;const Pm=we.define(),AJ=we.define(),RJ={class:"",renderEmptyElements:!1,elementStyle:"",markers:()=>rt.empty,lineMarker:()=>null,widgetMarker:()=>null,lineMarkerChange:null,initialSpacer:null,updateSpacer:null,domEventHandlers:{},side:"before"},Uh=we.define();function $J(t){return[yD(),Uh.of({...RJ,...t})]}const $E=we.define({combine:t=>t.some(e=>e)});function yD(t){return[LJ]}const LJ=Dt.fromClass(class{constructor(t){this.view=t,this.domAfter=null,this.prevViewport=t.viewport,this.dom=document.createElement("div"),this.dom.className="cm-gutters cm-gutters-before",this.dom.setAttribute("aria-hidden","true"),this.dom.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.gutters=t.state.facet(Uh).map(e=>new ME(t,e)),this.fixed=!t.state.facet($E);for(let e of this.gutters)e.config.side=="after"?this.getDOMAfter().appendChild(e.dom):this.dom.appendChild(e.dom);this.fixed&&(this.dom.style.position="sticky"),this.syncGutters(!1),t.scrollDOM.insertBefore(this.dom,t.contentDOM)}getDOMAfter(){return this.domAfter||(this.domAfter=document.createElement("div"),this.domAfter.className="cm-gutters cm-gutters-after",this.domAfter.setAttribute("aria-hidden","true"),this.domAfter.style.minHeight=this.view.contentHeight/this.view.scaleY+"px",this.domAfter.style.position=this.fixed?"sticky":"",this.view.scrollDOM.appendChild(this.domAfter)),this.domAfter}update(t){if(this.updateGutters(t)){let e=this.prevViewport,n=t.view.viewport,i=Math.min(e.to,n.to)-Math.max(e.from,n.from);this.syncGutters(i<(n.to-n.from)*.8)}if(t.geometryChanged){let e=this.view.contentHeight/this.view.scaleY+"px";this.dom.style.minHeight=e,this.domAfter&&(this.domAfter.style.minHeight=e)}this.view.state.facet($E)!=!this.fixed&&(this.fixed=!this.fixed,this.dom.style.position=this.fixed?"sticky":"",this.domAfter&&(this.domAfter.style.position=this.fixed?"sticky":"")),this.prevViewport=t.view.viewport}syncGutters(t){let e=this.dom.nextSibling;t&&(this.dom.remove(),this.domAfter&&this.domAfter.remove());let n=rt.iter(this.view.state.facet(Pm),this.view.viewport.from),i=[],r=this.gutters.map(s=>new MJ(s,this.view.viewport,-this.view.documentPadding.top));for(let s of this.view.viewportLineBlocks)if(i.length&&(i=[]),Array.isArray(s.type)){let o=!0;for(let l of s.type)if(l.type==zn.Text&&o){V1(n,i,l.from);for(let c of r)c.line(this.view,l,i);o=!1}else if(l.widget)for(let c of r)c.widget(this.view,l)}else if(s.type==zn.Text){V1(n,i,s.from);for(let o of r)o.line(this.view,s,i)}else if(s.widget)for(let o of r)o.widget(this.view,s);for(let s of r)s.finish();t&&(this.view.scrollDOM.insertBefore(this.dom,e),this.domAfter&&this.view.scrollDOM.appendChild(this.domAfter))}updateGutters(t){let e=t.startState.facet(Uh),n=t.state.facet(Uh),i=t.docChanged||t.heightChanged||t.viewportChanged||!rt.eq(t.startState.facet(Pm),t.state.facet(Pm),t.view.viewport.from,t.view.viewport.to);if(e==n)for(let r of this.gutters)r.update(t)&&(i=!0);else{i=!0;let r=[];for(let s of n){let o=e.indexOf(s);o<0?r.push(new ME(this.view,s)):(this.gutters[o].update(t),r.push(this.gutters[o]))}for(let s of this.gutters)s.dom.remove(),r.indexOf(s)<0&&s.destroy();for(let s of r)s.config.side=="after"?this.getDOMAfter().appendChild(s.dom):this.dom.appendChild(s.dom);this.gutters=r}return i}destroy(){for(let t of this.gutters)t.destroy();this.dom.remove(),this.domAfter&&this.domAfter.remove()}},{provide:t=>ye.scrollMargins.of(e=>{let n=e.plugin(t);if(!n||n.gutters.length==0||!n.fixed)return null;let i=n.dom.offsetWidth*e.scaleX,r=n.domAfter?n.domAfter.offsetWidth*e.scaleX:0;return e.textDirection==Ct.LTR?{left:i,right:r}:{right:i,left:r}})});function LE(t){return Array.isArray(t)?t:[t]}function V1(t,e,n){for(;t.value&&t.from<=n;)t.from==n&&e.push(t.value),t.next()}class MJ{constructor(e,n,i){this.gutter=e,this.height=i,this.i=0,this.cursor=rt.iter(e.markers,n.from)}addElement(e,n,i){let{gutter:r}=this,s=(n.top-this.height)/e.scaleY,o=n.height/e.scaleY;if(this.i==r.elements.length){let l=new bD(e,o,s,i);r.elements.push(l),r.dom.appendChild(l.dom)}else r.elements[this.i].update(e,o,s,i);this.height=n.bottom,this.i++}line(e,n,i){let r=[];V1(this.cursor,r,n.from),i.length&&(r=r.concat(i));let s=this.gutter.config.lineMarker(e,n,r);s&&r.unshift(s);let o=this.gutter;r.length==0&&!o.config.renderEmptyElements||this.addElement(e,n,r)}widget(e,n){let i=this.gutter.config.widgetMarker(e,n.widget,n),r=i?[i]:null;for(let s of e.state.facet(AJ)){let o=s(e,n.widget,n);o&&(r||(r=[])).push(o)}r&&this.addElement(e,n,r)}finish(){let e=this.gutter;for(;e.elements.length>this.i;){let n=e.elements.pop();e.dom.removeChild(n.dom),n.destroy()}}}class ME{constructor(e,n){this.view=e,this.config=n,this.elements=[],this.spacer=null,this.dom=document.createElement("div"),this.dom.className="cm-gutter"+(this.config.class?" "+this.config.class:"");for(let i in n.domEventHandlers)this.dom.addEventListener(i,r=>{let s=r.target,o;if(s!=this.dom&&this.dom.contains(s)){for(;s.parentNode!=this.dom;)s=s.parentNode;let c=s.getBoundingClientRect();o=(c.top+c.bottom)/2}else o=r.clientY;let l=e.lineBlockAtHeight(o-e.documentTop);n.domEventHandlers[i](e,l,r)&&r.preventDefault()});this.markers=LE(n.markers(e)),n.initialSpacer&&(this.spacer=new bD(e,0,0,[n.initialSpacer(e)]),this.dom.appendChild(this.spacer.dom),this.spacer.dom.style.cssText+="visibility: hidden; pointer-events: none")}update(e){let n=this.markers;if(this.markers=LE(this.config.markers(e.view)),this.spacer&&this.config.updateSpacer){let r=this.config.updateSpacer(this.spacer.markers[0],e);r!=this.spacer.markers[0]&&this.spacer.update(e.view,0,0,[r])}let i=e.view.viewport;return!rt.eq(this.markers,n,i.from,i.to)||(this.config.lineMarkerChange?this.config.lineMarkerChange(e):!1)}destroy(){for(let e of this.elements)e.destroy()}}class bD{constructor(e,n,i,r){this.height=-1,this.above=0,this.markers=[],this.dom=document.createElement("div"),this.dom.className="cm-gutterElement",this.update(e,n,i,r)}update(e,n,i,r){this.height!=n&&(this.height=n,this.dom.style.height=n+"px"),this.above!=i&&(this.dom.style.marginTop=(this.above=i)?i+"px":""),DJ(this.markers,r)||this.setMarkers(e,r)}setMarkers(e,n){let i="cm-gutterElement",r=this.dom.firstChild;for(let s=0,o=0;;){let l=o,c=s<n.length?n[s++]:null,h=!1;if(c){let d=c.elementClass;d&&(i+=" "+d);for(let p=o;p<this.markers.length;p++)if(this.markers[p].compare(c)){l=p,h=!0;break}}else l=this.markers.length;for(;o<l;){let d=this.markers[o++];if(d.toDOM){d.destroy(r);let p=r.nextSibling;r.remove(),r=p}}if(!c)break;c.toDOM&&(h?r=r.nextSibling:this.dom.insertBefore(c.toDOM(e),r)),h&&o++}this.dom.className=i,this.markers=n}destroy(){this.setMarkers(null,[])}}function DJ(t,e){if(t.length!=e.length)return!1;for(let n=0;n<t.length;n++)if(!t[n].compare(e[n]))return!1;return!0}const jJ=we.define(),NJ=we.define(),fc=we.define({combine(t){return Ur(t,{formatNumber:String,domEventHandlers:{}},{domEventHandlers(e,n){let i=Object.assign({},e);for(let r in n){let s=i[r],o=n[r];i[r]=s?(l,c,h)=>s(l,c,h)||o(l,c,h):o}return i}})}});class jb extends Ms{constructor(e){super(),this.number=e}eq(e){return this.number==e.number}toDOM(){return document.createTextNode(this.number)}}function Nb(t,e){return t.state.facet(fc).formatNumber(e,t.state)}const zJ=Uh.compute([fc],t=>({class:"cm-lineNumbers",renderEmptyElements:!1,markers(e){return e.state.facet(jJ)},lineMarker(e,n,i){return i.some(r=>r.toDOM)?null:new jb(Nb(e,e.state.doc.lineAt(n.from).number))},widgetMarker:(e,n,i)=>{for(let r of e.state.facet(NJ)){let s=r(e,n,i);if(s)return s}return null},lineMarkerChange:e=>e.startState.facet(fc)!=e.state.facet(fc),initialSpacer(e){return new jb(Nb(e,DE(e.state.doc.lines)))},updateSpacer(e,n){let i=Nb(n.view,DE(n.view.state.doc.lines));return i==e.number?e:new jb(i)},domEventHandlers:t.facet(fc).domEventHandlers,side:"before"}));function IJ(t={}){return[fc.of(t),yD(),zJ]}function DE(t){let e=9;for(;e<t;)e=e*10+9;return e}const XJ=new class extends Ms{constructor(){super(...arguments),this.elementClass="cm-activeLineGutter"}},VJ=Pm.compute(["selection"],t=>{let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.head).from;r>n&&(n=r,e.push(XJ.range(r)))}return rt.of(e)});function BJ(){return VJ}let ZJ=0,Ar=class B1{constructor(e,n,i,r){this.name=e,this.set=n,this.base=i,this.modified=r,this.id=ZJ++}toString(){let{name:e}=this;for(let n of this.modified)n.name&&(e=`${n.name}(${e})`);return e}static define(e,n){let i=typeof e=="string"?e:"?";if(e instanceof B1&&(n=e),n!=null&&n.base)throw new Error("Can not derive from a modified tag");let r=new B1(i,[],null,[]);if(r.set.push(r),n)for(let s of n.set)r.set.push(s);return r}static defineModifier(e){let n=new mg(e);return i=>i.modified.indexOf(n)>-1?i:mg.get(i.base||i,i.modified.concat(n).sort((r,s)=>r.id-s.id))}},qJ=0;class mg{constructor(e){this.name=e,this.instances=[],this.id=qJ++}static get(e,n){if(!n.length)return e;let i=n[0].instances.find(l=>l.base==e&&UJ(n,l.modified));if(i)return i;let r=[],s=new Ar(e.name,r,e,n);for(let l of n)l.instances.push(s);let o=YJ(n);for(let l of e.set)if(!l.modified.length)for(let c of o)r.push(mg.get(l,c));return s}}function UJ(t,e){return t.length==e.length&&t.every((n,i)=>n==e[i])}function YJ(t){let e=[[]];for(let n=0;n<t.length;n++)for(let i=0,r=e.length;i<r;i++)e.push(e[i].concat(t[n]));return e.sort((n,i)=>i.length-n.length)}function Xs(t){let e=Object.create(null);for(let n in t){let i=t[n];Array.isArray(i)||(i=[i]);for(let r of n.split(" "))if(r){let s=[],o=2,l=r;for(let p=0;;){if(l=="..."&&p>0&&p+3==r.length){o=1;break}let g=/^"(?:[^"\\]|\\.)*?"|[^\/!]+/.exec(l);if(!g)throw new RangeError("Invalid path: "+r);if(s.push(g[0]=="*"?"":g[0][0]=='"'?JSON.parse(g[0]):g[0]),p+=g[0].length,p==r.length)break;let O=r[p++];if(p==r.length&&O=="!"){o=0;break}if(O!="/")throw new RangeError("Invalid path: "+r);l=r.slice(p)}let c=s.length-1,h=s[c];if(!h)throw new RangeError("Invalid path: "+r);let d=new vf(i,o,c>0?s.slice(0,c):null);e[h]=d.sort(e[h])}}return xD.add(e)}const xD=new Me({combine(t,e){let n,i,r;for(;t||e;){if(!t||e&&t.depth>=e.depth?(r=e,e=e.next):(r=t,t=t.next),n&&n.mode==r.mode&&!r.context&&!n.context)continue;let s=new vf(r.tags,r.mode,r.context);n?n.next=s:i=s,n=s}return i}});class vf{constructor(e,n,i,r){this.tags=e,this.mode=n,this.context=i,this.next=r}get opaque(){return this.mode==0}get inherit(){return this.mode==1}sort(e){return!e||e.depth<this.depth?(this.next=e,this):(e.next=this.sort(e.next),e)}get depth(){return this.context?this.context.length:0}}vf.empty=new vf([],2,null);function vD(t,e){let n=Object.create(null);for(let s of t)if(!Array.isArray(s.tag))n[s.tag.id]=s.class;else for(let o of s.tag)n[o.id]=s.class;let{scope:i,all:r=null}=e||{};return{style:s=>{let o=r;for(let l of s)for(let c of l.set){let h=n[c.id];if(h){o=o?o+" "+h:h;break}}return o},scope:i}}function GJ(t,e){let n=null;for(let i of t){let r=i.style(e);r&&(n=n?n+" "+r:r)}return n}function WJ(t,e,n,i=0,r=t.length){let s=new HJ(i,Array.isArray(e)?e:[e],n);s.highlightRange(t.cursor(),i,r,"",s.highlighters),s.flush(r)}class HJ{constructor(e,n,i){this.at=e,this.highlighters=n,this.span=i,this.class=""}startSpan(e,n){n!=this.class&&(this.flush(e),e>this.at&&(this.at=e),this.class=n)}flush(e){e>this.at&&this.class&&this.span(this.at,e,this.class)}highlightRange(e,n,i,r,s){let{type:o,from:l,to:c}=e;if(l>=i||c<=n)return;o.isTop&&(s=this.highlighters.filter(O=>!O.scope||O.scope(o)));let h=r,d=FJ(e)||vf.empty,p=GJ(s,d.tags);if(p&&(h&&(h+=" "),h+=p,d.mode==1&&(r+=(r?" ":"")+p)),this.startSpan(Math.max(n,l),h),d.opaque)return;let g=e.tree&&e.tree.prop(Me.mounted);if(g&&g.overlay){let O=e.node.enter(g.overlay[0].from+l,1),x=this.highlighters.filter(_=>!_.scope||_.scope(g.tree.type)),S=e.firstChild();for(let _=0,k=l;;_++){let P=_<g.overlay.length?g.overlay[_]:null,Q=P?P.from+l:c,R=Math.max(n,k),$=Math.min(i,Q);if(R<$&&S)for(;e.from<$&&(this.highlightRange(e,R,$,r,s),this.startSpan(Math.min($,e.to),h),!(e.to>=Q||!e.nextSibling())););if(!P||Q>i)break;k=P.to+l,k>n&&(this.highlightRange(O.cursor(),Math.max(n,P.from+l),Math.min(i,k),"",x),this.startSpan(Math.min(i,k),h))}S&&e.parent()}else if(e.firstChild()){g&&(r="");do if(!(e.to<=n)){if(e.from>=i)break;this.highlightRange(e,n,i,r,s),this.startSpan(Math.min(i,e.to),h)}while(e.nextSibling());e.parent()}}}function FJ(t){let e=t.type.prop(xD);for(;e&&e.context&&!t.matchContext(e.context);)e=e.next;return e||null}const xe=Ar.define,Jp=xe(),bo=xe(),jE=xe(bo),NE=xe(bo),xo=xe(),em=xe(xo),zb=xe(xo),Pr=xe(),ya=xe(Pr),Sr=xe(),_r=xe(),Z1=xe(),Oh=xe(Z1),tm=xe(),A={comment:Jp,lineComment:xe(Jp),blockComment:xe(Jp),docComment:xe(Jp),name:bo,variableName:xe(bo),typeName:jE,tagName:xe(jE),propertyName:NE,attributeName:xe(NE),className:xe(bo),labelName:xe(bo),namespace:xe(bo),macroName:xe(bo),literal:xo,string:em,docString:xe(em),character:xe(em),attributeValue:xe(em),number:zb,integer:xe(zb),float:xe(zb),bool:xe(xo),regexp:xe(xo),escape:xe(xo),color:xe(xo),url:xe(xo),keyword:Sr,self:xe(Sr),null:xe(Sr),atom:xe(Sr),unit:xe(Sr),modifier:xe(Sr),operatorKeyword:xe(Sr),controlKeyword:xe(Sr),definitionKeyword:xe(Sr),moduleKeyword:xe(Sr),operator:_r,derefOperator:xe(_r),arithmeticOperator:xe(_r),logicOperator:xe(_r),bitwiseOperator:xe(_r),compareOperator:xe(_r),updateOperator:xe(_r),definitionOperator:xe(_r),typeOperator:xe(_r),controlOperator:xe(_r),punctuation:Z1,separator:xe(Z1),bracket:Oh,angleBracket:xe(Oh),squareBracket:xe(Oh),paren:xe(Oh),brace:xe(Oh),content:Pr,heading:ya,heading1:xe(ya),heading2:xe(ya),heading3:xe(ya),heading4:xe(ya),heading5:xe(ya),heading6:xe(ya),contentSeparator:xe(Pr),list:xe(Pr),quote:xe(Pr),emphasis:xe(Pr),strong:xe(Pr),link:xe(Pr),monospace:xe(Pr),strikethrough:xe(Pr),inserted:xe(),deleted:xe(),changed:xe(),invalid:xe(),meta:tm,documentMeta:xe(tm),annotation:xe(tm),processingInstruction:xe(tm),definition:Ar.defineModifier("definition"),constant:Ar.defineModifier("constant"),function:Ar.defineModifier("function"),standard:Ar.defineModifier("standard"),local:Ar.defineModifier("local"),special:Ar.defineModifier("special")};for(let t in A){let e=A[t];e instanceof Ar&&(e.name=t)}vD([{tag:A.link,class:"tok-link"},{tag:A.heading,class:"tok-heading"},{tag:A.emphasis,class:"tok-emphasis"},{tag:A.strong,class:"tok-strong"},{tag:A.keyword,class:"tok-keyword"},{tag:A.atom,class:"tok-atom"},{tag:A.bool,class:"tok-bool"},{tag:A.url,class:"tok-url"},{tag:A.labelName,class:"tok-labelName"},{tag:A.inserted,class:"tok-inserted"},{tag:A.deleted,class:"tok-deleted"},{tag:A.literal,class:"tok-literal"},{tag:A.string,class:"tok-string"},{tag:A.number,class:"tok-number"},{tag:[A.regexp,A.escape,A.special(A.string)],class:"tok-string2"},{tag:A.variableName,class:"tok-variableName"},{tag:A.local(A.variableName),class:"tok-variableName tok-local"},{tag:A.definition(A.variableName),class:"tok-variableName tok-definition"},{tag:A.special(A.variableName),class:"tok-variableName2"},{tag:A.definition(A.propertyName),class:"tok-propertyName tok-definition"},{tag:A.typeName,class:"tok-typeName"},{tag:A.namespace,class:"tok-namespace"},{tag:A.className,class:"tok-className"},{tag:A.macroName,class:"tok-macroName"},{tag:A.propertyName,class:"tok-propertyName"},{tag:A.operator,class:"tok-operator"},{tag:A.comment,class:"tok-comment"},{tag:A.meta,class:"tok-meta"},{tag:A.invalid,class:"tok-invalid"},{tag:A.punctuation,class:"tok-punctuation"}]);var Ib;const Lo=new Me;function lO(t){return we.define({combine:t?e=>e.concat(t):void 0})}const CS=new Me;class _i{constructor(e,n,i=[],r=""){this.data=e,this.name=r,Ue.prototype.hasOwnProperty("tree")||Object.defineProperty(Ue.prototype,"tree",{get(){return pt(this)}}),this.parser=n,this.extension=[Uo.of(this),Ue.languageData.of((s,o,l)=>{let c=zE(s,o,l),h=c.type.prop(Lo);if(!h)return[];let d=s.facet(h),p=c.type.prop(CS);if(p){let g=c.resolve(o-c.from,l);for(let O of p)if(O.test(g,s)){let x=s.facet(O.facet);return O.type=="replace"?x:x.concat(d)}}return d})].concat(i)}isActiveAt(e,n,i=-1){return zE(e,n,i).type.prop(Lo)==this.data}findRegions(e){let n=e.facet(Uo);if((n==null?void 0:n.data)==this.data)return[{from:0,to:e.doc.length}];if(!n||!n.allowsNesting)return[];let i=[],r=(s,o)=>{if(s.prop(Lo)==this.data){i.push({from:o,to:o+s.length});return}let l=s.prop(Me.mounted);if(l){if(l.tree.prop(Lo)==this.data){if(l.overlay)for(let c of l.overlay)i.push({from:c.from+o,to:c.to+o});else i.push({from:o,to:o+s.length});return}else if(l.overlay){let c=i.length;if(r(l.tree,l.overlay[0].from+o),i.length>c)return}}for(let c=0;c<s.children.length;c++){let h=s.children[c];h instanceof Ge&&r(h,s.positions[c]+o)}};return r(pt(e),0),i}get allowsNesting(){return!0}}_i.setState=De.define();function zE(t,e,n){let i=t.facet(Uo),r=pt(t).topNode;if(!i||i.allowsNesting)for(let s=r;s;s=s.enter(e,n,wt.ExcludeBuffers))s.type.isTop&&(r=s);return r}class Ds extends _i{constructor(e,n,i){super(e,n,[],i),this.parser=n}static define(e){let n=lO(e.languageData);return new Ds(n,e.parser.configure({props:[Lo.add(i=>i.isTop?n:void 0)]}),e.name)}configure(e,n){return new Ds(this.data,this.parser.configure(e),n||this.name)}get allowsNesting(){return this.parser.hasWrappers()}}function pt(t){let e=t.field(_i.state,!1);return e?e.tree:Ge.empty}class KJ{constructor(e){this.doc=e,this.cursorPos=0,this.string="",this.cursor=e.iter()}get length(){return this.doc.length}syncTo(e){return this.string=this.cursor.next(e-this.cursorPos).value,this.cursorPos=e+this.string.length,this.cursorPos-this.string.length}chunk(e){return this.syncTo(e),this.string}get lineChunks(){return!0}read(e,n){let i=this.cursorPos-this.string.length;return e<i||n>=this.cursorPos?this.doc.sliceString(e,n):this.string.slice(e-i,n-i)}}let yh=null;class tl{constructor(e,n,i=[],r,s,o,l,c){this.parser=e,this.state=n,this.fragments=i,this.tree=r,this.treeLen=s,this.viewport=o,this.skipped=l,this.scheduleOn=c,this.parse=null,this.tempSkipped=[]}static create(e,n,i){return new tl(e,n,[],Ge.empty,0,i,[],null)}startParse(){return this.parser.startParse(new KJ(this.state.doc),this.fragments)}work(e,n){return n!=null&&n>=this.state.doc.length&&(n=void 0),this.tree!=Ge.empty&&this.isDone(n??this.state.doc.length)?(this.takeTree(),!0):this.withContext(()=>{var i;if(typeof e=="number"){let r=Date.now()+e;e=()=>Date.now()>r}for(this.parse||(this.parse=this.startParse()),n!=null&&(this.parse.stoppedAt==null||this.parse.stoppedAt>n)&&n<this.state.doc.length&&this.parse.stopAt(n);;){let r=this.parse.advance();if(r)if(this.fragments=this.withoutTempSkipped(Qs.addTree(r,this.fragments,this.parse.stoppedAt!=null)),this.treeLen=(i=this.parse.stoppedAt)!==null&&i!==void 0?i:this.state.doc.length,this.tree=r,this.parse=null,this.treeLen<(n??this.state.doc.length))this.parse=this.startParse();else return!0;if(e())return!1}})}takeTree(){let e,n;this.parse&&(e=this.parse.parsedPos)>=this.treeLen&&((this.parse.stoppedAt==null||this.parse.stoppedAt>e)&&this.parse.stopAt(e),this.withContext(()=>{for(;!(n=this.parse.advance()););}),this.treeLen=e,this.tree=n,this.fragments=this.withoutTempSkipped(Qs.addTree(this.tree,this.fragments,!0)),this.parse=null)}withContext(e){let n=yh;yh=this;try{return e()}finally{yh=n}}withoutTempSkipped(e){for(let n;n=this.tempSkipped.pop();)e=IE(e,n.from,n.to);return e}changes(e,n){let{fragments:i,tree:r,treeLen:s,viewport:o,skipped:l}=this;if(this.takeTree(),!e.empty){let c=[];if(e.iterChangedRanges((h,d,p,g)=>c.push({fromA:h,toA:d,fromB:p,toB:g})),i=Qs.applyChanges(i,c),r=Ge.empty,s=0,o={from:e.mapPos(o.from,-1),to:e.mapPos(o.to,1)},this.skipped.length){l=[];for(let h of this.skipped){let d=e.mapPos(h.from,1),p=e.mapPos(h.to,-1);d<p&&l.push({from:d,to:p})}}}return new tl(this.parser,n,i,r,s,o,l,this.scheduleOn)}updateViewport(e){if(this.viewport.from==e.from&&this.viewport.to==e.to)return!1;this.viewport=e;let n=this.skipped.length;for(let i=0;i<this.skipped.length;i++){let{from:r,to:s}=this.skipped[i];r<e.to&&s>e.from&&(this.fragments=IE(this.fragments,r,s),this.skipped.splice(i--,1))}return this.skipped.length>=n?!1:(this.reset(),!0)}reset(){this.parse&&(this.takeTree(),this.parse=null)}skipUntilInView(e,n){this.skipped.push({from:e,to:n})}static getSkippingParser(e){return new class extends iO{createParse(n,i,r){let s=r[0].from,o=r[r.length-1].to;return{parsedPos:s,advance(){let c=yh;if(c){for(let h of r)c.tempSkipped.push(h);e&&(c.scheduleOn=c.scheduleOn?Promise.all([c.scheduleOn,e]):e)}return this.parsedPos=o,new Ge(Ht.none,[],[],o-s)},stoppedAt:null,stopAt(){}}}}}isDone(e){e=Math.min(e,this.state.doc.length);let n=this.fragments;return this.treeLen>=e&&n.length&&n[0].from==0&&n[0].to>=e}static get(){return yh}}function IE(t,e,n){return Qs.applyChanges(t,[{fromA:e,toA:n,fromB:e,toB:n}])}class Gc{constructor(e){this.context=e,this.tree=e.tree}apply(e){if(!e.docChanged&&this.tree==this.context.tree)return this;let n=this.context.changes(e.changes,e.state),i=this.context.treeLen==e.startState.doc.length?void 0:Math.max(e.changes.mapPos(this.context.treeLen),n.viewport.to);return n.work(20,i)||n.takeTree(),new Gc(n)}static init(e){let n=Math.min(3e3,e.doc.length),i=tl.create(e.facet(Uo).parser,e,{from:0,to:n});return i.work(20,n)||i.takeTree(),new Gc(i)}}_i.state=cn.define({create:Gc.init,update(t,e){for(let n of e.effects)if(n.is(_i.setState))return n.value;return e.startState.facet(Uo)!=e.state.facet(Uo)?Gc.init(e.state):t.apply(e)}});let SD=t=>{let e=setTimeout(()=>t(),500);return()=>clearTimeout(e)};typeof requestIdleCallback<"u"&&(SD=t=>{let e=-1,n=setTimeout(()=>{e=requestIdleCallback(t,{timeout:400})},100);return()=>e<0?clearTimeout(n):cancelIdleCallback(e)});const Xb=typeof navigator<"u"&&(!((Ib=navigator.scheduling)===null||Ib===void 0)&&Ib.isInputPending)?()=>navigator.scheduling.isInputPending():null,JJ=Dt.fromClass(class{constructor(e){this.view=e,this.working=null,this.workScheduled=0,this.chunkEnd=-1,this.chunkBudget=-1,this.work=this.work.bind(this),this.scheduleWork()}update(e){let n=this.view.state.field(_i.state).context;(n.updateViewport(e.view.viewport)||this.view.viewport.to>n.treeLen)&&this.scheduleWork(),(e.docChanged||e.selectionSet)&&(this.view.hasFocus&&(this.chunkBudget+=50),this.scheduleWork()),this.checkAsyncSchedule(n)}scheduleWork(){if(this.working)return;let{state:e}=this.view,n=e.field(_i.state);(n.tree!=n.context.tree||!n.context.isDone(e.doc.length))&&(this.working=SD(this.work))}work(e){this.working=null;let n=Date.now();if(this.chunkEnd<n&&(this.chunkEnd<0||this.view.hasFocus)&&(this.chunkEnd=n+3e4,this.chunkBudget=3e3),this.chunkBudget<=0)return;let{state:i,viewport:{to:r}}=this.view,s=i.field(_i.state);if(s.tree==s.context.tree&&s.context.isDone(r+1e5))return;let o=Date.now()+Math.min(this.chunkBudget,100,e&&!Xb?Math.max(25,e.timeRemaining()-5):1e9),l=s.context.treeLen<r&&i.doc.length>r+1e3,c=s.context.work(()=>Xb&&Xb()||Date.now()>o,r+(l?0:1e5));this.chunkBudget-=Date.now()-n,(c||this.chunkBudget<=0)&&(s.context.takeTree(),this.view.dispatch({effects:_i.setState.of(new Gc(s.context))})),this.chunkBudget>0&&!(c&&!l)&&this.scheduleWork(),this.checkAsyncSchedule(s.context)}checkAsyncSchedule(e){e.scheduleOn&&(this.workScheduled++,e.scheduleOn.then(()=>this.scheduleWork()).catch(n=>ni(this.view.state,n)).then(()=>this.workScheduled--),e.scheduleOn=null)}destroy(){this.working&&this.working()}isWorking(){return!!(this.working||this.workScheduled>0)}},{eventHandlers:{focus(){this.scheduleWork()}}}),Uo=we.define({combine(t){return t.length?t[0]:null},enables:t=>[_i.state,JJ,ye.contentAttributes.compute([t],e=>{let n=e.facet(t);return n&&n.name?{"data-language":n.name}:{}})]});class Xr{constructor(e,n=[]){this.language=e,this.support=n,this.extension=[e,n]}}class ee{constructor(e,n,i,r,s,o=void 0){this.name=e,this.alias=n,this.extensions=i,this.filename=r,this.loadFunc=s,this.support=o,this.loading=null}load(){return this.loading||(this.loading=this.loadFunc().then(e=>this.support=e,e=>{throw this.loading=null,e}))}static of(e){let{load:n,support:i}=e;if(!n){if(!i)throw new RangeError("Must pass either 'load' or 'support' to LanguageDescription.of");n=()=>Promise.resolve(i)}return new ee(e.name,(e.alias||[]).concat(e.name).map(r=>r.toLowerCase()),e.extensions||[],e.filename,n,i)}static matchFilename(e,n){for(let r of e)if(r.filename&&r.filename.test(n))return r;let i=/\.([^.]+)$/.exec(n);if(i){for(let r of e)if(r.extensions.indexOf(i[1])>-1)return r}return null}static matchLanguageName(e,n,i=!0){n=n.toLowerCase();for(let r of e)if(r.alias.some(s=>s==n))return r;if(i)for(let r of e)for(let s of r.alias){let o=n.indexOf(s);if(o>-1&&(s.length>2||!/\w/.test(n[o-1])&&!/\w/.test(n[o+s.length])))return r}return null}}const eee=we.define(),uu=we.define({combine:t=>{if(!t.length)return" ";let e=t[0];if(!e||/\S/.test(e)||Array.from(e).some(n=>n!=e[0]))throw new Error("Invalid indent unit: "+JSON.stringify(t[0]));return e}});function nl(t){let e=t.facet(uu);return e.charCodeAt(0)==9?t.tabSize*e.length:e.length}function Sf(t,e){let n="",i=t.tabSize,r=t.facet(uu)[0];if(r==" "){for(;e>=i;)n+=" ",e-=i;r=" "}for(let s=0;s<e;s++)n+=r;return n}function ES(t,e){t instanceof Ue&&(t=new cO(t));for(let i of t.state.facet(eee)){let r=i(t,e);if(r!==void 0)return r}let n=pt(t.state);return n.length>=e?tee(t,n,e):null}class cO{constructor(e,n={}){this.state=e,this.options=n,this.unit=nl(e)}lineAt(e,n=1){let i=this.state.doc.lineAt(e),{simulateBreak:r,simulateDoubleBreak:s}=this.options;return r!=null&&r>=i.from&&r<=i.to?s&&r==e?{text:"",from:e}:(n<0?r<e:r<=e)?{text:i.text.slice(r-i.from),from:r}:{text:i.text.slice(0,r-i.from),from:i.from}:i}textAfterPos(e,n=1){if(this.options.simulateDoubleBreak&&e==this.options.simulateBreak)return"";let{text:i,from:r}=this.lineAt(e,n);return i.slice(e-r,Math.min(i.length,e+100-r))}column(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.countColumn(i,e-r),o=this.options.overrideIndentation?this.options.overrideIndentation(r):-1;return o>-1&&(s+=o-this.countColumn(i,i.search(/\S|$/))),s}countColumn(e,n=e.length){return hr(e,this.state.tabSize,n)}lineIndent(e,n=1){let{text:i,from:r}=this.lineAt(e,n),s=this.options.overrideIndentation;if(s){let o=s(r);if(o>-1)return o}return this.countColumn(i,i.search(/\S|$/))}get simulatedBreak(){return this.options.simulateBreak||null}}const Ho=new Me;function tee(t,e,n){let i=e.resolveStack(n),r=e.resolveInner(n,-1).resolve(n,0).enterUnfinishedNodesBefore(n);if(r!=i.node){let s=[];for(let o=r;o&&!(o.from<i.node.from||o.to>i.node.to||o.from==i.node.from&&o.type==i.node.type);o=o.parent)s.push(o);for(let o=s.length-1;o>=0;o--)i={node:s[o],next:i}}return _D(i,t,n)}function _D(t,e,n){for(let i=t;i;i=i.next){let r=iee(i.node);if(r)return r(AS.create(e,n,i))}return 0}function nee(t){return t.pos==t.options.simulateBreak&&t.options.simulateDoubleBreak}function iee(t){let e=t.type.prop(Ho);if(e)return e;let n=t.firstChild,i;if(n&&(i=n.type.prop(Me.closedBy))){let r=t.lastChild,s=r&&i.indexOf(r.name)>-1;return o=>kD(o,!0,1,void 0,s&&!nee(o)?r.from:void 0)}return t.parent==null?ree:null}function ree(){return 0}class AS extends cO{constructor(e,n,i){super(e.state,e.options),this.base=e,this.pos=n,this.context=i}get node(){return this.context.node}static create(e,n,i){return new AS(e,n,i)}get textAfter(){return this.textAfterPos(this.pos)}get baseIndent(){return this.baseIndentFor(this.node)}baseIndentFor(e){let n=this.state.doc.lineAt(e.from);for(;;){let i=e.resolve(n.from);for(;i.parent&&i.parent.from==i.from;)i=i.parent;if(see(i,e))break;n=this.state.doc.lineAt(i.from)}return this.lineIndent(n.from)}continue(){return _D(this.context.next,this.base,this.pos)}}function see(t,e){for(let n=e;n;n=n.parent)if(t==n)return!0;return!1}function oee(t){let e=t.node,n=e.childAfter(e.from),i=e.lastChild;if(!n)return null;let r=t.options.simulateBreak,s=t.state.doc.lineAt(n.from),o=r==null||r<=s.from?s.to:Math.min(s.to,r);for(let l=n.to;;){let c=e.childAfter(l);if(!c||c==i)return null;if(!c.type.isSkipped){if(c.from>=o)return null;let h=/^ */.exec(s.text.slice(n.to-s.from))[0].length;return{from:n.from,to:n.to+h}}l=c.to}}function q1({closing:t,align:e=!0,units:n=1}){return i=>kD(i,e,n,t)}function kD(t,e,n,i,r){let s=t.textAfter,o=s.match(/^\s*/)[0].length,l=i&&s.slice(o,o+i.length)==i||r==t.pos+o,c=e?oee(t):null;return c?l?t.column(c.from):t.column(c.to):t.baseIndent+(l?0:t.unit*n)}const aee=t=>t.baseIndent;function Sc({except:t,units:e=1}={}){return n=>{let i=t&&t.test(n.textAfter);return n.baseIndent+(i?0:e*n.unit)}}const lee=200;function cee(){return Ue.transactionFilter.of(t=>{if(!t.docChanged||!t.isUserEvent("input.type")&&!t.isUserEvent("input.complete"))return t;let e=t.startState.languageDataAt("indentOnInput",t.startState.selection.main.head);if(!e.length)return t;let n=t.newDoc,{head:i}=t.newSelection.main,r=n.lineAt(i);if(i>r.from+lee)return t;let s=n.sliceString(r.from,i);if(!e.some(h=>h.test(s)))return t;let{state:o}=t,l=-1,c=[];for(let{head:h}of o.selection.ranges){let d=o.doc.lineAt(h);if(d.from==l)continue;l=d.from;let p=ES(o,d.from);if(p==null)continue;let g=/^\s*/.exec(d.text)[0],O=Sf(o,p);g!=O&&c.push({from:d.from,to:d.from+g.length,insert:O})}return c.length?[t,{changes:c,sequential:!0}]:t})}const wD=we.define(),Fo=new Me;function uO(t){let e=t.firstChild,n=t.lastChild;return e&&e.to<n.from?{from:e.to,to:n.type.isError?t.to:n.from}:null}function uee(t,e,n){let i=pt(t);if(i.length<n)return null;let r=i.resolveStack(n,1),s=null;for(let o=r;o;o=o.next){let l=o.node;if(l.to<=n||l.from>n)continue;if(s&&l.from<e)break;let c=l.type.prop(Fo);if(c&&(l.to<i.length-50||i.length==t.doc.length||!hee(l))){let h=c(l,t);h&&h.from<=n&&h.from>=e&&h.to>n&&(s=h)}}return s}function hee(t){let e=t.lastChild;return e&&e.to==t.to&&e.type.isError}function gg(t,e,n){for(let i of t.facet(wD)){let r=i(t,e,n);if(r)return r}return uee(t,e,n)}function PD(t,e){let n=e.mapPos(t.from,1),i=e.mapPos(t.to,-1);return n>=i?void 0:{from:n,to:i}}const hO=De.define({map:PD}),Jf=De.define({map:PD});function TD(t){let e=[];for(let{head:n}of t.state.selection.ranges)e.some(i=>i.from<=n&&i.to>=n)||e.push(t.lineBlockAt(n));return e}const il=cn.define({create(){return ke.none},update(t,e){e.isUserEvent("delete")&&e.changes.iterChangedRanges((n,i)=>t=XE(t,n,i)),t=t.map(e.changes);for(let n of e.effects)if(n.is(hO)&&!fee(t,n.value.from,n.value.to)){let{preparePlaceholder:i}=e.state.facet(ED),r=i?ke.replace({widget:new bee(i(e.state,n.value))}):VE;t=t.update({add:[r.range(n.value.from,n.value.to)]})}else n.is(Jf)&&(t=t.update({filter:(i,r)=>n.value.from!=i||n.value.to!=r,filterFrom:n.value.from,filterTo:n.value.to}));return e.selection&&(t=XE(t,e.selection.main.head)),t},provide:t=>ye.decorations.from(t),toJSON(t,e){let n=[];return t.between(0,e.doc.length,(i,r)=>{n.push(i,r)}),n},fromJSON(t){if(!Array.isArray(t)||t.length%2)throw new RangeError("Invalid JSON for fold state");let e=[];for(let n=0;n<t.length;){let i=t[n++],r=t[n++];if(typeof i!="number"||typeof r!="number")throw new RangeError("Invalid JSON for fold state");e.push(VE.range(i,r))}return ke.set(e,!0)}});function XE(t,e,n=e){let i=!1;return t.between(e,n,(r,s)=>{r<n&&s>e&&(i=!0)}),i?t.update({filterFrom:e,filterTo:n,filter:(r,s)=>r>=n||s<=e}):t}function Og(t,e,n){var i;let r=null;return(i=t.field(il,!1))===null||i===void 0||i.between(e,n,(s,o)=>{(!r||r.from>s)&&(r={from:s,to:o})}),r}function fee(t,e,n){let i=!1;return t.between(e,e,(r,s)=>{r==e&&s==n&&(i=!0)}),i}function QD(t,e){return t.field(il,!1)?e:e.concat(De.appendConfig.of(AD()))}const dee=t=>{for(let e of TD(t)){let n=gg(t.state,e.from,e.to);if(n)return t.dispatch({effects:QD(t.state,[hO.of(n),CD(t,n)])}),!0}return!1},pee=t=>{if(!t.state.field(il,!1))return!1;let e=[];for(let n of TD(t)){let i=Og(t.state,n.from,n.to);i&&e.push(Jf.of(i),CD(t,i,!1))}return e.length&&t.dispatch({effects:e}),e.length>0};function CD(t,e,n=!0){let i=t.state.doc.lineAt(e.from).number,r=t.state.doc.lineAt(e.to).number;return ye.announce.of(`${t.state.phrase(n?"Folded lines":"Unfolded lines")} ${i} ${t.state.phrase("to")} ${r}.`)}const mee=t=>{let{state:e}=t,n=[];for(let i=0;i<e.doc.length;){let r=t.lineBlockAt(i),s=gg(e,r.from,r.to);s&&n.push(hO.of(s)),i=(s?t.lineBlockAt(s.to):r).to+1}return n.length&&t.dispatch({effects:QD(t.state,n)}),!!n.length},gee=t=>{let e=t.state.field(il,!1);if(!e||!e.size)return!1;let n=[];return e.between(0,t.state.doc.length,(i,r)=>{n.push(Jf.of({from:i,to:r}))}),t.dispatch({effects:n}),!0},Oee=[{key:"Ctrl-Shift-[",mac:"Cmd-Alt-[",run:dee},{key:"Ctrl-Shift-]",mac:"Cmd-Alt-]",run:pee},{key:"Ctrl-Alt-[",run:mee},{key:"Ctrl-Alt-]",run:gee}],yee={placeholderDOM:null,preparePlaceholder:null,placeholderText:"…"},ED=we.define({combine(t){return Ur(t,yee)}});function AD(t){return[il,See]}function RD(t,e){let{state:n}=t,i=n.facet(ED),r=o=>{let l=t.lineBlockAt(t.posAtDOM(o.target)),c=Og(t.state,l.from,l.to);c&&t.dispatch({effects:Jf.of(c)}),o.preventDefault()};if(i.placeholderDOM)return i.placeholderDOM(t,r,e);let s=document.createElement("span");return s.textContent=i.placeholderText,s.setAttribute("aria-label",n.phrase("folded code")),s.title=n.phrase("unfold"),s.className="cm-foldPlaceholder",s.onclick=r,s}const VE=ke.replace({widget:new class extends Ti{toDOM(t){return RD(t,null)}}});class bee extends Ti{constructor(e){super(),this.value=e}eq(e){return this.value==e.value}toDOM(e){return RD(e,this.value)}}const xee={openText:"⌄",closedText:"›",markerDOM:null,domEventHandlers:{},foldingChanged:()=>!1};class Vb extends Ms{constructor(e,n){super(),this.config=e,this.open=n}eq(e){return this.config==e.config&&this.open==e.open}toDOM(e){if(this.config.markerDOM)return this.config.markerDOM(this.open);let n=document.createElement("span");return n.textContent=this.open?this.config.openText:this.config.closedText,n.title=e.state.phrase(this.open?"Fold line":"Unfold line"),n}}function vee(t={}){let e={...xee,...t},n=new Vb(e,!0),i=new Vb(e,!1),r=Dt.fromClass(class{constructor(o){this.from=o.viewport.from,this.markers=this.buildMarkers(o)}update(o){(o.docChanged||o.viewportChanged||o.startState.facet(Uo)!=o.state.facet(Uo)||o.startState.field(il,!1)!=o.state.field(il,!1)||pt(o.startState)!=pt(o.state)||e.foldingChanged(o))&&(this.markers=this.buildMarkers(o.view))}buildMarkers(o){let l=new $s;for(let c of o.viewportLineBlocks){let h=Og(o.state,c.from,c.to)?i:gg(o.state,c.from,c.to)?n:null;h&&l.add(c.from,c.from,h)}return l.finish()}}),{domEventHandlers:s}=e;return[r,$J({class:"cm-foldGutter",markers(o){var l;return((l=o.plugin(r))===null||l===void 0?void 0:l.markers)||rt.empty},initialSpacer(){return new Vb(e,!1)},domEventHandlers:{...s,click:(o,l,c)=>{if(s.click&&s.click(o,l,c))return!0;let h=Og(o.state,l.from,l.to);if(h)return o.dispatch({effects:Jf.of(h)}),!0;let d=gg(o.state,l.from,l.to);return d?(o.dispatch({effects:hO.of(d)}),!0):!1}}}),AD()]}const See=ye.baseTheme({".cm-foldPlaceholder":{backgroundColor:"#eee",border:"1px solid #ddd",color:"#888",borderRadius:".2em",margin:"0 1px",padding:"0 1px",cursor:"pointer"},".cm-foldGutter span":{padding:"0 1px",cursor:"pointer"}});class ll{constructor(e,n){this.specs=e;let i;function r(l){let c=Bo.newName();return(i||(i=Object.create(null)))["."+c]=l,c}const s=typeof n.all=="string"?n.all:n.all?r(n.all):void 0,o=n.scope;this.scope=o instanceof _i?l=>l.prop(Lo)==o.data:o?l=>l==o:void 0,this.style=vD(e.map(l=>({tag:l.tag,class:l.class||r(Object.assign({},l,{tag:null}))})),{all:s}).style,this.module=i?new Bo(i):null,this.themeType=n.themeType}static define(e,n){return new ll(e,n||{})}}const U1=we.define(),$D=we.define({combine(t){return t.length?[t[0]]:null}});function Bb(t){let e=t.facet(U1);return e.length?e:t.facet($D)}function fO(t,e){let n=[kee],i;return t instanceof ll&&(t.module&&n.push(ye.styleModule.of(t.module)),i=t.themeType),e!=null&&e.fallback?n.push($D.of(t)):i?n.push(U1.computeN([ye.darkTheme],r=>r.facet(ye.darkTheme)==(i=="dark")?[t]:[])):n.push(U1.of(t)),n}class _ee{constructor(e){this.markCache=Object.create(null),this.tree=pt(e.state),this.decorations=this.buildDeco(e,Bb(e.state)),this.decoratedTo=e.viewport.to}update(e){let n=pt(e.state),i=Bb(e.state),r=i!=Bb(e.startState),{viewport:s}=e.view,o=e.changes.mapPos(this.decoratedTo,1);n.length<s.to&&!r&&n.type==this.tree.type&&o>=s.to?(this.decorations=this.decorations.map(e.changes),this.decoratedTo=o):(n!=this.tree||e.viewportChanged||r)&&(this.tree=n,this.decorations=this.buildDeco(e.view,i),this.decoratedTo=s.to)}buildDeco(e,n){if(!n||!this.tree.length)return ke.none;let i=new $s;for(let{from:r,to:s}of e.visibleRanges)WJ(this.tree,n,(o,l,c)=>{i.add(o,l,this.markCache[c]||(this.markCache[c]=ke.mark({class:c})))},r,s);return i.finish()}}const kee=Is.high(Dt.fromClass(_ee,{decorations:t=>t.decorations})),wee=ll.define([{tag:A.meta,color:"#404740"},{tag:A.link,textDecoration:"underline"},{tag:A.heading,textDecoration:"underline",fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.strong,fontWeight:"bold"},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.keyword,color:"#708"},{tag:[A.atom,A.bool,A.url,A.contentSeparator,A.labelName],color:"#219"},{tag:[A.literal,A.inserted],color:"#164"},{tag:[A.string,A.deleted],color:"#a11"},{tag:[A.regexp,A.escape,A.special(A.string)],color:"#e40"},{tag:A.definition(A.variableName),color:"#00f"},{tag:A.local(A.variableName),color:"#30a"},{tag:[A.typeName,A.namespace],color:"#085"},{tag:A.className,color:"#167"},{tag:[A.special(A.variableName),A.macroName],color:"#256"},{tag:A.definition(A.propertyName),color:"#00c"},{tag:A.comment,color:"#940"},{tag:A.invalid,color:"#f00"}]),Pee=ye.baseTheme({"&.cm-focused .cm-matchingBracket":{backgroundColor:"#328c8252"},"&.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bb555544"}}),LD=1e4,MD="()[]{}",DD=we.define({combine(t){return Ur(t,{afterCursor:!0,brackets:MD,maxScanDistance:LD,renderMatch:Cee})}}),Tee=ke.mark({class:"cm-matchingBracket"}),Qee=ke.mark({class:"cm-nonmatchingBracket"});function Cee(t){let e=[],n=t.matched?Tee:Qee;return e.push(n.range(t.start.from,t.start.to)),t.end&&e.push(n.range(t.end.from,t.end.to)),e}const Eee=cn.define({create(){return ke.none},update(t,e){if(!e.docChanged&&!e.selection)return t;let n=[],i=e.state.facet(DD);for(let r of e.state.selection.ranges){if(!r.empty)continue;let s=jr(e.state,r.head,-1,i)||r.head>0&&jr(e.state,r.head-1,1,i)||i.afterCursor&&(jr(e.state,r.head,1,i)||r.head<e.state.doc.length&&jr(e.state,r.head+1,-1,i));s&&(n=n.concat(i.renderMatch(s,e.state)))}return ke.set(n,!0)},provide:t=>ye.decorations.from(t)}),Aee=[Eee,Pee];function Ree(t={}){return[DD.of(t),Aee]}const jD=new Me;function Y1(t,e,n){let i=t.prop(e<0?Me.openedBy:Me.closedBy);if(i)return i;if(t.name.length==1){let r=n.indexOf(t.name);if(r>-1&&r%2==(e<0?1:0))return[n[r+e]]}return null}function G1(t){let e=t.type.prop(jD);return e?e(t.node):t}function jr(t,e,n,i={}){let r=i.maxScanDistance||LD,s=i.brackets||MD,o=pt(t),l=o.resolveInner(e,n);for(let c=l;c;c=c.parent){let h=Y1(c.type,n,s);if(h&&c.from<c.to){let d=G1(c);if(d&&(n>0?e>=d.from&&e<d.to:e>d.from&&e<=d.to))return $ee(t,e,n,c,d,h,s)}}return Lee(t,e,n,o,l.type,r,s)}function $ee(t,e,n,i,r,s,o){let l=i.parent,c={from:r.from,to:r.to},h=0,d=l==null?void 0:l.cursor();if(d&&(n<0?d.childBefore(i.from):d.childAfter(i.to)))do if(n<0?d.to<=i.from:d.from>=i.to){if(h==0&&s.indexOf(d.type.name)>-1&&d.from<d.to){let p=G1(d);return{start:c,end:p?{from:p.from,to:p.to}:void 0,matched:!0}}else if(Y1(d.type,n,o))h++;else if(Y1(d.type,-n,o)){if(h==0){let p=G1(d);return{start:c,end:p&&p.from<p.to?{from:p.from,to:p.to}:void 0,matched:!1}}h--}}while(n<0?d.prevSibling():d.nextSibling());return{start:c,matched:!1}}function Lee(t,e,n,i,r,s,o){let l=n<0?t.sliceDoc(e-1,e):t.sliceDoc(e,e+1),c=o.indexOf(l);if(c<0||c%2==0!=n>0)return null;let h={from:n<0?e-1:e,to:n>0?e+1:e},d=t.doc.iterRange(e,n>0?t.doc.length:0),p=0;for(let g=0;!d.next().done&&g<=s;){let O=d.value;n<0&&(g+=O.length);let x=e+g*n;for(let S=n>0?0:O.length-1,_=n>0?O.length:-1;S!=_;S+=n){let k=o.indexOf(O[S]);if(!(k<0||i.resolveInner(x+S,1).type!=r))if(k%2==0==n>0)p++;else{if(p==1)return{start:h,end:{from:x+S,to:x+S+1},matched:k>>1==c>>1};p--}}n>0&&(g+=O.length)}return d.done?{start:h,matched:!1}:null}function BE(t,e,n,i=0,r=0){e==null&&(e=t.search(/[^\s\u00a0]/),e==-1&&(e=t.length));let s=r;for(let o=i;o<e;o++)t.charCodeAt(o)==9?s+=n-s%n:s++;return s}class ND{constructor(e,n,i,r){this.string=e,this.tabSize=n,this.indentUnit=i,this.overrideIndent=r,this.pos=0,this.start=0,this.lastColumnPos=0,this.lastColumnValue=0}eol(){return this.pos>=this.string.length}sol(){return this.pos==0}peek(){return this.string.charAt(this.pos)||void 0}next(){if(this.pos<this.string.length)return this.string.charAt(this.pos++)}eat(e){let n=this.string.charAt(this.pos),i;if(typeof e=="string"?i=n==e:i=n&&(e instanceof RegExp?e.test(n):e(n)),i)return++this.pos,n}eatWhile(e){let n=this.pos;for(;this.eat(e););return this.pos>n}eatSpace(){let e=this.pos;for(;/[\s\u00a0]/.test(this.string.charAt(this.pos));)++this.pos;return this.pos>e}skipToEnd(){this.pos=this.string.length}skipTo(e){let n=this.string.indexOf(e,this.pos);if(n>-1)return this.pos=n,!0}backUp(e){this.pos-=e}column(){return this.lastColumnPos<this.start&&(this.lastColumnValue=BE(this.string,this.start,this.tabSize,this.lastColumnPos,this.lastColumnValue),this.lastColumnPos=this.start),this.lastColumnValue}indentation(){var e;return(e=this.overrideIndent)!==null&&e!==void 0?e:BE(this.string,null,this.tabSize)}match(e,n,i){if(typeof e=="string"){let r=o=>i?o.toLowerCase():o,s=this.string.substr(this.pos,e.length);return r(s)==r(e)?(n!==!1&&(this.pos+=e.length),!0):null}else{let r=this.string.slice(this.pos).match(e);return r&&r.index>0?null:(r&&n!==!1&&(this.pos+=r[0].length),r)}}current(){return this.string.slice(this.start,this.pos)}}function Mee(t){return{name:t.name||"",token:t.token,blankLine:t.blankLine||(()=>{}),startState:t.startState||(()=>!0),copyState:t.copyState||Dee,indent:t.indent||(()=>null),languageData:t.languageData||{},tokenTable:t.tokenTable||LS,mergeTokens:t.mergeTokens!==!1}}function Dee(t){if(typeof t!="object")return t;let e={};for(let n in t){let i=t[n];e[n]=i instanceof Array?i.slice():i}return e}const ZE=new WeakMap;class RS extends _i{constructor(e){let n=lO(e.languageData),i=Mee(e),r,s=new class extends iO{createParse(o,l,c){return new Nee(r,o,l,c)}};super(n,s,[],e.name),this.topNode=Xee(n,this),r=this,this.streamParser=i,this.stateAfter=new Me({perNode:!0}),this.tokenTable=e.tokenTable?new VD(i.tokenTable):Iee}static define(e){return new RS(e)}getIndent(e){let n,{overrideIndentation:i}=e.options;i&&(n=ZE.get(e.state),n!=null&&n<e.pos-1e4&&(n=void 0));let r=$S(this,e.node.tree,e.node.from,e.node.from,n??e.pos),s,o;if(r?(o=r.state,s=r.pos+1):(o=this.streamParser.startState(e.unit),s=e.node.from),e.pos-s>1e4)return null;for(;s<e.pos;){let c=e.state.doc.lineAt(s),h=Math.min(e.pos,c.to);if(c.length){let d=i?i(c.from):-1,p=new ND(c.text,e.state.tabSize,e.unit,d<0?void 0:d);for(;p.pos<h-c.from;)ID(this.streamParser.token,p,o)}else this.streamParser.blankLine(o,e.unit);if(h==e.pos)break;s=c.to+1}let l=e.lineAt(e.pos);return i&&n==null&&ZE.set(e.state,l.from),this.streamParser.indent(o,/^\s*(.*)/.exec(l.text)[1],e)}get allowsNesting(){return!1}}function $S(t,e,n,i,r){let s=n>=i&&n+e.length<=r&&e.prop(t.stateAfter);if(s)return{state:t.streamParser.copyState(s),pos:n+e.length};for(let o=e.children.length-1;o>=0;o--){let l=e.children[o],c=n+e.positions[o],h=l instanceof Ge&&c<r&&$S(t,l,c,i,r);if(h)return h}return null}function zD(t,e,n,i,r){if(r&&n<=0&&i>=e.length)return e;!r&&n==0&&e.type==t.topNode&&(r=!0);for(let s=e.children.length-1;s>=0;s--){let o=e.positions[s],l=e.children[s],c;if(o<i&&l instanceof Ge){if(!(c=zD(t,l,n-o,i-o,r)))break;return r?new Ge(e.type,e.children.slice(0,s).concat(c),e.positions.slice(0,s+1),o+c.length):c}}return null}function jee(t,e,n,i,r){for(let s of e){let o=s.from+(s.openStart?25:0),l=s.to-(s.openEnd?25:0),c=o<=n&&l>n&&$S(t,s.tree,0-s.offset,n,l),h;if(c&&c.pos<=i&&(h=zD(t,s.tree,n+s.offset,c.pos+s.offset,!1)))return{state:c.state,tree:h}}return{state:t.streamParser.startState(r?nl(r):4),tree:Ge.empty}}let Nee=class{constructor(e,n,i,r){this.lang=e,this.input=n,this.fragments=i,this.ranges=r,this.stoppedAt=null,this.chunks=[],this.chunkPos=[],this.chunk=[],this.chunkReused=void 0,this.rangeIndex=0,this.to=r[r.length-1].to;let s=tl.get(),o=r[0].from,{state:l,tree:c}=jee(e,i,o,this.to,s==null?void 0:s.state);this.state=l,this.parsedPos=this.chunkStart=o+c.length;for(let h=0;h<c.children.length;h++)this.chunks.push(c.children[h]),this.chunkPos.push(c.positions[h]);s&&this.parsedPos<s.viewport.from-1e5&&r.some(h=>h.from<=s.viewport.from&&h.to>=s.viewport.from)&&(this.state=this.lang.streamParser.startState(nl(s.state)),s.skipUntilInView(this.parsedPos,s.viewport.from),this.parsedPos=s.viewport.from),this.moveRangeIndex()}advance(){let e=tl.get(),n=this.stoppedAt==null?this.to:Math.min(this.to,this.stoppedAt),i=Math.min(n,this.chunkStart+512);for(e&&(i=Math.min(i,e.viewport.to));this.parsedPos<i;)this.parseLine(e);return this.chunkStart<this.parsedPos&&this.finishChunk(),this.parsedPos>=n?this.finish():e&&this.parsedPos>=e.viewport.to?(e.skipUntilInView(this.parsedPos,n),this.finish()):null}stopAt(e){this.stoppedAt=e}lineAfter(e){let n=this.input.chunk(e);if(this.input.lineChunks)n==`
402
+ `&&(n="");else{let i=n.indexOf(`
403
+ `);i>-1&&(n=n.slice(0,i))}return e+n.length<=this.to?n:n.slice(0,this.to-e)}nextLine(){let e=this.parsedPos,n=this.lineAfter(e),i=e+n.length;for(let r=this.rangeIndex;;){let s=this.ranges[r].to;if(s>=i||(n=n.slice(0,s-(i-n.length)),r++,r==this.ranges.length))break;let o=this.ranges[r].from,l=this.lineAfter(o);n+=l,i=o+l.length}return{line:n,end:i}}skipGapsTo(e,n,i){for(;;){let r=this.ranges[this.rangeIndex].to,s=e+n;if(i>0?r>s:r>=s)break;let o=this.ranges[++this.rangeIndex].from;n+=o-r}return n}moveRangeIndex(){for(;this.ranges[this.rangeIndex].to<this.parsedPos;)this.rangeIndex++}emitToken(e,n,i,r){let s=4;if(this.ranges.length>1){r=this.skipGapsTo(n,r,1),n+=r;let l=this.chunk.length;r=this.skipGapsTo(i,r,-1),i+=r,s+=this.chunk.length-l}let o=this.chunk.length-4;return this.lang.streamParser.mergeTokens&&s==4&&o>=0&&this.chunk[o]==e&&this.chunk[o+2]==n?this.chunk[o+2]=i:this.chunk.push(e,n,i,s),r}parseLine(e){let{line:n,end:i}=this.nextLine(),r=0,{streamParser:s}=this.lang,o=new ND(n,e?e.state.tabSize:4,e?nl(e.state):2);if(o.eol())s.blankLine(this.state,o.indentUnit);else for(;!o.eol();){let l=ID(s.token,o,this.state);if(l&&(r=this.emitToken(this.lang.tokenTable.resolve(l),this.parsedPos+o.start,this.parsedPos+o.pos,r)),o.start>1e4)break}this.parsedPos=i,this.moveRangeIndex(),this.parsedPos<this.to&&this.parsedPos++}finishChunk(){let e=Ge.build({buffer:this.chunk,start:this.chunkStart,length:this.parsedPos-this.chunkStart,nodeSet:zee,topID:0,maxBufferLength:512,reused:this.chunkReused});e=new Ge(e.type,e.children,e.positions,e.length,[[this.lang.stateAfter,this.lang.streamParser.copyState(this.state)]]),this.chunks.push(e),this.chunkPos.push(this.chunkStart-this.ranges[0].from),this.chunk=[],this.chunkReused=void 0,this.chunkStart=this.parsedPos}finish(){return new Ge(this.lang.topNode,this.chunks,this.chunkPos,this.parsedPos-this.ranges[0].from).balance()}};function ID(t,e,n){e.start=e.pos;for(let i=0;i<10;i++){let r=t(e,n);if(e.pos>e.start)return r}throw new Error("Stream parser failed to advance stream.")}const LS=Object.create(null),_f=[Ht.none],zee=new cu(_f),qE=[],UE=Object.create(null),XD=Object.create(null);for(let[t,e]of[["variable","variableName"],["variable-2","variableName.special"],["string-2","string.special"],["def","variableName.definition"],["tag","tagName"],["attribute","attributeName"],["type","typeName"],["builtin","variableName.standard"],["qualifier","modifier"],["error","invalid"],["header","heading"],["property","propertyName"]])XD[t]=BD(LS,e);class VD{constructor(e){this.extra=e,this.table=Object.assign(Object.create(null),XD)}resolve(e){return e?this.table[e]||(this.table[e]=BD(this.extra,e)):0}}const Iee=new VD(LS);function Zb(t,e){qE.indexOf(t)>-1||(qE.push(t),console.warn(e))}function BD(t,e){let n=[];for(let l of e.split(" ")){let c=[];for(let h of l.split(".")){let d=t[h]||A[h];d?typeof d=="function"?c.length?c=c.map(d):Zb(h,`Modifier ${h} used at start of tag`):c.length?Zb(h,`Tag ${h} used as modifier`):c=Array.isArray(d)?d:[d]:Zb(h,`Unknown highlighting tag ${h}`)}for(let h of c)n.push(h)}if(!n.length)return 0;let i=e.replace(/ /g,"_"),r=i+" "+n.map(l=>l.id),s=UE[r];if(s)return s.id;let o=UE[r]=Ht.define({id:_f.length,name:i,props:[Xs({[i]:n})]});return _f.push(o),o.id}function Xee(t,e){let n=Ht.define({id:_f.length,name:"Document",props:[Lo.add(()=>t),Ho.add(()=>i=>e.getIndent(i))],top:!0});return _f.push(n),n}Ct.RTL,Ct.LTR;const Vee=["HeaderMark","EmphasisMark","LinkMark","URL","HardBreak","QuoteMark","ListMark"],YE=ke.mark({class:"cm-md-hidden"}),Bee=ke.line({class:"cm-md-codeblock-line"}),Zee=ke.line({class:"cm-md-codeblock-line-start"}),qee=ke.line({class:"cm-md-codeblock-line-end"}),Uee=ke.line({class:"cm-md-codeblock-inactive"}),Yee=ke.mark({class:"cm-md-link"}),Gee=ke.mark({class:"cm-md-image"}),bh=ke.mark({class:"cm-md-faded"}),Wee=ke.mark({class:"cm-md-task-faded"}),Hee=ke.mark({class:"cm-md-fence"}),Fee=(t,e)=>ke.replace({widget:new Kee(t,e),inclusive:!1});class Kee extends Ti{constructor(e,n){super(),this.label=e,this.faded=n}eq(e){return this.label===e.label&&this.faded===e.faded}toDOM(){const e=document.createElement("span");return e.textContent=`${this.label}.`,e.className=`cm-md-olist${this.faded?" cm-md-olist-faded":""}`,e}}class Jee extends Ti{constructor(e){super(),this.faded=e}eq(e){return this.faded===e.faded}toDOM(){const e=document.createElement("span");return e.textContent="•",e.className=`cm-md-ulmark${this.faded?" cm-md-olist-faded":""}`,e}}class ete extends Ti{constructor(e){super(),this.checked=e}eq(e){return this.checked===e.checked}toDOM(){const e=document.createElement("span");return e.className=`cm-md-task ${this.checked?"cm-md-task-checked":""}`,e.ariaHidden="true",e}}function tte(t,e,n,i){const r=t.state.doc.lineAt(e.from).number,s=t.state.doc.lineAt(e.to).number,o=e.to-e.from>3&&t.state.doc.sliceString(e.to-3,e.to)==="```";for(let l=r;l<=s;l++){const c=t.state.doc.line(l);n.push({from:c.from,to:c.from,decoration:Bee}),l===r&&(n.push({from:c.from,to:c.from,decoration:Zee}),!i&&o&&n.push({from:c.from,to:c.from,decoration:Uee})),l===s&&n.push({from:c.from,to:c.from,decoration:qee})}}class nte{constructor(e){ce(this,"decorations");this.decorations=this.buildDecorations(e)}update(e){(e.docChanged||e.viewportChanged||e.selectionSet)&&(this.decorations=this.buildDecorations(e.view))}buildDecorations(e){const n=[],r=e.state.selection.ranges.map(o=>{const l=e.state.doc.lineAt(o.from),c=e.state.doc.lineAt(o.to);return{from:Math.min(l.from,c.from),to:Math.max(l.to,c.to)}}),s=[];for(const{from:o,to:l}of e.visibleRanges)pt(e.state).iterate({from:o,to:l,enter(c){var S,_,k;const{name:h}=c.type,d=r.some(P=>c.from<P.to&&c.to>P.from),p=((S=c.node.parent)==null?void 0:S.name)??"",g=((k=(_=c.node.parent)==null?void 0:_.parent)==null?void 0:k.name)??"",O=p.includes("OrderedList")||g.includes("OrderedList"),x=e.state.doc.sliceString(c.from,c.to);if(h==="OrderedList"){s.push(1);return}if(h==="FencedCode"){const P=r.some(Q=>c.from<Q.to&&c.to>Q.from);return tte(e,c,n,P),!1}if(h==="Link"){const P=c.node.getChild("LinkLabel");P&&n.push({from:P.from,to:P.to,decoration:Yee})}if(h==="Image"&&n.push({from:c.from,to:c.to,decoration:Gee}),h==="ListMark"){if(O){const P=s[s.length-1]??1;d?n.push({from:c.from,to:c.to,decoration:bh}):n.push({from:c.from,to:c.to,decoration:Fee(P,!1)}),s.length&&(s[s.length-1]=P+1);return}d?n.push({from:c.from,to:c.to,decoration:bh}):n.push({from:c.from,to:c.to,decoration:ke.replace({widget:new Jee(!1),inclusive:!1})});return}if(h==="TaskMarker"){const P=/\[[xX]\]/.test(x);d?n.push({from:c.from,to:c.to,decoration:Wee}):n.push({from:c.from,to:c.to,decoration:ke.replace({widget:new ete(P),inclusive:!1})});return}if(h==="CodeMark"||h==="CodeInfo"){const P=d?bh:Hee;n.push({from:c.from,to:c.to,decoration:P});return}if(h==="HeaderMark"){const P=d?bh:YE;n.push({from:c.from,to:c.to+1,decoration:P});return}if(Vee.includes(h)){if(d){n.push({from:c.from,to:c.to,decoration:bh});return}n.push({from:c.from,to:c.to,decoration:YE})}},leave(c){c.name==="OrderedList"&&s.pop()}});return n.sort((o,l)=>o.from-l.from||o.to-l.to),ke.set(n.map(o=>o.decoration.range(o.from,o.to)))}}const ite=Dt.fromClass(nte,{decorations:t=>t.decorations}),rte=ll.define([{tag:A.heading1,fontWeight:"bold",fontSize:"1.75em",lineHeight:"1.3"},{tag:A.heading2,fontWeight:"bold",fontSize:"1.5em",lineHeight:"1.3"},{tag:A.heading3,fontWeight:"bold",fontSize:"1.25em",lineHeight:"1.3"},{tag:A.heading4,fontWeight:"bold",fontSize:"1.1em"},{tag:A.heading5,fontWeight:"bold",fontSize:"1em"},{tag:A.heading6,fontWeight:"bold",fontSize:"0.9em",color:"var(--color-muted-foreground)"},{tag:A.strong,fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.link,color:"var(--color-primary, #3b82f6)",textDecoration:"underline"},{tag:A.monospace,fontFamily:"var(--font-mono)",padding:"1px 4px"},{tag:A.quote,color:"var(--color-muted-foreground)",fontStyle:"italic"},{tag:A.strikethrough,textDecoration:"line-through"}]),ste=ye.baseTheme({".cm-md-hidden":{display:"none"},".cm-line":{position:"relative"},".cm-md-codeblock":{backgroundColor:"color-mix(in srgb, currentColor 5%, transparent)",borderRadius:"10px",display:"block",padding:"12px",fontFamily:"ui-monospace, monospace",fontSize:"0.9em",border:"1px solid color-mix(in srgb, currentColor 12%, transparent)"},".cm-md-codeblock-line":{backgroundColor:"color-mix(in srgb, currentColor 4%, transparent)",paddingInline:"4px",marginBottom:0,marginInlineStart:"4px"},".cm-md-codeblock-line-start":{borderTopLeftRadius:"8px",borderTopRightRadius:"8px"},".cm-md-codeblock-line-end":{borderBottomLeftRadius:"8px",borderBottomRightRadius:"8px",marginBottom:"6px"},".cm-md-codeblock-inactive":{opacity:.6},".cm-md-fence":{color:"color-mix(in srgb, currentColor 55%, transparent)",letterSpacing:"0.03em",fontWeight:600},".cm-md-link":{color:"var(--color-primary, #3b82f6)",textDecoration:"underline",cursor:"pointer"},".cm-md-image":{display:"inline-block"},".cm-md-olist":{color:"var(--color-muted-foreground)",paddingRight:"0.35em",fontVariantNumeric:"tabular-nums"},".cm-md-olist.cm-md-olist-faded":{color:"color-mix(in srgb, currentColor 45%, transparent)"},".cm-md-faded":{color:"color-mix(in srgb, currentColor 40%, transparent)",opacity:.55},".cm-md-task":{display:"inline-block",width:"0.95em",height:"0.95em",borderRadius:"3px",border:"1px solid color-mix(in srgb, currentColor 30%, transparent)",marginRight:"0.35em",background:"color-mix(in srgb, var(--background) 80%, transparent)"},".cm-md-task-checked":{background:"color-mix(in srgb, var(--primary) 35%, transparent)",borderColor:"color-mix(in srgb, var(--primary) 60%, transparent)",position:"relative"},".cm-md-task-checked::after":{content:'""',position:"absolute",inset:"0.6px 3px 2.4px 3px",borderBottom:"2px solid var(--background)",borderRight:"2px solid var(--background)",transform:"rotate(35deg)",opacity:.9},".cm-md-task-faded":{opacity:.55},".cm-md-ulmark":{color:"oklch(0.18 0 0)",fontWeight:700,paddingRight:"0.2em"},".cm-line:has(.tok-quote)":{borderLeft:"3px solid color-mix(in srgb, currentColor 30%, transparent)",paddingLeft:"12px"}});function ote(){return[ite,fO(rte),ste]}const ate=t=>{let{state:e}=t,n=e.doc.lineAt(e.selection.main.from),i=DS(t.state,n.from);return i.line?lte(t):i.block?ute(t):!1};function MS(t,e){return({state:n,dispatch:i})=>{if(n.readOnly)return!1;let r=t(e,n);return r?(i(n.update(r)),!0):!1}}const lte=MS(dte,0),cte=MS(ZD,0),ute=MS((t,e)=>ZD(t,e,fte(e)),0);function DS(t,e){let n=t.languageDataAt("commentTokens",e,1);return n.length?n[0]:{}}const xh=50;function hte(t,{open:e,close:n},i,r){let s=t.sliceDoc(i-xh,i),o=t.sliceDoc(r,r+xh),l=/\s*$/.exec(s)[0].length,c=/^\s*/.exec(o)[0].length,h=s.length-l;if(s.slice(h-e.length,h)==e&&o.slice(c,c+n.length)==n)return{open:{pos:i-l,margin:l&&1},close:{pos:r+c,margin:c&&1}};let d,p;r-i<=2*xh?d=p=t.sliceDoc(i,r):(d=t.sliceDoc(i,i+xh),p=t.sliceDoc(r-xh,r));let g=/^\s*/.exec(d)[0].length,O=/\s*$/.exec(p)[0].length,x=p.length-O-n.length;return d.slice(g,g+e.length)==e&&p.slice(x,x+n.length)==n?{open:{pos:i+g+e.length,margin:/\s/.test(d.charAt(g+e.length))?1:0},close:{pos:r-O-n.length,margin:/\s/.test(p.charAt(x-1))?1:0}}:null}function fte(t){let e=[];for(let n of t.selection.ranges){let i=t.doc.lineAt(n.from),r=n.to<=i.to?i:t.doc.lineAt(n.to);r.from>i.from&&r.from==n.to&&(r=n.to==i.to+1?i:t.doc.lineAt(n.to-1));let s=e.length-1;s>=0&&e[s].to>i.from?e[s].to=r.to:e.push({from:i.from+/^\s*/.exec(i.text)[0].length,to:r.to})}return e}function ZD(t,e,n=e.selection.ranges){let i=n.map(s=>DS(e,s.from).block);if(!i.every(s=>s))return null;let r=n.map((s,o)=>hte(e,i[o],s.from,s.to));if(t!=2&&!r.every(s=>s))return{changes:e.changes(n.map((s,o)=>r[o]?[]:[{from:s.from,insert:i[o].open+" "},{from:s.to,insert:" "+i[o].close}]))};if(t!=1&&r.some(s=>s)){let s=[];for(let o=0,l;o<r.length;o++)if(l=r[o]){let c=i[o],{open:h,close:d}=l;s.push({from:h.pos-c.open.length,to:h.pos+h.margin},{from:d.pos-d.margin,to:d.pos+c.close.length})}return{changes:s}}return null}function dte(t,e,n=e.selection.ranges){let i=[],r=-1;for(let{from:s,to:o}of n){let l=i.length,c=1e9,h=DS(e,s).line;if(h){for(let d=s;d<=o;){let p=e.doc.lineAt(d);if(p.from>r&&(s==o||o>p.from)){r=p.from;let g=/^\s*/.exec(p.text)[0].length,O=g==p.length,x=p.text.slice(g,g+h.length)==h?g:-1;g<p.text.length&&g<c&&(c=g),i.push({line:p,comment:x,token:h,indent:g,empty:O,single:!1})}d=p.to+1}if(c<1e9)for(let d=l;d<i.length;d++)i[d].indent<i[d].line.text.length&&(i[d].indent=c);i.length==l+1&&(i[l].single=!0)}}if(t!=2&&i.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:l,token:c,indent:h,empty:d,single:p}of i)(p||!d)&&s.push({from:l.from+h,insert:c+" "});let o=e.changes(s);return{changes:o,selection:e.selection.map(o,1)}}else if(t!=1&&i.some(s=>s.comment>=0)){let s=[];for(let{line:o,comment:l,token:c}of i)if(l>=0){let h=o.from+l,d=h+c.length;o.text[d-o.from]==" "&&d++,s.push({from:h,to:d})}return{changes:s}}return null}const W1=qr.define(),pte=qr.define(),mte=we.define(),qD=we.define({combine(t){return Ur(t,{minDepth:100,newGroupDelay:500,joinToEvent:(e,n)=>n},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(e,n)=>(i,r)=>e(i,r)||n(i,r)})}}),UD=cn.define({create(){return Nr.empty},update(t,e){let n=e.state.facet(qD),i=e.annotation(W1);if(i){let c=ii.fromTransaction(e,i.selection),h=i.side,d=h==0?t.undone:t.done;return c?d=yg(d,d.length,n.minDepth,c):d=WD(d,e.startState.selection),new Nr(h==0?i.rest:d,h==0?d:i.rest)}let r=e.annotation(pte);if((r=="full"||r=="before")&&(t=t.isolate()),e.annotation(Wt.addToHistory)===!1)return e.changes.empty?t:t.addMapping(e.changes.desc);let s=ii.fromTransaction(e),o=e.annotation(Wt.time),l=e.annotation(Wt.userEvent);return s?t=t.addChanges(s,o,l,n,e):e.selection&&(t=t.addSelection(e.startState.selection,o,l,n.newGroupDelay)),(r=="full"||r=="after")&&(t=t.isolate()),t},toJSON(t){return{done:t.done.map(e=>e.toJSON()),undone:t.undone.map(e=>e.toJSON())}},fromJSON(t){return new Nr(t.done.map(ii.fromJSON),t.undone.map(ii.fromJSON))}});function gte(t={}){return[UD,qD.of(t),ye.domEventHandlers({beforeinput(e,n){let i=e.inputType=="historyUndo"?YD:e.inputType=="historyRedo"?H1:null;return i?(e.preventDefault(),i(n)):!1}})]}function dO(t,e){return function({state:n,dispatch:i}){if(!e&&n.readOnly)return!1;let r=n.field(UD,!1);if(!r)return!1;let s=r.pop(t,n,e);return s?(i(s),!0):!1}}const YD=dO(0,!1),H1=dO(1,!1),Ote=dO(0,!0),yte=dO(1,!0);class ii{constructor(e,n,i,r,s){this.changes=e,this.effects=n,this.mapped=i,this.startSelection=r,this.selectionsAfter=s}setSelAfter(e){return new ii(this.changes,this.effects,this.mapped,this.startSelection,e)}toJSON(){var e,n,i;return{changes:(e=this.changes)===null||e===void 0?void 0:e.toJSON(),mapped:(n=this.mapped)===null||n===void 0?void 0:n.toJSON(),startSelection:(i=this.startSelection)===null||i===void 0?void 0:i.toJSON(),selectionsAfter:this.selectionsAfter.map(r=>r.toJSON())}}static fromJSON(e){return new ii(e.changes&&en.fromJSON(e.changes),[],e.mapped&&zr.fromJSON(e.mapped),e.startSelection&&ae.fromJSON(e.startSelection),e.selectionsAfter.map(ae.fromJSON))}static fromTransaction(e,n){let i=qi;for(let r of e.startState.facet(mte)){let s=r(e);s.length&&(i=i.concat(s))}return!i.length&&e.changes.empty?null:new ii(e.changes.invert(e.startState.doc),i,void 0,n||e.startState.selection,qi)}static selection(e){return new ii(void 0,qi,void 0,void 0,e)}}function yg(t,e,n,i){let r=e+1>n+20?e-n-1:0,s=t.slice(r,e);return s.push(i),s}function bte(t,e){let n=[],i=!1;return t.iterChangedRanges((r,s)=>n.push(r,s)),e.iterChangedRanges((r,s,o,l)=>{for(let c=0;c<n.length;){let h=n[c++],d=n[c++];l>=h&&o<=d&&(i=!0)}}),i}function xte(t,e){return t.ranges.length==e.ranges.length&&t.ranges.filter((n,i)=>n.empty!=e.ranges[i].empty).length===0}function GD(t,e){return t.length?e.length?t.concat(e):t:e}const qi=[],vte=200;function WD(t,e){if(t.length){let n=t[t.length-1],i=n.selectionsAfter.slice(Math.max(0,n.selectionsAfter.length-vte));return i.length&&i[i.length-1].eq(e)?t:(i.push(e),yg(t,t.length-1,1e9,n.setSelAfter(i)))}else return[ii.selection([e])]}function Ste(t){let e=t[t.length-1],n=t.slice();return n[t.length-1]=e.setSelAfter(e.selectionsAfter.slice(0,e.selectionsAfter.length-1)),n}function qb(t,e){if(!t.length)return t;let n=t.length,i=qi;for(;n;){let r=_te(t[n-1],e,i);if(r.changes&&!r.changes.empty||r.effects.length){let s=t.slice(0,n);return s[n-1]=r,s}else e=r.mapped,n--,i=r.selectionsAfter}return i.length?[ii.selection(i)]:qi}function _te(t,e,n){let i=GD(t.selectionsAfter.length?t.selectionsAfter.map(l=>l.map(e)):qi,n);if(!t.changes)return ii.selection(i);let r=t.changes.map(e),s=e.mapDesc(t.changes,!0),o=t.mapped?t.mapped.composeDesc(s):s;return new ii(r,De.mapEffects(t.effects,e),o,t.startSelection.map(s),i)}const kte=/^(input\.type|delete)($|\.)/;class Nr{constructor(e,n,i=0,r=void 0){this.done=e,this.undone=n,this.prevTime=i,this.prevUserEvent=r}isolate(){return this.prevTime?new Nr(this.done,this.undone):this}addChanges(e,n,i,r,s){let o=this.done,l=o[o.length-1];return l&&l.changes&&!l.changes.empty&&e.changes&&(!i||kte.test(i))&&(!l.selectionsAfter.length&&n-this.prevTime<r.newGroupDelay&&r.joinToEvent(s,bte(l.changes,e.changes))||i=="input.type.compose")?o=yg(o,o.length-1,r.minDepth,new ii(e.changes.compose(l.changes),GD(De.mapEffects(e.effects,l.changes),l.effects),l.mapped,l.startSelection,qi)):o=yg(o,o.length,r.minDepth,e),new Nr(o,qi,n,i)}addSelection(e,n,i,r){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:qi;return s.length>0&&n-this.prevTime<r&&i==this.prevUserEvent&&i&&/^select($|\.)/.test(i)&&xte(s[s.length-1],e)?this:new Nr(WD(this.done,e),this.undone,n,i)}addMapping(e){return new Nr(qb(this.done,e),qb(this.undone,e),this.prevTime,this.prevUserEvent)}pop(e,n,i){let r=e==0?this.done:this.undone;if(r.length==0)return null;let s=r[r.length-1],o=s.selectionsAfter[0]||n.selection;if(i&&s.selectionsAfter.length)return n.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:W1.of({side:e,rest:Ste(r),selection:o}),userEvent:e==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let l=r.length==1?qi:r.slice(0,r.length-1);return s.mapped&&(l=qb(l,s.mapped)),n.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:W1.of({side:e,rest:l,selection:o}),filter:!1,userEvent:e==0?"undo":"redo",scrollIntoView:!0})}else return null}}Nr.empty=new Nr(qi,qi);const wte=[{key:"Mod-z",run:YD,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:H1,preventDefault:!0},{linux:"Ctrl-Shift-z",run:H1,preventDefault:!0},{key:"Mod-u",run:Ote,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:yte,preventDefault:!0}];function hu(t,e){return ae.create(t.ranges.map(e),t.mainIndex)}function mr(t,e){return t.update({selection:e,scrollIntoView:!0,userEvent:"select"})}function gr({state:t,dispatch:e},n){let i=hu(t.selection,n);return i.eq(t.selection,!0)?!1:(e(mr(t,i)),!0)}function pO(t,e){return ae.cursor(e?t.to:t.from)}function HD(t,e){return gr(t,n=>n.empty?t.moveByChar(n,e):pO(n,e))}function Cn(t){return t.textDirectionAt(t.state.selection.main.head)==Ct.LTR}const FD=t=>HD(t,!Cn(t)),KD=t=>HD(t,Cn(t));function JD(t,e){return gr(t,n=>n.empty?t.moveByGroup(n,e):pO(n,e))}const Pte=t=>JD(t,!Cn(t)),Tte=t=>JD(t,Cn(t));function Qte(t,e,n){if(e.type.prop(n))return!0;let i=e.to-e.from;return i&&(i>2||/[^\s,.;:]/.test(t.sliceDoc(e.from,e.to)))||e.firstChild}function mO(t,e,n){let i=pt(t).resolveInner(e.head),r=n?Me.closedBy:Me.openedBy;for(let c=e.head;;){let h=n?i.childAfter(c):i.childBefore(c);if(!h)break;Qte(t,h,r)?i=h:c=n?h.to:h.from}let s=i.type.prop(r),o,l;return s&&(o=n?jr(t,i.from,1):jr(t,i.to,-1))&&o.matched?l=n?o.end.to:o.end.from:l=n?i.to:i.from,ae.cursor(l,n?-1:1)}const Cte=t=>gr(t,e=>mO(t.state,e,!Cn(t))),Ete=t=>gr(t,e=>mO(t.state,e,Cn(t)));function ej(t,e){return gr(t,n=>{if(!n.empty)return pO(n,e);let i=t.moveVertically(n,e);return i.head!=n.head?i:t.moveToLineBoundary(n,e)})}const tj=t=>ej(t,!1),nj=t=>ej(t,!0);function ij(t){let e=t.scrollDOM.clientHeight<t.scrollDOM.scrollHeight-2,n=0,i=0,r;if(e){for(let s of t.state.facet(ye.scrollMargins)){let o=s(t);o!=null&&o.top&&(n=Math.max(o==null?void 0:o.top,n)),o!=null&&o.bottom&&(i=Math.max(o==null?void 0:o.bottom,i))}r=t.scrollDOM.clientHeight-n-i}else r=(t.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:n,marginBottom:i,selfScroll:e,height:Math.max(t.defaultLineHeight,r-5)}}function rj(t,e){let n=ij(t),{state:i}=t,r=hu(i.selection,o=>o.empty?t.moveVertically(o,e,n.height):pO(o,e));if(r.eq(i.selection))return!1;let s;if(n.selfScroll){let o=t.coordsAtPos(i.selection.main.head),l=t.scrollDOM.getBoundingClientRect(),c=l.top+n.marginTop,h=l.bottom-n.marginBottom;o&&o.top>c&&o.bottom<h&&(s=ye.scrollIntoView(r.main.head,{y:"start",yMargin:o.top-c}))}return t.dispatch(mr(i,r),{effects:s}),!0}const GE=t=>rj(t,!1),F1=t=>rj(t,!0);function Ko(t,e,n){let i=t.lineBlockAt(e.head),r=t.moveToLineBoundary(e,n);if(r.head==e.head&&r.head!=(n?i.to:i.from)&&(r=t.moveToLineBoundary(e,n,!1)),!n&&r.head==i.from&&i.length){let s=/^\s*/.exec(t.state.sliceDoc(i.from,Math.min(i.from+100,i.to)))[0].length;s&&e.head!=i.from+s&&(r=ae.cursor(i.from+s))}return r}const Ate=t=>gr(t,e=>Ko(t,e,!0)),Rte=t=>gr(t,e=>Ko(t,e,!1)),$te=t=>gr(t,e=>Ko(t,e,!Cn(t))),Lte=t=>gr(t,e=>Ko(t,e,Cn(t))),Mte=t=>gr(t,e=>ae.cursor(t.lineBlockAt(e.head).from,1)),Dte=t=>gr(t,e=>ae.cursor(t.lineBlockAt(e.head).to,-1));function jte(t,e,n){let i=!1,r=hu(t.selection,s=>{let o=jr(t,s.head,-1)||jr(t,s.head,1)||s.head>0&&jr(t,s.head-1,1)||s.head<t.doc.length&&jr(t,s.head+1,-1);if(!o||!o.end)return s;i=!0;let l=o.start.from==s.head?o.end.to:o.end.from;return ae.cursor(l)});return i?(e(mr(t,r)),!0):!1}const Nte=({state:t,dispatch:e})=>jte(t,e);function Ki(t,e){let n=hu(t.state.selection,i=>{let r=e(i);return ae.range(i.anchor,r.head,r.goalColumn,r.bidiLevel||void 0)});return n.eq(t.state.selection)?!1:(t.dispatch(mr(t.state,n)),!0)}function sj(t,e){return Ki(t,n=>t.moveByChar(n,e))}const oj=t=>sj(t,!Cn(t)),aj=t=>sj(t,Cn(t));function lj(t,e){return Ki(t,n=>t.moveByGroup(n,e))}const zte=t=>lj(t,!Cn(t)),Ite=t=>lj(t,Cn(t)),Xte=t=>Ki(t,e=>mO(t.state,e,!Cn(t))),Vte=t=>Ki(t,e=>mO(t.state,e,Cn(t)));function cj(t,e){return Ki(t,n=>t.moveVertically(n,e))}const uj=t=>cj(t,!1),hj=t=>cj(t,!0);function fj(t,e){return Ki(t,n=>t.moveVertically(n,e,ij(t).height))}const WE=t=>fj(t,!1),HE=t=>fj(t,!0),Bte=t=>Ki(t,e=>Ko(t,e,!0)),Zte=t=>Ki(t,e=>Ko(t,e,!1)),qte=t=>Ki(t,e=>Ko(t,e,!Cn(t))),Ute=t=>Ki(t,e=>Ko(t,e,Cn(t))),Yte=t=>Ki(t,e=>ae.cursor(t.lineBlockAt(e.head).from)),Gte=t=>Ki(t,e=>ae.cursor(t.lineBlockAt(e.head).to)),FE=({state:t,dispatch:e})=>(e(mr(t,{anchor:0})),!0),KE=({state:t,dispatch:e})=>(e(mr(t,{anchor:t.doc.length})),!0),JE=({state:t,dispatch:e})=>(e(mr(t,{anchor:t.selection.main.anchor,head:0})),!0),eA=({state:t,dispatch:e})=>(e(mr(t,{anchor:t.selection.main.anchor,head:t.doc.length})),!0),dj=({state:t,dispatch:e})=>(e(t.update({selection:{anchor:0,head:t.doc.length},userEvent:"select"})),!0),Wte=({state:t,dispatch:e})=>{let n=gO(t).map(({from:i,to:r})=>ae.range(i,Math.min(r+1,t.doc.length)));return e(t.update({selection:ae.create(n),userEvent:"select"})),!0},Hte=({state:t,dispatch:e})=>{let n=hu(t.selection,i=>{let r=pt(t),s=r.resolveStack(i.from,1);if(i.empty){let o=r.resolveStack(i.from,-1);o.node.from>=s.node.from&&o.node.to<=s.node.to&&(s=o)}for(let o=s;o;o=o.next){let{node:l}=o;if((l.from<i.from&&l.to>=i.to||l.to>i.to&&l.from<=i.from)&&o.next)return ae.range(l.to,l.from)}return i});return n.eq(t.selection)?!1:(e(mr(t,n)),!0)};function pj(t,e){let{state:n}=t,i=n.selection,r=n.selection.ranges.slice();for(let s of n.selection.ranges){let o=n.doc.lineAt(s.head);if(e?o.to<t.state.doc.length:o.from>0)for(let l=s;;){let c=t.moveVertically(l,e);if(c.head<o.from||c.head>o.to){r.some(h=>h.head==c.head)||r.push(c);break}else{if(c.head==l.head)break;l=c}}}return r.length==i.ranges.length?!1:(t.dispatch(mr(n,ae.create(r,r.length-1))),!0)}const Fte=t=>pj(t,!1),Kte=t=>pj(t,!0),Jte=({state:t,dispatch:e})=>{let n=t.selection,i=null;return n.ranges.length>1?i=ae.create([n.main]):n.main.empty||(i=ae.create([ae.cursor(n.main.head)])),i?(e(mr(t,i)),!0):!1};function ed(t,e){if(t.state.readOnly)return!1;let n="delete.selection",{state:i}=t,r=i.changeByRange(s=>{let{from:o,to:l}=s;if(o==l){let c=e(s);c<o?(n="delete.backward",c=nm(t,c,!1)):c>o&&(n="delete.forward",c=nm(t,c,!0)),o=Math.min(o,c),l=Math.max(l,c)}else o=nm(t,o,!1),l=nm(t,l,!0);return o==l?{range:s}:{changes:{from:o,to:l},range:ae.cursor(o,o<s.head?-1:1)}});return r.changes.empty?!1:(t.dispatch(i.update(r,{scrollIntoView:!0,userEvent:n,effects:n=="delete.selection"?ye.announce.of(i.phrase("Selection deleted")):void 0})),!0)}function nm(t,e,n){if(t instanceof ye)for(let i of t.state.facet(ye.atomicRanges).map(r=>r(t)))i.between(e,e,(r,s)=>{r<e&&s>e&&(e=n?s:r)});return e}const mj=(t,e,n)=>ed(t,i=>{let r=i.from,{state:s}=t,o=s.doc.lineAt(r),l,c;if(n&&!e&&r>o.from&&r<o.from+200&&!/[^ \t]/.test(l=o.text.slice(0,r-o.from))){if(l[l.length-1]==" ")return r-1;let h=hr(l,s.tabSize),d=h%nl(s)||nl(s);for(let p=0;p<d&&l[l.length-1-p]==" ";p++)r--;c=r}else c=yn(o.text,r-o.from,e,e)+o.from,c==r&&o.number!=(e?s.doc.lines:1)?c+=e?1:-1:!e&&/[\ufe00-\ufe0f]/.test(o.text.slice(c-o.from,r-o.from))&&(c=yn(o.text,c-o.from,!1,!1)+o.from);return c}),K1=t=>mj(t,!1,!0),gj=t=>mj(t,!0,!1),Oj=(t,e)=>ed(t,n=>{let i=n.head,{state:r}=t,s=r.doc.lineAt(i),o=r.charCategorizer(i);for(let l=null;;){if(i==(e?s.to:s.from)){i==n.head&&s.number!=(e?r.doc.lines:1)&&(i+=e?1:-1);break}let c=yn(s.text,i-s.from,e)+s.from,h=s.text.slice(Math.min(i,c)-s.from,Math.max(i,c)-s.from),d=o(h);if(l!=null&&d!=l)break;(h!=" "||i!=n.head)&&(l=d),i=c}return i}),yj=t=>Oj(t,!1),ene=t=>Oj(t,!0),tne=t=>ed(t,e=>{let n=t.lineBlockAt(e.head).to;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),nne=t=>ed(t,e=>{let n=t.moveToLineBoundary(e,!1).head;return e.head>n?n:Math.max(0,e.head-1)}),ine=t=>ed(t,e=>{let n=t.moveToLineBoundary(e,!0).head;return e.head<n?n:Math.min(t.state.doc.length,e.head+1)}),rne=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>({changes:{from:i.from,to:i.to,insert:tt.of(["",""])},range:ae.cursor(i.from)}));return e(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0},sne=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=t.changeByRange(i=>{if(!i.empty||i.from==0||i.from==t.doc.length)return{range:i};let r=i.from,s=t.doc.lineAt(r),o=r==s.from?r-1:yn(s.text,r-s.from,!1)+s.from,l=r==s.to?r+1:yn(s.text,r-s.from,!0)+s.from;return{changes:{from:o,to:l,insert:t.doc.slice(r,l).append(t.doc.slice(o,r))},range:ae.cursor(l)}});return n.changes.empty?!1:(e(t.update(n,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function gO(t){let e=[],n=-1;for(let i of t.selection.ranges){let r=t.doc.lineAt(i.from),s=t.doc.lineAt(i.to);if(!i.empty&&i.to==s.from&&(s=t.doc.lineAt(i.to-1)),n>=r.number){let o=e[e.length-1];o.to=s.to,o.ranges.push(i)}else e.push({from:r.from,to:s.to,ranges:[i]});n=s.number+1}return e}function bj(t,e,n){if(t.readOnly)return!1;let i=[],r=[];for(let s of gO(t)){if(n?s.to==t.doc.length:s.from==0)continue;let o=t.doc.lineAt(n?s.to+1:s.from-1),l=o.length+1;if(n){i.push({from:s.to,to:o.to},{from:s.from,insert:o.text+t.lineBreak});for(let c of s.ranges)r.push(ae.range(Math.min(t.doc.length,c.anchor+l),Math.min(t.doc.length,c.head+l)))}else{i.push({from:o.from,to:s.from},{from:s.to,insert:t.lineBreak+o.text});for(let c of s.ranges)r.push(ae.range(c.anchor-l,c.head-l))}}return i.length?(e(t.update({changes:i,scrollIntoView:!0,selection:ae.create(r,t.selection.mainIndex),userEvent:"move.line"})),!0):!1}const one=({state:t,dispatch:e})=>bj(t,e,!1),ane=({state:t,dispatch:e})=>bj(t,e,!0);function xj(t,e,n){if(t.readOnly)return!1;let i=[];for(let r of gO(t))n?i.push({from:r.from,insert:t.doc.slice(r.from,r.to)+t.lineBreak}):i.push({from:r.to,insert:t.lineBreak+t.doc.slice(r.from,r.to)});return e(t.update({changes:i,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const lne=({state:t,dispatch:e})=>xj(t,e,!1),cne=({state:t,dispatch:e})=>xj(t,e,!0),une=t=>{if(t.state.readOnly)return!1;let{state:e}=t,n=e.changes(gO(e).map(({from:r,to:s})=>(r>0?r--:s<e.doc.length&&s++,{from:r,to:s}))),i=hu(e.selection,r=>{let s;if(t.lineWrapping){let o=t.lineBlockAt(r.head),l=t.coordsAtPos(r.head,r.assoc||1);l&&(s=o.bottom+t.documentTop-l.bottom+t.defaultLineHeight/2)}return t.moveVertically(r,!0,s)}).map(n);return t.dispatch({changes:n,selection:i,scrollIntoView:!0,userEvent:"delete.line"}),!0};function hne(t,e){if(/\(\)|\[\]|\{\}/.test(t.sliceDoc(e-1,e+1)))return{from:e,to:e};let n=pt(t).resolveInner(e),i=n.childBefore(e),r=n.childAfter(e),s;return i&&r&&i.to<=e&&r.from>=e&&(s=i.type.prop(Me.closedBy))&&s.indexOf(r.name)>-1&&t.doc.lineAt(i.to).from==t.doc.lineAt(r.from).from&&!/\S/.test(t.sliceDoc(i.to,r.from))?{from:i.to,to:r.from}:null}const tA=vj(!1),fne=vj(!0);function vj(t){return({state:e,dispatch:n})=>{if(e.readOnly)return!1;let i=e.changeByRange(r=>{let{from:s,to:o}=r,l=e.doc.lineAt(s),c=!t&&s==o&&hne(e,s);t&&(s=o=(o<=l.to?l:e.doc.lineAt(o)).to);let h=new cO(e,{simulateBreak:s,simulateDoubleBreak:!!c}),d=ES(h,s);for(d==null&&(d=hr(/^\s*/.exec(e.doc.lineAt(s).text)[0],e.tabSize));o<l.to&&/\s/.test(l.text[o-l.from]);)o++;c?{from:s,to:o}=c:s>l.from&&s<l.from+100&&!/\S/.test(l.text.slice(0,s))&&(s=l.from);let p=["",Sf(e,d)];return c&&p.push(Sf(e,h.lineIndent(l.from,-1))),{changes:{from:s,to:o,insert:tt.of(p)},range:ae.cursor(s+1+p[1].length)}});return n(e.update(i,{scrollIntoView:!0,userEvent:"input"})),!0}}function jS(t,e){let n=-1;return t.changeByRange(i=>{let r=[];for(let o=i.from;o<=i.to;){let l=t.doc.lineAt(o);l.number>n&&(i.empty||i.to>l.from)&&(e(l,r,i),n=l.number),o=l.to+1}let s=t.changes(r);return{changes:r,range:ae.range(s.mapPos(i.anchor,1),s.mapPos(i.head,1))}})}const dne=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let n=Object.create(null),i=new cO(t,{overrideIndentation:s=>{let o=n[s];return o??-1}}),r=jS(t,(s,o,l)=>{let c=ES(i,s.from);if(c==null)return;/\S/.test(s.text)||(c=0);let h=/^\s*/.exec(s.text)[0],d=Sf(t,c);(h!=d||l.from<s.from+h.length)&&(n[s.from]=c,o.push({from:s.from,to:s.from+h.length,insert:d}))});return r.changes.empty||e(t.update(r,{userEvent:"indent"})),!0},Sj=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(jS(t,(n,i)=>{i.push({from:n.from,insert:t.facet(uu)})}),{userEvent:"input.indent"})),!0),_j=({state:t,dispatch:e})=>t.readOnly?!1:(e(t.update(jS(t,(n,i)=>{let r=/^\s*/.exec(n.text)[0];if(!r)return;let s=hr(r,t.tabSize),o=0,l=Sf(t,Math.max(0,s-nl(t)));for(;o<r.length&&o<l.length&&r.charCodeAt(o)==l.charCodeAt(o);)o++;i.push({from:n.from+o,to:n.from+r.length,insert:l.slice(o)})}),{userEvent:"delete.dedent"})),!0),pne=t=>(t.setTabFocusMode(),!0),mne=[{key:"Ctrl-b",run:FD,shift:oj,preventDefault:!0},{key:"Ctrl-f",run:KD,shift:aj},{key:"Ctrl-p",run:tj,shift:uj},{key:"Ctrl-n",run:nj,shift:hj},{key:"Ctrl-a",run:Mte,shift:Yte},{key:"Ctrl-e",run:Dte,shift:Gte},{key:"Ctrl-d",run:gj},{key:"Ctrl-h",run:K1},{key:"Ctrl-k",run:tne},{key:"Ctrl-Alt-h",run:yj},{key:"Ctrl-o",run:rne},{key:"Ctrl-t",run:sne},{key:"Ctrl-v",run:F1}],gne=[{key:"ArrowLeft",run:FD,shift:oj,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:Pte,shift:zte,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:$te,shift:qte,preventDefault:!0},{key:"ArrowRight",run:KD,shift:aj,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:Tte,shift:Ite,preventDefault:!0},{mac:"Cmd-ArrowRight",run:Lte,shift:Ute,preventDefault:!0},{key:"ArrowUp",run:tj,shift:uj,preventDefault:!0},{mac:"Cmd-ArrowUp",run:FE,shift:JE},{mac:"Ctrl-ArrowUp",run:GE,shift:WE},{key:"ArrowDown",run:nj,shift:hj,preventDefault:!0},{mac:"Cmd-ArrowDown",run:KE,shift:eA},{mac:"Ctrl-ArrowDown",run:F1,shift:HE},{key:"PageUp",run:GE,shift:WE},{key:"PageDown",run:F1,shift:HE},{key:"Home",run:Rte,shift:Zte,preventDefault:!0},{key:"Mod-Home",run:FE,shift:JE},{key:"End",run:Ate,shift:Bte,preventDefault:!0},{key:"Mod-End",run:KE,shift:eA},{key:"Enter",run:tA,shift:tA},{key:"Mod-a",run:dj},{key:"Backspace",run:K1,shift:K1,preventDefault:!0},{key:"Delete",run:gj,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:yj,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:ene,preventDefault:!0},{mac:"Mod-Backspace",run:nne,preventDefault:!0},{mac:"Mod-Delete",run:ine,preventDefault:!0}].concat(mne.map(t=>({mac:t.key,run:t.run,shift:t.shift}))),One=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:Cte,shift:Xte},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:Ete,shift:Vte},{key:"Alt-ArrowUp",run:one},{key:"Shift-Alt-ArrowUp",run:lne},{key:"Alt-ArrowDown",run:ane},{key:"Shift-Alt-ArrowDown",run:cne},{key:"Mod-Alt-ArrowUp",run:Fte},{key:"Mod-Alt-ArrowDown",run:Kte},{key:"Escape",run:Jte},{key:"Mod-Enter",run:fne},{key:"Alt-l",mac:"Ctrl-l",run:Wte},{key:"Mod-i",run:Hte,preventDefault:!0},{key:"Mod-[",run:_j},{key:"Mod-]",run:Sj},{key:"Mod-Alt-\\",run:dne},{key:"Shift-Mod-k",run:une},{key:"Shift-Mod-\\",run:Nte},{key:"Mod-/",run:ate},{key:"Alt-A",run:cte},{key:"Ctrl-m",mac:"Shift-Alt-m",run:pne}].concat(gne),yne={key:"Tab",run:Sj,shift:_j};var nA={};class bg{constructor(e,n,i,r,s,o,l,c,h,d=0,p){this.p=e,this.stack=n,this.state=i,this.reducePos=r,this.pos=s,this.score=o,this.buffer=l,this.bufferBase=c,this.curContext=h,this.lookAhead=d,this.parent=p}toString(){return`[${this.stack.filter((e,n)=>n%3==0).concat(this.state)}]@${this.pos}${this.score?"!"+this.score:""}`}static start(e,n,i=0){let r=e.parser.context;return new bg(e,[],n,i,i,0,[],0,r?new iA(r,r.start):null,0,null)}get context(){return this.curContext?this.curContext.context:null}pushState(e,n){this.stack.push(this.state,n,this.bufferBase+this.buffer.length),this.state=e}reduce(e){var n;let i=e>>19,r=e&65535,{parser:s}=this.p,o=this.reducePos<this.pos-25&&this.setLookAhead(this.pos),l=s.dynamicPrecedence(r);if(l&&(this.score+=l),i==0){this.pushState(s.getGoto(this.state,r,!0),this.reducePos),r<s.minRepeatTerm&&this.storeNode(r,this.reducePos,this.reducePos,o?8:4,!0),this.reduceContext(r,this.reducePos);return}let c=this.stack.length-(i-1)*3-(e&262144?6:0),h=c?this.stack[c-2]:this.p.ranges[0].from,d=this.reducePos-h;d>=2e3&&!(!((n=this.p.parser.nodeSet.types[r])===null||n===void 0)&&n.isAnonymous)&&(h==this.p.lastBigReductionStart?(this.p.bigReductionCount++,this.p.lastBigReductionSize=d):this.p.lastBigReductionSize<d&&(this.p.bigReductionCount=1,this.p.lastBigReductionStart=h,this.p.lastBigReductionSize=d));let p=c?this.stack[c-1]:0,g=this.bufferBase+this.buffer.length-p;if(r<s.minRepeatTerm||e&131072){let O=s.stateFlag(this.state,1)?this.pos:this.reducePos;this.storeNode(r,h,O,g+4,!0)}if(e&262144)this.state=this.stack[c];else{let O=this.stack[c-3];this.state=s.getGoto(O,r,!0)}for(;this.stack.length>c;)this.stack.pop();this.reduceContext(r,h)}storeNode(e,n,i,r=4,s=!1){if(e==0&&(!this.stack.length||this.stack[this.stack.length-1]<this.buffer.length+this.bufferBase)){let o=this,l=this.buffer.length;if(l==0&&o.parent&&(l=o.bufferBase-o.parent.bufferBase,o=o.parent),l>0&&o.buffer[l-4]==0&&o.buffer[l-1]>-1){if(n==i)return;if(o.buffer[l-2]>=n){o.buffer[l-2]=i;return}}}if(!s||this.pos==i)this.buffer.push(e,n,i,r);else{let o=this.buffer.length;if(o>0&&(this.buffer[o-4]!=0||this.buffer[o-1]<0)){let l=!1;for(let c=o;c>0&&this.buffer[c-2]>i;c-=4)if(this.buffer[c-1]>=0){l=!0;break}if(l)for(;o>0&&this.buffer[o-2]>i;)this.buffer[o]=this.buffer[o-4],this.buffer[o+1]=this.buffer[o-3],this.buffer[o+2]=this.buffer[o-2],this.buffer[o+3]=this.buffer[o-1],o-=4,r>4&&(r-=4)}this.buffer[o]=e,this.buffer[o+1]=n,this.buffer[o+2]=i,this.buffer[o+3]=r}}shift(e,n,i,r){if(e&131072)this.pushState(e&65535,this.pos);else if((e&262144)==0){let s=e,{parser:o}=this.p;(r>this.pos||n<=o.maxNode)&&(this.pos=r,o.stateFlag(s,1)||(this.reducePos=r)),this.pushState(s,i),this.shiftContext(n,i),n<=o.maxNode&&this.buffer.push(n,i,r,4)}else this.pos=r,this.shiftContext(n,i),n<=this.p.parser.maxNode&&this.buffer.push(n,i,r,4)}apply(e,n,i,r){e&65536?this.reduce(e):this.shift(e,n,i,r)}useNode(e,n){let i=this.p.reused.length-1;(i<0||this.p.reused[i]!=e)&&(this.p.reused.push(e),i++);let r=this.pos;this.reducePos=this.pos=r+e.length,this.pushState(n,r),this.buffer.push(i,r,this.reducePos,-1),this.curContext&&this.updateContext(this.curContext.tracker.reuse(this.curContext.context,e,this,this.p.stream.reset(this.pos-e.length)))}split(){let e=this,n=e.buffer.length;for(;n>0&&e.buffer[n-2]>e.reducePos;)n-=4;let i=e.buffer.slice(n),r=e.bufferBase+n;for(;e&&r==e.bufferBase;)e=e.parent;return new bg(this.p,this.stack.slice(),this.state,this.reducePos,this.pos,this.score,i,r,this.curContext,this.lookAhead,e)}recoverByDelete(e,n){let i=e<=this.p.parser.maxNode;i&&this.storeNode(e,this.pos,n,4),this.storeNode(0,this.pos,n,i?8:4),this.pos=this.reducePos=n,this.score-=190}canShift(e){for(let n=new bne(this);;){let i=this.p.parser.stateSlot(n.state,4)||this.p.parser.hasAction(n.state,e);if(i==0)return!1;if((i&65536)==0)return!0;n.reduce(i)}}recoverByInsert(e){if(this.stack.length>=300)return[];let n=this.p.parser.nextStates(this.state);if(n.length>8||this.stack.length>=120){let r=[];for(let s=0,o;s<n.length;s+=2)(o=n[s+1])!=this.state&&this.p.parser.hasAction(o,e)&&r.push(n[s],o);if(this.stack.length<120)for(let s=0;r.length<8&&s<n.length;s+=2){let o=n[s+1];r.some((l,c)=>c&1&&l==o)||r.push(n[s],o)}n=r}let i=[];for(let r=0;r<n.length&&i.length<4;r+=2){let s=n[r+1];if(s==this.state)continue;let o=this.split();o.pushState(s,this.pos),o.storeNode(0,o.pos,o.pos,4,!0),o.shiftContext(n[r],this.pos),o.reducePos=this.pos,o.score-=200,i.push(o)}return i}forceReduce(){let{parser:e}=this.p,n=e.stateSlot(this.state,5);if((n&65536)==0)return!1;if(!e.validAction(this.state,n)){let i=n>>19,r=n&65535,s=this.stack.length-i*3;if(s<0||e.getGoto(this.stack[s],r,!1)<0){let o=this.findForcedReduction();if(o==null)return!1;n=o}this.storeNode(0,this.pos,this.pos,4,!0),this.score-=100}return this.reducePos=this.pos,this.reduce(n),!0}findForcedReduction(){let{parser:e}=this.p,n=[],i=(r,s)=>{if(!n.includes(r))return n.push(r),e.allActions(r,o=>{if(!(o&393216))if(o&65536){let l=(o>>19)-s;if(l>1){let c=o&65535,h=this.stack.length-l*3;if(h>=0&&e.getGoto(this.stack[h],c,!1)>=0)return l<<19|65536|c}}else{let l=i(o,s+1);if(l!=null)return l}})};return i(this.state,0)}forceAll(){for(;!this.p.parser.stateFlag(this.state,2);)if(!this.forceReduce()){this.storeNode(0,this.pos,this.pos,4,!0);break}return this}get deadEnd(){if(this.stack.length!=3)return!1;let{parser:e}=this.p;return e.data[e.stateSlot(this.state,1)]==65535&&!e.stateSlot(this.state,4)}restart(){this.storeNode(0,this.pos,this.pos,4,!0),this.state=this.stack[0],this.stack.length=0}sameState(e){if(this.state!=e.state||this.stack.length!=e.stack.length)return!1;for(let n=0;n<this.stack.length;n+=3)if(this.stack[n]!=e.stack[n])return!1;return!0}get parser(){return this.p.parser}dialectEnabled(e){return this.p.parser.dialect.flags[e]}shiftContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.shift(this.curContext.context,e,this,this.p.stream.reset(n)))}reduceContext(e,n){this.curContext&&this.updateContext(this.curContext.tracker.reduce(this.curContext.context,e,this,this.p.stream.reset(n)))}emitContext(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-3)&&this.buffer.push(this.curContext.hash,this.pos,this.pos,-3)}emitLookAhead(){let e=this.buffer.length-1;(e<0||this.buffer[e]!=-4)&&this.buffer.push(this.lookAhead,this.pos,this.pos,-4)}updateContext(e){if(e!=this.curContext.context){let n=new iA(this.curContext.tracker,e);n.hash!=this.curContext.hash&&this.emitContext(),this.curContext=n}}setLookAhead(e){return e<=this.lookAhead?!1:(this.emitLookAhead(),this.lookAhead=e,!0)}close(){this.curContext&&this.curContext.tracker.strict&&this.emitContext(),this.lookAhead>0&&this.emitLookAhead()}}class iA{constructor(e,n){this.tracker=e,this.context=n,this.hash=e.strict?e.hash(n):0}}class bne{constructor(e){this.start=e,this.state=e.state,this.stack=e.stack,this.base=this.stack.length}reduce(e){let n=e&65535,i=e>>19;i==0?(this.stack==this.start.stack&&(this.stack=this.stack.slice()),this.stack.push(this.state,0,0),this.base+=3):this.base-=(i-1)*3;let r=this.start.p.parser.getGoto(this.stack[this.base-3],n,!0);this.state=r}}class xg{constructor(e,n,i){this.stack=e,this.pos=n,this.index=i,this.buffer=e.buffer,this.index==0&&this.maybeNext()}static create(e,n=e.bufferBase+e.buffer.length){return new xg(e,n,n-e.bufferBase)}maybeNext(){let e=this.stack.parent;e!=null&&(this.index=this.stack.bufferBase-e.bufferBase,this.stack=e,this.buffer=e.buffer)}get id(){return this.buffer[this.index-4]}get start(){return this.buffer[this.index-3]}get end(){return this.buffer[this.index-2]}get size(){return this.buffer[this.index-1]}next(){this.index-=4,this.pos-=4,this.index==0&&this.maybeNext()}fork(){return new xg(this.stack,this.pos,this.index)}}function Ah(t,e=Uint16Array){if(typeof t!="string")return t;let n=null;for(let i=0,r=0;i<t.length;){let s=0;for(;;){let o=t.charCodeAt(i++),l=!1;if(o==126){s=65535;break}o>=92&&o--,o>=34&&o--;let c=o-32;if(c>=46&&(c-=46,l=!0),s+=c,l)break;s*=46}n?n[r++]=s:n=new e(s)}return n}class Tm{constructor(){this.start=-1,this.value=-1,this.end=-1,this.extended=-1,this.lookAhead=0,this.mask=0,this.context=0}}const rA=new Tm;class xne{constructor(e,n){this.input=e,this.ranges=n,this.chunk="",this.chunkOff=0,this.chunk2="",this.chunk2Pos=0,this.next=-1,this.token=rA,this.rangeIndex=0,this.pos=this.chunkPos=n[0].from,this.range=n[0],this.end=n[n.length-1].to,this.readNext()}resolveOffset(e,n){let i=this.range,r=this.rangeIndex,s=this.pos+e;for(;s<i.from;){if(!r)return null;let o=this.ranges[--r];s-=i.from-o.to,i=o}for(;n<0?s>i.to:s>=i.to;){if(r==this.ranges.length-1)return null;let o=this.ranges[++r];s+=o.from-i.to,i=o}return s}clipPos(e){if(e>=this.range.from&&e<this.range.to)return e;for(let n of this.ranges)if(n.to>e)return Math.max(e,n.from);return this.end}peek(e){let n=this.chunkOff+e,i,r;if(n>=0&&n<this.chunk.length)i=this.pos+e,r=this.chunk.charCodeAt(n);else{let s=this.resolveOffset(e,1);if(s==null)return-1;if(i=s,i>=this.chunk2Pos&&i<this.chunk2Pos+this.chunk2.length)r=this.chunk2.charCodeAt(i-this.chunk2Pos);else{let o=this.rangeIndex,l=this.range;for(;l.to<=i;)l=this.ranges[++o];this.chunk2=this.input.chunk(this.chunk2Pos=i),i+this.chunk2.length>l.to&&(this.chunk2=this.chunk2.slice(0,l.to-i)),r=this.chunk2.charCodeAt(0)}}return i>=this.token.lookAhead&&(this.token.lookAhead=i+1),r}acceptToken(e,n=0){let i=n?this.resolveOffset(n,-1):this.pos;if(i==null||i<this.token.start)throw new RangeError("Token end out of bounds");this.token.value=e,this.token.end=i}acceptTokenTo(e,n){this.token.value=e,this.token.end=n}getChunk(){if(this.pos>=this.chunk2Pos&&this.pos<this.chunk2Pos+this.chunk2.length){let{chunk:e,chunkPos:n}=this;this.chunk=this.chunk2,this.chunkPos=this.chunk2Pos,this.chunk2=e,this.chunk2Pos=n,this.chunkOff=this.pos-this.chunkPos}else{this.chunk2=this.chunk,this.chunk2Pos=this.chunkPos;let e=this.input.chunk(this.pos),n=this.pos+e.length;this.chunk=n>this.range.to?e.slice(0,this.range.to-this.pos):e,this.chunkPos=this.pos,this.chunkOff=0}}readNext(){return this.chunkOff>=this.chunk.length&&(this.getChunk(),this.chunkOff==this.chunk.length)?this.next=-1:this.next=this.chunk.charCodeAt(this.chunkOff)}advance(e=1){for(this.chunkOff+=e;this.pos+e>=this.range.to;){if(this.rangeIndex==this.ranges.length-1)return this.setDone();e-=this.range.to-this.pos,this.range=this.ranges[++this.rangeIndex],this.pos=this.range.from}return this.pos+=e,this.pos>=this.token.lookAhead&&(this.token.lookAhead=this.pos+1),this.readNext()}setDone(){return this.pos=this.chunkPos=this.end,this.range=this.ranges[this.rangeIndex=this.ranges.length-1],this.chunk="",this.next=-1}reset(e,n){if(n?(this.token=n,n.start=e,n.lookAhead=e+1,n.value=n.extended=-1):this.token=rA,this.pos!=e){if(this.pos=e,e==this.end)return this.setDone(),this;for(;e<this.range.from;)this.range=this.ranges[--this.rangeIndex];for(;e>=this.range.to;)this.range=this.ranges[++this.rangeIndex];e>=this.chunkPos&&e<this.chunkPos+this.chunk.length?this.chunkOff=e-this.chunkPos:(this.chunk="",this.chunkOff=0),this.readNext()}return this}read(e,n){if(e>=this.chunkPos&&n<=this.chunkPos+this.chunk.length)return this.chunk.slice(e-this.chunkPos,n-this.chunkPos);if(e>=this.chunk2Pos&&n<=this.chunk2Pos+this.chunk2.length)return this.chunk2.slice(e-this.chunk2Pos,n-this.chunk2Pos);if(e>=this.range.from&&n<=this.range.to)return this.input.read(e,n);let i="";for(let r of this.ranges){if(r.from>=n)break;r.to>e&&(i+=this.input.read(Math.max(r.from,e),Math.min(r.to,n)))}return i}}class _c{constructor(e,n){this.data=e,this.id=n}token(e,n){let{parser:i}=n.p;kj(this.data,e,n,this.id,i.data,i.tokenPrecTable)}}_c.prototype.contextual=_c.prototype.fallback=_c.prototype.extend=!1;class vg{constructor(e,n,i){this.precTable=n,this.elseToken=i,this.data=typeof e=="string"?Ah(e):e}token(e,n){let i=e.pos,r=0;for(;;){let s=e.next<0,o=e.resolveOffset(1,1);if(kj(this.data,e,n,0,this.data,this.precTable),e.token.value>-1)break;if(this.elseToken==null)return;if(s||r++,o==null)break;e.reset(o,e.token)}r&&(e.reset(i,e.token),e.acceptToken(this.elseToken,r))}}vg.prototype.contextual=_c.prototype.fallback=_c.prototype.extend=!1;class bn{constructor(e,n={}){this.token=e,this.contextual=!!n.contextual,this.fallback=!!n.fallback,this.extend=!!n.extend}}function kj(t,e,n,i,r,s){let o=0,l=1<<i,{dialect:c}=n.p.parser;e:for(;(l&t[o])!=0;){let h=t[o+1];for(let O=o+3;O<h;O+=2)if((t[O+1]&l)>0){let x=t[O];if(c.allows(x)&&(e.token.value==-1||e.token.value==x||vne(x,e.token.value,r,s))){e.acceptToken(x);break}}let d=e.next,p=0,g=t[o+2];if(e.next<0&&g>p&&t[h+g*3-3]==65535){o=t[h+g*3-1];continue e}for(;p<g;){let O=p+g>>1,x=h+O+(O<<1),S=t[x],_=t[x+1]||65536;if(d<S)g=O;else if(d>=_)p=O+1;else{o=t[x+2],e.advance();continue e}}break}}function sA(t,e,n){for(let i=e,r;(r=t[i])!=65535;i++)if(r==n)return i-e;return-1}function vne(t,e,n,i){let r=sA(n,i,e);return r<0||sA(n,i,t)<r}const gi=typeof process<"u"&&nA&&/\bparse\b/.test(nA.LOG);let Ub=null;function oA(t,e,n){let i=t.cursor(wt.IncludeAnonymous);for(i.moveTo(e);;)if(!(n<0?i.childBefore(e):i.childAfter(e)))for(;;){if((n<0?i.to<e:i.from>e)&&!i.type.isError)return n<0?Math.max(0,Math.min(i.to-1,e-25)):Math.min(t.length,Math.max(i.from+1,e+25));if(n<0?i.prevSibling():i.nextSibling())break;if(!i.parent())return n<0?0:t.length}}let Sne=class{constructor(e,n){this.fragments=e,this.nodeSet=n,this.i=0,this.fragment=null,this.safeFrom=-1,this.safeTo=-1,this.trees=[],this.start=[],this.index=[],this.nextFragment()}nextFragment(){let e=this.fragment=this.i==this.fragments.length?null:this.fragments[this.i++];if(e){for(this.safeFrom=e.openStart?oA(e.tree,e.from+e.offset,1)-e.offset:e.from,this.safeTo=e.openEnd?oA(e.tree,e.to+e.offset,-1)-e.offset:e.to;this.trees.length;)this.trees.pop(),this.start.pop(),this.index.pop();this.trees.push(e.tree),this.start.push(-e.offset),this.index.push(0),this.nextStart=this.safeFrom}else this.nextStart=1e9}nodeAt(e){if(e<this.nextStart)return null;for(;this.fragment&&this.safeTo<=e;)this.nextFragment();if(!this.fragment)return null;for(;;){let n=this.trees.length-1;if(n<0)return this.nextFragment(),null;let i=this.trees[n],r=this.index[n];if(r==i.children.length){this.trees.pop(),this.start.pop(),this.index.pop();continue}let s=i.children[r],o=this.start[n]+i.positions[r];if(o>e)return this.nextStart=o,null;if(s instanceof Ge){if(o==e){if(o<this.safeFrom)return null;let l=o+s.length;if(l<=this.safeTo){let c=s.prop(Me.lookAhead);if(!c||l+c<this.fragment.to)return s}}this.index[n]++,o+s.length>=Math.max(this.safeFrom,e)&&(this.trees.push(s),this.start.push(o),this.index.push(0))}else this.index[n]++,this.nextStart=o+s.length}}};class _ne{constructor(e,n){this.stream=n,this.tokens=[],this.mainToken=null,this.actions=[],this.tokens=e.tokenizers.map(i=>new Tm)}getActions(e){let n=0,i=null,{parser:r}=e.p,{tokenizers:s}=r,o=r.stateSlot(e.state,3),l=e.curContext?e.curContext.hash:0,c=0;for(let h=0;h<s.length;h++){if((1<<h&o)==0)continue;let d=s[h],p=this.tokens[h];if(!(i&&!d.fallback)&&((d.contextual||p.start!=e.pos||p.mask!=o||p.context!=l)&&(this.updateCachedToken(p,d,e),p.mask=o,p.context=l),p.lookAhead>p.end+25&&(c=Math.max(p.lookAhead,c)),p.value!=0)){let g=n;if(p.extended>-1&&(n=this.addActions(e,p.extended,p.end,n)),n=this.addActions(e,p.value,p.end,n),!d.extend&&(i=p,n>g))break}}for(;this.actions.length>n;)this.actions.pop();return c&&e.setLookAhead(c),!i&&e.pos==this.stream.end&&(i=new Tm,i.value=e.p.parser.eofTerm,i.start=i.end=e.pos,n=this.addActions(e,i.value,i.end,n)),this.mainToken=i,this.actions}getMainToken(e){if(this.mainToken)return this.mainToken;let n=new Tm,{pos:i,p:r}=e;return n.start=i,n.end=Math.min(i+1,r.stream.end),n.value=i==r.stream.end?r.parser.eofTerm:0,n}updateCachedToken(e,n,i){let r=this.stream.clipPos(i.pos);if(n.token(this.stream.reset(r,e),i),e.value>-1){let{parser:s}=i.p;for(let o=0;o<s.specialized.length;o++)if(s.specialized[o]==e.value){let l=s.specializers[o](this.stream.read(e.start,e.end),i);if(l>=0&&i.p.parser.dialect.allows(l>>1)){(l&1)==0?e.value=l>>1:e.extended=l>>1;break}}}else e.value=0,e.end=this.stream.clipPos(r+1)}putAction(e,n,i,r){for(let s=0;s<r;s+=3)if(this.actions[s]==e)return r;return this.actions[r++]=e,this.actions[r++]=n,this.actions[r++]=i,r}addActions(e,n,i,r){let{state:s}=e,{parser:o}=e.p,{data:l}=o;for(let c=0;c<2;c++)for(let h=o.stateSlot(s,c?2:1);;h+=3){if(l[h]==65535)if(l[h+1]==1)h=ys(l,h+2);else{r==0&&l[h+1]==2&&(r=this.putAction(ys(l,h+2),n,i,r));break}l[h]==n&&(r=this.putAction(ys(l,h+1),n,i,r))}return r}}class kne{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.recovering=0,this.nextStackID=9812,this.minStackPos=0,this.reused=[],this.stoppedAt=null,this.lastBigReductionStart=-1,this.lastBigReductionSize=0,this.bigReductionCount=0,this.stream=new xne(n,r),this.tokens=new _ne(e,this.stream),this.topTerm=e.top[1];let{from:s}=r[0];this.stacks=[bg.start(this,e.top[0],s)],this.fragments=i.length&&this.stream.end-s>e.bufferLength*4?new Sne(i,e.nodeSet):null}get parsedPos(){return this.minStackPos}advance(){let e=this.stacks,n=this.minStackPos,i=this.stacks=[],r,s;if(this.bigReductionCount>300&&e.length==1){let[o]=e;for(;o.forceReduce()&&o.stack.length&&o.stack[o.stack.length-2]>=this.lastBigReductionStart;);this.bigReductionCount=this.lastBigReductionSize=0}for(let o=0;o<e.length;o++){let l=e[o];for(;;){if(this.tokens.mainToken=null,l.pos>n)i.push(l);else{if(this.advanceStack(l,i,e))continue;{r||(r=[],s=[]),r.push(l);let c=this.tokens.getMainToken(l);s.push(c.value,c.end)}}break}}if(!i.length){let o=r&&Pne(r);if(o)return gi&&console.log("Finish with "+this.stackID(o)),this.stackToTree(o);if(this.parser.strict)throw gi&&r&&console.log("Stuck with token "+(this.tokens.mainToken?this.parser.getName(this.tokens.mainToken.value):"none")),new SyntaxError("No parse at "+n);this.recovering||(this.recovering=5)}if(this.recovering&&r){let o=this.stoppedAt!=null&&r[0].pos>this.stoppedAt?r[0]:this.runRecovery(r,s,i);if(o)return gi&&console.log("Force-finish "+this.stackID(o)),this.stackToTree(o.forceAll())}if(this.recovering){let o=this.recovering==1?1:this.recovering*3;if(i.length>o)for(i.sort((l,c)=>c.score-l.score);i.length>o;)i.pop();i.some(l=>l.reducePos>n)&&this.recovering--}else if(i.length>1){e:for(let o=0;o<i.length-1;o++){let l=i[o];for(let c=o+1;c<i.length;c++){let h=i[c];if(l.sameState(h)||l.buffer.length>500&&h.buffer.length>500)if((l.score-h.score||l.buffer.length-h.buffer.length)>0)i.splice(c--,1);else{i.splice(o--,1);continue e}}}i.length>12&&i.splice(12,i.length-12)}this.minStackPos=i[0].pos;for(let o=1;o<i.length;o++)i[o].pos<this.minStackPos&&(this.minStackPos=i[o].pos);return null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}advanceStack(e,n,i){let r=e.pos,{parser:s}=this,o=gi?this.stackID(e)+" -> ":"";if(this.stoppedAt!=null&&r>this.stoppedAt)return e.forceReduce()?e:null;if(this.fragments){let h=e.curContext&&e.curContext.tracker.strict,d=h?e.curContext.hash:0;for(let p=this.fragments.nodeAt(r);p;){let g=this.parser.nodeSet.types[p.type.id]==p.type?s.getGoto(e.state,p.type.id):-1;if(g>-1&&p.length&&(!h||(p.prop(Me.contextHash)||0)==d))return e.useNode(p,g),gi&&console.log(o+this.stackID(e)+` (via reuse of ${s.getName(p.type.id)})`),!0;if(!(p instanceof Ge)||p.children.length==0||p.positions[0]>0)break;let O=p.children[0];if(O instanceof Ge&&p.positions[0]==0)p=O;else break}}let l=s.stateSlot(e.state,4);if(l>0)return e.reduce(l),gi&&console.log(o+this.stackID(e)+` (via always-reduce ${s.getName(l&65535)})`),!0;if(e.stack.length>=8400)for(;e.stack.length>6e3&&e.forceReduce(););let c=this.tokens.getActions(e);for(let h=0;h<c.length;){let d=c[h++],p=c[h++],g=c[h++],O=h==c.length||!i,x=O?e:e.split(),S=this.tokens.mainToken;if(x.apply(d,p,S?S.start:x.pos,g),gi&&console.log(o+this.stackID(x)+` (via ${(d&65536)==0?"shift":`reduce of ${s.getName(d&65535)}`} for ${s.getName(p)} @ ${r}${x==e?"":", split"})`),O)return!0;x.pos>r?n.push(x):i.push(x)}return!1}advanceFully(e,n){let i=e.pos;for(;;){if(!this.advanceStack(e,null,null))return!1;if(e.pos>i)return aA(e,n),!0}}runRecovery(e,n,i){let r=null,s=!1;for(let o=0;o<e.length;o++){let l=e[o],c=n[o<<1],h=n[(o<<1)+1],d=gi?this.stackID(l)+" -> ":"";if(l.deadEnd&&(s||(s=!0,l.restart(),gi&&console.log(d+this.stackID(l)+" (restarted)"),this.advanceFully(l,i))))continue;let p=l.split(),g=d;for(let O=0;O<10&&p.forceReduce()&&(gi&&console.log(g+this.stackID(p)+" (via force-reduce)"),!this.advanceFully(p,i));O++)gi&&(g=this.stackID(p)+" -> ");for(let O of l.recoverByInsert(c))gi&&console.log(d+this.stackID(O)+" (via recover-insert)"),this.advanceFully(O,i);this.stream.end>l.pos?(h==l.pos&&(h++,c=0),l.recoverByDelete(c,h),gi&&console.log(d+this.stackID(l)+` (via recover-delete ${this.parser.getName(c)})`),aA(l,i)):(!r||r.score<l.score)&&(r=l)}return r}stackToTree(e){return e.close(),Ge.build({buffer:xg.create(e),nodeSet:this.parser.nodeSet,topID:this.topTerm,maxBufferLength:this.parser.bufferLength,reused:this.reused,start:this.ranges[0].from,length:e.pos-this.ranges[0].from,minRepeatType:this.parser.minRepeatTerm})}stackID(e){let n=(Ub||(Ub=new WeakMap)).get(e);return n||Ub.set(e,n=String.fromCodePoint(this.nextStackID++)),n+e}}function aA(t,e){for(let n=0;n<e.length;n++){let i=e[n];if(i.pos==t.pos&&i.sameState(t)){e[n].score<t.score&&(e[n]=t);return}}e.push(t)}class wne{constructor(e,n,i){this.source=e,this.flags=n,this.disabled=i}allows(e){return!this.disabled||this.disabled[e]==0}}const Yb=t=>t;class NS{constructor(e){this.start=e.start,this.shift=e.shift||Yb,this.reduce=e.reduce||Yb,this.reuse=e.reuse||Yb,this.hash=e.hash||(()=>0),this.strict=e.strict!==!1}}class js extends iO{constructor(e){if(super(),this.wrappers=[],e.version!=14)throw new RangeError(`Parser version (${e.version}) doesn't match runtime version (14)`);let n=e.nodeNames.split(" ");this.minRepeatTerm=n.length;for(let l=0;l<e.repeatNodeCount;l++)n.push("");let i=Object.keys(e.topRules).map(l=>e.topRules[l][1]),r=[];for(let l=0;l<n.length;l++)r.push([]);function s(l,c,h){r[l].push([c,c.deserialize(String(h))])}if(e.nodeProps)for(let l of e.nodeProps){let c=l[0];typeof c=="string"&&(c=Me[c]);for(let h=1;h<l.length;){let d=l[h++];if(d>=0)s(d,c,l[h++]);else{let p=l[h+-d];for(let g=-d;g>0;g--)s(l[h++],c,p);h++}}}this.nodeSet=new cu(n.map((l,c)=>Ht.define({name:c>=this.minRepeatTerm?void 0:l,id:c,props:r[c],top:i.indexOf(c)>-1,error:c==0,skipped:e.skippedNodes&&e.skippedNodes.indexOf(c)>-1}))),e.propSources&&(this.nodeSet=this.nodeSet.extend(...e.propSources)),this.strict=!1,this.bufferLength=VL;let o=Ah(e.tokenData);this.context=e.context,this.specializerSpecs=e.specialized||[],this.specialized=new Uint16Array(this.specializerSpecs.length);for(let l=0;l<this.specializerSpecs.length;l++)this.specialized[l]=this.specializerSpecs[l].term;this.specializers=this.specializerSpecs.map(lA),this.states=Ah(e.states,Uint32Array),this.data=Ah(e.stateData),this.goto=Ah(e.goto),this.maxTerm=e.maxTerm,this.tokenizers=e.tokenizers.map(l=>typeof l=="number"?new _c(o,l):l),this.topRules=e.topRules,this.dialects=e.dialects||{},this.dynamicPrecedences=e.dynamicPrecedences||null,this.tokenPrecTable=e.tokenPrec,this.termNames=e.termNames||null,this.maxNode=this.nodeSet.types.length-1,this.dialect=this.parseDialect(),this.top=this.topRules[Object.keys(this.topRules)[0]]}createParse(e,n,i){let r=new kne(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}getGoto(e,n,i=!1){let r=this.goto;if(n>=r[0])return-1;for(let s=r[n+1];;){let o=r[s++],l=o&1,c=r[s++];if(l&&i)return c;for(let h=s+(o>>1);s<h;s++)if(r[s]==e)return c;if(l)return-1}}hasAction(e,n){let i=this.data;for(let r=0;r<2;r++)for(let s=this.stateSlot(e,r?2:1),o;;s+=3){if((o=i[s])==65535)if(i[s+1]==1)o=i[s=ys(i,s+2)];else{if(i[s+1]==2)return ys(i,s+2);break}if(o==n||o==0)return ys(i,s+1)}return 0}stateSlot(e,n){return this.states[e*6+n]}stateFlag(e,n){return(this.stateSlot(e,0)&n)>0}validAction(e,n){return!!this.allActions(e,i=>i==n?!0:null)}allActions(e,n){let i=this.stateSlot(e,4),r=i?n(i):void 0;for(let s=this.stateSlot(e,1);r==null;s+=3){if(this.data[s]==65535)if(this.data[s+1]==1)s=ys(this.data,s+2);else break;r=n(ys(this.data,s+1))}return r}nextStates(e){let n=[];for(let i=this.stateSlot(e,1);;i+=3){if(this.data[i]==65535)if(this.data[i+1]==1)i=ys(this.data,i+2);else break;if((this.data[i+2]&1)==0){let r=this.data[i+1];n.some((s,o)=>o&1&&s==r)||n.push(this.data[i],r)}}return n}configure(e){let n=Object.assign(Object.create(js.prototype),this);if(e.props&&(n.nodeSet=this.nodeSet.extend(...e.props)),e.top){let i=this.topRules[e.top];if(!i)throw new RangeError(`Invalid top rule name ${e.top}`);n.top=i}return e.tokenizers&&(n.tokenizers=this.tokenizers.map(i=>{let r=e.tokenizers.find(s=>s.from==i);return r?r.to:i})),e.specializers&&(n.specializers=this.specializers.slice(),n.specializerSpecs=this.specializerSpecs.map((i,r)=>{let s=e.specializers.find(l=>l.from==i.external);if(!s)return i;let o=Object.assign(Object.assign({},i),{external:s.to});return n.specializers[r]=lA(o),o})),e.contextTracker&&(n.context=e.contextTracker),e.dialect&&(n.dialect=this.parseDialect(e.dialect)),e.strict!=null&&(n.strict=e.strict),e.wrap&&(n.wrappers=n.wrappers.concat(e.wrap)),e.bufferLength!=null&&(n.bufferLength=e.bufferLength),n}hasWrappers(){return this.wrappers.length>0}getName(e){return this.termNames?this.termNames[e]:String(e<=this.maxNode&&this.nodeSet.types[e].name||e)}get eofTerm(){return this.maxNode+1}get topNode(){return this.nodeSet.types[this.top[1]]}dynamicPrecedence(e){let n=this.dynamicPrecedences;return n==null?0:n[e]||0}parseDialect(e){let n=Object.keys(this.dialects),i=n.map(()=>!1);if(e)for(let s of e.split(" ")){let o=n.indexOf(s);o>=0&&(i[o]=!0)}let r=null;for(let s=0;s<n.length;s++)if(!i[s])for(let o=this.dialects[n[s]],l;(l=this.data[o++])!=65535;)(r||(r=new Uint8Array(this.maxTerm+1)))[l]=1;return new wne(e,i,r)}static deserialize(e){return new js(e)}}function ys(t,e){return t[e]|t[e+1]<<16}function Pne(t){let e=null;for(let n of t){let i=n.p.stoppedAt;(n.pos==n.p.stream.end||i!=null&&n.pos>i)&&n.p.parser.stateFlag(n.state,2)&&(!e||e.score<n.score)&&(e=n)}return e}function lA(t){if(t.external){let e=t.extend?1:0;return(n,i)=>t.external(n,i)<<1|e}return t.get}const Tne=316,Qne=317,cA=1,Cne=2,Ene=3,Ane=4,Rne=318,$ne=320,Lne=321,Mne=5,Dne=6,jne=0,J1=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],wj=125,Nne=59,ev=47,zne=42,Ine=43,Xne=45,Vne=60,Bne=44,Zne=63,qne=46,Une=91,Yne=new NS({start:!1,shift(t,e){return e==Mne||e==Dne||e==$ne?t:e==Lne},strict:!1}),Gne=new bn((t,e)=>{let{next:n}=t;(n==wj||n==-1||e.context)&&t.acceptToken(Rne)},{contextual:!0,fallback:!0}),Wne=new bn((t,e)=>{let{next:n}=t,i;J1.indexOf(n)>-1||n==ev&&((i=t.peek(1))==ev||i==zne)||n!=wj&&n!=Nne&&n!=-1&&!e.context&&t.acceptToken(Tne)},{contextual:!0}),Hne=new bn((t,e)=>{t.next==Une&&!e.context&&t.acceptToken(Qne)},{contextual:!0}),Fne=new bn((t,e)=>{let{next:n}=t;if(n==Ine||n==Xne){if(t.advance(),n==t.next){t.advance();let i=!e.context&&e.canShift(cA);t.acceptToken(i?cA:Cne)}}else n==Zne&&t.peek(1)==qne&&(t.advance(),t.advance(),(t.next<48||t.next>57)&&t.acceptToken(Ene))},{contextual:!0});function Gb(t,e){return t>=65&&t<=90||t>=97&&t<=122||t==95||t>=192||!e&&t>=48&&t<=57}const Kne=new bn((t,e)=>{if(t.next!=Vne||!e.dialectEnabled(jne)||(t.advance(),t.next==ev))return;let n=0;for(;J1.indexOf(t.next)>-1;)t.advance(),n++;if(Gb(t.next,!0)){for(t.advance(),n++;Gb(t.next,!1);)t.advance(),n++;for(;J1.indexOf(t.next)>-1;)t.advance(),n++;if(t.next==Bne)return;for(let i=0;;i++){if(i==7){if(!Gb(t.next,!0))return;break}if(t.next!="extends".charCodeAt(i))break;t.advance(),n++}}t.acceptToken(Ane,-n)}),Jne=Xs({"get set async static":A.modifier,"for while do if else switch try catch finally return throw break continue default case defer":A.controlKeyword,"in of await yield void typeof delete instanceof as satisfies":A.operatorKeyword,"let var const using function class extends":A.definitionKeyword,"import export from":A.moduleKeyword,"with debugger new":A.keyword,TemplateString:A.special(A.string),super:A.atom,BooleanLiteral:A.bool,this:A.self,null:A.null,Star:A.modifier,VariableName:A.variableName,"CallExpression/VariableName TaggedTemplateExpression/VariableName":A.function(A.variableName),VariableDefinition:A.definition(A.variableName),Label:A.labelName,PropertyName:A.propertyName,PrivatePropertyName:A.special(A.propertyName),"CallExpression/MemberExpression/PropertyName":A.function(A.propertyName),"FunctionDeclaration/VariableDefinition":A.function(A.definition(A.variableName)),"ClassDeclaration/VariableDefinition":A.definition(A.className),"NewExpression/VariableName":A.className,PropertyDefinition:A.definition(A.propertyName),PrivatePropertyDefinition:A.definition(A.special(A.propertyName)),UpdateOp:A.updateOperator,"LineComment Hashbang":A.lineComment,BlockComment:A.blockComment,Number:A.number,String:A.string,Escape:A.escape,ArithOp:A.arithmeticOperator,LogicOp:A.logicOperator,BitOp:A.bitwiseOperator,CompareOp:A.compareOperator,RegExp:A.regexp,Equals:A.definitionOperator,Arrow:A.function(A.punctuation),": Spread":A.punctuation,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace,"InterpolationStart InterpolationEnd":A.special(A.brace),".":A.derefOperator,", ;":A.separator,"@":A.meta,TypeName:A.typeName,TypeDefinition:A.definition(A.typeName),"type enum interface implements namespace module declare":A.definitionKeyword,"abstract global Privacy readonly override":A.modifier,"is keyof unique infer asserts":A.operatorKeyword,JSXAttributeValue:A.attributeValue,JSXText:A.content,"JSXStartTag JSXStartCloseTag JSXSelfCloseEndTag JSXEndTag":A.angleBracket,"JSXIdentifier JSXNameSpacedName":A.tagName,"JSXAttribute/JSXIdentifier JSXAttribute/JSXNameSpacedName":A.attributeName,"JSXBuiltin/JSXIdentifier":A.standard(A.tagName)}),eie={__proto__:null,export:20,as:25,from:33,default:36,async:41,function:42,in:52,out:55,const:56,extends:60,this:64,true:72,false:72,null:84,void:88,typeof:92,super:108,new:142,delete:154,yield:163,await:167,class:172,public:235,private:235,protected:235,readonly:237,instanceof:256,satisfies:259,import:292,keyof:349,unique:353,infer:359,asserts:395,is:397,abstract:417,implements:419,type:421,let:424,var:426,using:429,interface:435,enum:439,namespace:445,module:447,declare:451,global:455,defer:471,for:476,of:485,while:488,with:492,do:496,if:500,else:502,switch:506,case:512,try:518,catch:522,finally:526,return:530,throw:534,break:538,continue:542,debugger:546},tie={__proto__:null,async:129,get:131,set:133,declare:195,public:197,private:197,protected:197,static:199,abstract:201,override:203,readonly:209,accessor:211,new:401},nie={__proto__:null,"<":193},iie=js.deserialize({version:14,states:"$F|Q%TQlOOO%[QlOOO'_QpOOP(lO`OOO*zQ!0MxO'#CiO+RO#tO'#CjO+aO&jO'#CjO+oO#@ItO'#DaO.QQlO'#DgO.bQlO'#DrO%[QlO'#DzO0fQlO'#ESOOQ!0Lf'#E['#E[O1PQ`O'#EXOOQO'#Ep'#EpOOQO'#Il'#IlO1XQ`O'#GsO1dQ`O'#EoO1iQ`O'#EoO3hQ!0MxO'#JrO6[Q!0MxO'#JsO6uQ`O'#F]O6zQ,UO'#FtOOQ!0Lf'#Ff'#FfO7VO7dO'#FfO9XQMhO'#F|O9`Q`O'#F{OOQ!0Lf'#Js'#JsOOQ!0Lb'#Jr'#JrO9eQ`O'#GwOOQ['#K_'#K_O9pQ`O'#IYO9uQ!0LrO'#IZOOQ['#J`'#J`OOQ['#I_'#I_Q`QlOOQ`QlOOO9}Q!L^O'#DvO:UQlO'#EOO:]QlO'#EQO9kQ`O'#GsO:dQMhO'#CoO:rQ`O'#EnO:}Q`O'#EyO;hQMhO'#FeO;xQ`O'#GsOOQO'#K`'#K`O;}Q`O'#K`O<]Q`O'#G{O<]Q`O'#G|O<]Q`O'#HOO9kQ`O'#HRO=SQ`O'#HUO>kQ`O'#CeO>{Q`O'#HcO?TQ`O'#HiO?TQ`O'#HkO`QlO'#HmO?TQ`O'#HoO?TQ`O'#HrO?YQ`O'#HxO?_Q!0LsO'#IOO%[QlO'#IQO?jQ!0LsO'#ISO?uQ!0LsO'#IUO9uQ!0LrO'#IWO@QQ!0MxO'#CiOASQpO'#DlQOQ`OOO%[QlO'#EQOAjQ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!fQT-d'`-e]!qQ!r'`-e1o5{Q#p]R'i<VR)f$dY!uQ'`-e1o5{Q'k!rS'u!v!yS'w!z5}S-t'l'mQ-v'nR3T-uT#kZ%eS#jZ%eS%km,oU(g#h#i#lS.Y(h(iQ.^(jQ0t+^Q3Y.ZU3Z.[.]._S7S3[3]R9`7Td#^W#W#Z%h(T(^*Y+Z.T/mr#gZm#h#i#l%e(h(i(j+^.Z.[.]._3[3]7TS*]$x*bQ/t*^Q2U,oQ2l-VQ4`/pQ6q2dQ7s4aQ9W6rT=m'X+[V#aW%h*YU#`W%h*YS(U#W(^U(Z#Z+Z/mS-['X+[T.O(T.TV'^!e%i*ZQ$lfR)x$qT)m$l)nR4V/UT*_$x*bT*h${*YQ0w+fQ1g,VQ3_.fQ5t1iQ6P1qQ7X3cQ8r6SQ9c7WQ:^8qQ:p9bQ;Z:`Q;c:rQ;n;[R;q;dnqOXst!Z#d%m&r&t&u&w,s,x2[2_Q&l!VR,h&itmOXst!U!V!Z#d%m&i&r&t&u&w,s,x2[2_R,o&oT%lm,oR1k,XR,g&gQ&U|S+}&V&WR1^,OR+s&PT&p!W&sT&q!W&sT2^,x2_",nodeNames:"⚠ ArithOp ArithOp ?. JSXStartTag LineComment BlockComment Script Hashbang ExportDeclaration export Star as VariableName String Escape from ; default FunctionDeclaration async function VariableDefinition > < TypeParamList in out const TypeDefinition extends ThisType this LiteralType ArithOp Number BooleanLiteral TemplateType InterpolationEnd Interpolation InterpolationStart NullType null VoidType void TypeofType typeof MemberExpression . PropertyName [ TemplateString Escape Interpolation super RegExp ] ArrayExpression Spread , } { ObjectExpression Property async get set PropertyDefinition Block : NewTarget new NewExpression ) ( ArgList UnaryExpression delete LogicOp BitOp YieldExpression yield AwaitExpression await ParenthesizedExpression ClassExpression class ClassBody MethodDeclaration Decorator @ MemberExpression PrivatePropertyName CallExpression TypeArgList CompareOp < declare Privacy static abstract override PrivatePropertyDefinition PropertyDeclaration readonly accessor Optional TypeAnnotation Equals StaticBlock FunctionExpression ArrowFunction ParamList ParamList ArrayPattern ObjectPattern PatternProperty Privacy readonly Arrow MemberExpression BinaryExpression ArithOp ArithOp ArithOp ArithOp BitOp CompareOp instanceof satisfies CompareOp BitOp BitOp BitOp LogicOp LogicOp ConditionalExpression LogicOp LogicOp AssignmentExpression UpdateOp PostfixExpression CallExpression InstantiationExpression TaggedTemplateExpression DynamicImport import ImportMeta JSXElement JSXSelfCloseEndTag JSXSelfClosingTag JSXIdentifier JSXBuiltin JSXIdentifier JSXNamespacedName JSXMemberExpression JSXSpreadAttribute JSXAttribute JSXAttributeValue JSXEscape JSXEndTag JSXOpenTag JSXFragmentTag JSXText JSXEscape JSXStartCloseTag JSXCloseTag PrefixCast < ArrowFunction TypeParamList SequenceExpression InstantiationExpression KeyofType keyof UniqueType unique ImportType InferredType infer TypeName ParenthesizedType FunctionSignature ParamList NewSignature IndexedType TupleType Label ArrayType ReadonlyType ObjectType MethodType PropertyType IndexSignature PropertyDefinition CallSignature TypePredicate asserts is NewSignature new UnionType LogicOp IntersectionType LogicOp ConditionalType ParameterizedType ClassDeclaration abstract implements type VariableDeclaration let var using TypeAliasDeclaration InterfaceDeclaration interface EnumDeclaration enum EnumBody NamespaceDeclaration namespace module AmbientDeclaration declare GlobalDeclaration global ClassDeclaration ClassBody AmbientFunctionDeclaration ExportGroup VariableName VariableName ImportDeclaration defer ImportGroup ForStatement for ForSpec ForInSpec ForOfSpec of WhileStatement while WithStatement with DoStatement do IfStatement if else SwitchStatement switch SwitchBody CaseLabel case DefaultLabel TryStatement try CatchClause catch FinallyClause finally ReturnStatement return ThrowStatement throw BreakStatement break ContinueStatement continue DebuggerStatement debugger LabeledStatement ExpressionStatement SingleExpression SingleClassItem",maxTerm:380,context:Yne,nodeProps:[["isolate",-8,5,6,14,37,39,51,53,55,""],["group",-26,9,17,19,68,207,211,215,216,218,221,224,234,237,243,245,247,249,252,258,264,266,268,270,272,274,275,"Statement",-34,13,14,32,35,36,42,51,54,55,57,62,70,72,76,80,82,84,85,110,111,120,121,136,139,141,142,143,144,145,147,148,167,169,171,"Expression",-23,31,33,37,41,43,45,173,175,177,178,180,181,182,184,185,186,188,189,190,201,203,205,206,"Type",-3,88,103,109,"ClassItem"],["openedBy",23,"<",38,"InterpolationStart",56,"[",60,"{",73,"(",160,"JSXStartCloseTag"],["closedBy",-2,24,168,">",40,"InterpolationEnd",50,"]",61,"}",74,")",165,"JSXEndTag"]],propSources:[Jne],skippedNodes:[0,5,6,278],repeatNodeCount:37,tokenData:"$Fq07[R!bOX%ZXY+gYZ-yZ[+g[]%Z]^.c^p%Zpq+gqr/mrs3cst:_tuEruvJSvwLkwx! Yxy!'iyz!(sz{!)}{|!,q|}!.O}!O!,q!O!P!/Y!P!Q!9j!Q!R#:O!R![#<_![!]#I_!]!^#Jk!^!_#Ku!_!`$![!`!a$$v!a!b$*T!b!c$,r!c!}Er!}#O$-|#O#P$/W#P#Q$4o#Q#R$5y#R#SEr#S#T$7W#T#o$8b#o#p$<r#p#q$=h#q#r$>x#r#s$@U#s$f%Z$f$g+g$g#BYEr#BY#BZ$A`#BZ$ISEr$IS$I_$A`$I_$I|Er$I|$I}$Dk$I}$JO$Dk$JO$JTEr$JT$JU$A`$JU$KVEr$KV$KW$A`$KW&FUEr&FU&FV$A`&FV;'SEr;'S;=`I|<%l?HTEr?HT?HU$A`?HUOEr(n%d_$i&j(Wp(Z!bOY%ZYZ&cZr%Zrs&}sw%Zwx(rx!^%Z!^!_*g!_#O%Z#O#P&c#P#o%Z#o#p*g#p;'S%Z;'S;=`+a<%lO%Z&j&hT$i&jO!^&c!_#o&c#p;'S&c;'S;=`&w<%lO&c&j&zP;=`<%l&c'|'U]$i&j(Z!bOY&}YZ&cZw&}wx&cx!^&}!^!_'}!_#O&}#O#P&c#P#o&}#o#p'}#p;'S&};'S;=`(l<%lO&}!b(SU(Z!bOY'}Zw'}x#O'}#P;'S'};'S;=`(f<%lO'}!b(iP;=`<%l'}'|(oP;=`<%l&}'[(y]$i&j(W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#j!U#j#l!P#l#m!q#m;'S!P;'S;=`#v<%lO!P~!UO!U~~!XS!Q![!e!c!i!e#T#Z!e#o#p#Z~!hR!Q![!q!c!i!q#T#Z!q~!tR!Q![!}!c!i!}#T#Z!}~#QR!Q![!P!c!i!P#T#Z!P~#^R!Q![#g!c!i#g#T#Z#g~#jS!Q![#g!c!i#g#T#Z#g#q#r!P~#yP;=`<%l!P~$RO(c~~",141,340),new vg("j~RQYZXz{^~^O(Q~~aP!P!Qd~iO(R~~",25,323)],topRules:{Script:[0,7],SingleExpression:[1,276],SingleClassItem:[2,277]},dialects:{jsx:0,ts:15175},dynamicPrecedences:{80:1,82:1,94:1,169:1,199:1},specialized:[{term:327,get:t=>eie[t]||-1},{term:343,get:t=>tie[t]||-1},{term:95,get:t=>nie[t]||-1}],tokenPrec:15201});class zS{constructor(e,n,i,r){this.state=e,this.pos=n,this.explicit=i,this.view=r,this.abortListeners=[],this.abortOnDocChange=!1}tokenBefore(e){let n=pt(this.state).resolveInner(this.pos,-1);for(;n&&e.indexOf(n.name)<0;)n=n.parent;return n?{from:n.from,to:this.pos,text:this.state.sliceDoc(n.from,this.pos),type:n.type}:null}matchBefore(e){let n=this.state.doc.lineAt(this.pos),i=Math.max(n.from,this.pos-250),r=n.text.slice(i-n.from,this.pos-n.from),s=r.search(Tj(e,!1));return s<0?null:{from:i+s,to:this.pos,text:r.slice(s)}}get aborted(){return this.abortListeners==null}addEventListener(e,n,i){e=="abort"&&this.abortListeners&&(this.abortListeners.push(n),i&&i.onDocChange&&(this.abortOnDocChange=!0))}}function uA(t){let e=Object.keys(t).join(""),n=/\w/.test(e);return n&&(e=e.replace(/\w/g,"")),`[${n?"\\w":""}${e.replace(/[^\w\s]/g,"\\$&")}]`}function rie(t){let e=Object.create(null),n=Object.create(null);for(let{label:r}of t){e[r[0]]=!0;for(let s=1;s<r.length;s++)n[r[s]]=!0}let i=uA(e)+uA(n)+"*$";return[new RegExp("^"+i),new RegExp(i)]}function Pj(t){let e=t.map(r=>typeof r=="string"?{label:r}:r),[n,i]=e.every(r=>/^\w+$/.test(r.label))?[/\w*$/,/\w+$/]:rie(e);return r=>{let s=r.matchBefore(i);return s||r.explicit?{from:s?s.from:r.pos,options:e,validFor:n}:null}}function sie(t,e){return n=>{for(let i=pt(n.state).resolveInner(n.pos,-1);i;i=i.parent){if(t.indexOf(i.name)>-1)return null;if(i.type.isTop)break}return e(n)}}class hA{constructor(e,n,i,r){this.completion=e,this.source=n,this.match=i,this.score=r}}function qa(t){return t.selection.main.from}function Tj(t,e){var n;let{source:i}=t,r=e&&i[0]!="^",s=i[i.length-1]!="$";return!r&&!s?t:new RegExp(`${r?"^":""}(?:${i})${s?"$":""}`,(n=t.flags)!==null&&n!==void 0?n:t.ignoreCase?"i":"")}const IS=qr.define();function oie(t,e,n,i){let{main:r}=t.selection,s=n-r.from,o=i-r.from;return{...t.changeByRange(l=>{if(l!=r&&n!=i&&t.sliceDoc(l.from+s,l.from+o)!=t.sliceDoc(n,i))return{range:l};let c=t.toText(e);return{changes:{from:l.from+s,to:i==r.from?l.to:l.from+o,insert:c},range:ae.cursor(l.from+s+c.length)}}),scrollIntoView:!0,userEvent:"input.complete"}}const fA=new WeakMap;function aie(t){if(!Array.isArray(t))return t;let e=fA.get(t);return e||fA.set(t,e=Pj(t)),e}const Sg=De.define(),kf=De.define();class lie{constructor(e){this.pattern=e,this.chars=[],this.folded=[],this.any=[],this.precise=[],this.byWord=[],this.score=0,this.matched=[];for(let n=0;n<e.length;){let i=ei(e,n),r=$r(i);this.chars.push(i);let s=e.slice(n,n+r),o=s.toUpperCase();this.folded.push(ei(o==s?s.toLowerCase():o,0)),n+=r}this.astral=e.length!=this.chars.length}ret(e,n){return this.score=e,this.matched=n,this}match(e){if(this.pattern.length==0)return this.ret(-100,[]);if(e.length<this.pattern.length)return null;let{chars:n,folded:i,any:r,precise:s,byWord:o}=this;if(n.length==1){let P=ei(e,0),Q=$r(P),R=Q==e.length?0:-100;if(P!=n[0])if(P==i[0])R+=-200;else return null;return this.ret(R,[0,Q])}let l=e.indexOf(this.pattern);if(l==0)return this.ret(e.length==this.pattern.length?0:-100,[0,this.pattern.length]);let c=n.length,h=0;if(l<0){for(let P=0,Q=Math.min(e.length,200);P<Q&&h<c;){let R=ei(e,P);(R==n[h]||R==i[h])&&(r[h++]=P),P+=$r(R)}if(h<c)return null}let d=0,p=0,g=!1,O=0,x=-1,S=-1,_=/[a-z]/.test(e),k=!0;for(let P=0,Q=Math.min(e.length,200),R=0;P<Q&&p<c;){let $=ei(e,P);l<0&&(d<c&&$==n[d]&&(s[d++]=P),O<c&&($==n[O]||$==i[O]?(O==0&&(x=P),S=P+1,O++):O=0));let C,D=$<255?$>=48&&$<=57||$>=97&&$<=122?2:$>=65&&$<=90?1:0:(C=pS($))!=C.toLowerCase()?1:C!=C.toUpperCase()?2:0;(!P||D==1&&_||R==0&&D!=0)&&(n[p]==$||i[p]==$&&(g=!0)?o[p++]=P:o.length&&(k=!1)),R=D,P+=$r($)}return p==c&&o[0]==0&&k?this.result(-100+(g?-200:0),o,e):O==c&&x==0?this.ret(-200-e.length+(S==e.length?0:-100),[0,S]):l>-1?this.ret(-700-e.length,[l,l+this.pattern.length]):O==c?this.ret(-900-e.length,[x,S]):p==c?this.result(-100+(g?-200:0)+-700+(k?0:-1100),o,e):n.length==2?null:this.result((r[0]?-700:0)+-200+-1100,r,e)}result(e,n,i){let r=[],s=0;for(let o of n){let l=o+(this.astral?$r(ei(i,o)):1);s&&r[s-1]==o?r[s-1]=l:(r[s++]=o,r[s++]=l)}return this.ret(e-i.length,r)}}class cie{constructor(e){this.pattern=e,this.matched=[],this.score=0,this.folded=e.toLowerCase()}match(e){if(e.length<this.pattern.length)return null;let n=e.slice(0,this.pattern.length),i=n==this.pattern?0:n.toLowerCase()==this.folded?-200:null;return i==null?null:(this.matched=[0,n.length],this.score=i+(e.length==this.pattern.length?0:-100),this)}}const ln=we.define({combine(t){return Ur(t,{activateOnTyping:!0,activateOnCompletion:()=>!1,activateOnTypingDelay:100,selectOnOpen:!0,override:null,closeOnBlur:!0,maxRenderedOptions:100,defaultKeymap:!0,tooltipClass:()=>"",optionClass:()=>"",aboveCursor:!1,icons:!0,addToOptions:[],positionInfo:uie,filterStrict:!1,compareCompletions:(e,n)=>(e.sortText||e.label).localeCompare(n.sortText||n.label),interactionDelay:75,updateSyncTime:100},{defaultKeymap:(e,n)=>e&&n,closeOnBlur:(e,n)=>e&&n,icons:(e,n)=>e&&n,tooltipClass:(e,n)=>i=>dA(e(i),n(i)),optionClass:(e,n)=>i=>dA(e(i),n(i)),addToOptions:(e,n)=>e.concat(n),filterStrict:(e,n)=>e||n})}});function dA(t,e){return t?e?t+" "+e:t:e}function uie(t,e,n,i,r,s){let o=t.textDirection==Ct.RTL,l=o,c=!1,h="top",d,p,g=e.left-r.left,O=r.right-e.right,x=i.right-i.left,S=i.bottom-i.top;if(l&&g<Math.min(x,O)?l=!1:!l&&O<Math.min(x,g)&&(l=!0),x<=(l?g:O))d=Math.max(r.top,Math.min(n.top,r.bottom-S))-e.top,p=Math.min(400,l?g:O);else{c=!0,p=Math.min(400,(o?e.right:r.right-e.left)-30);let P=r.bottom-e.bottom;P>=S||P>e.top?d=n.bottom-e.top:(h="bottom",d=e.bottom-n.top)}let _=(e.bottom-e.top)/s.offsetHeight,k=(e.right-e.left)/s.offsetWidth;return{style:`${h}: ${d/_}px; max-width: ${p/k}px`,class:"cm-completionInfo-"+(c?o?"left-narrow":"right-narrow":l?"left":"right")}}function hie(t){let e=t.addToOptions.slice();return t.icons&&e.push({render(n){let i=document.createElement("div");return i.classList.add("cm-completionIcon"),n.type&&i.classList.add(...n.type.split(/\s+/g).map(r=>"cm-completionIcon-"+r)),i.setAttribute("aria-hidden","true"),i},position:20}),e.push({render(n,i,r,s){let o=document.createElement("span");o.className="cm-completionLabel";let l=n.displayLabel||n.label,c=0;for(let h=0;h<s.length;){let d=s[h++],p=s[h++];d>c&&o.appendChild(document.createTextNode(l.slice(c,d)));let g=o.appendChild(document.createElement("span"));g.appendChild(document.createTextNode(l.slice(d,p))),g.className="cm-completionMatchedText",c=p}return c<l.length&&o.appendChild(document.createTextNode(l.slice(c))),o},position:50},{render(n){if(!n.detail)return null;let i=document.createElement("span");return i.className="cm-completionDetail",i.textContent=n.detail,i},position:80}),e.sort((n,i)=>n.position-i.position).map(n=>n.render)}function Wb(t,e,n){if(t<=n)return{from:0,to:t};if(e<0&&(e=0),e<=t>>1){let r=Math.floor(e/n);return{from:r*n,to:(r+1)*n}}let i=Math.floor((t-e)/n);return{from:t-(i+1)*n,to:t-i*n}}class fie{constructor(e,n,i){this.view=e,this.stateField=n,this.applyCompletion=i,this.info=null,this.infoDestroy=null,this.placeInfoReq={read:()=>this.measureInfo(),write:c=>this.placeInfo(c),key:this},this.space=null,this.currentClass="";let r=e.state.field(n),{options:s,selected:o}=r.open,l=e.state.facet(ln);this.optionContent=hie(l),this.optionClass=l.optionClass,this.tooltipClass=l.tooltipClass,this.range=Wb(s.length,o,l.maxRenderedOptions),this.dom=document.createElement("div"),this.dom.className="cm-tooltip-autocomplete",this.updateTooltipClass(e.state),this.dom.addEventListener("mousedown",c=>{let{options:h}=e.state.field(n).open;for(let d=c.target,p;d&&d!=this.dom;d=d.parentNode)if(d.nodeName=="LI"&&(p=/-(\d+)$/.exec(d.id))&&+p[1]<h.length){this.applyCompletion(e,h[+p[1]]),c.preventDefault();return}}),this.dom.addEventListener("focusout",c=>{let h=e.state.field(this.stateField,!1);h&&h.tooltip&&e.state.facet(ln).closeOnBlur&&c.relatedTarget!=e.contentDOM&&e.dispatch({effects:kf.of(null)})}),this.showOptions(s,r.id)}mount(){this.updateSel()}showOptions(e,n){this.list&&this.list.remove(),this.list=this.dom.appendChild(this.createListBox(e,n,this.range)),this.list.addEventListener("scroll",()=>{this.info&&this.view.requestMeasure(this.placeInfoReq)})}update(e){var n;let i=e.state.field(this.stateField),r=e.startState.field(this.stateField);if(this.updateTooltipClass(e.state),i!=r){let{options:s,selected:o,disabled:l}=i.open;(!r.open||r.open.options!=s)&&(this.range=Wb(s.length,o,e.state.facet(ln).maxRenderedOptions),this.showOptions(s,i.id)),this.updateSel(),l!=((n=r.open)===null||n===void 0?void 0:n.disabled)&&this.dom.classList.toggle("cm-tooltip-autocomplete-disabled",!!l)}}updateTooltipClass(e){let n=this.tooltipClass(e);if(n!=this.currentClass){for(let i of this.currentClass.split(" "))i&&this.dom.classList.remove(i);for(let i of n.split(" "))i&&this.dom.classList.add(i);this.currentClass=n}}positioned(e){this.space=e,this.info&&this.view.requestMeasure(this.placeInfoReq)}updateSel(){let e=this.view.state.field(this.stateField),n=e.open;(n.selected>-1&&n.selected<this.range.from||n.selected>=this.range.to)&&(this.range=Wb(n.options.length,n.selected,this.view.state.facet(ln).maxRenderedOptions),this.showOptions(n.options,e.id));let i=this.updateSelectedOption(n.selected);if(i){this.destroyInfo();let{completion:r}=n.options[n.selected],{info:s}=r;if(!s)return;let o=typeof s=="string"?document.createTextNode(s):s(r);if(!o)return;"then"in o?o.then(l=>{l&&this.view.state.field(this.stateField,!1)==e&&this.addInfoPane(l,r)}).catch(l=>ni(this.view.state,l,"completion info")):(this.addInfoPane(o,r),i.setAttribute("aria-describedby",this.info.id))}}addInfoPane(e,n){this.destroyInfo();let i=this.info=document.createElement("div");if(i.className="cm-tooltip cm-completionInfo",i.id="cm-completionInfo-"+Math.floor(Math.random()*65535).toString(16),e.nodeType!=null)i.appendChild(e),this.infoDestroy=null;else{let{dom:r,destroy:s}=e;i.appendChild(r),this.infoDestroy=s||null}this.dom.appendChild(i),this.view.requestMeasure(this.placeInfoReq)}updateSelectedOption(e){let n=null;for(let i=this.list.firstChild,r=this.range.from;i;i=i.nextSibling,r++)i.nodeName!="LI"||!i.id?r--:r==e?i.hasAttribute("aria-selected")||(i.setAttribute("aria-selected","true"),n=i):i.hasAttribute("aria-selected")&&(i.removeAttribute("aria-selected"),i.removeAttribute("aria-describedby"));return n&&pie(this.list,n),n}measureInfo(){let e=this.dom.querySelector("[aria-selected]");if(!e||!this.info)return null;let n=this.dom.getBoundingClientRect(),i=this.info.getBoundingClientRect(),r=e.getBoundingClientRect(),s=this.space;if(!s){let o=this.dom.ownerDocument.documentElement;s={left:0,top:0,right:o.clientWidth,bottom:o.clientHeight}}return r.top>Math.min(s.bottom,n.bottom)-10||r.bottom<Math.max(s.top,n.top)+10?null:this.view.state.facet(ln).positionInfo(this.view,n,r,i,s,this.dom)}placeInfo(e){this.info&&(e?(e.style&&(this.info.style.cssText=e.style),this.info.className="cm-tooltip cm-completionInfo "+(e.class||"")):this.info.style.cssText="top: -1e6px")}createListBox(e,n,i){const r=document.createElement("ul");r.id=n,r.setAttribute("role","listbox"),r.setAttribute("aria-expanded","true"),r.setAttribute("aria-label",this.view.state.phrase("Completions")),r.addEventListener("mousedown",o=>{o.target==r&&o.preventDefault()});let s=null;for(let o=i.from;o<i.to;o++){let{completion:l,match:c}=e[o],{section:h}=l;if(h){let g=typeof h=="string"?h:h.name;if(g!=s&&(o>i.from||i.from==0))if(s=g,typeof h!="string"&&h.header)r.appendChild(h.header(h));else{let O=r.appendChild(document.createElement("completion-section"));O.textContent=g}}const d=r.appendChild(document.createElement("li"));d.id=n+"-"+o,d.setAttribute("role","option");let p=this.optionClass(l);p&&(d.className=p);for(let g of this.optionContent){let O=g(l,this.view.state,this.view,c);O&&d.appendChild(O)}}return i.from&&r.classList.add("cm-completionListIncompleteTop"),i.to<e.length&&r.classList.add("cm-completionListIncompleteBottom"),r}destroyInfo(){this.info&&(this.infoDestroy&&this.infoDestroy(),this.info.remove(),this.info=null)}destroy(){this.destroyInfo()}}function die(t,e){return n=>new fie(n,t,e)}function pie(t,e){let n=t.getBoundingClientRect(),i=e.getBoundingClientRect(),r=n.height/t.offsetHeight;i.top<n.top?t.scrollTop-=(n.top-i.top)/r:i.bottom>n.bottom&&(t.scrollTop+=(i.bottom-n.bottom)/r)}function pA(t){return(t.boost||0)*100+(t.apply?10:0)+(t.info?5:0)+(t.type?1:0)}function mie(t,e){let n=[],i=null,r=null,s=d=>{n.push(d);let{section:p}=d.completion;if(p){i||(i=[]);let g=typeof p=="string"?p:p.name;i.some(O=>O.name==g)||i.push(typeof p=="string"?{name:g}:p)}},o=e.facet(ln);for(let d of t)if(d.hasResult()){let p=d.result.getMatch;if(d.result.filter===!1)for(let g of d.result.options)s(new hA(g,d.source,p?p(g):[],1e9-n.length));else{let g=e.sliceDoc(d.from,d.to),O,x=o.filterStrict?new cie(g):new lie(g);for(let S of d.result.options)if(O=x.match(S.label)){let _=S.displayLabel?p?p(S,O.matched):[]:O.matched,k=O.score+(S.boost||0);if(s(new hA(S,d.source,_,k)),typeof S.section=="object"&&S.section.rank==="dynamic"){let{name:P}=S.section;r||(r=Object.create(null)),r[P]=Math.max(k,r[P]||-1e9)}}}}if(i){let d=Object.create(null),p=0,g=(O,x)=>(O.rank==="dynamic"&&x.rank==="dynamic"?r[x.name]-r[O.name]:0)||(typeof O.rank=="number"?O.rank:1e9)-(typeof x.rank=="number"?x.rank:1e9)||(O.name<x.name?-1:1);for(let O of i.sort(g))p-=1e5,d[O.name]=p;for(let O of n){let{section:x}=O.completion;x&&(O.score+=d[typeof x=="string"?x:x.name])}}let l=[],c=null,h=o.compareCompletions;for(let d of n.sort((p,g)=>g.score-p.score||h(p.completion,g.completion))){let p=d.completion;!c||c.label!=p.label||c.detail!=p.detail||c.type!=null&&p.type!=null&&c.type!=p.type||c.apply!=p.apply||c.boost!=p.boost?l.push(d):pA(d.completion)>pA(c)&&(l[l.length-1]=d),c=d.completion}return l}class dc{constructor(e,n,i,r,s,o){this.options=e,this.attrs=n,this.tooltip=i,this.timestamp=r,this.selected=s,this.disabled=o}setSelected(e,n){return e==this.selected||e>=this.options.length?this:new dc(this.options,mA(n,e),this.tooltip,this.timestamp,e,this.disabled)}static build(e,n,i,r,s,o){if(r&&!o&&e.some(h=>h.isPending))return r.setDisabled();let l=mie(e,n);if(!l.length)return r&&e.some(h=>h.isPending)?r.setDisabled():null;let c=n.facet(ln).selectOnOpen?0:-1;if(r&&r.selected!=c&&r.selected!=-1){let h=r.options[r.selected].completion;for(let d=0;d<l.length;d++)if(l[d].completion==h){c=d;break}}return new dc(l,mA(i,c),{pos:e.reduce((h,d)=>d.hasResult()?Math.min(h,d.from):h,1e8),create:vie,above:s.aboveCursor},r?r.timestamp:Date.now(),c,!1)}map(e){return new dc(this.options,this.attrs,{...this.tooltip,pos:e.mapPos(this.tooltip.pos)},this.timestamp,this.selected,this.disabled)}setDisabled(){return new dc(this.options,this.attrs,this.tooltip,this.timestamp,this.selected,!0)}}class _g{constructor(e,n,i){this.active=e,this.id=n,this.open=i}static start(){return new _g(bie,"cm-ac-"+Math.floor(Math.random()*2e6).toString(36),null)}update(e){let{state:n}=e,i=n.facet(ln),s=(i.override||n.languageDataAt("autocomplete",qa(n)).map(aie)).map(c=>(this.active.find(d=>d.source==c)||new Ui(c,this.active.some(d=>d.state!=0)?1:0)).update(e,i));s.length==this.active.length&&s.every((c,h)=>c==this.active[h])&&(s=this.active);let o=this.open,l=e.effects.some(c=>c.is(XS));o&&e.docChanged&&(o=o.map(e.changes)),e.selection||s.some(c=>c.hasResult()&&e.changes.touchesRange(c.from,c.to))||!gie(s,this.active)||l?o=dc.build(s,n,this.id,o,i,l):o&&o.disabled&&!s.some(c=>c.isPending)&&(o=null),!o&&s.every(c=>!c.isPending)&&s.some(c=>c.hasResult())&&(s=s.map(c=>c.hasResult()?new Ui(c.source,0):c));for(let c of e.effects)c.is(Cj)&&(o=o&&o.setSelected(c.value,this.id));return s==this.active&&o==this.open?this:new _g(s,this.id,o)}get tooltip(){return this.open?this.open.tooltip:null}get attrs(){return this.open?this.open.attrs:this.active.length?Oie:yie}}function gie(t,e){if(t==e)return!0;for(let n=0,i=0;;){for(;n<t.length&&!t[n].hasResult();)n++;for(;i<e.length&&!e[i].hasResult();)i++;let r=n==t.length,s=i==e.length;if(r||s)return r==s;if(t[n++].result!=e[i++].result)return!1}}const Oie={"aria-autocomplete":"list"},yie={};function mA(t,e){let n={"aria-autocomplete":"list","aria-haspopup":"listbox","aria-controls":t};return e>-1&&(n["aria-activedescendant"]=t+"-"+e),n}const bie=[];function Qj(t,e){if(t.isUserEvent("input.complete")){let i=t.annotation(IS);if(i&&e.activateOnCompletion(i))return 12}let n=t.isUserEvent("input.type");return n&&e.activateOnTyping?5:n?1:t.isUserEvent("delete.backward")?2:t.selection?8:t.docChanged?16:0}class Ui{constructor(e,n,i=!1){this.source=e,this.state=n,this.explicit=i}hasResult(){return!1}get isPending(){return this.state==1}update(e,n){let i=Qj(e,n),r=this;(i&8||i&16&&this.touches(e))&&(r=new Ui(r.source,0)),i&4&&r.state==0&&(r=new Ui(this.source,1)),r=r.updateFor(e,i);for(let s of e.effects)if(s.is(Sg))r=new Ui(r.source,1,s.value);else if(s.is(kf))r=new Ui(r.source,0);else if(s.is(XS))for(let o of s.value)o.source==r.source&&(r=o);return r}updateFor(e,n){return this.map(e.changes)}map(e){return this}touches(e){return e.changes.touchesRange(qa(e.state))}}class kc extends Ui{constructor(e,n,i,r,s,o){super(e,3,n),this.limit=i,this.result=r,this.from=s,this.to=o}hasResult(){return!0}updateFor(e,n){var i;if(!(n&3))return this.map(e.changes);let r=this.result;r.map&&!e.changes.empty&&(r=r.map(r,e.changes));let s=e.changes.mapPos(this.from),o=e.changes.mapPos(this.to,1),l=qa(e.state);if(l>o||!r||n&2&&(qa(e.startState)==this.from||l<this.limit))return new Ui(this.source,n&4?1:0);let c=e.changes.mapPos(this.limit);return xie(r.validFor,e.state,s,o)?new kc(this.source,this.explicit,c,r,s,o):r.update&&(r=r.update(r,s,o,new zS(e.state,l,!1)))?new kc(this.source,this.explicit,c,r,r.from,(i=r.to)!==null&&i!==void 0?i:qa(e.state)):new Ui(this.source,1,this.explicit)}map(e){return e.empty?this:(this.result.map?this.result.map(this.result,e):this.result)?new kc(this.source,this.explicit,e.mapPos(this.limit),this.result,e.mapPos(this.from),e.mapPos(this.to,1)):new Ui(this.source,0)}touches(e){return e.changes.touchesRange(this.from,this.to)}}function xie(t,e,n,i){if(!t)return!1;let r=e.sliceDoc(n,i);return typeof t=="function"?t(r,n,i,e):Tj(t,!0).test(r)}const XS=De.define({map(t,e){return t.map(n=>n.map(e))}}),Cj=De.define(),ti=cn.define({create(){return _g.start()},update(t,e){return t.update(e)},provide:t=>[QS.from(t,e=>e.tooltip),ye.contentAttributes.from(t,e=>e.attrs)]});function VS(t,e){const n=e.completion.apply||e.completion.label;let i=t.state.field(ti).active.find(r=>r.source==e.source);return i instanceof kc?(typeof n=="string"?t.dispatch({...oie(t.state,n,i.from,i.to),annotations:IS.of(e.completion)}):n(t,e.completion,i.from,i.to),!0):!1}const vie=die(ti,VS);function im(t,e="option"){return n=>{let i=n.state.field(ti,!1);if(!i||!i.open||i.open.disabled||Date.now()-i.open.timestamp<n.state.facet(ln).interactionDelay)return!1;let r=1,s;e=="page"&&(s=gD(n,i.open.tooltip))&&(r=Math.max(2,Math.floor(s.dom.offsetHeight/s.dom.querySelector("li").offsetHeight)-1));let{length:o}=i.open.options,l=i.open.selected>-1?i.open.selected+r*(t?1:-1):t?0:o-1;return l<0?l=e=="page"?0:o-1:l>=o&&(l=e=="page"?o-1:0),n.dispatch({effects:Cj.of(l)}),!0}}const Sie=t=>{let e=t.state.field(ti,!1);return t.state.readOnly||!e||!e.open||e.open.selected<0||e.open.disabled||Date.now()-e.open.timestamp<t.state.facet(ln).interactionDelay?!1:VS(t,e.open.options[e.open.selected])},Hb=t=>t.state.field(ti,!1)?(t.dispatch({effects:Sg.of(!0)}),!0):!1,_ie=t=>{let e=t.state.field(ti,!1);return!e||!e.active.some(n=>n.state!=0)?!1:(t.dispatch({effects:kf.of(null)}),!0)};class kie{constructor(e,n){this.active=e,this.context=n,this.time=Date.now(),this.updates=[],this.done=void 0}}const wie=50,Pie=1e3,Tie=Dt.fromClass(class{constructor(t){this.view=t,this.debounceUpdate=-1,this.running=[],this.debounceAccept=-1,this.pendingStart=!1,this.composing=0;for(let e of t.state.field(ti).active)e.isPending&&this.startQuery(e)}update(t){let e=t.state.field(ti),n=t.state.facet(ln);if(!t.selectionSet&&!t.docChanged&&t.startState.field(ti)==e)return;let i=t.transactions.some(s=>{let o=Qj(s,n);return o&8||(s.selection||s.docChanged)&&!(o&3)});for(let s=0;s<this.running.length;s++){let o=this.running[s];if(i||o.context.abortOnDocChange&&t.docChanged||o.updates.length+t.transactions.length>wie&&Date.now()-o.time>Pie){for(let l of o.context.abortListeners)try{l()}catch(c){ni(this.view.state,c)}o.context.abortListeners=null,this.running.splice(s--,1)}else o.updates.push(...t.transactions)}this.debounceUpdate>-1&&clearTimeout(this.debounceUpdate),t.transactions.some(s=>s.effects.some(o=>o.is(Sg)))&&(this.pendingStart=!0);let r=this.pendingStart?50:n.activateOnTypingDelay;if(this.debounceUpdate=e.active.some(s=>s.isPending&&!this.running.some(o=>o.active.source==s.source))?setTimeout(()=>this.startUpdate(),r):-1,this.composing!=0)for(let s of t.transactions)s.isUserEvent("input.type")?this.composing=2:this.composing==2&&s.selection&&(this.composing=3)}startUpdate(){this.debounceUpdate=-1,this.pendingStart=!1;let{state:t}=this.view,e=t.field(ti);for(let n of e.active)n.isPending&&!this.running.some(i=>i.active.source==n.source)&&this.startQuery(n);this.running.length&&e.open&&e.open.disabled&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ln).updateSyncTime))}startQuery(t){let{state:e}=this.view,n=qa(e),i=new zS(e,n,t.explicit,this.view),r=new kie(t,i);this.running.push(r),Promise.resolve(t.source(i)).then(s=>{r.context.aborted||(r.done=s||null,this.scheduleAccept())},s=>{this.view.dispatch({effects:kf.of(null)}),ni(this.view.state,s)})}scheduleAccept(){this.running.every(t=>t.done!==void 0)?this.accept():this.debounceAccept<0&&(this.debounceAccept=setTimeout(()=>this.accept(),this.view.state.facet(ln).updateSyncTime))}accept(){var t;this.debounceAccept>-1&&clearTimeout(this.debounceAccept),this.debounceAccept=-1;let e=[],n=this.view.state.facet(ln),i=this.view.state.field(ti);for(let r=0;r<this.running.length;r++){let s=this.running[r];if(s.done===void 0)continue;if(this.running.splice(r--,1),s.done){let l=qa(s.updates.length?s.updates[0].startState:this.view.state),c=Math.min(l,s.done.from+(s.active.explicit?0:1)),h=new kc(s.active.source,s.active.explicit,c,s.done,s.done.from,(t=s.done.to)!==null&&t!==void 0?t:l);for(let d of s.updates)h=h.update(d,n);if(h.hasResult()){e.push(h);continue}}let o=i.active.find(l=>l.source==s.active.source);if(o&&o.isPending)if(s.done==null){let l=new Ui(s.active.source,0);for(let c of s.updates)l=l.update(c,n);l.isPending||e.push(l)}else this.startQuery(o)}(e.length||i.open&&i.open.disabled)&&this.view.dispatch({effects:XS.of(e)})}},{eventHandlers:{blur(t){let e=this.view.state.field(ti,!1);if(e&&e.tooltip&&this.view.state.facet(ln).closeOnBlur){let n=e.open&&gD(this.view,e.open.tooltip);(!n||!n.dom.contains(t.relatedTarget))&&setTimeout(()=>this.view.dispatch({effects:kf.of(null)}),10)}},compositionstart(){this.composing=1},compositionend(){this.composing==3&&setTimeout(()=>this.view.dispatch({effects:Sg.of(!1)}),20),this.composing=0}}}),Qie=typeof navigator=="object"&&/Win/.test(navigator.platform),Cie=Is.highest(ye.domEventHandlers({keydown(t,e){let n=e.state.field(ti,!1);if(!n||!n.open||n.open.disabled||n.open.selected<0||t.key.length>1||t.ctrlKey&&!(Qie&&t.altKey)||t.metaKey)return!1;let i=n.open.options[n.open.selected],r=n.active.find(o=>o.source==i.source),s=i.completion.commitCharacters||r.result.commitCharacters;return s&&s.indexOf(t.key)>-1&&VS(e,i),!1}})),Ej=ye.baseTheme({".cm-tooltip.cm-tooltip-autocomplete":{"& > ul":{fontFamily:"monospace",whiteSpace:"nowrap",overflow:"hidden auto",maxWidth_fallback:"700px",maxWidth:"min(700px, 95vw)",minWidth:"250px",maxHeight:"10em",height:"100%",listStyle:"none",margin:0,padding:0,"& > li, & > completion-section":{padding:"1px 3px",lineHeight:1.2},"& > li":{overflowX:"hidden",textOverflow:"ellipsis",cursor:"pointer"},"& > completion-section":{display:"list-item",borderBottom:"1px solid silver",paddingLeft:"0.5em",opacity:.7}}},"&light .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#17c",color:"white"},"&light .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#777"},"&dark .cm-tooltip-autocomplete ul li[aria-selected]":{background:"#347",color:"white"},"&dark .cm-tooltip-autocomplete-disabled ul li[aria-selected]":{background:"#444"},".cm-completionListIncompleteTop:before, .cm-completionListIncompleteBottom:after":{content:'"···"',opacity:.5,display:"block",textAlign:"center"},".cm-tooltip.cm-completionInfo":{position:"absolute",padding:"3px 9px",width:"max-content",maxWidth:"400px",boxSizing:"border-box",whiteSpace:"pre-line"},".cm-completionInfo.cm-completionInfo-left":{right:"100%"},".cm-completionInfo.cm-completionInfo-right":{left:"100%"},".cm-completionInfo.cm-completionInfo-left-narrow":{right:"30px"},".cm-completionInfo.cm-completionInfo-right-narrow":{left:"30px"},"&light .cm-snippetField":{backgroundColor:"#00000022"},"&dark .cm-snippetField":{backgroundColor:"#ffffff22"},".cm-snippetFieldPosition":{verticalAlign:"text-top",width:0,height:"1.15em",display:"inline-block",margin:"0 -0.7px -.7em",borderLeft:"1.4px dotted #888"},".cm-completionMatchedText":{textDecoration:"underline"},".cm-completionDetail":{marginLeft:"0.5em",fontStyle:"italic"},".cm-completionIcon":{fontSize:"90%",width:".8em",display:"inline-block",textAlign:"center",paddingRight:".6em",opacity:"0.6",boxSizing:"content-box"},".cm-completionIcon-function, .cm-completionIcon-method":{"&:after":{content:"'ƒ'"}},".cm-completionIcon-class":{"&:after":{content:"'○'"}},".cm-completionIcon-interface":{"&:after":{content:"'◌'"}},".cm-completionIcon-variable":{"&:after":{content:"'𝑥'"}},".cm-completionIcon-constant":{"&:after":{content:"'𝐶'"}},".cm-completionIcon-type":{"&:after":{content:"'𝑡'"}},".cm-completionIcon-enum":{"&:after":{content:"'∪'"}},".cm-completionIcon-property":{"&:after":{content:"'□'"}},".cm-completionIcon-keyword":{"&:after":{content:"'🔑︎'"}},".cm-completionIcon-namespace":{"&:after":{content:"'▢'"}},".cm-completionIcon-text":{"&:after":{content:"'abc'",fontSize:"50%",verticalAlign:"middle"}}});class Eie{constructor(e,n,i,r){this.field=e,this.line=n,this.from=i,this.to=r}}class BS{constructor(e,n,i){this.field=e,this.from=n,this.to=i}map(e){let n=e.mapPos(this.from,-1,On.TrackDel),i=e.mapPos(this.to,1,On.TrackDel);return n==null||i==null?null:new BS(this.field,n,i)}}class ZS{constructor(e,n){this.lines=e,this.fieldPositions=n}instantiate(e,n){let i=[],r=[n],s=e.doc.lineAt(n),o=/^\s*/.exec(s.text)[0];for(let c of this.lines){if(i.length){let h=o,d=/^\t*/.exec(c)[0].length;for(let p=0;p<d;p++)h+=e.facet(uu);r.push(n+h.length-d),c=h+c.slice(d)}i.push(c),n+=c.length+1}let l=this.fieldPositions.map(c=>new BS(c.field,r[c.line]+c.from,r[c.line]+c.to));return{text:i,ranges:l}}static parse(e){let n=[],i=[],r=[],s;for(let o of e.split(/\r\n?|\n/)){for(;s=/[#$]\{(?:(\d+)(?::([^{}]*))?|((?:\\[{}]|[^{}])*))\}/.exec(o);){let l=s[1]?+s[1]:null,c=s[2]||s[3]||"",h=-1,d=c.replace(/\\[{}]/g,p=>p[1]);for(let p=0;p<n.length;p++)(l!=null?n[p].seq==l:d&&n[p].name==d)&&(h=p);if(h<0){let p=0;for(;p<n.length&&(l==null||n[p].seq!=null&&n[p].seq<l);)p++;n.splice(p,0,{seq:l,name:d}),h=p;for(let g of r)g.field>=h&&g.field++}for(let p of r)if(p.line==i.length&&p.from>s.index){let g=s[2]?3+(s[1]||"").length:2;p.from-=g,p.to-=g}r.push(new Eie(h,i.length,s.index,s.index+d.length)),o=o.slice(0,s.index)+c+o.slice(s.index+s[0].length)}o=o.replace(/\\([{}])/g,(l,c,h)=>{for(let d of r)d.line==i.length&&d.from>h&&(d.from--,d.to--);return c}),i.push(o)}return new ZS(i,r)}}let Aie=ke.widget({widget:new class extends Ti{toDOM(){let t=document.createElement("span");return t.className="cm-snippetFieldPosition",t}ignoreEvent(){return!1}}}),Rie=ke.mark({class:"cm-snippetField"});class fu{constructor(e,n){this.ranges=e,this.active=n,this.deco=ke.set(e.map(i=>(i.from==i.to?Aie:Rie).range(i.from,i.to)),!0)}map(e){let n=[];for(let i of this.ranges){let r=i.map(e);if(!r)return null;n.push(r)}return new fu(n,this.active)}selectionInsideField(e){return e.ranges.every(n=>this.ranges.some(i=>i.field==this.active&&i.from<=n.from&&i.to>=n.to))}}const td=De.define({map(t,e){return t&&t.map(e)}}),$ie=De.define(),wf=cn.define({create(){return null},update(t,e){for(let n of e.effects){if(n.is(td))return n.value;if(n.is($ie)&&t)return new fu(t.ranges,n.value)}return t&&e.docChanged&&(t=t.map(e.changes)),t&&e.selection&&!t.selectionInsideField(e.selection)&&(t=null),t},provide:t=>ye.decorations.from(t,e=>e?e.deco:ke.none)});function qS(t,e){return ae.create(t.filter(n=>n.field==e).map(n=>ae.range(n.from,n.to)))}function Lie(t){let e=ZS.parse(t);return(n,i,r,s)=>{let{text:o,ranges:l}=e.instantiate(n.state,r),{main:c}=n.state.selection,h={changes:{from:r,to:s==c.from?c.to:s,insert:tt.of(o)},scrollIntoView:!0,annotations:i?[IS.of(i),Wt.userEvent.of("input.complete")]:void 0};if(l.length&&(h.selection=qS(l,0)),l.some(d=>d.field>0)){let d=new fu(l,0),p=h.effects=[td.of(d)];n.state.field(wf,!1)===void 0&&p.push(De.appendConfig.of([wf,zie,Iie,Ej]))}n.dispatch(n.state.update(h))}}function Aj(t){return({state:e,dispatch:n})=>{let i=e.field(wf,!1);if(!i||t<0&&i.active==0)return!1;let r=i.active+t,s=t>0&&!i.ranges.some(o=>o.field==r+t);return n(e.update({selection:qS(i.ranges,r),effects:td.of(s?null:new fu(i.ranges,r)),scrollIntoView:!0})),!0}}const Mie=({state:t,dispatch:e})=>t.field(wf,!1)?(e(t.update({effects:td.of(null)})),!0):!1,Die=Aj(1),jie=Aj(-1),Nie=[{key:"Tab",run:Die,shift:jie},{key:"Escape",run:Mie}],gA=we.define({combine(t){return t.length?t[0]:Nie}}),zie=Is.highest(al.compute([gA],t=>t.facet(gA)));function Fn(t,e){return{...e,apply:Lie(t)}}const Iie=ye.domEventHandlers({mousedown(t,e){let n=e.state.field(wf,!1),i;if(!n||(i=e.posAtCoords({x:t.clientX,y:t.clientY}))==null)return!1;let r=n.ranges.find(s=>s.from<=i&&s.to>=i);return!r||r.field==n.active?!1:(e.dispatch({selection:qS(n.ranges,r.field),effects:td.of(n.ranges.some(s=>s.field>r.field)?new fu(n.ranges,r.field):null),scrollIntoView:!0}),!0)}}),Pf={brackets:["(","[","{","'",'"'],before:")]}:;>",stringPrefixes:[]},Ea=De.define({map(t,e){let n=e.mapPos(t,-1,On.TrackAfter);return n??void 0}}),US=new class extends Fa{};US.startSide=1;US.endSide=-1;const Rj=cn.define({create(){return rt.empty},update(t,e){if(t=t.map(e.changes),e.selection){let n=e.state.doc.lineAt(e.selection.main.head);t=t.update({filter:i=>i>=n.from&&i<=n.to})}for(let n of e.effects)n.is(Ea)&&(t=t.update({add:[US.range(n.value,n.value+1)]}));return t}});function Xie(){return[Bie,Rj]}const Fb="()[]{}<>«»»«[]{}";function $j(t){for(let e=0;e<Fb.length;e+=2)if(Fb.charCodeAt(e)==t)return Fb.charAt(e+1);return pS(t<128?t:t+1)}function Lj(t,e){return t.languageDataAt("closeBrackets",e)[0]||Pf}const Vie=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Bie=ye.inputHandler.of((t,e,n,i)=>{if((Vie?t.composing:t.compositionStarted)||t.state.readOnly)return!1;let r=t.state.selection.main;if(i.length>2||i.length==2&&$r(ei(i,0))==1||e!=r.from||n!=r.to)return!1;let s=Uie(t.state,i);return s?(t.dispatch(s),!0):!1}),Zie=({state:t,dispatch:e})=>{if(t.readOnly)return!1;let i=Lj(t,t.selection.main.head).brackets||Pf.brackets,r=null,s=t.changeByRange(o=>{if(o.empty){let l=Yie(t.doc,o.head);for(let c of i)if(c==l&&OO(t.doc,o.head)==$j(ei(c,0)))return{changes:{from:o.head-c.length,to:o.head+c.length},range:ae.cursor(o.head-c.length)}}return{range:r=o}});return r||e(t.update(s,{scrollIntoView:!0,userEvent:"delete.backward"})),!r},qie=[{key:"Backspace",run:Zie}];function Uie(t,e){let n=Lj(t,t.selection.main.head),i=n.brackets||Pf.brackets;for(let r of i){let s=$j(ei(r,0));if(e==r)return s==r?Hie(t,r,i.indexOf(r+r+r)>-1,n):Gie(t,r,s,n.before||Pf.before);if(e==s&&Mj(t,t.selection.main.from))return Wie(t,r,s)}return null}function Mj(t,e){let n=!1;return t.field(Rj).between(0,t.doc.length,i=>{i==e&&(n=!0)}),n}function OO(t,e){let n=t.sliceString(e,e+2);return n.slice(0,$r(ei(n,0)))}function Yie(t,e){let n=t.sliceString(e-2,e);return $r(ei(n,0))==n.length?n:n.slice(1)}function Gie(t,e,n,i){let r=null,s=t.changeByRange(o=>{if(!o.empty)return{changes:[{insert:e,from:o.from},{insert:n,from:o.to}],effects:Ea.of(o.to+e.length),range:ae.range(o.anchor+e.length,o.head+e.length)};let l=OO(t.doc,o.head);return!l||/\s/.test(l)||i.indexOf(l)>-1?{changes:{insert:e+n,from:o.head},effects:Ea.of(o.head+e.length),range:ae.cursor(o.head+e.length)}:{range:r=o}});return r?null:t.update(s,{scrollIntoView:!0,userEvent:"input.type"})}function Wie(t,e,n){let i=null,r=t.changeByRange(s=>s.empty&&OO(t.doc,s.head)==n?{changes:{from:s.head,to:s.head+n.length,insert:n},range:ae.cursor(s.head+n.length)}:i={range:s});return i?null:t.update(r,{scrollIntoView:!0,userEvent:"input.type"})}function Hie(t,e,n,i){let r=i.stringPrefixes||Pf.stringPrefixes,s=null,o=t.changeByRange(l=>{if(!l.empty)return{changes:[{insert:e,from:l.from},{insert:e,from:l.to}],effects:Ea.of(l.to+e.length),range:ae.range(l.anchor+e.length,l.head+e.length)};let c=l.head,h=OO(t.doc,c),d;if(h==e){if(OA(t,c))return{changes:{insert:e+e,from:c},effects:Ea.of(c+e.length),range:ae.cursor(c+e.length)};if(Mj(t,c)){let g=n&&t.sliceDoc(c,c+e.length*3)==e+e+e?e+e+e:e;return{changes:{from:c,to:c+g.length,insert:g},range:ae.cursor(c+g.length)}}}else{if(n&&t.sliceDoc(c-2*e.length,c)==e+e&&(d=yA(t,c-2*e.length,r))>-1&&OA(t,d))return{changes:{insert:e+e+e+e,from:c},effects:Ea.of(c+e.length),range:ae.cursor(c+e.length)};if(t.charCategorizer(c)(h)!=Rt.Word&&yA(t,c,r)>-1&&!Fie(t,c,e,r))return{changes:{insert:e+e,from:c},effects:Ea.of(c+e.length),range:ae.cursor(c+e.length)}}return{range:s=l}});return s?null:t.update(o,{scrollIntoView:!0,userEvent:"input.type"})}function OA(t,e){let n=pt(t).resolveInner(e+1);return n.parent&&n.from==e}function Fie(t,e,n,i){let r=pt(t).resolveInner(e,-1),s=i.reduce((o,l)=>Math.max(o,l.length),0);for(let o=0;o<5;o++){let l=t.sliceDoc(r.from,Math.min(r.to,r.from+n.length+s)),c=l.indexOf(n);if(!c||c>-1&&i.indexOf(l.slice(0,c))>-1){let d=r.firstChild;for(;d&&d.from==r.from&&d.to-d.from>n.length+c;){if(t.sliceDoc(d.to-n.length,d.to)==n)return!1;d=d.firstChild}return!0}let h=r.to==e&&r.parent;if(!h)break;r=h}return!1}function yA(t,e,n){let i=t.charCategorizer(e);if(i(t.sliceDoc(e-1,e))!=Rt.Word)return e;for(let r of n){let s=e-r.length;if(t.sliceDoc(s,e)==r&&i(t.sliceDoc(s-1,s))!=Rt.Word)return s}return-1}function Kie(t={}){return[Cie,ti,ln.of(t),Tie,Jie,Ej]}const Dj=[{key:"Ctrl-Space",run:Hb},{mac:"Alt-`",run:Hb},{mac:"Alt-i",run:Hb},{key:"Escape",run:_ie},{key:"ArrowDown",run:im(!0)},{key:"ArrowUp",run:im(!1)},{key:"PageDown",run:im(!0,"page")},{key:"PageUp",run:im(!1,"page")},{key:"Enter",run:Sie}],Jie=Is.highest(al.computeN([ln],t=>t.facet(ln).defaultKeymap?[Dj]:[])),YS=[Fn("function ${name}(${params}) {\n ${}\n}",{label:"function",detail:"definition",type:"keyword"}),Fn("for (let ${index} = 0; ${index} < ${bound}; ${index}++) {\n ${}\n}",{label:"for",detail:"loop",type:"keyword"}),Fn("for (let ${name} of ${collection}) {\n ${}\n}",{label:"for",detail:"of loop",type:"keyword"}),Fn("do {\n ${}\n} while (${})",{label:"do",detail:"loop",type:"keyword"}),Fn("while (${}) {\n ${}\n}",{label:"while",detail:"loop",type:"keyword"}),Fn(`try {
404
+ \${}
405
+ } catch (\${error}) {
406
+ \${}
407
+ }`,{label:"try",detail:"/ catch block",type:"keyword"}),Fn("if (${}) {\n ${}\n}",{label:"if",detail:"block",type:"keyword"}),Fn(`if (\${}) {
408
+ \${}
409
+ } else {
410
+ \${}
411
+ }`,{label:"if",detail:"/ else block",type:"keyword"}),Fn(`class \${name} {
412
+ constructor(\${params}) {
413
+ \${}
414
+ }
415
+ }`,{label:"class",detail:"definition",type:"keyword"}),Fn('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),Fn('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],jj=YS.concat([Fn("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),Fn("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),Fn("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),bA=new UL,Nj=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function vh(t){return(e,n)=>{let i=e.node.getChild("VariableDefinition");return i&&n(i,t),!0}}const ere=["FunctionDeclaration"],tre={FunctionDeclaration:vh("function"),ClassDeclaration:vh("class"),ClassExpression:()=>!0,EnumDeclaration:vh("constant"),TypeAliasDeclaration:vh("type"),NamespaceDeclaration:vh("namespace"),VariableDefinition(t,e){t.matchContext(ere)||e(t,"variable")},TypeDefinition(t,e){e(t,"type")},__proto__:null};function zj(t,e){let n=bA.get(e);if(n)return n;let i=[],r=!0;function s(o,l){let c=t.sliceString(o.from,o.to);i.push({label:c,type:l})}return e.cursor(wt.IncludeAnonymous).iterate(o=>{if(r)r=!1;else if(o.name){let l=tre[o.name];if(l&&l(o,s)||Nj.has(o.name))return!1}else if(o.to-o.from>8192){for(let l of zj(t,o.node))i.push(l);return!1}}),bA.set(e,i),i}const kg=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,GS=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function Ij(t){let e=pt(t.state).resolveInner(t.pos,-1);if(GS.indexOf(e.name)>-1)return null;let n=e.name=="VariableName"||e.to-e.from<20&&kg.test(t.state.sliceDoc(e.from,e.to));if(!n&&!t.explicit)return null;let i=[];for(let r=e;r;r=r.parent)Nj.has(r.name)&&(i=i.concat(zj(t.state.doc,r)));return{options:i,from:n?e.from:t.pos,validFor:kg}}function Kb(t,e,n){var i;let r=[];for(;;){let s=e.firstChild,o;if((s==null?void 0:s.name)=="VariableName")return r.push(t(s)),{path:r.reverse(),name:n};if((s==null?void 0:s.name)=="MemberExpression"&&((i=o=s.lastChild)===null||i===void 0?void 0:i.name)=="PropertyName")r.push(t(o)),e=s;else return null}}function Xj(t){let e=i=>t.state.doc.sliceString(i.from,i.to),n=pt(t.state).resolveInner(t.pos,-1);return n.name=="PropertyName"?Kb(e,n.parent,e(n)):(n.name=="."||n.name=="?.")&&n.parent.name=="MemberExpression"?Kb(e,n.parent,""):GS.indexOf(n.name)>-1?null:n.name=="VariableName"||n.to-n.from<20&&kg.test(e(n))?{path:[],name:e(n)}:n.name=="MemberExpression"?Kb(e,n,""):t.explicit?{path:[],name:""}:null}function nre(t,e){let n=[],i=new Set;for(let r=0;;r++){for(let o of(Object.getOwnPropertyNames||Object.keys)(t)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(o)||i.has(o))continue;i.add(o);let l;try{l=t[o]}catch{continue}n.push({label:o,type:typeof l=="function"?/^[A-Z]/.test(o)?"class":e?"function":"method":e?"variable":"property",boost:-r})}let s=Object.getPrototypeOf(t);if(!s)return n;t=s}}function ire(t){let e=new Map;return n=>{let i=Xj(n);if(!i)return null;let r=t;for(let o of i.path)if(r=r[o],!r)return null;let s=e.get(r);return s||e.set(r,s=nre(r,!i.path.length)),{from:n.pos-i.name.length,options:s,validFor:kg}}}const Wi=Ds.define({name:"javascript",parser:iie.configure({props:[Ho.add({IfStatement:Sc({except:/^\s*({|else\b)/}),TryStatement:Sc({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:aee,SwitchBody:t=>{let e=t.textAfter,n=/^\s*\}/.test(e),i=/^\s*(case|default)\b/.test(e);return t.baseIndent+(n?0:i?1:2)*t.unit},Block:q1({closing:"}"}),ArrowFunction:t=>t.baseIndent+t.unit,"TemplateString BlockComment":()=>null,"Statement Property":Sc({except:/^\s*{/}),JSXElement(t){let e=/^\s*<\//.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},JSXEscape(t){let e=/\s*\}/.test(t.textAfter);return t.lineIndent(t.node.from)+(e?0:t.unit)},"JSXOpenTag JSXSelfClosingTag"(t){return t.column(t.node.from)+t.unit}}),Fo.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":uO,BlockComment(t){return{from:t.from+2,to:t.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Vj={test:t=>/^JSX/.test(t.name),facet:lO({commentTokens:{block:{open:"{/*",close:"*/}"}}})},WS=Wi.configure({dialect:"ts"},"typescript"),HS=Wi.configure({dialect:"jsx",props:[CS.add(t=>t.isTop?[Vj]:void 0)]}),FS=Wi.configure({dialect:"jsx ts",props:[CS.add(t=>t.isTop?[Vj]:void 0)]},"typescript");let Bj=t=>({label:t,type:"keyword"});const Zj="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Bj),rre=Zj.concat(["declare","implements","private","protected","public"].map(Bj));function wg(t={}){let e=t.jsx?t.typescript?FS:HS:t.typescript?WS:Wi,n=t.typescript?jj.concat(rre):YS.concat(Zj);return new Xr(e,[Wi.data.of({autocomplete:sie(GS,Pj(n))}),Wi.data.of({autocomplete:Ij}),t.jsx?qj:[]])}function sre(t){for(;;){if(t.name=="JSXOpenTag"||t.name=="JSXSelfClosingTag"||t.name=="JSXFragmentTag")return t;if(t.name=="JSXEscape"||!t.parent)return null;t=t.parent}}function xA(t,e,n=t.length){for(let i=e==null?void 0:e.firstChild;i;i=i.nextSibling)if(i.name=="JSXIdentifier"||i.name=="JSXBuiltin"||i.name=="JSXNamespacedName"||i.name=="JSXMemberExpression")return t.sliceString(i.from,Math.min(i.to,n));return""}const ore=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),qj=ye.inputHandler.of((t,e,n,i,r)=>{if((ore?t.composing:t.compositionStarted)||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Wi.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,l=o.changeByRange(c=>{var h;let{head:d}=c,p=pt(o).resolveInner(d-1,-1),g;if(p.name=="JSXStartTag"&&(p=p.parent),!(o.doc.sliceString(d-1,d)!=i||p.name=="JSXAttributeValue"&&p.to>d)){if(i==">"&&p.name=="JSXFragmentTag")return{range:c,changes:{from:d,insert:"</>"}};if(i=="/"&&p.name=="JSXStartCloseTag"){let O=p.parent,x=O.parent;if(x&&O.from==d-2&&((g=xA(o.doc,x.firstChild,d))||((h=x.firstChild)===null||h===void 0?void 0:h.name)=="JSXFragmentTag")){let S=`${g}>`;return{range:ae.cursor(d+S.length,-1),changes:{from:d,insert:S}}}}else if(i==">"){let O=sre(p);if(O&&O.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(o.doc.sliceString(d,d+2))&&(g=xA(o.doc,O,d)))return{range:c,changes:{from:d,insert:`</${g}>`}}}}return{range:c}});return l.changes.empty?!1:(t.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function are(t,e){return e||(e={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},t.getRules().forEach((n,i)=>{var r;!((r=n.meta.docs)===null||r===void 0)&&r.recommended&&(e.rules[i]=2)})),n=>{let{state:i}=n,r=[];for(let{from:s,to:o}of Wi.findRegions(i)){let l=i.doc.lineAt(s),c={line:l.number-1,col:s-l.from,pos:s};for(let h of t.verify(i.sliceDoc(s,o),e))r.push(lre(h,i.doc,c))}return r}}function vA(t,e,n,i){return n.line(t+i.line).from+e+(t==1?i.col-1:-1)}function lre(t,e,n){let i=vA(t.line,t.column,e,n),r={from:i,to:t.endLine!=null&&t.endColumn!=1?vA(t.endLine,t.endColumn,e,n):i,message:t.message,source:t.ruleId?"eslint:"+t.ruleId:"eslint",severity:t.severity==1?"warning":"error"};if(t.fix){let{range:s,text:o}=t.fix,l=s[0]+n.pos-i,c=s[1]+n.pos-i;r.actions=[{name:"fix",apply(h,d){h.dispatch({changes:{from:d+l,to:d+c,insert:o},scrollIntoView:!0})}}]}return r}const rm=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:qj,completionPath:Xj,esLint:are,javascript:wg,javascriptLanguage:Wi,jsxLanguage:HS,localCompletionSource:Ij,scopeCompletionSource:ire,snippets:YS,tsxLanguage:FS,typescriptLanguage:WS,typescriptSnippets:jj},Symbol.toStringTag,{value:"Module"})),cre=Xs({String:A.string,Number:A.number,"True False":A.bool,PropertyName:A.propertyName,Null:A.null,", :":A.separator,"[ ]":A.squareBracket,"{ }":A.brace}),ure=js.deserialize({version:14,states:"$bOVQPOOOOQO'#Cb'#CbOnQPO'#CeOvQPO'#ClOOQO'#Cr'#CrQOQPOOOOQO'#Cg'#CgO}QPO'#CfO!SQPO'#CtOOQO,59P,59PO![QPO,59PO!aQPO'#CuOOQO,59W,59WO!iQPO,59WOVQPO,59QOqQPO'#CmO!nQPO,59`OOQO1G.k1G.kOVQPO'#CnO!vQPO,59aOOQO1G.r1G.rOOQO1G.l1G.lOOQO,59X,59XOOQO-E6k-E6kOOQO,59Y,59YOOQO-E6l-E6l",stateData:"#O~OeOS~OQSORSOSSOTSOWQO_ROgPO~OVXOgUO~O^[O~PVO[^O~O]_OVhX~OVaO~O]bO^iX~O^dO~O]_OVha~O]bO^ia~O",goto:"!kjPPPPPPkPPkqwPPPPk{!RPPP!XP!e!hXSOR^bQWQRf_TVQ_Q`WRg`QcZRicQTOQZRQe^RhbRYQR]R",nodeNames:"⚠ JsonText True False Null Number String } { Object Property PropertyName : , ] [ Array",maxTerm:25,nodeProps:[["isolate",-2,6,11,""],["openedBy",7,"{",14,"["],["closedBy",8,"}",15,"]"]],propSources:[cre],skippedNodes:[0],repeatNodeCount:2,tokenData:"(|~RaXY!WYZ!W]^!Wpq!Wrs!]|}$u}!O$z!Q!R%T!R![&c![!]&t!}#O&y#P#Q'O#Y#Z'T#b#c'r#h#i(Z#o#p(r#q#r(w~!]Oe~~!`Wpq!]qr!]rs!xs#O!]#O#P!}#P;'S!];'S;=`$o<%lO!]~!}Og~~#QXrs!]!P!Q!]#O#P!]#U#V!]#Y#Z!]#b#c!]#f#g!]#h#i!]#i#j#m~#pR!Q![#y!c!i#y#T#Z#y~#|R!Q![$V!c!i$V#T#Z$V~$YR!Q![$c!c!i$c#T#Z$c~$fR!Q![!]!c!i!]#T#Z!]~$rP;=`<%l!]~$zO]~~$}Q!Q!R%T!R![&c~%YRT~!O!P%c!g!h%w#X#Y%w~%fP!Q![%i~%nRT~!Q![%i!g!h%w#X#Y%w~%zR{|&T}!O&T!Q![&Z~&WP!Q![&Z~&`PT~!Q![&Z~&hST~!O!P%c!Q![&c!g!h%w#X#Y%w~&yO[~~'OO_~~'TO^~~'WP#T#U'Z~'^P#`#a'a~'dP#g#h'g~'jP#X#Y'm~'rOR~~'uP#i#j'x~'{P#`#a(O~(RP#`#a(U~(ZOS~~(^P#f#g(a~(dP#i#j(g~(jP#X#Y(m~(rOQ~~(wOW~~(|OV~",tokenizers:[0],topRules:{JsonText:[0,1]},tokenPrec:0}),hre=()=>t=>{try{JSON.parse(t.state.doc.toString())}catch(e){if(!(e instanceof SyntaxError))throw e;const n=fre(e,t.state.doc);return[{from:n,message:e.message,severity:"error",to:n}]}return[]};function fre(t,e){let n;return(n=t.message.match(/at position (\d+)/))?Math.min(+n[1],e.length):(n=t.message.match(/at line (\d+) column (\d+)/))?Math.min(e.line(+n[1]).from+ +n[2]-1,e.length):0}const Uj=Ds.define({name:"json",parser:ure.configure({props:[Ho.add({Object:Sc({except:/^\s*\}/}),Array:Sc({except:/^\s*\]/})}),Fo.add({"Object Array":uO})]}),languageData:{closeBrackets:{brackets:["[","{",'"']},indentOnInput:/^\s*[\}\]]$/}});function Yj(){return new Xr(Uj)}const dre=Object.freeze(Object.defineProperty({__proto__:null,json:Yj,jsonLanguage:Uj,jsonParseLinter:hre},Symbol.toStringTag,{value:"Module"}));class Pg{static create(e,n,i,r,s){let o=r+(r<<8)+e+(n<<4)|0;return new Pg(e,n,i,o,s,[],[])}constructor(e,n,i,r,s,o,l){this.type=e,this.value=n,this.from=i,this.hash=r,this.end=s,this.children=o,this.positions=l,this.hashProp=[[Me.contextHash,r]]}addChild(e,n){e.prop(Me.contextHash)!=this.hash&&(e=new Ge(e.type,e.children,e.positions,e.length,this.hashProp)),this.children.push(e),this.positions.push(n)}toTree(e,n=this.end){let i=this.children.length-1;return i>=0&&(n=Math.max(n,this.positions[i]+this.children[i].length+this.from)),new Ge(e.types[this.type],this.children,this.positions,n-this.from).balance({makeTree:(r,s,o)=>new Ge(Ht.none,r,s,o,this.hashProp)})}}var me;(function(t){t[t.Document=1]="Document",t[t.CodeBlock=2]="CodeBlock",t[t.FencedCode=3]="FencedCode",t[t.Blockquote=4]="Blockquote",t[t.HorizontalRule=5]="HorizontalRule",t[t.BulletList=6]="BulletList",t[t.OrderedList=7]="OrderedList",t[t.ListItem=8]="ListItem",t[t.ATXHeading1=9]="ATXHeading1",t[t.ATXHeading2=10]="ATXHeading2",t[t.ATXHeading3=11]="ATXHeading3",t[t.ATXHeading4=12]="ATXHeading4",t[t.ATXHeading5=13]="ATXHeading5",t[t.ATXHeading6=14]="ATXHeading6",t[t.SetextHeading1=15]="SetextHeading1",t[t.SetextHeading2=16]="SetextHeading2",t[t.HTMLBlock=17]="HTMLBlock",t[t.LinkReference=18]="LinkReference",t[t.Paragraph=19]="Paragraph",t[t.CommentBlock=20]="CommentBlock",t[t.ProcessingInstructionBlock=21]="ProcessingInstructionBlock",t[t.Escape=22]="Escape",t[t.Entity=23]="Entity",t[t.HardBreak=24]="HardBreak",t[t.Emphasis=25]="Emphasis",t[t.StrongEmphasis=26]="StrongEmphasis",t[t.Link=27]="Link",t[t.Image=28]="Image",t[t.InlineCode=29]="InlineCode",t[t.HTMLTag=30]="HTMLTag",t[t.Comment=31]="Comment",t[t.ProcessingInstruction=32]="ProcessingInstruction",t[t.Autolink=33]="Autolink",t[t.HeaderMark=34]="HeaderMark",t[t.QuoteMark=35]="QuoteMark",t[t.ListMark=36]="ListMark",t[t.LinkMark=37]="LinkMark",t[t.EmphasisMark=38]="EmphasisMark",t[t.CodeMark=39]="CodeMark",t[t.CodeText=40]="CodeText",t[t.CodeInfo=41]="CodeInfo",t[t.LinkTitle=42]="LinkTitle",t[t.LinkLabel=43]="LinkLabel",t[t.URL=44]="URL"})(me||(me={}));class pre{constructor(e,n){this.start=e,this.content=n,this.marks=[],this.parsers=[]}}class mre{constructor(){this.text="",this.baseIndent=0,this.basePos=0,this.depth=0,this.markers=[],this.pos=0,this.indent=0,this.next=-1}forward(){this.basePos>this.pos&&this.forwardInner()}forwardInner(){let e=this.skipSpace(this.basePos);this.indent=this.countIndent(e,this.pos,this.indent),this.pos=e,this.next=e==this.text.length?-1:this.text.charCodeAt(e)}skipSpace(e){return Yh(this.text,e)}reset(e){for(this.text=e,this.baseIndent=this.basePos=this.pos=this.indent=0,this.forwardInner(),this.depth=1;this.markers.length;)this.markers.pop()}moveBase(e){this.basePos=e,this.baseIndent=this.countIndent(e,this.pos,this.indent)}moveBaseColumn(e){this.baseIndent=e,this.basePos=this.findColumn(e)}addMarker(e){this.markers.push(e)}countIndent(e,n=0,i=0){for(let r=n;r<e;r++)i+=this.text.charCodeAt(r)==9?4-i%4:1;return i}findColumn(e){let n=0;for(let i=0;n<this.text.length&&i<e;n++)i+=this.text.charCodeAt(n)==9?4-i%4:1;return n}scrub(){if(!this.baseIndent)return this.text;let e="";for(let n=0;n<this.basePos;n++)e+=" ";return e+this.text.slice(this.basePos)}}function SA(t,e,n){if(n.pos==n.text.length||t!=e.block&&n.indent>=e.stack[n.depth+1].value+n.baseIndent)return!0;if(n.indent>=n.baseIndent+4)return!1;let i=(t.type==me.OrderedList?e_:JS)(n,e,!1);return i>0&&(t.type!=me.BulletList||KS(n,e,!1)<0)&&n.text.charCodeAt(n.pos+i-1)==t.value}const Gj={[me.Blockquote](t,e,n){return n.next!=62?!1:(n.markers.push(et(me.QuoteMark,e.lineStart+n.pos,e.lineStart+n.pos+1)),n.moveBase(n.pos+(Ji(n.text.charCodeAt(n.pos+1))?2:1)),t.end=e.lineStart+n.text.length,!0)},[me.ListItem](t,e,n){return n.indent<n.baseIndent+t.value&&n.next>-1?!1:(n.moveBaseColumn(n.baseIndent+t.value),!0)},[me.OrderedList]:SA,[me.BulletList]:SA,[me.Document](){return!0}};function Ji(t){return t==32||t==9||t==10||t==13}function Yh(t,e=0){for(;e<t.length&&Ji(t.charCodeAt(e));)e++;return e}function _A(t,e,n){for(;e>n&&Ji(t.charCodeAt(e-1));)e--;return e}function Wj(t){if(t.next!=96&&t.next!=126)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;if(e<t.pos+3)return-1;if(t.next==96){for(let n=e;n<t.text.length;n++)if(t.text.charCodeAt(n)==96)return-1}return e}function Hj(t){return t.next!=62?-1:t.text.charCodeAt(t.pos+1)==32?2:1}function KS(t,e,n){if(t.next!=42&&t.next!=45&&t.next!=95)return-1;let i=1;for(let r=t.pos+1;r<t.text.length;r++){let s=t.text.charCodeAt(r);if(s==t.next)i++;else if(!Ji(s))return-1}return n&&t.next==45&&Jj(t)>-1&&t.depth==e.stack.length&&e.parser.leafBlockParsers.indexOf(i5.SetextHeading)>-1||i<3?-1:1}function Fj(t,e){for(let n=t.stack.length-1;n>=0;n--)if(t.stack[n].type==e)return!0;return!1}function JS(t,e,n){return(t.next==45||t.next==43||t.next==42)&&(t.pos==t.text.length-1||Ji(t.text.charCodeAt(t.pos+1)))&&(!n||Fj(e,me.BulletList)||t.skipSpace(t.pos+2)<t.text.length)?1:-1}function e_(t,e,n){let i=t.pos,r=t.next;for(;r>=48&&r<=57;){i++;if(i==t.text.length)return-1;r=t.text.charCodeAt(i)}return i==t.pos||i>t.pos+9||r!=46&&r!=41||i<t.text.length-1&&!Ji(t.text.charCodeAt(i+1))||n&&!Fj(e,me.OrderedList)&&(t.skipSpace(i+1)==t.text.length||i>t.pos+1||t.next!=49)?-1:i+1-t.pos}function Kj(t){if(t.next!=35)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==35;)e++;if(e<t.text.length&&t.text.charCodeAt(e)!=32)return-1;let n=e-t.pos;return n>6?-1:n}function Jj(t){if(t.next!=45&&t.next!=61||t.indent>=t.baseIndent+4)return-1;let e=t.pos+1;for(;e<t.text.length&&t.text.charCodeAt(e)==t.next;)e++;let n=e;for(;e<t.text.length&&Ji(t.text.charCodeAt(e));)e++;return e==t.text.length?n:-1}const tv=/^[ \t]*$/,e5=/-->/,t5=/\?>/,nv=[[/^<(?:script|pre|style)(?:\s|>|$)/i,/<\/(?:script|pre|style)>/i],[/^\s*<!--/,e5],[/^\s*<\?/,t5],[/^\s*<![A-Z]/,/>/],[/^\s*<!\[CDATA\[/,/\]\]>/],[/^\s*<\/?(?:address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h1|h2|h3|h4|h5|h6|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|nav|noframes|ol|optgroup|option|p|param|section|source|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul)(?:\s|\/?>|$)/i,tv],[/^\s*(?:<\/[a-z][\w-]*\s*>|<[a-z][\w-]*(\s+[a-z:_][\w-.]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*>)\s*$/i,tv]];function n5(t,e,n){if(t.next!=60)return-1;let i=t.text.slice(t.pos);for(let r=0,s=nv.length-(n?1:0);r<s;r++)if(nv[r][0].test(i))return r;return-1}function kA(t,e){let n=t.countIndent(e,t.pos,t.indent),i=t.countIndent(t.skipSpace(e),e,n);return i>=n+5?n+1:i}function ba(t,e,n){let i=t.length-1;i>=0&&t[i].to==e&&t[i].type==me.CodeText?t[i].to=n:t.push(et(me.CodeText,e,n))}const sm={LinkReference:void 0,IndentedCode(t,e){let n=e.baseIndent+4;if(e.indent<n)return!1;let i=e.findColumn(n),r=t.lineStart+i,s=t.lineStart+e.text.length,o=[],l=[];for(ba(o,r,s);t.nextLine()&&e.depth>=t.stack.length;)if(e.pos==e.text.length){ba(l,t.lineStart-1,t.lineStart);for(let c of e.markers)l.push(c)}else{if(e.indent<n)break;{if(l.length){for(let h of l)h.type==me.CodeText?ba(o,h.from,h.to):o.push(h);l=[]}ba(o,t.lineStart-1,t.lineStart);for(let h of e.markers)o.push(h);s=t.lineStart+e.text.length;let c=t.lineStart+e.findColumn(e.baseIndent+4);c<s&&ba(o,c,s)}}return l.length&&(l=l.filter(c=>c.type!=me.CodeText),l.length&&(e.markers=l.concat(e.markers))),t.addNode(t.buffer.writeElements(o,-r).finish(me.CodeBlock,s-r),r),!0},FencedCode(t,e){let n=Wj(e);if(n<0)return!1;let i=t.lineStart+e.pos,r=e.next,s=n-e.pos,o=e.skipSpace(n),l=_A(e.text,e.text.length,o),c=[et(me.CodeMark,i,i+s)];o<l&&c.push(et(me.CodeInfo,t.lineStart+o,t.lineStart+l));for(let h=!0;t.nextLine()&&e.depth>=t.stack.length;h=!1){let d=e.pos;if(e.indent-e.baseIndent<4)for(;d<e.text.length&&e.text.charCodeAt(d)==r;)d++;if(d-e.pos>=s&&e.skipSpace(d)==e.text.length){for(let p of e.markers)c.push(p);c.push(et(me.CodeMark,t.lineStart+e.pos,t.lineStart+d)),t.nextLine();break}else{h||ba(c,t.lineStart-1,t.lineStart);for(let O of e.markers)c.push(O);let p=t.lineStart+e.basePos,g=t.lineStart+e.text.length;p<g&&ba(c,p,g)}}return t.addNode(t.buffer.writeElements(c,-i).finish(me.FencedCode,t.prevLineEnd()-i),i),!0},Blockquote(t,e){let n=Hj(e);return n<0?!1:(t.startContext(me.Blockquote,e.pos),t.addNode(me.QuoteMark,t.lineStart+e.pos,t.lineStart+e.pos+1),e.moveBase(e.pos+n),null)},HorizontalRule(t,e){if(KS(e,t,!1)<0)return!1;let n=t.lineStart+e.pos;return t.nextLine(),t.addNode(me.HorizontalRule,n),!0},BulletList(t,e){let n=JS(e,t,!1);if(n<0)return!1;t.block.type!=me.BulletList&&t.startContext(me.BulletList,e.basePos,e.next);let i=kA(e,e.pos+1);return t.startContext(me.ListItem,e.basePos,i-e.baseIndent),t.addNode(me.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},OrderedList(t,e){let n=e_(e,t,!1);if(n<0)return!1;t.block.type!=me.OrderedList&&t.startContext(me.OrderedList,e.basePos,e.text.charCodeAt(e.pos+n-1));let i=kA(e,e.pos+n);return t.startContext(me.ListItem,e.basePos,i-e.baseIndent),t.addNode(me.ListMark,t.lineStart+e.pos,t.lineStart+e.pos+n),e.moveBaseColumn(i),null},ATXHeading(t,e){let n=Kj(e);if(n<0)return!1;let i=e.pos,r=t.lineStart+i,s=_A(e.text,e.text.length,i),o=s;for(;o>i&&e.text.charCodeAt(o-1)==e.next;)o--;(o==s||o==i||!Ji(e.text.charCodeAt(o-1)))&&(o=e.text.length);let l=t.buffer.write(me.HeaderMark,0,n).writeElements(t.parser.parseInline(e.text.slice(i+n+1,o),r+n+1),-r);o<e.text.length&&l.write(me.HeaderMark,o-i,s-i);let c=l.finish(me.ATXHeading1-1+n,e.text.length-i);return t.nextLine(),t.addNode(c,r),!0},HTMLBlock(t,e){let n=n5(e,t,!1);if(n<0)return!1;let i=t.lineStart+e.pos,r=nv[n][1],s=[],o=r!=tv;for(;!r.test(e.text)&&t.nextLine();){if(e.depth<t.stack.length){o=!1;break}for(let h of e.markers)s.push(h)}o&&t.nextLine();let l=r==e5?me.CommentBlock:r==t5?me.ProcessingInstructionBlock:me.HTMLBlock,c=t.prevLineEnd();return t.addNode(t.buffer.writeElements(s,-i).finish(l,c-i),i),!0},SetextHeading:void 0};class gre{constructor(e){this.stage=0,this.elts=[],this.pos=0,this.start=e.start,this.advance(e.content)}nextLine(e,n,i){if(this.stage==-1)return!1;let r=i.content+`
416
+ `+n.scrub(),s=this.advance(r);return s>-1&&s<r.length?this.complete(e,i,s):!1}finish(e,n){return(this.stage==2||this.stage==3)&&Yh(n.content,this.pos)==n.content.length?this.complete(e,n,n.content.length):!1}complete(e,n,i){return e.addLeafElement(n,et(me.LinkReference,this.start,this.start+i,this.elts)),!0}nextStage(e){return e?(this.pos=e.to-this.start,this.elts.push(e),this.stage++,!0):(e===!1&&(this.stage=-1),!1)}advance(e){for(;;){if(this.stage==-1)return-1;if(this.stage==0){if(!this.nextStage(f5(e,this.pos,this.start,!0)))return-1;if(e.charCodeAt(this.pos)!=58)return this.stage=-1;this.elts.push(et(me.LinkMark,this.pos+this.start,this.pos+this.start+1)),this.pos++}else if(this.stage==1){if(!this.nextStage(u5(e,Yh(e,this.pos),this.start)))return-1}else if(this.stage==2){let n=Yh(e,this.pos),i=0;if(n>this.pos){let r=h5(e,n,this.start);if(r){let s=Jb(e,r.to-this.start);s>0&&(this.nextStage(r),i=s)}}return i||(i=Jb(e,this.pos)),i>0&&i<e.length?i:-1}else return Jb(e,this.pos)}}}function Jb(t,e){for(;e<t.length;e++){let n=t.charCodeAt(e);if(n==10)break;if(!Ji(n))return-1}return e}class Ore{nextLine(e,n,i){let r=n.depth<e.stack.length?-1:Jj(n),s=n.next;if(r<0)return!1;let o=et(me.HeaderMark,e.lineStart+n.pos,e.lineStart+r);return e.nextLine(),e.addLeafElement(i,et(s==61?me.SetextHeading1:me.SetextHeading2,i.start,e.prevLineEnd(),[...e.parser.parseInline(i.content,i.start),o])),!0}finish(){return!1}}const i5={LinkReference(t,e){return e.content.charCodeAt(0)==91?new gre(e):null},SetextHeading(){return new Ore}},yre=[(t,e)=>Kj(e)>=0,(t,e)=>Wj(e)>=0,(t,e)=>Hj(e)>=0,(t,e)=>JS(e,t,!0)>=0,(t,e)=>e_(e,t,!0)>=0,(t,e)=>KS(e,t,!0)>=0,(t,e)=>n5(e,t,!0)>=0],bre={text:"",end:0};class xre{constructor(e,n,i,r){this.parser=e,this.input=n,this.ranges=r,this.line=new mre,this.atEnd=!1,this.reusePlaceholders=new Map,this.stoppedAt=null,this.rangeI=0,this.to=r[r.length-1].to,this.lineStart=this.absoluteLineStart=this.absoluteLineEnd=r[0].from,this.block=Pg.create(me.Document,0,this.lineStart,0,0),this.stack=[this.block],this.fragments=i.length?new _re(i,n):null,this.readLine()}get parsedPos(){return this.absoluteLineStart}advance(){if(this.stoppedAt!=null&&this.absoluteLineStart>this.stoppedAt)return this.finish();let{line:e}=this;for(;;){for(let i=0;;){let r=e.depth<this.stack.length?this.stack[this.stack.length-1]:null;for(;i<e.markers.length&&(!r||e.markers[i].from<r.end);){let s=e.markers[i++];this.addNode(s.type,s.from,s.to)}if(!r)break;this.finishContext()}if(e.pos<e.text.length)break;if(!this.nextLine())return this.finish()}if(this.fragments&&this.reuseFragment(e.basePos))return null;e:for(;;){for(let i of this.parser.blockParsers)if(i){let r=i(this,e);if(r!=!1){if(r==!0)return null;e.forward();continue e}}break}let n=new pre(this.lineStart+e.pos,e.text.slice(e.pos));for(let i of this.parser.leafBlockParsers)if(i){let r=i(this,n);r&&n.parsers.push(r)}e:for(;this.nextLine()&&e.pos!=e.text.length;){if(e.indent<e.baseIndent+4){for(let i of this.parser.endLeafBlock)if(i(this,e,n))break e}for(let i of n.parsers)if(i.nextLine(this,e,n))return null;n.content+=`
417
+ `+e.scrub();for(let i of e.markers)n.marks.push(i)}return this.finishLeaf(n),null}stopAt(e){if(this.stoppedAt!=null&&this.stoppedAt<e)throw new RangeError("Can't move stoppedAt forward");this.stoppedAt=e}reuseFragment(e){if(!this.fragments.moveTo(this.absoluteLineStart+e,this.absoluteLineStart)||!this.fragments.matches(this.block.hash))return!1;let n=this.fragments.takeNodes(this);return n?(this.absoluteLineStart+=n,this.lineStart=d5(this.absoluteLineStart,this.ranges),this.moveRangeI(),this.absoluteLineStart<this.to?(this.lineStart++,this.absoluteLineStart++,this.readLine()):(this.atEnd=!0,this.readLine()),!0):!1}get depth(){return this.stack.length}parentType(e=this.depth-1){return this.parser.nodeSet.types[this.stack[e].type]}nextLine(){return this.lineStart+=this.line.text.length,this.absoluteLineEnd>=this.to?(this.absoluteLineStart=this.absoluteLineEnd,this.atEnd=!0,this.readLine(),!1):(this.lineStart++,this.absoluteLineStart=this.absoluteLineEnd+1,this.moveRangeI(),this.readLine(),!0)}peekLine(){return this.scanLine(this.absoluteLineEnd+1).text}moveRangeI(){for(;this.rangeI<this.ranges.length-1&&this.absoluteLineStart>=this.ranges[this.rangeI].to;)this.rangeI++,this.absoluteLineStart=Math.max(this.absoluteLineStart,this.ranges[this.rangeI].from)}scanLine(e){let n=bre;if(n.end=e,e>=this.to)n.text="";else if(n.text=this.lineChunkAt(e),n.end+=n.text.length,this.ranges.length>1){let i=this.absoluteLineStart,r=this.rangeI;for(;this.ranges[r].to<n.end;){r++;let s=this.ranges[r].from,o=this.lineChunkAt(s);n.end=s+o.length,n.text=n.text.slice(0,this.ranges[r-1].to-i)+o,i=n.end-n.text.length}}return n}readLine(){let{line:e}=this,{text:n,end:i}=this.scanLine(this.absoluteLineStart);for(this.absoluteLineEnd=i,e.reset(n);e.depth<this.stack.length;e.depth++){let r=this.stack[e.depth],s=this.parser.skipContextMarkup[r.type];if(!s)throw new Error("Unhandled block context "+me[r.type]);let o=this.line.markers.length;if(!s(r,this,e)){this.line.markers.length>o&&(r.end=this.line.markers[this.line.markers.length-1].to);break}e.forward()}}lineChunkAt(e){let n=this.input.chunk(e),i;if(this.input.lineChunks)i=n==`
418
+ `?"":n;else{let r=n.indexOf(`
419
+ `);i=r<0?n:n.slice(0,r)}return e+i.length>this.to?i.slice(0,this.to-e):i}prevLineEnd(){return this.atEnd?this.lineStart:this.lineStart-1}startContext(e,n,i=0){this.block=Pg.create(e,i,this.lineStart+n,this.block.hash,this.lineStart+this.line.text.length),this.stack.push(this.block)}startComposite(e,n,i=0){this.startContext(this.parser.getNodeType(e),n,i)}addNode(e,n,i){typeof e=="number"&&(e=new Ge(this.parser.nodeSet.types[e],Wc,Wc,(i??this.prevLineEnd())-n)),this.block.addChild(e,n-this.block.from)}addElement(e){this.block.addChild(e.toTree(this.parser.nodeSet),e.from-this.block.from)}addLeafElement(e,n){this.addNode(this.buffer.writeElements(rv(n.children,e.marks),-n.from).finish(n.type,n.to-n.from),n.from)}finishContext(){let e=this.stack.pop(),n=this.stack[this.stack.length-1];n.addChild(e.toTree(this.parser.nodeSet),e.from-n.from),this.block=n}finish(){for(;this.stack.length>1;)this.finishContext();return this.addGaps(this.block.toTree(this.parser.nodeSet,this.lineStart))}addGaps(e){return this.ranges.length>1?r5(this.ranges,0,e.topNode,this.ranges[0].from,this.reusePlaceholders):e}finishLeaf(e){for(let i of e.parsers)if(i.finish(this,e))return;let n=rv(this.parser.parseInline(e.content,e.start),e.marks);this.addNode(this.buffer.writeElements(n,-e.start).finish(me.Paragraph,e.content.length),e.start)}elt(e,n,i,r){return typeof e=="string"?et(this.parser.getNodeType(e),n,i,r):new a5(e,n)}get buffer(){return new o5(this.parser.nodeSet)}}function r5(t,e,n,i,r){let s=t[e].to,o=[],l=[],c=n.from+i;function h(d,p){for(;p?d>=s:d>s;){let g=t[e+1].from-s;i+=g,d+=g,e++,s=t[e].to}}for(let d=n.firstChild;d;d=d.nextSibling){h(d.from+i,!0);let p=d.from+i,g,O=r.get(d.tree);O?g=O:d.to+i>s?(g=r5(t,e,d,i,r),h(d.to+i,!1)):g=d.toTree(),o.push(g),l.push(p-c)}return h(n.to+i,!1),new Ge(n.type,o,l,n.to+i-c,n.tree?n.tree.propValues:void 0)}class yO extends iO{constructor(e,n,i,r,s,o,l,c,h){super(),this.nodeSet=e,this.blockParsers=n,this.leafBlockParsers=i,this.blockNames=r,this.endLeafBlock=s,this.skipContextMarkup=o,this.inlineParsers=l,this.inlineNames=c,this.wrappers=h,this.nodeTypes=Object.create(null);for(let d of e.types)this.nodeTypes[d.name]=d.id}createParse(e,n,i){let r=new xre(this,e,n,i);for(let s of this.wrappers)r=s(r,e,n,i);return r}configure(e){let n=iv(e);if(!n)return this;let{nodeSet:i,skipContextMarkup:r}=this,s=this.blockParsers.slice(),o=this.leafBlockParsers.slice(),l=this.blockNames.slice(),c=this.inlineParsers.slice(),h=this.inlineNames.slice(),d=this.endLeafBlock.slice(),p=this.wrappers;if(Sh(n.defineNodes)){r=Object.assign({},r);let g=i.types.slice(),O;for(let x of n.defineNodes){let{name:S,block:_,composite:k,style:P}=typeof x=="string"?{name:x}:x;if(g.some($=>$.name==S))continue;k&&(r[g.length]=($,C,D)=>k(C,D,$.value));let Q=g.length,R=k?["Block","BlockContext"]:_?Q>=me.ATXHeading1&&Q<=me.SetextHeading2?["Block","LeafBlock","Heading"]:["Block","LeafBlock"]:void 0;g.push(Ht.define({id:Q,name:S,props:R&&[[Me.group,R]]})),P&&(O||(O={}),Array.isArray(P)||P instanceof Ar?O[S]=P:Object.assign(O,P))}i=new cu(g),O&&(i=i.extend(Xs(O)))}if(Sh(n.props)&&(i=i.extend(...n.props)),Sh(n.remove))for(let g of n.remove){let O=this.blockNames.indexOf(g),x=this.inlineNames.indexOf(g);O>-1&&(s[O]=o[O]=void 0),x>-1&&(c[x]=void 0)}if(Sh(n.parseBlock))for(let g of n.parseBlock){let O=l.indexOf(g.name);if(O>-1)s[O]=g.parse,o[O]=g.leaf;else{let x=g.before?om(l,g.before):g.after?om(l,g.after)+1:l.length-1;s.splice(x,0,g.parse),o.splice(x,0,g.leaf),l.splice(x,0,g.name)}g.endLeaf&&d.push(g.endLeaf)}if(Sh(n.parseInline))for(let g of n.parseInline){let O=h.indexOf(g.name);if(O>-1)c[O]=g.parse;else{let x=g.before?om(h,g.before):g.after?om(h,g.after)+1:h.length-1;c.splice(x,0,g.parse),h.splice(x,0,g.name)}}return n.wrap&&(p=p.concat(n.wrap)),new yO(i,s,o,l,d,r,c,h,p)}getNodeType(e){let n=this.nodeTypes[e];if(n==null)throw new RangeError(`Unknown node type '${e}'`);return n}parseInline(e,n){let i=new t_(this,e,n);e:for(let r=n;r<i.end;){let s=i.char(r);for(let o of this.inlineParsers)if(o){let l=o(i,s,r);if(l>=0){r=l;continue e}}r++}return i.resolveMarkers(0)}}function Sh(t){return t!=null&&t.length>0}function iv(t){if(!Array.isArray(t))return t;if(t.length==0)return null;let e=iv(t[0]);if(t.length==1)return e;let n=iv(t.slice(1));if(!n||!e)return e||n;let i=(o,l)=>(o||Wc).concat(l||Wc),r=e.wrap,s=n.wrap;return{props:i(e.props,n.props),defineNodes:i(e.defineNodes,n.defineNodes),parseBlock:i(e.parseBlock,n.parseBlock),parseInline:i(e.parseInline,n.parseInline),remove:i(e.remove,n.remove),wrap:r?s?(o,l,c,h)=>r(s(o,l,c,h),l,c,h):r:s}}function om(t,e){let n=t.indexOf(e);if(n<0)throw new RangeError(`Position specified relative to unknown parser ${e}`);return n}let s5=[Ht.none];for(let t=1,e;e=me[t];t++)s5[t]=Ht.define({id:t,name:e,props:t>=me.Escape?[]:[[Me.group,t in Gj?["Block","BlockContext"]:["Block","LeafBlock"]]],top:e=="Document"});const Wc=[];let o5=class{constructor(e){this.nodeSet=e,this.content=[],this.nodes=[]}write(e,n,i,r=0){return this.content.push(e,n,i,4+r*4),this}writeElements(e,n=0){for(let i of e)i.writeTo(this,n);return this}finish(e,n){return Ge.build({buffer:this.content,nodeSet:this.nodeSet,reused:this.nodes,topID:e,length:n})}},Tf=class{constructor(e,n,i,r=Wc){this.type=e,this.from=n,this.to=i,this.children=r}writeTo(e,n){let i=e.content.length;e.writeElements(this.children,n),e.content.push(this.type,this.from+n,this.to+n,e.content.length+4-i)}toTree(e){return new o5(e).writeElements(this.children,-this.from).finish(this.type,this.to-this.from)}};class a5{constructor(e,n){this.tree=e,this.from=n}get to(){return this.from+this.tree.length}get type(){return this.tree.type.id}get children(){return Wc}writeTo(e,n){e.nodes.push(this.tree),e.content.push(e.nodes.length-1,this.from+n,this.to+n,-1)}toTree(){return this.tree}}function et(t,e,n,i){return new Tf(t,e,n,i)}const l5={resolve:"Emphasis",mark:"EmphasisMark"},c5={resolve:"Emphasis",mark:"EmphasisMark"},ka={},Tg={};class vi{constructor(e,n,i,r){this.type=e,this.from=n,this.to=i,this.side=r}}const wA="!\"#$%&'()*+,-./:;<=>?@[\\]^_`{|}~";let Qf=/[!"#$%&'()*+,\-.\/:;<=>?@\[\\\]^_`{|}~\xA1\u2010-\u2027]/;try{Qf=new RegExp("[\\p{S}|\\p{P}]","u")}catch{}const ex={Escape(t,e,n){if(e!=92||n==t.end-1)return-1;let i=t.char(n+1);for(let r=0;r<wA.length;r++)if(wA.charCodeAt(r)==i)return t.append(et(me.Escape,n,n+2));return-1},Entity(t,e,n){if(e!=38)return-1;let i=/^(?:#\d+|#x[a-f\d]+|\w+);/i.exec(t.slice(n+1,n+31));return i?t.append(et(me.Entity,n,n+1+i[0].length)):-1},InlineCode(t,e,n){if(e!=96||n&&t.char(n-1)==96)return-1;let i=n+1;for(;i<t.end&&t.char(i)==96;)i++;let r=i-n,s=0;for(;i<t.end;i++)if(t.char(i)==96){if(s++,s==r&&t.char(i+1)!=96)return t.append(et(me.InlineCode,n,i+1,[et(me.CodeMark,n,n+r),et(me.CodeMark,i+1-r,i+1)]))}else s=0;return-1},HTMLTag(t,e,n){if(e!=60||n==t.end-1)return-1;let i=t.slice(n+1,t.end),r=/^(?:[a-z][-\w+.]+:[^\s>]+|[a-z\d.!#$%&'*+/=?^_`{|}~-]+@[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?(?:\.[a-z\d](?:[a-z\d-]{0,61}[a-z\d])?)*)>/i.exec(i);if(r)return t.append(et(me.Autolink,n,n+1+r[0].length,[et(me.LinkMark,n,n+1),et(me.URL,n+1,n+r[0].length),et(me.LinkMark,n+r[0].length,n+1+r[0].length)]));let s=/^!--[^>](?:-[^-]|[^-])*?-->/i.exec(i);if(s)return t.append(et(me.Comment,n,n+1+s[0].length));let o=/^\?[^]*?\?>/.exec(i);if(o)return t.append(et(me.ProcessingInstruction,n,n+1+o[0].length));let l=/^(?:![A-Z][^]*?>|!\[CDATA\[[^]*?\]\]>|\/\s*[a-zA-Z][\w-]*\s*>|\s*[a-zA-Z][\w-]*(\s+[a-zA-Z:_][\w-.:]*(?:\s*=\s*(?:[^\s"'=<>`]+|'[^']*'|"[^"]*"))?)*\s*(\/\s*)?>)/.exec(i);return l?t.append(et(me.HTMLTag,n,n+1+l[0].length)):-1},Emphasis(t,e,n){if(e!=95&&e!=42)return-1;let i=n+1;for(;t.char(i)==e;)i++;let r=t.slice(n-1,n),s=t.slice(i,i+1),o=Qf.test(r),l=Qf.test(s),c=/\s|^$/.test(r),h=/\s|^$/.test(s),d=!h&&(!l||c||o),p=!c&&(!o||h||l),g=d&&(e==42||!p||o),O=p&&(e==42||!d||l);return t.append(new vi(e==95?l5:c5,n,i,(g?1:0)|(O?2:0)))},HardBreak(t,e,n){if(e==92&&t.char(n+1)==10)return t.append(et(me.HardBreak,n,n+2));if(e==32){let i=n+1;for(;t.char(i)==32;)i++;if(t.char(i)==10&&i>=n+2)return t.append(et(me.HardBreak,n,i+1))}return-1},Link(t,e,n){return e==91?t.append(new vi(ka,n,n+1,1)):-1},Image(t,e,n){return e==33&&t.char(n+1)==91?t.append(new vi(Tg,n,n+2,1)):-1},LinkEnd(t,e,n){if(e!=93)return-1;for(let i=t.parts.length-1;i>=0;i--){let r=t.parts[i];if(r instanceof vi&&(r.type==ka||r.type==Tg)){if(!r.side||t.skipSpace(r.to)==n&&!/[(\[]/.test(t.slice(n+1,n+2)))return t.parts[i]=null,-1;let s=t.takeContent(i),o=t.parts[i]=vre(t,s,r.type==ka?me.Link:me.Image,r.from,n+1);if(r.type==ka)for(let l=0;l<i;l++){let c=t.parts[l];c instanceof vi&&c.type==ka&&(c.side=0)}return o.to}}return-1}};function vre(t,e,n,i,r){let{text:s}=t,o=t.char(r),l=r;if(e.unshift(et(me.LinkMark,i,i+(n==me.Image?2:1))),e.push(et(me.LinkMark,r-1,r)),o==40){let c=t.skipSpace(r+1),h=u5(s,c-t.offset,t.offset),d;h&&(c=t.skipSpace(h.to),c!=h.to&&(d=h5(s,c-t.offset,t.offset),d&&(c=t.skipSpace(d.to)))),t.char(c)==41&&(e.push(et(me.LinkMark,r,r+1)),l=c+1,h&&e.push(h),d&&e.push(d),e.push(et(me.LinkMark,c,l)))}else if(o==91){let c=f5(s,r-t.offset,t.offset,!1);c&&(e.push(c),l=c.to)}return et(n,i,l,e)}function u5(t,e,n){if(t.charCodeAt(e)==60){for(let r=e+1;r<t.length;r++){let s=t.charCodeAt(r);if(s==62)return et(me.URL,e+n,r+1+n);if(s==60||s==10)return!1}return null}else{let r=0,s=e;for(let o=!1;s<t.length;s++){let l=t.charCodeAt(s);if(Ji(l))break;if(o)o=!1;else if(l==40)r++;else if(l==41){if(!r)break;r--}else l==92&&(o=!0)}return s>e?et(me.URL,e+n,s+n):s==t.length?null:!1}}function h5(t,e,n){let i=t.charCodeAt(e);if(i!=39&&i!=34&&i!=40)return!1;let r=i==40?41:i;for(let s=e+1,o=!1;s<t.length;s++){let l=t.charCodeAt(s);if(o)o=!1;else{if(l==r)return et(me.LinkTitle,e+n,s+1+n);l==92&&(o=!0)}}return null}function f5(t,e,n,i){for(let r=!1,s=e+1,o=Math.min(t.length,s+999);s<o;s++){let l=t.charCodeAt(s);if(r)r=!1;else{if(l==93)return i?!1:et(me.LinkLabel,e+n,s+1+n);if(i&&!Ji(l)&&(i=!1),l==91)return!1;l==92&&(r=!0)}}return null}class t_{constructor(e,n,i){this.parser=e,this.text=n,this.offset=i,this.parts=[]}char(e){return e>=this.end?-1:this.text.charCodeAt(e-this.offset)}get end(){return this.offset+this.text.length}slice(e,n){return this.text.slice(e-this.offset,n-this.offset)}append(e){return this.parts.push(e),e.to}addDelimiter(e,n,i,r,s){return this.append(new vi(e,n,i,(r?1:0)|(s?2:0)))}get hasOpenLink(){for(let e=this.parts.length-1;e>=0;e--){let n=this.parts[e];if(n instanceof vi&&(n.type==ka||n.type==Tg))return!0}return!1}addElement(e){return this.append(e)}resolveMarkers(e){for(let i=e;i<this.parts.length;i++){let r=this.parts[i];if(!(r instanceof vi&&r.type.resolve&&r.side&2))continue;let s=r.type==l5||r.type==c5,o=r.to-r.from,l,c=i-1;for(;c>=e;c--){let S=this.parts[c];if(S instanceof vi&&S.side&1&&S.type==r.type&&!(s&&(r.side&1||S.side&2)&&(S.to-S.from+o)%3==0&&((S.to-S.from)%3||o%3))){l=S;break}}if(!l)continue;let h=r.type.resolve,d=[],p=l.from,g=r.to;if(s){let S=Math.min(2,l.to-l.from,o);p=l.to-S,g=r.from+S,h=S==1?"Emphasis":"StrongEmphasis"}l.type.mark&&d.push(this.elt(l.type.mark,p,l.to));for(let S=c+1;S<i;S++)this.parts[S]instanceof Tf&&d.push(this.parts[S]),this.parts[S]=null;r.type.mark&&d.push(this.elt(r.type.mark,r.from,g));let O=this.elt(h,p,g,d);this.parts[c]=s&&l.from!=p?new vi(l.type,l.from,p,l.side):null,(this.parts[i]=s&&r.to!=g?new vi(r.type,g,r.to,r.side):null)?this.parts.splice(i,0,O):this.parts[i]=O}let n=[];for(let i=e;i<this.parts.length;i++){let r=this.parts[i];r instanceof Tf&&n.push(r)}return n}findOpeningDelimiter(e){for(let n=this.parts.length-1;n>=0;n--){let i=this.parts[n];if(i instanceof vi&&i.type==e&&i.side&1)return n}return null}takeContent(e){let n=this.resolveMarkers(e);return this.parts.length=e,n}getDelimiterAt(e){let n=this.parts[e];return n instanceof vi?n:null}skipSpace(e){return Yh(this.text,e-this.offset)+this.offset}elt(e,n,i,r){return typeof e=="string"?et(this.parser.getNodeType(e),n,i,r):new a5(e,n)}}t_.linkStart=ka;t_.imageStart=Tg;function rv(t,e){if(!e.length)return t;if(!t.length)return e;let n=t.slice(),i=0;for(let r of e){for(;i<n.length&&n[i].to<r.to;)i++;if(i<n.length&&n[i].from<r.from){let s=n[i];s instanceof Tf&&(n[i]=new Tf(s.type,s.from,s.to,rv(s.children,[r])))}else n.splice(i++,0,r)}return n}const Sre=[me.CodeBlock,me.ListItem,me.OrderedList,me.BulletList];class _re{constructor(e,n){this.fragments=e,this.input=n,this.i=0,this.fragment=null,this.fragmentEnd=-1,this.cursor=null,e.length&&(this.fragment=e[this.i++])}nextFragment(){this.fragment=this.i<this.fragments.length?this.fragments[this.i++]:null,this.cursor=null,this.fragmentEnd=-1}moveTo(e,n){for(;this.fragment&&this.fragment.to<=e;)this.nextFragment();if(!this.fragment||this.fragment.from>(e?e-1:0))return!1;if(this.fragmentEnd<0){let s=this.fragment.to;for(;s>0&&this.input.read(s-1,s)!=`
420
+ `;)s--;this.fragmentEnd=s?s-1:0}let i=this.cursor;i||(i=this.cursor=this.fragment.tree.cursor(),i.firstChild());let r=e+this.fragment.offset;for(;i.to<=r;)if(!i.parent())return!1;for(;;){if(i.from>=r)return this.fragment.from<=n;if(!i.childAfter(r))return!1}}matches(e){let n=this.cursor.tree;return n&&n.prop(Me.contextHash)==e}takeNodes(e){let n=this.cursor,i=this.fragment.offset,r=this.fragmentEnd-(this.fragment.openEnd?1:0),s=e.absoluteLineStart,o=s,l=e.block.children.length,c=o,h=l;for(;;){if(n.to-i>r){if(n.type.isAnonymous&&n.firstChild())continue;break}let d=d5(n.from-i,e.ranges);if(n.to-i<=e.ranges[e.rangeI].to)e.addNode(n.tree,d);else{let p=new Ge(e.parser.nodeSet.types[me.Paragraph],[],[],0,e.block.hashProp);e.reusePlaceholders.set(p,n.tree),e.addNode(p,d)}if(n.type.is("Block")&&(Sre.indexOf(n.type.id)<0?(o=n.to-i,l=e.block.children.length):(o=c,l=h,c=n.to-i,h=e.block.children.length)),!n.nextSibling())break}for(;e.block.children.length>l;)e.block.children.pop(),e.block.positions.pop();return o-s}}function d5(t,e){let n=t;for(let i=1;i<e.length;i++){let r=e[i-1].to,s=e[i].from;r<t&&(n-=s-r)}return n}const kre=Xs({"Blockquote/...":A.quote,HorizontalRule:A.contentSeparator,"ATXHeading1/... SetextHeading1/...":A.heading1,"ATXHeading2/... SetextHeading2/...":A.heading2,"ATXHeading3/...":A.heading3,"ATXHeading4/...":A.heading4,"ATXHeading5/...":A.heading5,"ATXHeading6/...":A.heading6,"Comment CommentBlock":A.comment,Escape:A.escape,Entity:A.character,"Emphasis/...":A.emphasis,"StrongEmphasis/...":A.strong,"Link/... Image/...":A.link,"OrderedList/... BulletList/...":A.list,"BlockQuote/...":A.quote,"InlineCode CodeText":A.monospace,"URL Autolink":A.url,"HeaderMark HardBreak QuoteMark ListMark LinkMark EmphasisMark CodeMark":A.processingInstruction,"CodeInfo LinkLabel":A.labelName,LinkTitle:A.string,Paragraph:A.content}),wre=new yO(new cu(s5).extend(kre),Object.keys(sm).map(t=>sm[t]),Object.keys(sm).map(t=>i5[t]),Object.keys(sm),yre,Gj,Object.keys(ex).map(t=>ex[t]),Object.keys(ex),[]);function Pre(t,e,n){let i=[];for(let r=t.firstChild,s=e;;r=r.nextSibling){let o=r?r.from:n;if(o>s&&i.push({from:s,to:o}),!r)break;s=r.to}return i}function Tre(t){let{codeParser:e,htmlParser:n}=t;return{wrap:dS((r,s)=>{let o=r.type.id;if(e&&(o==me.CodeBlock||o==me.FencedCode)){let l="";if(o==me.FencedCode){let h=r.node.getChild(me.CodeInfo);h&&(l=s.read(h.from,h.to))}let c=e(l);if(c)return{parser:c,overlay:h=>h.type.id==me.CodeText}}else if(n&&(o==me.HTMLBlock||o==me.HTMLTag||o==me.CommentBlock))return{parser:n,overlay:Pre(r.node,r.from,r.to)};return null})}}const Qre={resolve:"Strikethrough",mark:"StrikethroughMark"},Cre={defineNodes:[{name:"Strikethrough",style:{"Strikethrough/...":A.strikethrough}},{name:"StrikethroughMark",style:A.processingInstruction}],parseInline:[{name:"Strikethrough",parse(t,e,n){if(e!=126||t.char(n+1)!=126||t.char(n+2)==126)return-1;let i=t.slice(n-1,n),r=t.slice(n+2,n+3),s=/\s|^$/.test(i),o=/\s|^$/.test(r),l=Qf.test(i),c=Qf.test(r);return t.addDelimiter(Qre,n,n+2,!o&&(!c||s||l),!s&&(!l||o||c))},after:"Emphasis"}]};function Gh(t,e,n=0,i,r=0){let s=0,o=!0,l=-1,c=-1,h=!1,d=()=>{i.push(t.elt("TableCell",r+l,r+c,t.parser.parseInline(e.slice(l,c),r+l)))};for(let p=n;p<e.length;p++){let g=e.charCodeAt(p);g==124&&!h?((!o||l>-1)&&s++,o=!1,i&&(l>-1&&d(),i.push(t.elt("TableDelimiter",p+r,p+r+1))),l=c=-1):(h||g!=32&&g!=9)&&(l<0&&(l=p),c=p+1),h=!h&&g==92}return l>-1&&(s++,i&&d()),s}function PA(t,e){for(let n=e;n<t.length;n++){let i=t.charCodeAt(n);if(i==124)return!0;i==92&&n++}return!1}const p5=/^\|?(\s*:?-+:?\s*\|)+(\s*:?-+:?\s*)?$/;class TA{constructor(){this.rows=null}nextLine(e,n,i){if(this.rows==null){this.rows=!1;let r;if((n.next==45||n.next==58||n.next==124)&&p5.test(r=n.text.slice(n.pos))){let s=[];Gh(e,i.content,0,s,i.start)==Gh(e,r,n.pos)&&(this.rows=[e.elt("TableHeader",i.start,i.start+i.content.length,s),e.elt("TableDelimiter",e.lineStart+n.pos,e.lineStart+n.text.length)])}}else if(this.rows){let r=[];Gh(e,n.text,n.pos,r,e.lineStart),this.rows.push(e.elt("TableRow",e.lineStart+n.pos,e.lineStart+n.text.length,r))}return!1}finish(e,n){return this.rows?(e.addLeafElement(n,e.elt("Table",n.start,n.start+n.content.length,this.rows)),!0):!1}}const Ere={defineNodes:[{name:"Table",block:!0},{name:"TableHeader",style:{"TableHeader/...":A.heading}},"TableRow",{name:"TableCell",style:A.content},{name:"TableDelimiter",style:A.processingInstruction}],parseBlock:[{name:"Table",leaf(t,e){return PA(e.content,0)?new TA:null},endLeaf(t,e,n){if(n.parsers.some(r=>r instanceof TA)||!PA(e.text,e.basePos))return!1;let i=t.peekLine();return p5.test(i)&&Gh(t,e.text,e.basePos)==Gh(t,i,e.basePos)},before:"SetextHeading"}]};class Are{nextLine(){return!1}finish(e,n){return e.addLeafElement(n,e.elt("Task",n.start,n.start+n.content.length,[e.elt("TaskMarker",n.start,n.start+3),...e.parser.parseInline(n.content.slice(3),n.start+3)])),!0}}const Rre={defineNodes:[{name:"Task",block:!0,style:A.list},{name:"TaskMarker",style:A.atom}],parseBlock:[{name:"TaskList",leaf(t,e){return/^\[[ xX]\][ \t]/.test(e.content)&&t.parentType().name=="ListItem"?new Are:null},after:"SetextHeading"}]},QA=/(www\.)|(https?:\/\/)|([\w.+-]{1,100}@)|(mailto:|xmpp:)/gy,CA=/[\w-]+(\.[\w-]+)+(\/[^\s<]*)?/gy,$re=/[\w-]+\.[\w-]+($|\/)/,EA=/[\w.+-]+@[\w-]+(\.[\w.-]+)+/gy,AA=/\/[a-zA-Z\d@.]+/gy;function RA(t,e,n,i){let r=0;for(let s=e;s<n;s++)t[s]==i&&r++;return r}function Lre(t,e){CA.lastIndex=e;let n=CA.exec(t);if(!n||$re.exec(n[0])[0].indexOf("_")>-1)return-1;let i=e+n[0].length;for(;;){let r=t[i-1],s;if(/[?!.,:*_~]/.test(r)||r==")"&&RA(t,e,i,")")>RA(t,e,i,"("))i--;else if(r==";"&&(s=/&(?:#\d+|#x[a-f\d]+|\w+);$/.exec(t.slice(e,i))))i=e+s.index;else break}return i}function $A(t,e){EA.lastIndex=e;let n=EA.exec(t);if(!n)return-1;let i=n[0][n[0].length-1];return i=="_"||i=="-"?-1:e+n[0].length-(i=="."?1:0)}const Mre={parseInline:[{name:"Autolink",parse(t,e,n){let i=n-t.offset;if(i&&/\w/.test(t.text[i-1]))return-1;QA.lastIndex=i;let r=QA.exec(t.text),s=-1;if(!r)return-1;if(r[1]||r[2]){if(s=Lre(t.text,i+r[0].length),s>-1&&t.hasOpenLink){let o=/([^\[\]]|\[[^\]]*\])*/.exec(t.text.slice(i,s));s=i+o[0].length}}else r[3]?s=$A(t.text,i):(s=$A(t.text,i+r[0].length),s>-1&&r[0]=="xmpp:"&&(AA.lastIndex=s,r=AA.exec(t.text),r&&(s=r.index+r[0].length)));return s<0?-1:(t.addElement(t.elt("URL",n,s+t.offset)),s+t.offset)}}]},Dre=[Ere,Rre,Cre,Mre];function m5(t,e,n){return(i,r,s)=>{if(r!=t||i.char(s+1)==t)return-1;let o=[i.elt(n,s,s+1)];for(let l=s+1;l<i.end;l++){let c=i.char(l);if(c==t)return i.addElement(i.elt(e,s,l+1,o.concat(i.elt(n,l,l+1))));if(c==92&&o.push(i.elt("Escape",l,l+++2)),Ji(c))break}return-1}}const jre={defineNodes:[{name:"Superscript",style:A.special(A.content)},{name:"SuperscriptMark",style:A.processingInstruction}],parseInline:[{name:"Superscript",parse:m5(94,"Superscript","SuperscriptMark")}]},Nre={defineNodes:[{name:"Subscript",style:A.special(A.content)},{name:"SubscriptMark",style:A.processingInstruction}],parseInline:[{name:"Subscript",parse:m5(126,"Subscript","SubscriptMark")}]},zre={defineNodes:[{name:"Emoji",style:A.character}],parseInline:[{name:"Emoji",parse(t,e,n){let i;return e!=58||!(i=/^[a-zA-Z_0-9]+:/.exec(t.slice(n+1,t.end)))?-1:t.addElement(t.elt("Emoji",n,n+1+i[0].length))}}]},Ire=55,Xre=1,Vre=56,Bre=2,Zre=57,qre=3,LA=4,Ure=5,n_=6,g5=7,O5=8,y5=9,b5=10,Yre=11,Gre=12,Wre=13,tx=58,Hre=14,Fre=15,MA=59,x5=21,Kre=23,v5=24,Jre=25,sv=27,S5=28,ese=29,tse=32,nse=35,ise=37,rse=38,sse=0,ose=1,ase={area:!0,base:!0,br:!0,col:!0,command:!0,embed:!0,frame:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0,menuitem:!0},lse={dd:!0,li:!0,optgroup:!0,option:!0,p:!0,rp:!0,rt:!0,tbody:!0,td:!0,tfoot:!0,th:!0,tr:!0},DA={dd:{dd:!0,dt:!0},dt:{dd:!0,dt:!0},li:{li:!0},option:{option:!0,optgroup:!0},optgroup:{optgroup:!0},p:{address:!0,article:!0,aside:!0,blockquote:!0,dir:!0,div:!0,dl:!0,fieldset:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,menu:!0,nav:!0,ol:!0,p:!0,pre:!0,section:!0,table:!0,ul:!0},rp:{rp:!0,rt:!0},rt:{rp:!0,rt:!0},tbody:{tbody:!0,tfoot:!0},td:{td:!0,th:!0},tfoot:{tbody:!0},th:{td:!0,th:!0},thead:{tbody:!0,tfoot:!0},tr:{tr:!0}};function cse(t){return t==45||t==46||t==58||t>=65&&t<=90||t==95||t>=97&&t<=122||t>=161}let jA=null,NA=null,zA=0;function ov(t,e){let n=t.pos+e;if(zA==n&&NA==t)return jA;let i=t.peek(e),r="";for(;cse(i);)r+=String.fromCharCode(i),i=t.peek(++e);return NA=t,zA=n,jA=r?r.toLowerCase():i==use||i==hse?void 0:null}const _5=60,Qg=62,i_=47,use=63,hse=33,fse=45;function IA(t,e){this.name=t,this.parent=e}const dse=[n_,b5,g5,O5,y5],pse=new NS({start:null,shift(t,e,n,i){return dse.indexOf(e)>-1?new IA(ov(i,1)||"",t):t},reduce(t,e){return e==x5&&t?t.parent:t},reuse(t,e,n,i){let r=e.type.id;return r==n_||r==ise?new IA(ov(i,1)||"",t):t},strict:!1}),mse=new bn((t,e)=>{if(t.next!=_5){t.next<0&&e.context&&t.acceptToken(tx);return}t.advance();let n=t.next==i_;n&&t.advance();let i=ov(t,0);if(i===void 0)return;if(!i)return t.acceptToken(n?Fre:Hre);let r=e.context?e.context.name:null;if(n){if(i==r)return t.acceptToken(Yre);if(r&&lse[r])return t.acceptToken(tx,-2);if(e.dialectEnabled(sse))return t.acceptToken(Gre);for(let s=e.context;s;s=s.parent)if(s.name==i)return;t.acceptToken(Wre)}else{if(i=="script")return t.acceptToken(g5);if(i=="style")return t.acceptToken(O5);if(i=="textarea")return t.acceptToken(y5);if(ase.hasOwnProperty(i))return t.acceptToken(b5);r&&DA[r]&&DA[r][i]?t.acceptToken(tx,-1):t.acceptToken(n_)}},{contextual:!0}),gse=new bn(t=>{for(let e=0,n=0;;n++){if(t.next<0){n&&t.acceptToken(MA);break}if(t.next==fse)e++;else if(t.next==Qg&&e>=2){n>=3&&t.acceptToken(MA,-2);break}else e=0;t.advance()}});function Ose(t){for(;t;t=t.parent)if(t.name=="svg"||t.name=="math")return!0;return!1}const yse=new bn((t,e)=>{if(t.next==i_&&t.peek(1)==Qg){let n=e.dialectEnabled(ose)||Ose(e.context);t.acceptToken(n?Ure:LA,2)}else t.next==Qg&&t.acceptToken(LA,1)});function r_(t,e,n){let i=2+t.length;return new bn(r=>{for(let s=0,o=0,l=0;;l++){if(r.next<0){l&&r.acceptToken(e);break}if(s==0&&r.next==_5||s==1&&r.next==i_||s>=2&&s<i&&r.next==t.charCodeAt(s-2))s++,o++;else if(s==i&&r.next==Qg){l>o?r.acceptToken(e,-o):r.acceptToken(n,-(o-2));break}else if((r.next==10||r.next==13)&&l){r.acceptToken(e,1);break}else s=o=0;r.advance()}})}const bse=r_("script",Ire,Xre),xse=r_("style",Vre,Bre),vse=r_("textarea",Zre,qre),Sse=Xs({"Text RawText IncompleteTag IncompleteCloseTag":A.content,"StartTag StartCloseTag SelfClosingEndTag EndTag":A.angleBracket,TagName:A.tagName,"MismatchedCloseTag/TagName":[A.tagName,A.invalid],AttributeName:A.attributeName,"AttributeValue UnquotedAttributeValue":A.attributeValue,Is:A.definitionOperator,"EntityReference CharacterReference":A.character,Comment:A.blockComment,ProcessingInst:A.processingInstruction,DoctypeDecl:A.documentMeta}),_se=js.deserialize({version:14,states:",xOVO!rOOO!ZQ#tO'#CrO!`Q#tO'#C{O!eQ#tO'#DOO!jQ#tO'#DRO!oQ#tO'#DTO!tOaO'#CqO#PObO'#CqO#[OdO'#CqO$kO!rO'#CqOOO`'#Cq'#CqO$rO$fO'#DUO$zQ#tO'#DWO%PQ#tO'#DXOOO`'#Dl'#DlOOO`'#DZ'#DZQVO!rOOO%UQ&rO,59^O%aQ&rO,59gO%lQ&rO,59jO%wQ&rO,59mO&SQ&rO,59oOOOa'#D_'#D_O&_OaO'#CyO&jOaO,59]OOOb'#D`'#D`O&rObO'#C|O&}ObO,59]OOOd'#Da'#DaO'VOdO'#DPO'bOdO,59]OOO`'#Db'#DbO'jO!rO,59]O'qQ#tO'#DSOOO`,59],59]OOOp'#Dc'#DcO'vO$fO,59pOOO`,59p,59pO(OQ#|O,59rO(TQ#|O,59sOOO`-E7X-E7XO(YQ&rO'#CtOOQW'#D['#D[O(hQ&rO1G.xOOOa1G.x1G.xOOO`1G/Z1G/ZO(sQ&rO1G/ROOOb1G/R1G/RO)OQ&rO1G/UOOOd1G/U1G/UO)ZQ&rO1G/XOOO`1G/X1G/XO)fQ&rO1G/ZOOOa-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O~Ob!xOc!xOd!xO!c!{O!d!xO~OT~cbd!ey|!e~",goto:"%q!aPPPPPPPPPPPPPPPPPPPPP!b!hP!nPP!zP!}#Q#T#Z#^#a#g#j#m#s#y!bP!b!bP$P$V$m$s$y%P%V%]%cPPPPPPPP%iX^OX`pXUOX`pezabcde{!O!Q!S!UR!q!dRhUR!XhXVOX`pRkVR!XkXWOX`pRnWR!XnXXOX`pQrXR!XpXYOX`pQ`ORx`Q{aQ!ObQ!QcQ!SdQ!UeZ!e{!O!Q!S!UQ!v!oR!z!vQ!y!pR!|!yQgUR!VgQjVR!YjQmWR![mQpXR!^pQtZR!`tS_O`ToXp",nodeNames:"⚠ StartCloseTag StartCloseTag StartCloseTag EndTag SelfClosingEndTag StartTag StartTag StartTag StartTag StartTag StartCloseTag StartCloseTag StartCloseTag IncompleteTag IncompleteCloseTag Document Text EntityReference CharacterReference InvalidEntity Element OpenTag TagName Attribute AttributeName Is AttributeValue UnquotedAttributeValue ScriptText CloseTag OpenTag StyleText CloseTag OpenTag TextareaText CloseTag OpenTag CloseTag SelfClosingTag Comment ProcessingInst MismatchedCloseTag CloseTag DoctypeDecl",maxTerm:68,context:pse,nodeProps:[["closedBy",-10,1,2,3,7,8,9,10,11,12,13,"EndTag",6,"EndTag SelfClosingEndTag",-4,22,31,34,37,"CloseTag"],["openedBy",4,"StartTag StartCloseTag",5,"StartTag",-4,30,33,36,38,"OpenTag"],["group",-10,14,15,18,19,20,21,40,41,42,43,"Entity",17,"Entity TextContent",-3,29,32,35,"TextContent Entity"],["isolate",-11,22,30,31,33,34,36,37,38,39,42,43,"ltr",-3,27,28,40,""]],propSources:[Sse],skippedNodes:[0],repeatNodeCount:9,tokenData:"!<p!aR!YOX$qXY,QYZ,QZ[$q[]&X]^,Q^p$qpq,Qqr-_rs3_sv-_vw3}wxHYx}-_}!OH{!O!P-_!P!Q$q!Q![-_![!]Mz!]!^-_!^!_!$S!_!`!;x!`!a&X!a!c-_!c!}Mz!}#R-_#R#SMz#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trs!5ksv!4tvw!6Vwx!8]x!`!4t!`!a!;S!a;'S!4t;'S;=`!;r<%lO!4t!R!;]V!b`!dpyPOr*Vrs(Vsv*Vwx)ex;'S*V;'S;=`*s<%lO*V!R!;uP;=`<%l!4t!V!<TXjSaP!b`!dpOr&Xrs&}sv&Xwx(tx!^&X!^!_*V!_;'S&X;'S;=`*y<%lO&X",tokenizers:[bse,xse,vse,yse,mse,gse,0,1,2,3,4,5],topRules:{Document:[0,16]},dialects:{noMatch:0,selfClosing:515},tokenPrec:517});function k5(t,e){let n=Object.create(null);for(let i of t.getChildren(v5)){let r=i.getChild(Jre),s=i.getChild(sv)||i.getChild(S5);r&&(n[e.read(r.from,r.to)]=s?s.type.id==sv?e.read(s.from+1,s.to-1):e.read(s.from,s.to):"")}return n}function XA(t,e){let n=t.getChild(Kre);return n?e.read(n.from,n.to):" "}function nx(t,e,n){let i;for(let r of n)if(!r.attrs||r.attrs(i||(i=k5(t.node.parent.firstChild,e))))return{parser:r.parser};return null}function w5(t=[],e=[]){let n=[],i=[],r=[],s=[];for(let l of t)(l.tag=="script"?n:l.tag=="style"?i:l.tag=="textarea"?r:s).push(l);let o=e.length?Object.create(null):null;for(let l of e)(o[l.name]||(o[l.name]=[])).push(l);return dS((l,c)=>{let h=l.type.id;if(h==ese)return nx(l,c,n);if(h==tse)return nx(l,c,i);if(h==nse)return nx(l,c,r);if(h==x5&&s.length){let d=l.node,p=d.firstChild,g=p&&XA(p,c),O;if(g){for(let x of s)if(x.tag==g&&(!x.attrs||x.attrs(O||(O=k5(p,c))))){let S=d.lastChild,_=S.type.id==rse?S.from:d.to;if(_>p.to)return{parser:x.parser,overlay:[{from:p.to,to:_}]}}}}if(o&&h==v5){let d=l.node,p;if(p=d.firstChild){let g=o[c.read(p.from,p.to)];if(g)for(let O of g){if(O.tagName&&O.tagName!=XA(d.parent,c))continue;let x=d.lastChild;if(x.type.id==sv){let S=x.from+1,_=x.lastChild,k=x.to-(_&&_.isError?0:1);if(k>S)return{parser:O.parser,overlay:[{from:S,to:k}]}}else if(x.type.id==S5)return{parser:O.parser,overlay:[{from:x.from,to:x.to}]}}}}return null})}const kse=122,VA=1,wse=123,Pse=124,P5=2,Tse=125,Qse=3,Cse=4,T5=[9,10,11,12,13,32,133,160,5760,8192,8193,8194,8195,8196,8197,8198,8199,8200,8201,8202,8232,8233,8239,8287,12288],Ese=58,Ase=40,Q5=95,Rse=91,Qm=45,$se=46,Lse=35,Mse=37,Dse=38,jse=92,Nse=10,zse=42;function Cf(t){return t>=65&&t<=90||t>=97&&t<=122||t>=161}function s_(t){return t>=48&&t<=57}function BA(t){return s_(t)||t>=97&&t<=102||t>=65&&t<=70}const C5=(t,e,n)=>(i,r)=>{for(let s=!1,o=0,l=0;;l++){let{next:c}=i;if(Cf(c)||c==Qm||c==Q5||s&&s_(c))!s&&(c!=Qm||l>0)&&(s=!0),o===l&&c==Qm&&o++,i.advance();else if(c==jse&&i.peek(1)!=Nse){if(i.advance(),BA(i.next)){do i.advance();while(BA(i.next));i.next==32&&i.advance()}else i.next>-1&&i.advance();s=!0}else{s&&i.acceptToken(o==2&&r.canShift(P5)?e:c==Ase?n:t);break}}},Ise=new bn(C5(wse,P5,Pse)),Xse=new bn(C5(Tse,Qse,Cse)),Vse=new bn(t=>{if(T5.includes(t.peek(-1))){let{next:e}=t;(Cf(e)||e==Q5||e==Lse||e==$se||e==zse||e==Rse||e==Ese&&Cf(t.peek(1))||e==Qm||e==Dse)&&t.acceptToken(kse)}}),Bse=new bn(t=>{if(!T5.includes(t.peek(-1))){let{next:e}=t;if(e==Mse&&(t.advance(),t.acceptToken(VA)),Cf(e)){do t.advance();while(Cf(t.next)||s_(t.next));t.acceptToken(VA)}}}),Zse=Xs({"AtKeyword import charset namespace keyframes media supports":A.definitionKeyword,"from to selector":A.keyword,NamespaceName:A.namespace,KeyframeName:A.labelName,KeyframeRangeName:A.operatorKeyword,TagName:A.tagName,ClassName:A.className,PseudoClassName:A.constant(A.className),IdName:A.labelName,"FeatureName PropertyName":A.propertyName,AttributeName:A.attributeName,NumberLiteral:A.number,KeywordQuery:A.keyword,UnaryQueryOp:A.operatorKeyword,"CallTag ValueName":A.atom,VariableName:A.variableName,Callee:A.operatorKeyword,Unit:A.unit,"UniversalSelector NestingSelector":A.definitionOperator,"MatchOp CompareOp":A.compareOperator,"ChildOp SiblingOp, LogicOp":A.logicOperator,BinOp:A.arithmeticOperator,Important:A.modifier,Comment:A.blockComment,ColorLiteral:A.color,"ParenthesizedContent StringLiteral":A.string,":":A.punctuation,"PseudoOp #":A.derefOperator,"; ,":A.separator,"( )":A.paren,"[ ]":A.squareBracket,"{ }":A.brace}),qse={__proto__:null,lang:38,"nth-child":38,"nth-last-child":38,"nth-of-type":38,"nth-last-of-type":38,dir:38,"host-context":38,if:84,url:124,"url-prefix":124,domain:124,regexp:124},Use={__proto__:null,or:98,and:98,not:106,only:106,layer:170},Yse={__proto__:null,selector:112,layer:166},Gse={__proto__:null,"@import":162,"@media":174,"@charset":178,"@namespace":182,"@keyframes":188,"@supports":200,"@scope":204},Wse={__proto__:null,to:207},Hse=js.deserialize({version:14,states:"EbQYQdOOO#qQdOOP#xO`OOOOQP'#Cf'#CfOOQP'#Ce'#CeO#}QdO'#ChO$nQaO'#CcO$xQdO'#CkO%TQdO'#DpO%YQdO'#DrO%_QdO'#DuO%_QdO'#DxOOQP'#FV'#FVO&eQhO'#EhOOQS'#FU'#FUOOQS'#Ek'#EkQYQdOOO&lQdO'#EOO&PQhO'#EUO&lQdO'#EWO'aQdO'#EYO'lQdO'#E]O'tQhO'#EcO(VQdO'#EeO(bQaO'#CfO)VQ`O'#D{O)[Q`O'#F`O)gQdO'#F`QOQ`OOP)qO&jO'#CaPOOO)C@t)C@tOOQP'#Cj'#CjOOQP,59S,59SO#}QdO,59SO)|QdO,59VO%TQdO,5:[O%YQdO,5:^O%_QdO,5:aO%_QdO,5:cO%_QdO,5:dO%_QdO'#ErO*XQ`O,58}O*aQdO'#DzOOQS,58},58}OOQP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$P!gQ%}%SR&z&mR!rdR!teR$Z!tS%a$Y%bR&t&WV%_$Y%b&WQ#PmR$g#PQ`OSkPzU!a`k$dR$d!{Q$p#aY%p$p%u&d&l'QQ%u$sQ&d%qQ&l%zR'Q&xQ#t!cQ#v!dQ#x!eV$}#t#v#xQ%X$RR&T%XQ%y$zS&k%y&yR&y&lQ%r$pR&e%rQ%n$mR&c%nQyUR#]yQ%i$aR&_%iQ!|jS$e!|$fR$f!}Q&n%}R&{&nQ#k!ZR$x#kQ%b$YR&Z%bQ&X%aR&u&X__OP`kz!{$d^UOP`kz!{$dQ!VYQ!WZQ#XuQ#YvQ#ZwQ#[xQ$]!vQ$m#`R&b%mR$q#aQ!gaQ!oc[#q!c!d!e#t#v#xQ$a!zd$o#a$p$s%q%u%z&d&l&x'QQ$r#cQ%R#{S%g$a%iQ%l$kQ&^%hR&p&P]#s!c!d!e#t#v#xW!Z]b!g$PQ!ufQ#f!YQ#l![Q$v#iQ$w#jQ$z#mS%V$R%XR&i%xQ#h!YQ%w$tR&w&hR$|#mR$n#`QlPR#_zQ!_]Q!nbQ$O!gR%U$P",nodeNames:"⚠ Unit VariableName VariableName QueryCallee Comment StyleSheet RuleSet UniversalSelector TagSelector TagName NestingSelector ClassSelector . ClassName PseudoClassSelector : :: PseudoClassName PseudoClassName ) ( ArgList ValueName ParenthesizedValue AtKeyword # ; ] [ BracketedValue } { BracedValue ColorLiteral NumberLiteral StringLiteral BinaryExpression BinOp CallExpression Callee IfExpression if ArgList IfBranch KeywordQuery FeatureQuery FeatureName BinaryQuery LogicOp ComparisonQuery CompareOp UnaryQuery UnaryQueryOp ParenthesizedQuery SelectorQuery selector ParenthesizedSelector CallQuery ArgList , CallLiteral CallTag ParenthesizedContent PseudoClassName ArgList IdSelector IdName AttributeSelector AttributeName MatchOp ChildSelector ChildOp DescendantSelector SiblingSelector SiblingOp Block Declaration PropertyName Important ImportStatement import Layer layer LayerName layer MediaStatement media CharsetStatement charset NamespaceStatement namespace NamespaceName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xse,1,2,3,4,new vg("m~RRYZ[z{a~~g~aO#v~~dP!P!Qg~lO#w~~",28,129)],topRules:{StyleSheet:[0,6],Styles:[1,105]},specialized:[{term:124,get:t=>qse[t]||-1},{term:125,get:t=>Use[t]||-1},{term:4,get:t=>Yse[t]||-1},{term:25,get:t=>Gse[t]||-1},{term:123,get:t=>Wse[t]||-1}],tokenPrec:1963});let ix=null;function rx(){if(!ix&&typeof document=="object"&&document.body){let{style:t}=document.body,e=[],n=new Set;for(let i in t)i!="cssText"&&i!="cssFloat"&&typeof t[i]=="string"&&(/[A-Z]/.test(i)&&(i=i.replace(/[A-Z]/g,r=>"-"+r.toLowerCase())),n.has(i)||(e.push(i),n.add(i)));ix=e.sort().map(i=>({type:"property",label:i,apply:i+": "}))}return ix||[]}const ZA=["active","after","any-link","autofill","backdrop","before","checked","cue","default","defined","disabled","empty","enabled","file-selector-button","first","first-child","first-letter","first-line","first-of-type","focus","focus-visible","focus-within","fullscreen","has","host","host-context","hover","in-range","indeterminate","invalid","is","lang","last-child","last-of-type","left","link","marker","modal","not","nth-child","nth-last-child","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","part","placeholder","placeholder-shown","read-only","read-write","required","right","root","scope","selection","slotted","target","target-text","valid","visited","where"].map(t=>({type:"class",label:t})),qA=["above","absolute","activeborder","additive","activecaption","after-white-space","ahead","alias","all","all-scroll","alphabetic","alternate","always","antialiased","appworkspace","asterisks","attr","auto","auto-flow","avoid","avoid-column","avoid-page","avoid-region","axis-pan","background","backwards","baseline","below","bidi-override","blink","block","block-axis","bold","bolder","border","border-box","both","bottom","break","break-all","break-word","bullets","button","button-bevel","buttonface","buttonhighlight","buttonshadow","buttontext","calc","capitalize","caps-lock-indicator","caption","captiontext","caret","cell","center","checkbox","circle","cjk-decimal","clear","clip","close-quote","col-resize","collapse","color","color-burn","color-dodge","column","column-reverse","compact","condensed","contain","content","contents","content-box","context-menu","continuous","copy","counter","counters","cover","crop","cross","crosshair","currentcolor","cursive","cyclic","darken","dashed","decimal","decimal-leading-zero","default","default-button","dense","destination-atop","destination-in","destination-out","destination-over","difference","disc","discard","disclosure-closed","disclosure-open","document","dot-dash","dot-dot-dash","dotted","double","down","e-resize","ease","ease-in","ease-in-out","ease-out","element","ellipse","ellipsis","embed","end","ethiopic-abegede-gez","ethiopic-halehame-aa-er","ethiopic-halehame-gez","ew-resize","exclusion","expanded","extends","extra-condensed","extra-expanded","fantasy","fast","fill","fill-box","fixed","flat","flex","flex-end","flex-start","footnotes","forwards","from","geometricPrecision","graytext","grid","groove","hand","hard-light","help","hidden","hide","higher","highlight","highlighttext","horizontal","hsl","hsla","hue","icon","ignore","inactiveborder","inactivecaption","inactivecaptiontext","infinite","infobackground","infotext","inherit","initial","inline","inline-axis","inline-block","inline-flex","inline-grid","inline-table","inset","inside","intrinsic","invert","italic","justify","keep-all","landscape","large","larger","left","level","lighter","lighten","line-through","linear","linear-gradient","lines","list-item","listbox","listitem","local","logical","loud","lower","lower-hexadecimal","lower-latin","lower-norwegian","lowercase","ltr","luminosity","manipulation","match","matrix","matrix3d","medium","menu","menutext","message-box","middle","min-intrinsic","mix","monospace","move","multiple","multiple_mask_images","multiply","n-resize","narrower","ne-resize","nesw-resize","no-close-quote","no-drop","no-open-quote","no-repeat","none","normal","not-allowed","nowrap","ns-resize","numbers","numeric","nw-resize","nwse-resize","oblique","opacity","open-quote","optimizeLegibility","optimizeSpeed","outset","outside","outside-shape","overlay","overline","padding","padding-box","painted","page","paused","perspective","pinch-zoom","plus-darker","plus-lighter","pointer","polygon","portrait","pre","pre-line","pre-wrap","preserve-3d","progress","push-button","radial-gradient","radio","read-only","read-write","read-write-plaintext-only","rectangle","region","relative","repeat","repeating-linear-gradient","repeating-radial-gradient","repeat-x","repeat-y","reset","reverse","rgb","rgba","ridge","right","rotate","rotate3d","rotateX","rotateY","rotateZ","round","row","row-resize","row-reverse","rtl","run-in","running","s-resize","sans-serif","saturation","scale","scale3d","scaleX","scaleY","scaleZ","screen","scroll","scrollbar","scroll-position","se-resize","self-start","self-end","semi-condensed","semi-expanded","separate","serif","show","single","skew","skewX","skewY","skip-white-space","slide","slider-horizontal","slider-vertical","sliderthumb-horizontal","sliderthumb-vertical","slow","small","small-caps","small-caption","smaller","soft-light","solid","source-atop","source-in","source-out","source-over","space","space-around","space-between","space-evenly","spell-out","square","start","static","status-bar","stretch","stroke","stroke-box","sub","subpixel-antialiased","svg_masks","super","sw-resize","symbolic","symbols","system-ui","table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row","table-row-group","text","text-bottom","text-top","textarea","textfield","thick","thin","threeddarkshadow","threedface","threedhighlight","threedlightshadow","threedshadow","to","top","transform","translate","translate3d","translateX","translateY","translateZ","transparent","ultra-condensed","ultra-expanded","underline","unidirectional-pan","unset","up","upper-latin","uppercase","url","var","vertical","vertical-text","view-box","visible","visibleFill","visiblePainted","visibleStroke","visual","w-resize","wait","wave","wider","window","windowframe","windowtext","words","wrap","wrap-reverse","x-large","x-small","xor","xx-large","xx-small"].map(t=>({type:"keyword",label:t})).concat(["aliceblue","antiquewhite","aqua","aquamarine","azure","beige","bisque","black","blanchedalmond","blue","blueviolet","brown","burlywood","cadetblue","chartreuse","chocolate","coral","cornflowerblue","cornsilk","crimson","cyan","darkblue","darkcyan","darkgoldenrod","darkgray","darkgreen","darkkhaki","darkmagenta","darkolivegreen","darkorange","darkorchid","darkred","darksalmon","darkseagreen","darkslateblue","darkslategray","darkturquoise","darkviolet","deeppink","deepskyblue","dimgray","dodgerblue","firebrick","floralwhite","forestgreen","fuchsia","gainsboro","ghostwhite","gold","goldenrod","gray","grey","green","greenyellow","honeydew","hotpink","indianred","indigo","ivory","khaki","lavender","lavenderblush","lawngreen","lemonchiffon","lightblue","lightcoral","lightcyan","lightgoldenrodyellow","lightgray","lightgreen","lightpink","lightsalmon","lightseagreen","lightskyblue","lightslategray","lightsteelblue","lightyellow","lime","limegreen","linen","magenta","maroon","mediumaquamarine","mediumblue","mediumorchid","mediumpurple","mediumseagreen","mediumslateblue","mediumspringgreen","mediumturquoise","mediumvioletred","midnightblue","mintcream","mistyrose","moccasin","navajowhite","navy","oldlace","olive","olivedrab","orange","orangered","orchid","palegoldenrod","palegreen","paleturquoise","palevioletred","papayawhip","peachpuff","peru","pink","plum","powderblue","purple","rebeccapurple","red","rosybrown","royalblue","saddlebrown","salmon","sandybrown","seagreen","seashell","sienna","silver","skyblue","slateblue","slategray","snow","springgreen","steelblue","tan","teal","thistle","tomato","turquoise","violet","wheat","white","whitesmoke","yellow","yellowgreen"].map(t=>({type:"constant",label:t}))),Fse=["a","abbr","address","article","aside","b","bdi","bdo","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","dd","del","details","dfn","dialog","div","dl","dt","em","figcaption","figure","footer","form","header","hgroup","h1","h2","h3","h4","h5","h6","hr","html","i","iframe","img","input","ins","kbd","label","legend","li","main","meter","nav","ol","output","p","pre","ruby","section","select","small","source","span","strong","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","tr","u","ul"].map(t=>({type:"type",label:t})),Kse=["@charset","@color-profile","@container","@counter-style","@font-face","@font-feature-values","@font-palette-values","@import","@keyframes","@layer","@media","@namespace","@page","@position-try","@property","@scope","@starting-style","@supports","@view-transition"].map(t=>({type:"keyword",label:t})),gs=/^(\w[\w-]*|-\w[\w-]*|)$/,Jse=/^-(-[\w-]*)?$/;function eoe(t,e){var n;if((t.name=="("||t.type.isError)&&(t=t.parent||t),t.name!="ArgList")return!1;let i=(n=t.parent)===null||n===void 0?void 0:n.firstChild;return(i==null?void 0:i.name)!="Callee"?!1:e.sliceString(i.from,i.to)=="var"}const UA=new UL,toe=["Declaration"];function noe(t){for(let e=t;;){if(e.type.isTop)return e;if(!(e=e.parent))return t}}function E5(t,e,n){if(e.to-e.from>4096){let i=UA.get(e);if(i)return i;let r=[],s=new Set,o=e.cursor(wt.IncludeAnonymous);if(o.firstChild())do for(let l of E5(t,o.node,n))s.has(l.label)||(s.add(l.label),r.push(l));while(o.nextSibling());return UA.set(e,r),r}else{let i=[],r=new Set;return e.cursor().iterate(s=>{var o;if(n(s)&&s.matchContext(toe)&&((o=s.node.nextSibling)===null||o===void 0?void 0:o.name)==":"){let l=t.sliceString(s.from,s.to);r.has(l)||(r.add(l),i.push({label:l,type:"variable"}))}}),i}}const A5=t=>e=>{let{state:n,pos:i}=e,r=pt(n).resolveInner(i,-1),s=r.type.isError&&r.from==r.to-1&&n.doc.sliceString(r.from,r.to)=="-";if(r.name=="PropertyName"||(s||r.name=="TagName")&&/^(Block|Styles)$/.test(r.resolve(r.to).name))return{from:r.from,options:rx(),validFor:gs};if(r.name=="ValueName")return{from:r.from,options:qA,validFor:gs};if(r.name=="PseudoClassName")return{from:r.from,options:ZA,validFor:gs};if(t(r)||(e.explicit||s)&&eoe(r,n.doc))return{from:t(r)||s?r.from:i,options:E5(n.doc,noe(r),t),validFor:Jse};if(r.name=="TagName"){for(let{parent:c}=r;c;c=c.parent)if(c.name=="Block")return{from:r.from,options:rx(),validFor:gs};return{from:r.from,options:Fse,validFor:gs}}if(r.name=="AtKeyword")return{from:r.from,options:Kse,validFor:gs};if(!e.explicit)return null;let o=r.resolve(i),l=o.childBefore(i);return l&&l.name==":"&&o.name=="PseudoClassSelector"?{from:i,options:ZA,validFor:gs}:l&&l.name==":"&&o.name=="Declaration"||o.name=="ArgList"?{from:i,options:qA,validFor:gs}:o.name=="Block"||o.name=="Styles"?{from:i,options:rx(),validFor:gs}:null},R5=A5(t=>t.name=="VariableName"),Ef=Ds.define({name:"css",parser:Hse.configure({props:[Ho.add({Declaration:Sc()}),Fo.add({"Block KeyframeList":uO})]}),languageData:{commentTokens:{block:{open:"/*",close:"*/"}},indentOnInput:/^\s*\}$/,wordChars:"-"}});function $5(){return new Xr(Ef,Ef.data.of({autocomplete:R5}))}const ioe=Object.freeze(Object.defineProperty({__proto__:null,css:$5,cssCompletionSource:R5,cssLanguage:Ef,defineCSSCompletionSource:A5},Symbol.toStringTag,{value:"Module"})),_h=["_blank","_self","_top","_parent"],sx=["ascii","utf-8","utf-16","latin1","latin1"],ox=["get","post","put","delete"],ax=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],Oi=["true","false"],Qe={},roe={a:{attrs:{href:null,ping:null,type:null,media:null,target:_h,hreflang:null}},abbr:Qe,address:Qe,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:Qe,aside:Qe,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:Qe,base:{attrs:{href:null,target:_h}},bdi:Qe,bdo:Qe,blockquote:{attrs:{cite:null}},body:Qe,br:Qe,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ax,formmethod:ox,formnovalidate:["novalidate"],formtarget:_h,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:Qe,center:Qe,cite:Qe,code:Qe,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:Qe,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:Qe,div:Qe,dl:Qe,dt:Qe,em:Qe,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:Qe,figure:Qe,footer:Qe,form:{attrs:{action:null,name:null,"accept-charset":sx,autocomplete:["on","off"],enctype:ax,method:ox,novalidate:["novalidate"],target:_h}},h1:Qe,h2:Qe,h3:Qe,h4:Qe,h5:Qe,h6:Qe,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:Qe,hgroup:Qe,hr:Qe,html:{attrs:{manifest:null}},i:Qe,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ax,formmethod:ox,formnovalidate:["novalidate"],formtarget:_h,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:Qe,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:Qe,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:Qe,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:sx,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:Qe,noscript:Qe,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:Qe,param:{attrs:{name:null,value:null}},pre:Qe,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:Qe,rt:Qe,ruby:Qe,samp:Qe,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:sx}},section:Qe,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:Qe,source:{attrs:{src:null,type:null,media:null}},span:Qe,strong:Qe,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:Qe,summary:Qe,sup:Qe,table:Qe,tbody:Qe,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:Qe,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:Qe,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:Qe,time:{attrs:{datetime:null}},title:Qe,tr:Qe,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:Qe,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:Qe},L5={accesskey:null,class:null,contenteditable:Oi,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:Oi,autocorrect:Oi,autocapitalize:Oi,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":Oi,"aria-autocomplete":["inline","list","both","none"],"aria-busy":Oi,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":Oi,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":Oi,"aria-hidden":Oi,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":Oi,"aria-multiselectable":Oi,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":Oi,"aria-relevant":null,"aria-required":Oi,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},M5="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(t=>"on"+t);for(let t of M5)L5[t]=null;class Af{constructor(e,n){this.tags={...roe,...e},this.globalAttrs={...L5,...n},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}}Af.default=new Af;function Hc(t,e,n=t.length){if(!e)return"";let i=e.firstChild,r=i&&i.getChild("TagName");return r?t.sliceString(r.from,Math.min(r.to,n)):""}function Fc(t,e=!1){for(;t;t=t.parent)if(t.name=="Element")if(e)e=!1;else return t;return null}function D5(t,e,n){let i=n.tags[Hc(t,Fc(e))];return(i==null?void 0:i.children)||n.allTags}function o_(t,e){let n=[];for(let i=Fc(e);i&&!i.type.isTop;i=Fc(i.parent)){let r=Hc(t,i);if(r&&i.lastChild.name=="CloseTag")break;r&&n.indexOf(r)<0&&(e.name=="EndTag"||e.from>=i.firstChild.to)&&n.push(r)}return n}const j5=/^[:\-\.\w\u00b7-\uffff]*$/;function YA(t,e,n,i,r){let s=/\s*>/.test(t.sliceDoc(r,r+5))?"":">",o=Fc(n,n.name=="StartTag"||n.name=="TagName");return{from:i,to:r,options:D5(t.doc,o,e).map(l=>({label:l,type:"type"})).concat(o_(t.doc,n).map((l,c)=>({label:"/"+l,apply:"/"+l+s,type:"type",boost:99-c}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function GA(t,e,n,i){let r=/\s*>/.test(t.sliceDoc(i,i+5))?"":">";return{from:n,to:i,options:o_(t.doc,e).map((s,o)=>({label:s,apply:s+r,type:"type",boost:99-o})),validFor:j5}}function soe(t,e,n,i){let r=[],s=0;for(let o of D5(t.doc,n,e))r.push({label:"<"+o,type:"type"});for(let o of o_(t.doc,n))r.push({label:"</"+o+">",type:"type",boost:99-s++});return{from:i,to:i,options:r,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function ooe(t,e,n,i,r){let s=Fc(n),o=s?e.tags[Hc(t.doc,s)]:null,l=o&&o.attrs?Object.keys(o.attrs):[],c=o&&o.globalAttrs===!1?l:l.length?l.concat(e.globalAttrNames):e.globalAttrNames;return{from:i,to:r,options:c.map(h=>({label:h,type:"property"})),validFor:j5}}function aoe(t,e,n,i,r){var s;let o=(s=n.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),l=[],c;if(o){let h=t.sliceDoc(o.from,o.to),d=e.globalAttrs[h];if(!d){let p=Fc(n),g=p?e.tags[Hc(t.doc,p)]:null;d=(g==null?void 0:g.attrs)&&g.attrs[h]}if(d){let p=t.sliceDoc(i,r).toLowerCase(),g='"',O='"';/^['"]/.test(p)?(c=p[0]=='"'?/^[^"]*$/:/^[^']*$/,g="",O=t.sliceDoc(r,r+1)==p[0]?"":p[0],p=p.slice(1),i++):c=/^[^\s<>='"]*$/;for(let x of d)l.push({label:x,apply:g+x+O,type:"constant"})}}return{from:i,to:r,options:l,validFor:c}}function N5(t,e){let{state:n,pos:i}=e,r=pt(n).resolveInner(i,-1),s=r.resolve(i);for(let o=i,l;s==r&&(l=r.childBefore(o));){let c=l.lastChild;if(!c||!c.type.isError||c.from<c.to)break;s=r=l,o=c.from}return r.name=="TagName"?r.parent&&/CloseTag$/.test(r.parent.name)?GA(n,r,r.from,i):YA(n,t,r,r.from,i):r.name=="StartTag"||r.name=="IncompleteTag"?YA(n,t,r,i,i):r.name=="StartCloseTag"||r.name=="IncompleteCloseTag"?GA(n,r,i,i):r.name=="OpenTag"||r.name=="SelfClosingTag"||r.name=="AttributeName"?ooe(n,t,r,r.name=="AttributeName"?r.from:i,i):r.name=="Is"||r.name=="AttributeValue"||r.name=="UnquotedAttributeValue"?aoe(n,t,r,r.name=="Is"?i:r.from,i):e.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?soe(n,t,r,i):null}function z5(t){return N5(Af.default,t)}function I5(t){let{extraTags:e,extraGlobalAttributes:n}=t,i=n||e?new Af(e,n):Af.default;return r=>N5(i,r)}const loe=Wi.parser.configure({top:"SingleExpression"}),X5=[{tag:"script",attrs:t=>t.type=="text/typescript"||t.lang=="ts",parser:WS.parser},{tag:"script",attrs:t=>t.type=="text/babel"||t.type=="text/jsx",parser:HS.parser},{tag:"script",attrs:t=>t.type=="text/typescript-jsx",parser:FS.parser},{tag:"script",attrs(t){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(t.type)},parser:loe},{tag:"script",attrs(t){return!t.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(t.type)},parser:Wi.parser},{tag:"style",attrs(t){return(!t.lang||t.lang=="css")&&(!t.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(t.type))},parser:Ef.parser}],V5=[{name:"style",parser:Ef.parser.configure({top:"Styles"})}].concat(M5.map(t=>({name:t,parser:Wi.parser}))),B5=Ds.define({name:"html",parser:_se.configure({props:[Ho.add({Element(t){let e=/^(\s*)(<\/)?/.exec(t.textAfter);return t.node.to<=t.pos+e[0].length?t.continue():t.lineIndent(t.node.from)+(e[2]?0:t.unit)},"OpenTag CloseTag SelfClosingTag"(t){return t.column(t.node.from)+t.unit},Document(t){if(t.pos+/\s*/.exec(t.textAfter)[0].length<t.node.to)return t.continue();let e=null,n;for(let i=t.node;;){let r=i.lastChild;if(!r||r.name!="Element"||r.to!=i.to)break;e=i=r}return e&&!((n=e.lastChild)&&(n.name=="CloseTag"||n.name=="SelfClosingTag"))?t.lineIndent(e.from)+t.unit:null}}),Fo.add({Element(t){let e=t.firstChild,n=t.lastChild;return!e||e.name!="OpenTag"?null:{from:e.to,to:n.name=="CloseTag"?n.from:t.to}}}),jD.add({"OpenTag CloseTag":t=>t.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),Wh=B5.configure({wrap:w5(X5,V5)});function Z5(t={}){let e="",n;t.matchClosingTags===!1&&(e="noMatch"),t.selfClosingTags===!0&&(e=(e?e+" ":"")+"selfClosing"),(t.nestedLanguages&&t.nestedLanguages.length||t.nestedAttributes&&t.nestedAttributes.length)&&(n=w5((t.nestedLanguages||[]).concat(X5),(t.nestedAttributes||[]).concat(V5)));let i=n?B5.configure({wrap:n,dialect:e}):e?Wh.configure({dialect:e}):Wh;return new Xr(i,[Wh.data.of({autocomplete:I5(t)}),t.autoCloseTags!==!1?q5:[],wg().support,$5().support])}const WA=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),q5=ye.inputHandler.of((t,e,n,i,r)=>{if(t.composing||t.state.readOnly||e!=n||i!=">"&&i!="/"||!Wh.isActiveAt(t.state,e,-1))return!1;let s=r(),{state:o}=s,l=o.changeByRange(c=>{var h,d,p;let g=o.doc.sliceString(c.from-1,c.to)==i,{head:O}=c,x=pt(o).resolveInner(O,-1),S;if(g&&i==">"&&x.name=="EndTag"){let _=x.parent;if(((d=(h=_.parent)===null||h===void 0?void 0:h.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(S=Hc(o.doc,_.parent,O))&&!WA.has(S)){let k=O+(o.doc.sliceString(O,O+1)===">"?1:0),P=`</${S}>`;return{range:c,changes:{from:O,to:k,insert:P}}}}else if(g&&i=="/"&&x.name=="IncompleteCloseTag"){let _=x.parent;if(x.from==O-2&&((p=_.lastChild)===null||p===void 0?void 0:p.name)!="CloseTag"&&(S=Hc(o.doc,_,O))&&!WA.has(S)){let k=O+(o.doc.sliceString(O,O+1)===">"?1:0),P=`${S}>`;return{range:ae.cursor(O+P.length,-1),changes:{from:O,to:k,insert:P}}}}return{range:c}});return l.changes.empty?!1:(t.dispatch([s,o.update(l,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),coe=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:q5,html:Z5,htmlCompletionSource:z5,htmlCompletionSourceWith:I5,htmlLanguage:Wh},Symbol.toStringTag,{value:"Module"})),U5=lO({commentTokens:{block:{open:"<!--",close:"-->"}}}),Y5=new Me,G5=wre.configure({props:[Fo.add(t=>!t.is("Block")||t.is("Document")||av(t)!=null||uoe(t)?void 0:(e,n)=>({from:n.doc.lineAt(e.from).to,to:e.to})),Y5.add(av),Ho.add({Document:()=>null}),Lo.add({Document:U5})]});function av(t){let e=/^(?:ATX|Setext)Heading(\d)$/.exec(t.name);return e?+e[1]:void 0}function uoe(t){return t.name=="OrderedList"||t.name=="BulletList"}function hoe(t,e){let n=t;for(;;){let i=n.nextSibling,r;if(!i||(r=av(i.type))!=null&&r<=e)break;n=i}return n.to}const foe=wD.of((t,e,n)=>{for(let i=pt(t).resolveInner(n,-1);i&&!(i.from<e);i=i.parent){let r=i.type.prop(Y5);if(r==null)continue;let s=hoe(i,r);if(s>n)return{from:n,to:s}}return null});function a_(t){return new _i(U5,t,[],"markdown")}const W5=a_(G5),doe=G5.configure([Dre,Nre,jre,zre,{props:[Fo.add({Table:(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}]),Kc=a_(doe);function poe(t,e){return n=>{if(n&&t){let i=null;if(n=/\S*/.exec(n)[0],typeof t=="function"?i=t(n):i=ee.matchLanguageName(t,n,!0),i instanceof ee)return i.support?i.support.language.parser:tl.getSkippingParser(i.load());if(i)return i.parser}return e?e.parser:null}}let lx=class{constructor(e,n,i,r,s,o,l){this.node=e,this.from=n,this.to=i,this.spaceBefore=r,this.spaceAfter=s,this.type=o,this.item=l}blank(e,n=!0){let i=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(e!=null){for(;i.length<e;)i+=" ";return i}else{for(let r=this.to-this.from-i.length-this.spaceAfter.length;r>0;r--)i+=" ";return i+(n?this.spaceAfter:"")}}marker(e,n){let i=this.node.name=="OrderedList"?String(+F5(this.item,e)[2]+n):"";return this.spaceBefore+i+this.type+this.spaceAfter}};function H5(t,e){let n=[],i=[];for(let r=t;r;r=r.parent){if(r.name=="FencedCode")return i;(r.name=="ListItem"||r.name=="Blockquote")&&n.push(r)}for(let r=n.length-1;r>=0;r--){let s=n[r],o,l=e.lineAt(s.from),c=s.from-l.from;if(s.name=="Blockquote"&&(o=/^ *>( ?)/.exec(l.text.slice(c))))i.push(new lx(s,c,c+o[0].length,"",o[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(o=/^( *)\d+([.)])( *)/.exec(l.text.slice(c)))){let h=o[3],d=o[0].length;h.length>=4&&(h=h.slice(0,h.length-4),d-=4),i.push(new lx(s.parent,c,c+d,o[1],h,o[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(o=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(l.text.slice(c)))){let h=o[4],d=o[0].length;h.length>4&&(h=h.slice(0,h.length-4),d-=4);let p=o[2];o[3]&&(p+=o[3].replace(/[xX]/," ")),i.push(new lx(s.parent,c,c+d,o[1],h,p,s))}}return i}function F5(t,e){return/^(\s*)(\d+)(?=[.)])/.exec(e.sliceString(t.from,t.from+10))}function cx(t,e,n,i=0){for(let r=-1,s=t;;){if(s.name=="ListItem"){let l=F5(s,e),c=+l[2];if(r>=0){if(c!=r+1)return;n.push({from:s.from+l[1].length,to:s.from+l[0].length,insert:String(r+2+i)})}r=c}let o=s.nextSibling;if(!o)break;s=o}}function l_(t,e){let n=/^[ \t]*/.exec(t)[0].length;if(!n||e.facet(uu)!=" ")return t;let i=hr(t,4,n),r="";for(let s=i;s>0;)s>=4?(r+=" ",s-=4):(r+=" ",s--);return r+t.slice(n)}const K5=(t={})=>({state:e,dispatch:n})=>{let i=pt(e),{doc:r}=e,s=null,o=e.changeByRange(l=>{if(!l.empty||!Kc.isActiveAt(e,l.from,-1)&&!Kc.isActiveAt(e,l.from,1))return s={range:l};let c=l.from,h=r.lineAt(c),d=H5(i.resolveInner(c,-1),r);for(;d.length&&d[d.length-1].from>c-h.from;)d.pop();if(!d.length)return s={range:l};let p=d[d.length-1];if(p.to-p.spaceAfter.length>c-h.from)return s={range:l};let g=c>=p.to-p.spaceAfter.length&&!/\S/.test(h.text.slice(p.to));if(p.item&&g){let k=p.node.firstChild,P=p.node.getChild("ListItem","ListItem");if(k.to>=c||P&&P.to<c||h.from>0&&!/[^\s>]/.test(r.lineAt(h.from-1).text)||t.nonTightLists===!1){let Q=d.length>1?d[d.length-2]:null,R,$="";Q&&Q.item?(R=h.from+Q.from,$=Q.marker(r,1)):R=h.from+(Q?Q.to:0);let C=[{from:R,to:c,insert:$}];return p.node.name=="OrderedList"&&cx(p.item,r,C,-2),Q&&Q.node.name=="OrderedList"&&cx(Q.item,r,C),{range:ae.cursor(R+$.length),changes:C}}else{let Q=FA(d,e,h);return{range:ae.cursor(c+Q.length+1),changes:{from:h.from,insert:Q+e.lineBreak}}}}if(p.node.name=="Blockquote"&&g&&h.from){let k=r.lineAt(h.from-1),P=/>\s*$/.exec(k.text);if(P&&P.index==p.from){let Q=e.changes([{from:k.from+P.index,to:k.to},{from:h.from+p.from,to:h.to}]);return{range:l.map(Q),changes:Q}}}let O=[];p.node.name=="OrderedList"&&cx(p.item,r,O);let x=p.item&&p.item.from<h.from,S="";if(!x||/^[\s\d.)\-+*>]*/.exec(h.text)[0].length>=p.to)for(let k=0,P=d.length-1;k<=P;k++)S+=k==P&&!x?d[k].marker(r,1):d[k].blank(k<P?hr(h.text,4,d[k+1].from)-S.length:null);let _=c;for(;_>h.from&&/\s/.test(h.text.charAt(_-h.from-1));)_--;return S=l_(S,e),moe(p.node,e.doc)&&(S=FA(d,e,h)+e.lineBreak+S),O.push({from:_,to:c,insert:e.lineBreak+S}),{range:ae.cursor(_+S.length+1),changes:O}});return s?!1:(n(e.update(o,{scrollIntoView:!0,userEvent:"input"})),!0)},J5=K5();function HA(t){return t.name=="QuoteMark"||t.name=="ListMark"}function moe(t,e){if(t.name!="OrderedList"&&t.name!="BulletList")return!1;let n=t.firstChild,i=t.getChild("ListItem","ListItem");if(!i)return!1;let r=e.lineAt(n.to),s=e.lineAt(i.from),o=/^[\s>]*$/.test(r.text);return r.number+(o?0:1)<s.number}function FA(t,e,n){let i="";for(let r=0,s=t.length-2;r<=s;r++)i+=t[r].blank(r<s?hr(n.text,4,t[r+1].from)-i.length:null,r<s);return l_(i,e)}function goe(t,e){let n=t.resolveInner(e,-1),i=e;HA(n)&&(i=n.from,n=n.parent);for(let r;r=n.childBefore(i);)if(HA(r))i=r.from;else if(r.name=="OrderedList"||r.name=="BulletList")n=r.lastChild,i=n.to;else break;return n}const eN=({state:t,dispatch:e})=>{let n=pt(t),i=null,r=t.changeByRange(s=>{let o=s.from,{doc:l}=t;if(s.empty&&Kc.isActiveAt(t,s.from)){let c=l.lineAt(o),h=H5(goe(n,o),l);if(h.length){let d=h[h.length-1],p=d.to-d.spaceAfter.length+(d.spaceAfter?1:0);if(o-c.from>p&&!/\S/.test(c.text.slice(p,o-c.from)))return{range:ae.cursor(c.from+p),changes:{from:c.from+p,to:o}};if(o-c.from==p&&(!d.item||c.from<=d.item.from||!/\S/.test(c.text.slice(0,d.to)))){let g=c.from+d.from;if(d.item&&d.node.from<d.item.from&&/\S/.test(c.text.slice(d.from,d.to))){let O=d.blank(hr(c.text,4,d.to)-hr(c.text,4,d.from));return g==c.from&&(O=l_(O,t)),{range:ae.cursor(g+O.length),changes:{from:g,to:c.from+d.to,insert:O}}}if(g<o)return{range:ae.cursor(g),changes:{from:g,to:o}}}}}return i={range:s}});return i?!1:(e(t.update(r,{scrollIntoView:!0,userEvent:"delete"})),!0)},tN=[{key:"Enter",run:J5},{key:"Backspace",run:eN}],nN=Z5({matchClosingTags:!1});function iN(t={}){let{codeLanguages:e,defaultCodeLanguage:n,addKeymap:i=!0,base:{parser:r}=W5,completeHTMLTags:s=!0,pasteURLAsLink:o=!0,htmlTagLanguage:l=nN}=t;if(!(r instanceof yO))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let c=t.extensions?[t.extensions]:[],h=[l.support,foe],d;o&&h.push(rN),n instanceof Xr?(h.push(n.support),d=n.language):n&&(d=n);let p=e||d?poe(e,d):void 0;c.push(Tre({codeParser:p,htmlParser:l.language.parser})),i&&h.push(Is.high(al.of(tN)));let g=a_(r.configure(c));return s&&h.push(g.data.of({autocomplete:Ooe})),new Xr(g,h)}function Ooe(t){let{state:e,pos:n}=t,i=/<[:\-\.\w\u00b7-\uffff]*$/.exec(e.sliceDoc(n-25,n));if(!i)return null;let r=pt(e).resolveInner(n,-1);for(;r&&!r.type.isTop;){if(r.name=="CodeBlock"||r.name=="FencedCode"||r.name=="ProcessingInstructionBlock"||r.name=="CommentBlock"||r.name=="Link"||r.name=="Image")return null;r=r.parent}return{from:n-i[0].length,to:n,options:yoe(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let ux=null;function yoe(){if(ux)return ux;let t=z5(new zS(Ue.create({extensions:nN}),0,!0));return ux=t?t.options:[]}const boe=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,rN=ye.domEventHandlers({paste:(t,e)=>{var n;let{main:i}=e.state.selection;if(i.empty)return!1;let r=(n=t.clipboardData)===null||n===void 0?void 0:n.getData("text/plain");if(!r||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(r)||(/^www\./.test(r)&&(r="https://"+r),!Kc.isActiveAt(e.state,i.from,1)))return!1;let s=pt(e.state),o=!1;return s.iterate({from:i.from,to:i.to,enter:l=>{(l.from>i.from||boe.test(l.name))&&(o=!0)},leave:l=>{l.to<i.to&&(o=!0)}}),o?!1:(e.dispatch({changes:[{from:i.from,insert:"["},{from:i.to,insert:`](${r})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),xoe=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:W5,deleteMarkupBackward:eN,insertNewlineContinueMarkup:J5,insertNewlineContinueMarkupCommand:K5,markdown:iN,markdownKeymap:tN,markdownLanguage:Kc,pasteURLAsLink:rN},Symbol.toStringTag,{value:"Module"})),ac=63,KA=64,voe=1,Soe=2,sN=3,_oe=4,oN=5,koe=6,woe=7,aN=65,Poe=66,Toe=8,Qoe=9,Coe=10,Eoe=11,Aoe=12,lN=13,Roe=19,$oe=20,Loe=29,Moe=33,Doe=34,joe=47,Noe=0,c_=1,lv=2,Rf=3,cv=4;class wa{constructor(e,n,i){this.parent=e,this.depth=n,this.type=i,this.hash=(e?e.hash+e.hash<<8:0)+n+(n<<4)+i}}wa.top=new wa(null,-1,Noe);function Hh(t,e){for(let n=0,i=e-t.pos-1;;i--,n++){let r=t.peek(i);if(Ns(r)||r==-1)return n}}function uv(t){return t==32||t==9}function Ns(t){return t==10||t==13}function cN(t){return uv(t)||Ns(t)}function Aa(t){return t<0||cN(t)}const zoe=new NS({start:wa.top,reduce(t,e){return t.type==Rf&&(e==$oe||e==Doe)?t.parent:t},shift(t,e,n,i){if(e==sN)return new wa(t,Hh(i,i.pos),c_);if(e==aN||e==oN)return new wa(t,Hh(i,i.pos),lv);if(e==ac)return t.parent;if(e==Roe||e==Moe)return new wa(t,0,Rf);if(e==lN&&t.type==cv)return t.parent;if(e==joe){let r=/[1-9]/.exec(i.read(i.pos,n.pos));if(r)return new wa(t,t.depth+ +r[0],cv)}return t},hash(t){return t.hash}});function Jc(t,e,n=0){return t.peek(n)==e&&t.peek(n+1)==e&&t.peek(n+2)==e&&Aa(t.peek(n+3))}const Ioe=new bn((t,e)=>{if(t.next==-1&&e.canShift(KA))return t.acceptToken(KA);let n=t.peek(-1);if((Ns(n)||n<0)&&e.context.type!=Rf){if(Jc(t,45))if(e.canShift(ac))t.acceptToken(ac);else return t.acceptToken(voe,3);if(Jc(t,46))if(e.canShift(ac))t.acceptToken(ac);else return t.acceptToken(Soe,3);let i=0;for(;t.next==32;)i++,t.advance();(i<e.context.depth||i==e.context.depth&&e.context.type==c_&&(t.next!=45||!Aa(t.peek(1))))&&t.next!=-1&&!Ns(t.next)&&t.next!=35&&t.acceptToken(ac,-i)}},{contextual:!0}),Xoe=new bn((t,e)=>{if(e.context.type==Rf){t.next==63&&(t.advance(),Aa(t.next)&&t.acceptToken(woe));return}if(t.next==45)t.advance(),Aa(t.next)&&t.acceptToken(e.context.type==c_&&e.context.depth==Hh(t,t.pos-1)?_oe:sN);else if(t.next==63)t.advance(),Aa(t.next)&&t.acceptToken(e.context.type==lv&&e.context.depth==Hh(t,t.pos-1)?koe:oN);else{let n=t.pos;for(;;)if(uv(t.next)){if(t.pos==n)return;t.advance()}else if(t.next==33)uN(t);else if(t.next==38)hv(t);else if(t.next==42){hv(t);break}else if(t.next==39||t.next==34){if(u_(t,!0))break;return}else if(t.next==91||t.next==123){if(!Boe(t))return;break}else{hN(t,!0,!1,0);break}for(;uv(t.next);)t.advance();if(t.next==58){if(t.pos==n&&e.canShift(Loe))return;let i=t.peek(1);Aa(i)&&t.acceptTokenTo(e.context.type==lv&&e.context.depth==Hh(t,n)?Poe:aN,n)}}},{contextual:!0});function Voe(t){return t>32&&t<127&&t!=34&&t!=37&&t!=44&&t!=60&&t!=62&&t!=92&&t!=94&&t!=96&&t!=123&&t!=124&&t!=125}function JA(t){return t>=48&&t<=57||t>=97&&t<=102||t>=65&&t<=70}function e2(t,e){return t.next==37?(t.advance(),JA(t.next)&&t.advance(),JA(t.next)&&t.advance(),!0):Voe(t.next)||e&&t.next==44?(t.advance(),!0):!1}function uN(t){if(t.advance(),t.next==60){for(t.advance();;)if(!e2(t,!0)){t.next==62&&t.advance();break}}else for(;e2(t,!1););}function hv(t){for(t.advance();!Aa(t.next)&&Cg(t.tag)!="f";)t.advance()}function u_(t,e){let n=t.next,i=!1,r=t.pos;for(t.advance();;){let s=t.next;if(s<0)break;if(t.advance(),s==n)if(s==39)if(t.next==39)t.advance();else break;else break;else if(s==92&&n==34)t.next>=0&&t.advance();else if(Ns(s)){if(e)return!1;i=!0}else if(e&&t.pos>=r+1024)return!1}return!i}function Boe(t){for(let e=[],n=t.pos+1024;;)if(t.next==91||t.next==123)e.push(t.next),t.advance();else if(t.next==39||t.next==34){if(!u_(t,!0))return!1}else if(t.next==93||t.next==125){if(e[e.length-1]!=t.next-2)return!1;if(e.pop(),t.advance(),!e.length)return!0}else{if(t.next<0||t.pos>n||Ns(t.next))return!1;t.advance()}}const Zoe="iiisiiissisfissssssssssssisssiiissssssssssssssssssssssssssfsfssissssssssssssssssssssssssssfif";function Cg(t){return t<33?"u":t>125?"s":Zoe[t-33]}function hx(t,e){let n=Cg(t);return n!="u"&&!(e&&n=="f")}function hN(t,e,n,i){if(Cg(t.next)=="s"||(t.next==63||t.next==58||t.next==45)&&hx(t.peek(1),n))t.advance();else return!1;let r=t.pos;for(;;){let s=t.next,o=0,l=i+1;for(;cN(s);){if(Ns(s)){if(e)return!1;l=0}else l++;s=t.peek(++o)}if(!(s>=0&&(s==58?hx(t.peek(o+1),n):s==35?t.peek(o-1)!=32:hx(s,n)))||!n&&l<=i||l==0&&!n&&(Jc(t,45,o)||Jc(t,46,o)))break;if(e&&Cg(s)=="f")return!1;for(let h=o;h>=0;h--)t.advance();if(e&&t.pos>r+1024)return!1}return!0}const qoe=new bn((t,e)=>{if(t.next==33)uN(t),t.acceptToken(Aoe);else if(t.next==38||t.next==42){let n=t.next==38?Coe:Eoe;hv(t),t.acceptToken(n)}else t.next==39||t.next==34?(u_(t,!1),t.acceptToken(Qoe)):hN(t,!1,e.context.type==Rf,e.context.depth)&&t.acceptToken(Toe)}),Uoe=new bn((t,e)=>{let n=e.context.type==cv?e.context.depth:-1,i=t.pos;e:for(;;){let r=0,s=t.next;for(;s==32;)s=t.peek(++r);if(!r&&(Jc(t,45,r)||Jc(t,46,r))||!Ns(s)&&(n<0&&(n=Math.max(e.context.depth+1,r)),r<n))break;for(;;){if(t.next<0)break e;let o=Ns(t.next);if(t.advance(),o)continue e;i=t.pos}}t.acceptTokenTo(lN,i)}),Yoe=Xs({DirectiveName:A.keyword,DirectiveContent:A.attributeValue,"DirectiveEnd DocEnd":A.meta,QuotedLiteral:A.string,BlockLiteralHeader:A.special(A.string),BlockLiteralContent:A.content,Literal:A.content,"Key/Literal Key/QuotedLiteral":A.definition(A.propertyName),"Anchor Alias":A.labelName,Tag:A.typeName,Comment:A.lineComment,": , -":A.separator,"?":A.punctuation,"[ ]":A.squareBracket,"{ }":A.brace}),Goe=js.deserialize({version:14,states:"5lQ!ZQgOOO#PQfO'#CpO#uQfO'#DOOOQR'#Dv'#DvO$qQgO'#DRO%gQdO'#DUO%nQgO'#DUO&ROaO'#D[OOQR'#Du'#DuO&{QgO'#D^O'rQgO'#D`OOQR'#Dt'#DtO(iOqO'#DbOOQP'#Dj'#DjO(zQaO'#CmO)YQgO'#CmOOQP'#Cm'#CmQ)jQaOOQ)uQgOOQ]QgOOO*PQdO'#CrO*nQdO'#CtOOQO'#Dw'#DwO+]Q`O'#CxO+hQdO'#CwO+rQ`O'#CwOOQO'#Cv'#CvO+wQdO'#CvOOQO'#Cq'#CqO,UQ`O,59[O,^QfO,59[OOQR,59[,59[OOQO'#Cx'#CxO,eQ`O'#DPO,pQdO'#DPOOQO'#Dx'#DxO,zQdO'#DxO-XQ`O,59jO-aQfO,59jOOQR,59j,59jOOQR'#DS'#DSO-hQcO,59mO-sQgO'#DVO.TQ`O'#DVO.YQcO,59pOOQR'#DX'#DXO#|QfO'#DWO.h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eQnPR!rnQvQR!{vQ!}yR#u!}Q#T|R#}#TW^Obc!cS!^^!aT!aa!eQ!eaR#f!eW`Obc!cQxSS}U#SQ!`_Q#PzQ#V!OQ#b!_Q#d!bQ#s!|Q#w#QQ$P#WQ$V#cQ$Y#xQ$[#{Q$a$ZR$b$]xZOSU_bcz!O!_!b!c!|#Q#S#W#c#x#{$Z$]Q!VXQ!XYQ#[!UR#]!W!QWOSUXY_bcz!O!U!W!_!b!c!|#Q#S#W#c#x#{$Z$]pfPQThknrtv!k!l!s!u#R#k#pQ!gdQ!ieQ#g!fR#h!hSgPn^pQTkrtv#RQ!jhQ#i!kQ#j!lQ#n!sQ#o!uQ$W#kR$X#pQuQR!zv",nodeNames:"⚠ DirectiveEnd DocEnd - - ? ? ? Literal QuotedLiteral Anchor Alias Tag BlockLiteralContent Comment Stream BOM Document ] [ FlowSequence Item Tagged Anchored Anchored Tagged FlowMapping Pair Key : Pair , } { FlowMapping Pair Pair BlockSequence Item Item BlockMapping Pair Pair Key Pair Pair BlockLiteral BlockLiteralHeader Tagged Anchored Anchored Tagged Directive DirectiveName DirectiveContent Document",maxTerm:74,context:zoe,nodeProps:[["isolate",-3,8,9,14,""],["openedBy",18,"[",32,"{"],["closedBy",19,"]",33,"}"]],propSources:[Yoe],skippedNodes:[0],repeatNodeCount:6,tokenData:"-Y~RnOX#PXY$QYZ$]Z]#P]^$]^p#Ppq$Qqs#Pst$btu#Puv$yv|#P|}&e}![#P![!]'O!]!`#P!`!a'i!a!}#P!}#O*g#O#P#P#P#Q+Q#Q#o#P#o#p+k#p#q'i#q#r,U#r;'S#P;'S;=`#z<%l?HT#P?HT?HU,o?HUO#PQ#UU!WQOY#PZp#Ppq#hq;'S#P;'S;=`#z<%lO#PQ#kTOY#PZs#Pt;'S#P;'S;=`#z<%lO#PQ#}P;=`<%l#P~$VQ!f~XY$Qpq$Q~$bO!g~~$gS^~OY$bZ;'S$b;'S;=`$s<%lO$b~$vP;=`<%l$bR%OX!WQOX%kX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enData:"$z~RXOYnYZ!^Z]n]^!^^}n}!O!i!O;'Sn;'S;=`!c<%lOn~qXOYnYZ!^Z]n]^!^^;'Sn;'S;=`!c<%l~n~On~~!^~!cOY~~!fP;=`<%ln~!lZOYnYZ!^Z]n]^!^^}n}!O#_!O;'Sn;'S;=`!c<%l~n~On~~!^~#bZOYnYZ!^Z]n]^!^^}n}!O$T!O;'Sn;'S;=`!c<%l~n~On~~!^~$WXOYnYZ$sZ]n]^$s^;'Sn;'S;=`!c<%l~n~On~~$s~$zOX~Y~",tokenizers:[0],topRules:{Document:[0,1]},tokenPrec:67}),h_=Ds.define({name:"yaml",parser:Goe.configure({props:[Ho.add({Stream:t=>{for(let e=t.node.resolve(t.pos,-1);e&&e.to>=t.pos;e=e.parent){if(e.name=="BlockLiteralContent"&&e.from<e.to)return t.baseIndentFor(e);if(e.name=="BlockLiteral")return t.baseIndentFor(e)+t.unit;if(e.name=="BlockSequence"||e.name=="BlockMapping")return t.column(e.from,1);if(e.name=="QuotedLiteral")return null;if(e.name=="Literal"){let n=t.column(e.from,1);if(n==t.lineIndent(e.from,1))return n;if(e.to>t.pos)return null}}return null},FlowMapping:q1({closing:"}"}),FlowSequence:q1({closing:"]"})}),Fo.add({"FlowMapping FlowSequence":uO,"Item Pair BlockLiteral":(t,e)=>({from:e.doc.lineAt(t.from).to,to:t.to})})]}),languageData:{commentTokens:{line:"#"},indentOnInput:/^\s*[\]\}]$/}});function fN(){return new Xr(h_)}const Hoe=Ds.define({name:"yaml-frontmatter",parser:Woe.configure({props:[Xs({DashLine:A.meta})]})});function Foe(t){let{language:e,support:n}=t.content instanceof Xr?t.content:{language:t.content,support:[]};return new Xr(Hoe.configure({wrap:dS(i=>i.name=="FrontmatterContent"?{parser:h_.parser}:i.name=="Body"?{parser:e.parser}:null)}),n)}const Koe=Object.freeze(Object.defineProperty({__proto__:null,yaml:fN,yamlFrontmatter:Foe,yamlLanguage:h_},Symbol.toStringTag,{value:"Module"}));function fe(t){return new Xr(RS.define(t))}function Oo(t){return T(()=>import("./index-C1ZWbsTE.js"),[]).then(e=>e.sql({dialect:e[t]}))}const Joe=[ee.of({name:"C",extensions:["c","h","ino"],load(){return T(()=>import("./index-B1Pbmlq1.js"),[]).then(t=>t.cpp())}}),ee.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return T(()=>import("./index-B1Pbmlq1.js"),[]).then(t=>t.cpp())}}),ee.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Oo("Cassandra")}}),ee.of({name:"CSS",extensions:["css"],load(){return T(()=>Promise.resolve().then(()=>ioe),void 0).then(t=>t.css())}}),ee.of({name:"Go",extensions:["go"],load(){return T(()=>import("./index-CMpv9Zgd.js"),[]).then(t=>t.go())}}),ee.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return T(()=>Promise.resolve().then(()=>coe),void 0).then(t=>t.html())}}),ee.of({name:"Java",extensions:["java"],load(){return T(()=>import("./index-Cf3kY1TW.js"),[]).then(t=>t.java())}}),ee.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return T(()=>Promise.resolve().then(()=>rm),void 0).then(t=>t.javascript())}}),ee.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return T(()=>import("./index-Jxq7Nimo.js"),[]).then(t=>t.jinja())}}),ee.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return T(()=>Promise.resolve().then(()=>dre),void 0).then(t=>t.json())}}),ee.of({name:"JSX",extensions:["jsx"],load(){return T(()=>Promise.resolve().then(()=>rm),void 0).then(t=>t.javascript({jsx:!0}))}}),ee.of({name:"LESS",extensions:["less"],load(){return T(()=>import("./index-DnE6Hes-.js"),[]).then(t=>t.less())}}),ee.of({name:"Liquid",extensions:["liquid"],load(){return T(()=>import("./index-D1xpv80x.js"),[]).then(t=>t.liquid())}}),ee.of({name:"MariaDB SQL",load(){return Oo("MariaSQL")}}),ee.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return T(()=>Promise.resolve().then(()=>xoe),void 0).then(t=>t.markdown())}}),ee.of({name:"MS SQL",load(){return Oo("MSSQL")}}),ee.of({name:"MySQL",load(){return Oo("MySQL")}}),ee.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return T(()=>import("./index-BwOHH22o.js"),[]).then(t=>t.php())}}),ee.of({name:"PLSQL",extensions:["pls"],load(){return Oo("PLSQL")}}),ee.of({name:"PostgreSQL",load(){return Oo("PostgreSQL")}}),ee.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return T(()=>import("./index-BoKKKtDW.js"),[]).then(t=>t.python())}}),ee.of({name:"Rust",extensions:["rs"],load(){return T(()=>import("./index-Cw6xDarC.js"),[]).then(t=>t.rust())}}),ee.of({name:"Sass",extensions:["sass"],load(){return T(()=>import("./index-kAClYiaR.js"),[]).then(t=>t.sass({indented:!0}))}}),ee.of({name:"SCSS",extensions:["scss"],load(){return T(()=>import("./index-kAClYiaR.js"),[]).then(t=>t.sass())}}),ee.of({name:"SQL",extensions:["sql"],load(){return Oo("StandardSQL")}}),ee.of({name:"SQLite",load(){return Oo("SQLite")}}),ee.of({name:"TSX",extensions:["tsx"],load(){return T(()=>Promise.resolve().then(()=>rm),void 0).then(t=>t.javascript({jsx:!0,typescript:!0}))}}),ee.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return T(()=>Promise.resolve().then(()=>rm),void 0).then(t=>t.javascript({typescript:!0}))}}),ee.of({name:"WebAssembly",extensions:["wat","wast"],load(){return T(()=>import("./index-XqFPYUCT.js"),[]).then(t=>t.wast())}}),ee.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return T(()=>import("./index-DCT_KW6c.js"),[]).then(t=>t.xml())}}),ee.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return T(()=>Promise.resolve().then(()=>Koe),void 0).then(t=>t.yaml())}}),ee.of({name:"APL",extensions:["dyalog","apl"],load(){return T(()=>import("./apl-B4CMkyY2.js"),[]).then(t=>fe(t.apl))}}),ee.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return T(()=>import("./asciiarmor-Df11BRmG.js"),[]).then(t=>fe(t.asciiArmor))}}),ee.of({name:"ASN.1",extensions:["asn","asn1"],load(){return T(()=>import("./asn1-EdZsLKOL.js"),[]).then(t=>fe(t.asn1({})))}}),ee.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return T(()=>import("./asterisk-B-8jnY81.js"),[]).then(t=>fe(t.asterisk))}}),ee.of({name:"Brainfuck",extensions:["b","bf"],load(){return T(()=>import("./brainfuck-C4LP7Hcl.js"),[]).then(t=>fe(t.brainfuck))}}),ee.of({name:"Cobol",extensions:["cob","cpy"],load(){return T(()=>import("./cobol-CWcv1MsR.js"),[]).then(t=>fe(t.cobol))}}),ee.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.csharp))}}),ee.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return T(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>fe(t.clojure))}}),ee.of({name:"ClojureScript",extensions:["cljs"],load(){return T(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>fe(t.clojure))}}),ee.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return T(()=>import("./css-BnMrqG3P.js"),[]).then(t=>fe(t.gss))}}),ee.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return T(()=>import("./cmake-BQqOBYOt.js"),[]).then(t=>fe(t.cmake))}}),ee.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return T(()=>import("./coffeescript-S37ZYGWr.js"),[]).then(t=>fe(t.coffeeScript))}}),ee.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return T(()=>import("./commonlisp-DBKNyK5s.js"),[]).then(t=>fe(t.commonLisp))}}),ee.of({name:"Cypher",extensions:["cyp","cypher"],load(){return T(()=>import("./cypher-C_CwsFkJ.js"),[]).then(t=>fe(t.cypher))}}),ee.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return T(()=>import("./python-BuPzkPfP.js"),[]).then(t=>fe(t.cython))}}),ee.of({name:"Crystal",extensions:["cr"],load(){return T(()=>import("./crystal-SjHAIU92.js"),[]).then(t=>fe(t.crystal))}}),ee.of({name:"D",extensions:["d"],load(){return T(()=>import("./d-pRatUO7H.js"),[]).then(t=>fe(t.d))}}),ee.of({name:"Dart",extensions:["dart"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.dart))}}),ee.of({name:"diff",extensions:["diff","patch"],load(){return T(()=>import("./diff-DbItnlRl.js"),[]).then(t=>fe(t.diff))}}),ee.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return T(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([97,98])).then(t=>fe(t.dockerFile))}}),ee.of({name:"DTD",extensions:["dtd"],load(){return T(()=>import("./dtd-DF_7sFjM.js"),[]).then(t=>fe(t.dtd))}}),ee.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return T(()=>import("./dylan-DwRh75JA.js"),[]).then(t=>fe(t.dylan))}}),ee.of({name:"EBNF",load(){return T(()=>import("./ebnf-CDyGwa7X.js"),[]).then(t=>fe(t.ebnf))}}),ee.of({name:"ECL",extensions:["ecl"],load(){return T(()=>import("./ecl-Cabwm37j.js"),[]).then(t=>fe(t.ecl))}}),ee.of({name:"edn",extensions:["edn"],load(){return T(()=>import("./clojure-BMjYHr_A.js"),[]).then(t=>fe(t.clojure))}}),ee.of({name:"Eiffel",extensions:["e"],load(){return T(()=>import("./eiffel-CnydiIhH.js"),[]).then(t=>fe(t.eiffel))}}),ee.of({name:"Elm",extensions:["elm"],load(){return T(()=>import("./elm-vLlmbW-K.js"),[]).then(t=>fe(t.elm))}}),ee.of({name:"Erlang",extensions:["erl"],load(){return T(()=>import("./erlang-BNw1qcRV.js"),[]).then(t=>fe(t.erlang))}}),ee.of({name:"Esper",load(){return T(()=>import("./sql-D0XecflT.js"),[]).then(t=>fe(t.esper))}}),ee.of({name:"Factor",extensions:["factor"],load(){return T(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([99,98])).then(t=>fe(t.factor))}}),ee.of({name:"FCL",load(){return T(()=>import("./fcl-Kvtd6kyn.js"),[]).then(t=>fe(t.fcl))}}),ee.of({name:"Forth",extensions:["forth","fth","4th"],load(){return T(()=>import("./forth-Ffai-XNe.js"),[]).then(t=>fe(t.forth))}}),ee.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return T(()=>import("./fortran-DYz_wnZ1.js"),[]).then(t=>fe(t.fortran))}}),ee.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return T(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>fe(t.fSharp))}}),ee.of({name:"Gas",extensions:["s"],load(){return T(()=>import("./gas-Bneqetm1.js"),[]).then(t=>fe(t.gas))}}),ee.of({name:"Gherkin",extensions:["feature"],load(){return T(()=>import("./gherkin-heZmZLOM.js"),[]).then(t=>fe(t.gherkin))}}),ee.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return T(()=>import("./groovy-D9Dt4D0W.js"),[]).then(t=>fe(t.groovy))}}),ee.of({name:"Haskell",extensions:["hs"],load(){return T(()=>import("./haskell-Cw1EW3IL.js"),[]).then(t=>fe(t.haskell))}}),ee.of({name:"Haxe",extensions:["hx"],load(){return T(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>fe(t.haxe))}}),ee.of({name:"HXML",extensions:["hxml"],load(){return T(()=>import("./haxe-H-WmDvRZ.js"),[]).then(t=>fe(t.hxml))}}),ee.of({name:"HTTP",load(){return T(()=>import("./http-DBlCnlav.js"),[]).then(t=>fe(t.http))}}),ee.of({name:"IDL",extensions:["pro"],load(){return T(()=>import("./idl-BEugSyMb.js"),[]).then(t=>fe(t.idl))}}),ee.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return T(()=>import("./javascript-iXu5QeM3.js"),[]).then(t=>fe(t.jsonld))}}),ee.of({name:"Julia",extensions:["jl"],load(){return T(()=>import("./julia-DuME0IfC.js"),[]).then(t=>fe(t.julia))}}),ee.of({name:"Kotlin",extensions:["kt","kts"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.kotlin))}}),ee.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return T(()=>import("./livescript-BwQOo05w.js"),[]).then(t=>fe(t.liveScript))}}),ee.of({name:"Lua",extensions:["lua"],load(){return T(()=>import("./lua-BgMRiT3U.js"),[]).then(t=>fe(t.lua))}}),ee.of({name:"mIRC",extensions:["mrc"],load(){return T(()=>import("./mirc-CjQqDB4T.js"),[]).then(t=>fe(t.mirc))}}),ee.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return T(()=>import("./mathematica-DTrFuWx2.js"),[]).then(t=>fe(t.mathematica))}}),ee.of({name:"Modelica",extensions:["mo"],load(){return T(()=>import("./modelica-Dc1JOy9r.js"),[]).then(t=>fe(t.modelica))}}),ee.of({name:"MUMPS",extensions:["mps"],load(){return T(()=>import("./mumps-BT43cFF4.js"),[]).then(t=>fe(t.mumps))}}),ee.of({name:"Mbox",extensions:["mbox"],load(){return T(()=>import("./mbox-CNhZ1qSd.js"),[]).then(t=>fe(t.mbox))}}),ee.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return T(()=>import("./nginx-DdIZxoE0.js"),[]).then(t=>fe(t.nginx))}}),ee.of({name:"NSIS",extensions:["nsh","nsi"],load(){return T(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([100,98])).then(t=>fe(t.nsis))}}),ee.of({name:"NTriples",extensions:["nt","nq"],load(){return T(()=>import("./ntriples-BfvgReVJ.js"),[]).then(t=>fe(t.ntriples))}}),ee.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.objectiveC))}}),ee.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.objectiveCpp))}}),ee.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return T(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>fe(t.oCaml))}}),ee.of({name:"Octave",extensions:["m"],load(){return T(()=>import("./octave-Ck1zUtKM.js"),[]).then(t=>fe(t.octave))}}),ee.of({name:"Oz",extensions:["oz"],load(){return T(()=>import("./oz-BzwKVEFT.js"),[]).then(t=>fe(t.oz))}}),ee.of({name:"Pascal",extensions:["p","pas"],load(){return T(()=>import("./pascal--L3eBynH.js"),[]).then(t=>fe(t.pascal))}}),ee.of({name:"Perl",extensions:["pl","pm"],load(){return T(()=>import("./perl-CdXCOZ3F.js"),[]).then(t=>fe(t.perl))}}),ee.of({name:"Pig",extensions:["pig"],load(){return T(()=>import("./pig-CevX1Tat.js"),[]).then(t=>fe(t.pig))}}),ee.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return T(()=>import("./powershell-CFHJl5sT.js"),[]).then(t=>fe(t.powerShell))}}),ee.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return T(()=>import("./properties-C78fOPTZ.js"),[]).then(t=>fe(t.properties))}}),ee.of({name:"ProtoBuf",extensions:["proto"],load(){return T(()=>import("./protobuf-ChK-085T.js"),[]).then(t=>fe(t.protobuf))}}),ee.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return T(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([101,102])).then(t=>fe(t.pug))}}),ee.of({name:"Puppet",extensions:["pp"],load(){return T(()=>import("./puppet-DMA9R1ak.js"),[]).then(t=>fe(t.puppet))}}),ee.of({name:"Q",extensions:["q"],load(){return T(()=>import("./q-pXgVlZs6.js"),[]).then(t=>fe(t.q))}}),ee.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return T(()=>import("./r-B6wPVr8A.js"),[]).then(t=>fe(t.r))}}),ee.of({name:"RPM Changes",load(){return T(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>fe(t.rpmChanges))}}),ee.of({name:"RPM Spec",extensions:["spec"],load(){return T(()=>import("./rpm-CTu-6PCP.js"),[]).then(t=>fe(t.rpmSpec))}}),ee.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return T(()=>import("./ruby-B2Rjki9n.js"),[]).then(t=>fe(t.ruby))}}),ee.of({name:"SAS",extensions:["sas"],load(){return T(()=>import("./sas-B4kiWyti.js"),[]).then(t=>fe(t.sas))}}),ee.of({name:"Scala",extensions:["scala"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.scala))}}),ee.of({name:"Scheme",extensions:["scm","ss"],load(){return T(()=>import("./scheme-C41bIUwD.js"),[]).then(t=>fe(t.scheme))}}),ee.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return T(()=>import("./shell-CjFT_Tl9.js"),[]).then(t=>fe(t.shell))}}),ee.of({name:"Sieve",extensions:["siv","sieve"],load(){return T(()=>import("./sieve-C3Gn_uJK.js"),[]).then(t=>fe(t.sieve))}}),ee.of({name:"Smalltalk",extensions:["st"],load(){return T(()=>import("./smalltalk-CnHTOXQT.js"),[]).then(t=>fe(t.smalltalk))}}),ee.of({name:"Solr",load(){return T(()=>import("./solr-DehyRSwq.js"),[]).then(t=>fe(t.solr))}}),ee.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return T(()=>import("./mllike-CXdrOF99.js"),[]).then(t=>fe(t.sml))}}),ee.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return T(()=>import("./sparql-DkYu6x3z.js"),[]).then(t=>fe(t.sparql))}}),ee.of({name:"Spreadsheet",alias:["excel","formula"],load(){return T(()=>import("./spreadsheet-BCZA_wO0.js"),[]).then(t=>fe(t.spreadsheet))}}),ee.of({name:"Squirrel",extensions:["nut"],load(){return T(()=>import("./clike-B9uivgTg.js"),[]).then(t=>fe(t.squirrel))}}),ee.of({name:"Stylus",extensions:["styl"],load(){return T(()=>import("./stylus-B533Al4x.js"),[]).then(t=>fe(t.stylus))}}),ee.of({name:"Swift",extensions:["swift"],load(){return T(()=>import("./swift-BzpIVaGY.js"),[]).then(t=>fe(t.swift))}}),ee.of({name:"sTeX",load(){return T(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>fe(t.stex))}}),ee.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return T(()=>import("./stex-C3f8Ysf7.js"),[]).then(t=>fe(t.stex))}}),ee.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return T(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>fe(t.verilog))}}),ee.of({name:"Tcl",extensions:["tcl"],load(){return T(()=>import("./tcl-DVfN8rqt.js"),[]).then(t=>fe(t.tcl))}}),ee.of({name:"Textile",extensions:["textile"],load(){return T(()=>import("./textile-CnDTJFAw.js"),[]).then(t=>fe(t.textile))}}),ee.of({name:"TiddlyWiki",load(){return T(()=>import("./tiddlywiki-DO-Gjzrf.js"),[]).then(t=>fe(t.tiddlyWiki))}}),ee.of({name:"Tiki wiki",load(){return T(()=>import("./tiki-DGYXhP31.js"),[]).then(t=>fe(t.tiki))}}),ee.of({name:"TOML",extensions:["toml"],load(){return T(()=>import("./toml-Bm5Em-hy.js"),[]).then(t=>fe(t.toml))}}),ee.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return T(()=>import("./troff-wAsdV37c.js"),[]).then(t=>fe(t.troff))}}),ee.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return T(()=>import("./ttcn-CfJYG6tj.js"),[]).then(t=>fe(t.ttcn))}}),ee.of({name:"TTCN_CFG",extensions:["cfg"],load(){return T(()=>import("./ttcn-cfg-B9xdYoR4.js"),[]).then(t=>fe(t.ttcnCfg))}}),ee.of({name:"Turtle",extensions:["ttl"],load(){return T(()=>import("./turtle-B1tBg_DP.js"),[]).then(t=>fe(t.turtle))}}),ee.of({name:"Web IDL",extensions:["webidl"],load(){return T(()=>import("./webidl-ZXfAyPTL.js"),[]).then(t=>fe(t.webIDL))}}),ee.of({name:"VB.NET",extensions:["vb"],load(){return T(()=>import("./vb-CmGdzxic.js"),[]).then(t=>fe(t.vb))}}),ee.of({name:"VBScript",extensions:["vbs"],load(){return T(()=>import("./vbscript-BuJXcnF6.js"),[]).then(t=>fe(t.vbScript))}}),ee.of({name:"Velocity",extensions:["vtl"],load(){return T(()=>import("./velocity-D8B20fx6.js"),[]).then(t=>fe(t.velocity))}}),ee.of({name:"Verilog",extensions:["v"],load(){return T(()=>import("./verilog-C6RDOZhf.js"),[]).then(t=>fe(t.verilog))}}),ee.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return T(()=>import("./vhdl-lSbBsy5d.js"),[]).then(t=>fe(t.vhdl))}}),ee.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return T(()=>import("./xquery-DzFWVndE.js"),[]).then(t=>fe(t.xQuery))}}),ee.of({name:"Yacas",extensions:["ys"],load(){return T(()=>import("./yacas-BJ4BC0dw.js"),[]).then(t=>fe(t.yacas))}}),ee.of({name:"Z80",extensions:["z80"],load(){return T(()=>import("./z80-Hz9HOZM7.js"),[]).then(t=>fe(t.z80))}}),ee.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return T(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>fe(t.mscgen))}}),ee.of({name:"Xù",extensions:["xu"],load(){return T(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>fe(t.xu))}}),ee.of({name:"MsGenny",extensions:["msgenny"],load(){return T(()=>import("./mscgen-BA5vi2Kp.js"),[]).then(t=>fe(t.msgenny))}}),ee.of({name:"Vue",extensions:["vue"],load(){return T(()=>import("./index-DOcNLUs5.js"),[]).then(t=>t.vue())}}),ee.of({name:"Angular Template",load(){return T(()=>import("./index-APzame2X.js"),[]).then(t=>t.angular())}})];function fv(){return fv=Object.assign?Object.assign.bind():function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var i in n)({}).hasOwnProperty.call(n,i)&&(t[i]=n[i])}return t},fv.apply(null,arguments)}function eae(t,e){if(t==null)return{};var n={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;n[i]=t[i]}return n}const t2=typeof String.prototype.normalize=="function"?t=>t.normalize("NFKD"):t=>t;class eu{constructor(e,n,i=0,r=e.length,s,o){this.test=o,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=e.iterRange(i,r),this.bufferStart=i,this.normalize=s?l=>s(t2(l)):t2,this.query=this.normalize(n)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return ei(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let e=this.peek();if(e<0)return this.done=!0,this;let n=pS(e),i=this.bufferStart+this.bufferPos;this.bufferPos+=$r(e);let r=this.normalize(n);if(r.length)for(let s=0,o=i;;s++){let l=r.charCodeAt(s),c=this.match(l,o,this.bufferPos+this.bufferStart);if(s==r.length-1){if(c)return this.value=c,this;break}o==i&&s<n.length&&n.charCodeAt(s)==l&&o++}}}match(e,n,i){let r=null;for(let s=0;s<this.matches.length;s+=2){let o=this.matches[s],l=!1;this.query.charCodeAt(o)==e&&(o==this.query.length-1?r={from:this.matches[s+1],to:i}:(this.matches[s]++,l=!0)),l||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==e&&(this.query.length==1?r={from:n,to:i}:this.matches.push(1,n)),r&&this.test&&!this.test(r.from,r.to,this.buffer,this.bufferStart)&&(r=null),r}}typeof Symbol<"u"&&(eu.prototype[Symbol.iterator]=function(){return this});const dN={from:-1,to:-1,match:/.*/.exec("")},f_="gm"+(/x/.unicode==null?"":"u");class pN{constructor(e,n,i,r=0,s=e.length){if(this.text=e,this.to=s,this.curLine="",this.done=!1,this.value=dN,/\\[sWDnr]|\n|\r|\[\^/.test(n))return new mN(e,n,i,r,s);this.re=new RegExp(n,f_+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.iter=e.iter();let o=e.lineAt(r);this.curLineStart=o.from,this.matchPos=Eg(e,r),this.getLine(this.curLineStart)}getLine(e){this.iter.next(e),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let e=this.matchPos-this.curLineStart;;){this.re.lastIndex=e;let n=this.matchPos<=this.to&&this.re.exec(this.curLine);if(n){let i=this.curLineStart+n.index,r=i+n[0].length;if(this.matchPos=Eg(this.text,r+(i==r?1:0)),i==this.curLineStart+this.curLine.length&&this.nextLine(),(i<r||i>this.value.to)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this;e=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),e=0;else return this.done=!0,this}}}const fx=new WeakMap;class wc{constructor(e,n){this.from=e,this.text=n}get to(){return this.from+this.text.length}static get(e,n,i){let r=fx.get(e);if(!r||r.from>=i||r.to<=n){let l=new wc(n,e.sliceString(n,i));return fx.set(e,l),l}if(r.from==n&&r.to==i)return r;let{text:s,from:o}=r;return o>n&&(s=e.sliceString(n,o)+s,o=n),r.to<i&&(s+=e.sliceString(r.to,i)),fx.set(e,new wc(o,s)),new wc(n,s.slice(n-o,i-o))}}class mN{constructor(e,n,i,r,s){this.text=e,this.to=s,this.done=!1,this.value=dN,this.matchPos=Eg(e,r),this.re=new RegExp(n,f_+(i!=null&&i.ignoreCase?"i":"")),this.test=i==null?void 0:i.test,this.flat=wc.get(e,r,this.chunkEnd(r+5e3))}chunkEnd(e){return e>=this.to?this.to:this.text.lineAt(e).to}next(){for(;;){let e=this.re.lastIndex=this.matchPos-this.flat.from,n=this.re.exec(this.flat.text);if(n&&!n[0]&&n.index==e&&(this.re.lastIndex=e+1,n=this.re.exec(this.flat.text)),n){let i=this.flat.from+n.index,r=i+n[0].length;if((this.flat.to>=this.to||n.index+n[0].length<=this.flat.text.length-10)&&(!this.test||this.test(i,r,n)))return this.value={from:i,to:r,match:n},this.matchPos=Eg(this.text,r+(i==r?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=wc.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(pN.prototype[Symbol.iterator]=mN.prototype[Symbol.iterator]=function(){return this});function tae(t){try{return new RegExp(t,f_),!0}catch{return!1}}function Eg(t,e){if(e>=t.length)return e;let n=t.lineAt(e),i;for(;e<n.to&&(i=n.text.charCodeAt(e-n.from))>=56320&&i<57344;)e++;return e}function dv(t){let e=String(t.state.doc.lineAt(t.state.selection.main.head).number),n=vt("input",{class:"cm-textfield",name:"line",value:e}),i=vt("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),t.dispatch({effects:Fh.of(!1)}),t.focus()):s.keyCode==13&&(s.preventDefault(),r())},onsubmit:s=>{s.preventDefault(),r()}},vt("label",t.state.phrase("Go to line"),": ",n)," ",vt("button",{class:"cm-button",type:"submit"},t.state.phrase("go")),vt("button",{name:"close",onclick:()=>{t.dispatch({effects:Fh.of(!1)}),t.focus()},"aria-label":t.state.phrase("close"),type:"button"},["×"]));function r(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(n.value);if(!s)return;let{state:o}=t,l=o.doc.lineAt(o.selection.main.head),[,c,h,d,p]=s,g=d?+d.slice(1):0,O=h?+h:l.number;if(h&&p){let _=O/100;c&&(_=_*(c=="-"?-1:1)+l.number/o.doc.lines),O=Math.round(o.doc.lines*_)}else h&&c&&(O=O*(c=="-"?-1:1)+l.number);let x=o.doc.line(Math.max(1,Math.min(o.doc.lines,O))),S=ae.cursor(x.from+Math.max(0,Math.min(g,x.length)));t.dispatch({effects:[Fh.of(!1),ye.scrollIntoView(S.from,{y:"center"})],selection:S}),t.focus()}return{dom:i}}const Fh=De.define(),n2=cn.define({create(){return!0},update(t,e){for(let n of e.effects)n.is(Fh)&&(t=n.value);return t},provide:t=>xf.from(t,e=>e?dv:null)}),nae=t=>{let e=bf(t,dv);if(!e){let n=[Fh.of(!0)];t.state.field(n2,!1)==null&&n.push(De.appendConfig.of([n2,iae])),t.dispatch({effects:n}),e=bf(t,dv)}return e&&e.dom.querySelector("input").select(),!0},iae=ye.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),rae={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},sae=we.define({combine(t){return Ur(t,rae,{highlightWordAroundCursor:(e,n)=>e||n,minSelectionLength:Math.min,maxMatches:Math.min})}});function oae(t){return[hae,uae]}const aae=ke.mark({class:"cm-selectionMatch"}),lae=ke.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function i2(t,e,n,i){return(n==0||t(e.sliceDoc(n-1,n))!=Rt.Word)&&(i==e.doc.length||t(e.sliceDoc(i,i+1))!=Rt.Word)}function cae(t,e,n,i){return t(e.sliceDoc(n,n+1))==Rt.Word&&t(e.sliceDoc(i-1,i))==Rt.Word}const uae=Dt.fromClass(class{constructor(t){this.decorations=this.getDeco(t)}update(t){(t.selectionSet||t.docChanged||t.viewportChanged)&&(this.decorations=this.getDeco(t.view))}getDeco(t){let e=t.state.facet(sae),{state:n}=t,i=n.selection;if(i.ranges.length>1)return ke.none;let r=i.main,s,o=null;if(r.empty){if(!e.highlightWordAroundCursor)return ke.none;let c=n.wordAt(r.head);if(!c)return ke.none;o=n.charCategorizer(r.head),s=n.sliceDoc(c.from,c.to)}else{let c=r.to-r.from;if(c<e.minSelectionLength||c>200)return ke.none;if(e.wholeWords){if(s=n.sliceDoc(r.from,r.to),o=n.charCategorizer(r.head),!(i2(o,n,r.from,r.to)&&cae(o,n,r.from,r.to)))return ke.none}else if(s=n.sliceDoc(r.from,r.to),!s)return ke.none}let l=[];for(let c of t.visibleRanges){let h=new eu(n.doc,s,c.from,c.to);for(;!h.next().done;){let{from:d,to:p}=h.value;if((!o||i2(o,n,d,p))&&(r.empty&&d<=r.from&&p>=r.to?l.push(lae.range(d,p)):(d>=r.to||p<=r.from)&&l.push(aae.range(d,p)),l.length>e.maxMatches))return ke.none}}return ke.set(l)}},{decorations:t=>t.decorations}),hae=ye.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),fae=({state:t,dispatch:e})=>{let{selection:n}=t,i=ae.create(n.ranges.map(r=>t.wordAt(r.head)||ae.cursor(r.head)),n.mainIndex);return i.eq(n)?!1:(e(t.update({selection:i})),!0)};function dae(t,e){let{main:n,ranges:i}=t.selection,r=t.wordAt(n.head),s=r&&r.from==n.from&&r.to==n.to;for(let o=!1,l=new eu(t.doc,e,i[i.length-1].to);;)if(l.next(),l.done){if(o)return null;l=new eu(t.doc,e,0,Math.max(0,i[i.length-1].from-1)),o=!0}else{if(o&&i.some(c=>c.from==l.value.from))continue;if(s){let c=t.wordAt(l.value.from);if(!c||c.from!=l.value.from||c.to!=l.value.to)continue}return l.value}}const pae=({state:t,dispatch:e})=>{let{ranges:n}=t.selection;if(n.some(s=>s.from===s.to))return fae({state:t,dispatch:e});let i=t.sliceDoc(n[0].from,n[0].to);if(t.selection.ranges.some(s=>t.sliceDoc(s.from,s.to)!=i))return!1;let r=dae(t,i);return r?(e(t.update({selection:t.selection.addRange(ae.range(r.from,r.to),!1),effects:ye.scrollIntoView(r.to)})),!0):!1},du=we.define({combine(t){return Ur(t,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:e=>new Pae(e),scrollToMatch:e=>ye.scrollIntoView(e)})}});class gN{constructor(e){this.search=e.search,this.caseSensitive=!!e.caseSensitive,this.literal=!!e.literal,this.regexp=!!e.regexp,this.replace=e.replace||"",this.valid=!!this.search&&(!this.regexp||tae(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!e.wholeWord}unquote(e){return this.literal?e:e.replace(/\\([nrt\\])/g,(n,i)=>i=="n"?`
421
+ `:i=="r"?"\r":i=="t"?" ":"\\")}eq(e){return this.search==e.search&&this.replace==e.replace&&this.caseSensitive==e.caseSensitive&&this.regexp==e.regexp&&this.wholeWord==e.wholeWord}create(){return this.regexp?new yae(this):new gae(this)}getCursor(e,n=0,i){let r=e.doc?e:Ue.create({doc:e});return i==null&&(i=r.doc.length),this.regexp?cc(this,r,n,i):lc(this,r,n,i)}}class ON{constructor(e){this.spec=e}}function lc(t,e,n,i){return new eu(e.doc,t.unquoted,n,i,t.caseSensitive?void 0:r=>r.toLowerCase(),t.wholeWord?mae(e.doc,e.charCategorizer(e.selection.main.head)):void 0)}function mae(t,e){return(n,i,r,s)=>((s>n||s+r.length<i)&&(s=Math.max(0,n-2),r=t.sliceString(s,Math.min(t.length,i+2))),(e(Ag(r,n-s))!=Rt.Word||e(Rg(r,n-s))!=Rt.Word)&&(e(Rg(r,i-s))!=Rt.Word||e(Ag(r,i-s))!=Rt.Word))}class gae extends ON{constructor(e){super(e)}nextMatch(e,n,i){let r=lc(this.spec,e,i,e.doc.length).nextOverlapping();if(r.done){let s=Math.min(e.doc.length,n+this.spec.unquoted.length);r=lc(this.spec,e,0,s).nextOverlapping()}return r.done||r.value.from==n&&r.value.to==i?null:r.value}prevMatchInRange(e,n,i){for(let r=i;;){let s=Math.max(n,r-1e4-this.spec.unquoted.length),o=lc(this.spec,e,s,r),l=null;for(;!o.nextOverlapping().done;)l=o.value;if(l)return l;if(s==n)return null;r-=1e4}}prevMatch(e,n,i){let r=this.prevMatchInRange(e,0,n);return r||(r=this.prevMatchInRange(e,Math.max(0,i-this.spec.unquoted.length),e.doc.length)),r&&(r.from!=n||r.to!=i)?r:null}getReplacement(e){return this.spec.unquote(this.spec.replace)}matchAll(e,n){let i=lc(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=lc(this.spec,e,Math.max(0,n-this.spec.unquoted.length),Math.min(i+this.spec.unquoted.length,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}function cc(t,e,n,i){return new pN(e.doc,t.search,{ignoreCase:!t.caseSensitive,test:t.wholeWord?Oae(e.charCategorizer(e.selection.main.head)):void 0},n,i)}function Ag(t,e){return t.slice(yn(t,e,!1),e)}function Rg(t,e){return t.slice(e,yn(t,e))}function Oae(t){return(e,n,i)=>!i[0].length||(t(Ag(i.input,i.index))!=Rt.Word||t(Rg(i.input,i.index))!=Rt.Word)&&(t(Rg(i.input,i.index+i[0].length))!=Rt.Word||t(Ag(i.input,i.index+i[0].length))!=Rt.Word)}class yae extends ON{nextMatch(e,n,i){let r=cc(this.spec,e,i,e.doc.length).next();return r.done&&(r=cc(this.spec,e,0,n).next()),r.done?null:r.value}prevMatchInRange(e,n,i){for(let r=1;;r++){let s=Math.max(n,i-r*1e4),o=cc(this.spec,e,s,i),l=null;for(;!o.next().done;)l=o.value;if(l&&(s==n||l.from>s+10))return l;if(s==n)return null}}prevMatch(e,n,i){return this.prevMatchInRange(e,0,n)||this.prevMatchInRange(e,i,e.doc.length)}getReplacement(e){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(n,i)=>{if(i=="&")return e.match[0];if(i=="$")return"$";for(let r=i.length;r>0;r--){let s=+i.slice(0,r);if(s>0&&s<e.match.length)return e.match[s]+i.slice(r)}return n})}matchAll(e,n){let i=cc(this.spec,e,0,e.doc.length),r=[];for(;!i.next().done;){if(r.length>=n)return null;r.push(i.value)}return r}highlight(e,n,i,r){let s=cc(this.spec,e,Math.max(0,n-250),Math.min(i+250,e.doc.length));for(;!s.next().done;)r(s.value.from,s.value.to)}}const $f=De.define(),d_=De.define(),zo=cn.define({create(t){return new dx(pv(t).create(),null)},update(t,e){for(let n of e.effects)n.is($f)?t=new dx(n.value.create(),t.panel):n.is(d_)&&(t=new dx(t.query,n.value?p_:null));return t},provide:t=>xf.from(t,e=>e.panel)});class dx{constructor(e,n){this.query=e,this.panel=n}}const bae=ke.mark({class:"cm-searchMatch"}),xae=ke.mark({class:"cm-searchMatch cm-searchMatch-selected"}),vae=Dt.fromClass(class{constructor(t){this.view=t,this.decorations=this.highlight(t.state.field(zo))}update(t){let e=t.state.field(zo);(e!=t.startState.field(zo)||t.docChanged||t.selectionSet||t.viewportChanged)&&(this.decorations=this.highlight(e))}highlight({query:t,panel:e}){if(!e||!t.spec.valid)return ke.none;let{view:n}=this,i=new $s;for(let r=0,s=n.visibleRanges,o=s.length;r<o;r++){let{from:l,to:c}=s[r];for(;r<o-1&&c>s[r+1].from-500;)c=s[++r].to;t.highlight(n.state,l,c,(h,d)=>{let p=n.state.selection.ranges.some(g=>g.from==h&&g.to==d);i.add(h,d,p?xae:bae)})}return i.finish()}},{decorations:t=>t.decorations});function nd(t){return e=>{let n=e.state.field(zo,!1);return n&&n.query.spec.valid?t(e,n):xN(e)}}const $g=nd((t,{query:e})=>{let{to:n}=t.state.selection.main,i=e.nextMatch(t.state,n,n);if(!i)return!1;let r=ae.single(i.from,i.to),s=t.state.facet(du);return t.dispatch({selection:r,effects:[m_(t,i),s.scrollToMatch(r.main,t)],userEvent:"select.search"}),bN(t),!0}),Lg=nd((t,{query:e})=>{let{state:n}=t,{from:i}=n.selection.main,r=e.prevMatch(n,i,i);if(!r)return!1;let s=ae.single(r.from,r.to),o=t.state.facet(du);return t.dispatch({selection:s,effects:[m_(t,r),o.scrollToMatch(s.main,t)],userEvent:"select.search"}),bN(t),!0}),Sae=nd((t,{query:e})=>{let n=e.matchAll(t.state,1e3);return!n||!n.length?!1:(t.dispatch({selection:ae.create(n.map(i=>ae.range(i.from,i.to))),userEvent:"select.search.matches"}),!0)}),_ae=({state:t,dispatch:e})=>{let n=t.selection;if(n.ranges.length>1||n.main.empty)return!1;let{from:i,to:r}=n.main,s=[],o=0;for(let l=new eu(t.doc,t.sliceDoc(i,r));!l.next().done;){if(s.length>1e3)return!1;l.value.from==i&&(o=s.length),s.push(ae.range(l.value.from,l.value.to))}return e(t.update({selection:ae.create(s,o),userEvent:"select.search.matches"})),!0},r2=nd((t,{query:e})=>{let{state:n}=t,{from:i,to:r}=n.selection.main;if(n.readOnly)return!1;let s=e.nextMatch(n,i,i);if(!s)return!1;let o=s,l=[],c,h,d=[];o.from==i&&o.to==r&&(h=n.toText(e.getReplacement(o)),l.push({from:o.from,to:o.to,insert:h}),o=e.nextMatch(n,o.from,o.to),d.push(ye.announce.of(n.phrase("replaced match on line $",n.doc.lineAt(i).number)+".")));let p=t.state.changes(l);return o&&(c=ae.single(o.from,o.to).map(p),d.push(m_(t,o)),d.push(n.facet(du).scrollToMatch(c.main,t))),t.dispatch({changes:p,selection:c,effects:d,userEvent:"input.replace"}),!0}),kae=nd((t,{query:e})=>{if(t.state.readOnly)return!1;let n=e.matchAll(t.state,1e9).map(r=>{let{from:s,to:o}=r;return{from:s,to:o,insert:e.getReplacement(r)}});if(!n.length)return!1;let i=t.state.phrase("replaced $ matches",n.length)+".";return t.dispatch({changes:n,effects:ye.announce.of(i),userEvent:"input.replace.all"}),!0});function p_(t){return t.state.facet(du).createPanel(t)}function pv(t,e){var n,i,r,s,o;let l=t.selection.main,c=l.empty||l.to>l.from+100?"":t.sliceDoc(l.from,l.to);if(e&&!c)return e;let h=t.facet(du);return new gN({search:((n=e==null?void 0:e.literal)!==null&&n!==void 0?n:h.literal)?c:c.replace(/\n/g,"\\n"),caseSensitive:(i=e==null?void 0:e.caseSensitive)!==null&&i!==void 0?i:h.caseSensitive,literal:(r=e==null?void 0:e.literal)!==null&&r!==void 0?r:h.literal,regexp:(s=e==null?void 0:e.regexp)!==null&&s!==void 0?s:h.regexp,wholeWord:(o=e==null?void 0:e.wholeWord)!==null&&o!==void 0?o:h.wholeWord})}function yN(t){let e=bf(t,p_);return e&&e.dom.querySelector("[main-field]")}function bN(t){let e=yN(t);e&&e==t.root.activeElement&&e.select()}const xN=t=>{let e=t.state.field(zo,!1);if(e&&e.panel){let n=yN(t);if(n&&n!=t.root.activeElement){let i=pv(t.state,e.query.spec);i.valid&&t.dispatch({effects:$f.of(i)}),n.focus(),n.select()}}else t.dispatch({effects:[d_.of(!0),e?$f.of(pv(t.state,e.query.spec)):De.appendConfig.of(Qae)]});return!0},vN=t=>{let e=t.state.field(zo,!1);if(!e||!e.panel)return!1;let n=bf(t,p_);return n&&n.dom.contains(t.root.activeElement)&&t.focus(),t.dispatch({effects:d_.of(!1)}),!0},wae=[{key:"Mod-f",run:xN,scope:"editor search-panel"},{key:"F3",run:$g,shift:Lg,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:$g,shift:Lg,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:vN,scope:"editor search-panel"},{key:"Mod-Shift-l",run:_ae},{key:"Mod-Alt-g",run:nae},{key:"Mod-d",run:pae,preventDefault:!0}];class Pae{constructor(e){this.view=e;let n=this.query=e.state.field(zo).query.spec;this.commit=this.commit.bind(this),this.searchField=vt("input",{value:n.search,placeholder:yi(e,"Find"),"aria-label":yi(e,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=vt("input",{value:n.replace,placeholder:yi(e,"Replace"),"aria-label":yi(e,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=vt("input",{type:"checkbox",name:"case",form:"",checked:n.caseSensitive,onchange:this.commit}),this.reField=vt("input",{type:"checkbox",name:"re",form:"",checked:n.regexp,onchange:this.commit}),this.wordField=vt("input",{type:"checkbox",name:"word",form:"",checked:n.wholeWord,onchange:this.commit});function i(r,s,o){return vt("button",{class:"cm-button",name:r,onclick:s,type:"button"},o)}this.dom=vt("div",{onkeydown:r=>this.keydown(r),class:"cm-search"},[this.searchField,i("next",()=>$g(e),[yi(e,"next")]),i("prev",()=>Lg(e),[yi(e,"previous")]),i("select",()=>Sae(e),[yi(e,"all")]),vt("label",null,[this.caseField,yi(e,"match case")]),vt("label",null,[this.reField,yi(e,"regexp")]),vt("label",null,[this.wordField,yi(e,"by word")]),...e.state.readOnly?[]:[vt("br"),this.replaceField,i("replace",()=>r2(e),[yi(e,"replace")]),i("replaceAll",()=>kae(e),[yi(e,"replace all")])],vt("button",{name:"close",onclick:()=>vN(e),"aria-label":yi(e,"close"),type:"button"},["×"])])}commit(){let e=new gN({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});e.eq(this.query)||(this.query=e,this.view.dispatch({effects:$f.of(e)}))}keydown(e){XK(this.view,e,"search-panel")?e.preventDefault():e.keyCode==13&&e.target==this.searchField?(e.preventDefault(),(e.shiftKey?Lg:$g)(this.view)):e.keyCode==13&&e.target==this.replaceField&&(e.preventDefault(),r2(this.view))}update(e){for(let n of e.transactions)for(let i of n.effects)i.is($f)&&!i.value.eq(this.query)&&this.setQuery(i.value)}setQuery(e){this.query=e,this.searchField.value=e.search,this.replaceField.value=e.replace,this.caseField.checked=e.caseSensitive,this.reField.checked=e.regexp,this.wordField.checked=e.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(du).top}}function yi(t,e){return t.state.phrase(e)}const am=30,lm=/[\s\.,:;?!]/;function m_(t,{from:e,to:n}){let i=t.state.doc.lineAt(e),r=t.state.doc.lineAt(n).to,s=Math.max(i.from,e-am),o=Math.min(r,n+am),l=t.state.sliceDoc(s,o);if(s!=i.from){for(let c=0;c<am;c++)if(!lm.test(l[c+1])&&lm.test(l[c])){l=l.slice(c);break}}if(o!=r){for(let c=l.length-1;c>l.length-am;c--)if(!lm.test(l[c-1])&&lm.test(l[c])){l=l.slice(0,c);break}}return ye.announce.of(`${t.state.phrase("current match")}. ${l} ${t.state.phrase("on line")} ${i.number}.`)}const Tae=ye.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),Qae=[zo,Is.low(vae),Tae];class s2{constructor(e,n,i){this.from=e,this.to=n,this.diagnostic=i}}class Pa{constructor(e,n,i){this.diagnostics=e,this.panel=n,this.selected=i}static init(e,n,i){let r=i.facet(Lf).markerFilter;r&&(e=r(e,i));let s=e.slice().sort((O,x)=>O.from-x.from||O.to-x.to),o=new $s,l=[],c=0,h=i.doc.iter(),d=0,p=i.doc.length;for(let O=0;;){let x=O==s.length?null:s[O];if(!x&&!l.length)break;let S,_;if(l.length)S=c,_=l.reduce((Q,R)=>Math.min(Q,R.to),x&&x.from>S?x.from:1e8);else{if(S=x.from,S>p)break;_=x.to,l.push(x),O++}for(;O<s.length;){let Q=s[O];if(Q.from==S&&(Q.to>Q.from||Q.to==S))l.push(Q),O++,_=Math.min(Q.to,_);else{_=Math.min(Q.from,_);break}}_=Math.min(_,p);let k=!1;if(l.some(Q=>Q.from==S&&(Q.to==_||_==p))&&(k=S==_,!k&&_-S<10)){let Q=S-(d+h.value.length);Q>0&&(h.next(Q),d=S);for(let R=S;;){if(R>=_){k=!0;break}if(!h.lineBreak&&d+h.value.length>R)break;R=d+h.value.length,d+=h.value.length,h.next()}}let P=Xae(l);if(k)o.add(S,S,ke.widget({widget:new jae(P),diagnostics:l.slice()}));else{let Q=l.reduce((R,$)=>$.markClass?R+" "+$.markClass:R,"");o.add(S,_,ke.mark({class:"cm-lintRange cm-lintRange-"+P+Q,diagnostics:l.slice(),inclusiveEnd:l.some(R=>R.to>_)}))}if(c=_,c==p)break;for(let Q=0;Q<l.length;Q++)l[Q].to<=c&&l.splice(Q--,1)}let g=o.finish();return new Pa(g,n,tu(g))}}function tu(t,e=null,n=0){let i=null;return t.between(n,1e9,(r,s,{spec:o})=>{if(!(e&&o.diagnostics.indexOf(e)<0))if(!i)i=new s2(r,s,e||o.diagnostics[0]);else{if(o.diagnostics.indexOf(i.diagnostic)<0)return!1;i=new s2(i.from,s,i.diagnostic)}}),i}function Cae(t,e){let n=e.pos,i=e.end||n,r=t.state.facet(Lf).hideOn(t,n,i);if(r!=null)return r;let s=t.startState.doc.lineAt(e.pos);return!!(t.effects.some(o=>o.is(SN))||t.changes.touchesRange(s.from,Math.max(s.to,i)))}function Eae(t,e){return t.field(ki,!1)?e:e.concat(De.appendConfig.of(Vae))}const SN=De.define(),g_=De.define(),_N=De.define(),ki=cn.define({create(){return new Pa(ke.none,null,null)},update(t,e){if(e.docChanged&&t.diagnostics.size){let n=t.diagnostics.map(e.changes),i=null,r=t.panel;if(t.selected){let s=e.changes.mapPos(t.selected.from,1);i=tu(n,t.selected.diagnostic,s)||tu(n,null,s)}!n.size&&r&&e.state.facet(Lf).autoPanel&&(r=null),t=new Pa(n,r,i)}for(let n of e.effects)if(n.is(SN)){let i=e.state.facet(Lf).autoPanel?n.value.length?Mf.open:null:t.panel;t=Pa.init(n.value,i,e.state)}else n.is(g_)?t=new Pa(t.diagnostics,n.value?Mf.open:null,t.selected):n.is(_N)&&(t=new Pa(t.diagnostics,t.panel,n.value));return t},provide:t=>[xf.from(t,e=>e.panel),ye.decorations.from(t,e=>e.diagnostics)]}),Aae=ke.mark({class:"cm-lintRange cm-lintRange-active"});function Rae(t,e,n){let{diagnostics:i}=t.state.field(ki),r,s=-1,o=-1;i.between(e-(n<0?1:0),e+(n>0?1:0),(c,h,{spec:d})=>{if(e>=c&&e<=h&&(c==h||(e>c||n>0)&&(e<h||n<0)))return r=d.diagnostics,s=c,o=h,!1});let l=t.state.facet(Lf).tooltipFilter;return r&&l&&(r=l(r,t.state)),r?{pos:s,end:o,above:t.state.doc.lineAt(s).to<o,create(){return{dom:$ae(t,r)}}}:null}function $ae(t,e){return vt("ul",{class:"cm-tooltip-lint"},e.map(n=>wN(t,n,!1)))}const Lae=t=>{let e=t.state.field(ki,!1);(!e||!e.panel)&&t.dispatch({effects:Eae(t.state,[g_.of(!0)])});let n=bf(t,Mf.open);return n&&n.dom.querySelector(".cm-panel-lint ul").focus(),!0},o2=t=>{let e=t.state.field(ki,!1);return!e||!e.panel?!1:(t.dispatch({effects:g_.of(!1)}),!0)},Mae=t=>{let e=t.state.field(ki,!1);if(!e)return!1;let n=t.state.selection.main,i=e.diagnostics.iter(n.to+1);return!i.value&&(i=e.diagnostics.iter(0),!i.value||i.from==n.from&&i.to==n.to)?!1:(t.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0}),!0)},Dae=[{key:"Mod-Shift-m",run:Lae,preventDefault:!0},{key:"F8",run:Mae}],Lf=we.define({combine(t){return{sources:t.map(e=>e.source).filter(e=>e!=null),...Ur(t.map(e=>e.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:a2,tooltipFilter:a2,needsRefresh:(e,n)=>e?n?i=>e(i)||n(i):e:n,hideOn:(e,n)=>e?n?(i,r,s)=>e(i,r,s)||n(i,r,s):e:n,autoPanel:(e,n)=>e||n})}}});function a2(t,e){return t?e?(n,i)=>e(t(n,i),i):t:e}function kN(t){let e=[];if(t)e:for(let{name:n}of t){for(let i=0;i<n.length;i++){let r=n[i];if(/[a-zA-Z]/.test(r)&&!e.some(s=>s.toLowerCase()==r.toLowerCase())){e.push(r);continue e}}e.push("")}return e}function wN(t,e,n){var i;let r=n?kN(e.actions):[];return vt("li",{class:"cm-diagnostic cm-diagnostic-"+e.severity},vt("span",{class:"cm-diagnosticText"},e.renderMessage?e.renderMessage(t):e.message),(i=e.actions)===null||i===void 0?void 0:i.map((s,o)=>{let l=!1,c=O=>{if(O.preventDefault(),l)return;l=!0;let x=tu(t.state.field(ki).diagnostics,e);x&&s.apply(t,x.from,x.to)},{name:h}=s,d=r[o]?h.indexOf(r[o]):-1,p=d<0?h:[h.slice(0,d),vt("u",h.slice(d,d+1)),h.slice(d+1)],g=s.markClass?" "+s.markClass:"";return vt("button",{type:"button",class:"cm-diagnosticAction"+g,onclick:c,onmousedown:c,"aria-label":` Action: ${h}${d<0?"":` (access key "${r[o]})"`}.`},p)}),e.source&&vt("div",{class:"cm-diagnosticSource"},e.source))}class jae extends Ti{constructor(e){super(),this.sev=e}eq(e){return e.sev==this.sev}toDOM(){return vt("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class l2{constructor(e,n){this.diagnostic=n,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=wN(e,n,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class Mf{constructor(e){this.view=e,this.items=[];let n=r=>{if(r.keyCode==27)o2(this.view),this.view.focus();else if(r.keyCode==38||r.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(r.keyCode==40||r.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(r.keyCode==36)this.moveSelection(0);else if(r.keyCode==35)this.moveSelection(this.items.length-1);else if(r.keyCode==13)this.view.focus();else if(r.keyCode>=65&&r.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],o=kN(s.actions);for(let l=0;l<o.length;l++)if(o[l].toUpperCase().charCodeAt(0)==r.keyCode){let c=tu(this.view.state.field(ki).diagnostics,s);c&&s.actions[l].apply(e,c.from,c.to)}}else return;r.preventDefault()},i=r=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(r.target)&&this.moveSelection(s)};this.list=vt("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:n,onclick:i}),this.dom=vt("div",{class:"cm-panel-lint"},this.list,vt("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>o2(this.view)},"×")),this.update()}get selectedIndex(){let e=this.view.state.field(ki).selected;if(!e)return-1;for(let n=0;n<this.items.length;n++)if(this.items[n].diagnostic==e.diagnostic)return n;return-1}update(){let{diagnostics:e,selected:n}=this.view.state.field(ki),i=0,r=!1,s=null,o=new Set;for(e.between(0,this.view.state.doc.length,(l,c,{spec:h})=>{for(let d of h.diagnostics){if(o.has(d))continue;o.add(d);let p=-1,g;for(let O=i;O<this.items.length;O++)if(this.items[O].diagnostic==d){p=O;break}p<0?(g=new l2(this.view,d),this.items.splice(i,0,g),r=!0):(g=this.items[p],p>i&&(this.items.splice(i,p-i),r=!0)),n&&g.diagnostic==n.diagnostic?g.dom.hasAttribute("aria-selected")||(g.dom.setAttribute("aria-selected","true"),s=g):g.dom.hasAttribute("aria-selected")&&g.dom.removeAttribute("aria-selected"),i++}});i<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)r=!0,this.items.pop();this.items.length==0&&(this.items.push(new l2(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),r=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:l,panel:c})=>{let h=c.height/this.list.offsetHeight;l.top<c.top?this.list.scrollTop-=(c.top-l.top)/h:l.bottom>c.bottom&&(this.list.scrollTop+=(l.bottom-c.bottom)/h)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),r&&this.sync()}sync(){let e=this.list.firstChild;function n(){let i=e;e=i.nextSibling,i.remove()}for(let i of this.items)if(i.dom.parentNode==this.list){for(;e!=i.dom;)n();e=i.dom.nextSibling}else this.list.insertBefore(i.dom,e);for(;e;)n()}moveSelection(e){if(this.selectedIndex<0)return;let n=this.view.state.field(ki),i=tu(n.diagnostics,this.items[e].diagnostic);i&&this.view.dispatch({selection:{anchor:i.from,head:i.to},scrollIntoView:!0,effects:_N.of(i)})}static open(e){return new Mf(e)}}function Nae(t,e='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${e}>${encodeURIComponent(t)}</svg>')`}function cm(t){return Nae(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${t}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const zae=ye.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:cm("#d11")},".cm-lintRange-warning":{backgroundImage:cm("orange")},".cm-lintRange-info":{backgroundImage:cm("#999")},".cm-lintRange-hint":{backgroundImage:cm("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function Iae(t){return t=="error"?4:t=="warning"?3:t=="info"?2:1}function Xae(t){let e="hint",n=1;for(let i of t){let r=Iae(i.severity);r>n&&(n=r,e=i.severity)}return e}const Vae=[ki,ye.decorations.compute([ki],t=>{let{selected:e,panel:n}=t.field(ki);return!e||!n||e.from==e.to?ke.none:ke.set([Aae.range(e.from,e.to)])}),CJ(Rae,{hideOn:Cae}),zae];var c2=function(e){e===void 0&&(e={});var{crosshairCursor:n=!1}=e,i=[];e.closeBracketsKeymap!==!1&&(i=i.concat(qie)),e.defaultKeymap!==!1&&(i=i.concat(One)),e.searchKeymap!==!1&&(i=i.concat(wae)),e.historyKeymap!==!1&&(i=i.concat(wte)),e.foldKeymap!==!1&&(i=i.concat(Oee)),e.completionKeymap!==!1&&(i=i.concat(Dj)),e.lintKeymap!==!1&&(i=i.concat(Dae));var r=[];return e.lineNumbers!==!1&&r.push(IJ()),e.highlightActiveLineGutter!==!1&&r.push(BJ()),e.highlightSpecialChars!==!1&&r.push(rJ()),e.history!==!1&&r.push(gte()),e.foldGutter!==!1&&r.push(vee()),e.drawSelection!==!1&&r.push(YK()),e.dropCursor!==!1&&r.push(KK()),e.allowMultipleSelections!==!1&&r.push(Ue.allowMultipleSelections.of(!0)),e.indentOnInput!==!1&&r.push(cee()),e.syntaxHighlighting!==!1&&r.push(fO(wee,{fallback:!0})),e.bracketMatching!==!1&&r.push(Ree()),e.closeBrackets!==!1&&r.push(Xie()),e.autocompletion!==!1&&r.push(Kie()),e.rectangularSelection!==!1&&r.push(yJ()),n!==!1&&r.push(vJ()),e.highlightActiveLine!==!1&&r.push(uJ()),e.highlightSelectionMatches!==!1&&r.push(oae()),e.tabSize&&typeof e.tabSize=="number"&&r.push(uu.of(" ".repeat(e.tabSize))),r.concat([al.of(i.flat())]).filter(Boolean)};const Bae="#e5c07b",u2="#e06c75",Zae="#56b6c2",qae="#ffffff",Cm="#abb2bf",mv="#7d8799",Uae="#61afef",Yae="#98c379",h2="#d19a66",Gae="#c678dd",Wae="#21252b",f2="#2c313a",d2="#282c34",px="#353a42",Hae="#3E4451",p2="#528bff",Fae=ye.theme({"&":{color:Cm,backgroundColor:d2},".cm-content":{caretColor:p2},".cm-cursor, .cm-dropCursor":{borderLeftColor:p2},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:Hae},".cm-panels":{backgroundColor:Wae,color:Cm},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:d2,color:mv,border:"none"},".cm-activeLineGutter":{backgroundColor:f2},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:px},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:px,borderBottomColor:px},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:f2,color:Cm}}},{dark:!0}),Kae=ll.define([{tag:A.keyword,color:Gae},{tag:[A.name,A.deleted,A.character,A.propertyName,A.macroName],color:u2},{tag:[A.function(A.variableName),A.labelName],color:Uae},{tag:[A.color,A.constant(A.name),A.standard(A.name)],color:h2},{tag:[A.definition(A.name),A.separator],color:Cm},{tag:[A.typeName,A.className,A.number,A.changed,A.annotation,A.modifier,A.self,A.namespace],color:Bae},{tag:[A.operator,A.operatorKeyword,A.url,A.escape,A.regexp,A.link,A.special(A.string)],color:Zae},{tag:[A.meta,A.comment],color:mv},{tag:A.strong,fontWeight:"bold"},{tag:A.emphasis,fontStyle:"italic"},{tag:A.strikethrough,textDecoration:"line-through"},{tag:A.link,color:mv,textDecoration:"underline"},{tag:A.heading,fontWeight:"bold",color:u2},{tag:[A.atom,A.bool,A.special(A.variableName)],color:h2},{tag:[A.processingInstruction,A.string,A.inserted],color:Yae},{tag:A.invalid,color:qae}]),Jae=[Fae,fO(Kae)];var ele=ye.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),tle=function(e){e===void 0&&(e={});var{indentWithTab:n=!0,editable:i=!0,readOnly:r=!1,theme:s="light",placeholder:o="",basicSetup:l=!0}=e,c=[];switch(n&&c.unshift(al.of([yne])),l&&(typeof l=="boolean"?c.unshift(c2()):c.unshift(c2(l))),o&&c.unshift(pJ(o)),s){case"light":c.push(ele);break;case"dark":c.push(Jae);break;case"none":break;default:c.push(s);break}return i===!1&&c.push(ye.editable.of(!1)),r&&c.push(Ue.readOnly.of(!0)),[...c]},nle=t=>({line:t.state.doc.lineAt(t.state.selection.main.from),lineCount:t.state.doc.lines,lineBreak:t.state.lineBreak,length:t.state.doc.length,readOnly:t.state.readOnly,tabSize:t.state.tabSize,selection:t.state.selection,selectionAsSingle:t.state.selection.asSingle().main,ranges:t.state.selection.ranges,selectionCode:t.state.sliceDoc(t.state.selection.main.from,t.state.selection.main.to),selections:t.state.selection.ranges.map(e=>t.state.sliceDoc(e.from,e.to)),selectedText:t.state.selection.ranges.some(e=>!e.empty)});class ile{constructor(e,n){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=n,this.timeoutMS=n,this.callbacks.push(e)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var e=this.callbacks.slice();this.callbacks.length=0,e.forEach(n=>{try{n()}catch(i){console.error("TimeoutLatch callback error:",i)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}class m2{constructor(){this.interval=null,this.latches=new Set}add(e){this.latches.add(e),this.start()}remove(e){this.latches.delete(e),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(e=>{e.tick(),e.isDone&&this.remove(e)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}}var mx=null,rle=()=>typeof window>"u"?new m2:(mx||(mx=new m2),mx),g2=qr.define(),sle=200,ole=[];function ale(t){var{value:e,selection:n,onChange:i,onStatistics:r,onCreateEditor:s,onUpdate:o,extensions:l=ole,autoFocus:c,theme:h="light",height:d=null,minHeight:p=null,maxHeight:g=null,width:O=null,minWidth:x=null,maxWidth:S=null,placeholder:_="",editable:k=!0,readOnly:P=!1,indentWithTab:Q=!0,basicSetup:R=!0,root:$,initialState:C}=t,[D,Z]=B.useState(),[U,M]=B.useState(),[V,G]=B.useState(),J=B.useState(()=>({current:null}))[0],K=B.useState(()=>({current:null}))[0],ie=ye.theme({"&":{height:d,minHeight:p,maxHeight:g,width:O,minWidth:x,maxWidth:S},"& .cm-scroller":{height:"100% !important"}}),q=ye.updateListener.of(ve=>{if(ve.docChanged&&typeof i=="function"&&!ve.transactions.some(te=>te.annotation(g2))){J.current?J.current.reset():(J.current=new ile(()=>{if(K.current){var te=K.current;K.current=null,te()}J.current=null},sle),rle().add(J.current));var j=ve.state.doc,N=j.toString();i(N,ve)}r&&r(nle(ve))}),se=tle({theme:h,editable:k,readOnly:P,placeholder:_,indentWithTab:Q,basicSetup:R}),pe=[q,ie,...se];return o&&typeof o=="function"&&pe.push(ye.updateListener.of(o)),pe=pe.concat(l),B.useLayoutEffect(()=>{if(D&&!V){var ve={doc:e,selection:n,extensions:pe},j=C?Ue.fromJSON(C.json,ve,C.fields):Ue.create(ve);if(G(j),!U){var N=new ye({state:j,parent:D,root:$});M(N),s&&s(N,j)}}return()=>{U&&(G(void 0),M(void 0))}},[D,V]),B.useEffect(()=>{t.container&&Z(t.container)},[t.container]),B.useEffect(()=>()=>{U&&(U.destroy(),M(void 0)),J.current&&(J.current.cancel(),J.current=null)},[U]),B.useEffect(()=>{c&&U&&U.focus()},[c,U]),B.useEffect(()=>{U&&U.dispatch({effects:De.reconfigure.of(pe)})},[h,l,d,p,g,O,x,S,_,k,P,Q,R,i,o]),B.useEffect(()=>{if(e!==void 0){var ve=U?U.state.doc.toString():"";if(U&&e!==ve){var j=J.current&&!J.current.isDone,N=()=>{U&&e!==U.state.doc.toString()&&U.dispatch({changes:{from:0,to:U.state.doc.toString().length,insert:e||""},annotations:[g2.of(!0)]})};j?K.current=N:N()}}},[e,U]),{state:V,setState:G,view:U,setView:M,container:D,setContainer:Z}}var lle=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],PN=B.forwardRef((t,e)=>{var{className:n,value:i="",selection:r,extensions:s=[],onChange:o,onStatistics:l,onCreateEditor:c,onUpdate:h,autoFocus:d,theme:p="light",height:g,minHeight:O,maxHeight:x,width:S,minWidth:_,maxWidth:k,basicSetup:P,placeholder:Q,indentWithTab:R,editable:$,readOnly:C,root:D,initialState:Z}=t,U=eae(t,lle),M=B.useRef(null),{state:V,view:G,container:J,setContainer:K}=ale({root:D,value:i,autoFocus:d,theme:p,height:g,minHeight:O,maxHeight:x,width:S,minWidth:_,maxWidth:k,basicSetup:P,placeholder:Q,indentWithTab:R,editable:$,readOnly:C,selection:r,onChange:o,onStatistics:l,onCreateEditor:c,onUpdate:h,extensions:s,initialState:Z});B.useImperativeHandle(e,()=>({editor:M.current,state:V,view:G}),[M,J,V,G]);var ie=B.useCallback(se=>{M.current=se,K(se)},[K]);if(typeof i!="string")throw new Error("value must be typeof string but got "+typeof i);var q=typeof p=="string"?"cm-theme-"+p:"cm-theme";return v.jsx("div",fv({ref:ie,className:""+q+(n?" "+n:"")},U))});PN.displayName="CodeMirror";function cle(t){if(!t)return"plain";const e=t.toLowerCase();return e.endsWith(".md")?"markdown":e.endsWith(".ts")||e.endsWith(".tsx")?"typescript":e.endsWith(".js")||e.endsWith(".jsx")?"javascript":e.endsWith(".json")?"json":e.endsWith(".yml")||e.endsWith(".yaml")?"yaml":"plain"}function ule(t,e){switch(t){case"markdown":return[iN({base:Kc,codeLanguages:Joe}),ote()];case"typescript":return[wg({typescript:!0,jsx:e==null?void 0:e.endsWith(".tsx")})];case"javascript":return[wg({jsx:e==null?void 0:e.endsWith(".jsx")})];case"json":return[Yj()];case"yaml":return[fN()];default:return[]}}const hle=ll.define([{tag:[A.keyword,A.operatorKeyword,A.modifier],color:"var(--primary)"},{tag:[A.string,A.special(A.string)],color:"var(--secondary)"},{tag:[A.number,A.integer,A.float],color:"var(--chart-4)"},{tag:[A.bool,A.null,A.atom],color:"var(--accent)"},{tag:[A.typeName,A.className],color:"var(--chart-3)"},{tag:[A.function(A.variableName),A.propertyName],color:"var(--chart-5)"},{tag:[A.variableName],color:"var(--foreground)"},{tag:[A.comment,A.lineComment,A.blockComment],color:"color-mix(in srgb, var(--muted-foreground) 80%, transparent)"},{tag:A.punctuation,color:"color-mix(in srgb, var(--foreground) 70%, transparent)"}]);function TN({value:t,onChange:e,readOnly:n=!1,language:i,filename:r,lineNumbers:s=!0,lineWrapping:o=!0,fontSize:l=13,className:c="",style:h,placeholder:d}){const p=i??cle(r),g=B.useMemo(()=>{const O=[Ue.readOnly.of(n),...ule(p,r),fO(hle,{fallback:!0})];return O.push(ye.theme({".cm-line":{lineHeight:"21px"},".cm-editor":{backgroundColor:"var(--card)",color:"var(--foreground)",borderRadius:"6px",border:"1px solid color-mix(in srgb, var(--border) 80%, transparent)",height:"100%",minHeight:"240px"},".cm-content":{fontFamily:"var(--font-mono)",backgroundColor:"transparent"},".cm-gutters":{fontFamily:"var(--font-mono)",backgroundColor:"var(--card)",color:"color-mix(in srgb, var(--foreground) 60%, transparent)",borderRight:"1px solid color-mix(in srgb, var(--border) 80%, transparent)"},".cm-scroller":{fontFamily:"var(--font-mono)",overflow:"auto"},".cm-activeLine":{backgroundColor:"color-mix(in srgb, var(--primary) 6%, transparent)"},".cm-activeLineGutter":{backgroundColor:"color-mix(in srgb, var(--primary) 6%, transparent)",color:"var(--foreground)"},".cm-selectionBackground, .cm-content ::selection":{backgroundColor:"color-mix(in srgb, var(--primary) 24%, transparent)"},"&.cm-editor .cm-cursor":{borderLeftColor:"var(--foreground)"},".cm-matchingBracket, .cm-nonmatchingBracket":{backgroundColor:"color-mix(in srgb, var(--primary) 10%, transparent)",outline:"1px solid color-mix(in srgb, var(--primary) 30%, transparent)"},".cm-tooltip":{backgroundColor:"var(--popover)",color:"var(--popover-foreground)",border:"1px solid color-mix(in srgb, var(--border) 80%, transparent)"},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{background:"color-mix(in srgb, var(--primary) 10%, transparent)",color:"var(--foreground)"}},".cm-searchMatch":{backgroundColor:"color-mix(in srgb, var(--primary) 18%, transparent)",outline:"1px solid color-mix(in srgb, var(--primary) 35%, transparent)"},".cm-md-codeblock":{padding:"0",borderRadius:0}})),O.push(al.of([{key:"Mod-a",run:dj}])),o&&O.push(ye.lineWrapping),O},[p,r,n,o]);return v.jsx(PN,{value:t,onChange:e,placeholder:d,theme:"none",basicSetup:{lineNumbers:s,foldGutter:!n,highlightActiveLine:!n,highlightActiveLineGutter:!n,autocompletion:!n,closeBrackets:!n,bracketMatching:!n},extensions:g,className:`scrollbar-thin scrollbar-track-transparent overflow-auto ${c}`,style:{fontSize:l,...h}})}function fle(t,e){const n=t.path.split("/"),i=e.path.split("/"),r=Math.min(n.length,i.length);for(let s=0;s<r;s++){const o=s===n.length-1,l=s===i.length-1;if(n[s]!==i[s]){if(o&&l){if(t.type!==e.type)return t.type==="directory"?-1:1}else{if(o&&!l)return t.type==="directory"?n[s].localeCompare(i[s]):1;if(!o&&l)return e.type==="directory"?n[s].localeCompare(i[s]):-1}return n[s].localeCompare(i[s])}}return n.length-i.length}function QN(t){return t.split("/").pop()??t}function dle(t){return t.split("/").slice(0,-1).join("/")}const ple=String.raw,mle=ple`
422
+ /* 窄屏:单列布局 */
423
+ .fev-layout {
424
+ display: flex;
425
+ flex-direction: column;
426
+ height: 100%;
427
+ gap: 0.75rem;
428
+ }
429
+ .fev-sidebar-tabs {
430
+ flex-shrink: 0;
431
+ }
432
+ .fev-sidebar-tree {
433
+ display: none;
434
+ }
435
+ .fev-editor-wrapper {
436
+ display: flex;
437
+ flex-direction: column;
438
+ flex: 1;
439
+ min-height: 320px;
440
+ }
441
+
442
+ /* 宽屏:grid 布局,文件列表在右侧 */
443
+ @container (min-width: 768px) {
444
+ .fev-layout {
445
+ display: grid;
446
+ grid-template-columns: 1fr 220px;
447
+ gap: 1rem;
448
+ }
449
+ .fev-sidebar-tabs {
450
+ display: none;
451
+ }
452
+ .fev-sidebar-tree {
453
+ display: block;
454
+ order: 2;
455
+ }
456
+ .fev-editor-wrapper {
457
+ order: 1;
458
+ min-height: 480px;
459
+ }
460
+ }
461
+ .CodeMirror {
462
+ line-height: 21px;
463
+ }
464
+ `;function gle({path:t,entries:e,onNavigate:n}){const i=t.split("/"),r=t.endsWith(".md"),s=[];for(let o=0;o<i.length;o++){const l=i.slice(0,o+1).join("/"),c=o===i.length-1;s.push({name:i[o],path:l,isFile:c})}return v.jsx("div",{className:"border-border/50 bg-muted/20 flex items-center gap-1 overflow-x-auto border-b px-3 py-2 text-xs",children:s.map((o,l)=>{const c=l===s.length-1,h=!c&&e.some(d=>d.type==="file"&&d.path.startsWith(o.path+"/"));return v.jsxs("span",{className:"flex items-center gap-1",children:[l>0&&v.jsx(Zg,{className:"text-muted-foreground/50 h-3 w-3"}),c?v.jsxs("span",{className:"text-foreground flex items-center gap-1.5",children:[o.isFile?r?v.jsx(Pi,{className:"h-3.5 w-3.5"}):v.jsx(Ev,{className:"h-3.5 w-3.5"}):v.jsx(mc,{className:"h-3.5 w-3.5"}),o.name]}):h?v.jsxs("button",{onClick:()=>{const d=e.find(p=>p.type==="file"&&p.path.startsWith(o.path+"/"));d&&n(d.path)},className:"text-muted-foreground hover:text-foreground flex items-center gap-1.5 transition-colors",children:[v.jsx(mc,{className:"h-3.5 w-3.5"}),o.name]}):v.jsxs("span",{className:"text-muted-foreground flex items-center gap-1.5",children:[v.jsx(mc,{className:"h-3.5 w-3.5"}),o.name]})]},o.path)})})}function Ole({entries:t,selectedPath:e,onSelect:n}){const i=t.filter(r=>r.type==="file");return v.jsx("div",{className:"scrollbar-thin scrollbar-track-transparent border-border bg-muted/30 flex gap-1 overflow-x-auto rounded-md border p-1",children:i.map(r=>{const s=r.path===e,o=r.path.endsWith(".md");return v.jsxs("button",{onClick:()=>n(r.path),title:r.path,className:`flex shrink-0 items-center gap-1.5 rounded px-2.5 py-1.5 text-xs transition-colors ${s?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:bg-background/50 hover:text-foreground"}`,children:[o?v.jsx(Pi,{className:"h-3.5 w-3.5"}):v.jsx(Ev,{className:"h-3.5 w-3.5"}),v.jsx("span",{className:"max-w-[120px] truncate",children:QN(r.path)})]},r.path)})})}function yle({entries:t,selectedPath:e,onSelect:n}){const i=r=>{const s=dle(r.path);if(!s)return 0;if(t.some(l=>l.type==="directory"&&l.path===s)){const l=t.find(c=>c.path===s);return i(l)+1}return r.path.split("/").length-1};return v.jsxs("div",{className:"border-border bg-muted/30 flex h-full flex-col rounded-md border",children:[v.jsx("div",{className:"border-border/50 text-muted-foreground border-b px-3 py-2 text-xs font-medium uppercase",children:"Files"}),v.jsx("div",{className:"scrollbar-thin scrollbar-track-transparent flex-1 overflow-y-auto",children:t.map(r=>{const s=i(r),o=r.path===e,l=r.type==="file",c=l?r.path.endsWith(".md")?v.jsx(Pi,{className:"h-4 w-4 shrink-0"}):v.jsx(Ev,{className:"h-4 w-4 shrink-0"}):v.jsx(mc,{className:"h-4 w-4 shrink-0"});return v.jsxs("button",{disabled:!l,onClick:()=>l&&n(r.path),className:`flex w-full items-center gap-2 px-3 py-1.5 text-sm transition-colors ${o?"bg-primary/10 text-foreground":l?"text-muted-foreground hover:bg-muted/50 hover:text-foreground":"text-muted-foreground cursor-default"}`,style:{paddingLeft:12+s*14},children:[c,v.jsx("span",{className:`truncate ${l?"":"text-foreground font-medium"}`,children:QN(r.path)})]},r.path)})})]})}function CN({changeId:t,archived:e=!1}){const{data:n,isLoading:i,error:r}=e?EZ(t):TZ(t),[s,o]=B.useState(null),l=B.useMemo(()=>n?[...n].sort(fle):[],[n]);B.useEffect(()=>{if(!l.length){o(null);return}if(!l.find(d=>d.path===s&&d.type==="file")){const d=l.find(p=>p.type==="file");o((d==null?void 0:d.path)??null)}},[l,s]);const c=B.useMemo(()=>!l.length||!s?null:l.find(h=>h.path===s&&h.type==="file")??null,[l,s]);return i?v.jsx("div",{className:"border-border bg-muted/20 flex h-[400px] items-center justify-center rounded-md border",children:v.jsx(nf,{className:"text-muted-foreground h-6 w-6 animate-spin"})}):r?v.jsxs("div",{className:"border-destructive/50 bg-destructive/10 text-destructive rounded-md border p-4 text-sm",children:["Failed to load files: ",r.message]}):l.length?v.jsxs("div",{className:"@container-[size] h-full",children:[v.jsx("style",{children:mle}),v.jsxs("div",{className:"fev-layout",children:[v.jsx("div",{className:"fev-sidebar-tabs",children:v.jsx(Ole,{entries:l,selectedPath:s,onSelect:o})}),v.jsx("div",{className:"fev-sidebar-tree",children:v.jsx(yle,{entries:l,selectedPath:s,onSelect:o})}),v.jsx("div",{className:"fev-editor-wrapper border-border bg-background overflow-hidden rounded-md border shadow-sm",children:c?v.jsxs(v.Fragment,{children:[v.jsx(gle,{path:c.path,entries:l,onNavigate:o}),v.jsx(TN,{value:c.content??"",filename:c.path,readOnly:!0,className:"min-h-0 flex-1"},c.path)]}):v.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center",children:"Select a file to view"})})]})]}):v.jsx("div",{className:"bg-muted/20 text-muted-foreground rounded-md p-4 text-sm",children:"No files found for this change."})}function ble(t){const e=new Map;for(const n of t){const i=n.section||"General",r=e.get(i)||[];r.push(n),e.set(i,r)}return Array.from(e.entries()).map(([n,i])=>({section:n,tasks:i,completed:i.filter(r=>r.completed).length,total:i.length}))}function xle(t){return`section-${t.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")}`}const vle=B.memo(function({task:e,taskIndex:n,isToggling:i,onToggle:r,readonly:s}){const o=v.jsxs(v.Fragment,{children:[i?v.jsx(nf,{className:"w-5 h-5 text-primary shrink-0 animate-spin"}):e.completed?v.jsx(Xo,{className:"w-5 h-5 text-green-500 shrink-0"}):v.jsx(SB,{className:"w-5 h-5 text-muted-foreground shrink-0 group-hover:text-primary"}),v.jsx("span",{className:e.completed?"line-through text-muted-foreground":"",children:e.text})]});return s||!r?v.jsx("div",{className:"w-full p-3 flex items-center gap-3 text-left",children:o}):v.jsx("button",{onClick:()=>r(n,!e.completed),className:"group w-full p-3 flex items-center gap-3 hover:bg-muted/50 transition-colors text-left",children:o})},(t,e)=>t.task.id===e.task.id&&t.task.completed===e.task.completed&&t.isToggling===e.isToggling&&t.readonly===e.readonly);function EN({tasks:t,progress:e,onToggleTask:n,togglingIndex:i=null,tocBaseIndex:r=0,readonly:s=!1}){const o=B.useMemo(()=>ble(t),[t]),l=e.total>0?Math.round(e.completed/e.total*100):0,c=(h,d)=>{let p=0;for(let g=0;g<h;g++)p+=o[g].tasks.length;return p+d+1};return v.jsxs(kC,{id:"tasks",index:r,children:[v.jsxs("div",{className:"flex items-center justify-between mb-3",children:[v.jsxs("h2",{className:"text-lg font-semibold",children:["Tasks (",e.completed,"/",e.total,")"]}),v.jsxs("span",{className:"text-sm text-muted-foreground",children:[l,"%"]})]}),v.jsx("div",{className:"w-full bg-muted rounded-full h-2 mb-4",children:v.jsx("div",{className:"bg-primary h-2 rounded-full transition-all",style:{width:`${l}%`}})}),v.jsxs("div",{className:"space-y-6",children:[o.map((h,d)=>{const p=xle(h.section),g=h.total>0?Math.round(h.completed/h.total*100):0;return v.jsxs(kC,{id:p,index:r+1+d,as:"div",children:[v.jsxs("div",{className:"flex items-center justify-between mb-2",children:[v.jsx("h3",{className:"font-medium text-foreground",children:h.section}),v.jsxs("span",{className:"text-xs text-muted-foreground",children:[h.completed,"/",h.total," (",g,"%)"]})]}),v.jsx("div",{className:"border border-border rounded-lg divide-y divide-border",children:h.tasks.map((O,x)=>{const S=c(d,x);return v.jsx(vle,{task:O,taskIndex:S,isToggling:i===S,onToggle:n,readonly:s},O.id)})})]},h.section)}),o.length===0&&v.jsx("div",{className:"p-4 text-muted-foreground text-center border border-border rounded-lg",children:"No tasks defined"})]})]})}function Sle(){var S,_;const{changeId:t}=iu({from:"/changes/$changeId"}),e=ru(),{openArchiveModal:n,state:i}=KR(),{data:r,isLoading:s}=PZ(t),[o,l]=B.useState(!0);B.useEffect(()=>{const k=requestAnimationFrame(()=>l(!1));return()=>cancelAnimationFrame(k)},[]);const c=B.useRef((r==null?void 0:r.name)??t);r!=null&&r.name&&(c.current=r.name),B.useEffect(()=>{!s&&!r&&i.open&&e({to:"/changes"})},[s,r,i.open,e]);const h=null,d=Rm({mutationFn:k=>At.change.toggleTask.mutate({changeId:t,taskIndex:k.taskIndex,completed:k.completed})}),p=B.useCallback((k,P)=>{d.mutate({taskIndex:k,completed:P})},[d]),g=d.isPending?((S=d.variables)==null?void 0:S.taskIndex)??null:null,O=B.useCallback(()=>{n(t,c.current)},[t,n]),x=B.useMemo(()=>r?[{id:"overview",label:"Overview",icon:v.jsx(Pi,{className:"h-4 w-4"}),content:v.jsx(XL,{change:r})},{id:"tasks",label:`Tasks (${r.progress.completed}/${r.progress.total})`,icon:v.jsx(qR,{className:"h-4 w-4"}),content:v.jsx(EN,{tasks:r.tasks,progress:r.progress,onToggleTask:p,togglingIndex:g})},{id:"folder",label:"Folder",icon:v.jsx(ZR,{className:"h-4 w-4"}),content:v.jsx(CN,{changeId:t})}]:[],[r,t,p,g]);return o||s&&!r?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading change..."}):r?v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6",children:[v.jsxs("div",{className:"change-header @container flex items-center justify-between gap-3",children:[v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx(It,{to:"/changes",className:"hover:bg-muted rounded-md p-2",children:v.jsx(Cv,{className:"h-5 w-5"})}),v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 font-bold",style:{fontSize:"clamp(1rem, 3cqi, 1.75rem)"},children:[v.jsx(tf,{className:"h-6 w-6 shrink-0"}),r.name]}),v.jsxs("p",{className:"text-muted-foreground",style:{fontSize:"clamp(0.7rem, 2cqi, 1rem)"},children:["ID: ",r.id]})]})]}),v.jsxs("button",{onClick:O,className:"change-archive-button @sm:gap-2 @sm:px-4 flex h-10 items-center gap-1.5 rounded-md bg-red-600 px-3 py-2 text-white hover:bg-red-700",children:[v.jsx(Ts,{className:"h-4 w-4"}),v.jsx("span",{className:"change-archive-text @sm:inline hidden",style:{fontSize:"clamp(0.85rem, 2cqi, 1rem)"},children:"Archive"})]})]}),h,v.jsx(cS,{tabs:x,defaultTab:(_=x[0])==null?void 0:_.id,className:"min-h-0 flex-1 gap-6"})]}):null}function _le(){const{data:t,isLoading:e}=QZ(),[n,i]=B.useState(!0);return B.useEffect(()=>{const r=requestAnimationFrame(()=>i(!1));return()=>cancelAnimationFrame(r)},[]),n||e&&!t?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading archived changes..."}):v.jsxs("div",{className:"space-y-6",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(Ts,{className:"h-6 w-6 shrink-0"}),"Archive"]}),v.jsx("p",{className:"text-muted-foreground",children:"Completed changes that have been archived after implementation."}),v.jsxs("div",{className:"border-border divide-border divide-y rounded-lg border",children:[t==null?void 0:t.map(r=>v.jsxs(It,{to:"/archive/$changeId",params:{changeId:r.id},className:"hover:bg-muted/50 flex items-center justify-between p-4",children:[v.jsxs("div",{className:"flex items-center gap-3",children:[v.jsx(Ts,{className:"text-muted-foreground h-5 w-5"}),v.jsxs("div",{children:[v.jsx("div",{className:"font-medium",children:r.name}),v.jsxs("div",{className:"text-muted-foreground text-sm",children:[r.id,r.updatedAt>0&&v.jsxs(v.Fragment,{children:[" · ",Lv(r.updatedAt)]})]})]})]}),v.jsx(Zg,{className:"text-muted-foreground h-4 w-4"})]},r.id)),(t==null?void 0:t.length)===0&&v.jsxs("div",{className:"text-muted-foreground p-8 text-center",children:[v.jsx(Ts,{className:"mx-auto mb-4 h-12 w-12 opacity-50"}),v.jsx("p",{children:"No archived changes yet."}),v.jsxs("p",{className:"mt-2 text-sm",children:["Changes are archived after implementation using"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:"openspec archive"})]})]})]})]})}const kle=rX("/archive/$changeId");function wle(){var s;const{changeId:t}=kle.useParams(),{data:e}=CZ(t),[n,i]=B.useState(!0);B.useEffect(()=>{const o=requestAnimationFrame(()=>i(!1));return()=>cancelAnimationFrame(o)},[]);const r=B.useMemo(()=>{if(!e)return[];const o=[{id:"overview",label:"Overview",icon:v.jsx(Pi,{className:"h-4 w-4"}),content:v.jsx(XL,{change:e})}];return e.tasks.length>0&&o.push({id:"tasks",label:`Tasks (${e.progress.completed}/${e.progress.total})`,icon:v.jsx(qR,{className:"h-4 w-4"}),content:v.jsx("div",{className:"border-border h-full overflow-auto rounded-lg border p-4",children:v.jsx(EN,{tasks:e.tasks,progress:e.progress,readonly:!0})})}),o.push({id:"folder",label:"Folder",icon:v.jsx(ZR,{className:"h-4 w-4"}),content:v.jsx(CN,{changeId:t,archived:!0})}),o},[e,t]);return n?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading archived change..."}):e?v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6",children:[v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx(It,{to:"/archive",className:"hover:bg-muted rounded-md p-2 transition-colors",title:"Back to Archive",children:v.jsx(Cv,{className:"h-5 w-5"})}),v.jsxs("div",{children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(Ts,{className:"h-6 w-6 shrink-0"}),e.name]}),v.jsx("p",{className:"text-muted-foreground text-sm",children:t})]})]}),v.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[v.jsx(Xo,{className:"h-4 w-4 text-green-500"}),v.jsxs("span",{className:"text-green-600",children:["Completed: ",e.progress.completed,"/",e.progress.total," tasks"]})]}),v.jsx(cS,{tabs:r,defaultTab:(s=r[0])==null?void 0:s.id,className:"min-h-0 flex-1 gap-6"})]}):v.jsxs("div",{className:"py-12 text-center",children:[v.jsxs("p",{className:"text-muted-foreground",children:["Archived change not found: ",t]}),v.jsx(It,{to:"/archive",className:"text-primary mt-4 inline-block hover:underline",children:"Back to Archive"})]})}function Ple(){const[t,e]=B.useState(!0),[n,i]=B.useState("project"),[r,s]=B.useState(null),[o,l]=B.useState("");B.useEffect(()=>{const C=requestAnimationFrame(()=>e(!1));return()=>cancelAnimationFrame(C)},[]);const{data:c,isLoading:h}=AZ(),{data:d,isLoading:p}=RZ(),g=Rm({mutationFn:C=>At.project.saveProjectMd.mutate({content:C}),onSuccess:()=>{s(null)}}),O=Rm({mutationFn:C=>At.project.saveAgentsMd.mutate({content:C}),onSuccess:()=>{s(null)}}),x=n==="project"?c:d,S=n==="project"?g:O,_=r===n,k=()=>{l(x||""),s(n)},P=()=>{S.mutate(o)},Q=()=>{s(null),l("")},R=[{id:"project",label:"project.md",icon:v.jsx(Pi,{className:"h-4 w-4"})},{id:"agents",label:"AGENTS.md",icon:v.jsx(dB,{className:"h-4 w-4"})}],$={project:v.jsxs("p",{children:[v.jsx("strong",{children:"project.md"})," defines project context, tech stack, and conventions for AI assistants."]}),agents:v.jsxs("p",{children:[v.jsx("strong",{children:"AGENTS.md"})," provides workflow instructions for AI coding assistants using OpenSpec."]})};return h||p?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading..."}):t?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading project..."}):v.jsxs("div",{className:"flex min-h-0 flex-1 flex-col gap-6",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(mc,{className:"h-6 w-6 shrink-0"}),"Project"]}),!_&&x&&v.jsxs("button",{onClick:k,className:"border-border hover:bg-muted flex items-center gap-2 rounded-md border px-3 py-1.5 text-sm",children:[v.jsx(WB,{className:"h-4 w-4"}),"Edit"]})]}),v.jsx("div",{className:"border-border flex gap-1 border-b",children:R.map(C=>v.jsxs("button",{onClick:()=>i(C.id),className:`-mb-px flex items-center gap-2 border-b-2 px-4 py-2 text-sm font-medium transition-colors ${n===C.id?"border-primary text-foreground":"text-muted-foreground hover:text-foreground border-transparent"}`,children:[C.icon,C.label]},C.id))}),v.jsxs("div",{className:"border-border min-h-0 flex-1 overflow-hidden rounded-lg border",children:[v.jsx(B.Activity,{mode:n==="project"?"visible":"hidden",children:v.jsx(O2,{content:c,isLoading:h,isEditing:r==="project",editContent:o,setEditContent:l,onCancel:Q,onSave:P,savePending:g.isPending,tabName:"project.md",defaultContent:"# Project Context\\n\\n## Purpose\\n\\n## Tech Stack\\n\\n## Conventions\\n",onStartEdit:()=>{l(c||""),s("project")}})}),v.jsx(B.Activity,{mode:n==="agents"?"visible":"hidden",children:v.jsx(O2,{content:d,isLoading:p,isEditing:r==="agents",editContent:o,setEditContent:l,onCancel:Q,onSave:P,savePending:O.isPending,tabName:"AGENTS.md",defaultContent:"# AI Agent Instructions\\n\\n## Workflow\\n\\n## Commands\\n",onStartEdit:()=>{l(d||""),s("agents")}})})]}),v.jsx("div",{className:"text-muted-foreground text-sm",children:$[n]})]})}function O2({content:t,isLoading:e,isEditing:n,editContent:i,setEditContent:r,onCancel:s,onSave:o,savePending:l,tabName:c,defaultContent:h,onStartEdit:d}){return e&&!t?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading..."}):t?n?v.jsxs("div",{className:"flex h-full flex-col",children:[v.jsxs("div",{className:"border-border bg-muted/30 flex items-center justify-between border-b p-2",children:[v.jsxs("span",{className:"px-2 text-sm font-medium",children:["Editing ",c]}),v.jsxs("div",{className:"flex gap-2",children:[v.jsxs("button",{onClick:s,className:"border-border hover:bg-muted flex items-center gap-1 rounded border px-3 py-1 text-sm",children:[v.jsx(Rv,{className:"h-3 w-3"}),"Cancel"]}),v.jsxs("button",{onClick:o,disabled:l,className:"bg-primary text-primary-foreground flex items-center gap-1 rounded px-3 py-1 text-sm hover:opacity-90 disabled:opacity-50",children:[v.jsx(JB,{className:"h-3 w-3"}),l?"Saving...":"Save"]})]})]}),v.jsx(TN,{value:i,onChange:r,filename:c,className:"min-h-0 flex-1"})]}):v.jsx(Mr,{markdown:t}):v.jsxs("div",{className:"text-muted-foreground p-8 text-center",children:[v.jsxs("p",{className:"mb-4",children:[c," not found."]}),v.jsxs("button",{onClick:()=>{r(h),d()},className:"bg-primary text-primary-foreground rounded-md px-4 py-2 hover:opacity-90",children:["Create ",c]})]})}function Tle({path:t,className:e=""}){const[n,i]=B.useState(!1),r=B.useCallback(async()=>{try{await navigator.clipboard.writeText(t),i(!0),setTimeout(()=>i(!1),2e3)}catch(s){console.error("Failed to copy path:",s)}},[t]);return v.jsxs("button",{onClick:r,className:`hover:bg-muted/50 group -m-2 flex cursor-pointer items-start gap-2 rounded p-2 text-left transition-colors ${e}`,title:"Click to copy",children:[v.jsx("code",{className:"bg-muted h-7 flex-1 break-all rounded px-2 py-1 font-mono text-sm",children:t}),v.jsx("span",{className:"text-muted-foreground group-hover:text-foreground mt-1 shrink-0 transition-colors",children:n?v.jsx(Vm,{className:"h-4 w-4 text-green-500"}):v.jsx(VR,{className:"h-4 w-4"})})]})}function Qle(){const t=localStorage.getItem("theme");return t==="light"||t==="dark"||t==="system"?t:"system"}function y2(t){const e=document.documentElement;if(t==="system"){const n=window.matchMedia("(prefers-color-scheme: dark)").matches;e.classList.toggle("dark",n)}else e.classList.toggle("dark",t==="dark")}function Cle(){var N,te,L;const[t,e]=B.useState(Qle),[n,i]=B.useState(pc()||""),[r,s]=B.useState(""),[o,l]=B.useState([]),[c,h]=B.useState(!1),[d,p]=B.useState(!1),[g,O]=B.useState("none"),x=qg(),{data:S}=$Z(),{data:_,isLoading:k,refetch:P}=Ny({...tb.cli.sniffGlobalCli.queryOptions(),staleTime:0,gcTime:0}),{data:Q,isLoading:R,refetch:$}=Ny(tb.cli.checkAvailability.queryOptions()),{data:C}=Ny(tb.cli.getAllTools.queryOptions()),D=(C==null?void 0:C.filter(re=>re.available))??[],Z=(C==null?void 0:C.filter(re=>!re.available))??[],{data:U}=LZ();B.useEffect(()=>{var re;(re=S==null?void 0:S.cli)!=null&&re.command?s(S.cli.command):s("")},[(N=S==null?void 0:S.cli)==null?void 0:N.command]);const M=B.useCallback(()=>{P(),$(),p(!1)},[P,$]),V=_!=null&&_.hasGlobal?`openspec (v${_.version||"detected"})`:"npx @fission-ai/openspec";B.useEffect(()=>{U&&U.length>0&&l(U)},[U]);const G=re=>{O(re),h(!0)},J=re=>(U==null?void 0:U.includes(re))??!1,K=re=>{J(re)||l(ge=>ge.includes(re)?ge.filter(be=>be!==re):[...ge,re])},ie=()=>{if(!C)return;const re=C.map(Ce=>Ce.value),be=re.filter(Ce=>!J(Ce)).every(Ce=>o.includes(Ce));l(be?U??[]:[...re])},q=o.filter(re=>!J(re)).length,se=Rm({mutationFn:re=>At.config.setCliCommand.mutate({command:re}),onSuccess:()=>{$()}});B.useEffect(()=>{y2(t),localStorage.setItem("theme",t)},[t]),B.useEffect(()=>{if(t!=="system")return;const re=window.matchMedia("(prefers-color-scheme: dark)"),ge=()=>y2("system");return re.addEventListener("change",ge),()=>re.removeEventListener("change",ge)},[t]);const pe=()=>{const re=new URL(window.location.href);n?re.searchParams.set("api",n):re.searchParams.delete("api"),window.location.href=re.toString()},[ve,j]=B.useState(!0);return B.useEffect(()=>{j(!1)},[]),ve?v.jsx("div",{className:"route-loading animate-pulse",children:"Loading settings..."}):v.jsxs("div",{className:"max-w-2xl space-y-8",children:[v.jsxs("h1",{className:"font-nav flex items-center gap-2 text-2xl font-bold",children:[v.jsx(UR,{className:"h-6 w-6 shrink-0"}),"Settings"]}),v.jsxs("section",{className:"space-y-4",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"Appearance"}),v.jsxs("div",{className:"border-border rounded-lg border p-4",children:[v.jsx("label",{className:"mb-3 block text-sm font-medium",children:"Theme"}),v.jsxs("div",{className:"flex gap-2",children:[v.jsxs("button",{onClick:()=>e("light"),className:`flex items-center gap-2 rounded-md border px-4 py-2 transition-colors ${t==="light"?"border-primary bg-primary text-primary-foreground":"border-border hover:bg-muted"}`,children:[v.jsx(nZ,{className:"h-4 w-4"}),"Light"]}),v.jsxs("button",{onClick:()=>e("dark"),className:`flex items-center gap-2 rounded-md border px-4 py-2 transition-colors ${t==="dark"?"border-primary bg-primary text-primary-foreground":"border-border hover:bg-muted"}`,children:[v.jsx(qB,{className:"h-4 w-4"}),"Dark"]}),v.jsxs("button",{onClick:()=>e("system"),className:`flex items-center gap-2 rounded-md border px-4 py-2 transition-colors ${t==="system"?"border-primary bg-primary text-primary-foreground":"border-border hover:bg-muted"}`,children:[v.jsx(BB,{className:"h-4 w-4"}),"System"]})]})]})]}),v.jsxs("section",{className:"space-y-4",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"Project Directory"}),v.jsx("div",{className:"border-border rounded-lg border p-4",children:v.jsxs("div",{className:"flex items-start gap-2",children:[v.jsx(BR,{className:"text-muted-foreground mt-1 h-4 w-4 shrink-0"}),x.projectDir?v.jsx(Tle,{path:x.projectDir,className:"flex-1"}):v.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading..."})]})})]}),v.jsxs("section",{className:"space-y-4",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"CLI Configuration"}),v.jsxs("div",{className:"border-border space-y-4 rounded-lg border p-4",children:[v.jsxs("div",{children:[v.jsx("label",{className:"mb-2 block text-sm font-medium",children:"Global CLI Detection"}),v.jsx("div",{className:"mb-2 flex items-center gap-2",children:k?v.jsxs("span",{className:"text-muted-foreground flex items-center gap-2 text-sm",children:[v.jsx(nf,{className:"h-4 w-4 animate-spin"}),"Detecting global openspec command..."]}):_!=null&&_.hasGlobal?v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("span",{className:"flex items-center gap-2 text-sm text-green-600",children:[v.jsx(Xo,{className:"h-4 w-4"}),"Global CLI installed:"," ",v.jsxs("code",{className:"bg-muted rounded px-1",children:["openspec ",_.version]})]}),_.hasUpdate&&_.latestVersion&&v.jsxs("span",{className:"flex items-center gap-2 text-sm text-amber-600",children:[v.jsx(dQ,{className:"h-4 w-4"}),"Update available:"," ",v.jsxs("code",{className:"bg-muted rounded px-1",children:["v",_.latestVersion]})]})]}):v.jsxs("div",{className:"flex flex-col gap-1",children:[v.jsxs("span",{className:"flex items-center gap-2 text-sm text-yellow-600",children:[v.jsx(pQ,{className:"h-4 w-4"}),"Global CLI not found"]}),(_==null?void 0:_.latestVersion)&&v.jsxs("span",{className:"text-muted-foreground text-xs",children:["Latest version:"," ",v.jsxs("code",{className:"bg-muted rounded px-1",children:["v",_.latestVersion]})]})]})}),!k&&(!(_!=null&&_.hasGlobal)||(_==null?void 0:_.hasUpdate))&&v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx("button",{onClick:()=>p(!0),className:"bg-primary text-primary-foreground flex items-center gap-2 rounded-md px-3 py-1.5 text-sm hover:opacity-90",children:_!=null&&_.hasUpdate?v.jsxs(v.Fragment,{children:[v.jsx(dQ,{className:"h-4 w-4"}),"Update to v",_.latestVersion]}):v.jsxs(v.Fragment,{children:[v.jsx(wB,{className:"h-4 w-4"}),"Install Globally"]})}),v.jsxs("span",{className:"text-muted-foreground text-xs",children:["Run:"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:"npm install -g @fission-ai/openspec"})]})]}),(_==null?void 0:_.error)&&v.jsxs("p",{className:"mt-1 text-sm text-red-500",children:["Detection error: ",_.error]})]}),v.jsxs("div",{className:"border-border border-t pt-3",children:[v.jsx("label",{className:"mb-2 block text-sm font-medium",children:"Custom CLI Command (Optional)"}),v.jsx("p",{className:"text-muted-foreground mb-3 text-sm",children:"Override the auto-detected CLI command. Leave empty to use the detected default."}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{type:"text",value:r,onChange:re=>s(re.target.value),placeholder:V,className:"border-border bg-background text-foreground flex-1 rounded-md border px-3 py-2 font-mono text-sm"}),v.jsx("button",{onClick:()=>se.mutate(r),disabled:se.isPending||r===(((te=S==null?void 0:S.cli)==null?void 0:te.command)??""),className:"bg-primary text-primary-foreground rounded-md px-4 py-2 hover:opacity-90 disabled:opacity-50",children:se.isPending?"Saving...":"Save"})]}),((L=S==null?void 0:S.cli)==null?void 0:L.command)&&v.jsxs("p",{className:"text-muted-foreground mt-2 text-xs",children:["Currently using custom command:"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:S.cli.command})]})]}),v.jsxs("div",{className:"border-border border-t pt-3",children:[v.jsxs("div",{className:"flex items-center gap-2",children:[v.jsx(YR,{className:"text-muted-foreground h-4 w-4"}),v.jsx("span",{className:"text-sm font-medium",children:"CLI Status:"}),R?v.jsxs("span",{className:"text-muted-foreground flex items-center gap-1 text-sm",children:[v.jsx(nf,{className:"h-4 w-4 animate-spin"}),"Checking..."]}):Q!=null&&Q.available?v.jsxs("span",{className:"flex items-center gap-1 text-sm text-green-600",children:[v.jsx(Xo,{className:"h-4 w-4"}),"Available ",Q.version&&`(${Q.version})`]}):v.jsxs("span",{className:"flex items-center gap-1 text-sm text-red-600",children:[v.jsx(pQ,{className:"h-4 w-4"}),"Not available"]})]}),Q&&!Q.available&&Q.error&&v.jsx("p",{className:"text-muted-foreground ml-6 mt-1 text-sm",children:Q.error})]})]})]}),v.jsxs("section",{className:"space-y-4",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"API Configuration"}),v.jsx("div",{className:"border-border space-y-4 rounded-lg border p-4",children:v.jsxs("div",{children:[v.jsx("label",{className:"mb-2 block text-sm font-medium",children:"API Server URL"}),v.jsx("p",{className:"text-muted-foreground mb-3 text-sm",children:"Leave empty for same-origin requests. Set a custom URL to connect to a different server."}),v.jsxs("div",{className:"flex gap-2",children:[v.jsx("input",{type:"text",value:n,onChange:re=>i(re.target.value),placeholder:window.location.origin,className:"border-border bg-background text-foreground flex-1 rounded-md border px-3 py-2"}),v.jsx("button",{onClick:pe,className:"bg-primary text-primary-foreground rounded-md px-4 py-2 hover:opacity-90",children:"Apply"})]}),pc()&&v.jsxs("p",{className:"text-muted-foreground mt-2 text-sm",children:["Current: ",v.jsx("code",{className:"bg-muted rounded px-1",children:pc()})]})]})})]}),v.jsxs("section",{className:"space-y-4",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"File Watcher"}),v.jsxs("div",{className:"border-border rounded-lg border p-4",children:[v.jsx("p",{className:"text-muted-foreground mb-3 text-sm",children:"File watcher is configured on the server side. Check the status bar at the bottom of the page to see if file watching is enabled."}),v.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[v.jsx(WR,{className:"h-4 w-4 text-green-500"}),v.jsx("span",{children:"Enabled: Real-time updates when files change"})]}),v.jsxs("div",{className:"mt-2 flex items-center gap-2 text-sm",children:[v.jsx(GR,{className:"h-4 w-4 text-yellow-500"}),v.jsx("span",{children:"Disabled: Manual refresh required"})]}),v.jsxs("p",{className:"text-muted-foreground mt-3 text-sm",children:["To disable file watching, restart the server with"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:"--no-watch"})," flag."]})]})]}),v.jsxs("section",{className:"space-y-4",children:[v.jsx("h2",{className:"text-lg font-semibold",children:"Initialize OpenSpec"}),v.jsxs("div",{className:"border-border space-y-4 rounded-lg border p-4",children:[v.jsxs("p",{className:"text-muted-foreground text-sm",children:["Create the OpenSpec directory structure in the current project. This will create"," ",v.jsx("code",{className:"bg-muted rounded px-1",children:"openspec/"})," with specs, changes, and archive directories."]}),v.jsxs("div",{className:"space-y-4",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsx("label",{className:"text-sm font-medium",children:"AI Tools Configuration"}),v.jsx("button",{onClick:ie,className:"text-primary text-xs hover:underline",children:C&&o.length===C.length?"Deselect All":"Select All"})]}),v.jsx("p",{className:"text-muted-foreground text-sm",children:"Select which AI tools to configure. Already configured tools cannot be deselected."}),v.jsxs("div",{children:[v.jsx("p",{className:"text-muted-foreground mb-2 text-xs font-medium",children:"Natively supported providers (✔ OpenSpec custom slash commands available)"}),v.jsx("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-3 md:grid-cols-4",children:D.map(re=>{const ge=J(re.value),be=o.includes(re.value);return v.jsxs("button",{onClick:()=>K(re.value),disabled:ge,title:ge?"Already configured":re.name,className:`flex items-center gap-1.5 rounded border px-2.5 py-1.5 text-left text-xs transition-colors ${ge?"cursor-not-allowed border-green-500/50 bg-green-500/10 text-green-600":be?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted"}`,children:[(ge||be)&&v.jsx(Vm,{className:`h-3 w-3 shrink-0 ${ge?"text-green-600":""}`}),v.jsx("span",{className:"truncate",children:re.name})]},re.value)})})]}),Z.length>0&&v.jsxs("div",{children:[v.jsx("p",{className:"text-muted-foreground mb-2 text-xs font-medium",children:"Other tools (use Universal AGENTS.md for Amp, VS Code, GitHub Copilot, …)"}),v.jsx("div",{className:"flex flex-wrap gap-2",children:Z.map(re=>{const ge=J(re.value),be=o.includes(re.value),Ce=re.value==="agents"?"Universal AGENTS.md":re.name,st=re.value==="agents"?"always available":void 0;return v.jsxs("button",{onClick:()=>K(re.value),disabled:ge,title:ge?"Already configured":re.name,className:`flex items-center gap-1.5 rounded border px-2.5 py-1.5 text-xs transition-colors ${ge?"cursor-not-allowed border-green-500/50 bg-green-500/10 text-green-600":be?"border-primary bg-primary/10 text-primary":"border-border hover:bg-muted"}`,children:[(ge||be)&&v.jsx(Vm,{className:`h-3 w-3 shrink-0 ${ge?"text-green-600":""}`}),v.jsx("span",{children:Ce}),st&&v.jsxs("span",{className:"text-muted-foreground",children:["(",st,")"]})]},re.value)})})]}),U&&U.length>0&&v.jsx("p",{className:"text-muted-foreground text-xs",children:v.jsxs("span",{className:"inline-flex items-center gap-1",children:[v.jsx("span",{className:"h-2 w-2 rounded-full bg-green-500/50"}),U.length," tool",U.length>1?"s":""," already configured"]})})]}),v.jsxs("div",{className:"border-border flex flex-wrap gap-2 border-t pt-2",children:[v.jsxs("button",{onClick:()=>G(o.length>0?o:"none"),className:"bg-primary text-primary-foreground flex items-center gap-2 rounded-md px-4 py-2 hover:opacity-90",children:[v.jsx(EB,{className:"h-4 w-4"}),q>0?`Add ${q} new tool${q>1?"s":""}`:o.length>0?"Refresh configuration":"Initialize (no tools)"]}),v.jsx("button",{onClick:()=>G("all"),className:"border-border hover:bg-muted rounded-md border px-4 py-2",children:"Initialize with All Tools"})]})]})]}),v.jsx(Nx,{title:"Initialize OpenSpec",open:c,onClose:()=>h(!1),type:"init",initOptions:{tools:g}}),v.jsx(Nx,{title:_!=null&&_.hasUpdate?"Update OpenSpec CLI":"Install OpenSpec CLI Globally",open:d,onClose:()=>p(!1),type:"install-global",successConfig:{title:_!=null&&_.hasUpdate?"Update Complete":"Installation Complete",description:_!=null&&_.hasUpdate?`OpenSpec CLI has been updated to v${_.latestVersion}. You can now use the latest features.`:'OpenSpec CLI has been installed globally. You can now use the "openspec" command from anywhere.',actions:[{label:"Close",onClick:()=>p(!1)},{label:"Re-detect CLI",onClick:M,primary:!0}]}})]})}const Yr=lX({component:xZ,pendingComponent:()=>v.jsx("div",{className:"route-loading animate-pulse p-6 text-center text-sm text-muted-foreground",children:"Loading..."})}),Ele=Vr({getParentRoute:()=>Yr,path:"/",component:MZ}),Ale=Vr({getParentRoute:()=>Yr,path:"/project",component:Ple}),Rle=Vr({getParentRoute:()=>Yr,path:"/specs",component:DZ}),$le=Vr({getParentRoute:()=>Yr,path:"/specs/$specId",component:kH}),Lle=Vr({getParentRoute:()=>Yr,path:"/changes",component:TH}),Mle=Vr({getParentRoute:()=>Yr,path:"/changes/$changeId",component:Sle}),Dle=Vr({getParentRoute:()=>Yr,path:"/archive",component:_le}),jle=Vr({getParentRoute:()=>Yr,path:"/archive/$changeId",component:wle}),Nle=Vr({getParentRoute:()=>Yr,path:"/settings",component:Cle}),zle=Yr.addChildren([Ele,Ale,Rle,$le,Lle,Mle,Dle,jle,Nle]),Ile=OX({routeTree:zle});function Xle(){return v.jsx(wI,{client:NR,children:v.jsx(pZ,{children:v.jsx(xX,{router:Ile})})})}tI.createRoot(document.getElementById("root")).render(v.jsx(Xle,{}));export{NS as C,bn as E,wt as I,Ds as L,UL as N,js as a,Xr as b,Sc as c,sie as d,Pj as e,Fo as f,pt as g,q1 as h,Ho as i,aee as j,uO as k,vg as l,Fn as m,ye as n,ae as o,Z5 as p,dS as q,A5 as r,Xs as s,A as t,jD as u,Wi as v};