@coralai/sps-cli 0.51.7 → 0.51.9

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.
Files changed (45) hide show
  1. package/README-CN.md +8 -5
  2. package/README.md +8 -5
  3. package/dist/commands/cardAdd.d.ts.map +1 -1
  4. package/dist/commands/cardAdd.js +4 -18
  5. package/dist/commands/cardAdd.js.map +1 -1
  6. package/dist/commands/doctor.d.ts.map +1 -1
  7. package/dist/commands/doctor.js +17 -8
  8. package/dist/commands/doctor.js.map +1 -1
  9. package/dist/commands/projectInit.d.ts.map +1 -1
  10. package/dist/commands/projectInit.js +2 -6
  11. package/dist/commands/projectInit.js.map +1 -1
  12. package/dist/commands/status.d.ts.map +1 -1
  13. package/dist/commands/status.js +4 -9
  14. package/dist/commands/status.js.map +1 -1
  15. package/dist/console/routes/chat.d.ts +2 -0
  16. package/dist/console/routes/chat.d.ts.map +1 -1
  17. package/dist/console/routes/chat.js +48 -4
  18. package/dist/console/routes/chat.js.map +1 -1
  19. package/dist/console/routes/fs.d.ts.map +1 -1
  20. package/dist/console/routes/fs.js +200 -10
  21. package/dist/console/routes/fs.js.map +1 -1
  22. package/dist/console-assets/assets/index-BJ1T4p1K.css +10 -0
  23. package/dist/console-assets/assets/index-EHLb9b5y.js +553 -0
  24. package/dist/console-assets/index.html +2 -2
  25. package/dist/engines/SchedulerEngine.d.ts +15 -24
  26. package/dist/engines/SchedulerEngine.d.ts.map +1 -1
  27. package/dist/engines/SchedulerEngine.js +23 -203
  28. package/dist/engines/SchedulerEngine.js.map +1 -1
  29. package/dist/engines/StageEngine.d.ts.map +1 -1
  30. package/dist/engines/StageEngine.js +2 -16
  31. package/dist/engines/StageEngine.js.map +1 -1
  32. package/dist/services/CardService.d.ts.map +1 -1
  33. package/dist/services/CardService.js +3 -1
  34. package/dist/services/CardService.js.map +1 -1
  35. package/dist/services/ChatService.d.ts +7 -0
  36. package/dist/services/ChatService.d.ts.map +1 -1
  37. package/dist/services/ChatService.js.map +1 -1
  38. package/dist/shared/runtimePaths.d.ts +3 -0
  39. package/dist/shared/runtimePaths.d.ts.map +1 -1
  40. package/dist/shared/runtimePaths.js +7 -0
  41. package/dist/shared/runtimePaths.js.map +1 -1
  42. package/package.json +1 -1
  43. package/skills/sps-pipeline/SKILL.md +11 -7
  44. package/dist/console-assets/assets/index-BGNm2VZT.css +0 -10
  45. package/dist/console-assets/assets/index-BJ4xlJpa.js +0 -531
@@ -1,531 +0,0 @@
1
- var Fk=Object.defineProperty;var uv=e=>{throw TypeError(e)};var Pk=(e,t,n)=>t in e?Fk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var fv=(e,t,n)=>Pk(e,typeof t!="symbol"?t+"":t,n),am=(e,t,n)=>t.has(e)||uv("Cannot "+n);var z=(e,t,n)=>(am(e,t,"read from private field"),n?n.call(e):t.get(e)),Te=(e,t,n)=>t.has(e)?uv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),be=(e,t,n,a)=>(am(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Fe=(e,t,n)=>(am(e,t,"access private method"),n);var qu=(e,t,n,a)=>({set _(s){be(e,t,s,n)},get _(){return z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Ap(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var rm={exports:{}},Fo={};/**
2
- * @license React
3
- * react-jsx-runtime.production.js
4
- *
5
- * Copyright (c) Meta Platforms, Inc. and affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var dv;function qk(){if(dv)return Fo;dv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Fo.Fragment=t,Fo.jsx=n,Fo.jsxs=n,Fo}var hv;function Hk(){return hv||(hv=1,rm.exports=qk()),rm.exports}var d=Hk(),sm={exports:{}},Ie={};/**
10
- * @license React
11
- * react.production.js
12
- *
13
- * Copyright (c) Meta Platforms, Inc. and affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var mv;function Kk(){if(mv)return Ie;mv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(L){return L===null||typeof L!="object"?null:(L=v&&L[v]||L["@@iterator"],typeof L=="function"?L:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(L,Z,C){this.props=L,this.context=Z,this.refs=k,this.updater=C||E}_.prototype.isReactComponent={},_.prototype.setState=function(L,Z){if(typeof L!="object"&&typeof L!="function"&&L!=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,L,Z,"setState")},_.prototype.forceUpdate=function(L){this.updater.enqueueForceUpdate(this,L,"forceUpdate")};function A(){}A.prototype=_.prototype;function T(L,Z,C){this.props=L,this.context=Z,this.refs=k,this.updater=C||E}var j=T.prototype=new A;j.constructor=T,w(j,_.prototype),j.isPureReactComponent=!0;var F=Array.isArray;function M(){}var q={H:null,A:null,T:null,S:null},K=Object.prototype.hasOwnProperty;function te(L,Z,C){var pe=C.ref;return{$$typeof:e,type:L,key:Z,ref:pe!==void 0?pe:null,props:C}}function D(L,Z){return te(L.type,Z,L.props)}function P(L){return typeof L=="object"&&L!==null&&L.$$typeof===e}function J(L){var Z={"=":"=0",":":"=2"};return"$"+L.replace(/[=:]/g,function(C){return Z[C]})}var re=/\/+/g;function Q(L,Z){return typeof L=="object"&&L!==null&&L.key!=null?J(""+L.key):Z.toString(36)}function Y(L){switch(L.status){case"fulfilled":return L.value;case"rejected":throw L.reason;default:switch(typeof L.status=="string"?L.then(M,M):(L.status="pending",L.then(function(Z){L.status==="pending"&&(L.status="fulfilled",L.value=Z)},function(Z){L.status==="pending"&&(L.status="rejected",L.reason=Z)})),L.status){case"fulfilled":return L.value;case"rejected":throw L.reason}}throw L}function U(L,Z,C,pe,_e){var ve=typeof L;(ve==="undefined"||ve==="boolean")&&(L=null);var ce=!1;if(L===null)ce=!0;else switch(ve){case"bigint":case"string":case"number":ce=!0;break;case"object":switch(L.$$typeof){case e:case t:ce=!0;break;case b:return ce=L._init,U(ce(L._payload),Z,C,pe,_e)}}if(ce)return _e=_e(L),ce=pe===""?"."+Q(L,0):pe,F(_e)?(C="",ce!=null&&(C=ce.replace(re,"$&/")+"/"),U(_e,Z,C,"",function(Dt){return Dt})):_e!=null&&(P(_e)&&(_e=D(_e,C+(_e.key==null||L&&L.key===_e.key?"":(""+_e.key).replace(re,"$&/")+"/")+ce)),Z.push(_e)),1;ce=0;var ke=pe===""?".":pe+":";if(F(L))for(var Ke=0;Ke<L.length;Ke++)pe=L[Ke],ve=ke+Q(pe,Ke),ce+=U(pe,Z,C,ve,_e);else if(Ke=x(L),typeof Ke=="function")for(L=Ke.call(L),Ke=0;!(pe=L.next()).done;)pe=pe.value,ve=ke+Q(pe,Ke++),ce+=U(pe,Z,C,ve,_e);else if(ve==="object"){if(typeof L.then=="function")return U(Y(L),Z,C,pe,_e);throw Z=String(L),Error("Objects are not valid as a React child (found: "+(Z==="[object Object]"?"object with keys {"+Object.keys(L).join(", ")+"}":Z)+"). If you meant to render a collection of children, use an array instead.")}return ce}function ae(L,Z,C){if(L==null)return L;var pe=[],_e=0;return U(L,pe,"","",function(ve){return Z.call(C,ve,_e++)}),pe}function G(L){if(L._status===-1){var Z=L._result;Z=Z(),Z.then(function(C){(L._status===0||L._status===-1)&&(L._status=1,L._result=C)},function(C){(L._status===0||L._status===-1)&&(L._status=2,L._result=C)}),L._status===-1&&(L._status=0,L._result=Z)}if(L._status===1)return L._result.default;throw L._result}var he=typeof reportError=="function"?reportError:function(L){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Z=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof L=="object"&&L!==null&&typeof L.message=="string"?String(L.message):String(L),error:L});if(!window.dispatchEvent(Z))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",L);return}console.error(L)},R={map:ae,forEach:function(L,Z,C){ae(L,function(){Z.apply(this,arguments)},C)},count:function(L){var Z=0;return ae(L,function(){Z++}),Z},toArray:function(L){return ae(L,function(Z){return Z})||[]},only:function(L){if(!P(L))throw Error("React.Children.only expected to receive a single React element child.");return L}};return Ie.Activity=g,Ie.Children=R,Ie.Component=_,Ie.Fragment=n,Ie.Profiler=s,Ie.PureComponent=T,Ie.StrictMode=a,Ie.Suspense=h,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(L){return q.H.useMemoCache(L)}},Ie.cache=function(L){return function(){return L.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(L,Z,C){if(L==null)throw Error("The argument must be a React element, but you passed "+L+".");var pe=w({},L.props),_e=L.key;if(Z!=null)for(ve in Z.key!==void 0&&(_e=""+Z.key),Z)!K.call(Z,ve)||ve==="key"||ve==="__self"||ve==="__source"||ve==="ref"&&Z.ref===void 0||(pe[ve]=Z[ve]);var ve=arguments.length-2;if(ve===1)pe.children=C;else if(1<ve){for(var ce=Array(ve),ke=0;ke<ve;ke++)ce[ke]=arguments[ke+2];pe.children=ce}return te(L.type,_e,pe)},Ie.createContext=function(L){return L={$$typeof:c,_currentValue:L,_currentValue2:L,_threadCount:0,Provider:null,Consumer:null},L.Provider=L,L.Consumer={$$typeof:o,_context:L},L},Ie.createElement=function(L,Z,C){var pe,_e={},ve=null;if(Z!=null)for(pe in Z.key!==void 0&&(ve=""+Z.key),Z)K.call(Z,pe)&&pe!=="key"&&pe!=="__self"&&pe!=="__source"&&(_e[pe]=Z[pe]);var ce=arguments.length-2;if(ce===1)_e.children=C;else if(1<ce){for(var ke=Array(ce),Ke=0;Ke<ce;Ke++)ke[Ke]=arguments[Ke+2];_e.children=ke}if(L&&L.defaultProps)for(pe in ce=L.defaultProps,ce)_e[pe]===void 0&&(_e[pe]=ce[pe]);return te(L,ve,_e)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(L){return{$$typeof:f,render:L}},Ie.isValidElement=P,Ie.lazy=function(L){return{$$typeof:b,_payload:{_status:-1,_result:L},_init:G}},Ie.memo=function(L,Z){return{$$typeof:m,type:L,compare:Z===void 0?null:Z}},Ie.startTransition=function(L){var Z=q.T,C={};q.T=C;try{var pe=L(),_e=q.S;_e!==null&&_e(C,pe),typeof pe=="object"&&pe!==null&&typeof pe.then=="function"&&pe.then(M,he)}catch(ve){he(ve)}finally{Z!==null&&C.types!==null&&(Z.types=C.types),q.T=Z}},Ie.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Ie.use=function(L){return q.H.use(L)},Ie.useActionState=function(L,Z,C){return q.H.useActionState(L,Z,C)},Ie.useCallback=function(L,Z){return q.H.useCallback(L,Z)},Ie.useContext=function(L){return q.H.useContext(L)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(L,Z){return q.H.useDeferredValue(L,Z)},Ie.useEffect=function(L,Z){return q.H.useEffect(L,Z)},Ie.useEffectEvent=function(L){return q.H.useEffectEvent(L)},Ie.useId=function(){return q.H.useId()},Ie.useImperativeHandle=function(L,Z,C){return q.H.useImperativeHandle(L,Z,C)},Ie.useInsertionEffect=function(L,Z){return q.H.useInsertionEffect(L,Z)},Ie.useLayoutEffect=function(L,Z){return q.H.useLayoutEffect(L,Z)},Ie.useMemo=function(L,Z){return q.H.useMemo(L,Z)},Ie.useOptimistic=function(L,Z){return q.H.useOptimistic(L,Z)},Ie.useReducer=function(L,Z,C){return q.H.useReducer(L,Z,C)},Ie.useRef=function(L){return q.H.useRef(L)},Ie.useState=function(L){return q.H.useState(L)},Ie.useSyncExternalStore=function(L,Z,C){return q.H.useSyncExternalStore(L,Z,C)},Ie.useTransition=function(){return q.H.useTransition()},Ie.version="19.2.5",Ie}var pv;function Op(){return pv||(pv=1,sm.exports=Kk()),sm.exports}var O=Op(),lm={exports:{}},Po={},om={exports:{}},cm={};/**
18
- * @license React
19
- * scheduler.production.js
20
- *
21
- * Copyright (c) Meta Platforms, Inc. and affiliates.
22
- *
23
- * This source code is licensed under the MIT license found in the
24
- * LICENSE file in the root directory of this source tree.
25
- */var gv;function Gk(){return gv||(gv=1,(function(e){function t(U,ae){var G=U.length;U.push(ae);e:for(;0<G;){var he=G-1>>>1,R=U[he];if(0<s(R,ae))U[he]=ae,U[G]=R,G=he;else break e}}function n(U){return U.length===0?null:U[0]}function a(U){if(U.length===0)return null;var ae=U[0],G=U.pop();if(G!==ae){U[0]=G;e:for(var he=0,R=U.length,L=R>>>1;he<L;){var Z=2*(he+1)-1,C=U[Z],pe=Z+1,_e=U[pe];if(0>s(C,G))pe<R&&0>s(_e,C)?(U[he]=_e,U[pe]=G,he=pe):(U[he]=C,U[Z]=G,he=Z);else if(pe<R&&0>s(_e,G))U[he]=_e,U[pe]=G,he=pe;else break e}}return ae}function s(U,ae){var G=U.sortIndex-ae.sortIndex;return G!==0?G:U.id-ae.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var o=performance;e.unstable_now=function(){return o.now()}}else{var c=Date,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],b=1,g=null,v=3,x=!1,E=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function j(U){for(var ae=n(m);ae!==null;){if(ae.callback===null)a(m);else if(ae.startTime<=U)a(m),ae.sortIndex=ae.expirationTime,t(h,ae);else break;ae=n(m)}}function F(U){if(w=!1,j(U),!E)if(n(h)!==null)E=!0,M||(M=!0,J());else{var ae=n(m);ae!==null&&Y(F,ae.startTime-U)}}var M=!1,q=-1,K=5,te=-1;function D(){return k?!0:!(e.unstable_now()-te<K)}function P(){if(k=!1,M){var U=e.unstable_now();te=U;var ae=!0;try{e:{E=!1,w&&(w=!1,A(q),q=-1),x=!0;var G=v;try{t:{for(j(U),g=n(h);g!==null&&!(g.expirationTime>U&&D());){var he=g.callback;if(typeof he=="function"){g.callback=null,v=g.priorityLevel;var R=he(g.expirationTime<=U);if(U=e.unstable_now(),typeof R=="function"){g.callback=R,j(U),ae=!0;break t}g===n(h)&&a(h),j(U)}else a(h);g=n(h)}if(g!==null)ae=!0;else{var L=n(m);L!==null&&Y(F,L.startTime-U),ae=!1}}break e}finally{g=null,v=G,x=!1}ae=void 0}}finally{ae?J():M=!1}}}var J;if(typeof T=="function")J=function(){T(P)};else if(typeof MessageChannel<"u"){var re=new MessageChannel,Q=re.port2;re.port1.onmessage=P,J=function(){Q.postMessage(null)}}else J=function(){_(P,0)};function Y(U,ae){q=_(function(){U(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(U){U.callback=null},e.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):K=0<U?Math.floor(1e3/U):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(U){switch(v){case 1:case 2:case 3:var ae=3;break;default:ae=v}var G=v;v=ae;try{return U()}finally{v=G}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(U,ae){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var G=v;v=U;try{return ae()}finally{v=G}},e.unstable_scheduleCallback=function(U,ae,G){var he=e.unstable_now();switch(typeof G=="object"&&G!==null?(G=G.delay,G=typeof G=="number"&&0<G?he+G:he):G=he,U){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=G+R,U={id:b++,callback:ae,priorityLevel:U,startTime:G,expirationTime:R,sortIndex:-1},G>he?(U.sortIndex=G,t(m,U),n(h)===null&&U===n(m)&&(w?(A(q),q=-1):w=!0,Y(F,G-he))):(U.sortIndex=R,t(h,U),E||x||(E=!0,M||(M=!0,J()))),U},e.unstable_shouldYield=D,e.unstable_wrapCallback=function(U){var ae=v;return function(){var G=v;v=ae;try{return U.apply(this,arguments)}finally{v=G}}}})(cm)),cm}var bv;function Qk(){return bv||(bv=1,om.exports=Gk()),om.exports}var um={exports:{}},hn={};/**
26
- * @license React
27
- * react-dom.production.js
28
- *
29
- * Copyright (c) Meta Platforms, Inc. and affiliates.
30
- *
31
- * This source code is licensed under the MIT license found in the
32
- * LICENSE file in the root directory of this source tree.
33
- */var yv;function Yk(){if(yv)return hn;yv=1;var e=Op();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(h,m,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:m,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return hn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,hn.createPortal=function(h,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(h,m,null,b)},hn.flushSync=function(h){var m=c.T,b=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=b,a.d.f()}},hn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},hn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},hn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var b=m.as,g=f(b,m.crossOrigin),v=typeof m.integrity=="string"?m.integrity:void 0,x=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):b==="script"&&a.d.X(h,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},hn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},hn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,g=f(b,m.crossOrigin);a.d.L(h,b,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},hn.preloadModule=function(h,m){if(typeof h=="string")if(m){var b=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},hn.requestFormReset=function(h){a.d.r(h)},hn.unstable_batchedUpdates=function(h,m){return h(m)},hn.useFormState=function(h,m,b){return c.H.useFormState(h,m,b)},hn.useFormStatus=function(){return c.H.useHostTransitionStatus()},hn.version="19.2.5",hn}var xv;function Vk(){if(xv)return um.exports;xv=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),um.exports=Yk(),um.exports}/**
34
- * @license React
35
- * react-dom-client.production.js
36
- *
37
- * Copyright (c) Meta Platforms, Inc. and affiliates.
38
- *
39
- * This source code is licensed under the MIT license found in the
40
- * LICENSE file in the root directory of this source tree.
41
- */var vv;function Xk(){if(vv)return Po;vv=1;var e=Qk(),t=Op(),n=Vk();function a(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,l=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(l=r.return),i=r.return;while(i)}return r.tag===3?l:null}function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function f(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function h(i){if(o(i)!==i)throw Error(a(188))}function m(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(a(188));return r!==i?null:i}for(var l=i,u=r;;){var p=l.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===l)return h(p),i;if(y===u)return h(p),r;y=y.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=y;else{for(var S=!1,N=p.child;N;){if(N===l){S=!0,l=p,u=y;break}if(N===u){S=!0,u=p,l=y;break}N=N.sibling}if(!S){for(N=y.child;N;){if(N===l){S=!0,l=y,u=p;break}if(N===u){S=!0,u=y,l=p;break}N=N.sibling}if(!S)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?i:r}function b(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=b(i),r!==null)return r;i=i.sibling}return null}var g=Object.assign,v=Symbol.for("react.element"),x=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),F=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),K=Symbol.for("react.lazy"),te=Symbol.for("react.activity"),D=Symbol.for("react.memo_cache_sentinel"),P=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=P&&i[P]||i["@@iterator"],typeof i=="function"?i:null)}var re=Symbol.for("react.client.reference");function Q(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===re?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case k:return"StrictMode";case F:return"Suspense";case M:return"SuspenseList";case te:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case T:return i.displayName||"Context";case A:return(i._context.displayName||"Context")+".Consumer";case j:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case q:return r=i.displayName||null,r!==null?r:Q(i.type)||"Memo";case K:r=i._payload,i=i._init;try{return Q(i(r))}catch{}}return null}var Y=Array.isArray,U=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,G={pending:!1,data:null,method:null,action:null},he=[],R=-1;function L(i){return{current:i}}function Z(i){0>R||(i.current=he[R],he[R]=null,R--)}function C(i,r){R++,he[R]=i.current,i.current=r}var pe=L(null),_e=L(null),ve=L(null),ce=L(null);function ke(i,r){switch(C(ve,r),C(_e,i),C(pe,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?jx(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=jx(r),i=Dx(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Z(pe),C(pe,i)}function Ke(){Z(pe),Z(_e),Z(ve)}function Dt(i){i.memoizedState!==null&&C(ce,i);var r=pe.current,l=Dx(r,i.type);r!==l&&(C(_e,i),C(pe,l))}function yn(i){_e.current===i&&(Z(pe),Z(_e)),ce.current===i&&(Z(ce),zo._currentValue=G)}var Ji,Ra;function Kn(i){if(Ji===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Ji=r&&r[1]||"",Ra=-1<l.stack.indexOf(`
42
- at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
- `+Ji+i+Ra}var Ii=!1;function Ze(i,r){if(!i||Ii)return"";Ii=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(ee){var W=ee}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(ee){W=ee}i.call(oe.prototype)}}else{try{throw Error()}catch(ee){W=ee}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(ee){if(ee&&W&&typeof ee.stack=="string")return[ee.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),S=y[0],N=y[1];if(S&&N){var I=S.split(`
44
- `),X=N.split(`
45
- `);for(p=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;p<X.length&&!X[p].includes("DetermineComponentFrameRoot");)p++;if(u===I.length||p===X.length)for(u=I.length-1,p=X.length-1;1<=u&&0<=p&&I[u]!==X[p];)p--;for(;1<=u&&0<=p;u--,p--)if(I[u]!==X[p]){if(u!==1||p!==1)do if(u--,p--,0>p||I[u]!==X[p]){var ie=`
46
- `+I[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=p);break}}}finally{Ii=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Kn(l):""}function _i(i,r){switch(i.tag){case 26:case 27:case 5:return Kn(i.type);case 16:return Kn("Lazy");case 13:return i.child!==r&&r!==null?Kn("Suspense Fallback"):Kn("Suspense");case 19:return Kn("SuspenseList");case 0:case 15:return Ze(i.type,!1);case 11:return Ze(i.type.render,!1);case 1:return Ze(i.type,!0);case 31:return Kn("Activity");default:return""}}function li(i){try{var r="",l=null;do r+=_i(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
47
- Error generating stack: `+u.message+`
48
- `+u.stack}}var zi=Object.prototype.hasOwnProperty,ea=e.unstable_scheduleCallback,Tr=e.unstable_cancelCallback,Gl=e.unstable_shouldYield,bs=e.unstable_requestPaint,Ot=e.unstable_now,ys=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,de=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,qe=e.unstable_LowPriority,nt=e.unstable_IdlePriority,xn=e.log,ki=e.unstable_setDisableYieldValue,an=null,Lt=null;function un(i){if(typeof xn=="function"&&ki(i),Lt&&typeof Lt.setStrictMode=="function")try{Lt.setStrictMode(an,i)}catch{}}var ot=Math.clz32?Math.clz32:Tc,Bi=Math.log,vn=Math.LN2;function Tc(i){return i>>>=0,i===0?32:31-(Bi(i)/vn|0)|0}var Cr=256,xs=262144,Ar=4194304;function Cn(i){var r=i&42;if(r!==0)return r;switch(i&-i){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 i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var p=0,y=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?p=Cn(u):(S&=N,S!==0?p=Cn(S):l||(l=N&~i,l!==0&&(p=Cn(l))))):(N=u&~y,N!==0?p=Cn(N):S!==0?p=Cn(S):l||(l=u&~i,l!==0&&(p=Cn(l)))),p===0?0:r!==0&&r!==p&&(r&y)===0&&(y=p&-p,l=r&-r,y>=l||y===32&&(l&4194048)!==0)?r:p}function se(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function ge(i,r){switch(i){case 1:case 2:case 4:case 8:case 64:return r+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 r+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 Le(){var i=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),i}function wt(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function bt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Ee(i,r,l,u,p,y){var S=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var N=i.entanglements,I=i.expirationTimes,X=i.hiddenUpdates;for(l=S&~l;0<l;){var ie=31-ot(l),oe=1<<ie;N[ie]=0,I[ie]=-1;var W=X[ie];if(W!==null)for(X[ie]=null,ie=0;ie<W.length;ie++){var ee=W[ie];ee!==null&&(ee.lane&=-536870913)}l&=~oe}u!==0&&ye(i,u,0),y!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=y&~(S&~r))}function ye(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-ot(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function De(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-ot(l),p=1<<u;p&r|i[u]&r&&(i[u]|=r),l&=~p}}function Ft(i,r){var l=r&-r;return l=(l&42)!==0?1:Nt(l),(l&(i.suspendedLanes|r))!==0?0:l}function Nt(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=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:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ta(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function vs(){var i=ae.p;return i!==0?i:(i=window.event,i===void 0?32:iv(i.type))}function Es(i,r){var l=ae.p;try{return ae.p=i,r()}finally{ae.p=l}}var Ui=Math.random().toString(36).slice(2),Pt="__reactFiber$"+Ui,fn="__reactProps$"+Ui,Ma="__reactContainer$"+Ui,Ql="__reactEvents$"+Ui,Cc="__reactListeners$"+Ui,Ss="__reactHandles$"+Ui,Ac="__reactResources$"+Ui,Or="__reactMarker$"+Ui;function Yl(i){delete i[Pt],delete i[fn],delete i[Ql],delete i[Cc],delete i[Ss]}function En(i){var r=i[Pt];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ma]||l[Pt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Fx(i);i!==null;){if(l=i[Pt])return l;i=Fx(i)}return r}i=l,l=i.parentNode}return null}function na(i){if(i=i[Pt]||i[Ma]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ja(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function Da(i){var r=i[Ac];return r||(r=i[Ac]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Gt(i){i[Or]=!0}var Oc=new Set,Rr={};function ia(i,r){ue(i,r),ue(i+"Capture",r)}function ue(i,r){for(Rr[i]=r,i=0;i<r.length;i++)Oc.add(r[i])}var Ne=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]*$"),He={},ct={};function qt(i){return zi.call(ct,i)?!0:zi.call(He,i)?!1:Ne.test(i)?ct[i]=!0:(He[i]=!0,!1)}function dn(i,r,l){if(qt(r))if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":i.removeAttribute(r);return;case"boolean":var u=r.toLowerCase().slice(0,5);if(u!=="data-"&&u!=="aria-"){i.removeAttribute(r);return}}i.setAttribute(r,""+l)}}function Gn(i,r,l){if(l===null)i.removeAttribute(r);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(r);return}i.setAttribute(r,""+l)}}function An(i,r,l,u){if(u===null)i.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,""+u)}}function Et(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Qn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Rc(i,r,l){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return p.call(this)},set:function(S){l=""+S,y.call(this,S)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function ws(i){if(!i._valueTracker){var r=Qn(i)?"checked":"value";i._valueTracker=Rc(i,r,""+i[r])}}function Vl(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return i&&(u=Qn(i)?i.checked?"true":"false":i.value),i=u,i!==l?(r.setValue(i),!0):!1}function _s(i){if(i=i||(typeof document<"u"?document:void 0),typeof i>"u")return null;try{return i.activeElement||i.body}catch{return i.body}}var id=/[\n"\\]/g;function On(i){return i.replace(id,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Xl(i,r,l,u,p,y,S,N){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),r!=null?S==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+Et(r)):i.value!==""+Et(r)&&(i.value=""+Et(r)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),r!=null?ks(i,S,Et(r)):l!=null?ks(i,S,Et(l)):u!=null&&i.removeAttribute("value"),p==null&&y!=null&&(i.defaultChecked=!!y),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+Et(N):i.removeAttribute("name")}function Mr(i,r,l,u,p,y,S,N){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(i.type=y),r!=null||l!=null){if(!(y!=="submit"&&y!=="reset"||r!=null)){ws(i);return}l=l!=null?""+Et(l):"",r=r!=null?""+Et(r):l,N||r===i.value||(i.value=r),i.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=N?i.checked:!!u,i.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),ws(i)}function ks(i,r,l){r==="number"&&_s(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function rn(i,r,l,u){if(i=i.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<i.length;l++)p=r.hasOwnProperty("$"+i[l].value),i[l].selected!==p&&(i[l].selected=p),p&&u&&(i[l].defaultSelected=!0)}else{for(l=""+Et(l),r=null,p=0;p<i.length;p++){if(i[p].value===l){i[p].selected=!0,u&&(i[p].defaultSelected=!0);return}r!==null||i[p].disabled||(r=i[p])}r!==null&&(r.selected=!0)}}function Mc(i,r,l){if(r!=null&&(r=""+Et(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+Et(l):""}function Ns(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(Y(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=Et(r),i.defaultValue=l,u=i.textContent,u===l&&u!==""&&u!==null&&(i.value=u),ws(i)}function je(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var jc=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 Qt(i,r,l){var u=r.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?u?i.setProperty(r,""):r==="float"?i.cssFloat="":i[r]="":u?i.setProperty(r,l):typeof l!="number"||l===0||jc.has(r)?r==="float"?i.cssFloat=l:i[r]=(""+l).trim():i[r]=l+"px"}function ut(i,r,l){if(r!=null&&typeof r!="object")throw Error(a(62));if(i=i.style,l!=null){for(var u in l)!l.hasOwnProperty(u)||r!=null&&r.hasOwnProperty(u)||(u.indexOf("--")===0?i.setProperty(u,""):u==="float"?i.cssFloat="":i[u]="");for(var p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&Qt(i,p,u)}else for(var y in r)r.hasOwnProperty(y)&&Qt(i,y,r[y])}function La(i){if(i.indexOf("-")===-1)return!1;switch(i){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 aa=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"]]),Wl=/^[\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 Ia(i){return Wl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function me(){}var Se=null;function Be(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ve=null,Rt=null;function oi(i){var r=na(i);if(r&&(i=r.stateNode)){var l=i[fn]||null;e:switch(i=r.stateNode,r.type){case"input":if(Xl(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+On(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var p=u[fn]||null;if(!p)throw Error(a(90));Xl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===i.form&&Vl(u)}break e;case"textarea":Mc(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&rn(i,!!l.multiple,r,!1)}}}var Zl=!1;function Dc(i,r,l){if(Zl)return i(r,l);Zl=!0;try{var u=i(r);return u}finally{if(Zl=!1,(Ve!==null||Rt!==null)&&(Eu(),Ve&&(r=Ve,i=Rt,Rt=Ve=null,oi(r),i)))for(r=0;r<i.length;r++)oi(i[r])}}function Jl(i,r){var l=i.stateNode;if(l===null)return null;var u=l[fn]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ad=!1;if(ra)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){ad=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{ad=!1}var za=null,rd=null,Lc=null;function Dg(){if(Lc)return Lc;var i,r=rd,l=r.length,u,p="value"in za?za.value:za.textContent,y=p.length;for(i=0;i<l&&r[i]===p[i];i++);var S=l-i;for(u=1;u<=S&&r[l-u]===p[y-u];u++);return Lc=p.slice(i,1<u?1-u:void 0)}function Ic(i){var r=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&r===13&&(i=13)):i=r,i===10&&(i=13),32<=i||i===13?i:0}function zc(){return!0}function Lg(){return!1}function Rn(i){function r(l,u,p,y,S){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(l=i[N],this[N]=l?l(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?zc:Lg,this.isPropagationStopped=Lg,this}return g(r.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=zc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=zc)},persist:function(){},isPersistent:zc}),r}var jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Bc=Rn(jr),to=g({},jr,{view:0,detail:0}),Uw=Rn(to),sd,ld,no,Uc=g({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:cd,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==no&&(no&&i.type==="mousemove"?(sd=i.screenX-no.screenX,ld=i.screenY-no.screenY):ld=sd=0,no=i),sd)},movementY:function(i){return"movementY"in i?i.movementY:ld}}),Ig=Rn(Uc),$w=g({},Uc,{dataTransfer:0}),Fw=Rn($w),Pw=g({},to,{relatedTarget:0}),od=Rn(Pw),qw=g({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),Hw=Rn(qw),Kw=g({},jr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Gw=Rn(Kw),Qw=g({},jr,{data:0}),zg=Rn(Qw),Yw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Vw={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"},Xw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Ww(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=Xw[i])?!!r[i]:!1}function cd(){return Ww}var Zw=g({},to,{key:function(i){if(i.key){var r=Yw[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Ic(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?Vw[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:cd,charCode:function(i){return i.type==="keypress"?Ic(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Ic(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),Jw=Rn(Zw),e_=g({},Uc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Bg=Rn(e_),t_=g({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:cd}),n_=Rn(t_),i_=g({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),a_=Rn(i_),r_=g({},Uc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),s_=Rn(r_),l_=g({},jr,{newState:0,oldState:0}),o_=Rn(l_),c_=[9,13,27,32],ud=ra&&"CompositionEvent"in window,io=null;ra&&"documentMode"in document&&(io=document.documentMode);var u_=ra&&"TextEvent"in window&&!io,Ug=ra&&(!ud||io&&8<io&&11>=io),$g=" ",Fg=!1;function Pg(i,r){switch(i){case"keyup":return c_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ts=!1;function f_(i,r){switch(i){case"compositionend":return qg(r);case"keypress":return r.which!==32?null:(Fg=!0,$g);case"textInput":return i=r.data,i===$g&&Fg?null:i;default:return null}}function d_(i,r){if(Ts)return i==="compositionend"||!ud&&Pg(i,r)?(i=Dg(),Lc=rd=za=null,Ts=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1<r.char.length)return r.char;if(r.which)return String.fromCharCode(r.which)}return null;case"compositionend":return Ug&&r.locale!=="ko"?null:r.data;default:return null}}var h_={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 Hg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!h_[i.type]:r==="textarea"}function Kg(i,r,l,u){Ve?Rt?Rt.push(u):Rt=[u]:Ve=u,r=Cu(r,"onChange"),0<r.length&&(l=new Bc("onChange","change",null,l,u),i.push({event:l,listeners:r}))}var ao=null,ro=null;function m_(i){Tx(i,0)}function $c(i){var r=ja(i);if(Vl(r))return i}function Gg(i,r){if(i==="change")return r}var Qg=!1;if(ra){var fd;if(ra){var dd="oninput"in document;if(!dd){var Yg=document.createElement("div");Yg.setAttribute("oninput","return;"),dd=typeof Yg.oninput=="function"}fd=dd}else fd=!1;Qg=fd&&(!document.documentMode||9<document.documentMode)}function Vg(){ao&&(ao.detachEvent("onpropertychange",Xg),ro=ao=null)}function Xg(i){if(i.propertyName==="value"&&$c(ro)){var r=[];Kg(r,ro,i,Be(i)),Dc(m_,r)}}function p_(i,r,l){i==="focusin"?(Vg(),ao=r,ro=l,ao.attachEvent("onpropertychange",Xg)):i==="focusout"&&Vg()}function g_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $c(ro)}function b_(i,r){if(i==="click")return $c(r)}function y_(i,r){if(i==="input"||i==="change")return $c(r)}function x_(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Yn=typeof Object.is=="function"?Object.is:x_;function so(i,r){if(Yn(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var l=Object.keys(i),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!zi.call(r,p)||!Yn(i[p],r[p]))return!1}return!0}function Wg(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function Zg(i,r){var l=Wg(i);i=0;for(var u;l;){if(l.nodeType===3){if(u=i+l.textContent.length,i<=r&&u>=r)return{node:l,offset:r-i};i=u}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Wg(l)}}function Jg(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?Jg(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function eb(i){i=i!=null&&i.ownerDocument!=null&&i.ownerDocument.defaultView!=null?i.ownerDocument.defaultView:window;for(var r=_s(i.document);r instanceof i.HTMLIFrameElement;){try{var l=typeof r.contentWindow.location.href=="string"}catch{l=!1}if(l)i=r.contentWindow;else break;r=_s(i.document)}return r}function hd(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r&&(r==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||r==="textarea"||i.contentEditable==="true")}var v_=ra&&"documentMode"in document&&11>=document.documentMode,Cs=null,md=null,lo=null,pd=!1;function tb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;pd||Cs==null||Cs!==_s(u)||(u=Cs,"selectionStart"in u&&hd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),lo&&so(lo,u)||(lo=u,u=Cu(md,"onSelect"),0<u.length&&(r=new Bc("onSelect","select",null,r,l),i.push({event:r,listeners:u}),r.target=Cs)))}function Dr(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var As={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionrun:Dr("Transition","TransitionRun"),transitionstart:Dr("Transition","TransitionStart"),transitioncancel:Dr("Transition","TransitionCancel"),transitionend:Dr("Transition","TransitionEnd")},gd={},nb={};ra&&(nb=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Lr(i){if(gd[i])return gd[i];if(!As[i])return i;var r=As[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in nb)return gd[i]=r[l];return i}var ib=Lr("animationend"),ab=Lr("animationiteration"),rb=Lr("animationstart"),E_=Lr("transitionrun"),S_=Lr("transitionstart"),w_=Lr("transitioncancel"),sb=Lr("transitionend"),lb=new Map,bd="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(" ");bd.push("scrollEnd");function Ni(i,r){lb.set(i,r),ia(r,[i])}var Fc=typeof reportError=="function"?reportError:function(i){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var r=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof i=="object"&&i!==null&&typeof i.message=="string"?String(i.message):String(i),error:i});if(!window.dispatchEvent(r))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",i);return}console.error(i)},ci=[],Os=0,yd=0;function Pc(){for(var i=Os,r=yd=Os=0;r<i;){var l=ci[r];ci[r++]=null;var u=ci[r];ci[r++]=null;var p=ci[r];ci[r++]=null;var y=ci[r];if(ci[r++]=null,u!==null&&p!==null){var S=u.pending;S===null?p.next=p:(p.next=S.next,S.next=p),u.pending=p}y!==0&&ob(l,p,y)}}function qc(i,r,l,u){ci[Os++]=i,ci[Os++]=r,ci[Os++]=l,ci[Os++]=u,yd|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function xd(i,r,l,u){return qc(i,r,l,u),Hc(i)}function Ir(i,r){return qc(i,null,null,r),Hc(i)}function ob(i,r,l){i.lanes|=l;var u=i.alternate;u!==null&&(u.lanes|=l);for(var p=!1,y=i.return;y!==null;)y.childLanes|=l,u=y.alternate,u!==null&&(u.childLanes|=l),y.tag===22&&(i=y.stateNode,i===null||i._visibility&1||(p=!0)),i=y,y=y.return;return i.tag===3?(y=i.stateNode,p&&r!==null&&(p=31-ot(l),i=y.hiddenUpdates,u=i[p],u===null?i[p]=[r]:u.push(r),r.lane=l|536870912),y):null}function Hc(i){if(50<Oo)throw Oo=0,Ch=null,Error(a(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Rs={};function __(i,r,l,u){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=r,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=u,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Vn(i,r,l,u){return new __(i,r,l,u)}function vd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function sa(i,r){var l=i.alternate;return l===null?(l=Vn(i.tag,r,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=r,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&65011712,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,r=i.dependencies,l.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l.refCleanup=i.refCleanup,l}function cb(i,r){i.flags&=65011714;var l=i.alternate;return l===null?(i.childLanes=0,i.lanes=r,i.child=null,i.subtreeFlags=0,i.memoizedProps=null,i.memoizedState=null,i.updateQueue=null,i.dependencies=null,i.stateNode=null):(i.childLanes=l.childLanes,i.lanes=l.lanes,i.child=l.child,i.subtreeFlags=0,i.deletions=null,i.memoizedProps=l.memoizedProps,i.memoizedState=l.memoizedState,i.updateQueue=l.updateQueue,i.type=l.type,r=l.dependencies,i.dependencies=r===null?null:{lanes:r.lanes,firstContext:r.firstContext}),i}function Kc(i,r,l,u,p,y){var S=0;if(u=i,typeof i=="function")vd(i)&&(S=1);else if(typeof i=="string")S=Ak(i,l,pe.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case te:return i=Vn(31,l,r,p),i.elementType=te,i.lanes=y,i;case w:return zr(l.children,p,y,r);case k:S=8,p|=24;break;case _:return i=Vn(12,l,r,p|2),i.elementType=_,i.lanes=y,i;case F:return i=Vn(13,l,r,p),i.elementType=F,i.lanes=y,i;case M:return i=Vn(19,l,r,p),i.elementType=M,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:S=10;break e;case A:S=9;break e;case j:S=11;break e;case q:S=14;break e;case K:S=16,u=null;break e}S=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Vn(S,l,r,p),r.elementType=i,r.type=u,r.lanes=y,r}function zr(i,r,l,u){return i=Vn(7,i,u,r),i.lanes=l,i}function Ed(i,r,l){return i=Vn(6,i,null,r),i.lanes=l,i}function ub(i){var r=Vn(18,null,null,0);return r.stateNode=i,r}function Sd(i,r,l){return r=Vn(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var fb=new WeakMap;function ui(i,r){if(typeof i=="object"&&i!==null){var l=fb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:li(r)},fb.set(i,r),r)}return{value:i,source:r,stack:li(r)}}var Ms=[],js=0,Gc=null,oo=0,fi=[],di=0,Ba=null,$i=1,Fi="";function la(i,r){Ms[js++]=oo,Ms[js++]=Gc,Gc=i,oo=r}function db(i,r,l){fi[di++]=$i,fi[di++]=Fi,fi[di++]=Ba,Ba=i;var u=$i;i=Fi;var p=32-ot(u)-1;u&=~(1<<p),l+=1;var y=32-ot(r)+p;if(30<y){var S=p-p%5;y=(u&(1<<S)-1).toString(32),u>>=S,p-=S,$i=1<<32-ot(r)+p|l<<p|u,Fi=y+i}else $i=1<<y|l<<p|u,Fi=i}function wd(i){i.return!==null&&(la(i,1),db(i,1,0))}function _d(i){for(;i===Gc;)Gc=Ms[--js],Ms[js]=null,oo=Ms[--js],Ms[js]=null;for(;i===Ba;)Ba=fi[--di],fi[di]=null,Fi=fi[--di],fi[di]=null,$i=fi[--di],fi[di]=null}function hb(i,r){fi[di++]=$i,fi[di++]=Fi,fi[di++]=Ba,$i=r.id,Fi=r.overflow,Ba=i}var sn=null,_t=null,Je=!1,Ua=null,hi=!1,kd=Error(a(519));function $a(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw co(ui(r,i)),kd}function mb(i){var r=i.stateNode,l=i.type,u=i.memoizedProps;switch(r[Pt]=i,r[fn]=u,l){case"dialog":Qe("cancel",r),Qe("close",r);break;case"iframe":case"object":case"embed":Qe("load",r);break;case"video":case"audio":for(l=0;l<Mo.length;l++)Qe(Mo[l],r);break;case"source":Qe("error",r);break;case"img":case"image":case"link":Qe("error",r),Qe("load",r);break;case"details":Qe("toggle",r);break;case"input":Qe("invalid",r),Mr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Qe("invalid",r);break;case"textarea":Qe("invalid",r),Ns(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||Rx(r.textContent,l)?(u.popover!=null&&(Qe("beforetoggle",r),Qe("toggle",r)),u.onScroll!=null&&Qe("scroll",r),u.onScrollEnd!=null&&Qe("scrollend",r),u.onClick!=null&&(r.onclick=me),r=!0):r=!1,r||$a(i,!0)}function pb(i){for(sn=i.return;sn;)switch(sn.tag){case 5:case 31:case 13:hi=!1;return;case 27:case 3:hi=!0;return;default:sn=sn.return}}function Ds(i){if(i!==sn)return!1;if(!Je)return pb(i),Je=!0,!1;var r=i.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||qh(i.type,i.memoizedProps)),l=!l),l&&_t&&$a(i),pb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=$x(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));_t=$x(i)}else r===27?(r=_t,er(i.type)?(i=Yh,Yh=null,_t=i):_t=r):_t=sn?pi(i.stateNode.nextSibling):null;return!0}function Br(){_t=sn=null,Je=!1}function Nd(){var i=Ua;return i!==null&&(Ln===null?Ln=i:Ln.push.apply(Ln,i),Ua=null),i}function co(i){Ua===null?Ua=[i]:Ua.push(i)}var Td=L(null),Ur=null,oa=null;function Fa(i,r,l){C(Td,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=Td.current,Z(Td)}function Cd(i,r,l){for(;i!==null;){var u=i.alternate;if((i.childLanes&r)!==r?(i.childLanes|=r,u!==null&&(u.childLanes|=r)):u!==null&&(u.childLanes&r)!==r&&(u.childLanes|=r),i===l)break;i=i.return}}function Ad(i,r,l,u){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var y=p.dependencies;if(y!==null){var S=p.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=p;for(var I=0;I<r.length;I++)if(N.context===r[I]){y.lanes|=l,N=y.alternate,N!==null&&(N.lanes|=l),Cd(y.return,l,i),u||(S=null);break e}y=N.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(a(341));S.lanes|=l,y=S.alternate,y!==null&&(y.lanes|=l),Cd(S,l,i),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===i){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function Ls(i,r,l,u){i=null;for(var p=r,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var N=p.type;Yn(p.pendingProps.value,S.value)||(i!==null?i.push(N):i=[N])}}else if(p===ce.current){if(S=p.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(zo):i=[zo])}p=p.return}i!==null&&Ad(r,i,l,u),r.flags|=262144}function Qc(i){for(i=i.firstContext;i!==null;){if(!Yn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function $r(i){Ur=i,oa=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function ln(i){return gb(Ur,i)}function Yc(i,r){return Ur===null&&$r(i),gb(i,r)}function gb(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},oa===null){if(i===null)throw Error(a(308));oa=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else oa=oa.next=r;return l}var k_=typeof AbortController<"u"?AbortController:function(){var i=[],r=this.signal={aborted:!1,addEventListener:function(l,u){i.push(u)}};this.abort=function(){r.aborted=!0,i.forEach(function(l){return l()})}},N_=e.unstable_scheduleCallback,T_=e.unstable_NormalPriority,Yt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Od(){return{controller:new k_,data:new Map,refCount:0}}function uo(i){i.refCount--,i.refCount===0&&N_(T_,function(){i.controller.abort()})}var fo=null,Rd=0,Is=0,zs=null;function C_(i,r){if(fo===null){var l=fo=[];Rd=0,Is=Dh(),zs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Rd++,r.then(bb,bb),r}function bb(){if(--Rd===0&&fo!==null){zs!==null&&(zs.status="fulfilled");var i=fo;fo=null,Is=0,zs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function A_(i,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var yb=U.S;U.S=function(i,r){tx=Ot(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&C_(i,r),yb!==null&&yb(i,r)};var Fr=L(null);function Md(){var i=Fr.current;return i!==null?i:yt.pooledCache}function Vc(i,r){r===null?C(Fr,Fr.current):C(Fr,r.pool)}function xb(){var i=Md();return i===null?null:{parent:Yt._currentValue,pool:i}}var Bs=Error(a(460)),jd=Error(a(474)),Xc=Error(a(542)),Wc={then:function(){}};function vb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Eb(i,r,l){switch(l=i[l],l===void 0?i.push(r):l!==r&&(r.then(me,me),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,wb(i),i;default:if(typeof r.status=="string")r.then(me,me);else{if(i=yt,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,wb(i),i}throw qr=r,Bs}}function Pr(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(qr=l,Bs):l}}var qr=null;function Sb(){if(qr===null)throw Error(a(459));var i=qr;return qr=null,i}function wb(i){if(i===Bs||i===Xc)throw Error(a(483))}var Us=null,ho=0;function Zc(i){var r=ho;return ho+=1,Us===null&&(Us=[]),Eb(Us,i,r)}function mo(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function Jc(i,r){throw r.$$typeof===v?Error(a(525)):(i=Object.prototype.toString.call(r),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function _b(i){function r(H,$){if(i){var V=H.deletions;V===null?(H.deletions=[$],H.flags|=16):V.push($)}}function l(H,$){if(!i)return null;for(;$!==null;)r(H,$),$=$.sibling;return null}function u(H){for(var $=new Map;H!==null;)H.key!==null?$.set(H.key,H):$.set(H.index,H),H=H.sibling;return $}function p(H,$){return H=sa(H,$),H.index=0,H.sibling=null,H}function y(H,$,V){return H.index=V,i?(V=H.alternate,V!==null?(V=V.index,V<$?(H.flags|=67108866,$):V):(H.flags|=67108866,$)):(H.flags|=1048576,$)}function S(H){return i&&H.alternate===null&&(H.flags|=67108866),H}function N(H,$,V,le){return $===null||$.tag!==6?($=Ed(V,H.mode,le),$.return=H,$):($=p($,V),$.return=H,$)}function I(H,$,V,le){var Ce=V.type;return Ce===w?ie(H,$,V.props.children,le,V.key):$!==null&&($.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===K&&Pr(Ce)===$.type)?($=p($,V.props),mo($,V),$.return=H,$):($=Kc(V.type,V.key,V.props,null,H.mode,le),mo($,V),$.return=H,$)}function X(H,$,V,le){return $===null||$.tag!==4||$.stateNode.containerInfo!==V.containerInfo||$.stateNode.implementation!==V.implementation?($=Sd(V,H.mode,le),$.return=H,$):($=p($,V.children||[]),$.return=H,$)}function ie(H,$,V,le,Ce){return $===null||$.tag!==7?($=zr(V,H.mode,le,Ce),$.return=H,$):($=p($,V),$.return=H,$)}function oe(H,$,V){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return $=Ed(""+$,H.mode,V),$.return=H,$;if(typeof $=="object"&&$!==null){switch($.$$typeof){case x:return V=Kc($.type,$.key,$.props,null,H.mode,V),mo(V,$),V.return=H,V;case E:return $=Sd($,H.mode,V),$.return=H,$;case K:return $=Pr($),oe(H,$,V)}if(Y($)||J($))return $=zr($,H.mode,V,null),$.return=H,$;if(typeof $.then=="function")return oe(H,Zc($),V);if($.$$typeof===T)return oe(H,Yc(H,$),V);Jc(H,$)}return null}function W(H,$,V,le){var Ce=$!==null?$.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return Ce!==null?null:N(H,$,""+V,le);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case x:return V.key===Ce?I(H,$,V,le):null;case E:return V.key===Ce?X(H,$,V,le):null;case K:return V=Pr(V),W(H,$,V,le)}if(Y(V)||J(V))return Ce!==null?null:ie(H,$,V,le,null);if(typeof V.then=="function")return W(H,$,Zc(V),le);if(V.$$typeof===T)return W(H,$,Yc(H,V),le);Jc(H,V)}return null}function ee(H,$,V,le,Ce){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return H=H.get(V)||null,N($,H,""+le,Ce);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return H=H.get(le.key===null?V:le.key)||null,I($,H,le,Ce);case E:return H=H.get(le.key===null?V:le.key)||null,X($,H,le,Ce);case K:return le=Pr(le),ee(H,$,V,le,Ce)}if(Y(le)||J(le))return H=H.get(V)||null,ie($,H,le,Ce,null);if(typeof le.then=="function")return ee(H,$,V,Zc(le),Ce);if(le.$$typeof===T)return ee(H,$,V,Yc($,le),Ce);Jc($,le)}return null}function xe(H,$,V,le){for(var Ce=null,it=null,we=$,$e=$=0,We=null;we!==null&&$e<V.length;$e++){we.index>$e?(We=we,we=null):We=we.sibling;var at=W(H,we,V[$e],le);if(at===null){we===null&&(we=We);break}i&&we&&at.alternate===null&&r(H,we),$=y(at,$,$e),it===null?Ce=at:it.sibling=at,it=at,we=We}if($e===V.length)return l(H,we),Je&&la(H,$e),Ce;if(we===null){for(;$e<V.length;$e++)we=oe(H,V[$e],le),we!==null&&($=y(we,$,$e),it===null?Ce=we:it.sibling=we,it=we);return Je&&la(H,$e),Ce}for(we=u(we);$e<V.length;$e++)We=ee(we,H,$e,V[$e],le),We!==null&&(i&&We.alternate!==null&&we.delete(We.key===null?$e:We.key),$=y(We,$,$e),it===null?Ce=We:it.sibling=We,it=We);return i&&we.forEach(function(rr){return r(H,rr)}),Je&&la(H,$e),Ce}function Me(H,$,V,le){if(V==null)throw Error(a(151));for(var Ce=null,it=null,we=$,$e=$=0,We=null,at=V.next();we!==null&&!at.done;$e++,at=V.next()){we.index>$e?(We=we,we=null):We=we.sibling;var rr=W(H,we,at.value,le);if(rr===null){we===null&&(we=We);break}i&&we&&rr.alternate===null&&r(H,we),$=y(rr,$,$e),it===null?Ce=rr:it.sibling=rr,it=rr,we=We}if(at.done)return l(H,we),Je&&la(H,$e),Ce;if(we===null){for(;!at.done;$e++,at=V.next())at=oe(H,at.value,le),at!==null&&($=y(at,$,$e),it===null?Ce=at:it.sibling=at,it=at);return Je&&la(H,$e),Ce}for(we=u(we);!at.done;$e++,at=V.next())at=ee(we,H,$e,at.value,le),at!==null&&(i&&at.alternate!==null&&we.delete(at.key===null?$e:at.key),$=y(at,$,$e),it===null?Ce=at:it.sibling=at,it=at);return i&&we.forEach(function($k){return r(H,$k)}),Je&&la(H,$e),Ce}function pt(H,$,V,le){if(typeof V=="object"&&V!==null&&V.type===w&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case x:e:{for(var Ce=V.key;$!==null;){if($.key===Ce){if(Ce=V.type,Ce===w){if($.tag===7){l(H,$.sibling),le=p($,V.props.children),le.return=H,H=le;break e}}else if($.elementType===Ce||typeof Ce=="object"&&Ce!==null&&Ce.$$typeof===K&&Pr(Ce)===$.type){l(H,$.sibling),le=p($,V.props),mo(le,V),le.return=H,H=le;break e}l(H,$);break}else r(H,$);$=$.sibling}V.type===w?(le=zr(V.props.children,H.mode,le,V.key),le.return=H,H=le):(le=Kc(V.type,V.key,V.props,null,H.mode,le),mo(le,V),le.return=H,H=le)}return S(H);case E:e:{for(Ce=V.key;$!==null;){if($.key===Ce)if($.tag===4&&$.stateNode.containerInfo===V.containerInfo&&$.stateNode.implementation===V.implementation){l(H,$.sibling),le=p($,V.children||[]),le.return=H,H=le;break e}else{l(H,$);break}else r(H,$);$=$.sibling}le=Sd(V,H.mode,le),le.return=H,H=le}return S(H);case K:return V=Pr(V),pt(H,$,V,le)}if(Y(V))return xe(H,$,V,le);if(J(V)){if(Ce=J(V),typeof Ce!="function")throw Error(a(150));return V=Ce.call(V),Me(H,$,V,le)}if(typeof V.then=="function")return pt(H,$,Zc(V),le);if(V.$$typeof===T)return pt(H,$,Yc(H,V),le);Jc(H,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(V=""+V,$!==null&&$.tag===6?(l(H,$.sibling),le=p($,V),le.return=H,H=le):(l(H,$),le=Ed(V,H.mode,le),le.return=H,H=le),S(H)):l(H,$)}return function(H,$,V,le){try{ho=0;var Ce=pt(H,$,V,le);return Us=null,Ce}catch(we){if(we===Bs||we===Xc)throw we;var it=Vn(29,we,null,H.mode);return it.lanes=le,it.return=H,it}finally{}}}var Hr=_b(!0),kb=_b(!1),Pa=!1;function Dd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Ld(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qa(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ha(i,r,l){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(rt&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=Hc(i),ob(i,null,l),r}return qc(i,u,r,l),Hc(i)}function po(i,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,De(i,l)}}function Id(i,r){var l=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};y===null?p=y=S:y=y.next=S,l=l.next}while(l!==null);y===null?p=y=r:y=y.next=r}else p=y=r;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=r:i.next=r,l.lastBaseUpdate=r}var zd=!1;function go(){if(zd){var i=zs;if(i!==null)throw i}}function bo(i,r,l,u){zd=!1;var p=i.updateQueue;Pa=!1;var y=p.firstBaseUpdate,S=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var I=N,X=I.next;I.next=null,S===null?y=X:S.next=X,S=I;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==S&&(N===null?ie.firstBaseUpdate=X:N.next=X,ie.lastBaseUpdate=I))}if(y!==null){var oe=p.baseState;S=0,ie=X=I=null,N=y;do{var W=N.lane&-536870913,ee=W!==N.lane;if(ee?(Xe&W)===W:(u&W)===W){W!==0&&W===Is&&(zd=!0),ie!==null&&(ie=ie.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var xe=i,Me=N;W=r;var pt=l;switch(Me.tag){case 1:if(xe=Me.payload,typeof xe=="function"){oe=xe.call(pt,oe,W);break e}oe=xe;break e;case 3:xe.flags=xe.flags&-65537|128;case 0:if(xe=Me.payload,W=typeof xe=="function"?xe.call(pt,oe,W):xe,W==null)break e;oe=g({},oe,W);break e;case 2:Pa=!0}}W=N.callback,W!==null&&(i.flags|=64,ee&&(i.flags|=8192),ee=p.callbacks,ee===null?p.callbacks=[W]:ee.push(W))}else ee={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?(X=ie=ee,I=oe):ie=ie.next=ee,S|=W;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;ee=N,N=ee.next,ee.next=null,p.lastBaseUpdate=ee,p.shared.pending=null}}while(!0);ie===null&&(I=oe),p.baseState=I,p.firstBaseUpdate=X,p.lastBaseUpdate=ie,y===null&&(p.shared.lanes=0),Va|=S,i.lanes=S,i.memoizedState=oe}}function Nb(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Tb(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Nb(l[i],r)}var $s=L(null),eu=L(0);function Cb(i,r){i=ya,C(eu,i),C($s,r),ya=i|r.baseLanes}function Bd(){C(eu,ya),C($s,$s.current)}function Ud(){ya=eu.current,Z($s),Z(eu)}var Xn=L(null),mi=null;function Ka(i){var r=i.alternate;C(Ht,Ht.current&1),C(Xn,i),mi===null&&(r===null||$s.current!==null||r.memoizedState!==null)&&(mi=i)}function $d(i){C(Ht,Ht.current),C(Xn,i),mi===null&&(mi=i)}function Ab(i){i.tag===22?(C(Ht,Ht.current),C(Xn,i),mi===null&&(mi=i)):Ga()}function Ga(){C(Ht,Ht.current),C(Xn,Xn.current)}function Wn(i){Z(Xn),mi===i&&(mi=null),Z(Ht)}var Ht=L(0);function tu(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Gh(l)||Qh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ua=0,Ue=null,ht=null,Vt=null,nu=!1,Fs=!1,Kr=!1,iu=0,yo=0,Ps=null,O_=0;function It(){throw Error(a(321))}function Fd(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Yn(i[l],r[l]))return!1;return!0}function Pd(i,r,l,u,p,y){return ua=y,Ue=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,U.H=i===null||i.memoizedState===null?dy:ih,Kr=!1,y=l(u,p),Kr=!1,Fs&&(y=Rb(r,l,u,p)),Ob(i),y}function Ob(i){U.H=Eo;var r=ht!==null&&ht.next!==null;if(ua=0,Vt=ht=Ue=null,nu=!1,yo=0,Ps=null,r)throw Error(a(300));i===null||Xt||(i=i.dependencies,i!==null&&Qc(i)&&(Xt=!0))}function Rb(i,r,l,u){Ue=i;var p=0;do{if(Fs&&(Ps=null),yo=0,Fs=!1,25<=p)throw Error(a(301));if(p+=1,Vt=ht=null,i.updateQueue!=null){var y=i.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}U.H=hy,y=r(l,u)}while(Fs);return y}function R_(){var i=U.H,r=i.useState()[0];return r=typeof r.then=="function"?xo(r):r,i=i.useState()[0],(ht!==null?ht.memoizedState:null)!==i&&(Ue.flags|=1024),r}function qd(){var i=iu!==0;return iu=0,i}function Hd(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Kd(i){if(nu){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}nu=!1}ua=0,Vt=ht=Ue=null,Fs=!1,yo=iu=0,Ps=null}function Sn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vt===null?Ue.memoizedState=Vt=i:Vt=Vt.next=i,Vt}function Kt(){if(ht===null){var i=Ue.alternate;i=i!==null?i.memoizedState:null}else i=ht.next;var r=Vt===null?Ue.memoizedState:Vt.next;if(r!==null)Vt=r,ht=i;else{if(i===null)throw Ue.alternate===null?Error(a(467)):Error(a(310));ht=i,i={memoizedState:ht.memoizedState,baseState:ht.baseState,baseQueue:ht.baseQueue,queue:ht.queue,next:null},Vt===null?Ue.memoizedState=Vt=i:Vt=Vt.next=i}return Vt}function au(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xo(i){var r=yo;return yo+=1,Ps===null&&(Ps=[]),i=Eb(Ps,i,r),r=Ue,(Vt===null?r.memoizedState:Vt.next)===null&&(r=r.alternate,U.H=r===null||r.memoizedState===null?dy:ih),i}function ru(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return xo(i);if(i.$$typeof===T)return ln(i)}throw Error(a(438,String(i)))}function Gd(i){var r=null,l=Ue.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Ue.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=au(),Ue.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=D;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function su(i){var r=Kt();return Qd(r,ht,i)}function Qd(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=i.baseQueue,y=u.pending;if(y!==null){if(p!==null){var S=p.next;p.next=y.next,y.next=S}r.baseQueue=p=y,u.pending=null}if(y=i.baseState,p===null)i.memoizedState=y;else{r=p.next;var N=S=null,I=null,X=r,ie=!1;do{var oe=X.lane&-536870913;if(oe!==X.lane?(Xe&oe)===oe:(ua&oe)===oe){var W=X.revertLane;if(W===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null}),oe===Is&&(ie=!0);else if((ua&W)===W){X=X.next,W===Is&&(ie=!0);continue}else oe={lane:0,revertLane:X.revertLane,gesture:null,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(N=I=oe,S=y):I=I.next=oe,Ue.lanes|=W,Va|=W;oe=X.action,Kr&&l(y,oe),y=X.hasEagerState?X.eagerState:l(y,oe)}else W={lane:oe,revertLane:X.revertLane,gesture:X.gesture,action:X.action,hasEagerState:X.hasEagerState,eagerState:X.eagerState,next:null},I===null?(N=I=W,S=y):I=I.next=W,Ue.lanes|=oe,Va|=oe;X=X.next}while(X!==null&&X!==r);if(I===null?S=y:I.next=N,!Yn(y,i.memoizedState)&&(Xt=!0,ie&&(l=zs,l!==null)))throw l;i.memoizedState=y,i.baseState=S,i.baseQueue=I,u.lastRenderedState=y}return p===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Yd(i){var r=Kt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var u=l.dispatch,p=l.pending,y=r.memoizedState;if(p!==null){l.pending=null;var S=p=p.next;do y=i(y,S.action),S=S.next;while(S!==p);Yn(y,r.memoizedState)||(Xt=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),l.lastRenderedState=y}return[y,u]}function Mb(i,r,l){var u=Ue,p=Kt(),y=Je;if(y){if(l===void 0)throw Error(a(407));l=l()}else l=r();var S=!Yn((ht||p).memoizedState,l);if(S&&(p.memoizedState=l,Xt=!0),p=p.queue,Wd(Lb.bind(null,u,p,i),[i]),p.getSnapshot!==r||S||Vt!==null&&Vt.memoizedState.tag&1){if(u.flags|=2048,qs(9,{destroy:void 0},Db.bind(null,u,p,l,r),null),yt===null)throw Error(a(349));y||(ua&127)!==0||jb(u,r,l)}return l}function jb(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=Ue.updateQueue,r===null?(r=au(),Ue.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function Db(i,r,l,u){r.value=l,r.getSnapshot=u,Ib(r)&&zb(i)}function Lb(i,r,l){return l(function(){Ib(r)&&zb(i)})}function Ib(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Yn(i,l)}catch{return!0}}function zb(i){var r=Ir(i,2);r!==null&&In(r,i,2)}function Vd(i){var r=Sn();if(typeof i=="function"){var l=i;if(i=l(),Kr){un(!0);try{l()}finally{un(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:i},r}function Bb(i,r,l,u){return i.baseState=l,Qd(i,ht,typeof u=="function"?u:fa)}function M_(i,r,l,u,p){if(cu(i))throw Error(a(485));if(i=r.action,i!==null){var y={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){y.listeners.push(S)}};U.T!==null?l(!0):y.isTransition=!1,u(y),l=r.pending,l===null?(y.next=r.pending=y,Ub(r,y)):(y.next=l.next,r.pending=l.next=y)}}function Ub(i,r){var l=r.action,u=r.payload,p=i.state;if(r.isTransition){var y=U.T,S={};U.T=S;try{var N=l(p,u),I=U.S;I!==null&&I(S,N),$b(i,r,N)}catch(X){Xd(i,r,X)}finally{y!==null&&S.types!==null&&(y.types=S.types),U.T=y}}else try{y=l(p,u),$b(i,r,y)}catch(X){Xd(i,r,X)}}function $b(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Fb(i,r,u)},function(u){return Xd(i,r,u)}):Fb(i,r,l)}function Fb(i,r,l){r.status="fulfilled",r.value=l,Pb(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,Ub(i,l)))}function Xd(i,r,l){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Pb(r),r=r.next;while(r!==u)}i.action=null}function Pb(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function qb(i,r){return r}function Hb(i,r){if(Je){var l=yt.formState;if(l!==null){e:{var u=Ue;if(Je){if(_t){t:{for(var p=_t,y=hi;p.nodeType!==8;){if(!y){p=null;break t}if(p=pi(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){_t=pi(p.nextSibling),u=p.data==="F!";break e}}$a(u)}u=!1}u&&(r=l[0])}}return l=Sn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:qb,lastRenderedState:r},l.queue=u,l=cy.bind(null,Ue,u),u.dispatch=l,u=Vd(!1),y=nh.bind(null,Ue,!1,u.queue),u=Sn(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=M_.bind(null,Ue,p,y,l),p.dispatch=l,u.memoizedState=i,[r,l,!1]}function Kb(i){var r=Kt();return Gb(r,ht,i)}function Gb(i,r,l){if(r=Qd(i,r,qb)[0],i=su(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=xo(r)}catch(S){throw S===Bs?Xc:S}else u=r;r=Kt();var p=r.queue,y=p.dispatch;return l!==r.memoizedState&&(Ue.flags|=2048,qs(9,{destroy:void 0},j_.bind(null,p,l),null)),[u,y,i]}function j_(i,r){i.action=r}function Qb(i){var r=Kt(),l=ht;if(l!==null)return Gb(r,l,i);Kt(),r=r.memoizedState,l=Kt();var u=l.queue.dispatch;return l.memoizedState=i,[r,u,!1]}function qs(i,r,l,u){return i={tag:i,create:l,deps:u,inst:r,next:null},r=Ue.updateQueue,r===null&&(r=au(),Ue.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=i.next=i:(u=l.next,l.next=i,i.next=u,r.lastEffect=i),i}function Yb(){return Kt().memoizedState}function lu(i,r,l,u){var p=Sn();Ue.flags|=i,p.memoizedState=qs(1|r,{destroy:void 0},l,u===void 0?null:u)}function ou(i,r,l,u){var p=Kt();u=u===void 0?null:u;var y=p.memoizedState.inst;ht!==null&&u!==null&&Fd(u,ht.memoizedState.deps)?p.memoizedState=qs(r,y,l,u):(Ue.flags|=i,p.memoizedState=qs(1|r,y,l,u))}function Vb(i,r){lu(8390656,8,i,r)}function Wd(i,r){ou(2048,8,i,r)}function D_(i){Ue.flags|=4;var r=Ue.updateQueue;if(r===null)r=au(),Ue.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function Xb(i){var r=Kt().memoizedState;return D_({ref:r,nextImpl:i}),function(){if((rt&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function Wb(i,r){return ou(4,2,i,r)}function Zb(i,r){return ou(4,4,i,r)}function Jb(i,r){if(typeof r=="function"){i=i();var l=r(i);return function(){typeof l=="function"?l():r(null)}}if(r!=null)return i=i(),r.current=i,function(){r.current=null}}function ey(i,r,l){l=l!=null?l.concat([i]):null,ou(4,4,Jb.bind(null,r,i),l)}function Zd(){}function ty(i,r){var l=Kt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Fd(r,u[1])?u[0]:(l.memoizedState=[i,r],i)}function ny(i,r){var l=Kt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Fd(r,u[1]))return u[0];if(u=i(),Kr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u}function Jd(i,r,l){return l===void 0||(ua&1073741824)!==0&&(Xe&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=ix(),Ue.lanes|=i,Va|=i,l)}function iy(i,r,l,u){return Yn(l,r)?l:$s.current!==null?(i=Jd(i,l,u),Yn(i,r)||(Xt=!0),i):(ua&42)===0||(ua&1073741824)!==0&&(Xe&261930)===0?(Xt=!0,i.memoizedState=l):(i=ix(),Ue.lanes|=i,Va|=i,r)}function ay(i,r,l,u,p){var y=ae.p;ae.p=y!==0&&8>y?y:8;var S=U.T,N={};U.T=N,nh(i,!1,r,l);try{var I=p(),X=U.S;if(X!==null&&X(N,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ie=A_(I,u);vo(i,r,ie,ei(i))}else vo(i,r,u,ei(i))}catch(oe){vo(i,r,{then:function(){},status:"rejected",reason:oe},ei())}finally{ae.p=y,S!==null&&N.types!==null&&(S.types=N.types),U.T=S}}function L_(){}function eh(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=ry(i).queue;ay(i,p,r,G,l===null?L_:function(){return sy(i),l(u)})}function ry(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:G,baseState:G,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:G},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function sy(i){var r=ry(i);r.next===null&&(r=i.alternate.memoizedState),vo(i,r.next.queue,{},ei())}function th(){return ln(zo)}function ly(){return Kt().memoizedState}function oy(){return Kt().memoizedState}function I_(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ei();i=qa(l);var u=Ha(r,i,l);u!==null&&(In(u,r,l),po(u,r,l)),r={cache:Od()},i.payload=r;return}r=r.return}}function z_(i,r,l){var u=ei();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},cu(i)?uy(r,l):(l=xd(i,r,l,u),l!==null&&(In(l,i,u),fy(l,r,u)))}function cy(i,r,l){var u=ei();vo(i,r,l,u)}function vo(i,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(cu(i))uy(r,p);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var S=r.lastRenderedState,N=y(S,l);if(p.hasEagerState=!0,p.eagerState=N,Yn(N,S))return qc(i,r,p,0),yt===null&&Pc(),!1}catch{}finally{}if(l=xd(i,r,p,u),l!==null)return In(l,i,u),fy(l,r,u),!0}return!1}function nh(i,r,l,u){if(u={lane:2,revertLane:Dh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},cu(i)){if(r)throw Error(a(479))}else r=xd(i,l,u,2),r!==null&&In(r,i,2)}function cu(i){var r=i.alternate;return i===Ue||r!==null&&r===Ue}function uy(i,r){Fs=nu=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function fy(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,De(i,l)}}var Eo={readContext:ln,use:ru,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useLayoutEffect:It,useInsertionEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useSyncExternalStore:It,useId:It,useHostTransitionStatus:It,useFormState:It,useActionState:It,useOptimistic:It,useMemoCache:It,useCacheRefresh:It};Eo.useEffectEvent=It;var dy={readContext:ln,use:ru,useCallback:function(i,r){return Sn().memoizedState=[i,r===void 0?null:r],i},useContext:ln,useEffect:Vb,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,lu(4194308,4,Jb.bind(null,r,i),l)},useLayoutEffect:function(i,r){return lu(4194308,4,i,r)},useInsertionEffect:function(i,r){lu(4,2,i,r)},useMemo:function(i,r){var l=Sn();r=r===void 0?null:r;var u=i();if(Kr){un(!0);try{i()}finally{un(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=Sn();if(l!==void 0){var p=l(r);if(Kr){un(!0);try{l(r)}finally{un(!1)}}}else p=r;return u.memoizedState=u.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},u.queue=i,i=i.dispatch=z_.bind(null,Ue,i),[u.memoizedState,i]},useRef:function(i){var r=Sn();return i={current:i},r.memoizedState=i},useState:function(i){i=Vd(i);var r=i.queue,l=cy.bind(null,Ue,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:Zd,useDeferredValue:function(i,r){var l=Sn();return Jd(l,i,r)},useTransition:function(){var i=Vd(!1);return i=ay.bind(null,Ue,i.queue,!0,!1),Sn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=Ue,p=Sn();if(Je){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),yt===null)throw Error(a(349));(Xe&127)!==0||jb(u,r,l)}p.memoizedState=l;var y={value:l,getSnapshot:r};return p.queue=y,Vb(Lb.bind(null,u,y,i),[i]),u.flags|=2048,qs(9,{destroy:void 0},Db.bind(null,u,y,l,r),null),l},useId:function(){var i=Sn(),r=yt.identifierPrefix;if(Je){var l=Fi,u=$i;l=(u&~(1<<32-ot(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=iu++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=O_++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:th,useFormState:Hb,useActionState:Hb,useOptimistic:function(i){var r=Sn();r.memoizedState=r.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=nh.bind(null,Ue,!0,l),l.dispatch=r,[i,r]},useMemoCache:Gd,useCacheRefresh:function(){return Sn().memoizedState=I_.bind(null,Ue)},useEffectEvent:function(i){var r=Sn(),l={impl:i};return r.memoizedState=l,function(){if((rt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},ih={readContext:ln,use:ru,useCallback:ty,useContext:ln,useEffect:Wd,useImperativeHandle:ey,useInsertionEffect:Wb,useLayoutEffect:Zb,useMemo:ny,useReducer:su,useRef:Yb,useState:function(){return su(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=Kt();return iy(l,ht.memoizedState,i,r)},useTransition:function(){var i=su(fa)[0],r=Kt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Mb,useId:ly,useHostTransitionStatus:th,useFormState:Kb,useActionState:Kb,useOptimistic:function(i,r){var l=Kt();return Bb(l,ht,i,r)},useMemoCache:Gd,useCacheRefresh:oy};ih.useEffectEvent=Xb;var hy={readContext:ln,use:ru,useCallback:ty,useContext:ln,useEffect:Wd,useImperativeHandle:ey,useInsertionEffect:Wb,useLayoutEffect:Zb,useMemo:ny,useReducer:Yd,useRef:Yb,useState:function(){return Yd(fa)},useDebugValue:Zd,useDeferredValue:function(i,r){var l=Kt();return ht===null?Jd(l,i,r):iy(l,ht.memoizedState,i,r)},useTransition:function(){var i=Yd(fa)[0],r=Kt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Mb,useId:ly,useHostTransitionStatus:th,useFormState:Qb,useActionState:Qb,useOptimistic:function(i,r){var l=Kt();return ht!==null?Bb(l,ht,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Gd,useCacheRefresh:oy};hy.useEffectEvent=Xb;function ah(i,r,l,u){r=i.memoizedState,l=l(u,r),l=l==null?r:g({},r,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var rh={enqueueSetState:function(i,r,l){i=i._reactInternals;var u=ei(),p=qa(u);p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(In(r,i,u),po(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ei(),p=qa(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(In(r,i,u),po(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ei(),u=qa(l);u.tag=2,r!=null&&(u.callback=r),r=Ha(i,u,l),r!==null&&(In(r,i,l),po(r,i,l))}};function my(i,r,l,u,p,y,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,S):r.prototype&&r.prototype.isPureReactComponent?!so(l,u)||!so(p,y):!0}function py(i,r,l,u){i=r.state,typeof r.componentWillReceiveProps=="function"&&r.componentWillReceiveProps(l,u),typeof r.UNSAFE_componentWillReceiveProps=="function"&&r.UNSAFE_componentWillReceiveProps(l,u),r.state!==i&&rh.enqueueReplaceState(r,r.state,null)}function Gr(i,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(i=i.defaultProps){l===r&&(l=g({},l));for(var p in i)l[p]===void 0&&(l[p]=i[p])}return l}function gy(i){Fc(i)}function by(i){console.error(i)}function yy(i){Fc(i)}function uu(i,r){try{var l=i.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function xy(i,r,l){try{var u=i.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(p){setTimeout(function(){throw p})}}function sh(i,r,l){return l=qa(l),l.tag=3,l.payload={element:null},l.callback=function(){uu(i,r)},l}function vy(i){return i=qa(i),i.tag=3,i}function Ey(i,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;i.payload=function(){return p(y)},i.callback=function(){xy(r,l,u)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){xy(r,l,u),typeof p!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function B_(i,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Ls(r,l,p,!0),l=Xn.current,l!==null){switch(l.tag){case 31:case 13:return mi===null?Su():l.alternate===null&&zt===0&&(zt=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Wc?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Rh(i,u,p)),!1;case 22:return l.flags|=65536,u===Wc?l.flags|=16384:(r=l.updateQueue,r===null?(r={transitions:null,markerInstances:null,retryQueue:new Set([u])},l.updateQueue=r):(l=r.retryQueue,l===null?r.retryQueue=new Set([u]):l.add(u)),Rh(i,u,p)),!1}throw Error(a(435,l.tag))}return Rh(i,u,p),Su(),!1}if(Je)return r=Xn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==kd&&(i=Error(a(422),{cause:u}),co(ui(i,l)))):(u!==kd&&(r=Error(a(423),{cause:u}),co(ui(r,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=ui(u,l),p=sh(i.stateNode,u,p),Id(i,p),zt!==4&&(zt=2)),!1;var y=Error(a(520),{cause:u});if(y=ui(y,l),Ao===null?Ao=[y]:Ao.push(y),zt!==4&&(zt=2),r===null)return!0;u=ui(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=p&-p,l.lanes|=i,i=sh(l.stateNode,u,i),Id(l,i),!1;case 1:if(r=l.type,y=l.stateNode,(l.flags&128)===0&&(typeof r.getDerivedStateFromError=="function"||y!==null&&typeof y.componentDidCatch=="function"&&(Xa===null||!Xa.has(y))))return l.flags|=65536,p&=-p,l.lanes|=p,p=vy(p),Ey(p,i,l,u),Id(l,p),!1}l=l.return}while(l!==null);return!1}var lh=Error(a(461)),Xt=!1;function on(i,r,l,u){r.child=i===null?kb(r,null,l,u):Hr(r,i.child,l,u)}function Sy(i,r,l,u,p){l=l.render;var y=r.ref;if("ref"in u){var S={};for(var N in u)N!=="ref"&&(S[N]=u[N])}else S=u;return $r(r),u=Pd(i,r,l,S,y,p),N=qd(),i!==null&&!Xt?(Hd(i,r,p),da(i,r,p)):(Je&&N&&wd(r),r.flags|=1,on(i,r,u,p),r.child)}function wy(i,r,l,u,p){if(i===null){var y=l.type;return typeof y=="function"&&!vd(y)&&y.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=y,_y(i,r,y,u,p)):(i=Kc(l.type,null,u,r,r.mode,p),i.ref=r.ref,i.return=r,r.child=i)}if(y=i.child,!ph(i,p)){var S=y.memoizedProps;if(l=l.compare,l=l!==null?l:so,l(S,u)&&i.ref===r.ref)return da(i,r,p)}return r.flags|=1,i=sa(y,u),i.ref=r.ref,i.return=r,r.child=i}function _y(i,r,l,u,p){if(i!==null){var y=i.memoizedProps;if(so(y,u)&&i.ref===r.ref)if(Xt=!1,r.pendingProps=u=y,ph(i,p))(i.flags&131072)!==0&&(Xt=!0);else return r.lanes=i.lanes,da(i,r,p)}return oh(i,r,l,u,p)}function ky(i,r,l,u){var p=u.children,y=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|l:l,i!==null){for(u=r.child=i.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,r.child=null;return Ny(i,r,y,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Vc(r,y!==null?y.cachePool:null),y!==null?Cb(r,y):Bd(),Ab(r);else return u=r.lanes=536870912,Ny(i,r,y!==null?y.baseLanes|l:l,l,u)}else y!==null?(Vc(r,y.cachePool),Cb(r,y),Ga(),r.memoizedState=null):(i!==null&&Vc(r,null),Bd(),Ga());return on(i,r,p,l),r.child}function So(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Ny(i,r,l,u,p){var y=Md();return y=y===null?null:{parent:Yt._currentValue,pool:y},r.memoizedState={baseLanes:l,cachePool:y},i!==null&&Vc(r,null),Bd(),Ab(r),i!==null&&Ls(i,r,u,!0),r.childLanes=p,null}function fu(i,r){return r=hu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function Ty(i,r,l){return Hr(r,i.child,null,l),i=fu(r,r.pendingProps),i.flags|=2,Wn(r),r.memoizedState=null,i}function U_(i,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(Je){if(u.mode==="hidden")return i=fu(r,u),r.lanes=536870912,So(null,i);if($d(r),(i=_t)?(i=Ux(i,hi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:$i,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},l=ub(i),l.return=r,r.child=l,sn=r,_t=null)):i=null,i===null)throw $a(r);return r.lanes=536870912,null}return fu(r,u)}var y=i.memoizedState;if(y!==null){var S=y.dehydrated;if($d(r),p)if(r.flags&256)r.flags&=-257,r=Ty(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(Xt||Ls(i,r,l,!1),p=(l&i.childLanes)!==0,Xt||p){if(u=yt,u!==null&&(S=Ft(u,l),S!==0&&S!==y.retryLane))throw y.retryLane=S,Ir(i,S),In(u,i,S),lh;Su(),r=Ty(i,r,l)}else i=y.treeContext,_t=pi(S.nextSibling),sn=r,Je=!0,Ua=null,hi=!1,i!==null&&hb(r,i),r=fu(r,u),r.flags|=4096;return r}return i=sa(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function du(i,r){var l=r.ref;if(l===null)i!==null&&i.ref!==null&&(r.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(a(284));(i===null||i.ref!==l)&&(r.flags|=4194816)}}function oh(i,r,l,u,p){return $r(r),l=Pd(i,r,l,u,void 0,p),u=qd(),i!==null&&!Xt?(Hd(i,r,p),da(i,r,p)):(Je&&u&&wd(r),r.flags|=1,on(i,r,l,p),r.child)}function Cy(i,r,l,u,p,y){return $r(r),r.updateQueue=null,l=Rb(r,u,l,p),Ob(i),u=qd(),i!==null&&!Xt?(Hd(i,r,y),da(i,r,y)):(Je&&u&&wd(r),r.flags|=1,on(i,r,l,y),r.child)}function Ay(i,r,l,u,p){if($r(r),r.stateNode===null){var y=Rs,S=l.contextType;typeof S=="object"&&S!==null&&(y=ln(S)),y=new l(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=rh,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},Dd(r),S=l.contextType,y.context=typeof S=="object"&&S!==null?ln(S):Rs,y.state=r.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(ah(r,l,S,u),y.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(S=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),S!==y.state&&rh.enqueueReplaceState(y,y.state,null),bo(r,u,y,p),go(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){y=r.stateNode;var N=r.memoizedProps,I=Gr(l,N);y.props=I;var X=y.context,ie=l.contextType;S=Rs,typeof ie=="object"&&ie!==null&&(S=ln(ie));var oe=l.getDerivedStateFromProps;ie=typeof oe=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=r.pendingProps!==N,ie||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||X!==S)&&py(r,y,u,S),Pa=!1;var W=r.memoizedState;y.state=W,bo(r,u,y,p),go(),X=r.memoizedState,N||W!==X||Pa?(typeof oe=="function"&&(ah(r,l,oe,u),X=r.memoizedState),(I=Pa||my(r,l,I,u,W,X,S))?(ie||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=X),y.props=u,y.state=X,y.context=S,u=I):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,Ld(i,r),S=r.memoizedProps,ie=Gr(l,S),y.props=ie,oe=r.pendingProps,W=y.context,X=l.contextType,I=Rs,typeof X=="object"&&X!==null&&(I=ln(X)),N=l.getDerivedStateFromProps,(X=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==oe||W!==I)&&py(r,y,u,I),Pa=!1,W=r.memoizedState,y.state=W,bo(r,u,y,p),go();var ee=r.memoizedState;S!==oe||W!==ee||Pa||i!==null&&i.dependencies!==null&&Qc(i.dependencies)?(typeof N=="function"&&(ah(r,l,N,u),ee=r.memoizedState),(ie=Pa||my(r,l,ie,u,W,ee,I)||i!==null&&i.dependencies!==null&&Qc(i.dependencies))?(X||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,ee,I),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,ee,I)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=ee),y.props=u,y.state=ee,y.context=I,u=ie):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return y=u,du(i,r),u=(r.flags&128)!==0,y||u?(y=r.stateNode,l=u&&typeof l.getDerivedStateFromError!="function"?null:y.render(),r.flags|=1,i!==null&&u?(r.child=Hr(r,i.child,null,p),r.child=Hr(r,null,l,p)):on(i,r,l,p),r.memoizedState=y.state,i=r.child):i=da(i,r,p),i}function Oy(i,r,l,u){return Br(),r.flags|=256,on(i,r,l,u),r.child}var ch={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function uh(i){return{baseLanes:i,cachePool:xb()}}function fh(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=Jn),i}function Ry(i,r,l){var u=r.pendingProps,p=!1,y=(r.flags&128)!==0,S;if((S=y)||(S=i!==null&&i.memoizedState===null?!1:(Ht.current&2)!==0),S&&(p=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,i===null){if(Je){if(p?Ka(r):Ga(),(i=_t)?(i=Ux(i,hi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:$i,overflow:Fi}:null,retryLane:536870912,hydrationErrors:null},l=ub(i),l.return=r,r.child=l,sn=r,_t=null)):i=null,i===null)throw $a(r);return Qh(i)?r.lanes=32:r.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(Ga(),p=r.mode,N=hu({mode:"hidden",children:N},p),u=zr(u,p,l,null),N.return=r,u.return=r,N.sibling=u,r.child=N,u=r.child,u.memoizedState=uh(l),u.childLanes=fh(i,S,l),r.memoizedState=ch,So(null,u)):(Ka(r),dh(r,N))}var I=i.memoizedState;if(I!==null&&(N=I.dehydrated,N!==null)){if(y)r.flags&256?(Ka(r),r.flags&=-257,r=hh(i,r,l)):r.memoizedState!==null?(Ga(),r.child=i.child,r.flags|=128,r=null):(Ga(),N=u.fallback,p=r.mode,u=hu({mode:"visible",children:u.children},p),N=zr(N,p,l,null),N.flags|=2,u.return=r,N.return=r,u.sibling=N,r.child=u,Hr(r,i.child,null,l),u=r.child,u.memoizedState=uh(l),u.childLanes=fh(i,S,l),r.memoizedState=ch,r=So(null,u));else if(Ka(r),Qh(N)){if(S=N.nextSibling&&N.nextSibling.dataset,S)var X=S.dgst;S=X,u=Error(a(419)),u.stack="",u.digest=S,co({value:u,source:null,stack:null}),r=hh(i,r,l)}else if(Xt||Ls(i,r,l,!1),S=(l&i.childLanes)!==0,Xt||S){if(S=yt,S!==null&&(u=Ft(S,l),u!==0&&u!==I.retryLane))throw I.retryLane=u,Ir(i,u),In(S,i,u),lh;Gh(N)||Su(),r=hh(i,r,l)}else Gh(N)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,_t=pi(N.nextSibling),sn=r,Je=!0,Ua=null,hi=!1,i!==null&&hb(r,i),r=dh(r,u.children),r.flags|=4096);return r}return p?(Ga(),N=u.fallback,p=r.mode,I=i.child,X=I.sibling,u=sa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,X!==null?N=sa(X,N):(N=zr(N,p,l,null),N.flags|=2),N.return=r,u.return=r,u.sibling=N,r.child=u,So(null,u),u=r.child,N=i.child.memoizedState,N===null?N=uh(l):(p=N.cachePool,p!==null?(I=Yt._currentValue,p=p.parent!==I?{parent:I,pool:I}:p):p=xb(),N={baseLanes:N.baseLanes|l,cachePool:p}),u.memoizedState=N,u.childLanes=fh(i,S,l),r.memoizedState=ch,So(i.child,u)):(Ka(r),l=i.child,i=l.sibling,l=sa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(S=r.deletions,S===null?(r.deletions=[i],r.flags|=16):S.push(i)),r.child=l,r.memoizedState=null,l)}function dh(i,r){return r=hu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function hu(i,r){return i=Vn(22,i,null,r),i.lanes=0,i}function hh(i,r,l){return Hr(r,i.child,null,l),i=dh(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function My(i,r,l){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),Cd(i.return,r,l)}function mh(i,r,l,u,p,y){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:y}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=l,S.tailMode=p,S.treeForkCount=y)}function jy(i,r,l){var u=r.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var S=Ht.current,N=(S&2)!==0;if(N?(S=S&1|2,r.flags|=128):S&=1,C(Ht,S),on(i,r,u,l),u=Je?oo:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&My(i,l,r);else if(i.tag===19)My(i,l,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(l=r.child,p=null;l!==null;)i=l.alternate,i!==null&&tu(i)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),mh(r,!1,p,l,y,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(i=p.alternate,i!==null&&tu(i)===null){r.child=p;break}i=p.sibling,p.sibling=l,l=p,p=i}mh(r,!0,l,null,y,u);break;case"together":mh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function da(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Va|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(Ls(i,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(a(153));if(r.child!==null){for(i=r.child,l=sa(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=sa(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function ph(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Qc(i)))}function $_(i,r,l){switch(r.tag){case 3:ke(r,r.stateNode.containerInfo),Fa(r,Yt,i.memoizedState.cache),Br();break;case 27:case 5:Dt(r);break;case 4:ke(r,r.stateNode.containerInfo);break;case 10:Fa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,$d(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ka(r),r.flags|=128,null):(l&r.child.childLanes)!==0?Ry(i,r,l):(Ka(r),i=da(i,r,l),i!==null?i.sibling:null);Ka(r);break;case 19:var p=(i.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Ls(i,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return jy(i,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Ht,Ht.current),u)break;return null;case 22:return r.lanes=0,ky(i,r,l,r.pendingProps);case 24:Fa(r,Yt,i.memoizedState.cache)}return da(i,r,l)}function Dy(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)Xt=!0;else{if(!ph(i,l)&&(r.flags&128)===0)return Xt=!1,$_(i,r,l);Xt=(i.flags&131072)!==0}else Xt=!1,Je&&(r.flags&1048576)!==0&&db(r,oo,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Pr(r.elementType),r.type=i,typeof i=="function")vd(i)?(u=Gr(i,u),r.tag=1,r=Ay(null,r,i,u,l)):(r.tag=0,r=oh(null,r,i,u,l));else{if(i!=null){var p=i.$$typeof;if(p===j){r.tag=11,r=Sy(null,r,i,u,l);break e}else if(p===q){r.tag=14,r=wy(null,r,i,u,l);break e}}throw r=Q(i)||i,Error(a(306,r,""))}}return r;case 0:return oh(i,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=Gr(u,r.pendingProps),Ay(i,r,u,p,l);case 3:e:{if(ke(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var y=r.memoizedState;p=y.element,Ld(i,r),bo(r,u,null,l);var S=r.memoizedState;if(u=S.cache,Fa(r,Yt,u),u!==y.cache&&Ad(r,[Yt],l,!0),go(),u=S.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=Oy(i,r,u,l);break e}else if(u!==p){p=ui(Error(a(424)),r),co(p),r=Oy(i,r,u,l);break e}else{switch(i=r.stateNode.containerInfo,i.nodeType){case 9:i=i.body;break;default:i=i.nodeName==="HTML"?i.ownerDocument.body:i}for(_t=pi(i.firstChild),sn=r,Je=!0,Ua=null,hi=!0,l=kb(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Br(),u===p){r=da(i,r,l);break e}on(i,r,u,l)}r=r.child}return r;case 26:return du(i,r),i===null?(l=Kx(r.type,null,r.pendingProps,null))?r.memoizedState=l:Je||(l=r.type,i=r.pendingProps,u=Au(ve.current).createElement(l),u[Pt]=r,u[fn]=i,cn(u,l,i),Gt(u),r.stateNode=u):r.memoizedState=Kx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Dt(r),i===null&&Je&&(u=r.stateNode=Px(r.type,r.pendingProps,ve.current),sn=r,hi=!0,p=_t,er(r.type)?(Yh=p,_t=pi(u.firstChild)):_t=p),on(i,r,r.pendingProps.children,l),du(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&Je&&((p=u=_t)&&(u=gk(u,r.type,r.pendingProps,hi),u!==null?(r.stateNode=u,sn=r,_t=pi(u.firstChild),hi=!1,p=!0):p=!1),p||$a(r)),Dt(r),p=r.type,y=r.pendingProps,S=i!==null?i.memoizedProps:null,u=y.children,qh(p,y)?u=null:S!==null&&qh(p,S)&&(r.flags|=32),r.memoizedState!==null&&(p=Pd(i,r,R_,null,null,l),zo._currentValue=p),du(i,r),on(i,r,u,l),r.child;case 6:return i===null&&Je&&((i=l=_t)&&(l=bk(l,r.pendingProps,hi),l!==null?(r.stateNode=l,sn=r,_t=null,i=!0):i=!1),i||$a(r)),null;case 13:return Ry(i,r,l);case 4:return ke(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Hr(r,null,u,l):on(i,r,u,l),r.child;case 11:return Sy(i,r,r.type,r.pendingProps,l);case 7:return on(i,r,r.pendingProps,l),r.child;case 8:return on(i,r,r.pendingProps.children,l),r.child;case 12:return on(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Fa(r,r.type,u.value),on(i,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,$r(r),p=ln(p),u=u(p),r.flags|=1,on(i,r,u,l),r.child;case 14:return wy(i,r,r.type,r.pendingProps,l);case 15:return _y(i,r,r.type,r.pendingProps,l);case 19:return jy(i,r,l);case 31:return U_(i,r,l);case 22:return ky(i,r,l,r.pendingProps);case 24:return $r(r),u=ln(Yt),i===null?(p=Md(),p===null&&(p=yt,y=Od(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=l),p=y),r.memoizedState={parent:u,cache:p},Dd(r),Fa(r,Yt,p)):((i.lanes&l)!==0&&(Ld(i,r),bo(r,null,null,l),go()),p=i.memoizedState,y=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Fa(r,Yt,u)):(u=y.cache,Fa(r,Yt,u),u!==p.cache&&Ad(r,[Yt],l,!0))),on(i,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ha(i){i.flags|=4}function gh(i,r,l,u,p){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(lx())i.flags|=8192;else throw qr=Wc,jd}else i.flags&=-16777217}function Ly(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!Xx(r))if(lx())i.flags|=8192;else throw qr=Wc,jd}function mu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?Le():536870912,i.lanes|=r,Qs|=r)}function wo(i,r){if(!Je)switch(i.tailMode){case"hidden":r=i.tail;for(var l=null;r!==null;)r.alternate!==null&&(l=r),r=r.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var u=null;l!==null;)l.alternate!==null&&(u=l),l=l.sibling;u===null?r||i.tail===null?i.tail=null:i.tail.sibling=null:u.sibling=null}}function kt(i){var r=i.alternate!==null&&i.alternate.child===i.child,l=0,u=0;if(r)for(var p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=u,i.childLanes=l,r}function F_(i,r,l){var u=r.pendingProps;switch(_d(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return kt(r),null;case 1:return kt(r),null;case 3:return l=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),ca(Yt),Ke(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Ds(r)?ha(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Nd())),kt(r),null;case 26:var p=r.type,y=r.memoizedState;return i===null?(ha(r),y!==null?(kt(r),Ly(r,y)):(kt(r),gh(r,p,null,u,l))):y?y!==i.memoizedState?(ha(r),kt(r),Ly(r,y)):(kt(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ha(r),kt(r),gh(r,p,i,u,l)),null;case 27:if(yn(r),l=ve.current,p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return kt(r),null}i=pe.current,Ds(r)?mb(r):(i=Px(p,u,l),r.stateNode=i,ha(r))}return kt(r),null;case 5:if(yn(r),p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return kt(r),null}if(y=pe.current,Ds(r))mb(r);else{var S=Au(ve.current);switch(y){case 1:y=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=S.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?S.createElement(p,{is:u.is}):S.createElement(p)}}y[Pt]=r,y[fn]=u;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)y.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=y;e:switch(cn(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ha(r)}}return kt(r),gh(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=ve.current,Ds(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,p=sn,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}i[Pt]=r,i=!!(i.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||Rx(i.nodeValue,l)),i||$a(r,!0)}else i=Au(i).createTextNode(u),i[Pt]=r,r.stateNode=i}return kt(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(u=Ds(r),l!==null){if(i===null){if(!u)throw Error(a(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[Pt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;kt(r),i=!1}else l=Nd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(Wn(r),r):(Wn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return kt(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(p=Ds(r),u!==null&&u.dehydrated!==null){if(i===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Pt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;kt(r),p=!1}else p=Nd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Wn(r),r):(Wn(r),null)}return Wn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,i=i!==null&&i.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),mu(r,r.updateQueue),kt(r),null);case 4:return Ke(),i===null&&Bh(r.stateNode.containerInfo),kt(r),null;case 10:return ca(r.type),kt(r),null;case 19:if(Z(Ht),u=r.memoizedState,u===null)return kt(r),null;if(p=(r.flags&128)!==0,y=u.rendering,y===null)if(p)wo(u,!1);else{if(zt!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(y=tu(i),y!==null){for(r.flags|=128,wo(u,!1),i=y.updateQueue,r.updateQueue=i,mu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)cb(l,i),l=l.sibling;return C(Ht,Ht.current&1|2),Je&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Ot()>xu&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304)}else{if(!p)if(i=tu(y),i!==null){if(r.flags|=128,p=!0,i=i.updateQueue,r.updateQueue=i,mu(r,i),wo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!Je)return kt(r),null}else 2*Ot()-u.renderingStartTime>xu&&l!==536870912&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304);u.isBackwards?(y.sibling=r.child,r.child=y):(i=u.last,i!==null?i.sibling=y:r.child=y,u.last=y)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Ot(),i.sibling=null,l=Ht.current,C(Ht,p?l&1|2:l&1),Je&&la(r,u.treeForkCount),i):(kt(r),null);case 22:case 23:return Wn(r),Ud(),u=r.memoizedState!==null,i!==null?i.memoizedState!==null!==u&&(r.flags|=8192):u&&(r.flags|=8192),u?(l&536870912)!==0&&(r.flags&128)===0&&(kt(r),r.subtreeFlags&6&&(r.flags|=8192)):kt(r),l=r.updateQueue,l!==null&&mu(r,l.retryQueue),l=null,i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),u=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(u=r.memoizedState.cachePool.pool),u!==l&&(r.flags|=2048),i!==null&&Z(Fr),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ca(Yt),kt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function P_(i,r){switch(_d(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return ca(Yt),Ke(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return yn(r),null;case 31:if(r.memoizedState!==null){if(Wn(r),r.alternate===null)throw Error(a(340));Br()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Wn(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Br()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return Z(Ht),null;case 4:return Ke(),null;case 10:return ca(r.type),null;case 22:case 23:return Wn(r),Ud(),i!==null&&Z(Fr),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return ca(Yt),null;case 25:return null;default:return null}}function Iy(i,r){switch(_d(r),r.tag){case 3:ca(Yt),Ke();break;case 26:case 27:case 5:yn(r);break;case 4:Ke();break;case 31:r.memoizedState!==null&&Wn(r);break;case 13:Wn(r);break;case 19:Z(Ht);break;case 10:ca(r.type);break;case 22:case 23:Wn(r),Ud(),i!==null&&Z(Fr);break;case 24:ca(Yt)}}function _o(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&i)===i){u=void 0;var y=l.create,S=l.inst;u=y(),S.destroy=u}l=l.next}while(l!==p)}}catch(N){dt(r,r.return,N)}}function Qa(i,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&i)===i){var S=u.inst,N=S.destroy;if(N!==void 0){S.destroy=void 0,p=r;var I=l,X=N;try{X()}catch(ie){dt(p,I,ie)}}}u=u.next}while(u!==y)}}catch(ie){dt(r,r.return,ie)}}function zy(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Tb(r,l)}catch(u){dt(i,i.return,u)}}}function By(i,r,l){l.props=Gr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){dt(i,r,u)}}function ko(i,r){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof l=="function"?i.refCleanup=l(u):l.current=u}}catch(p){dt(i,r,p)}}function Pi(i,r){var l=i.ref,u=i.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){dt(i,r,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){dt(i,r,p)}else l.current=null}function Uy(i){var r=i.type,l=i.memoizedProps,u=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){dt(i,i.return,p)}}function bh(i,r,l){try{var u=i.stateNode;uk(u,i.type,l,r),u[fn]=r}catch(p){dt(i,i.return,p)}}function $y(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&er(i.type)||i.tag===4}function yh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||$y(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&er(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function xh(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(i,r):(r=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,r.appendChild(i),l=l._reactRootContainer,l!=null||r.onclick!==null||(r.onclick=me));else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode,r=null),i=i.child,i!==null))for(xh(i,r,l),i=i.sibling;i!==null;)xh(i,r,l),i=i.sibling}function pu(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?l.insertBefore(i,r):l.appendChild(i);else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(pu(i,r,l),i=i.sibling;i!==null;)pu(i,r,l),i=i.sibling}function Fy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);cn(r,u,l),r[Pt]=i,r[fn]=l}catch(y){dt(i,i.return,y)}}var ma=!1,Wt=!1,vh=!1,Py=typeof WeakSet=="function"?WeakSet:Set,tn=null;function q_(i,r){if(i=i.containerInfo,Fh=Iu,i=eb(i),hd(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var S=0,N=-1,I=-1,X=0,ie=0,oe=i,W=null;t:for(;;){for(var ee;oe!==l||p!==0&&oe.nodeType!==3||(N=S+p),oe!==y||u!==0&&oe.nodeType!==3||(I=S+u),oe.nodeType===3&&(S+=oe.nodeValue.length),(ee=oe.firstChild)!==null;)W=oe,oe=ee;for(;;){if(oe===i)break t;if(W===l&&++X===p&&(N=S),W===y&&++ie===u&&(I=S),(ee=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=ee}l=N===-1||I===-1?null:{start:N,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ph={focusedElem:i,selectionRange:l},Iu=!1,tn=r;tn!==null;)if(r=tn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,tn=i;else for(;tn!==null;){switch(r=tn,y=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)p=i[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&y!==null){i=void 0,l=r,p=y.memoizedProps,y=y.memoizedState,u=l.stateNode;try{var xe=Gr(l.type,p);i=u.getSnapshotBeforeUpdate(xe,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(Me){dt(l,l.return,Me)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,l=i.nodeType,l===9)Kh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Kh(i);break;default:i.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((i&1024)!==0)throw Error(a(163))}if(i=r.sibling,i!==null){i.return=r.return,tn=i;break}tn=r.return}}function qy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ga(i,l),u&4&&_o(5,l);break;case 1:if(ga(i,l),u&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(S){dt(l,l.return,S)}else{var p=Gr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(p,r,i.__reactInternalSnapshotBeforeUpdate)}catch(S){dt(l,l.return,S)}}u&64&&zy(l),u&512&&ko(l,l.return);break;case 3:if(ga(i,l),u&64&&(i=l.updateQueue,i!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Tb(i,r)}catch(S){dt(l,l.return,S)}}break;case 27:r===null&&u&4&&Fy(l);case 26:case 5:ga(i,l),r===null&&u&4&&Uy(l),u&512&&ko(l,l.return);break;case 12:ga(i,l);break;case 31:ga(i,l),u&4&&Gy(i,l);break;case 13:ga(i,l),u&4&&Qy(i,l),u&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=Z_.bind(null,l),yk(i,l))));break;case 22:if(u=l.memoizedState!==null||ma,!u){r=r!==null&&r.memoizedState!==null||Wt,p=ma;var y=Wt;ma=u,(Wt=r)&&!y?ba(i,l,(l.subtreeFlags&8772)!==0):ga(i,l),ma=p,Wt=y}break;case 30:break;default:ga(i,l)}}function Hy(i){var r=i.alternate;r!==null&&(i.alternate=null,Hy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Yl(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var Tt=null,Mn=!1;function pa(i,r,l){for(l=l.child;l!==null;)Ky(i,r,l),l=l.sibling}function Ky(i,r,l){if(Lt&&typeof Lt.onCommitFiberUnmount=="function")try{Lt.onCommitFiberUnmount(an,l)}catch{}switch(l.tag){case 26:Wt||Pi(l,r),pa(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Wt||Pi(l,r);var u=Tt,p=Mn;er(l.type)&&(Tt=l.stateNode,Mn=!1),pa(i,r,l),Do(l.stateNode),Tt=u,Mn=p;break;case 5:Wt||Pi(l,r);case 6:if(u=Tt,p=Mn,Tt=null,pa(i,r,l),Tt=u,Mn=p,Tt!==null)if(Mn)try{(Tt.nodeType===9?Tt.body:Tt.nodeName==="HTML"?Tt.ownerDocument.body:Tt).removeChild(l.stateNode)}catch(y){dt(l,r,y)}else try{Tt.removeChild(l.stateNode)}catch(y){dt(l,r,y)}break;case 18:Tt!==null&&(Mn?(i=Tt,zx(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),tl(i)):zx(Tt,l.stateNode));break;case 4:u=Tt,p=Mn,Tt=l.stateNode.containerInfo,Mn=!0,pa(i,r,l),Tt=u,Mn=p;break;case 0:case 11:case 14:case 15:Qa(2,l,r),Wt||Qa(4,l,r),pa(i,r,l);break;case 1:Wt||(Pi(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&By(l,r,u)),pa(i,r,l);break;case 21:pa(i,r,l);break;case 22:Wt=(u=Wt)||l.memoizedState!==null,pa(i,r,l),Wt=u;break;default:pa(i,r,l)}}function Gy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{tl(i)}catch(l){dt(r,r.return,l)}}}function Qy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{tl(i)}catch(l){dt(r,r.return,l)}}function H_(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Py),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Py),r;default:throw Error(a(435,i.tag))}}function gu(i,r){var l=H_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=J_.bind(null,i,u);u.then(p,p)}})}function jn(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],y=i,S=r,N=S;e:for(;N!==null;){switch(N.tag){case 27:if(er(N.type)){Tt=N.stateNode,Mn=!1;break e}break;case 5:Tt=N.stateNode,Mn=!1;break e;case 3:case 4:Tt=N.stateNode.containerInfo,Mn=!0;break e}N=N.return}if(Tt===null)throw Error(a(160));Ky(y,S,p),Tt=null,Mn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Yy(r,i),r=r.sibling}var Ti=null;function Yy(i,r){var l=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:jn(r,i),Dn(i),u&4&&(Qa(3,i,i.return),_o(3,i),Qa(5,i,i.return));break;case 1:jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),u&64&&ma&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=Ti;if(jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),u&4){var y=l!==null?l.memoizedState:null;if(u=i.memoizedState,l===null)if(u===null)if(i.stateNode===null){e:{u=i.type,l=i.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[Or]||y[Pt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),cn(y,u,l),y[Pt]=i,Gt(y),u=y;break e;case"link":var S=Yx("link","href",p).get(u+(l.href||""));if(S){for(var N=0;N<S.length;N++)if(y=S[N],y.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&y.getAttribute("rel")===(l.rel==null?null:l.rel)&&y.getAttribute("title")===(l.title==null?null:l.title)&&y.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(N,1);break t}}y=p.createElement(u),cn(y,u,l),p.head.appendChild(y);break;case"meta":if(S=Yx("meta","content",p).get(u+(l.content||""))){for(N=0;N<S.length;N++)if(y=S[N],y.getAttribute("content")===(l.content==null?null:""+l.content)&&y.getAttribute("name")===(l.name==null?null:l.name)&&y.getAttribute("property")===(l.property==null?null:l.property)&&y.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&y.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(N,1);break t}}y=p.createElement(u),cn(y,u,l),p.head.appendChild(y);break;default:throw Error(a(468,u))}y[Pt]=i,Gt(y),u=y}i.stateNode=u}else Vx(p,i.type,i.stateNode);else i.stateNode=Qx(p,u,i.memoizedProps);else y!==u?(y===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):y.count--,u===null?Vx(p,i.type,i.stateNode):Qx(p,u,i.memoizedProps)):u===null&&i.stateNode!==null&&bh(i,i.memoizedProps,l.memoizedProps)}break;case 27:jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),l!==null&&u&4&&bh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(jn(r,i),Dn(i),u&512&&(Wt||l===null||Pi(l,l.return)),i.flags&32){p=i.stateNode;try{je(p,"")}catch(xe){dt(i,i.return,xe)}}u&4&&i.stateNode!=null&&(p=i.memoizedProps,bh(i,p,l!==null?l.memoizedProps:p)),u&1024&&(vh=!0);break;case 6:if(jn(r,i),Dn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(xe){dt(i,i.return,xe)}}break;case 3:if(Mu=null,p=Ti,Ti=Ou(r.containerInfo),jn(r,i),Ti=p,Dn(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{tl(r.containerInfo)}catch(xe){dt(i,i.return,xe)}vh&&(vh=!1,Vy(i));break;case 4:u=Ti,Ti=Ou(i.stateNode.containerInfo),jn(r,i),Dn(i),Ti=u;break;case 12:jn(r,i),Dn(i);break;case 31:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,gu(i,u)));break;case 13:jn(r,i),Dn(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(yu=Ot()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,gu(i,u)));break;case 22:p=i.memoizedState!==null;var I=l!==null&&l.memoizedState!==null,X=ma,ie=Wt;if(ma=X||p,Wt=ie||I,jn(r,i),Wt=ie,ma=X,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||I||ma||Wt||Qr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){I=l=r;try{if(y=I.stateNode,p)S=y.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{N=I.stateNode;var oe=I.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(xe){dt(I,I.return,xe)}}}else if(r.tag===6){if(l===null){I=r;try{I.stateNode.nodeValue=p?"":I.memoizedProps}catch(xe){dt(I,I.return,xe)}}}else if(r.tag===18){if(l===null){I=r;try{var ee=I.stateNode;p?Bx(ee,!0):Bx(I.stateNode,!1)}catch(xe){dt(I,I.return,xe)}}}else if((r.tag!==22&&r.tag!==23||r.memoizedState===null||r===i)&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break e;for(;r.sibling===null;){if(r.return===null||r.return===i)break e;l===r&&(l=null),r=r.return}l===r&&(l=null),r.sibling.return=r.return,r=r.sibling}u&4&&(u=i.updateQueue,u!==null&&(l=u.retryQueue,l!==null&&(u.retryQueue=null,gu(i,l))));break;case 19:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,gu(i,u)));break;case 30:break;case 21:break;default:jn(r,i),Dn(i)}}function Dn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if($y(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,y=yh(i);pu(i,y,p);break;case 5:var S=l.stateNode;l.flags&32&&(je(S,""),l.flags&=-33);var N=yh(i);pu(i,N,S);break;case 3:case 4:var I=l.stateNode.containerInfo,X=yh(i);xh(i,X,I);break;default:throw Error(a(161))}}catch(ie){dt(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function Vy(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;Vy(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function ga(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)qy(i,r.alternate,r),r=r.sibling}function Qr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Qa(4,r,r.return),Qr(r);break;case 1:Pi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&By(r,r.return,l),Qr(r);break;case 27:Do(r.stateNode);case 26:case 5:Pi(r,r.return),Qr(r);break;case 22:r.memoizedState===null&&Qr(r);break;case 30:Qr(r);break;default:Qr(r)}i=i.sibling}}function ba(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=i,y=r,S=y.flags;switch(y.tag){case 0:case 11:case 15:ba(p,y,l),_o(4,y);break;case 1:if(ba(p,y,l),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(X){dt(u,u.return,X)}if(u=y,p=u.updateQueue,p!==null){var N=u.stateNode;try{var I=p.shared.hiddenCallbacks;if(I!==null)for(p.shared.hiddenCallbacks=null,p=0;p<I.length;p++)Nb(I[p],N)}catch(X){dt(u,u.return,X)}}l&&S&64&&zy(y),ko(y,y.return);break;case 27:Fy(y);case 26:case 5:ba(p,y,l),l&&u===null&&S&4&&Uy(y),ko(y,y.return);break;case 12:ba(p,y,l);break;case 31:ba(p,y,l),l&&S&4&&Gy(p,y);break;case 13:ba(p,y,l),l&&S&4&&Qy(p,y);break;case 22:y.memoizedState===null&&ba(p,y,l),ko(y,y.return);break;case 30:break;default:ba(p,y,l)}r=r.sibling}}function Eh(i,r){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&uo(l))}function Sh(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&uo(i))}function Ci(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)Xy(i,r,l,u),r=r.sibling}function Xy(i,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Ci(i,r,l,u),p&2048&&_o(9,r);break;case 1:Ci(i,r,l,u);break;case 3:Ci(i,r,l,u),p&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&uo(i)));break;case 12:if(p&2048){Ci(i,r,l,u),i=r.stateNode;try{var y=r.memoizedProps,S=y.id,N=y.onPostCommit;typeof N=="function"&&N(S,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){dt(r,r.return,I)}}else Ci(i,r,l,u);break;case 31:Ci(i,r,l,u);break;case 13:Ci(i,r,l,u);break;case 23:break;case 22:y=r.stateNode,S=r.alternate,r.memoizedState!==null?y._visibility&2?Ci(i,r,l,u):No(i,r):y._visibility&2?Ci(i,r,l,u):(y._visibility|=2,Hs(i,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&Eh(S,r);break;case 24:Ci(i,r,l,u),p&2048&&Sh(r.alternate,r);break;default:Ci(i,r,l,u)}}function Hs(i,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=i,S=r,N=l,I=u,X=S.flags;switch(S.tag){case 0:case 11:case 15:Hs(y,S,N,I,p),_o(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&2?Hs(y,S,N,I,p):No(y,S):(ie._visibility|=2,Hs(y,S,N,I,p)),p&&X&2048&&Eh(S.alternate,S);break;case 24:Hs(y,S,N,I,p),p&&X&2048&&Sh(S.alternate,S);break;default:Hs(y,S,N,I,p)}r=r.sibling}}function No(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,u=r,p=u.flags;switch(u.tag){case 22:No(l,u),p&2048&&Eh(u.alternate,u);break;case 24:No(l,u),p&2048&&Sh(u.alternate,u);break;default:No(l,u)}r=r.sibling}}var To=8192;function Ks(i,r,l){if(i.subtreeFlags&To)for(i=i.child;i!==null;)Wy(i,r,l),i=i.sibling}function Wy(i,r,l){switch(i.tag){case 26:Ks(i,r,l),i.flags&To&&i.memoizedState!==null&&Ok(l,Ti,i.memoizedState,i.memoizedProps);break;case 5:Ks(i,r,l);break;case 3:case 4:var u=Ti;Ti=Ou(i.stateNode.containerInfo),Ks(i,r,l),Ti=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=To,To=16777216,Ks(i,r,l),To=u):Ks(i,r,l));break;default:Ks(i,r,l)}}function Zy(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Co(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];tn=u,ex(u,i)}Zy(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Jy(i),i=i.sibling}function Jy(i){switch(i.tag){case 0:case 11:case 15:Co(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Co(i);break;case 12:Co(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,bu(i)):Co(i);break;default:Co(i)}}function bu(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];tn=u,ex(u,i)}Zy(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Qa(8,r,r.return),bu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,bu(r));break;default:bu(r)}i=i.sibling}}function ex(i,r){for(;tn!==null;){var l=tn;switch(l.tag){case 0:case 11:case 15:Qa(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:uo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,tn=u;else e:for(l=i;tn!==null;){u=tn;var p=u.sibling,y=u.return;if(Hy(u),u===l){tn=null;break e}if(p!==null){p.return=y,tn=p;break e}tn=y}}}var K_={getCacheForType:function(i){var r=ln(Yt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return ln(Yt).controller.signal}},G_=typeof WeakMap=="function"?WeakMap:Map,rt=0,yt=null,Ge=null,Xe=0,ft=0,Zn=null,Ya=!1,Gs=!1,wh=!1,ya=0,zt=0,Va=0,Yr=0,_h=0,Jn=0,Qs=0,Ao=null,Ln=null,kh=!1,yu=0,tx=0,xu=1/0,vu=null,Xa=null,Jt=0,Wa=null,Ys=null,xa=0,Nh=0,Th=null,nx=null,Oo=0,Ch=null;function ei(){return(rt&2)!==0&&Xe!==0?Xe&-Xe:U.T!==null?Dh():vs()}function ix(){if(Jn===0)if((Xe&536870912)===0||Je){var i=xs;xs<<=1,(xs&3932160)===0&&(xs=262144),Jn=i}else Jn=536870912;return i=Xn.current,i!==null&&(i.flags|=32),Jn}function In(i,r,l){(i===yt&&(ft===2||ft===9)||i.cancelPendingCommit!==null)&&(Vs(i,0),Za(i,Xe,Jn,!1)),bt(i,l),((rt&2)===0||i!==yt)&&(i===yt&&((rt&2)===0&&(Yr|=l),zt===4&&Za(i,Xe,Jn,!1)),qi(i))}function ax(i,r,l){if((rt&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||se(i,r),p=u?V_(i,r):Oh(i,r,!0),y=u;do{if(p===0){Gs&&!u&&Za(i,r,0,!1);break}else{if(l=i.current.alternate,y&&!Q_(l)){p=Oh(i,r,!1),y=!1;continue}if(p===2){if(y=r,i.errorRecoveryDisabledLanes&y)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var N=i;p=Ao;var I=N.current.memoizedState.isDehydrated;if(I&&(Vs(N,S).flags|=256),S=Oh(N,S,!1),S!==2){if(wh&&!I){N.errorRecoveryDisabledLanes|=y,Yr|=y,p=4;break e}y=Ln,Ln=p,y!==null&&(Ln===null?Ln=y:Ln.push.apply(Ln,y))}p=S}if(y=!1,p!==2)continue}}if(p===1){Vs(i,0),Za(i,r,0,!0);break}e:{switch(u=i,y=p,y){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Za(u,r,Jn,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=yu+300-Ot(),10<p)){if(Za(u,r,Jn,!Ya),B(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=Lx(rx.bind(null,u,l,Ln,vu,kh,r,Jn,Yr,Qs,Ya,y,"Throttled",-0,0),p);break e}rx(u,l,Ln,vu,kh,r,Jn,Yr,Qs,Ya,y,null,-0,0)}}break}while(!0);qi(i)}function rx(i,r,l,u,p,y,S,N,I,X,ie,oe,W,ee){if(i.timeoutHandle=-1,oe=r.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:me},Wy(r,y,oe);var xe=(y&62914560)===y?yu-Ot():(y&4194048)===y?tx-Ot():0;if(xe=Rk(oe,xe),xe!==null){xa=y,i.cancelPendingCommit=xe(hx.bind(null,i,r,y,l,u,p,S,N,I,ie,oe,null,W,ee)),Za(i,y,S,!X);return}}hx(i,r,y,l,u,p,S,N,I)}function Q_(i){for(var r=i;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],y=p.getSnapshot;p=p.value;try{if(!Yn(y(),p))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Za(i,r,l,u){r&=~_h,r&=~Yr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var p=r;0<p;){var y=31-ot(p),S=1<<y;u[y]=-1,p&=~S}l!==0&&ye(i,l,r)}function Eu(){return(rt&6)===0?(Ro(0),!1):!0}function Ah(){if(Ge!==null){if(ft===0)var i=Ge.return;else i=Ge,oa=Ur=null,Kd(i),Us=null,ho=0,i=Ge;for(;i!==null;)Iy(i.alternate,i),i=i.return;Ge=null}}function Vs(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,hk(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xa=0,Ah(),yt=i,Ge=l=sa(i.current,null),Xe=r,ft=0,Zn=null,Ya=!1,Gs=se(i,r),wh=!1,Qs=Jn=_h=Yr=Va=zt=0,Ln=Ao=null,kh=!1,(r&8)!==0&&(r|=r&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=r;0<u;){var p=31-ot(u),y=1<<p;r|=i[p],u&=~y}return ya=r,Pc(),l}function sx(i,r){Ue=null,U.H=Eo,r===Bs||r===Xc?(r=Sb(),ft=3):r===jd?(r=Sb(),ft=4):ft=r===lh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Zn=r,Ge===null&&(zt=1,uu(i,ui(r,i.current)))}function lx(){var i=Xn.current;return i===null?!0:(Xe&4194048)===Xe?mi===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?i===mi:!1}function ox(){var i=U.H;return U.H=Eo,i===null?Eo:i}function cx(){var i=U.A;return U.A=K_,i}function Su(){zt=4,Ya||(Xe&4194048)!==Xe&&Xn.current!==null||(Gs=!0),(Va&134217727)===0&&(Yr&134217727)===0||yt===null||Za(yt,Xe,Jn,!1)}function Oh(i,r,l){var u=rt;rt|=2;var p=ox(),y=cx();(yt!==i||Xe!==r)&&(vu=null,Vs(i,r)),r=!1;var S=zt;e:do try{if(ft!==0&&Ge!==null){var N=Ge,I=Zn;switch(ft){case 8:Ah(),S=6;break e;case 3:case 2:case 9:case 6:Xn.current===null&&(r=!0);var X=ft;if(ft=0,Zn=null,Xs(i,N,I,X),l&&Gs){S=0;break e}break;default:X=ft,ft=0,Zn=null,Xs(i,N,I,X)}}Y_(),S=zt;break}catch(ie){sx(i,ie)}while(!0);return r&&i.shellSuspendCounter++,oa=Ur=null,rt=u,U.H=p,U.A=y,Ge===null&&(yt=null,Xe=0,Pc()),S}function Y_(){for(;Ge!==null;)ux(Ge)}function V_(i,r){var l=rt;rt|=2;var u=ox(),p=cx();yt!==i||Xe!==r?(vu=null,xu=Ot()+500,Vs(i,r)):Gs=se(i,r);e:do try{if(ft!==0&&Ge!==null){r=Ge;var y=Zn;t:switch(ft){case 1:ft=0,Zn=null,Xs(i,r,y,1);break;case 2:case 9:if(vb(y)){ft=0,Zn=null,fx(r);break}r=function(){ft!==2&&ft!==9||yt!==i||(ft=7),qi(i)},y.then(r,r);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:vb(y)?(ft=0,Zn=null,fx(r)):(ft=0,Zn=null,Xs(i,r,y,7));break;case 5:var S=null;switch(Ge.tag){case 26:S=Ge.memoizedState;case 5:case 27:var N=Ge;if(S?Xx(S):N.stateNode.complete){ft=0,Zn=null;var I=N.sibling;if(I!==null)Ge=I;else{var X=N.return;X!==null?(Ge=X,wu(X)):Ge=null}break t}}ft=0,Zn=null,Xs(i,r,y,5);break;case 6:ft=0,Zn=null,Xs(i,r,y,6);break;case 8:Ah(),zt=6;break e;default:throw Error(a(462))}}X_();break}catch(ie){sx(i,ie)}while(!0);return oa=Ur=null,U.H=u,U.A=p,rt=l,Ge!==null?0:(yt=null,Xe=0,Pc(),zt)}function X_(){for(;Ge!==null&&!Gl();)ux(Ge)}function ux(i){var r=Dy(i.alternate,i,ya);i.memoizedProps=i.pendingProps,r===null?wu(i):Ge=r}function fx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=Cy(l,r,r.pendingProps,r.type,void 0,Xe);break;case 11:r=Cy(l,r,r.pendingProps,r.type.render,r.ref,Xe);break;case 5:Kd(r);default:Iy(l,r),r=Ge=cb(r,ya),r=Dy(l,r,ya)}i.memoizedProps=i.pendingProps,r===null?wu(i):Ge=r}function Xs(i,r,l,u){oa=Ur=null,Kd(r),Us=null,ho=0;var p=r.return;try{if(B_(i,p,r,l,Xe)){zt=1,uu(i,ui(l,i.current)),Ge=null;return}}catch(y){if(p!==null)throw Ge=p,y;zt=1,uu(i,ui(l,i.current)),Ge=null;return}r.flags&32768?(Je||u===1?i=!0:Gs||(Xe&536870912)!==0?i=!1:(Ya=i=!0,(u===2||u===9||u===3||u===6)&&(u=Xn.current,u!==null&&u.tag===13&&(u.flags|=16384))),dx(r,i)):wu(r)}function wu(i){var r=i;do{if((r.flags&32768)!==0){dx(r,Ya);return}i=r.return;var l=F_(r.alternate,r,ya);if(l!==null){Ge=l;return}if(r=r.sibling,r!==null){Ge=r;return}Ge=r=i}while(r!==null);zt===0&&(zt=5)}function dx(i,r){do{var l=P_(i.alternate,i);if(l!==null){l.flags&=32767,Ge=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Ge=i;return}Ge=i=l}while(i!==null);zt=6,Ge=null}function hx(i,r,l,u,p,y,S,N,I){i.cancelPendingCommit=null;do _u();while(Jt!==0);if((rt&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(y=r.lanes|r.childLanes,y|=yd,Ee(i,l,y,S,N,I),i===yt&&(Ge=yt=null,Xe=0),Ys=r,Wa=i,xa=l,Nh=y,Th=p,nx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,ek(Re,function(){return yx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=U.T,U.T=null,p=ae.p,ae.p=2,S=rt,rt|=4;try{q_(i,r,l)}finally{rt=S,ae.p=p,U.T=u}}Jt=1,mx(),px(),gx()}}function mx(){if(Jt===1){Jt=0;var i=Wa,r=Ys,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=U.T,U.T=null;var u=ae.p;ae.p=2;var p=rt;rt|=4;try{Yy(r,i);var y=Ph,S=eb(i.containerInfo),N=y.focusedElem,I=y.selectionRange;if(S!==N&&N&&N.ownerDocument&&Jg(N.ownerDocument.documentElement,N)){if(I!==null&&hd(N)){var X=I.start,ie=I.end;if(ie===void 0&&(ie=X),"selectionStart"in N)N.selectionStart=X,N.selectionEnd=Math.min(ie,N.value.length);else{var oe=N.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var ee=W.getSelection(),xe=N.textContent.length,Me=Math.min(I.start,xe),pt=I.end===void 0?Me:Math.min(I.end,xe);!ee.extend&&Me>pt&&(S=pt,pt=Me,Me=S);var H=Zg(N,Me),$=Zg(N,pt);if(H&&$&&(ee.rangeCount!==1||ee.anchorNode!==H.node||ee.anchorOffset!==H.offset||ee.focusNode!==$.node||ee.focusOffset!==$.offset)){var V=oe.createRange();V.setStart(H.node,H.offset),ee.removeAllRanges(),Me>pt?(ee.addRange(V),ee.extend($.node,$.offset)):(V.setEnd($.node,$.offset),ee.addRange(V))}}}}for(oe=[],ee=N;ee=ee.parentNode;)ee.nodeType===1&&oe.push({element:ee,left:ee.scrollLeft,top:ee.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var le=oe[N];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Iu=!!Fh,Ph=Fh=null}finally{rt=p,ae.p=u,U.T=l}}i.current=r,Jt=2}}function px(){if(Jt===2){Jt=0;var i=Wa,r=Ys,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=U.T,U.T=null;var u=ae.p;ae.p=2;var p=rt;rt|=4;try{qy(i,r.alternate,r)}finally{rt=p,ae.p=u,U.T=l}}Jt=3}}function gx(){if(Jt===4||Jt===3){Jt=0,bs();var i=Wa,r=Ys,l=xa,u=nx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?Jt=5:(Jt=0,Ys=Wa=null,bx(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&(Xa=null),ta(l),r=r.stateNode,Lt&&typeof Lt.onCommitFiberRoot=="function")try{Lt.onCommitFiberRoot(an,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=U.T,p=ae.p,ae.p=2,U.T=null;try{for(var y=i.onRecoverableError,S=0;S<u.length;S++){var N=u[S];y(N.value,{componentStack:N.stack})}}finally{U.T=r,ae.p=p}}(xa&3)!==0&&_u(),qi(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Ch?Oo++:(Oo=0,Ch=i):Oo=0,Ro(0)}}function bx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,uo(r)))}function _u(){return mx(),px(),gx(),yx()}function yx(){if(Jt!==5)return!1;var i=Wa,r=Nh;Nh=0;var l=ta(xa),u=U.T,p=ae.p;try{ae.p=32>l?32:l,U.T=null,l=Th,Th=null;var y=Wa,S=xa;if(Jt=0,Ys=Wa=null,xa=0,(rt&6)!==0)throw Error(a(331));var N=rt;if(rt|=4,Jy(y.current),Xy(y,y.current,S,l),rt=N,Ro(0,!1),Lt&&typeof Lt.onPostCommitFiberRoot=="function")try{Lt.onPostCommitFiberRoot(an,y)}catch{}return!0}finally{ae.p=p,U.T=u,bx(i,r)}}function xx(i,r,l){r=ui(l,r),r=sh(i.stateNode,r,2),i=Ha(i,r,2),i!==null&&(bt(i,2),qi(i))}function dt(i,r,l){if(i.tag===3)xx(i,i,l);else for(;r!==null;){if(r.tag===3){xx(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Xa===null||!Xa.has(u))){i=ui(l,i),l=vy(2),u=Ha(r,l,2),u!==null&&(Ey(l,u,r,i),bt(u,2),qi(u));break}}r=r.return}}function Rh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new G_;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(wh=!0,p.add(l),i=W_.bind(null,i,r,l),r.then(i,i))}function W_(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,yt===i&&(Xe&l)===l&&(zt===4||zt===3&&(Xe&62914560)===Xe&&300>Ot()-yu?(rt&2)===0&&Vs(i,0):_h|=l,Qs===Xe&&(Qs=0)),qi(i)}function vx(i,r){r===0&&(r=Le()),i=Ir(i,r),i!==null&&(bt(i,r),qi(i))}function Z_(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),vx(i,l)}function J_(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),vx(i,l)}function ek(i,r){return ea(i,r)}var ku=null,Ws=null,Mh=!1,Nu=!1,jh=!1,Ja=0;function qi(i){i!==Ws&&i.next===null&&(Ws===null?ku=Ws=i:Ws=Ws.next=i),Nu=!0,Mh||(Mh=!0,nk())}function Ro(i,r){if(!jh&&Nu){jh=!0;do for(var l=!1,u=ku;u!==null;){if(i!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var S=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-ot(42|i)+1)-1,y&=p&~(S&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(l=!0,_x(u,y))}else y=Xe,y=B(u,u===yt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||se(u,y)||(l=!0,_x(u,y));u=u.next}while(l);jh=!1}}function tk(){Ex()}function Ex(){Nu=Mh=!1;var i=0;Ja!==0&&dk()&&(i=Ja);for(var r=Ot(),l=null,u=ku;u!==null;){var p=u.next,y=Sx(u,r);y===0?(u.next=null,l===null?ku=p:l.next=p,p===null&&(Ws=l)):(l=u,(i!==0||(y&3)!==0)&&(Nu=!0)),u=p}Jt!==0&&Jt!==5||Ro(i),Ja!==0&&(Ja=0)}function Sx(i,r){for(var l=i.suspendedLanes,u=i.pingedLanes,p=i.expirationTimes,y=i.pendingLanes&-62914561;0<y;){var S=31-ot(y),N=1<<S,I=p[S];I===-1?((N&l)===0||(N&u)!==0)&&(p[S]=ge(N,r)):I<=r&&(i.expiredLanes|=N),y&=~N}if(r=yt,l=Xe,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ft===2||ft===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Tr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||se(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&Tr(u),ta(l)){case 2:case 8:l=de;break;case 32:l=Re;break;case 268435456:l=nt;break;default:l=Re}return u=wx.bind(null,i),l=ea(l,u),i.callbackPriority=r,i.callbackNode=l,r}return u!==null&&u!==null&&Tr(u),i.callbackPriority=2,i.callbackNode=null,2}function wx(i,r){if(Jt!==0&&Jt!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(_u()&&i.callbackNode!==l)return null;var u=Xe;return u=B(i,i===yt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ax(i,u,r),Sx(i,Ot()),i.callbackNode!=null&&i.callbackNode===l?wx.bind(null,i):null)}function _x(i,r){if(_u())return null;ax(i,r,!0)}function nk(){mk(function(){(rt&6)!==0?ea(ne,tk):Ex()})}function Dh(){if(Ja===0){var i=Is;i===0&&(i=Cr,Cr<<=1,(Cr&261888)===0&&(Cr=256)),Ja=i}return Ja}function kx(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:Ia(""+i)}function Nx(i,r){var l=r.ownerDocument.createElement("input");return l.name=r.name,l.value=r.value,i.id&&l.setAttribute("form",i.id),r.parentNode.insertBefore(l,r),i=new FormData(i),l.parentNode.removeChild(l),i}function ik(i,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var y=kx((p[fn]||null).action),S=u.submitter;S&&(r=(r=S[fn]||null)?kx(r.formAction):S.getAttribute("formAction"),r!==null&&(y=r,S=null));var N=new Bc("action","action",null,u,p);i.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ja!==0){var I=S?Nx(p,S):new FormData(p);eh(l,{pending:!0,data:I,method:p.method,action:y},null,I)}}else typeof y=="function"&&(N.preventDefault(),I=S?Nx(p,S):new FormData(p),eh(l,{pending:!0,data:I,method:p.method,action:y},y,I))},currentTarget:p}]})}}for(var Lh=0;Lh<bd.length;Lh++){var Ih=bd[Lh],ak=Ih.toLowerCase(),rk=Ih[0].toUpperCase()+Ih.slice(1);Ni(ak,"on"+rk)}Ni(ib,"onAnimationEnd"),Ni(ab,"onAnimationIteration"),Ni(rb,"onAnimationStart"),Ni("dblclick","onDoubleClick"),Ni("focusin","onFocus"),Ni("focusout","onBlur"),Ni(E_,"onTransitionRun"),Ni(S_,"onTransitionStart"),Ni(w_,"onTransitionCancel"),Ni(sb,"onTransitionEnd"),ue("onMouseEnter",["mouseout","mouseover"]),ue("onMouseLeave",["mouseout","mouseover"]),ue("onPointerEnter",["pointerout","pointerover"]),ue("onPointerLeave",["pointerout","pointerover"]),ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="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(" "),sk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function Tx(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var u=i[l],p=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var S=u.length-1;0<=S;S--){var N=u[S],I=N.instance,X=N.currentTarget;if(N=N.listener,I!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=X;try{y(p)}catch(ie){Fc(ie)}p.currentTarget=null,y=I}else for(S=0;S<u.length;S++){if(N=u[S],I=N.instance,X=N.currentTarget,N=N.listener,I!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=X;try{y(p)}catch(ie){Fc(ie)}p.currentTarget=null,y=I}}}}function Qe(i,r){var l=r[Ql];l===void 0&&(l=r[Ql]=new Set);var u=i+"__bubble";l.has(u)||(Cx(r,i,2,!1),l.add(u))}function zh(i,r,l){var u=0;r&&(u|=4),Cx(l,i,u,r)}var Tu="_reactListening"+Math.random().toString(36).slice(2);function Bh(i){if(!i[Tu]){i[Tu]=!0,Oc.forEach(function(l){l!=="selectionchange"&&(sk.has(l)||zh(l,!1,i),zh(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[Tu]||(r[Tu]=!0,zh("selectionchange",!1,r))}}function Cx(i,r,l,u){switch(iv(r)){case 2:var p=Dk;break;case 8:p=Lk;break;default:p=Jh}l=p.bind(null,r,l,i),p=void 0,!ad||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?i.addEventListener(r,l,{capture:!0,passive:p}):i.addEventListener(r,l,!0):p!==void 0?i.addEventListener(r,l,{passive:p}):i.addEventListener(r,l,!1)}function Uh(i,r,l,u,p){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var N=u.stateNode.containerInfo;if(N===p)break;if(S===4)for(S=u.return;S!==null;){var I=S.tag;if((I===3||I===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;N!==null;){if(S=En(N),S===null)return;if(I=S.tag,I===5||I===6||I===26||I===27){u=y=S;continue e}N=N.parentNode}}u=u.return}Dc(function(){var X=y,ie=Be(l),oe=[];e:{var W=lb.get(i);if(W!==void 0){var ee=Bc,xe=i;switch(i){case"keypress":if(Ic(l)===0)break e;case"keydown":case"keyup":ee=Jw;break;case"focusin":xe="focus",ee=od;break;case"focusout":xe="blur",ee=od;break;case"beforeblur":case"afterblur":ee=od;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ee=Ig;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ee=Fw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ee=n_;break;case ib:case ab:case rb:ee=Hw;break;case sb:ee=a_;break;case"scroll":case"scrollend":ee=Uw;break;case"wheel":ee=s_;break;case"copy":case"cut":case"paste":ee=Gw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ee=Bg;break;case"toggle":case"beforetoggle":ee=o_}var Me=(r&4)!==0,pt=!Me&&(i==="scroll"||i==="scrollend"),H=Me?W!==null?W+"Capture":null:W;Me=[];for(var $=X,V;$!==null;){var le=$;if(V=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||V===null||H===null||(le=Jl($,H),le!=null&&Me.push(jo($,le,V))),pt)break;$=$.return}0<Me.length&&(W=new ee(W,xe,null,l,ie),oe.push({event:W,listeners:Me}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",ee=i==="mouseout"||i==="pointerout",W&&l!==Se&&(xe=l.relatedTarget||l.fromElement)&&(En(xe)||xe[Ma]))break e;if((ee||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,ee?(xe=l.relatedTarget||l.toElement,ee=X,xe=xe?En(xe):null,xe!==null&&(pt=o(xe),Me=xe.tag,xe!==pt||Me!==5&&Me!==27&&Me!==6)&&(xe=null)):(ee=null,xe=X),ee!==xe)){if(Me=Ig,le="onMouseLeave",H="onMouseEnter",$="mouse",(i==="pointerout"||i==="pointerover")&&(Me=Bg,le="onPointerLeave",H="onPointerEnter",$="pointer"),pt=ee==null?W:ja(ee),V=xe==null?W:ja(xe),W=new Me(le,$+"leave",ee,l,ie),W.target=pt,W.relatedTarget=V,le=null,En(ie)===X&&(Me=new Me(H,$+"enter",xe,l,ie),Me.target=V,Me.relatedTarget=pt,le=Me),pt=le,ee&&xe)t:{for(Me=lk,H=ee,$=xe,V=0,le=H;le;le=Me(le))V++;le=0;for(var Ce=$;Ce;Ce=Me(Ce))le++;for(;0<V-le;)H=Me(H),V--;for(;0<le-V;)$=Me($),le--;for(;V--;){if(H===$||$!==null&&H===$.alternate){Me=H;break t}H=Me(H),$=Me($)}Me=null}else Me=null;ee!==null&&Ax(oe,W,ee,Me,!1),xe!==null&&pt!==null&&Ax(oe,pt,xe,Me,!0)}}e:{if(W=X?ja(X):window,ee=W.nodeName&&W.nodeName.toLowerCase(),ee==="select"||ee==="input"&&W.type==="file")var it=Gg;else if(Hg(W))if(Qg)it=y_;else{it=g_;var we=p_}else ee=W.nodeName,!ee||ee.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?X&&La(X.elementType)&&(it=Gg):it=b_;if(it&&(it=it(i,X))){Kg(oe,it,l,ie);break e}we&&we(i,W,X),i==="focusout"&&X&&W.type==="number"&&X.memoizedProps.value!=null&&ks(W,"number",W.value)}switch(we=X?ja(X):window,i){case"focusin":(Hg(we)||we.contentEditable==="true")&&(Cs=we,md=X,lo=null);break;case"focusout":lo=md=Cs=null;break;case"mousedown":pd=!0;break;case"contextmenu":case"mouseup":case"dragend":pd=!1,tb(oe,l,ie);break;case"selectionchange":if(v_)break;case"keydown":case"keyup":tb(oe,l,ie)}var $e;if(ud)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ts?Pg(i,l)&&(We="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(We="onCompositionStart");We&&(Ug&&l.locale!=="ko"&&(Ts||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ts&&($e=Dg()):(za=ie,rd="value"in za?za.value:za.textContent,Ts=!0)),we=Cu(X,We),0<we.length&&(We=new zg(We,i,null,l,ie),oe.push({event:We,listeners:we}),$e?We.data=$e:($e=qg(l),$e!==null&&(We.data=$e)))),($e=u_?f_(i,l):d_(i,l))&&(We=Cu(X,"onBeforeInput"),0<We.length&&(we=new zg("onBeforeInput","beforeinput",null,l,ie),oe.push({event:we,listeners:We}),we.data=$e)),ik(oe,i,X,l,ie)}Tx(oe,r)})}function jo(i,r,l){return{instance:i,listener:r,currentTarget:l}}function Cu(i,r){for(var l=r+"Capture",u=[];i!==null;){var p=i,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=Jl(i,l),p!=null&&u.unshift(jo(i,p,y)),p=Jl(i,r),p!=null&&u.push(jo(i,p,y))),i.tag===3)return u;i=i.return}return[]}function lk(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Ax(i,r,l,u,p){for(var y=r._reactName,S=[];l!==null&&l!==u;){var N=l,I=N.alternate,X=N.stateNode;if(N=N.tag,I!==null&&I===u)break;N!==5&&N!==26&&N!==27||X===null||(I=X,p?(X=Jl(l,y),X!=null&&S.unshift(jo(l,X,I))):p||(X=Jl(l,y),X!=null&&S.push(jo(l,X,I)))),l=l.return}S.length!==0&&i.push({event:r,listeners:S})}var ok=/\r\n?/g,ck=/\u0000|\uFFFD/g;function Ox(i){return(typeof i=="string"?i:""+i).replace(ok,`
49
- `).replace(ck,"")}function Rx(i,r){return r=Ox(r),Ox(i)===r}function mt(i,r,l,u,p,y){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||je(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&je(i,""+u);break;case"className":Gn(i,"class",u);break;case"tabIndex":Gn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Gn(i,l,u);break;case"style":ut(i,u,y);break;case"data":if(r!=="object"){Gn(i,"data",u);break}case"src":case"href":if(u===""&&(r!=="a"||l!=="href")){i.removeAttribute(l);break}if(u==null||typeof u=="function"||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"action":case"formAction":if(typeof u=="function"){i.setAttribute(l,"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 y=="function"&&(l==="formAction"?(r!=="input"&&mt(i,r,"name",p.name,p,null),mt(i,r,"formEncType",p.formEncType,p,null),mt(i,r,"formMethod",p.formMethod,p,null),mt(i,r,"formTarget",p.formTarget,p,null)):(mt(i,r,"encType",p.encType,p,null),mt(i,r,"method",p.method,p,null),mt(i,r,"target",p.target,p,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=Ia(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=me);break;case"onScroll":u!=null&&Qe("scroll",i);break;case"onScrollEnd":u!=null&&Qe("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=Ia(""+u),i.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""+u):i.removeAttribute(l);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":u&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,""):i.removeAttribute(l);break;case"capture":case"download":u===!0?i.setAttribute(l,""):u!==!1&&u!=null&&typeof u!="function"&&typeof u!="symbol"?i.setAttribute(l,u):i.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":u!=null&&typeof u!="function"&&typeof u!="symbol"&&!isNaN(u)&&1<=u?i.setAttribute(l,u):i.removeAttribute(l);break;case"rowSpan":case"start":u==null||typeof u=="function"||typeof u=="symbol"||isNaN(u)?i.removeAttribute(l):i.setAttribute(l,u);break;case"popover":Qe("beforetoggle",i),Qe("toggle",i),dn(i,"popover",u);break;case"xlinkActuate":An(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":An(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":An(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":An(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":An(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":An(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":An(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":An(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":An(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":dn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=aa.get(l)||l,dn(i,l,u))}}function $h(i,r,l,u,p,y){switch(l){case"style":ut(i,u,y);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"children":typeof u=="string"?je(i,u):(typeof u=="number"||typeof u=="bigint")&&je(i,""+u);break;case"onScroll":u!=null&&Qe("scroll",i);break;case"onScrollEnd":u!=null&&Qe("scrollend",i);break;case"onClick":u!=null&&(i.onclick=me);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Rr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),y=i[fn]||null,y=y!=null?y[l]:null,typeof y=="function"&&i.removeEventListener(r,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,p);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):dn(i,l,u)}}}function cn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",i),Qe("load",i);var u=!1,p=!1,y;for(y in l)if(l.hasOwnProperty(y)){var S=l[y];if(S!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,y,S,l,null)}}p&&mt(i,r,"srcSet",l.srcSet,l,null),u&&mt(i,r,"src",l.src,l,null);return;case"input":Qe("invalid",i);var N=y=S=p=null,I=null,X=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":p=ie;break;case"type":S=ie;break;case"checked":I=ie;break;case"defaultChecked":X=ie;break;case"value":y=ie;break;case"defaultValue":N=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:mt(i,r,u,ie,l,null)}}Mr(i,y,N,I,X,S,p,!1);return;case"select":Qe("invalid",i),u=S=y=null;for(p in l)if(l.hasOwnProperty(p)&&(N=l[p],N!=null))switch(p){case"value":y=N;break;case"defaultValue":S=N;break;case"multiple":u=N;default:mt(i,r,p,N,l,null)}r=y,l=S,i.multiple=!!u,r!=null?rn(i,!!u,r,!1):l!=null&&rn(i,!!u,l,!0);return;case"textarea":Qe("invalid",i),y=p=u=null;for(S in l)if(l.hasOwnProperty(S)&&(N=l[S],N!=null))switch(S){case"value":u=N;break;case"defaultValue":p=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:mt(i,r,S,N,l,null)}Ns(i,u,p,y);return;case"option":for(I in l)if(l.hasOwnProperty(I)&&(u=l[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:mt(i,r,I,u,l,null)}return;case"dialog":Qe("beforetoggle",i),Qe("toggle",i),Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":Qe("load",i);break;case"video":case"audio":for(u=0;u<Mo.length;u++)Qe(Mo[u],i);break;case"image":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"embed":case"source":case"link":Qe("error",i),Qe("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(X in l)if(l.hasOwnProperty(X)&&(u=l[X],u!=null))switch(X){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:mt(i,r,X,u,l,null)}return;default:if(La(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&$h(i,r,ie,u,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null&&mt(i,r,N,u,l,null))}function uk(i,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,S=null,N=null,I=null,X=null,ie=null;for(ee in l){var oe=l[ee];if(l.hasOwnProperty(ee)&&oe!=null)switch(ee){case"checked":break;case"value":break;case"defaultValue":I=oe;default:u.hasOwnProperty(ee)||mt(i,r,ee,null,u,oe)}}for(var W in u){var ee=u[W];if(oe=l[W],u.hasOwnProperty(W)&&(ee!=null||oe!=null))switch(W){case"type":y=ee;break;case"name":p=ee;break;case"checked":X=ee;break;case"defaultChecked":ie=ee;break;case"value":S=ee;break;case"defaultValue":N=ee;break;case"children":case"dangerouslySetInnerHTML":if(ee!=null)throw Error(a(137,r));break;default:ee!==oe&&mt(i,r,W,ee,u,oe)}}Xl(i,S,N,I,X,ie,y,p);return;case"select":ee=S=N=W=null;for(y in l)if(I=l[y],l.hasOwnProperty(y)&&I!=null)switch(y){case"value":break;case"multiple":ee=I;default:u.hasOwnProperty(y)||mt(i,r,y,null,u,I)}for(p in u)if(y=u[p],I=l[p],u.hasOwnProperty(p)&&(y!=null||I!=null))switch(p){case"value":W=y;break;case"defaultValue":N=y;break;case"multiple":S=y;default:y!==I&&mt(i,r,p,y,u,I)}r=N,l=S,u=ee,W!=null?rn(i,!!l,W,!1):!!u!=!!l&&(r!=null?rn(i,!!l,r,!0):rn(i,!!l,l?[]:"",!1));return;case"textarea":ee=W=null;for(N in l)if(p=l[N],l.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:mt(i,r,N,null,u,p)}for(S in u)if(p=u[S],y=l[S],u.hasOwnProperty(S)&&(p!=null||y!=null))switch(S){case"value":W=p;break;case"defaultValue":ee=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==y&&mt(i,r,S,p,u,y)}Mc(i,W,ee);return;case"option":for(var xe in l)if(W=l[xe],l.hasOwnProperty(xe)&&W!=null&&!u.hasOwnProperty(xe))switch(xe){case"selected":i.selected=!1;break;default:mt(i,r,xe,null,u,W)}for(I in u)if(W=u[I],ee=l[I],u.hasOwnProperty(I)&&W!==ee&&(W!=null||ee!=null))switch(I){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:mt(i,r,I,W,u,ee)}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 Me in l)W=l[Me],l.hasOwnProperty(Me)&&W!=null&&!u.hasOwnProperty(Me)&&mt(i,r,Me,null,u,W);for(X in u)if(W=u[X],ee=l[X],u.hasOwnProperty(X)&&W!==ee&&(W!=null||ee!=null))switch(X){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:mt(i,r,X,W,u,ee)}return;default:if(La(r)){for(var pt in l)W=l[pt],l.hasOwnProperty(pt)&&W!==void 0&&!u.hasOwnProperty(pt)&&$h(i,r,pt,void 0,u,W);for(ie in u)W=u[ie],ee=l[ie],!u.hasOwnProperty(ie)||W===ee||W===void 0&&ee===void 0||$h(i,r,ie,W,u,ee);return}}for(var H in l)W=l[H],l.hasOwnProperty(H)&&W!=null&&!u.hasOwnProperty(H)&&mt(i,r,H,null,u,W);for(oe in u)W=u[oe],ee=l[oe],!u.hasOwnProperty(oe)||W===ee||W==null&&ee==null||mt(i,r,oe,W,u,ee)}function Mx(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function fk(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],y=p.transferSize,S=p.initiatorType,N=p.duration;if(y&&N&&Mx(S)){for(S=0,N=p.responseEnd,u+=1;u<l.length;u++){var I=l[u],X=I.startTime;if(X>N)break;var ie=I.transferSize,oe=I.initiatorType;ie&&Mx(oe)&&(I=I.responseEnd,S+=ie*(I<N?1:(N-X)/(I-X)))}if(--u,r+=8*(y+S)/(p.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var Fh=null,Ph=null;function Au(i){return i.nodeType===9?i:i.ownerDocument}function jx(i){switch(i){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Dx(i,r){if(i===0)switch(r){case"svg":return 1;case"math":return 2;default:return 0}return i===1&&r==="foreignObject"?0:i}function qh(i,r){return i==="textarea"||i==="noscript"||typeof r.children=="string"||typeof r.children=="number"||typeof r.children=="bigint"||typeof r.dangerouslySetInnerHTML=="object"&&r.dangerouslySetInnerHTML!==null&&r.dangerouslySetInnerHTML.__html!=null}var Hh=null;function dk(){var i=window.event;return i&&i.type==="popstate"?i===Hh?!1:(Hh=i,!0):(Hh=null,!1)}var Lx=typeof setTimeout=="function"?setTimeout:void 0,hk=typeof clearTimeout=="function"?clearTimeout:void 0,Ix=typeof Promise=="function"?Promise:void 0,mk=typeof queueMicrotask=="function"?queueMicrotask:typeof Ix<"u"?function(i){return Ix.resolve(null).then(i).catch(pk)}:Lx;function pk(i){setTimeout(function(){throw i})}function er(i){return i==="head"}function zx(i,r){var l=r,u=0;do{var p=l.nextSibling;if(i.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){i.removeChild(p),tl(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Do(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Do(l);for(var y=l.firstChild;y;){var S=y.nextSibling,N=y.nodeName;y[Or]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=S}}else l==="body"&&Do(i.ownerDocument.body);l=p}while(l);tl(r)}function Bx(i,r){var l=i;i=0;do{var u=l.nextSibling;if(l.nodeType===1?r?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(r?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),u&&u.nodeType===8)if(l=u.data,l==="/$"){if(i===0)break;i--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||i++;l=u}while(l)}function Kh(i){var r=i.firstChild;for(r&&r.nodeType===10&&(r=r.nextSibling);r;){var l=r;switch(r=r.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Kh(l),Yl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function gk(i,r,l,u){for(;i.nodeType===1;){var p=l;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[Or])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(y=i.getAttribute("rel"),y==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(y!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(y=i.getAttribute("src"),(y!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===y)return i}else return i;if(i=pi(i.nextSibling),i===null)break}return null}function bk(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=pi(i.nextSibling),i===null))return null;return i}function Ux(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=pi(i.nextSibling),i===null))return null;return i}function Gh(i){return i.data==="$?"||i.data==="$~"}function Qh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function yk(i,r){var l=i.ownerDocument;if(i.data==="$~")i._reactRetry=r;else if(i.data!=="$?"||l.readyState!=="loading")r();else{var u=function(){r(),l.removeEventListener("DOMContentLoaded",u)};l.addEventListener("DOMContentLoaded",u),i._reactRetry=u}}function pi(i){for(;i!=null;i=i.nextSibling){var r=i.nodeType;if(r===1||r===3)break;if(r===8){if(r=i.data,r==="$"||r==="$!"||r==="$?"||r==="$~"||r==="&"||r==="F!"||r==="F")break;if(r==="/$"||r==="/&")return null}}return i}var Yh=null;function $x(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return pi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Fx(i){i=i.previousSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(r===0)return i;r--}else l!=="/$"&&l!=="/&"||r++}i=i.previousSibling}return null}function Px(i,r,l){switch(r=Au(l),i){case"html":if(i=r.documentElement,!i)throw Error(a(452));return i;case"head":if(i=r.head,!i)throw Error(a(453));return i;case"body":if(i=r.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Do(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Yl(i)}var gi=new Map,qx=new Set;function Ou(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var va=ae.d;ae.d={f:xk,r:vk,D:Ek,C:Sk,L:wk,m:_k,X:Nk,S:kk,M:Tk};function xk(){var i=va.f(),r=Eu();return i||r}function vk(i){var r=na(i);r!==null&&r.tag===5&&r.type==="form"?sy(r):va.r(i)}var Zs=typeof document>"u"?null:document;function Hx(i,r,l){var u=Zs;if(u&&typeof r=="string"&&r){var p=On(r);p='link[rel="'+i+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),qx.has(p)||(qx.add(p),i={rel:i,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),cn(r,"link",i),Gt(r),u.head.appendChild(r)))}}function Ek(i){va.D(i),Hx("dns-prefetch",i,null)}function Sk(i,r){va.C(i,r),Hx("preconnect",i,r)}function wk(i,r,l){va.L(i,r,l);var u=Zs;if(u&&i&&r){var p='link[rel="preload"][as="'+On(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+On(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+On(l.imageSizes)+'"]')):p+='[href="'+On(i)+'"]';var y=p;switch(r){case"style":y=Js(i);break;case"script":y=el(i)}gi.has(y)||(i=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),gi.set(y,i),u.querySelector(p)!==null||r==="style"&&u.querySelector(Lo(y))||r==="script"&&u.querySelector(Io(y))||(r=u.createElement("link"),cn(r,"link",i),Gt(r),u.head.appendChild(r)))}}function _k(i,r){va.m(i,r);var l=Zs;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+On(u)+'"][href="'+On(i)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=el(i)}if(!gi.has(y)&&(i=g({rel:"modulepreload",href:i},r),gi.set(y,i),l.querySelector(p)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Io(y)))return}u=l.createElement("link"),cn(u,"link",i),Gt(u),l.head.appendChild(u)}}}function kk(i,r,l){va.S(i,r,l);var u=Zs;if(u&&i){var p=Da(u).hoistableStyles,y=Js(i);r=r||"default";var S=p.get(y);if(!S){var N={loading:0,preload:null};if(S=u.querySelector(Lo(y)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=gi.get(y))&&Vh(i,l);var I=S=u.createElement("link");Gt(I),cn(I,"link",i),I._p=new Promise(function(X,ie){I.onload=X,I.onerror=ie}),I.addEventListener("load",function(){N.loading|=1}),I.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Ru(S,r,u)}S={type:"stylesheet",instance:S,count:1,state:N},p.set(y,S)}}}function Nk(i,r){va.X(i,r);var l=Zs;if(l&&i){var u=Da(l).hoistableScripts,p=el(i),y=u.get(p);y||(y=l.querySelector(Io(p)),y||(i=g({src:i,async:!0},r),(r=gi.get(p))&&Xh(i,r),y=l.createElement("script"),Gt(y),cn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Tk(i,r){va.M(i,r);var l=Zs;if(l&&i){var u=Da(l).hoistableScripts,p=el(i),y=u.get(p);y||(y=l.querySelector(Io(p)),y||(i=g({src:i,async:!0,type:"module"},r),(r=gi.get(p))&&Xh(i,r),y=l.createElement("script"),Gt(y),cn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Kx(i,r,l,u){var p=(p=ve.current)?Ou(p):null;if(!p)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Js(l.href),l=Da(p).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=Js(l.href);var y=Da(p).hoistableStyles,S=y.get(i);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(i,S),(y=p.querySelector(Lo(i)))&&!y._p&&(S.instance=y,S.state.loading=5),gi.has(i)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},gi.set(i,l),y||Ck(p,i,l,S.state))),r&&u===null)throw Error(a(528,""));return S}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=el(l),l=Da(p).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function Js(i){return'href="'+On(i)+'"'}function Lo(i){return'link[rel="stylesheet"]['+i+"]"}function Gx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function Ck(i,r,l,u){i.querySelector('link[rel="preload"][as="style"]['+r+"]")?u.loading=1:(r=i.createElement("link"),u.preload=r,r.addEventListener("load",function(){return u.loading|=1}),r.addEventListener("error",function(){return u.loading|=2}),cn(r,"link",l),Gt(r),i.head.appendChild(r))}function el(i){return'[src="'+On(i)+'"]'}function Io(i){return"script[async]"+i}function Qx(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+On(l.href)+'"]');if(u)return r.instance=u,Gt(u),u;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Gt(u),cn(u,"style",p),Ru(u,l.precedence,i),r.instance=u;case"stylesheet":p=Js(l.href);var y=i.querySelector(Lo(p));if(y)return r.state.loading|=4,r.instance=y,Gt(y),y;u=Gx(l),(p=gi.get(p))&&Vh(u,p),y=(i.ownerDocument||i).createElement("link"),Gt(y);var S=y;return S._p=new Promise(function(N,I){S.onload=N,S.onerror=I}),cn(y,"link",u),r.state.loading|=4,Ru(y,l.precedence,i),r.instance=y;case"script":return y=el(l.src),(p=i.querySelector(Io(y)))?(r.instance=p,Gt(p),p):(u=l,(p=gi.get(y))&&(u=g({},l),Xh(u,p)),i=i.ownerDocument||i,p=i.createElement("script"),Gt(p),cn(p,"link",u),i.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,Ru(u,l.precedence,i));return r.instance}function Ru(i,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,S=0;S<u.length;S++){var N=u[S];if(N.dataset.precedence===r)y=N;else if(y!==p)break}y?y.parentNode.insertBefore(i,y.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function Vh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Xh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Mu=null;function Yx(i,r,l){if(Mu===null){var u=new Map,p=Mu=new Map;p.set(l,u)}else p=Mu,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(i))return u;for(u.set(i,null),l=l.getElementsByTagName(i),p=0;p<l.length;p++){var y=l[p];if(!(y[Or]||y[Pt]||i==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var S=y.getAttribute(r)||"";S=i+S;var N=u.get(S);N?N.push(y):u.set(S,[y])}}return u}function Vx(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function Ak(i,r,l){if(l===1||r.itemProp!=null)return!1;switch(i){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;switch(r.rel){case"stylesheet":return i=r.disabled,typeof r.precedence=="string"&&i==null;default:return!0}case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function Xx(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Ok(i,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=Js(u.href),y=r.querySelector(Lo(p));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=ju.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=y,Gt(y);return}y=r.ownerDocument||r,u=Gx(u),(p=gi.get(p))&&Vh(u,p),y=y.createElement("link"),Gt(y);var S=y;S._p=new Promise(function(N,I){S.onload=N,S.onerror=I}),cn(y,"link",u),l.instance=y}i.stylesheets===null&&(i.stylesheets=new Map),i.stylesheets.set(l,r),(r=l.state.preload)&&(l.state.loading&3)===0&&(i.count++,l=ju.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Wh=0;function Rk(i,r){return i.stylesheets&&i.count===0&&Lu(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var u=setTimeout(function(){if(i.stylesheets&&Lu(i,i.stylesheets),i.unsuspend){var y=i.unsuspend;i.unsuspend=null,y()}},6e4+r);0<i.imgBytes&&Wh===0&&(Wh=62500*fk());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Lu(i,i.stylesheets),i.unsuspend)){var y=i.unsuspend;i.unsuspend=null,y()}},(i.imgBytes>Wh?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function ju(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Lu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var Du=null;function Lu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,Du=new Map,r.forEach(Mk,i),Du=null,ju.call(i))}function Mk(i,r){if(!(r.state.loading&4)){var l=Du.get(i);if(l)var u=l.get(null);else{l=new Map,Du.set(i,l);for(var p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var S=p[y];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),u=S)}u&&l.set(null,u)}p=r.instance,S=p.getAttribute("data-precedence"),y=l.get(S)||u,y===u&&l.set(null,p),l.set(S,p),this.count++,u=ju.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),r.state.loading|=4}}var zo={$$typeof:T,Provider:null,Consumer:null,_currentValue:G,_currentValue2:G,_threadCount:0};function jk(i,r,l,u,p,y,S,N,I){this.tag=1,this.containerInfo=i,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=wt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wt(0),this.hiddenUpdates=wt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function Wx(i,r,l,u,p,y,S,N,I,X,ie,oe){return i=new jk(i,r,l,S,I,X,ie,oe,N),r=1,y===!0&&(r|=24),y=Vn(3,null,null,r),i.current=y,y.stateNode=i,r=Od(),r.refCount++,i.pooledCache=r,r.refCount++,y.memoizedState={element:u,isDehydrated:l,cache:r},Dd(y),i}function Zx(i){return i?(i=Rs,i):Rs}function Jx(i,r,l,u,p,y){p=Zx(p),u.context===null?u.context=p:u.pendingContext=p,u=qa(r),u.payload={element:l},y=y===void 0?null:y,y!==null&&(u.callback=y),l=Ha(i,u,r),l!==null&&(In(l,i,r),po(l,i,r))}function ev(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function Zh(i,r){ev(i,r),(i=i.alternate)&&ev(i,r)}function tv(i){if(i.tag===13||i.tag===31){var r=Ir(i,67108864);r!==null&&In(r,i,67108864),Zh(i,67108864)}}function nv(i){if(i.tag===13||i.tag===31){var r=ei();r=Nt(r);var l=Ir(i,r);l!==null&&In(l,i,r),Zh(i,r)}}var Iu=!0;function Dk(i,r,l,u){var p=U.T;U.T=null;var y=ae.p;try{ae.p=2,Jh(i,r,l,u)}finally{ae.p=y,U.T=p}}function Lk(i,r,l,u){var p=U.T;U.T=null;var y=ae.p;try{ae.p=8,Jh(i,r,l,u)}finally{ae.p=y,U.T=p}}function Jh(i,r,l,u){if(Iu){var p=em(u);if(p===null)Uh(i,r,u,zu,l),av(i,u);else if(zk(p,i,r,l,u))u.stopPropagation();else if(av(i,u),r&4&&-1<Ik.indexOf(i)){for(;p!==null;){var y=na(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var S=Cn(y.pendingLanes);if(S!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;S;){var I=1<<31-ot(S);N.entanglements[1]|=I,S&=~I}qi(y),(rt&6)===0&&(xu=Ot()+500,Ro(0))}}break;case 31:case 13:N=Ir(y,2),N!==null&&In(N,y,2),Eu(),Zh(y,2)}if(y=em(u),y===null&&Uh(i,r,u,zu,l),y===p)break;p=y}p!==null&&u.stopPropagation()}else Uh(i,r,u,null,l)}}function em(i){return i=Be(i),tm(i)}var zu=null;function tm(i){if(zu=null,i=En(i),i!==null){var r=o(i);if(r===null)i=null;else{var l=r.tag;if(l===13){if(i=c(r),i!==null)return i;i=null}else if(l===31){if(i=f(r),i!==null)return i;i=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return zu=i,null}function iv(i){switch(i){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(ys()){case ne:return 2;case de:return 8;case Re:case qe:return 32;case nt:return 268435456;default:return 32}default:return 32}}var nm=!1,tr=null,nr=null,ir=null,Bo=new Map,Uo=new Map,ar=[],Ik="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 av(i,r){switch(i){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":Bo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(r.pointerId)}}function $o(i,r,l,u,p,y){return i===null||i.nativeEvent!==y?(i={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},r!==null&&(r=na(r),r!==null&&tv(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),i)}function zk(i,r,l,u,p){switch(r){case"focusin":return tr=$o(tr,i,r,l,u,p),!0;case"dragenter":return nr=$o(nr,i,r,l,u,p),!0;case"mouseover":return ir=$o(ir,i,r,l,u,p),!0;case"pointerover":var y=p.pointerId;return Bo.set(y,$o(Bo.get(y)||null,i,r,l,u,p)),!0;case"gotpointercapture":return y=p.pointerId,Uo.set(y,$o(Uo.get(y)||null,i,r,l,u,p)),!0}return!1}function rv(i){var r=En(i.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Es(i.priority,function(){nv(l)});return}}else if(r===31){if(r=f(l),r!==null){i.blockedOn=r,Es(i.priority,function(){nv(l)});return}}else if(r===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Bu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=em(i.nativeEvent);if(l===null){l=i.nativeEvent;var u=new l.constructor(l.type,l);Se=u,l.target.dispatchEvent(u),Se=null}else return r=na(l),r!==null&&tv(r),i.blockedOn=l,!1;r.shift()}return!0}function sv(i,r,l){Bu(i)&&l.delete(r)}function Bk(){nm=!1,tr!==null&&Bu(tr)&&(tr=null),nr!==null&&Bu(nr)&&(nr=null),ir!==null&&Bu(ir)&&(ir=null),Bo.forEach(sv),Uo.forEach(sv)}function Uu(i,r){i.blockedOn===r&&(i.blockedOn=null,nm||(nm=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Bk)))}var $u=null;function lv(i){$u!==i&&($u=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){$u===i&&($u=null);for(var r=0;r<i.length;r+=3){var l=i[r],u=i[r+1],p=i[r+2];if(typeof u!="function"){if(tm(u||l)===null)continue;break}var y=na(l);y!==null&&(i.splice(r,3),r-=3,eh(y,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function tl(i){function r(I){return Uu(I,i)}tr!==null&&Uu(tr,i),nr!==null&&Uu(nr,i),ir!==null&&Uu(ir,i),Bo.forEach(r),Uo.forEach(r);for(var l=0;l<ar.length;l++){var u=ar[l];u.blockedOn===i&&(u.blockedOn=null)}for(;0<ar.length&&(l=ar[0],l.blockedOn===null);)rv(l),l.blockedOn===null&&ar.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],y=l[u+1],S=p[fn]||null;if(typeof y=="function")S||lv(l);else if(S){var N=null;if(y&&y.hasAttribute("formAction")){if(p=y,S=y[fn]||null)N=S.formAction;else if(tm(p)!==null)continue}else N=S.action;typeof N=="function"?l[u+1]=N:(l.splice(u,3),u-=3),lv(l)}}}function ov(){function i(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(S){return p=S})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function im(i){this._internalRoot=i}Fu.prototype.render=im.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ei();Jx(l,u,i,r,null,null)},Fu.prototype.unmount=im.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;Jx(i.current,2,null,i,null,null),Eu(),r[Ma]=null}};function Fu(i){this._internalRoot=i}Fu.prototype.unstable_scheduleHydration=function(i){if(i){var r=vs();i={blockedOn:null,target:i,priority:r};for(var l=0;l<ar.length&&r!==0&&r<ar[l].priority;l++);ar.splice(l,0,i),l===0&&rv(i)}};var cv=t.version;if(cv!=="19.2.5")throw Error(a(527,cv,"19.2.5"));ae.findDOMNode=function(i){var r=i._reactInternals;if(r===void 0)throw typeof i.render=="function"?Error(a(188)):(i=Object.keys(i).join(","),Error(a(268,i)));return i=m(r),i=i!==null?b(i):null,i=i===null?null:i.stateNode,i};var Uk={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Pu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Pu.isDisabled&&Pu.supportsFiber)try{an=Pu.inject(Uk),Lt=Pu}catch{}}return Po.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",p=gy,y=by,S=yy;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=Wx(i,1,!1,null,null,l,u,null,p,y,S,ov),i[Ma]=r.current,Bh(i),new im(r)},Po.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",y=gy,S=by,N=yy,I=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=Wx(i,1,!0,r,l??null,u,p,I,y,S,N,ov),r.context=Zx(null),l=r.current,u=ei(),u=Nt(u),p=qa(u),p.callback=null,Ha(l,p,u),l=u,r.current.lanes=l,bt(r,l),qi(r),i[Ma]=r.current,Bh(i),new Fu(r)},Po.version="19.2.5",Po}var Ev;function Wk(){if(Ev)return lm.exports;Ev=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),lm.exports=Xk(),lm.exports}var Zk=Wk(),Ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},es,fr,gl,rE,Jk=(rE=class extends Ml{constructor(){super();Te(this,es);Te(this,fr);Te(this,gl);be(this,gl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){z(this,fr)||this.setEventListener(z(this,gl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,fr))==null||t.call(this),be(this,fr,void 0))}setEventListener(t){var n;be(this,gl,t),(n=z(this,fr))==null||n.call(this),be(this,fr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(this,es)!==t&&(be(this,es,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof z(this,es)=="boolean"?z(this,es):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},es=new WeakMap,fr=new WeakMap,gl=new WeakMap,rE),Rp=new Jk,eN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dr,Cp,sE,tN=(sE=class{constructor(){Te(this,dr,eN);Te(this,Cp,!1)}setTimeoutProvider(e){be(this,dr,e)}setTimeout(e,t){return z(this,dr).setTimeout(e,t)}clearTimeout(e){z(this,dr).clearTimeout(e)}setInterval(e,t){return z(this,dr).setInterval(e,t)}clearInterval(e){z(this,dr).clearInterval(e)}},dr=new WeakMap,Cp=new WeakMap,sE),Xr=new tN;function nN(e){setTimeout(e,0)}var iN=typeof window>"u"||"Deno"in globalThis;function kn(){}function aN(e,t){return typeof e=="function"?e(t):e}function Hm(e){return typeof e=="number"&&e>=0&&e!==1/0}function gE(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return typeof e=="function"?e(t):e}function yi(e,t){return typeof e=="function"?e(t):e}function Sv(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:c,stale:f}=e;if(c){if(a){if(t.queryHash!==Mp(c,t.options))return!1}else if(!nc(t.queryKey,c))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||o&&!o(t))}function wv(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(cs(t.options.mutationKey)!==cs(o))return!1}else if(!nc(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Mp(e,t){return((t==null?void 0:t.queryKeyHashFn)||cs)(e)}function cs(e){return JSON.stringify(e,(t,n)=>Km(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function nc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nc(e[n],t[n])):!1}var rN=Object.prototype.hasOwnProperty;function bE(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=_v(e)&&_v(t);if(!a&&!(Km(e)&&Km(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,h=a?new Array(f):{};let m=0;for(let b=0;b<f;b++){const g=a?b:c[b],v=e[g],x=t[g];if(v===x){h[g]=v,(a?b<o:rN.call(e,g))&&m++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){h[g]=x;continue}const E=bE(v,x,n+1);h[g]=E,E===v&&m++}return o===f&&m===o?e:h}function gf(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const n in e)if(e[n]!==t[n])return!1;return!0}function _v(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Km(e){if(!kv(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!kv(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function kv(e){return Object.prototype.toString.call(e)==="[object Object]"}function sN(e){return new Promise(t=>{Xr.setTimeout(t,e)})}function Gm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?bE(e,t):t}function lN(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function oN(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var jp=Symbol();function yE(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===jp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Dp(e,t){return typeof e=="function"?e(...t):!!e}function cN(e,t,n){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),a||(a=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var ic=(()=>{let e=()=>iN;return{isServer(){return e()},setIsServer(t){e=t}}})();function Qm(){let e,t;const n=new Promise((s,o)=>{e=s,t=o});n.status="pending",n.catch(()=>{});function a(s){Object.assign(n,s),delete n.resolve,delete n.reject}return n.resolve=s=>{a({status:"fulfilled",value:s}),e(s)},n.reject=s=>{a({status:"rejected",reason:s}),t(s)},n}var uN=nN;function fN(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=uN;const o=f=>{t?e.push(f):s(()=>{n(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(h=>{n(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||c()}return h},batchCalls:f=>(...h)=>{o(()=>{f(...h)})},schedule:o,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var en=fN(),bl,hr,yl,lE,dN=(lE=class extends Ml{constructor(){super();Te(this,bl,!0);Te(this,hr);Te(this,yl);be(this,yl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){z(this,hr)||this.setEventListener(z(this,yl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,hr))==null||t.call(this),be(this,hr,void 0))}setEventListener(t){var n;be(this,yl,t),(n=z(this,hr))==null||n.call(this),be(this,hr,t(this.setOnline.bind(this)))}setOnline(t){z(this,bl)!==t&&(be(this,bl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,bl)}},bl=new WeakMap,hr=new WeakMap,yl=new WeakMap,lE),bf=new dN;function hN(e){return Math.min(1e3*2**e,3e4)}function xE(e){return(e??"online")==="online"?bf.isOnline():!0}var Ym=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function vE(e){let t=!1,n=0,a;const s=Qm(),o=()=>s.status!=="pending",c=w=>{var k;if(!o()){const _=new Ym(w);v(_),(k=e.onCancel)==null||k.call(e,_)}},f=()=>{t=!0},h=()=>{t=!1},m=()=>Rp.isFocused()&&(e.networkMode==="always"||bf.isOnline())&&e.canRun(),b=()=>xE(e.networkMode)&&e.canRun(),g=w=>{o()||(a==null||a(),s.resolve(w))},v=w=>{o()||(a==null||a(),s.reject(w))},x=()=>new Promise(w=>{var k;a=_=>{(o()||m())&&w(_)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(o())return;let w;const k=n===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const A=e.retry??(ic.isServer()?0:3),T=e.retryDelay??hN,j=typeof T=="function"?T(n,_):T,F=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,_);if(t||!F){v(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),sN(j).then(()=>m()?void 0:x()).then(()=>{t?v(_):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:f,continueRetry:h,canStart:b,start:()=>(b()?E():x().then(E),s)}}var ts,oE,EE=(oE=class{constructor(){Te(this,ts)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Hm(this.gcTime)&&be(this,ts,Xr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ic.isServer()?1/0:300*1e3))}clearGcTimeout(){z(this,ts)!==void 0&&(Xr.clearTimeout(z(this,ts)),be(this,ts,void 0))}},ts=new WeakMap,oE),ns,xl,bi,is,nn,dc,as,ni,SE,Ea,cE,mN=(cE=class extends EE{constructor(t){super();Te(this,ni);Te(this,ns);Te(this,xl);Te(this,bi);Te(this,is);Te(this,nn);Te(this,dc);Te(this,as);be(this,as,!1),be(this,dc,t.defaultOptions),this.setOptions(t.options),this.observers=[],be(this,is,t.client),be(this,bi,z(this,is).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,be(this,ns,Tv(this.options)),this.state=t.state??z(this,ns),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,nn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,dc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Tv(this.options);n.data!==void 0&&(this.setState(Nv(n.data,n.dataUpdatedAt)),be(this,ns,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&z(this,bi).remove(this)}setData(t,n){const a=Gm(this.state.data,t,this.options);return Fe(this,ni,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Fe(this,ni,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,nn))==null?void 0:a.promise;return(s=z(this,nn))==null||s.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(this,ns)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>yi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===jp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!gE(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,nn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(this,bi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(z(this,nn)&&(z(this,as)||Fe(this,ni,SE).call(this)?z(this,nn).cancel({revert:!0}):z(this,nn).cancelRetry()),this.scheduleGc()),z(this,bi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Fe(this,ni,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var h,m,b,g,v,x,E,w,k,_,A,T;if(this.state.fetchStatus!=="idle"&&((h=z(this,nn))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,nn))return z(this,nn).continueRetry(),z(this,nn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find(F=>F.options.queryFn);j&&this.setOptions(j.options)}const a=new AbortController,s=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(be(this,as,!0),a.signal)})},o=()=>{const j=yE(this.options,n),M=(()=>{const q={client:z(this,is),queryKey:this.queryKey,meta:this.meta};return s(q),q})();return be(this,as,!1),this.options.persister?this.options.persister(j,M,this):j(M)},f=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:z(this,is),state:this.state,fetchFn:o};return s(j),j})();(m=this.options.behavior)==null||m.onFetch(f,this),be(this,xl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=f.fetchOptions)==null?void 0:b.meta))&&Fe(this,ni,Ea).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),be(this,nn,vE({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:j=>{j instanceof Ym&&j.revert&&this.setState({...z(this,xl),fetchStatus:"idle"}),a.abort()},onFail:(j,F)=>{Fe(this,ni,Ea).call(this,{type:"failed",failureCount:j,error:F})},onPause:()=>{Fe(this,ni,Ea).call(this,{type:"pause"})},onContinue:()=>{Fe(this,ni,Ea).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const j=await z(this,nn).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(x=(v=z(this,bi).config).onSuccess)==null||x.call(v,j,this),(w=(E=z(this,bi).config).onSettled)==null||w.call(E,j,this.state.error,this),j}catch(j){if(j instanceof Ym){if(j.silent)return z(this,nn).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Fe(this,ni,Ea).call(this,{type:"error",error:j}),(_=(k=z(this,bi).config).onError)==null||_.call(k,j,this),(T=(A=z(this,bi).config).onSettled)==null||T.call(A,this.state.data,j,this),j}finally{this.scheduleGc()}}},ns=new WeakMap,xl=new WeakMap,bi=new WeakMap,is=new WeakMap,nn=new WeakMap,dc=new WeakMap,as=new WeakMap,ni=new WeakSet,SE=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ea=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...wE(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Nv(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return be(this,xl,t.manual?s:void 0),s;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),en.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,bi).notify({query:this,type:"updated",action:t})})},cE);function wE(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:xE(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Nv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Tv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Un,et,hc,wn,rs,vl,Sa,mr,mc,El,Sl,ss,ls,pr,wl,lt,Xo,Vm,Xm,Wm,Zm,Jm,ep,tp,_E,uE,pN=(uE=class extends Ml{constructor(t,n){super();Te(this,lt);Te(this,Un);Te(this,et);Te(this,hc);Te(this,wn);Te(this,rs);Te(this,vl);Te(this,Sa);Te(this,mr);Te(this,mc);Te(this,El);Te(this,Sl);Te(this,ss);Te(this,ls);Te(this,pr);Te(this,wl,new Set);this.options=n,be(this,Un,t),be(this,mr,null),be(this,Sa,Qm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(z(this,et).addObserver(this),Cv(z(this,et),this.options)?Fe(this,lt,Xo).call(this):this.updateResult(),Fe(this,lt,Zm).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return np(z(this,et),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return np(z(this,et),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Fe(this,lt,Jm).call(this),Fe(this,lt,ep).call(this),z(this,et).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,et);if(this.options=z(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof yi(this.options.enabled,z(this,et))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Fe(this,lt,tp).call(this),z(this,et).setOptions(this.options),n._defaulted&&!gf(this.options,n)&&z(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,et),observer:this});const s=this.hasListeners();s&&Av(z(this,et),a,this.options,n)&&Fe(this,lt,Xo).call(this),this.updateResult(),s&&(z(this,et)!==a||yi(this.options.enabled,z(this,et))!==yi(n.enabled,z(this,et))||vr(this.options.staleTime,z(this,et))!==vr(n.staleTime,z(this,et)))&&Fe(this,lt,Vm).call(this);const o=Fe(this,lt,Xm).call(this);s&&(z(this,et)!==a||yi(this.options.enabled,z(this,et))!==yi(n.enabled,z(this,et))||o!==z(this,pr))&&Fe(this,lt,Wm).call(this,o)}getOptimisticResult(t){const n=z(this,Un).getQueryCache().build(z(this,Un),t),a=this.createResult(n,t);return bN(this,a)&&(be(this,wn,a),be(this,vl,this.options),be(this,rs,z(this,et).state)),a}getCurrentResult(){return z(this,wn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Sa).status==="pending"&&z(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,wl).add(t)}getCurrentQuery(){return z(this,et)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Un).defaultQueryOptions(t),a=z(this,Un).getQueryCache().build(z(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Fe(this,lt,Xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,wn)))}createResult(t,n){var te;const a=z(this,et),s=this.options,o=z(this,wn),c=z(this,rs),f=z(this,vl),m=t!==a?t.state:z(this,hc),{state:b}=t;let g={...b},v=!1,x;if(n._optimisticResults){const D=this.hasListeners(),P=!D&&Cv(t,n),J=D&&Av(t,a,n,s);(P||J)&&(g={...g,...wE(b.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:k}=g;x=g.data;let _=!1;if(n.placeholderData!==void 0&&x===void 0&&k==="pending"){let D;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(D=o.data,_=!0):D=typeof n.placeholderData=="function"?n.placeholderData((te=z(this,Sl))==null?void 0:te.state.data,z(this,Sl)):n.placeholderData,D!==void 0&&(k="success",x=Gm(o==null?void 0:o.data,D,n),v=!0)}if(n.select&&x!==void 0&&!_)if(o&&x===(c==null?void 0:c.data)&&n.select===z(this,mc))x=z(this,El);else try{be(this,mc,n.select),x=n.select(x),x=Gm(o==null?void 0:o.data,x,n),be(this,El,x),be(this,mr,null)}catch(D){be(this,mr,D)}z(this,mr)&&(E=z(this,mr),x=z(this,El),w=Date.now(),k="error");const A=g.fetchStatus==="fetching",T=k==="pending",j=k==="error",F=T&&A,M=x!==void 0,K={status:k,fetchStatus:g.fetchStatus,isPending:T,isSuccess:k==="success",isError:j,isInitialLoading:F,isLoading:F,data:x,dataUpdatedAt:g.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!T,isLoadingError:j&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:j&&M,isStale:Lp(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:yi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const D=K.data!==void 0,P=K.status==="error"&&!D,J=Y=>{P?Y.reject(K.error):D&&Y.resolve(K.data)},re=()=>{const Y=be(this,Sa,K.promise=Qm());J(Y)},Q=z(this,Sa);switch(Q.status){case"pending":t.queryHash===a.queryHash&&J(Q);break;case"fulfilled":(P||K.data!==Q.value)&&re();break;case"rejected":(!P||K.error!==Q.reason)&&re();break}}return K}updateResult(){const t=z(this,wn),n=this.createResult(z(this,et),this.options);if(be(this,rs,z(this,et).state),be(this,vl,this.options),z(this,rs).data!==void 0&&be(this,Sl,z(this,et)),gf(n,t))return;be(this,wn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!z(this,wl).size)return!0;const c=new Set(o??z(this,wl));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,wn)).some(f=>{const h=f;return z(this,wn)[h]!==t[h]&&c.has(h)})};Fe(this,lt,_E).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Fe(this,lt,Zm).call(this)}},Un=new WeakMap,et=new WeakMap,hc=new WeakMap,wn=new WeakMap,rs=new WeakMap,vl=new WeakMap,Sa=new WeakMap,mr=new WeakMap,mc=new WeakMap,El=new WeakMap,Sl=new WeakMap,ss=new WeakMap,ls=new WeakMap,pr=new WeakMap,wl=new WeakMap,lt=new WeakSet,Xo=function(t){Fe(this,lt,tp).call(this);let n=z(this,et).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},Vm=function(){Fe(this,lt,Jm).call(this);const t=vr(this.options.staleTime,z(this,et));if(ic.isServer()||z(this,wn).isStale||!Hm(t))return;const a=gE(z(this,wn).dataUpdatedAt,t)+1;be(this,ss,Xr.setTimeout(()=>{z(this,wn).isStale||this.updateResult()},a))},Xm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,et)):this.options.refetchInterval)??!1},Wm=function(t){Fe(this,lt,ep).call(this),be(this,pr,t),!(ic.isServer()||yi(this.options.enabled,z(this,et))===!1||!Hm(z(this,pr))||z(this,pr)===0)&&be(this,ls,Xr.setInterval(()=>{(this.options.refetchIntervalInBackground||Rp.isFocused())&&Fe(this,lt,Xo).call(this)},z(this,pr)))},Zm=function(){Fe(this,lt,Vm).call(this),Fe(this,lt,Wm).call(this,Fe(this,lt,Xm).call(this))},Jm=function(){z(this,ss)!==void 0&&(Xr.clearTimeout(z(this,ss)),be(this,ss,void 0))},ep=function(){z(this,ls)!==void 0&&(Xr.clearInterval(z(this,ls)),be(this,ls,void 0))},tp=function(){const t=z(this,Un).getQueryCache().build(z(this,Un),this.options);if(t===z(this,et))return;const n=z(this,et);be(this,et,t),be(this,hc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},_E=function(t){en.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,wn))}),z(this,Un).getQueryCache().notify({query:z(this,et),type:"observerResultsUpdated"})})},uE);function gN(e,t){return yi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Cv(e,t){return gN(e,t)||e.state.data!==void 0&&np(e,t,t.refetchOnMount)}function np(e,t,n){if(yi(t.enabled,e)!==!1&&vr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&Lp(e,t)}return!1}function Av(e,t,n,a){return(e!==t||yi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Lp(e,n)}function Lp(e,t){return yi(t.enabled,e)!==!1&&e.isStaleByTime(vr(t.staleTime,e))}function bN(e,t){return!gf(e.getCurrentResult(),t)}function Ov(e){return{onFetch:(t,n)=>{var b,g,v,x,E;const a=t.options,s=(v=(g=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:g.fetchMore)==null?void 0:v.direction,o=((x=t.state.data)==null?void 0:x.pages)||[],c=((E=t.state.data)==null?void 0:E.pageParams)||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let w=!1;const k=T=>{cN(T,()=>t.signal,()=>w=!0)},_=yE(t.options,t.fetchOptions),A=async(T,j,F)=>{if(w)return Promise.reject();if(j==null&&T.pages.length)return Promise.resolve(T);const q=(()=>{const P={client:t.client,queryKey:t.queryKey,pageParam:j,direction:F?"backward":"forward",meta:t.options.meta};return k(P),P})(),K=await _(q),{maxPages:te}=t.options,D=F?oN:lN;return{pages:D(T.pages,K,te),pageParams:D(T.pageParams,j,te)}};if(s&&o.length){const T=s==="backward",j=T?yN:Rv,F={pages:o,pageParams:c},M=j(a,F);f=await A(F,M,T)}else{const T=e??o.length;do{const j=h===0?c[0]??a.initialPageParam:Rv(a,f);if(h>0&&j==null)break;f=await A(f,j),h++}while(h<T)}return f};t.options.persister?t.fetchFn=()=>{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function Rv(e,{pages:t,pageParams:n}){const a=t.length-1;return t.length>0?e.getNextPageParam(t[a],t,n[a],n):void 0}function yN(e,{pages:t,pageParams:n}){var a;return t.length>0?(a=e.getPreviousPageParam)==null?void 0:a.call(e,t[0],t,n[0],n):void 0}var pc,Gi,mn,os,Qi,cr,fE,xN=(fE=class extends EE{constructor(t){super();Te(this,Qi);Te(this,pc);Te(this,Gi);Te(this,mn);Te(this,os);be(this,pc,t.client),this.mutationId=t.mutationId,be(this,mn,t.mutationCache),be(this,Gi,[]),this.state=t.state||kE(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Gi).includes(t)||(z(this,Gi).push(t),this.clearGcTimeout(),z(this,mn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){be(this,Gi,z(this,Gi).filter(n=>n!==t)),this.scheduleGc(),z(this,mn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Gi).length||(this.state.status==="pending"?this.scheduleGc():z(this,mn).remove(this))}continue(){var t;return((t=z(this,os))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,h,m,b,g,v,x,E,w,k,_,A,T,j,F,M,q;const n=()=>{Fe(this,Qi,cr).call(this,{type:"continue"})},a={client:z(this,pc),meta:this.options.meta,mutationKey:this.options.mutationKey};be(this,os,vE({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(K,te)=>{Fe(this,Qi,cr).call(this,{type:"failed",failureCount:K,error:te})},onPause:()=>{Fe(this,Qi,cr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,mn).canRun(this)}));const s=this.state.status==="pending",o=!z(this,os).canStart();try{if(s)n();else{Fe(this,Qi,cr).call(this,{type:"pending",variables:t,isPaused:o}),z(this,mn).config.onMutate&&await z(this,mn).config.onMutate(t,this,a);const te=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));te!==this.state.context&&Fe(this,Qi,cr).call(this,{type:"pending",context:te,variables:t,isPaused:o})}const K=await z(this,os).start();return await((m=(h=z(this,mn).config).onSuccess)==null?void 0:m.call(h,K,t,this.state.context,this,a)),await((g=(b=this.options).onSuccess)==null?void 0:g.call(b,K,t,this.state.context,a)),await((x=(v=z(this,mn).config).onSettled)==null?void 0:x.call(v,K,null,this.state.variables,this.state.context,this,a)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,K,null,t,this.state.context,a)),Fe(this,Qi,cr).call(this,{type:"success",data:K}),K}catch(K){try{await((_=(k=z(this,mn).config).onError)==null?void 0:_.call(k,K,t,this.state.context,this,a))}catch(te){Promise.reject(te)}try{await((T=(A=this.options).onError)==null?void 0:T.call(A,K,t,this.state.context,a))}catch(te){Promise.reject(te)}try{await((F=(j=z(this,mn).config).onSettled)==null?void 0:F.call(j,void 0,K,this.state.variables,this.state.context,this,a))}catch(te){Promise.reject(te)}try{await((q=(M=this.options).onSettled)==null?void 0:q.call(M,void 0,K,t,this.state.context,a))}catch(te){Promise.reject(te)}throw Fe(this,Qi,cr).call(this,{type:"error",error:K}),K}finally{z(this,mn).runNext(this)}}},pc=new WeakMap,Gi=new WeakMap,mn=new WeakMap,os=new WeakMap,Qi=new WeakSet,cr=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),en.batch(()=>{z(this,Gi).forEach(a=>{a.onMutationUpdate(t)}),z(this,mn).notify({mutation:this,type:"updated",action:t})})},fE);function kE(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,Oi,gc,dE,vN=(dE=class extends Ml{constructor(t={}){super();Te(this,wa);Te(this,Oi);Te(this,gc);this.config=t,be(this,wa,new Set),be(this,Oi,new Map),be(this,gc,0)}build(t,n,a){const s=new xN({client:t,mutationCache:this,mutationId:++qu(this,gc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){z(this,wa).add(t);const n=Hu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);a?a.push(t):z(this,Oi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,wa).delete(t)){const n=Hu(t);if(typeof n=="string"){const a=z(this,Oi).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Oi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Hu(t);if(typeof n=="string"){const a=z(this,Oi).get(n),s=a==null?void 0:a.find(o=>o.state.status==="pending");return!s||s===t}else return!0}runNext(t){var a;const n=Hu(t);if(typeof n=="string"){const s=(a=z(this,Oi).get(n))==null?void 0:a.find(o=>o!==t&&o.state.isPaused);return(s==null?void 0:s.continue())??Promise.resolve()}else return Promise.resolve()}clear(){en.batch(()=>{z(this,wa).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,wa).clear(),z(this,Oi).clear()})}getAll(){return Array.from(z(this,wa))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>wv(n,a))}findAll(t={}){return this.getAll().filter(n=>wv(t,n))}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return en.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},wa=new WeakMap,Oi=new WeakMap,gc=new WeakMap,dE);function Hu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _a,gr,$n,ka,Ca,of,ip,hE,EN=(hE=class extends Ml{constructor(n,a){super();Te(this,Ca);Te(this,_a);Te(this,gr);Te(this,$n);Te(this,ka);be(this,_a,n),this.setOptions(a),this.bindMethods(),Fe(this,Ca,of).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=z(this,_a).defaultMutationOptions(n),gf(this.options,a)||z(this,_a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&cs(a.mutationKey)!==cs(this.options.mutationKey)?this.reset():((s=z(this,$n))==null?void 0:s.state.status)==="pending"&&z(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Fe(this,Ca,of).call(this),Fe(this,Ca,ip).call(this,n)}getCurrentResult(){return z(this,gr)}reset(){var n;(n=z(this,$n))==null||n.removeObserver(this),be(this,$n,void 0),Fe(this,Ca,of).call(this),Fe(this,Ca,ip).call(this)}mutate(n,a){var s;return be(this,ka,a),(s=z(this,$n))==null||s.removeObserver(this),be(this,$n,z(this,_a).getMutationCache().build(z(this,_a),this.options)),z(this,$n).addObserver(this),z(this,$n).execute(n)}},_a=new WeakMap,gr=new WeakMap,$n=new WeakMap,ka=new WeakMap,Ca=new WeakSet,of=function(){var a;const n=((a=z(this,$n))==null?void 0:a.state)??kE();be(this,gr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},ip=function(n){en.batch(()=>{var a,s,o,c,f,h,m,b;if(z(this,ka)&&this.hasListeners()){const g=z(this,gr).variables,v=z(this,gr).context,x={client:z(this,_a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,ka)).onSuccess)==null||s.call(a,n.data,g,v,x)}catch(E){Promise.reject(E)}try{(c=(o=z(this,ka)).onSettled)==null||c.call(o,n.data,null,g,v,x)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(h=(f=z(this,ka)).onError)==null||h.call(f,n.error,g,v,x)}catch(E){Promise.reject(E)}try{(b=(m=z(this,ka)).onSettled)==null||b.call(m,void 0,n.error,g,v,x)}catch(E){Promise.reject(E)}}}this.listeners.forEach(g=>{g(z(this,gr))})})},hE),Yi,mE,SN=(mE=class extends Ml{constructor(t={}){super();Te(this,Yi);this.config=t,be(this,Yi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Mp(s,n);let c=this.get(o);return c||(c=new mN({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){z(this,Yi).has(t.queryHash)||(z(this,Yi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Yi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Yi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){en.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Yi).get(t)}getAll(){return[...z(this,Yi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Sv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Sv(t,a)):n}notify(t){en.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){en.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){en.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Yi=new WeakMap,mE),Bt,br,yr,_l,kl,xr,Nl,Tl,pE,wN=(pE=class{constructor(e={}){Te(this,Bt);Te(this,br);Te(this,yr);Te(this,_l);Te(this,kl);Te(this,xr);Te(this,Nl);Te(this,Tl);be(this,Bt,e.queryCache||new SN),be(this,br,e.mutationCache||new vN),be(this,yr,e.defaultOptions||{}),be(this,_l,new Map),be(this,kl,new Map),be(this,xr,0)}mount(){qu(this,xr)._++,z(this,xr)===1&&(be(this,Nl,Rp.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Bt).onFocus())})),be(this,Tl,bf.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,Bt).onOnline())})))}unmount(){var e,t;qu(this,xr)._--,z(this,xr)===0&&((e=z(this,Nl))==null||e.call(this),be(this,Nl,void 0),(t=z(this,Tl))==null||t.call(this),be(this,Tl,void 0))}isFetching(e){return z(this,Bt).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,br).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Bt).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(this,Bt).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return z(this,Bt).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=z(this,Bt).get(a.queryHash),o=s==null?void 0:s.state.data,c=aN(t,o);if(c!==void 0)return z(this,Bt).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return en.batch(()=>z(this,Bt).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,Bt).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,Bt);en.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,Bt);return en.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=en.batch(()=>z(this,Bt).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(kn).catch(kn)}invalidateQueries(e,t={}){return en.batch(()=>(z(this,Bt).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=en.batch(()=>z(this,Bt).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(kn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(this,Bt).build(this,t);return n.isStaleByTime(vr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Ov(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Ov(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return bf.isOnline()?z(this,br).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,Bt)}getMutationCache(){return z(this,br)}getDefaultOptions(){return z(this,yr)}setDefaultOptions(e){be(this,yr,e)}setQueryDefaults(e,t){z(this,_l).set(cs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,_l).values()],n={};return t.forEach(a=>{nc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,kl).set(cs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(this,kl).values()],n={};return t.forEach(a=>{nc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...z(this,yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Mp(t.queryKey,t)),t.refetchOnReconnect===void 0&&(t.refetchOnReconnect=t.networkMode!=="always"),t.throwOnError===void 0&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===jp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...z(this,yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,Bt).clear(),z(this,br).clear()}},Bt=new WeakMap,br=new WeakMap,yr=new WeakMap,_l=new WeakMap,kl=new WeakMap,xr=new WeakMap,Nl=new WeakMap,Tl=new WeakMap,pE),NE=O.createContext(void 0),qn=e=>{const t=O.useContext(NE);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},_N=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(NE.Provider,{value:e,children:t})),TE=O.createContext(!1),kN=()=>O.useContext(TE);TE.Provider;function NN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var TN=O.createContext(NN()),CN=()=>O.useContext(TN),AN=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Dp(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},ON=e=>{O.useEffect(()=>{e.clearReset()},[e])},RN=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Dp(n,[e.error,a])),MN=e=>{if(e.suspense){const n=s=>s==="static"?s:Math.max(s??1e3,1e3),a=e.staleTime;e.staleTime=typeof a=="function"?(...s)=>n(a(...s)):n(a),typeof e.gcTime=="number"&&(e.gcTime=Math.max(e.gcTime,1e3))}},jN=(e,t)=>e.isLoading&&e.isFetching&&!t,DN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Mv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function LN(e,t,n){var v,x,E,w;const a=kN(),s=CN(),o=qn(),c=o.defaultQueryOptions(e);(x=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",MN(c),AN(c,s,f),ON(s);const h=!o.getQueryCache().get(c.queryHash),[m]=O.useState(()=>new t(o,c)),b=m.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(k=>{const _=g?m.subscribe(en.batchCalls(k)):kn;return m.updateResult(),_},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),O.useEffect(()=>{m.setOptions(c)},[c,m]),DN(c,b))throw Mv(c,m,s);if(RN({result:b,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw b.error;if((w=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||w.call(E,c,b),c.experimental_prefetchInRender&&!ic.isServer()&&jN(b,a)){const k=h?Mv(c,m,s):f==null?void 0:f.promise;k==null||k.catch(kn).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?b:m.trackResult(b)}function st(e,t){return LN(e,pN)}function Pn(e,t){const n=qn(),[a]=O.useState(()=>new EN(n,e));O.useEffect(()=>{a.setOptions(e)},[a,e]);const s=O.useSyncExternalStore(O.useCallback(c=>a.subscribe(en.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=O.useCallback((c,f)=>{a.mutate(c,f).catch(kn)},[a]);if(s.error&&Dp(a.options.throwOnError,[s.error]))throw s.error;return{...s,mutate:o,mutateAsync:s.mutate}}/**
50
- * react-router v7.14.2
51
- *
52
- * Copyright (c) Remix Software Inc.
53
- *
54
- * This source code is licensed under the MIT license found in the
55
- * LICENSE.md file in the root directory of this source tree.
56
- *
57
- * @license MIT
58
- */var jv="popstate";function Dv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function IN(e={}){function t(a,s){var m;let o=(m=s.state)==null?void 0:m.masked,{pathname:c,search:f,hash:h}=o||a.location;return ap("",{pathname:c,search:f,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:ac(s)}return BN(t,n,null,e)}function Ct(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Ei(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function zN(){return Math.random().toString(36).substring(2,10)}function Lv(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.unstable_mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function ap(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?jl(t):t,state:n,key:t&&t.key||a||zN(),unstable_mask:s}}function ac({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function jl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function BN(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,f="POP",h=null,m=b();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function b(){return(c.state||{idx:null}).idx}function g(){f="POP";let k=b(),_=k==null?null:k-m;m=k,h&&h({action:f,location:w.location,delta:_})}function v(k,_){f="PUSH";let A=Dv(k)?k:ap(w.location,k,_);m=b()+1;let T=Lv(A,m),j=w.createHref(A.unstable_mask||A);try{c.pushState(T,"",j)}catch(F){if(F instanceof DOMException&&F.name==="DataCloneError")throw F;s.location.assign(j)}o&&h&&h({action:f,location:w.location,delta:1})}function x(k,_){f="REPLACE";let A=Dv(k)?k:ap(w.location,k,_);m=b();let T=Lv(A,m),j=w.createHref(A.unstable_mask||A);c.replaceState(T,"",j),o&&h&&h({action:f,location:w.location,delta:0})}function E(k){return UN(k)}let w={get action(){return f},get location(){return e(s,c)},listen(k){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(jv,g),h=k,()=>{s.removeEventListener(jv,g),h=null}},createHref(k){return t(s,k)},createURL:E,encodeLocation(k){let _=E(k);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:v,replace:x,go(k){return c.go(k)}};return w}function UN(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Ct(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:ac(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function CE(e,t,n="/"){return $N(e,t,n,!1)}function $N(e,t,n,a){let s=typeof t=="string"?jl(t):t,o=Aa(s.pathname||"/",n);if(o==null)return null;let c=AE(e);FN(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let m=ZN(o);f=XN(c[h],m,a)}return f}function AE(e,t=[],n=[],a="",s=!1){let o=(c,f,h=s,m)=>{let b={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&h)return;Ct(b.relativePath.startsWith(a),`Absolute route path "${b.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),b.relativePath=b.relativePath.slice(a.length)}let g=Ri([a,b.relativePath]),v=n.concat(b);c.children&&c.children.length>0&&(Ct(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),AE(c.children,t,v,g,h)),!(c.path==null&&!c.index)&&t.push({path:g,score:YN(g,c.index),routesMeta:v})};return e.forEach((c,f)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))o(c,f);else for(let m of OE(c.path))o(c,f,!0,m)}),t}function OE(e){let t=e.split("/");if(t.length===0)return[];let[n,...a]=t,s=n.endsWith("?"),o=n.replace(/\?$/,"");if(a.length===0)return s?[o,""]:[o];let c=OE(a.join("/")),f=[];return f.push(...c.map(h=>h===""?o:[o,h].join("/"))),s&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function FN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:VN(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var PN=/^:[\w-]+$/,qN=3,HN=2,KN=1,GN=10,QN=-2,Iv=e=>e==="*";function YN(e,t){let n=e.split("/"),a=n.length;return n.some(Iv)&&(a+=QN),t&&(a+=HN),n.filter(s=>!Iv(s)).reduce((s,o)=>s+(PN.test(o)?qN:o===""?KN:GN),a)}function VN(e,t){return e.length===t.length&&e.slice(0,-1).every((a,s)=>a===t[s])?e[e.length-1]-t[t.length-1]:0}function XN(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let f=0;f<a.length;++f){let h=a[f],m=f===a.length-1,b=o==="/"?t:t.slice(o.length)||"/",g=yf({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},b),v=h.route;if(!g&&m&&n&&!a[a.length-1].route.index&&(g=yf({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},b)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Ri([o,g.pathname]),pathnameBase:nT(Ri([o,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(o=Ri([o,g.pathnameBase]))}return c}function yf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=WN(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((m,{paramName:b,isOptional:g},v)=>{if(b==="*"){let E=f[v]||"";c=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const x=f[v];return g&&!x?m[b]=void 0:m[b]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:c,pattern:e}}function WN(e,t=!1,n=!0){Ei(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],s="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(c,f,h,m,b)=>{if(a.push({paramName:f,isOptional:h!=null}),h){let g=b.charAt(m+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function ZN(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Ei(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Aa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var JN=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function eT(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?jl(e):e,o;return n?(n=RE(n),n.startsWith("/")?o=zv(n.substring(1),"/"):o=zv(n,t)):o=t,{pathname:o,search:iT(a),hash:aT(s)}}function zv(e,t){let n=xf(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function fm(e,t,n,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${n}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function tT(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Ip(e){let t=tT(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Rf(e,t,n,a=!1){let s;typeof e=="string"?s=jl(e):(s={...e},Ct(!s.pathname||!s.pathname.includes("?"),fm("?","pathname","search",s)),Ct(!s.pathname||!s.pathname.includes("#"),fm("#","pathname","hash",s)),Ct(!s.search||!s.search.includes("#"),fm("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let v=c.split("/");for(;v[0]==="..";)v.shift(),g-=1;s.pathname=v.join("/")}f=g>=0?t[g]:"/"}let h=eT(s,f),m=c&&c!=="/"&&c.endsWith("/"),b=(o||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(m||b)&&(h.pathname+="/"),h}var RE=e=>e.replace(/\/\/+/g,"/"),Ri=e=>RE(e.join("/")),xf=e=>e.replace(/\/+$/,""),nT=e=>xf(e).replace(/^\/*/,"/"),iT=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,aT=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,rT=class{constructor(e,t,n,a=!1){this.status=e,this.statusText=t||"",this.internal=a,n instanceof Error?(this.data=n.toString(),this.error=n):this.data=n}};function sT(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function lT(e){let t=e.map(n=>n.route.path).filter(Boolean);return Ri(t)||"/"}var ME=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function jE(e,t){let n=e;if(typeof n!="string"||!JN.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(ME)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),f=Aa(c.pathname,t);c.origin===o.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{Ei(!1,`<Link to="${n}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:s,to:n}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");var DE=["POST","PUT","PATCH","DELETE"];new Set(DE);var oT=["GET",...DE];new Set(oT);var Dl=O.createContext(null);Dl.displayName="DataRouter";var Mf=O.createContext(null);Mf.displayName="DataRouterState";var LE=O.createContext(!1);function cT(){return O.useContext(LE)}var IE=O.createContext({isTransitioning:!1});IE.displayName="ViewTransition";var uT=O.createContext(new Map);uT.displayName="Fetchers";var fT=O.createContext(null);fT.displayName="Await";var ri=O.createContext(null);ri.displayName="Navigation";var bc=O.createContext(null);bc.displayName="Location";var wi=O.createContext({outlet:null,matches:[],isDataRoute:!1});wi.displayName="Route";var zp=O.createContext(null);zp.displayName="RouteError";var zE="REACT_ROUTER_ERROR",dT="REDIRECT",hT="ROUTE_ERROR_RESPONSE";function mT(e){if(e.startsWith(`${zE}:${dT}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function pT(e){if(e.startsWith(`${zE}:${hT}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new rT(t.status,t.statusText,t.data)}catch{}}function gT(e,{relative:t}={}){Ct(Ll(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=O.useContext(ri),{hash:s,pathname:o,search:c}=yc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:Ri([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Ll(){return O.useContext(bc)!=null}function ji(){return Ct(Ll(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(bc).location}var BE="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function UE(e){O.useContext(ri).static||O.useLayoutEffect(e)}function wr(){let{isDataRoute:e}=O.useContext(wi);return e?RT():bT()}function bT(){Ct(Ll(),"useNavigate() may be used only in the context of a <Router> component.");let e=O.useContext(Dl),{basename:t,navigator:n}=O.useContext(ri),{matches:a}=O.useContext(wi),{pathname:s}=ji(),o=JSON.stringify(Ip(a)),c=O.useRef(!1);return UE(()=>{c.current=!0}),O.useCallback((h,m={})=>{if(Ei(c.current,BE),!c.current)return;if(typeof h=="number"){n.go(h);return}let b=Rf(h,JSON.parse(o),s,m.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Ri([t,b.pathname])),(m.replace?n.replace:n.push)(b,m.state,m)},[t,n,o,s,e])}var yT=O.createContext(null);function xT(e){let t=O.useContext(wi).outlet;return O.useMemo(()=>t&&O.createElement(yT.Provider,{value:e},t),[t,e])}function $E(){let{matches:e}=O.useContext(wi),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function yc(e,{relative:t}={}){let{matches:n}=O.useContext(wi),{pathname:a}=ji(),s=JSON.stringify(Ip(n));return O.useMemo(()=>Rf(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function vT(e,t){return FE(e,t)}function FE(e,t,n){var k;Ct(Ll(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=O.useContext(ri),{matches:s}=O.useContext(wi),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let _=m&&m.path||"";qE(f,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
59
-
60
- Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=ji(),g;if(t){let _=typeof t=="string"?jl(t):t;Ct(h==="/"||((k=_.pathname)==null?void 0:k.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${_.pathname}" was given in the \`location\` prop.`),g=_}else g=b;let v=g.pathname||"/",x=v;if(h!=="/"){let _=h.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=CE(e,{pathname:x});Ei(m||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Ei(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=kT(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Ri([h,a.encodeLocation?a.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?h:Ri([h,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n);return t&&w?O.createElement(bc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function ET(){let e=OT(),t=sT(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:o},"ErrorBoundary")," or"," ",O.createElement("code",{style:o},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:s},n):null,c)}var ST=O.createElement(ET,null),PE=class extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=pT(e.digest);n&&(e=n)}let t=e!==void 0?O.createElement(wi.Provider,{value:this.props.routeContext},O.createElement(zp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?O.createElement(wT,{error:e},t):t}};PE.contextType=LE;var dm=new WeakMap;function wT({children:e,error:t}){let{basename:n}=O.useContext(ri);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=mT(t.digest);if(a){let s=dm.get(t);if(s)throw s;let o=jE(a.location,n);if(ME&&!dm.get(t))if(o.isExternal||a.reloadDocument)window.location.href=o.absoluteURL||o.to;else{const c=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(o.to,{replace:a.replace}));throw dm.set(t,c),c}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function _T({routeContext:e,match:t,children:n}){let a=O.useContext(Dl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(wi.Provider,{value:e},n)}function kT(e,t=[],n){let a=n==null?void 0:n.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let s=e,o=a==null?void 0:a.errors;if(o!=null){let b=s.findIndex(g=>g.route.id&&(o==null?void 0:o[g.route.id])!==void 0);Ct(b>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(o).join(",")}`),s=s.slice(0,Math.min(s.length,b+1))}let c=!1,f=-1;if(n&&a){c=a.renderFallback;for(let b=0;b<s.length;b++){let g=s[b];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=b),g.route.id){let{loaderData:v,errors:x}=a,E=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||E){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let h=n==null?void 0:n.onError,m=a&&h?(b,g)=>{var v,x;h(b,{location:a.location,params:((x=(v=a.matches)==null?void 0:v[0])==null?void 0:x.params)??{},unstable_pattern:lT(a.matches),errorInfo:g})}:void 0;return s.reduceRight((b,g,v)=>{let x,E=!1,w=null,k=null;a&&(x=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||ST,c&&(f<0&&v===0?(qE("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,k=null):f===v&&(E=!0,k=g.route.hydrateFallbackElement||null)));let _=t.concat(s.slice(0,v+1)),A=()=>{let T;return x?T=w:E?T=k:g.route.Component?T=O.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=b,O.createElement(_T,{match:g,routeContext:{outlet:b,matches:_,isDataRoute:a!=null},children:T})};return a&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?O.createElement(PE,{location:a.location,revalidation:a.revalidation,component:w,error:x,children:A(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:m}):A()},null)}function Bp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function NT(e){let t=O.useContext(Dl);return Ct(t,Bp(e)),t}function TT(e){let t=O.useContext(Mf);return Ct(t,Bp(e)),t}function CT(e){let t=O.useContext(wi);return Ct(t,Bp(e)),t}function Up(e){let t=CT(e),n=t.matches[t.matches.length-1];return Ct(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function AT(){return Up("useRouteId")}function OT(){var a;let e=O.useContext(zp),t=TT("useRouteError"),n=Up("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function RT(){let{router:e}=NT("useNavigate"),t=Up("useNavigate"),n=O.useRef(!1);return UE(()=>{n.current=!0}),O.useCallback(async(s,o={})=>{Ei(n.current,BE),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Bv={};function qE(e,t,n){!t&&!Bv[e]&&(Bv[e]=!0,Ei(!1,n))}O.memo(MT);function MT({routes:e,future:t,state:n,isStatic:a,onError:s}){return FE(e,void 0,{state:n,isStatic:a,onError:s})}function jT({to:e,replace:t,state:n,relative:a}){Ct(Ll(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=O.useContext(ri);Ei(!s,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:o}=O.useContext(wi),{pathname:c}=ji(),f=wr(),h=Rf(e,Ip(o),c,a==="path"),m=JSON.stringify(h);return O.useEffect(()=>{f(JSON.parse(m),{replace:t,state:n,relative:a})},[f,m,a,t,n]),null}function DT(e){return xT(e.context)}function zn(e){Ct(!1,"A <Route> is only ever to be used as the child of <Routes> element, never rendered directly. Please wrap your <Route> in a <Routes>.")}function LT({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Ct(!Ll(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=O.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof n=="string"&&(n=jl(n));let{pathname:m="/",search:b="",hash:g="",state:v=null,key:x="default",unstable_mask:E}=n,w=O.useMemo(()=>{let k=Aa(m,f);return k==null?null:{location:{pathname:k,search:b,hash:g,state:v,key:x,unstable_mask:E},navigationType:a}},[f,m,b,g,v,x,a,E]);return Ei(w!=null,`<Router basename="${f}"> is not able to match the URL "${m}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:O.createElement(ri.Provider,{value:h},O.createElement(bc.Provider,{children:t,value:w}))}function IT({children:e,location:t}){return vT(rp(e),t)}function rp(e,t=[]){let n=[];return O.Children.forEach(e,(a,s)=>{if(!O.isValidElement(a))return;let o=[...t,s];if(a.type===O.Fragment){n.push.apply(n,rp(a.props.children,o));return}Ct(a.type===zn,`[${typeof a.type=="string"?a.type:a.type.name}] is not a <Route> component. All component children of <Routes> must be a <Route> or <React.Fragment>`),Ct(!a.props.index||!a.props.children,"An index route cannot have child routes.");let c={id:a.props.id||o.join("-"),caseSensitive:a.props.caseSensitive,element:a.props.element,Component:a.props.Component,index:a.props.index,path:a.props.path,middleware:a.props.middleware,loader:a.props.loader,action:a.props.action,hydrateFallbackElement:a.props.hydrateFallbackElement,HydrateFallback:a.props.HydrateFallback,errorElement:a.props.errorElement,ErrorBoundary:a.props.ErrorBoundary,hasErrorBoundary:a.props.hasErrorBoundary===!0||a.props.ErrorBoundary!=null||a.props.errorElement!=null,shouldRevalidate:a.props.shouldRevalidate,handle:a.props.handle,lazy:a.props.lazy};a.props.children&&(c.children=rp(a.props.children,o)),n.push(c)}),n}var cf="get",uf="application/x-www-form-urlencoded";function jf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function zT(e){return jf(e)&&e.tagName.toLowerCase()==="button"}function BT(e){return jf(e)&&e.tagName.toLowerCase()==="form"}function UT(e){return jf(e)&&e.tagName.toLowerCase()==="input"}function $T(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function FT(e,t){return e.button===0&&(!t||t==="_self")&&!$T(e)}function sp(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,n)=>{let a=e[n];return t.concat(Array.isArray(a)?a.map(s=>[n,s]):[[n,a]])},[]))}function PT(e,t){let n=sp(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Ku=null;function qT(){if(Ku===null)try{new FormData(document.createElement("form"),0),Ku=!1}catch{Ku=!0}return Ku}var HT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function hm(e){return e!=null&&!HT.has(e)?(Ei(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${uf}"`),null):e}function KT(e,t){let n,a,s,o,c;if(BT(e)){let f=e.getAttribute("action");a=f?Aa(f,t):null,n=e.getAttribute("method")||cf,s=hm(e.getAttribute("enctype"))||uf,o=new FormData(e)}else if(zT(e)||UT(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(a=h?Aa(h,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||cf,s=hm(e.getAttribute("formenctype"))||hm(f.getAttribute("enctype"))||uf,o=new FormData(f,e),!qT()){let{name:m,type:b,value:g}=e;if(b==="image"){let v=m?`${m}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else m&&o.append(m,g)}}else{if(jf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=cf,a=null,s=uf,c=e}return o&&s==="text/plain"&&(c=o,o=void 0),{action:a,method:n.toLowerCase(),encType:s,formData:o,body:c}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function $p(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function HE(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Aa(s.pathname,t)==="/"?s.pathname=`${xf(t)}/_root.${a}`:s.pathname=`${xf(s.pathname)}.${a}`,s}async function GT(e,t){if(e.id in t)return t[e.id];try{let n=await import(e.module);return t[e.id]=n,n}catch(n){return console.error(`Error loading route module \`${e.module}\`, reloading page...`),console.error(n),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function QT(e){return e==null?!1:e.href==null?e.rel==="preload"&&typeof e.imageSrcSet=="string"&&typeof e.imageSizes=="string":typeof e.rel=="string"&&typeof e.href=="string"}async function YT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await GT(o,n);return c.links?c.links():[]}return[]}));return ZT(a.flat(1).filter(QT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Uv(e,t,n,a,s,o){let c=(h,m)=>n[m]?h.route.id!==n[m].route.id:!0,f=(h,m)=>{var b;return n[m].pathname!==h.pathname||((b=n[m].route.path)==null?void 0:b.endsWith("*"))&&n[m].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,m)=>c(h,m)||f(h,m)):o==="data"?t.filter((h,m)=>{var g;let b=a.routes[h.route.id];if(!b||!b.hasLoader)return!1;if(c(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let v=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function VT(e,t,{includeHydrateFallback:n}={}){return XT(e.map(a=>{let s=t.routes[a.route.id];if(!s)return[];let o=[s.module];return s.clientActionModule&&(o=o.concat(s.clientActionModule)),s.clientLoaderModule&&(o=o.concat(s.clientLoaderModule)),n&&s.hydrateFallbackModule&&(o=o.concat(s.hydrateFallbackModule)),s.imports&&(o=o.concat(s.imports)),o}).flat(1))}function XT(e){return[...new Set(e)]}function WT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function ZT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(WT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Fp(){let e=O.useContext(Dl);return $p(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function JT(){let e=O.useContext(Mf);return $p(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Pp=O.createContext(void 0);Pp.displayName="FrameworkContext";function qp(){let e=O.useContext(Pp);return $p(e,"You must render this element inside a <HydratedRouter> element"),e}function e2(e,t){let n=O.useContext(Pp),[a,s]=O.useState(!1),[o,c]=O.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:b,onTouchStart:g}=t,v=O.useRef(null);O.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=_=>{_.forEach(A=>{c(A.isIntersecting)})},k=new IntersectionObserver(w,{threshold:.5});return v.current&&k.observe(v.current),()=>{k.disconnect()}}},[e]),O.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let x=()=>{s(!0)},E=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,v,{}]:[o,v,{onFocus:qo(f,x),onBlur:qo(h,E),onMouseEnter:qo(m,x),onMouseLeave:qo(b,E),onTouchStart:qo(g,x)}]:[!1,v,{}]}function qo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function t2({page:e,...t}){let n=cT(),{router:a}=Fp(),s=O.useMemo(()=>CE(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?O.createElement(i2,{page:e,matches:s,...t}):O.createElement(a2,{page:e,matches:s,...t}):null}function n2(e){let{manifest:t,routeModules:n}=qp(),[a,s]=O.useState([]);return O.useEffect(()=>{let o=!1;return YT(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function i2({page:e,matches:t,...n}){let a=ji(),{future:s}=qp(),{basename:o}=Fp(),c=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=HE(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,m=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?h=!0:m.push(b.route.id);return h&&m.length>0&&f.searchParams.set("_routes",m.join(",")),[f.pathname+f.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return O.createElement(O.Fragment,null,c.map(f=>O.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function a2({page:e,matches:t,...n}){let a=ji(),{future:s,manifest:o,routeModules:c}=qp(),{basename:f}=Fp(),{loaderData:h,matches:m}=JT(),b=O.useMemo(()=>Uv(e,t,m,o,a,"data"),[e,t,m,o,a]),g=O.useMemo(()=>Uv(e,t,m,o,a,"assets"),[e,t,m,o,a]),v=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,k=!1;if(t.forEach(A=>{var j;let T=o.routes[A.route.id];!T||!T.hasLoader||(!b.some(F=>F.route.id===A.route.id)&&A.route.id in h&&((j=c[A.route.id])!=null&&j.shouldRevalidate)||T.hasClientLoader?k=!0:w.add(A.route.id))}),w.size===0)return[];let _=HE(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return k&&w.size>0&&_.searchParams.set("_routes",t.filter(A=>w.has(A.route.id)).map(A=>A.route.id).join(",")),[_.pathname+_.search]},[f,s.unstable_trailingSlashAwareDataRequests,h,a,o,b,t,e,c]),x=O.useMemo(()=>VT(g,o),[g,o]),E=n2(g);return O.createElement(O.Fragment,null,v.map(w=>O.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>O.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:k})=>O.createElement("link",{key:w,nonce:n.nonce,...k,crossOrigin:k.crossOrigin??n.crossOrigin})))}function r2(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var s2=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{s2&&(window.__reactRouterVersion="7.14.2")}catch{}function l2({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=O.useRef();s.current==null&&(s.current=IN({window:a,v5Compat:!0}));let o=s.current,[c,f]=O.useState({action:o.action,location:o.location}),h=O.useCallback(m=>{n===!1?f(m):O.startTransition(()=>f(m))},[n]);return O.useLayoutEffect(()=>o.listen(h),[o,h]),O.createElement(LT,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var KE=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ds=O.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:h,target:m,to:b,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...E},w){let{basename:k,navigator:_,unstable_useTransitions:A}=O.useContext(ri),T=typeof b=="string"&&KE.test(b),j=jE(b,k);b=j.to;let F=gT(b,{relative:s}),M=ji(),q=null;if(f){let Y=Rf(f,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);k!=="/"&&(Y.pathname=Y.pathname==="/"?k:Ri([k,Y.pathname])),q=_.createHref(Y)}let[K,te,D]=e2(a,E),P=u2(b,{replace:c,unstable_mask:f,state:h,target:m,preventScrollReset:g,relative:s,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:A});function J(Y){t&&t(Y),Y.defaultPrevented||P(Y)}let re=!(j.isExternal||o),Q=O.createElement("a",{...E,...D,href:(re?q:void 0)||j.absoluteURL||F,onClick:re?J:t,ref:r2(w,te),target:m,"data-discover":!T&&n==="render"?"true":void 0});return K&&!T?O.createElement(O.Fragment,null,Q,O.createElement(t2,{page:F})):Q});ds.displayName="Link";var GE=O.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:f,children:h,...m},b){let g=yc(c,{relative:m.relative}),v=ji(),x=O.useContext(Mf),{navigator:E,basename:w}=O.useContext(ri),k=x!=null&&p2(g)&&f===!0,_=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=v.pathname,T=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(A=A.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&w&&(T=Aa(T,w)||T);const j=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let F=A===_||!s&&A.startsWith(_)&&A.charAt(j)==="/",M=T!=null&&(T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/"),q={isActive:F,isPending:M,isTransitioning:k},K=F?t:void 0,te;typeof a=="function"?te=a(q):te=[a,F?"active":null,M?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let D=typeof o=="function"?o(q):o;return O.createElement(ds,{...m,"aria-current":K,className:te,ref:b,style:D,to:c,viewTransition:f},typeof h=="function"?h(q):h)});GE.displayName="NavLink";var o2=O.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=cf,action:f,onSubmit:h,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v,...x},E)=>{let{unstable_useTransitions:w}=O.useContext(ri),k=h2(),_=m2(f,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&KE.test(f),j=F=>{if(h&&h(F),F.defaultPrevented)return;F.preventDefault();let M=F.nativeEvent.submitter,q=(M==null?void 0:M.getAttribute("formmethod"))||c,K=()=>k(M||F.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:s,state:o,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v});w&&n!==!1?O.startTransition(()=>K()):K()};return O.createElement("form",{ref:E,method:A,action:_,onSubmit:a?h:j,...x,"data-discover":!T&&e==="render"?"true":void 0})});o2.displayName="Form";function c2(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function QE(e){let t=O.useContext(Dl);return Ct(t,c2(e)),t}function u2(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let b=wr(),g=ji(),v=yc(e,{relative:c});return O.useCallback(x=>{if(FT(x,t)){x.preventDefault();let E=n!==void 0?n:ac(g)===ac(v),w=()=>b(e,{replace:E,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});m?O.startTransition(()=>w()):w()}},[g,b,v,n,a,s,t,e,o,c,f,h,m])}function YE(e){Ei(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let t=O.useRef(sp(e)),n=O.useRef(!1),a=ji(),s=O.useMemo(()=>PT(a.search,n.current?null:t.current),[a.search]),o=wr(),c=O.useCallback((f,h)=>{const m=sp(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,o("?"+m,h)},[o,s]);return[s,c]}var f2=0,d2=()=>`__${String(++f2)}__`;function h2(){let{router:e}=QE("useSubmit"),{basename:t}=O.useContext(ri),n=AT(),a=e.fetch,s=e.navigate;return O.useCallback(async(o,c={})=>{let{action:f,method:h,encType:m,formData:b,body:g}=KT(o,t);if(c.navigate===!1){let v=c.fetcherKey||d2();await a(v,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||h,formEncType:c.encType||m,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||h,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function m2(e,{relative:t}={}){let{basename:n}=O.useContext(ri),a=O.useContext(wi);Ct(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...yc(e||".",{relative:t})},c=ji();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),h=f.getAll("index");if(h.some(b=>b==="")){f.delete("index"),h.filter(g=>g).forEach(g=>f.append("index",g));let b=f.toString();o.search=b?`?${b}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:Ri([n,o.pathname])),ac(o)}function p2(e,{relative:t}={}){let n=O.useContext(IE);Ct(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=QE("useViewTransitionState"),s=yc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Aa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Aa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return yf(s.pathname,c)!=null||yf(s.pathname,o)!=null}/**
61
- * @license lucide-react v0.544.0 - ISC
62
- *
63
- * This source code is licensed under the ISC license.
64
- * See the LICENSE file in the root directory of this source tree.
65
- */const g2=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),b2=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),$v=e=>{const t=b2(e);return t.charAt(0).toUpperCase()+t.slice(1)},VE=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),y2=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
66
- * @license lucide-react v0.544.0 - ISC
67
- *
68
- * This source code is licensed under the ISC license.
69
- * See the LICENSE file in the root directory of this source tree.
70
- */var x2={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"};/**
71
- * @license lucide-react v0.544.0 - ISC
72
- *
73
- * This source code is licensed under the ISC license.
74
- * See the LICENSE file in the root directory of this source tree.
75
- */const v2=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...f},h)=>O.createElement("svg",{ref:h,...x2,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:VE("lucide",s),...!o&&!y2(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,b])=>O.createElement(m,b)),...Array.isArray(o)?o:[o]]));/**
76
- * @license lucide-react v0.544.0 - ISC
77
- *
78
- * This source code is licensed under the ISC license.
79
- * See the LICENSE file in the root directory of this source tree.
80
- */const Ae=(e,t)=>{const n=O.forwardRef(({className:a,...s},o)=>O.createElement(v2,{ref:o,iconNode:t,className:VE(`lucide-${g2($v(e))}`,`lucide-${e}`,a),...s}));return n.displayName=$v(e),n};/**
81
- * @license lucide-react v0.544.0 - ISC
82
- *
83
- * This source code is licensed under the ISC license.
84
- * See the LICENSE file in the root directory of this source tree.
85
- */const E2=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],Df=Ae("activity",E2);/**
86
- * @license lucide-react v0.544.0 - ISC
87
- *
88
- * This source code is licensed under the ISC license.
89
- * See the LICENSE file in the root directory of this source tree.
90
- */const S2=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],XE=Ae("arrow-left",S2);/**
91
- * @license lucide-react v0.544.0 - ISC
92
- *
93
- * This source code is licensed under the ISC license.
94
- * See the LICENSE file in the root directory of this source tree.
95
- */const w2=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],_2=Ae("arrow-up",w2);/**
96
- * @license lucide-react v0.544.0 - ISC
97
- *
98
- * This source code is licensed under the ISC license.
99
- * See the LICENSE file in the root directory of this source tree.
100
- */const k2=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],N2=Ae("check",k2);/**
101
- * @license lucide-react v0.544.0 - ISC
102
- *
103
- * This source code is licensed under the ISC license.
104
- * See the LICENSE file in the root directory of this source tree.
105
- */const T2=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],xc=Ae("chevron-down",T2);/**
106
- * @license lucide-react v0.544.0 - ISC
107
- *
108
- * This source code is licensed under the ISC license.
109
- * See the LICENSE file in the root directory of this source tree.
110
- */const C2=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Lf=Ae("chevron-right",C2);/**
111
- * @license lucide-react v0.544.0 - ISC
112
- *
113
- * This source code is licensed under the ISC license.
114
- * See the LICENSE file in the root directory of this source tree.
115
- */const A2=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],O2=Ae("chevron-up",A2);/**
116
- * @license lucide-react v0.544.0 - ISC
117
- *
118
- * This source code is licensed under the ISC license.
119
- * See the LICENSE file in the root directory of this source tree.
120
- */const R2=[["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"}]],rc=Ae("circle-alert",R2);/**
121
- * @license lucide-react v0.544.0 - ISC
122
- *
123
- * This source code is licensed under the ISC license.
124
- * See the LICENSE file in the root directory of this source tree.
125
- */const M2=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],lp=Ae("circle-check-big",M2);/**
126
- * @license lucide-react v0.544.0 - ISC
127
- *
128
- * This source code is licensed under the ISC license.
129
- * See the LICENSE file in the root directory of this source tree.
130
- */const j2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],If=Ae("circle-check",j2);/**
131
- * @license lucide-react v0.544.0 - ISC
132
- *
133
- * This source code is licensed under the ISC license.
134
- * See the LICENSE file in the root directory of this source tree.
135
- */const D2=[["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"}]],L2=Ae("circle-x",D2);/**
136
- * @license lucide-react v0.544.0 - ISC
137
- *
138
- * This source code is licensed under the ISC license.
139
- * See the LICENSE file in the root directory of this source tree.
140
- */const I2=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],z2=Ae("clock",I2);/**
141
- * @license lucide-react v0.544.0 - ISC
142
- *
143
- * This source code is licensed under the ISC license.
144
- * See the LICENSE file in the root directory of this source tree.
145
- */const B2=[["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"}]],U2=Ae("copy",B2);/**
146
- * @license lucide-react v0.544.0 - ISC
147
- *
148
- * This source code is licensed under the ISC license.
149
- * See the LICENSE file in the root directory of this source tree.
150
- */const $2=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],WE=Ae("download",$2);/**
151
- * @license lucide-react v0.544.0 - ISC
152
- *
153
- * This source code is licensed under the ISC license.
154
- * See the LICENSE file in the root directory of this source tree.
155
- */const F2=[["path",{d:"M10 12.5 8 15l2 2.5",key:"1tg20x"}],["path",{d:"m14 12.5 2 2.5-2 2.5",key:"yinavb"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4",key:"tnqrlb"}],["path",{d:"M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z",key:"1mlx9k"}]],Fv=Ae("file-code",F2);/**
156
- * @license lucide-react v0.544.0 - ISC
157
- *
158
- * This source code is licensed under the ISC license.
159
- * See the LICENSE file in the root directory of this source tree.
160
- */const P2=[["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"}]],Hp=Ae("file-text",P2);/**
161
- * @license lucide-react v0.544.0 - ISC
162
- *
163
- * This source code is licensed under the ISC license.
164
- * See the LICENSE file in the root directory of this source tree.
165
- */const q2=[["path",{d:"M8.5 14.5A2.5 2.5 0 0 0 11 12c0-1.38-.5-2-1-3-1.072-2.143-.224-4.054 2-6 .5 2.5 2 4.9 4 6.5 2 1.6 3 3.5 3 5.5a7 7 0 1 1-14 0c0-1.153.433-2.294 1-3a2.5 2.5 0 0 0 2.5 2.5z",key:"96xj49"}]],H2=Ae("flame",q2);/**
166
- * @license lucide-react v0.544.0 - ISC
167
- *
168
- * This source code is licensed under the ISC license.
169
- * See the LICENSE file in the root directory of this source tree.
170
- */const K2=[["path",{d:"M9 20H4a2 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.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["path",{d:"M18 19c-2.8 0-5-2.2-5-5v8",key:"pkpw2h"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],G2=Ae("folder-git-2",K2);/**
171
- * @license lucide-react v0.544.0 - ISC
172
- *
173
- * This source code is licensed under the ISC license.
174
- * See the LICENSE file in the root directory of this source tree.
175
- */const Q2=[["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"}]],ZE=Ae("folder-open",Q2);/**
176
- * @license lucide-react v0.544.0 - ISC
177
- *
178
- * This source code is licensed under the ISC license.
179
- * See the LICENSE file in the root directory of this source tree.
180
- */const Y2=[["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"}]],sc=Ae("folder",Y2);/**
181
- * @license lucide-react v0.544.0 - ISC
182
- *
183
- * This source code is licensed under the ISC license.
184
- * See the LICENSE file in the root directory of this source tree.
185
- */const V2=[["path",{d:"M10 20a1 1 0 0 0 .553.895l2 1A1 1 0 0 0 14 21v-7a2 2 0 0 1 .517-1.341L21.74 4.67A1 1 0 0 0 21 3H3a1 1 0 0 0-.742 1.67l7.225 7.989A2 2 0 0 1 10 14z",key:"sc7q7i"}]],X2=Ae("funnel",V2);/**
186
- * @license lucide-react v0.544.0 - ISC
187
- *
188
- * This source code is licensed under the ISC license.
189
- * See the LICENSE file in the root directory of this source tree.
190
- */const W2=[["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"}]],Z2=Ae("git-branch",W2);/**
191
- * @license lucide-react v0.544.0 - ISC
192
- *
193
- * This source code is licensed under the ISC license.
194
- * See the LICENSE file in the root directory of this source tree.
195
- */const J2=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],eC=Ae("globe",J2);/**
196
- * @license lucide-react v0.544.0 - ISC
197
- *
198
- * This source code is licensed under the ISC license.
199
- * See the LICENSE file in the root directory of this source tree.
200
- */const tC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}],["path",{d:"M12 7v5l4 2",key:"1fdv2h"}]],nC=Ae("history",tC);/**
201
- * @license lucide-react v0.544.0 - ISC
202
- *
203
- * This source code is licensed under the ISC license.
204
- * See the LICENSE file in the root directory of this source tree.
205
- */const iC=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],aC=Ae("house",iC);/**
206
- * @license lucide-react v0.544.0 - ISC
207
- *
208
- * This source code is licensed under the ISC license.
209
- * See the LICENSE file in the root directory of this source tree.
210
- */const rC=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],sC=Ae("kanban",rC);/**
211
- * @license lucide-react v0.544.0 - ISC
212
- *
213
- * This source code is licensed under the ISC license.
214
- * See the LICENSE file in the root directory of this source tree.
215
- */const lC=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],oC=Ae("layout-grid",lC);/**
216
- * @license lucide-react v0.544.0 - ISC
217
- *
218
- * This source code is licensed under the ISC license.
219
- * See the LICENSE file in the root directory of this source tree.
220
- */const cC=[["path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",key:"1cjeqo"}],["path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",key:"19qd67"}]],uC=Ae("link",cC);/**
221
- * @license lucide-react v0.544.0 - ISC
222
- *
223
- * This source code is licensed under the ISC license.
224
- * See the LICENSE file in the root directory of this source tree.
225
- */const fC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Ut=Ae("loader-circle",fC);/**
226
- * @license lucide-react v0.544.0 - ISC
227
- *
228
- * This source code is licensed under the ISC license.
229
- * See the LICENSE file in the root directory of this source tree.
230
- */const dC=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],Pv=Ae("message-circle",dC);/**
231
- * @license lucide-react v0.544.0 - ISC
232
- *
233
- * This source code is licensed under the ISC license.
234
- * See the LICENSE file in the root directory of this source tree.
235
- */const hC=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],mC=Ae("message-square",hC);/**
236
- * @license lucide-react v0.544.0 - ISC
237
- *
238
- * This source code is licensed under the ISC license.
239
- * See the LICENSE file in the root directory of this source tree.
240
- */const pC=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],gC=Ae("pause",pC);/**
241
- * @license lucide-react v0.544.0 - ISC
242
- *
243
- * This source code is licensed under the ISC license.
244
- * See the LICENSE file in the root directory of this source tree.
245
- */const bC=[["path",{d:"M13 21h8",key:"1jsn5i"}],["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"}]],Kp=Ae("pen-line",bC);/**
246
- * @license lucide-react v0.544.0 - ISC
247
- *
248
- * This source code is licensed under the ISC license.
249
- * See the LICENSE file in the root directory of this source tree.
250
- */const yC=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Gp=Ae("play",yC);/**
251
- * @license lucide-react v0.544.0 - ISC
252
- *
253
- * This source code is licensed under the ISC license.
254
- * See the LICENSE file in the root directory of this source tree.
255
- */const xC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Di=Ae("plus",xC);/**
256
- * @license lucide-react v0.544.0 - ISC
257
- *
258
- * This source code is licensed under the ISC license.
259
- * See the LICENSE file in the root directory of this source tree.
260
- */const vC=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],JE=Ae("radio",vC);/**
261
- * @license lucide-react v0.544.0 - ISC
262
- *
263
- * This source code is licensed under the ISC license.
264
- * See the LICENSE file in the root directory of this source tree.
265
- */const EC=[["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"}]],Cl=Ae("refresh-cw",EC);/**
266
- * @license lucide-react v0.544.0 - ISC
267
- *
268
- * This source code is licensed under the ISC license.
269
- * See the LICENSE file in the root directory of this source tree.
270
- */const SC=[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]],e1=Ae("rotate-ccw",SC);/**
271
- * @license lucide-react v0.544.0 - ISC
272
- *
273
- * This source code is licensed under the ISC license.
274
- * See the LICENSE file in the root directory of this source tree.
275
- */const wC=[["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"}]],zf=Ae("save",wC);/**
276
- * @license lucide-react v0.544.0 - ISC
277
- *
278
- * This source code is licensed under the ISC license.
279
- * See the LICENSE file in the root directory of this source tree.
280
- */const _C=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],vf=Ae("search",_C);/**
281
- * @license lucide-react v0.544.0 - ISC
282
- *
283
- * This source code is licensed under the ISC license.
284
- * See the LICENSE file in the root directory of this source tree.
285
- */const kC=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],NC=Ae("send",kC);/**
286
- * @license lucide-react v0.544.0 - ISC
287
- *
288
- * This source code is licensed under the ISC license.
289
- * See the LICENSE file in the root directory of this source tree.
290
- */const TC=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],t1=Ae("settings",TC);/**
291
- * @license lucide-react v0.544.0 - ISC
292
- *
293
- * This source code is licensed under the ISC license.
294
- * See the LICENSE file in the root directory of this source tree.
295
- */const CC=[["path",{d:"m12.5 17-.5-1-.5 1h1z",key:"3me087"}],["path",{d:"M15 22a1 1 0 0 0 1-1v-1a2 2 0 0 0 1.56-3.25 8 8 0 1 0-11.12 0A2 2 0 0 0 8 20v1a1 1 0 0 0 1 1z",key:"1o5pge"}],["circle",{cx:"15",cy:"12",r:"1",key:"1tmaij"}],["circle",{cx:"9",cy:"12",r:"1",key:"1vctgf"}]],AC=Ae("skull",CC);/**
296
- * @license lucide-react v0.544.0 - ISC
297
- *
298
- * This source code is licensed under the ISC license.
299
- * See the LICENSE file in the root directory of this source tree.
300
- */const OC=[["path",{d:"m10 20-1.25-2.5L6 18",key:"18frcb"}],["path",{d:"M10 4 8.75 6.5 6 6",key:"7mghy3"}],["path",{d:"m14 20 1.25-2.5L18 18",key:"1chtki"}],["path",{d:"m14 4 1.25 2.5L18 6",key:"1b4wsy"}],["path",{d:"m17 21-3-6h-4",key:"15hhxa"}],["path",{d:"m17 3-3 6 1.5 3",key:"11697g"}],["path",{d:"M2 12h6.5L10 9",key:"kv9z4n"}],["path",{d:"m20 10-1.5 2 1.5 2",key:"1swlpi"}],["path",{d:"M22 12h-6.5L14 15",key:"1mxi28"}],["path",{d:"m4 10 1.5 2L4 14",key:"k9enpj"}],["path",{d:"m7 21 3-6-1.5-3",key:"j8hb9u"}],["path",{d:"m7 3 3 6h4",key:"1otusx"}]],RC=Ae("snowflake",OC);/**
301
- * @license lucide-react v0.544.0 - ISC
302
- *
303
- * This source code is licensed under the ISC license.
304
- * See the LICENSE file in the root directory of this source tree.
305
- */const MC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],n1=Ae("square",MC);/**
306
- * @license lucide-react v0.544.0 - ISC
307
- *
308
- * This source code is licensed under the ISC license.
309
- * See the LICENSE file in the root directory of this source tree.
310
- */const jC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],i1=Ae("terminal",jC);/**
311
- * @license lucide-react v0.544.0 - ISC
312
- *
313
- * This source code is licensed under the ISC license.
314
- * See the LICENSE file in the root directory of this source tree.
315
- */const DC=[["path",{d:"M10 2h4",key:"n1abiw"}],["path",{d:"M12 14v-4",key:"1evpnu"}],["path",{d:"M4 13a8 8 0 0 1 8-7 8 8 0 1 1-5.3 14L4 17.6",key:"1ts96g"}],["path",{d:"M9 17H4v5",key:"8t5av"}]],LC=Ae("timer-reset",DC);/**
316
- * @license lucide-react v0.544.0 - ISC
317
- *
318
- * This source code is licensed under the ISC license.
319
- * See the LICENSE file in the root directory of this source tree.
320
- */const IC=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Il=Ae("trash-2",IC);/**
321
- * @license lucide-react v0.544.0 - ISC
322
- *
323
- * This source code is licensed under the ISC license.
324
- * See the LICENSE file in the root directory of this source tree.
325
- */const zC=[["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"}]],BC=Ae("triangle-alert",zC);/**
326
- * @license lucide-react v0.544.0 - ISC
327
- *
328
- * This source code is licensed under the ISC license.
329
- * See the LICENSE file in the root directory of this source tree.
330
- */const UC=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],a1=Ae("users",UC);/**
331
- * @license lucide-react v0.544.0 - ISC
332
- *
333
- * This source code is licensed under the ISC license.
334
- * See the LICENSE file in the root directory of this source tree.
335
- */const $C=[["rect",{width:"8",height:"8",x:"3",y:"3",rx:"2",key:"by2w9f"}],["path",{d:"M7 11v4a2 2 0 0 0 2 2h4",key:"xkn7yn"}],["rect",{width:"8",height:"8",x:"13",y:"13",rx:"2",key:"1cgmvn"}]],r1=Ae("workflow",$C);/**
336
- * @license lucide-react v0.544.0 - ISC
337
- *
338
- * This source code is licensed under the ISC license.
339
- * See the LICENSE file in the root directory of this source tree.
340
- */const FC=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],s1=Ae("wrench",FC);/**
341
- * @license lucide-react v0.544.0 - ISC
342
- *
343
- * This source code is licensed under the ISC license.
344
- * See the LICENSE file in the root directory of this source tree.
345
- */const PC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Xi=Ae("x",PC);/**
346
- * @license lucide-react v0.544.0 - ISC
347
- *
348
- * This source code is licensed under the ISC license.
349
- * See the LICENSE file in the root directory of this source tree.
350
- */const qC=[["path",{d:"M4 14a1 1 0 0 1-.78-1.63l9.9-10.2a.5.5 0 0 1 .86.46l-1.92 6.02A1 1 0 0 0 13 10h7a1 1 0 0 1 .78 1.63l-9.9 10.2a.5.5 0 0 1-.86-.46l1.92-6.02A1 1 0 0 0 11 14z",key:"1xq2db"}]],HC=Ae("zap",qC),KC=[{to:"/chat",label:"对话",icon:mC},{to:"/projects",label:"项目",icon:oC},{to:"/board",label:"看板",icon:sC},{to:"/workers",label:"Workers",icon:a1},{to:"/logs",label:"Logs",icon:Hp},{to:"/skills",label:"Skills",icon:eC},{to:"/system",label:"系统",icon:t1}];function GC(){return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[d.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),"SPS Console"]}),d.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":"主导航",children:KC.map(e=>{const t=e.icon;return d.jsxs(GE,{to:e.to,className:({isActive:n})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",n?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[d.jsx(t,{size:18,strokeWidth:2.5}),e.label]},e.to)})})]})}class QC extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function $t(e){const t=await fetch(e,{headers:{Accept:"application/json"}});if(!t.ok){let n;try{n=await t.json()}catch{n=await t.text()}throw new QC(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function l1(){return $t("/api/system/info")}function YC(){return $t("/api/system/env")}function VC(){return $t("/api/system/env/raw")}async function XC(e,t){const n=await fetch("/api/system/env",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:e,etag:t})});if(!n.ok){const a=await n.text(),s=new Error(`${n.status}: ${a}`);throw s.status=n.status,s}return n.json()}function WC(){return $t("/api/system/latest-version")}async function ZC(){const e=await fetch("/api/system/upgrade",{method:"POST"});if(!e.ok&&e.status!==409)throw new Error(`${e.status}: ${await e.text()}`);return e.json()}async function JC(e,t=!1){const n=t?"?fix=1":"",a=await fetch(`/api/system/doctor/${encodeURIComponent(e)}${n}`,{method:"POST"});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return a.json()}function _r(){return $t("/api/projects")}function eA(e){return $t(`/api/projects/${encodeURIComponent(e)}`)}async function tA(e){const t=await fetch("/api/projects",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok){const n=await t.text();throw new Error(`${t.status}: ${n}`)}return t.json()}function nA(e){return $t(`/api/projects/${encodeURIComponent(e)}/conf`)}async function iA(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/conf`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,etag:n})});if(!a.ok){const s=await a.text(),o=new Error(`${a.status}: ${s}`);throw o.status=a.status,o}return a.json()}async function aA(e,t={}){const n=await fetch(`/api/projects/${encodeURIComponent(e)}`,{method:"DELETE",headers:{"Content-Type":"application/json"},body:JSON.stringify(t)});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function rA(e){return $t(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function sA(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipeline`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({pipeline:t})});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}return n.json()}function lA(e,t){return $t(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function oA(e,t,n,a){const s=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:n,etag:a})});if(!s.ok){const o=await s.text(),c=new Error(`${s.status}: ${o}`);throw c.status=s.status,c}return s.json()}async function cA(e,t,n="blank"){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({name:t,template:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}async function uA(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function fA(){var f;const e=st({queryKey:["system-info"],queryFn:l1,refetchInterval:3e4}),t=st({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}),n=hA(),a=!e.isError,s=((f=t.data)==null?void 0:f.data)??[],o=s.filter(h=>h.pipelineStatus==="running").length,c=s.reduce((h,m)=>h+m.workers.active,0);return d.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[d.jsx("span",{className:"nb-status",style:{background:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:a?"server":"offline"}),d.jsx(dA,{state:n}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1",title:"活跃 pipeline 数",children:[d.jsx(Df,{size:10,strokeWidth:2.5}),d.jsx("span",{className:"font-bold text-[var(--color-text)]",children:o})," pipeline"]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1",title:"活跃 worker 数",children:[d.jsx(JE,{size:10,strokeWidth:2.5}),d.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["v",e.data.version]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function dA({state:e}){return e==="open"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):d.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[d.jsx(rc,{size:9,strokeWidth:2.5}),"SSE·down"]})}function hA(){const[e,t]=O.useState("connecting");return O.useEffect(()=>{let n=null,a=null,s=!1;const o=()=>{s||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),a==null&&(a=setTimeout(()=>{a=null,n==null||n.close(),o()},1e4))):t("connecting")}))};return o(),()=>{s=!0,a!=null&&clearTimeout(a),n==null||n.close()}},[]),e}function mA(){return d.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[d.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:d.jsx(GC,{})}),d.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:d.jsx(DT,{})}),d.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:d.jsx(fA,{})})]})}function op(e,t){try{const n=JSON.stringify({message:(e instanceof Error?e.message:String(e)).slice(0,1e3),stack:(e instanceof Error?e.stack??"":"").slice(0,4e3),url:typeof window<"u"?window.location.href:"",ua:typeof navigator<"u"?navigator.userAgent:"",ts:new Date().toISOString(),context:t==null?void 0:t.slice(0,200)});fetch("/api/system/client-errors",{method:"POST",headers:{"Content-Type":"application/json"},body:n,keepalive:!0}).catch(()=>{})}catch{}}function pA(){typeof window>"u"||(window.addEventListener("error",e=>{op(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;op(t instanceof Error?t:String(t),"unhandledrejection")}))}class gA extends O.Component{constructor(){super(...arguments);fv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;op(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){return this.state.error?d.jsx("div",{className:"p-6",children:d.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),d.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),d.jsxs("details",{className:"text-xs mb-4",children:[d.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),d.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),d.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function bA(){const e=wr(),{data:t,isLoading:n,isError:a,error:s,refetch:o}=st({queryKey:["projects"],queryFn:_r});return d.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[d.jsxs("header",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"项目 🎯"}),d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} 个本机项目`:n?"加载中…":"点击刷新重试"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>o(),type:"button",children:[d.jsx(Df,{size:16,strokeWidth:2.5}),"刷新"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"新建项目",children:[d.jsx(Di,{size:16,strokeWidth:3}),"新建项目"]})]})]}),n&&d.jsx(vA,{}),a&&d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:"加载失败"}),d.jsx("p",{className:"text-sm text-[var(--color-text)]",children:s instanceof Error?s.message:String(s)}),d.jsx("button",{className:"nb-btn mt-4",onClick:()=>o(),type:"button",children:"重试"})]}),t&&t.data.length===0&&d.jsx(EA,{}),t&&t.data.length>0&&d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>d.jsx(yA,{project:c},c.name))})]})}function yA({project:e}){const t=e.pipelineStatus==="running";return d.jsxs(ds,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),d.jsx(xA,{status:e.pipelineStatus})]}),e.repoDir&&d.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),d.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[d.jsx(mm,{label:"cards",value:e.cards.total,accent:"purple"}),d.jsx(mm,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),d.jsx(mm,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function mm({label:e,value:t,accent:n}){const a={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return d.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:a[n]},children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function xA({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:a}=t[e],s=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return d.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function vA(){return d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>d.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[d.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),d.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),d.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function EA(){return d.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:d.jsx(a1,{size:32,strokeWidth:2.5})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"还没有项目 ✨"}),d.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["运行 ",d.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"})," 创建第一个项目。"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[d.jsx(Di,{size:16,strokeWidth:3}),"新建项目"]})]})]})}function SA(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return $t(`/api/fs/browse${t}`)}function o1({initialPath:e,onCancel:t,onSelect:n,title:a="选择目录"}){var b,g,v;const[s,o]=O.useState(e??null),c=st({queryKey:["fs-browse",s],queryFn:()=>SA(s??void 0),staleTime:0,gcTime:0}),f=((b=c.data)==null?void 0:b.path)??s??"",h=((g=c.data)==null?void 0:g.parent)??null,m=((v=c.data)==null?void 0:v.home)??null;return O.useEffect(()=>{const x=E=>{E.key==="Escape"&&(E.preventDefault(),t())};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[t]),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",role:"presentation",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":a,children:[d.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:a}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":"关闭",children:d.jsx(Xi,{size:14,strokeWidth:3})})]}),d.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>h&&o(h),disabled:!h||c.isLoading,"aria-label":"上级目录",title:"上级目录",children:d.jsx(_2,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>m&&o(m),disabled:!m||c.isLoading,"aria-label":"回到 Home",title:"回到 Home",children:d.jsx(aC,{size:12,strokeWidth:3})}),d.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:f,dir:"rtl",children:f||"..."})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[c.isLoading&&d.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[d.jsx(Ut,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),"加载中..."]}),c.isError&&d.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[d.jsx("p",{className:"font-bold mb-1",children:"读取失败"}),d.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:c.error instanceof Error?c.error.message:String(c.error)})]}),c.data&&d.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[c.data.entries.length===0&&d.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:"— 空目录 —"}),c.data.entries.map(x=>d.jsx("li",{children:d.jsxs("button",{type:"button",className:"w-full flex items-center gap-2 px-3 py-2 text-left text-sm hover:bg-[var(--color-accent-mint)] disabled:opacity-50 disabled:cursor-not-allowed font-[family-name:var(--font-mono)]",disabled:!x.isDirectory,onClick:()=>{if(!x.isDirectory)return;const E=f.endsWith("/")||f.endsWith("\\")?"":"/";o(`${f}${E}${x.name}`)},title:x.isDirectory?`进入 ${x.name}/`:"文件不可选",children:[x.isDirectory?d.jsx(sc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):d.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),d.jsx("span",{className:"truncate",children:x.name}),x.isDirectory&&d.jsx(Lf,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},x.name))]})]}),d.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:"取消"}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(f),disabled:!f||c.isLoading||c.isError,children:[d.jsx(If,{size:14,strokeWidth:3}),"选此目录"]})]})]})})}function wA({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return O.useEffect(()=>{const c=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),d.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),d.jsxs("div",{className:"flex gap-3 justify-end",children:[d.jsx("button",{className:"nb-btn",onClick:s,type:"button",children:"取消"}),d.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const c1=O.createContext(null);function _A({children:e}){const[t,n]=O.useState(null),a=O.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:h=>{n(null),f(h)}})}),[]),s=O.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=O.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:h=>{n(null),f(h)}})}),[]);return d.jsxs(c1.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&d.jsx(wA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"确定",danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&d.jsx(kA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&d.jsx(NA,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function si(){const e=O.useContext(c1);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function kA({title:e,body:t,confirm:n,onClose:a}){return O.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),d.jsx("div",{className:"flex gap-3 justify-end",children:d.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function NA({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:f}){const[h,m]=O.useState(a??""),b=O.useRef(null);O.useEffect(()=>{var x,E;(x=b.current)==null||x.focus(),(E=b.current)==null||E.select();const v=w=>{w.key==="Escape"&&f()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[f]);const g=()=>{const v=h.trim();v&&c(v)};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),d.jsx("input",{ref:b,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:h,onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),g())}}),d.jsxs("div",{className:"flex gap-3 justify-end",children:[d.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:o}),d.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!h.trim(),children:s})]})]})})}function TA(){const e=wr(),t=qn(),{alert:n}=si(),[a,s]=O.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[o,c]=O.useState(!1),f=Pn({mutationFn:b=>tA(b),onSuccess:b=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(b.name)}`)},onError:b=>{n({title:"创建失败",body:b instanceof Error?b.message:String(b)})}}),h=/^[a-zA-Z0-9_-]+$/.test(a.name),m=h&&a.projectDir.trim()!==""&&!f.isPending;return d.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("button",{type:"button",onClick:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[d.jsx(XE,{size:14,strokeWidth:3}),"返回"]}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"新建项目"})]}),d.jsx("div",{className:"nb-card",children:d.jsxs("form",{onSubmit:b=>{b.preventDefault(),m&&f.mutate(a)},className:"flex flex-col gap-5",children:[d.jsxs(sr,{label:"项目名",hint:"只能用字母、数字、下划线、连字符。例如 acme-web",children:[d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如: acme-web",value:a.name,onChange:b=>s({...a,name:b.target.value}),autoFocus:!0,required:!0}),a.name&&!h&&d.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"名称只能包含 a-z A-Z 0-9 _ -"})]}),d.jsxs(sr,{label:"项目目录",hint:"本机绝对路径(代码或文档都可)。和是否启用 git 无关。",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:a.projectDir,onChange:b=>s({...a,projectDir:b.target.value}),required:!0}),d.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>c(!0),"aria-label":"浏览选择项目目录",title:"浏览选择项目目录",children:[d.jsx(ZE,{size:14,strokeWidth:2.5}),"浏览"]})]}),d.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.createIfMissing!==!1,onChange:b=>s({...a,createIfMissing:b.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"目录不存在时自动创建(推荐 — 否则 .claude/ 和 wiki/ 安装会被跳过)"})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(sr,{label:"最大 Worker 数",children:d.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:b=>s({...a,maxWorkers:b.target.value})})}),d.jsx(sr,{label:"ACK 超时(分钟)",hint:"Worker 启动后多久没 ACK 视为失败",children:d.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.ackTimeoutMin??"5",onChange:b=>s({...a,ackTimeoutMin:b.target.value})})})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.enableGit??!0,onChange:b=>s({...a,enableGit:b.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-sm font-bold",children:"启用 Git(Worker 自动 commit + push)"})]}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。"}),a.enableGit!==!1&&d.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[d.jsx(sr,{label:"合并分支",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch??"main",onChange:b=>s({...a,mergeBranch:b.target.value})})}),d.jsx(sr,{label:"Git 远程项目路径",hint:"如 user/repo,空则跳过远程 API(只本地 commit/push)",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:a.gitlabProject??"",onChange:b=>s({...a,gitlabProject:b.target.value})})}),a.gitlabProject&&d.jsx(sr,{label:"GitLab 项目 ID",hint:"数字;GitHub 用户留空",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:a.gitlabProjectId??"",onChange:b=>s({...a,gitlabProjectId:b.target.value})})})]})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.enableWiki===!0,onChange:b=>s({...a,enableWiki:b.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-sm font-bold",children:"启用 Wiki 知识库(per-project,doc-28)"})]}),d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["开启后自动 scaffold ",d.jsx("code",{className:"font-mono",children:"wiki/"})," 目录,并向 Worker prompt 注入 5 层检索上下文与 wiki-update 提示。可后续 ",d.jsx("code",{className:"font-mono",children:"sps wiki init"})," 补办。"]})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:"通知"}),d.jsx(sr,{label:"Matrix 房间 ID",hint:"空则使用全局配置;不填 = 不通知",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:a.matrixRoomId??"",onChange:b=>s({...a,matrixRoomId:b.target.value})})})]}),d.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:()=>e("/projects"),disabled:f.isPending,children:"取消"}),d.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!m,"aria-label":"创建项目",children:f.isPending?d.jsxs(d.Fragment,{children:[d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}),"创建中…"]}):d.jsxs(d.Fragment,{children:[d.jsx(Di,{size:14,strokeWidth:3}),"创建"]})})]})]})}),o&&d.jsx(o1,{title:"选择项目目录",initialPath:a.projectDir.trim()||void 0,onCancel:()=>c(!1),onSelect:b=>{s({...a,projectDir:b}),c(!1)}})]})}function sr({label:e,hint:t,children:n}){return d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Qp=Symbol.for("yaml.alias"),cp=Symbol.for("yaml.document"),Er=Symbol.for("yaml.map"),u1=Symbol.for("yaml.pair"),Wi=Symbol.for("yaml.scalar"),zl=Symbol.for("yaml.seq"),Si=Symbol.for("yaml.node.type"),kr=e=>!!e&&typeof e=="object"&&e[Si]===Qp,hs=e=>!!e&&typeof e=="object"&&e[Si]===cp,Bl=e=>!!e&&typeof e=="object"&&e[Si]===Er,At=e=>!!e&&typeof e=="object"&&e[Si]===u1,vt=e=>!!e&&typeof e=="object"&&e[Si]===Wi,Ul=e=>!!e&&typeof e=="object"&&e[Si]===zl;function Mt(e){if(e&&typeof e=="object")switch(e[Si]){case Er:case zl:return!0}return!1}function jt(e){if(e&&typeof e=="object")switch(e[Si]){case Qp:case Er:case Wi:case zl:return!0}return!1}const f1=e=>(vt(e)||Mt(e))&&!!e.anchor,Fn=Symbol("break visit"),d1=Symbol("skip children"),Vi=Symbol("remove node");function ms(e,t){const n=h1(t);hs(e)?cl(null,e.contents,n,Object.freeze([e]))===Vi&&(e.contents=null):cl(null,e,n,Object.freeze([]))}ms.BREAK=Fn;ms.SKIP=d1;ms.REMOVE=Vi;function cl(e,t,n,a){const s=m1(e,t,n,a);if(jt(s)||At(s))return p1(e,a,s),cl(e,s,n,a);if(typeof s!="symbol"){if(Mt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=cl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Vi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){a=Object.freeze(a.concat(t));const o=cl("key",t.key,n,a);if(o===Fn)return Fn;o===Vi&&(t.key=null);const c=cl("value",t.value,n,a);if(c===Fn)return Fn;c===Vi&&(t.value=null)}}return s}async function Bf(e,t){const n=h1(t);hs(e)?await ul(null,e.contents,n,Object.freeze([e]))===Vi&&(e.contents=null):await ul(null,e,n,Object.freeze([]))}Bf.BREAK=Fn;Bf.SKIP=d1;Bf.REMOVE=Vi;async function ul(e,t,n,a){const s=await m1(e,t,n,a);if(jt(s)||At(s))return p1(e,a,s),ul(e,s,n,a);if(typeof s!="symbol"){if(Mt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=await ul(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Vi&&(t.items.splice(o,1),o-=1)}}}else if(At(t)){a=Object.freeze(a.concat(t));const o=await ul("key",t.key,n,a);if(o===Fn)return Fn;o===Vi&&(t.key=null);const c=await ul("value",t.value,n,a);if(c===Fn)return Fn;c===Vi&&(t.value=null)}}return s}function h1(e){return typeof e=="object"&&(e.Collection||e.Node||e.Value)?Object.assign({Alias:e.Node,Map:e.Node,Scalar:e.Node,Seq:e.Node},e.Value&&{Map:e.Value,Scalar:e.Value,Seq:e.Value},e.Collection&&{Map:e.Collection,Seq:e.Collection},e):e}function m1(e,t,n,a){var s,o,c,f,h;if(typeof n=="function")return n(e,t,a);if(Bl(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Ul(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,a);if(At(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(vt(t))return(f=n.Scalar)==null?void 0:f.call(n,e,t,a);if(kr(t))return(h=n.Alias)==null?void 0:h.call(n,e,t,a)}function p1(e,t,n){const a=t[t.length-1];if(Mt(a))a.items[e]=n;else if(At(a))e==="key"?a.key=n:a.value=n;else if(hs(a))a.contents=n;else{const s=kr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const CA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},AA=e=>e.replace(/[!,[\]{}]/g,t=>CA[t]);class Nn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Nn.defaultYaml,t),this.tags=Object.assign({},Nn.defaultTags,n)}clone(){const t=new Nn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Nn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Nn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Nn.defaultTags),this.atNextDocument=!1);const a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[o,c]=a;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=a;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,c),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const o=this.tags[a];if(o)try{return o+decodeURIComponent(s)}catch(c){return n(String(c)),null}return a==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,a]of Object.entries(this.tags))if(t.startsWith(a))return n+AA(t.substring(a.length));return t[0]==="!"?t:`!<${t}>`}toString(t){const n=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],a=Object.entries(this.tags);let s;if(t&&a.length>0&&jt(t.contents)){const o={};ms(t.contents,(c,f)=>{jt(f)&&f.tag&&(o[f.tag]=!0)}),s=Object.keys(o)}else s=[];for(const[o,c]of a)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(f=>f.startsWith(c)))&&n.push(`%TAG ${o} ${c}`);return n.join(`
351
- `)}}Nn.defaultYaml={explicit:!1,version:"1.2"};Nn.defaultTags={"!!":"tag:yaml.org,2002:"};function g1(e){if(/[\x00-\x19\s,[\]{}]/.test(e)){const n=`Anchor must not contain whitespace or control characters: ${JSON.stringify(e)}`;throw new Error(n)}return!0}function b1(e){const t=new Set;return ms(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function y1(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function OA(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=b1(e));const c=y1(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(vt(c.node)||Mt(c.node)))c.node.anchor=c.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:a}}function fl(e,t,n,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,o=a.length;s<o;++s){const c=a[s],f=fl(e,a,String(s),c);f===void 0?delete a[s]:f!==c&&(a[s]=f)}else if(a instanceof Map)for(const s of Array.from(a.keys())){const o=a.get(s),c=fl(e,a,s,o);c===void 0?a.delete(s):c!==o&&a.set(s,c)}else if(a instanceof Set)for(const s of Array.from(a)){const o=fl(e,a,s,s);o===void 0?a.delete(s):o!==s&&(a.delete(s),a.add(o))}else for(const[s,o]of Object.entries(a)){const c=fl(e,a,s,o);c===void 0?delete a[s]:c!==o&&(a[s]=c)}return e.call(t,n,a)}function vi(e,t,n){if(Array.isArray(e))return e.map((a,s)=>vi(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!f1(e))return e.toJSON(t,n);const a={aliasCount:0,count:1,res:void 0};n.anchors.set(e,a),n.onCreate=o=>{a.res=o,delete n.onCreate};const s=e.toJSON(t,n);return n.onCreate&&n.onCreate(s),s}return typeof e=="bigint"&&!(n!=null&&n.keep)?Number(e):e}class Yp{constructor(t){Object.defineProperty(this,Si,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:a,onAnchor:s,reviver:o}={}){if(!hs(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},f=vi(this,"",c);if(typeof s=="function")for(const{count:h,res:m}of c.anchors.values())s(m,h);return typeof o=="function"?fl(o,{"":f},"",f):f}}class Uf extends Yp{constructor(t){super(Qp),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let a;n!=null&&n.aliasResolveCache?a=n.aliasResolveCache:(a=[],ms(t,{Node:(o,c)=>{(kr(c)||f1(c))&&a.push(c)}}),n&&(n.aliasResolveCache=a));let s;for(const o of a){if(o===this)break;o.anchor===this.source&&(s=o)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:a,doc:s,maxAliasCount:o}=n,c=this.resolve(s,n);if(!c){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let f=a.get(c);if(f||(vi(c,null,n),f=a.get(c)),(f==null?void 0:f.res)===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=ff(s,c,a)),f.count*f.aliasCount>o)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return f.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(g1(this.source),t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const o=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(o)}if(t.implicitKey)return`${s} `}return s}}function ff(e,t,n){if(kr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(Mt(t)){let a=0;for(const s of t.items){const o=ff(e,s,n);o>a&&(a=o)}return a}else if(At(t)){const a=ff(e,t.key,n),s=ff(e,t.value,n);return Math.max(a,s)}return 1}const x1=e=>!e||typeof e!="function"&&typeof e!="object";class ze extends Yp{constructor(t){super(Wi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:vi(this.value,t,n)}toString(){return String(this.value)}}ze.BLOCK_FOLDED="BLOCK_FOLDED";ze.BLOCK_LITERAL="BLOCK_LITERAL";ze.PLAIN="PLAIN";ze.QUOTE_DOUBLE="QUOTE_DOUBLE";ze.QUOTE_SINGLE="QUOTE_SINGLE";const RA="tag:yaml.org,2002:";function MA(e,t,n){if(t){const a=n.filter(o=>o.tag===t),s=a.find(o=>!o.format)??a[0];if(!s)throw new Error(`Tag ${t} not found`);return s}return n.find(a=>{var s;return((s=a.identify)==null?void 0:s.call(a,e))&&!a.format})}function lc(e,t,n){var g,v,x;if(hs(e)&&(e=e.contents),jt(e))return e;if(At(e)){const E=(v=(g=n.schema[Er]).createNode)==null?void 0:v.call(g,n.schema,null,n);return E.items.push(e),E}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:a,onAnchor:s,onTagObj:o,schema:c,sourceObjects:f}=n;let h;if(a&&e&&typeof e=="object"){if(h=f.get(e),h)return h.anchor??(h.anchor=s(e)),new Uf(h.anchor);h={anchor:null,node:null},f.set(e,h)}t!=null&&t.startsWith("!!")&&(t=RA+t.slice(2));let m=MA(e,t,c.tags);if(!m){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new ze(e);return h&&(h.node=E),E}m=e instanceof Map?c[Er]:Symbol.iterator in Object(e)?c[zl]:c[Er]}o&&(o(m),delete n.onTagObj);const b=m!=null&&m.createNode?m.createNode(n.schema,e,n):typeof((x=m==null?void 0:m.nodeClass)==null?void 0:x.from)=="function"?m.nodeClass.from(n.schema,e,n):new ze(e);return t?b.tag=t:m.default||(b.tag=m.tag),h&&(h.node=b),b}function Ef(e,t,n){let a=n;for(let s=t.length-1;s>=0;--s){const o=t[s];if(typeof o=="number"&&Number.isInteger(o)&&o>=0){const c=[];c[o]=a,a=c}else a=new Map([[o,a]])}return lc(a,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:e,sourceObjects:new Map})}const Wo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class v1 extends Yp{constructor(t,n){super(t),Object.defineProperty(this,"schema",{value:n,configurable:!0,enumerable:!1,writable:!0})}clone(t){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return t&&(n.schema=t),n.items=n.items.map(a=>jt(a)||At(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Wo(t))this.add(n);else{const[a,...s]=t,o=this.get(a,!0);if(Mt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ef(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}deleteIn(t){const[n,...a]=t;if(a.length===0)return this.delete(n);const s=this.get(n,!0);if(Mt(s))return s.deleteIn(a);throw new Error(`Expected YAML collection at ${n}. Remaining path: ${a}`)}getIn(t,n){const[a,...s]=t,o=this.get(a,!0);return s.length===0?!n&&vt(o)?o.value:o:Mt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!At(n))return!1;const a=n.value;return a==null||t&&vt(a)&&a.value==null&&!a.commentBefore&&!a.comment&&!a.tag})}hasIn(t){const[n,...a]=t;if(a.length===0)return this.has(n);const s=this.get(n,!0);return Mt(s)?s.hasIn(a):!1}setIn(t,n){const[a,...s]=t;if(s.length===0)this.set(a,n);else{const o=this.get(a,!0);if(Mt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ef(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const jA=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Na(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Wr=(e,t,n)=>e.endsWith(`
352
- `)?Na(n,t):n.includes(`
353
- `)?`
354
- `+Na(n,t):(e.endsWith(" ")?"":" ")+n,E1="flow",up="block",df="quoted";function $f(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<o&&(o=0);const h=Math.max(1+o,1+s-t.length);if(e.length<=h)return e;const m=[],b={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?m.push(0):g=s-a);let v,x,E=!1,w=-1,k=-1,_=-1;n===up&&(w=qv(e,w,t.length),w!==-1&&(g=w+h));for(let T;T=e[w+=1];){if(n===df&&T==="\\"){switch(k=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}_=w}if(T===`
355
- `)n===up&&(w=qv(e,w,t.length)),g=w+t.length+h,v=void 0;else{if(T===" "&&x&&x!==" "&&x!==`
356
- `&&x!==" "){const j=e[w+1];j&&j!==" "&&j!==`
357
- `&&j!==" "&&(v=w)}if(w>=g)if(v)m.push(v),g=v+h,v=void 0;else if(n===df){for(;x===" "||x===" ";)x=T,T=e[w+=1],E=!0;const j=w>_+1?w-2:k-1;if(b[j])return e;m.push(j),b[j]=!0,g=j+h,v=void 0}else E=!0}x=T}if(E&&f&&f(),m.length===0)return e;c&&c();let A=e.slice(0,m[0]);for(let T=0;T<m.length;++T){const j=m[T],F=m[T+1]||e.length;j===0?A=`
358
- ${t}${e.slice(0,F)}`:(n===df&&b[j]&&(A+=`${e[j]}\\`),A+=`
359
- ${t}${e.slice(j+1,F)}`)}return A}function qv(e,t,n){let a=t,s=t+1,o=e[s];for(;o===" "||o===" ";)if(t<s+n)o=e[++t];else{do o=e[++t];while(o&&o!==`
360
- `);a=t,s=t+1,o=e[s]}return a}const Ff=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Pf=e=>/^(%|---|\.\.\.)/m.test(e);function DA(e,t,n){if(!t||t<0)return!1;const a=t-n,s=e.length;if(s<=a)return!1;for(let o=0,c=0;o<s;++o)if(e[o]===`
361
- `){if(o-c>a)return!0;if(c=o+1,s-c<=a)return!1}return!0}function Zo(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Pf(e)?" ":"");let c="",f=0;for(let h=0,m=n[h];m;m=n[++h])if(m===" "&&n[h+1]==="\\"&&n[h+2]==="n"&&(c+=n.slice(f,h)+"\\ ",h+=1,f=h,m="\\"),m==="\\")switch(n[h+1]){case"u":{c+=n.slice(f,h);const b=n.substr(h+2,4);switch(b){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:b.substr(0,2)==="00"?c+="\\x"+b.substr(2):c+=n.substr(h,6)}h+=5,f=h+1}break;case"n":if(a||n[h+2]==='"'||n.length<s)h+=1;else{for(c+=n.slice(f,h)+`
362
-
363
- `;n[h+2]==="\\"&&n[h+3]==="n"&&n[h+4]!=='"';)c+=`
364
- `,h+=2;c+=o,n[h+2]===" "&&(c+="\\"),h+=1,f=h+1}break;default:h+=1}return c=f?c+n.slice(f):n,a?c:$f(c,o,df,Ff(t,!1))}function fp(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
365
- `)||/[ \t]\n|\n[ \t]/.test(e))return Zo(e,t);const n=t.indent||(Pf(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
366
- ${n}`)+"'";return t.implicitKey?a:$f(a,n,E1,Ff(t,!1))}function dl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Zo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=fp:o&&!s?a=Zo:a=n?fp:Zo}return a(e,t)}let dp;try{dp=new RegExp(`(^|(?<!
367
- ))
368
- +(?!
369
- |$)`,"g")}catch{dp=/\n+(?!\n|$)/g}function hf({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:f,lineWidth:h}=a.options;if(!c||/\n[\t ]+$/.test(n))return dl(n,a);const m=a.indent||(a.forceBlockIndent||Pf(n)?" ":""),b=c==="literal"?!0:c==="folded"||t===ze.BLOCK_FOLDED?!1:t===ze.BLOCK_LITERAL?!0:!DA(n,h,m.length);if(!n)return b?`|
370
- `:`>
371
- `;let g,v;for(v=n.length;v>0;--v){const F=n[v-1];if(F!==`
372
- `&&F!==" "&&F!==" ")break}let x=n.substring(v);const E=x.indexOf(`
373
- `);E===-1?g="-":n===x||E!==x.length-1?(g="+",o&&o()):g="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
374
- `&&(x=x.slice(0,-1)),x=x.replace(dp,`$&${m}`));let w=!1,k,_=-1;for(k=0;k<n.length;++k){const F=n[k];if(F===" ")w=!0;else if(F===`
375
- `)_=k;else break}let A=n.substring(0,_<k?_+1:k);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${m}`));let j=(w?m?"2":"1":"")+g;if(e&&(j+=" "+f(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!b){const F=n.replace(/\n+/g,`
376
- $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let M=!1;const q=Ff(a,!0);c!=="folded"&&t!==ze.BLOCK_FOLDED&&(q.onOverflow=()=>{M=!0});const K=$f(`${A}${F}${x}`,m,up,q);if(!M)return`>${j}
377
- ${m}${K}`}return n=n.replace(/\n+/g,`$&${m}`),`|${j}
378
- ${m}${A}${n}${x}`}function LA(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:f,indent:h,indentStep:m,inFlow:b}=t;if(f&&o.includes(`
379
- `)||b&&/[[\]{},]/.test(o))return dl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||b||!o.includes(`
380
- `)?dl(o,t):hf(e,t,n,a);if(!f&&!b&&s!==ze.PLAIN&&o.includes(`
381
- `))return hf(e,t,n,a);if(Pf(o)){if(h==="")return t.forceBlockIndent=!0,hf(e,t,n,a);if(f&&h===m)return dl(o,t)}const g=o.replace(/\n+/g,`$&
382
- ${h}`);if(c){const v=w=>{var k;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((k=w.test)==null?void 0:k.test(g))},{compat:x,tags:E}=t.doc.schema;if(E.some(v)||x!=null&&x.some(v))return dl(o,t)}return f?g:$f(g,h,E1,Ff(t,!1))}function vc(e,t,n,a){const{implicitKey:s,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==ze.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=ze.QUOTE_DOUBLE);const h=b=>{switch(b){case ze.BLOCK_FOLDED:case ze.BLOCK_LITERAL:return s||o?dl(c.value,t):hf(c,t,n,a);case ze.QUOTE_DOUBLE:return Zo(c.value,t);case ze.QUOTE_SINGLE:return fp(c.value,t);case ze.PLAIN:return LA(c,t,n,a);default:return null}};let m=h(f);if(m===null){const{defaultKeyType:b,defaultStringType:g}=t.options,v=s&&b||g;if(m=h(v),m===null)throw new Error(`Unsupported default string type ${v}`)}return m}function S1(e,t){const n=Object.assign({blockQuote:!0,commentString:jA,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trailingComma:!1,trueStr:"true",verifyAliasOrder:!0},e.schema.toStringOptions,t);let a;switch(n.collectionStyle){case"block":a=!1;break;case"flow":a=!0;break;default:a=null}return{anchors:new Set,doc:e,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent=="number"?" ".repeat(n.indent):" ",inFlow:a,options:n}}function IA(e,t){var s;if(t.tag){const o=e.filter(c=>c.tag===t.tag);if(o.length>0)return o.find(c=>c.format===t.format)??o[0]}let n,a;if(vt(t)){a=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,a)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}n=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else a=t,n=e.find(o=>o.nodeClass&&a instanceof o.nodeClass);if(!n){const o=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${o} value`)}return n}function zA(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(vt(e)||Mt(e))&&e.anchor;o&&g1(o)&&(n.add(o),s.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function Al(e,t,n,a){var h;if(At(e))return e.toString(t,n,a);if(kr(e)){if(t.doc.directives)return e.toString(t);if((h=t.resolvedAliases)!=null&&h.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const o=jt(e)?e:t.doc.createNode(e,{onTagObj:m=>s=m});s??(s=IA(t.doc.schema.tags,o));const c=zA(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof s.stringify=="function"?s.stringify(o,t,n,a):vt(o)?vc(o,t,n,a):o.toString(t,n,a);return c?vt(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
383
- ${t.indent}${f}`:f}function BA({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:f,indentStep:h,options:{commentString:m,indentSeq:b,simpleKeys:g}}=n;let v=jt(e)&&e.comment||null;if(g){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Mt(e)||!jt(e)&&typeof e=="object"){const q="With simple keys, collection cannot be used as a key value";throw new Error(q)}}let x=!g&&(!e||v&&t==null&&!n.inFlow||Mt(e)||(vt(e)?e.type===ze.BLOCK_FOLDED||e.type===ze.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(g||!o),indent:f+h});let E=!1,w=!1,k=Al(e,n,()=>E=!0,()=>w=!0);if(!x&&!n.inFlow&&k.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");x=!0}if(n.inFlow){if(o||t==null)return E&&a&&a(),k===""?"?":x?`? ${k}`:k}else if(o&&!g||t==null&&x)return k=`? ${k}`,v&&!E?k+=Wr(k,n.indent,m(v)):w&&s&&s(),k;E&&(v=null),x?(v&&(k+=Wr(k,n.indent,m(v))),k=`? ${k}
384
- ${f}:`):(k=`${k}:`,v&&(k+=Wr(k,n.indent,m(v))));let _,A,T;jt(t)?(_=!!t.spaceBefore,A=t.commentBefore,T=t.comment):(_=!1,A=null,T=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!x&&!v&&vt(t)&&(n.indentAtStart=k.length+1),w=!1,!b&&h.length>=2&&!n.inFlow&&!x&&Ul(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let j=!1;const F=Al(t,n,()=>j=!0,()=>w=!0);let M=" ";if(v||_||A){if(M=_?`
385
- `:"",A){const q=m(A);M+=`
386
- ${Na(q,n.indent)}`}F===""&&!n.inFlow?M===`
387
- `&&T&&(M=`
388
-
389
- `):M+=`
390
- ${n.indent}`}else if(!x&&Mt(t)){const q=F[0],K=F.indexOf(`
391
- `),te=K!==-1,D=n.inFlow??t.flow??t.items.length===0;if(te||!D){let P=!1;if(te&&(q==="&"||q==="!")){let J=F.indexOf(" ");q==="&"&&J!==-1&&J<K&&F[J+1]==="!"&&(J=F.indexOf(" ",J+1)),(J===-1||K<J)&&(P=!0)}P||(M=`
392
- ${n.indent}`)}}else(F===""||F[0]===`
393
- `)&&(M="");return k+=M+F,n.inFlow?j&&a&&a():T&&!j?k+=Wr(k,n.indent,m(T)):w&&s&&s(),k}function w1(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Gu="<<",Ta={identify:e=>e===Gu||typeof e=="symbol"&&e.description===Gu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new ze(Symbol(Gu)),{addToJSMap:_1}),stringify:()=>Gu},UA=(e,t)=>(Ta.identify(t)||vt(t)&&(!t.type||t.type===ze.PLAIN)&&Ta.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Ta.tag&&n.default));function _1(e,t,n){if(n=e&&kr(n)?n.resolve(e.doc):n,Ul(n))for(const a of n.items)pm(e,t,a);else if(Array.isArray(n))for(const a of n)pm(e,t,a);else pm(e,t,n)}function pm(e,t,n){const a=e&&kr(n)?n.resolve(e.doc):n;if(!Bl(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[o,c]of s)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function k1(e,t,{key:n,value:a}){if(jt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(UA(e,n))_1(e,t,a);else{const s=vi(n,"",e);if(t instanceof Map)t.set(s,vi(a,s,e));else if(t instanceof Set)t.add(s);else{const o=$A(n,s,e),c=vi(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function $A(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(jt(e)&&(n!=null&&n.doc)){const a=S1(n.doc,{});a.anchors=new Set;for(const o of n.anchors.keys())a.anchors.add(o.anchor);a.inFlow=!0,a.inStringifyKey=!0;const s=e.toString(a);if(!n.mapKeyWarned){let o=JSON.stringify(s);o.length>40&&(o=o.substring(0,36)+'..."'),w1(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${o}. Set mapAsMap: true to use object keys.`),n.mapKeyWarned=!0}return s}return JSON.stringify(t)}function Vp(e,t,n){const a=lc(e,void 0,n),s=lc(t,void 0,n);return new gn(a,s)}class gn{constructor(t,n=null){Object.defineProperty(this,Si,{value:u1}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return jt(n)&&(n=n.clone(t)),jt(a)&&(a=a.clone(t)),new gn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return k1(n,a,this)}toString(t,n,a){return t!=null&&t.doc?BA(this,t,n,a):JSON.stringify(this)}}function N1(e,t,n){return(t.inFlow??e.flow?PA:FA)(e,t,n)}function FA({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:h,options:{commentString:m}}=n,b=Object.assign({},n,{indent:o,type:null});let g=!1;const v=[];for(let E=0;E<t.length;++E){const w=t[E];let k=null;if(jt(w))!g&&w.spaceBefore&&v.push(""),Sf(n,v,w.commentBefore,g),w.comment&&(k=w.comment);else if(At(w)){const A=jt(w.key)?w.key:null;A&&(!g&&A.spaceBefore&&v.push(""),Sf(n,v,A.commentBefore,g))}g=!1;let _=Al(w,b,()=>k=null,()=>g=!0);k&&(_+=Wr(_,o,m(k))),g&&k&&(g=!1),v.push(a+_)}let x;if(v.length===0)x=s.start+s.end;else{x=v[0];for(let E=1;E<v.length;++E){const w=v[E];x+=w?`
394
- ${h}${w}`:`
395
- `}}return e?(x+=`
396
- `+Na(m(e),h),f&&f()):g&&c&&c(),x}function PA({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;a+=o;const h=Object.assign({},t,{indent:a,inFlow:!0,type:null});let m=!1,b=0;const g=[];for(let E=0;E<e.length;++E){const w=e[E];let k=null;if(jt(w))w.spaceBefore&&g.push(""),Sf(t,g,w.commentBefore,!1),w.comment&&(k=w.comment);else if(At(w)){const A=jt(w.key)?w.key:null;A&&(A.spaceBefore&&g.push(""),Sf(t,g,A.commentBefore,!1),A.comment&&(m=!0));const T=jt(w.value)?w.value:null;T?(T.comment&&(k=T.comment),T.commentBefore&&(m=!0)):w.value==null&&(A!=null&&A.comment)&&(k=A.comment)}k&&(m=!0);let _=Al(w,h,()=>k=null);m||(m=g.length>b||_.includes(`
397
- `)),E<e.length-1?_+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(m||(m=g.reduce((A,T)=>A+T.length+2,2)+(_.length+2)>t.options.lineWidth)),m&&(_+=",")),k&&(_+=Wr(_,a,f(k))),g.push(_),b=g.length}const{start:v,end:x}=n;if(g.length===0)return v+x;if(!m){const E=g.reduce((w,k)=>w+k.length+2,2);m=t.options.lineWidth>0&&E>t.options.lineWidth}if(m){let E=v;for(const w of g)E+=w?`
398
- ${o}${s}${w}`:`
399
- `;return`${E}
400
- ${s}${x}`}else return`${v}${c}${g.join(" ")}${c}${x}`}function Sf({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=Na(t(a),e);n.push(o.trimStart())}}function Zr(e,t){const n=vt(t)?t.value:t;for(const a of e)if(At(a)&&(a.key===t||a.key===n||vt(a.key)&&a.key.value===n))return a}class ii extends v1{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Er,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),f=(h,m)=>{if(typeof o=="function")m=o.call(n,h,m);else if(Array.isArray(o)&&!o.includes(h))return;(m!==void 0||s)&&c.items.push(Vp(h,m,a))};if(n instanceof Map)for(const[h,m]of n)f(h,m);else if(n&&typeof n=="object")for(const h of Object.keys(n))f(h,n[h]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;At(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new gn(t,t==null?void 0:t.value):a=new gn(t.key,t.value);const s=Zr(this.items,a.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);vt(s.value)&&x1(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const f=this.items.findIndex(h=>o(a,h)<0);f===-1?this.items.push(a):this.items.splice(f,0,a)}else this.items.push(a)}delete(t){const n=Zr(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=Zr(this.items,t),s=a==null?void 0:a.value;return(!n&&vt(s)?s.value:s)??void 0}has(t){return!!Zr(this.items,t)}set(t,n){this.add(new gn(t,n),!0)}toJSON(t,n,a){const s=a?new a:n!=null&&n.mapAsMap?new Map:{};n!=null&&n.onCreate&&n.onCreate(s);for(const o of this.items)k1(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!At(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),N1(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const $l={collection:"map",default:!0,nodeClass:ii,tag:"tag:yaml.org,2002:map",resolve(e,t){return Bl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ii.from(e,t,n)};class Sr extends v1{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(zl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Qu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Qu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&vt(s)?s.value:s}has(t){const n=Qu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Qu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];vt(s)&&x1(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const o of this.items)a.push(vi(o,String(s++),n));return a}toString(t,n,a){return t?N1(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let f of n){if(typeof s=="function"){const h=n instanceof Set?f:String(c++);f=s.call(n,h,f)}o.items.push(lc(f,void 0,a))}}return o}}function Qu(e){let t=vt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Fl={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ul(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Sr.from(e,t,n)},qf={identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify(e,t,n,a){return t=Object.assign({actualString:!0},t),vc(e,t,n,a)}},Hf={identify:e=>e==null,createNode:()=>new ze(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new ze(null),stringify:({source:e},t)=>typeof e=="string"&&Hf.test.test(e)?e:t.options.nullStr},Xp={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new ze(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&Xp.test.test(e)){const a=e[0]==="t"||e[0]==="T";if(t===a)return e}return t?n.options.trueStr:n.options.falseStr}};function Li({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let f=t-(o.length-c-1);for(;f-- >0;)o+="0"}return o}const T1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},C1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},A1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(e){const t=new ze(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Li},Kf=e=>typeof e=="bigint"||Number.isInteger(e),Wp=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function O1(e,t,n){const{value:a}=e;return Kf(a)&&a>=0?n+a.toString(t):Li(e)}const R1={identify:e=>Kf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>Wp(e,2,8,n),stringify:e=>O1(e,8,"0o")},M1={identify:Kf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>Wp(e,0,10,n),stringify:Li},j1={identify:e=>Kf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>Wp(e,2,16,n),stringify:e=>O1(e,16,"0x")},qA=[$l,Fl,qf,Hf,Xp,R1,M1,j1,T1,C1,A1];function Hv(e){return typeof e=="bigint"||Number.isInteger(e)}const Yu=({value:e})=>JSON.stringify(e),HA=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Yu},{identify:e=>e==null,createNode:()=>new ze(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Yu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Yu},{identify:Hv,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(e,t,{intAsBigInt:n})=>n?BigInt(e):parseInt(e,10),stringify:({value:e})=>Hv(e)?e.toString():JSON.stringify(e)},{identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:e=>parseFloat(e),stringify:Yu}],KA={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},GA=[$l,Fl].concat(HA,KA),Zp={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,o){if(!n)return"";const c=n;let f;if(typeof btoa=="function"){let h="";for(let m=0;m<c.length;++m)h+=String.fromCharCode(c[m]);f=btoa(h)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=ze.BLOCK_LITERAL),t!==ze.QUOTE_DOUBLE){const h=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),m=Math.ceil(f.length/h),b=new Array(m);for(let g=0,v=0;g<m;++g,v+=h)b[g]=f.substr(v,h);f=b.join(t===ze.BLOCK_LITERAL?`
401
- `:" ")}return vc({comment:e,type:t,value:f},a,s,o)}};function D1(e,t){if(Ul(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!At(a)){if(Bl(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new gn(new ze(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
402
- ${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
403
- ${o.comment}`:a.comment}a=s}e.items[n]=At(a)?a:new gn(a)}}else t("Expected a sequence for this tag");return e}function L1(e,t,n){const{replacer:a}=n,s=new Sr(e);s.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof a=="function"&&(c=a.call(t,String(o++),c));let f,h;if(Array.isArray(c))if(c.length===2)f=c[0],h=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const m=Object.keys(c);if(m.length===1)f=m[0],h=c[f];else throw new TypeError(`Expected tuple with one key, not ${m.length} keys`)}else f=c;s.items.push(Vp(f,h,n))}return s}const Jp={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:D1,createNode:L1};class hl extends Sr{constructor(){super(),this.add=ii.prototype.add.bind(this),this.delete=ii.prototype.delete.bind(this),this.get=ii.prototype.get.bind(this),this.has=ii.prototype.has.bind(this),this.set=ii.prototype.set.bind(this),this.tag=hl.tag}toJSON(t,n){if(!n)return super.toJSON(t);const a=new Map;n!=null&&n.onCreate&&n.onCreate(a);for(const s of this.items){let o,c;if(At(s)?(o=vi(s.key,"",n),c=vi(s.value,o,n)):o=vi(s,"",n),a.has(o))throw new Error("Ordered maps must not include duplicate keys");a.set(o,c)}return a}static from(t,n,a){const s=L1(t,n,a),o=new this;return o.items=s.items,o}}hl.tag="tag:yaml.org,2002:omap";const eg={collection:"seq",identify:e=>e instanceof Map,nodeClass:hl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=D1(e,t),a=[];for(const{key:s}of n.items)vt(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new hl,n)},createNode:(e,t,n)=>hl.from(e,t,n)};function I1({value:e,source:t},n){return t&&(e?z1:B1).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const z1={identify:e=>e===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new ze(!0),stringify:I1},B1={identify:e=>e===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new ze(!1),stringify:I1},QA={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:e=>e.slice(-3).toLowerCase()==="nan"?NaN:e[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Li},YA={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:e=>parseFloat(e.replace(/_/g,"")),stringify(e){const t=Number(e.value);return isFinite(t)?t.toExponential():Li(e)}},VA={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(e){const t=new ze(parseFloat(e.replace(/_/g,""))),n=e.indexOf(".");if(n!==-1){const a=e.substring(n+1).replace(/_/g,"");a[a.length-1]==="0"&&(t.minFractionDigits=a.length)}return t},stringify:Li},Ec=e=>typeof e=="bigint"||Number.isInteger(e);function Gf(e,t,n,{intAsBigInt:a}){const s=e[0];if((s==="-"||s==="+")&&(t+=1),e=e.substring(t).replace(/_/g,""),a){switch(n){case 2:e=`0b${e}`;break;case 8:e=`0o${e}`;break;case 16:e=`0x${e}`;break}const c=BigInt(e);return s==="-"?BigInt(-1)*c:c}const o=parseInt(e,n);return s==="-"?-1*o:o}function tg(e,t,n){const{value:a}=e;if(Ec(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Li(e)}const XA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Gf(e,2,2,n),stringify:e=>tg(e,2,"0b")},WA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Gf(e,1,8,n),stringify:e=>tg(e,8,"0")},ZA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Gf(e,0,10,n),stringify:Li},JA={identify:Ec,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Gf(e,2,16,n),stringify:e=>tg(e,16,"0x")};class ml extends ii{constructor(t){super(t),this.tag=ml.tag}add(t){let n;At(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new gn(t.key,null):n=new gn(t,null),Zr(this.items,n.key)||this.items.push(n)}get(t,n){const a=Zr(this.items,t);return!n&&At(a)?vt(a.key)?a.key.value:a.key:a}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const a=Zr(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new gn(t))}toJSON(t,n){return super.toJSON(t,n,Set)}toString(t,n,a){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},t,{allNullValues:!0}),n,a);throw new Error("Set items must all have null values")}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n))for(let c of n)typeof s=="function"&&(c=s.call(n,c,c)),o.items.push(Vp(c,null,a));return o}}ml.tag="tag:yaml.org,2002:set";const ng={collection:"map",identify:e=>e instanceof Set,nodeClass:ml,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>ml.from(e,t,n),resolve(e,t){if(Bl(e)){if(e.hasAllNullValues(!0))return Object.assign(new ml,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function ig(e,t){const n=e[0],a=n==="-"||n==="+"?e.substring(1):e,s=c=>t?BigInt(c):Number(c),o=a.replace(/_/g,"").split(":").reduce((c,f)=>c*s(60)+s(f),s(0));return n==="-"?s(-1)*o:o}function U1(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Li(e);let a="";t<0&&(a="-",t*=n(-1));const s=n(60),o=[t%s];return t<60?o.unshift(0):(t=(t-o[0])/s,o.unshift(t%s),t>=60&&(t=(t-o[0])/s,o.unshift(t))),a+o.map(c=>String(c).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const $1={identify:e=>typeof e=="bigint"||Number.isInteger(e),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(e,t,{intAsBigInt:n})=>ig(e,n),stringify:U1},F1={identify:e=>typeof e=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:e=>ig(e,!1),stringify:U1},Qf={identify:e=>e instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(e){const t=e.match(Qf.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,o,c,f]=t.map(Number),h=t[7]?Number((t[7]+"00").substr(1,3)):0;let m=Date.UTC(n,a-1,s,o||0,c||0,f||0,h);const b=t[8];if(b&&b!=="Z"){let g=ig(b,!1);Math.abs(g)<30&&(g*=60),m-=6e4*g}return new Date(m)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Kv=[$l,Fl,qf,Hf,z1,B1,XA,WA,ZA,JA,QA,YA,VA,Zp,Ta,eg,Jp,ng,$1,F1,Qf],Gv=new Map([["core",qA],["failsafe",[$l,Fl,qf]],["json",GA],["yaml11",Kv],["yaml-1.1",Kv]]),Qv={binary:Zp,bool:Xp,float:A1,floatExp:C1,floatNaN:T1,floatTime:F1,int:M1,intHex:j1,intOct:R1,intTime:$1,map:$l,merge:Ta,null:Hf,omap:eg,pairs:Jp,seq:Fl,set:ng,timestamp:Qf},eO={"tag:yaml.org,2002:binary":Zp,"tag:yaml.org,2002:merge":Ta,"tag:yaml.org,2002:omap":eg,"tag:yaml.org,2002:pairs":Jp,"tag:yaml.org,2002:set":ng,"tag:yaml.org,2002:timestamp":Qf};function gm(e,t,n){const a=Gv.get(t);if(a&&!e)return n&&!a.includes(Ta)?a.concat(Ta):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const o=Array.from(Gv.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)s=s.concat(o);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(Ta)),s.reduce((o,c)=>{const f=typeof c=="string"?Qv[c]:c;if(!f){const h=JSON.stringify(c),m=Object.keys(Qv).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${h}; use one of ${m}`)}return o.includes(f)||o.push(f),o},[])}const tO=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let P1=class q1{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:o,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?gm(t,"compat"):t?gm(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?eO:{},this.tags=gm(n,this.name,a),this.toStringOptions=f??null,Object.defineProperty(this,Er,{value:$l}),Object.defineProperty(this,Wi,{value:qf}),Object.defineProperty(this,zl,{value:Fl}),this.sortMapEntries=typeof c=="function"?c:c===!0?tO:null}clone(){const t=Object.create(q1.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function nO(e,t){var h;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const m=e.directives.toString(e);m?(n.push(m),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=S1(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const m=o(e.commentBefore);n.unshift(Na(m,""))}let c=!1,f=null;if(e.contents){if(jt(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);n.push(Na(g,""))}s.forceBlockIndent=!!e.comment,f=e.contents.comment}const m=f?void 0:()=>c=!0;let b=Al(e.contents,s,()=>f=null,m);f&&(b+=Wr(b,"",o(f))),(b[0]==="|"||b[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${b}`:n.push(b)}else n.push(Al(e.contents,s));if((h=e.directives)!=null&&h.docEnd)if(e.comment){const m=o(e.comment);m.includes(`
404
- `)?(n.push("..."),n.push(Na(m,""))):n.push(`... ${m}`)}else n.push("...");else{let m=e.comment;m&&c&&(m=m.replace(/^\n+/,"")),m&&((!c||f)&&n[n.length-1]!==""&&n.push(""),n.push(Na(o(m),"")))}return n.join(`
405
- `)+`
406
- `}class Pl{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Si,{value:cp});let s=null;typeof n=="function"||Array.isArray(n)?s=n:a===void 0&&n&&(a=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=o;let{version:c}=o;a!=null&&a._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Nn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(Pl.prototype,{[Si]:{value:cp}});return t.commentBefore=this.commentBefore,t.comment=this.comment,t.errors=this.errors.slice(),t.warnings=this.warnings.slice(),t.options=Object.assign({},this.options),this.directives&&(t.directives=this.directives.clone()),t.schema=this.schema.clone(),t.contents=jt(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){nl(this.contents)&&this.contents.add(t)}addIn(t,n){nl(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=b1(this);t.anchor=!n||a.has(n)?y1(n||"a",a):n}return new Uf(t.anchor)}createNode(t,n,a){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const k=A=>typeof A=="number"||A instanceof String||A instanceof Number,_=n.filter(k).map(String);_.length>0&&(n=n.concat(_)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:f,keepUndefined:h,onTagObj:m,tag:b}=a??{},{onAnchor:g,setAnchors:v,sourceObjects:x}=OA(this,c||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:h??!1,onAnchor:g,onTagObj:m,replacer:s,schema:this.schema,sourceObjects:x},w=lc(t,b,E);return f&&Mt(w)&&(w.flow=!0),v(),w}createPair(t,n,a={}){const s=this.createNode(t,null,a),o=this.createNode(n,null,a);return new gn(s,o)}delete(t){return nl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Wo(t)?this.contents==null?!1:(this.contents=null,!0):nl(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Mt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Wo(t)?!n&&vt(this.contents)?this.contents.value:this.contents:Mt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Mt(this.contents)?this.contents.has(t):!1}hasIn(t){return Wo(t)?this.contents!==void 0:Mt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Ef(this.schema,[t],n):nl(this.contents)&&this.contents.set(t,n)}setIn(t,n){Wo(t)?this.contents=n:this.contents==null?this.contents=Ef(this.schema,Array.from(t),n):nl(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Nn({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Nn({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(a)this.schema=new P1(Object.assign(a,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:a,maxAliasCount:s,onAnchor:o,reviver:c}={}){const f={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},h=vi(this.contents,n??"",f);if(typeof o=="function")for(const{count:m,res:b}of f.anchors.values())o(b,m);return typeof c=="function"?fl(c,{"":h},"",h):h}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return nO(this,t)}}function nl(e){if(Mt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class ag extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class Jr extends ag{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class H1 extends ag{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const wf=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(f=>t.linePos(f));const{line:a,col:s}=n.linePos[0];n.message+=` at line ${a}, column ${s}`;let o=s-1,c=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const f=Math.min(o-39,c.length-79);c="…"+c.substring(f),o-=f-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,o))){let f=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);f.length>80&&(f=f.substring(0,79)+`…
407
- `),c=f+c}if(/[^ ]/.test(c)){let f=1;const h=n.linePos[1];(h==null?void 0:h.line)===a&&h.col>s&&(f=Math.max(1,Math.min(h.col-s,80-o)));const m=" ".repeat(o)+"^".repeat(f);n.message+=`:
408
-
409
- ${c}
410
- ${m}
411
- `}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:f}){let h=!1,m=f,b=f,g="",v="",x=!1,E=!1,w=null,k=null,_=null,A=null,T=null,j=null,F=null;for(const K of e)switch(E&&(K.type!=="space"&&K.type!=="newline"&&K.type!=="comma"&&o(K.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(m&&K.type!=="comment"&&K.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),K.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&K.source.includes(" ")&&(w=K),b=!0;break;case"comment":{b||o(K,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const te=K.source.substring(1)||" ";g?g+=v+te:g=te,v="",m=!1;break}case"newline":m?g?g+=K.source:(!j||n!=="seq-item-ind")&&(h=!0):v+=K.source,m=!0,x=!0,(k||_)&&(A=K),b=!0;break;case"anchor":k&&o(K,"MULTIPLE_ANCHORS","A node can have at most one anchor"),K.source.endsWith(":")&&o(K.offset+K.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=K,F??(F=K.offset),m=!1,b=!1,E=!0;break;case"tag":{_&&o(K,"MULTIPLE_TAGS","A node can have at most one tag"),_=K,F??(F=K.offset),m=!1,b=!1,E=!0;break}case n:(k||_)&&o(K,"BAD_PROP_ORDER",`Anchors and tags must be after the ${K.source} indicator`),j&&o(K,"UNEXPECTED_TOKEN",`Unexpected ${K.source} in ${t??"collection"}`),j=K,m=n==="seq-item-ind"||n==="explicit-key-ind",b=!1;break;case"comma":if(t){T&&o(K,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=K,m=!1,b=!1;break}default:o(K,"UNEXPECTED_TOKEN",`Unexpected ${K.type} token`),m=!1,b=!1}const M=e[e.length-1],q=M?M.offset+M.source.length:s;return E&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&o(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(m&&w.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:j,spaceBefore:h,comment:g,hasNewline:x,anchor:k,tag:_,newlineAfterProp:A,end:q,start:F??q}}function oc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
412
- `))return!0;if(e.end){for(const t of e.end)if(t.type==="newline")return!0}return!1;case"flow-collection":for(const t of e.items){for(const n of t.start)if(n.type==="newline")return!0;if(t.sep){for(const n of t.sep)if(n.type==="newline")return!0}if(oc(t.key)||oc(t.value))return!0}return!1;default:return!0}}function hp(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&oc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function K1(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||vt(o)&&vt(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const Yv="All mapping items must start at the same column";function iO({composeNode:e,composeEmptyNode:t},n,a,s,o){var b;const c=(o==null?void 0:o.nodeClass)??ii,f=new c(n.schema);n.atRoot&&(n.atRoot=!1);let h=a.offset,m=null;for(const g of a.items){const{start:v,key:x,sep:E,value:w}=g,k=Ol(v,{indicator:"explicit-key-ind",next:x??(E==null?void 0:E[0]),offset:h,onError:s,parentIndent:a.indent,startOnNewline:!0}),_=!k.found;if(_){if(x&&(x.type==="block-seq"?s(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==a.indent&&s(h,"BAD_INDENT",Yv)),!k.anchor&&!k.tag&&!E){m=k.end,k.comment&&(f.comment?f.comment+=`
413
- `+k.comment:f.comment=k.comment);continue}(k.newlineAfterProp||oc(x))&&s(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=k.found)==null?void 0:b.indent)!==a.indent&&s(h,"BAD_INDENT",Yv);n.atKey=!0;const A=k.end,T=x?e(n,x,k,s):t(n,A,v,null,k,s);n.schema.compat&&hp(a.indent,x,s),n.atKey=!1,K1(n,f.items,T)&&s(A,"DUPLICATE_KEY","Map keys must be unique");const j=Ol(E??[],{indicator:"map-value-ind",next:w,offset:T.range[2],onError:s,parentIndent:a.indent,startOnNewline:!x||x.type==="block-scalar"});if(h=j.end,j.found){_&&((w==null?void 0:w.type)==="block-map"&&!j.hasNewline&&s(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&k.start<j.found.offset-1024&&s(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const F=w?e(n,w,j,s):t(n,h,E,null,j,s);n.schema.compat&&hp(a.indent,w,s),h=F.range[2];const M=new gn(T,F);n.options.keepSourceTokens&&(M.srcToken=g),f.items.push(M)}else{_&&s(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),j.comment&&(T.comment?T.comment+=`
414
- `+j.comment:T.comment=j.comment);const F=new gn(T);n.options.keepSourceTokens&&(F.srcToken=g),f.items.push(F)}}return m&&m<h&&s(m,"IMPOSSIBLE","Map comment with trailing content"),f.range=[a.offset,h,m??h],f}function aO({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Sr,f=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let h=a.offset,m=null;for(const{start:b,value:g}of a.items){const v=Ol(b,{indicator:"seq-item-ind",next:g,offset:h,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!v.found)if(v.anchor||v.tag||g)(g==null?void 0:g.type)==="block-seq"?s(v.end,"BAD_INDENT","All sequence items must start at the same column"):s(h,"MISSING_CHAR","Sequence item without - indicator");else{m=v.end,v.comment&&(f.comment=v.comment);continue}const x=g?e(n,g,v,s):t(n,v.end,b,null,v,s);n.schema.compat&&hp(a.indent,g,s),h=x.range[2],f.items.push(x)}return f.range=[a.offset,h,m??h],f}function Sc(e,t,n,a){let s="";if(e){let o=!1,c="";for(const f of e){const{source:h,type:m}=f;switch(m){case"space":o=!0;break;case"comment":{n&&!o&&a(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=h.substring(1)||" ";s?s+=c+b:s=b,c="";break}case"newline":s&&(c+=h),o=!0;break;default:a(f,"UNEXPECTED_TOKEN",`Unexpected ${m} at node end`)}t+=h.length}}return{comment:s,offset:t}}const bm="Block collections are not allowed within flow collections",ym=e=>e&&(e.type==="block-map"||e.type==="block-seq");function rO({composeNode:e,composeEmptyNode:t},n,a,s,o){var k;const c=a.start.source==="{",f=c?"flow map":"flow sequence",h=(o==null?void 0:o.nodeClass)??(c?ii:Sr),m=new h(n.schema);m.flow=!0;const b=n.atRoot;b&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let g=a.offset+a.start.source.length;for(let _=0;_<a.items.length;++_){const A=a.items[_],{start:T,key:j,sep:F,value:M}=A,q=Ol(T,{flow:f,indicator:"explicit-key-ind",next:j??(F==null?void 0:F[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!F&&!M){_===0&&q.comma?s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<a.items.length-1&&s(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),q.comment&&(m.comment?m.comment+=`
415
- `+q.comment:m.comment=q.comment),g=q.end;continue}!c&&n.options.strict&&oc(j)&&s(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)q.comma&&s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(q.comma||s(q.start,"MISSING_CHAR",`Missing , between ${f} items`),q.comment){let K="";e:for(const te of T)switch(te.type){case"comma":case"space":break;case"comment":K=te.source.substring(1);break e;default:break e}if(K){let te=m.items[m.items.length-1];At(te)&&(te=te.value??te.key),te.comment?te.comment+=`
416
- `+K:te.comment=K,q.comment=q.comment.substring(K.length+1)}}if(!c&&!F&&!q.found){const K=M?e(n,M,q,s):t(n,q.end,F,null,q,s);m.items.push(K),g=K.range[2],ym(M)&&s(K.range,"BLOCK_IN_FLOW",bm)}else{n.atKey=!0;const K=q.end,te=j?e(n,j,q,s):t(n,K,T,null,q,s);ym(j)&&s(te.range,"BLOCK_IN_FLOW",bm),n.atKey=!1;const D=Ol(F??[],{flow:f,indicator:"map-value-ind",next:M,offset:te.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(D.found){if(!c&&!q.found&&n.options.strict){if(F)for(const re of F){if(re===D.found)break;if(re.type==="newline"){s(re,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<D.found.offset-1024&&s(D.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else M&&("source"in M&&((k=M.source)==null?void 0:k[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${f}`):s(D.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const P=M?e(n,M,D,s):D.found?t(n,D.end,F,null,D,s):null;P?ym(M)&&s(P.range,"BLOCK_IN_FLOW",bm):D.comment&&(te.comment?te.comment+=`
417
- `+D.comment:te.comment=D.comment);const J=new gn(te,P);if(n.options.keepSourceTokens&&(J.srcToken=A),c){const re=m;K1(n,re.items,te)&&s(K,"DUPLICATE_KEY","Map keys must be unique"),re.items.push(J)}else{const re=new ii(n.schema);re.flow=!0,re.items.push(J);const Q=(P??te).range;re.range=[te.range[0],Q[1],Q[2]],m.items.push(re)}g=P?P.range[2]:D.end}}const v=c?"}":"]",[x,...E]=a.end;let w=g;if((x==null?void 0:x.source)===v)w=x.offset+x.source.length;else{const _=f[0].toUpperCase()+f.substring(1),A=b?`${_} must end with a ${v}`:`${_} in block collection must be sufficiently indented and end with a ${v}`;s(g,b?"MISSING_CHAR":"BAD_INDENT",A),x&&x.source.length!==1&&E.unshift(x)}if(E.length>0){const _=Sc(E,w,n.options.strict,s);_.comment&&(m.comment?m.comment+=`
418
- `+_.comment:m.comment=_.comment),m.range=[a.offset,w,_.offset]}else m.range=[a.offset,w,w];return m}function xm(e,t,n,a,s,o){const c=n.type==="block-map"?iO(e,t,n,a,o):n.type==="block-seq"?aO(e,t,n,a,o):rO(e,t,n,a,o),f=c.constructor;return s==="!"||s===f.tagName?(c.tag=f.tagName,c):(s&&(c.tag=s),c)}function sO(e,t,n,a,s){var v;const o=a.tag,c=o?t.directives.tagName(o.source,x=>s(o,"TAG_RESOLVE_FAILED",x)):null;if(n.type==="block-seq"){const{anchor:x,newlineAfterProp:E}=a,w=x&&o?x.offset>o.offset?x:o:x??o;w&&(!E||E.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const f=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ii.tagName&&f==="map"||c===Sr.tagName&&f==="seq")return xm(e,t,n,s,c);let h=t.schema.tags.find(x=>x.tag===c&&x.collection===f);if(!h){const x=t.schema.knownTags[c];if((x==null?void 0:x.collection)===f)t.schema.tags.push(Object.assign({},x,{default:!1})),h=x;else return x?s(o,"BAD_COLLECTION_TYPE",`${x.tag} used for ${f} collection, but expects ${x.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),xm(e,t,n,s,c)}const m=xm(e,t,n,s,c,h),b=((v=h.resolve)==null?void 0:v.call(h,m,x=>s(o,"TAG_RESOLVE_FAILED",x),t.options))??m,g=jt(b)?b:new ze(b);return g.range=m.range,g.tag=c,h!=null&&h.format&&(g.format=h.format),g}function G1(e,t,n){const a=t.offset,s=lO(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?ze.BLOCK_FOLDED:ze.BLOCK_LITERAL,c=t.source?oO(t.source):[];let f=c.length;for(let w=c.length-1;w>=0;--w){const k=c[w][1];if(k===""||k==="\r")f=w;else break}if(f===0){const w=s.chomp==="+"&&c.length>0?`
419
- `.repeat(Math.max(1,c.length-1)):"";let k=a+s.length;return t.source&&(k+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,k,k]}}let h=t.indent+s.indent,m=t.offset+s.length,b=0;for(let w=0;w<f;++w){const[k,_]=c[w];if(_===""||_==="\r")s.indent===0&&k.length>h&&(h=k.length);else{k.length<h&&n(m+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(h=k.length),b=w,h===0&&!e.atRoot&&n(m,"BAD_INDENT","Block scalar values in collections must be indented");break}m+=k.length+_.length+1}for(let w=c.length-1;w>=f;--w)c[w][0].length>h&&(f=w+1);let g="",v="",x=!1;for(let w=0;w<b;++w)g+=c[w][0].slice(h)+`
420
- `;for(let w=b;w<f;++w){let[k,_]=c[w];m+=k.length+_.length+1;const A=_[_.length-1]==="\r";if(A&&(_=_.slice(0,-1)),_&&k.length<h){const j=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(m-_.length-(A?2:1),"BAD_INDENT",j),k=""}o===ze.BLOCK_LITERAL?(g+=v+k.slice(h)+_,v=`
421
- `):k.length>h||_[0]===" "?(v===" "?v=`
422
- `:!x&&v===`
423
- `&&(v=`
424
-
425
- `),g+=v+k.slice(h)+_,v=`
426
- `,x=!0):_===""?v===`
427
- `?g+=`
428
- `:v=`
429
- `:(g+=v+_,v=" ",x=!1)}switch(s.chomp){case"-":break;case"+":for(let w=f;w<c.length;++w)g+=`
430
- `+c[w][0].slice(h);g[g.length-1]!==`
431
- `&&(g+=`
432
- `);break;default:g+=`
433
- `}const E=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,E,E]}}function lO({offset:e,props:t},n,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let c=0,f="",h=-1;for(let v=1;v<s.length;++v){const x=s[v];if(!f&&(x==="-"||x==="+"))f=x;else{const E=Number(x);!c&&E?c=E:h===-1&&(h=e+v)}}h!==-1&&a(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let m=!1,b="",g=s.length;for(let v=1;v<t.length;++v){const x=t[v];switch(x.type){case"space":m=!0;case"newline":g+=x.source.length;break;case"comment":n&&!m&&a(x,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),g+=x.source.length,b=x.source.substring(1);break;case"error":a(x,"UNEXPECTED_TOKEN",x.message),g+=x.source.length;break;default:{const E=`Unexpected token in block scalar header: ${x.type}`;a(x,"UNEXPECTED_TOKEN",E);const w=x.source;w&&typeof w=="string"&&(g+=w.length)}}}return{mode:o,indent:c,chomp:f,comment:b,length:g}}function oO(e){const t=e.split(/\n( *)/),n=t[0],a=n.match(/^( *)/),o=[a!=null&&a[1]?[a[1],n.slice(a[1].length)]:["",n]];for(let c=1;c<t.length;c+=2)o.push([t[c],t[c+1]]);return o}function Q1(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let f,h;const m=(v,x,E)=>n(a+v,x,E);switch(s){case"scalar":f=ze.PLAIN,h=cO(o,m);break;case"single-quoted-scalar":f=ze.QUOTE_SINGLE,h=uO(o,m);break;case"double-quoted-scalar":f=ze.QUOTE_DOUBLE,h=fO(o,m);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+o.length,a+o.length]}}const b=a+o.length,g=Sc(c,b,t,n);return{value:h,type:f,comment:g.comment,range:[a,b,g.offset]}}function cO(e,t){let n="";switch(e[0]){case" ":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${e[0]}`;break}case"@":case"`":{n=`reserved character ${e[0]}`;break}}return n&&t(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`),Y1(e)}function uO(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),Y1(e.slice(1,-1)).replace(/''/g,"'")}function Y1(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
434
- `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
435
- `,"sy")}catch{t=/(.*?)[ \t]*\r?\n/sy,n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let a=t.exec(e);if(!a)return e;let s=a[1],o=" ",c=t.lastIndex;for(n.lastIndex=c;a=n.exec(e);)a[1]===""?o===`
436
- `?s+=o:o=`
437
- `:(s+=o+a[1],o=" "),c=n.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,a=f.exec(e),s+o+((a==null?void 0:a[1])??"")}function fO(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
438
- `))if(s===`
439
- `){const{fold:o,offset:c}=dO(e,a);n+=o,a=c}else if(s==="\\"){let o=e[++a];const c=hO[o];if(c)n+=c;else if(o===`
440
- `)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
441
- `)for(o=e[++a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];n+=mO(e,a+1,f,t),a+=f}else{const f=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),n+=f}}else if(s===" "||s===" "){const o=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
442
- `&&!(c==="\r"&&e[a+2]===`
443
- `)&&(n+=a>o?e.slice(o,a+1):s)}else n+=s}return(e[e.length-1]!=='"'||e.length===1)&&t(e.length,"MISSING_CHAR",'Missing closing "quote'),n}function dO(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
444
- `||a==="\r")&&!(a==="\r"&&e[t+2]!==`
445
- `);)a===`
446
- `&&(n+=`
447
- `),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const hO={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
448
- `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function mO(e,t,n,a){const s=e.substr(t,n),c=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(c)){const f=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function V1(e,t,n,a){const{value:s,type:o,comment:c,range:f}=t.type==="block-scalar"?G1(e,t,a):Q1(t,e.options.strict,a),h=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let m;e.options.stringKeys&&e.atKey?m=e.schema[Wi]:h?m=pO(e.schema,s,h,n,a):t.type==="scalar"?m=gO(e,s,t,a):m=e.schema[Wi];let b;try{const g=m.resolve(s,v=>a(n??t,"TAG_RESOLVE_FAILED",v),e.options);b=vt(g)?g:new ze(g)}catch(g){const v=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",v),b=new ze(s)}return b.range=f,b.source=s,o&&(b.type=o),h&&(b.tag=h),m.format&&(b.format=m.format),c&&(b.comment=c),b}function pO(e,t,n,a,s){var f;if(n==="!")return e[Wi];const o=[];for(const h of e.tags)if(!h.collection&&h.tag===n)if(h.default&&h.test)o.push(h);else return h;for(const h of o)if((f=h.test)!=null&&f.test(t))return h;const c=e.knownTags[n];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Wi])}function gO({atKey:e,directives:t,schema:n},a,s,o){const c=n.tags.find(f=>{var h;return(f.default===!0||e&&f.default==="key")&&((h=f.test)==null?void 0:h.test(a))})||n[Wi];if(n.compat){const f=n.compat.find(h=>{var m;return h.default&&((m=h.test)==null?void 0:m.test(a))})??n[Wi];if(c.tag!==f.tag){const h=t.tagString(c.tag),m=t.tagString(f.tag),b=`Value may be parsed as either ${h} or ${m}`;o(s,"TAG_RESOLVE_FAILED",b,!0)}}return c}function bO(e,t,n){if(t){n??(n=t.length);for(let a=n-1;a>=0;--a){let s=t[a];switch(s.type){case"space":case"comment":case"newline":e-=s.source.length;continue}for(s=t[++a];(s==null?void 0:s.type)==="space";)e+=s.source.length,s=t[++a];break}}return e}const yO={composeNode:X1,composeEmptyNode:rg};function X1(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:f,tag:h}=n;let m,b=!0;switch(t.type){case"alias":m=xO(e,t,a),(f||h)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":m=V1(e,t,h,a),f&&(m.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{m=sO(yO,e,t,n,a),f&&(m.anchor=f.source.substring(1))}catch(g){const v=g instanceof Error?g.message:String(g);a(t,"RESOURCE_EXHAUSTION",v)}break;default:{const g=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",g),b=!1}}return m??(m=rg(e,t.offset,void 0,null,n,a)),f&&m.anchor===""&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!vt(m)||typeof m.value!="string"||m.tag&&m.tag!=="tag:yaml.org,2002:str")&&a(h??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(m.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?m.comment=c:m.commentBefore=c),e.options.keepSourceTokens&&b&&(m.srcToken=t),m}function rg(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:f,end:h},m){const b={type:"scalar",offset:bO(t,n,a),indent:-1,source:""},g=V1(e,b,f,m);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&m(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=h),g}function xO({options:e},{offset:t,source:n,end:a},s){const o=new Uf(n.substring(1));o.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,f=Sc(a,c,e.strict,s);return o.range=[t,c,f.offset],f.comment&&(o.comment=f.comment),o}function vO(e,t,{offset:n,start:a,value:s,end:o},c){const f=Object.assign({_directives:t},e),h=new Pl(void 0,f),m={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},b=Ol(a,{indicator:"doc-start",next:s??(o==null?void 0:o[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});b.found&&(h.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!b.hasNewline&&c(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=s?X1(m,s,b,c):rg(m,b.end,a,null,b,c);const g=h.contents.range[2],v=Sc(o,g,!1,c);return v.comment&&(h.comment=v.comment),h.range=[n,g,v.offset],h}function Ho(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function Vv(e){var s;let t="",n=!1,a=!1;for(let o=0;o<e.length;++o){const c=e[o];switch(c[0]){case"#":t+=(t===""?"":a?`
449
-
450
- `:`
451
- `)+(c.substring(1)||" "),n=!0,a=!1;break;case"%":((s=e[o+1])==null?void 0:s[0])!=="#"&&(o+=1),n=!1;break;default:n||(a=!0),n=!1}}return{comment:t,afterEmptyLine:a}}class sg{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,a,s,o)=>{const c=Ho(n);o?this.warnings.push(new H1(c,a,s)):this.errors.push(new Jr(c,a,s))},this.directives=new Nn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=Vv(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
452
- ${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(Mt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];At(c)&&(c=c.key);const f=c.commentBefore;c.commentBefore=f?`${a}
453
- ${f}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
454
- ${c}`:a}}n?(Array.prototype.push.apply(t.errors,this.errors),Array.prototype.push.apply(t.warnings,this.warnings)):(t.errors=this.errors,t.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:Vv(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,a=-1){for(const s of t)yield*this.next(s);yield*this.end(n,a)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,a,s)=>{const o=Ho(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=vO(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,a=new Jr(Ho(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new Jr(Ho(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=Sc(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),n.comment){const a=this.doc.comment;this.doc.comment=a?`${a}
455
- ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Jr(Ho(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const a=Object.assign({_directives:this.directives},this.options),s=new Pl(void 0,a);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function EO(e,t=!0,n){if(e){const a=(s,o,c)=>{const f=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(f,o,c);else throw new Jr([f,f+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return Q1(e,t,a);case"block-scalar":return G1({options:{strict:t}},e,a)}}return null}function SO(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:o=-1,type:c="PLAIN"}=t,f=vc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),h=t.end??[{type:"newline",offset:-1,indent:a,source:`
456
- `}];switch(f[0]){case"|":case">":{const m=f.indexOf(`
457
- `),b=f.substring(0,m),g=f.substring(m+1)+`
458
- `,v=[{type:"block-scalar-header",offset:o,indent:a,source:b}];return W1(v,h)||v.push({type:"newline",offset:-1,indent:a,source:`
459
- `}),{type:"block-scalar",offset:o,indent:a,props:v,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:f,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:f,end:h};default:return{type:"scalar",offset:o,indent:a,source:f,end:h}}}function wO(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:o=!1,type:c}=n,f="indent"in e?e.indent:null;if(a&&typeof f=="number"&&(f+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const m=e.props[0];if(m.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=m.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const h=vc({type:c,value:t},{implicitKey:s||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":_O(e,h);break;case'"':vm(e,h,"double-quoted-scalar");break;case"'":vm(e,h,"single-quoted-scalar");break;default:vm(e,h,"scalar")}}function _O(e,t){const n=t.indexOf(`
460
- `),a=t.substring(0,n),s=t.substring(n+1)+`
461
- `;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=a,e.source=s}else{const{offset:o}=e,c="indent"in e?e.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:c,source:a}];W1(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
462
- `});for(const h of Object.keys(e))h!=="type"&&h!=="offset"&&delete e[h];Object.assign(e,{type:"block-scalar",indent:c,props:f,source:s})}}function W1(e,t){if(t)for(const n of t)switch(n.type){case"space":case"comment":e.push(n);break;case"newline":return e.push(n),!0}return!1}function vm(e,t,n){switch(e.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":e.type=n,e.source=t;break;case"block-scalar":{const a=e.props.slice(1);let s=t.length;e.props[0].type==="block-scalar-header"&&(s-=e.props[0].source.length);for(const o of a)o.offset+=s;delete e.props,Object.assign(e,{type:n,source:t,end:a});break}case"block-map":case"block-seq":{const s={type:"newline",offset:e.offset+t.length,indent:e.indent,source:`
463
- `};delete e.items,Object.assign(e,{type:n,source:t,end:[s]});break}default:{const a="indent"in e?e.indent:-1,s="end"in e&&Array.isArray(e.end)?e.end.filter(o=>o.type==="space"||o.type==="comment"||o.type==="newline"):[];for(const o of Object.keys(e))o!=="type"&&o!=="offset"&&delete e[o];Object.assign(e,{type:n,indent:a,source:t,end:s})}}}const kO=e=>"type"in e?_f(e):mf(e);function _f(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=_f(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=mf(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=mf(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=mf(e);if(e.end)for(const n of e.end)t+=n.source;return t}default:{let t=e.source;if("end"in e&&e.end)for(const n of e.end)t+=n.source;return t}}}function mf({start:e,key:t,sep:n,value:a}){let s="";for(const o of e)s+=o.source;if(t&&(s+=_f(t)),n)for(const o of n)s+=o.source;return a&&(s+=_f(a)),s}const mp=Symbol("break visit"),NO=Symbol("skip children"),Z1=Symbol("remove item");function us(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),J1(Object.freeze([]),e,t)}us.BREAK=mp;us.SKIP=NO;us.REMOVE=Z1;us.itemAtPath=(e,t)=>{let n=e;for(const[a,s]of t){const o=n==null?void 0:n[a];if(o&&"items"in o)n=o.items[s];else return}return n};us.parentCollection=(e,t)=>{const n=us.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=n==null?void 0:n[a];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function J1(e,t,n){let a=n(t,e);if(typeof a=="symbol")return a;for(const s of["key","value"]){const o=t[s];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const f=J1(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof f=="number")c=f-1;else{if(f===mp)return mp;f===Z1&&(o.items.splice(c,1),c-=1)}}typeof a=="function"&&s==="key"&&(a=a(t,e))}}return typeof a=="function"?a(t,e):a}const Yf="\uFEFF",Vf="",Xf="",cc="",TO=e=>!!e&&"items"in e,CO=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function AO(e){switch(e){case Yf:return"<BOM>";case Vf:return"<DOC>";case Xf:return"<FLOW_END>";case cc:return"<SCALAR>";default:return JSON.stringify(e)}}function eS(e){switch(e){case Yf:return"byte-order-mark";case Vf:return"doc-mode";case Xf:return"flow-error-end";case cc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
464
- `:case`\r
465
- `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(e[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}const OO=Object.freeze(Object.defineProperty({__proto__:null,BOM:Yf,DOCUMENT:Vf,FLOW_END:Xf,SCALAR:cc,createScalarToken:SO,isCollection:TO,isScalar:CO,prettyToken:AO,resolveAsScalar:EO,setScalarValue:wO,stringify:kO,tokenType:eS,visit:us},Symbol.toStringTag,{value:"Module"}));function Ai(e){switch(e){case void 0:case" ":case`
466
- `:case"\r":case" ":return!0;default:return!1}}const Xv=new Set("0123456789ABCDEFabcdef"),RO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Vu=new Set(",[]{}"),MO=new Set(` ,[]{}
467
- \r `),Em=e=>!e||MO.has(e);class tS{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(t,n=!1){if(t){if(typeof t!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+t:t,this.lineEndPos=null}this.atEnd=!n;let a=this.next??"stream";for(;a&&(n||this.hasChars(1));)a=yield*this.parseNext(a)}atLineEnd(){let t=this.pos,n=this.buffer[t];for(;n===" "||n===" ";)n=this.buffer[++t];return!n||n==="#"||n===`
468
- `?!0:n==="\r"?this.buffer[t+1]===`
469
- `:!1}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let n=this.buffer[t];if(this.indentNext>0){let a=0;for(;n===" ";)n=this.buffer[++a+t];if(n==="\r"){const s=this.buffer[a+t+1];if(s===`
470
- `||!s&&!this.atEnd)return t+a+1}return n===`
471
- `||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Ai(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;return(typeof t!="number"||t!==-1&&t<this.pos)&&(t=this.buffer.indexOf(`
472
- `,this.pos),this.lineEndPos=t),t===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[t-1]==="\r"&&(t-=1),this.buffer.substring(this.pos,t))}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=t,null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===Yf&&(yield*this.pushCount(1),t=t.substring(1)),t[0]==="%"){let n=t.length,a=t.indexOf("#");for(;a!==-1;){const o=t[a-1];if(o===" "||o===" "){n=a-1;break}else a=t.indexOf("#",a+1)}for(;;){const o=t[n-1];if(o===" "||o===" ")n-=1;else break}const s=(yield*this.pushCount(n))+(yield*this.pushSpaces(!0));return yield*this.pushCount(t.length-s),this.pushNewline(),"stream"}if(this.atLineEnd()){const n=yield*this.pushSpaces(!0);return yield*this.pushCount(t.length-n),yield*this.pushNewline(),"stream"}return yield Vf,yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const n=this.peek(3);if((n==="---"||n==="...")&&Ai(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,n==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!Ai(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[t,n]=this.peek(2);if(!n&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&Ai(n)){const a=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=a,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const t=this.getLine();if(t===null)return this.setNext("doc");let n=yield*this.pushIndicators();switch(t[n]){case"#":yield*this.pushCount(t.length-n);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Em),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return n+=yield*this.parseBlockScalarHeader(),n+=yield*this.pushSpaces(!0),yield*this.pushCount(t.length-n),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,n,a=-1;do t=yield*this.pushNewline(),t>0?(n=yield*this.pushSpaces(!1),this.indentValue=a=n):n=0,n+=yield*this.pushSpaces(!0);while(t+n>0);const s=this.getLine();if(s===null)return this.setNext("flow");if((a!==-1&&a<this.indentNext&&s[0]!=="#"||a===0&&(s.startsWith("---")||s.startsWith("..."))&&Ai(s[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Xf,yield*this.parseLineStart();let o=0;for(;s[o]===",";)o+=yield*this.pushCount(1),o+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(o+=yield*this.pushIndicators(),s[o]){case void 0:return"flow";case"#":return yield*this.pushCount(s.length-o),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Em),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Ai(c)||c===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let n=this.buffer.indexOf(t,this.pos+1);if(t==="'")for(;n!==-1&&this.buffer[n+1]==="'";)n=this.buffer.indexOf("'",n+2);else for(;n!==-1;){let o=0;for(;this.buffer[n-1-o]==="\\";)o+=1;if(o%2===0)break;n=this.buffer.indexOf('"',n+1)}const a=this.buffer.substring(0,n);let s=a.indexOf(`
473
- `,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
474
- `,o)}s!==-1&&(n=s-(a[s-1]==="\r"?2:1))}if(n===-1){if(!this.atEnd)return this.setNext("quoted-scalar");n=this.buffer.length}return yield*this.pushToIndex(n+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let t=this.pos;for(;;){const n=this.buffer[++t];if(n==="+")this.blockScalarKeep=!0;else if(n>"0"&&n<="9")this.blockScalarIndent=Number(n)-1;else if(n!=="-")break}return yield*this.pushUntil(n=>Ai(n)||n==="#")}*parseBlockScalar(){let t=this.pos-1,n=0,a;e:for(let o=this.pos;a=this.buffer[o];++o)switch(a){case" ":n+=1;break;case`
475
- `:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
476
- `)break}default:break e}if(!a&&!this.atEnd)return this.setNext("block-scalar");if(n>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=n:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const o=this.continueScalar(t+1);if(o===-1)break;t=this.buffer.indexOf(`
477
- `,o)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}let s=t+1;for(a=this.buffer[s];a===" ";)a=this.buffer[++s];if(a===" "){for(;a===" "||a===" "||a==="\r"||a===`
478
- `;)a=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let o=t-1,c=this.buffer[o];c==="\r"&&(c=this.buffer[--o]);const f=o;for(;c===" ";)c=this.buffer[--o];if(c===`
479
- `&&o>=this.pos&&o+1+n>f)t=o;else break}while(!0);return yield cc,yield*this.pushToIndex(t+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let n=this.pos-1,a=this.pos-1,s;for(;s=this.buffer[++a];)if(s===":"){const o=this.buffer[a+1];if(Ai(o)||t&&Vu.has(o))break;n=a}else if(Ai(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
480
- `?(a+=1,s=`
481
- `,o=this.buffer[a+1]):n=a),o==="#"||t&&Vu.has(o))break;if(s===`
482
- `){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&Vu.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield cc,yield*this.pushToIndex(n+1,!0),t?"flow":"doc")}*pushCount(t){return t>0?(yield this.buffer.substr(this.pos,t),this.pos+=t,t):0}*pushToIndex(t,n){const a=this.buffer.slice(this.pos,t);return a?(yield a,this.pos+=a.length,a.length):(n&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Em))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Ai(n)||t&&Vu.has(n))return t?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2,n=this.buffer[t];for(;!Ai(n)&&n!==">";)n=this.buffer[++t];return yield*this.pushToIndex(n===">"?t+1:t,!1)}else{let t=this.pos+1,n=this.buffer[t];for(;n;)if(RO.has(n))n=this.buffer[++t];else if(n==="%"&&Xv.has(this.buffer[t+1])&&Xv.has(this.buffer[t+2]))n=this.buffer[t+=3];else break;return yield*this.pushToIndex(t,!1)}}*pushNewline(){const t=this.buffer[this.pos];return t===`
483
- `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
484
- `?yield*this.pushCount(2):0}*pushSpaces(t){let n=this.pos-1,a;do a=this.buffer[++n];while(a===" "||t&&a===" ");const s=n-this.pos;return s>0&&(yield this.buffer.substr(this.pos,s),this.pos=n),s}*pushUntil(t){let n=this.pos,a=this.buffer[n];for(;!t(a);)a=this.buffer[++n];return yield*this.pushToIndex(n,!1)}}class nS{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,a=this.lineStarts.length;for(;n<a;){const o=n+a>>1;this.lineStarts[o]<t?n=o+1:a=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function ur(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function Wv(e){for(let t=0;t<e.length;++t)switch(e[t].type){case"space":case"comment":case"newline":break;default:return t}return-1}function iS(e){switch(e==null?void 0:e.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function Xu(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function il(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function Zv(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!ur(t.start,"explicit-key-ind")&&!ur(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,iS(t.value)?t.value.end?Array.prototype.push.apply(t.value.end,t.sep):t.value.end=t.sep:Array.prototype.push.apply(t.start,t.sep),delete t.sep)}class lg{constructor(t){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new tS,this.onNewLine=t}*parse(t,n=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const a of this.lexer.lex(t,n))yield*this.next(a);n||(yield*this.end())}*next(t){if(this.source=t,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=t.length;return}const n=eS(t);if(n)if(n==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=n,yield*this.step(),n){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+t.length);break;case"space":this.atNewLine&&t[0]===" "&&(this.indent+=t.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=t.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=t.length}else{const a=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:a,source:t}),this.offset+=t.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(t==null?void 0:t.type)!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const n=t??this.stack.pop();if(!n)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield n;else{const a=this.peek(1);switch(n.type==="block-scalar"?n.indent="indent"in a?a.indent:0:n.type==="flow-collection"&&a.type==="document"&&(n.indent=0),n.type==="flow-collection"&&Zv(n),a.type){case"document":a.value=n;break;case"block-scalar":a.props.push(n);break;case"block-map":{const s=a.items[a.items.length-1];if(s.value){a.items.push({start:[],key:n,sep:[]}),this.onKeyLine=!0;return}else if(s.sep)s.value=n;else{Object.assign(s,{key:n,sep:[]}),this.onKeyLine=!s.explicitKey;return}break}case"block-seq":{const s=a.items[a.items.length-1];s.value?a.items.push({start:[],value:n}):s.value=n;break}case"flow-collection":{const s=a.items[a.items.length-1];!s||s.value?a.items.push({start:[],key:n,sep:[]}):s.sep?s.value=n:Object.assign(s,{key:n,sep:[]});return}default:yield*this.pop(),yield*this.pop(n)}if((a.type==="document"||a.type==="block-map"||a.type==="block-seq")&&(n.type==="block-map"||n.type==="block-seq")){const s=n.items[n.items.length-1];s&&!s.sep&&!s.value&&s.start.length>0&&Wv(s.start)===-1&&(n.indent===0||s.start.every(o=>o.type!=="comment"||o.indent<n.indent))&&(a.type==="document"?a.end=s.start:a.items.push({start:s.start}),n.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&t.start.push(this.sourceToken),this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{Wv(t.start)!==-1?(yield*this.pop(),yield*this.step()):t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const n=this.startBlockValue(t);n?this.stack.push(n):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(t){if(this.type==="map-value-ind"){const n=Xu(this.peek(2)),a=il(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
485
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
486
- `,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,o=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&n.sep&&!n.value){const f=[];for(let h=0;h<n.sep.length;++h){const m=n.sep[h];switch(m.type){case"newline":f.push(h);break;case"space":break;case"comment":m.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=n.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(c.push(this.sourceToken),t.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ur(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(iS(n.key)&&!ur(n.sep,"newline")){const f=il(n.start),h=n.key,m=n.sep;m.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:h,sep:m}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(ur(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const f=il(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):ur(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||n.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(f):(Object.assign(n,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!n.explicitKey&&n.sep&&!ur(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||ur(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while((a==null?void 0:a.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const a=this.startBlockValue(t);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===t.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const s=Xu(a),o=il(s);Zv(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const f={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
487
- `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
488
- `,n)+1}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const n=Xu(t),a=il(n);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Xu(t),a=il(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function aS(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new nS||null,prettyErrors:t}}function jO(e,t={}){const{lineCounter:n,prettyErrors:a}=aS(t),s=new lg(n==null?void 0:n.addNewLine),o=new sg(t),c=Array.from(o.compose(s.parse(e)));if(a&&n)for(const f of c)f.errors.forEach(wf(e,n)),f.warnings.forEach(wf(e,n));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function rS(e,t={}){const{lineCounter:n,prettyErrors:a}=aS(t),s=new lg(n==null?void 0:n.addNewLine),o=new sg(t);let c=null;for(const f of o.compose(s.parse(e),!0,e.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new Jr(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(wf(e,n)),c.warnings.forEach(wf(e,n))),c}function DO(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=rS(e,n);if(!s)return null;if(s.warnings.forEach(o=>w1(s.options.logLevel,o)),s.errors.length>0){if(s.options.logLevel!=="silent")throw s.errors[0];s.errors=[]}return s.toJS(Object.assign({reviver:a},n))}function LO(e,t,n){let a=null;if(typeof t=="function"||Array.isArray(t)?a=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return hs(e)&&!a?e.toString(n):new Pl(e,a,n).toString(n)}const Jv=Object.freeze(Object.defineProperty({__proto__:null,Alias:Uf,CST:OO,Composer:sg,Document:Pl,Lexer:tS,LineCounter:nS,Pair:gn,Parser:lg,Scalar:ze,Schema:P1,YAMLError:ag,YAMLMap:ii,YAMLParseError:Jr,YAMLSeq:Sr,YAMLWarning:H1,isAlias:kr,isCollection:Mt,isDocument:hs,isMap:Bl,isNode:jt,isPair:At,isScalar:vt,isSeq:Ul,parse:DO,parseAllDocuments:jO,parseDocument:rS,stringify:LO,visit:ms,visitAsync:Bf},Symbol.toStringTag,{value:"Module"}));function IO({projectName:e,file:t,onClose:n,onSaved:a}){const s=qn(),{alert:o}=si(),{data:c,isLoading:f,isError:h,error:m,refetch:b}=st({queryKey:["pipeline-file",e,t],queryFn:()=>lA(e,t)}),[g,v]=O.useState("structured"),[x,E]=O.useState(null),[w,k]=O.useState(null);O.useEffect(()=>{c&&x===null&&(E(c.content),k(c.etag),c.parseError&&v("yaml"))},[c,x]),O.useEffect(()=>{const M=q=>{q.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const _=Pn({mutationFn:()=>{if(x===null||w===null)throw new Error("no draft");return oA(e,t,x,w)},onSuccess:M=>{k(M.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:M=>{const q=M.status;o({title:q===409?"文件已被其他地方修改":q===422?"YAML 语法错":"保存失败",body:M instanceof Error?M.message:String(M)})}}),A=x!==null&&c&&x!==c.content,{parsed:T,parseError:j}=O.useMemo(()=>{if(x===null)return{parsed:null,parseError:null};try{return{parsed:Jv.parse(x)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[x]),F=M=>{try{const q=Jv.stringify(M,{lineWidth:0});E(q)}catch(q){o({title:"YAML 序列化失败",body:q instanceof Error?q.message:String(q)})}};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[d.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[d.jsx(Fv,{size:20,strokeWidth:2.5}),d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(c==null?void 0:c.isActive)&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,w&&` · etag ${w}`]})]}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:d.jsx(Xi,{size:14,strokeWidth:3})})]}),f&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),h&&d.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",m instanceof Error?m.message:String(m)]}),c&&x!==null&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[d.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[d.jsxs("button",{type:"button",onClick:()=>v("structured"),"aria-pressed":g==="structured",disabled:!!j,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",j?"opacity-50 cursor-not-allowed":""].join(" "),title:j??void 0,children:[d.jsx(Hp,{size:11,strokeWidth:2.5}),"结构化"]}),d.jsxs("button",{type:"button",onClick:()=>v("yaml"),"aria-pressed":g==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(Fv,{size:11,strokeWidth:2.5}),"原始 YAML"]})]}),j&&d.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[d.jsx(rc,{size:12,strokeWidth:2.5}),"YAML parse: ",j]}),(c==null?void 0:c.isActive)&&d.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效"})]}),d.jsxs("div",{className:"flex-1 overflow-auto",children:[g==="structured"&&T&&d.jsx(zO,{parsed:T,onChange:F}),g==="yaml"&&d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:x,onChange:M=>E(M.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),d.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:A?d.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):_.isSuccess?d.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[d.jsx(If,{size:12,strokeWidth:2.5})," 已保存"]}):"无变化"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{E(null),b()},disabled:_.isPending,type:"button",children:"重新加载"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>_.mutate(),disabled:!A||_.isPending,type:"button","aria-label":"保存 pipeline",children:[_.isPending?d.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(zf,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function zO({parsed:e,onChange:t}){const n=e.stages??[],a=h=>{t({...e,stages:h})},s=()=>{a([...n,{name:`stage-${n.length+1}`,on_complete:"move_card Done"}])},o=h=>{a(n.filter((m,b)=>b!==h))},c=(h,m)=>{const b=[...n],g=h+m;g<0||g>=b.length||([b[h],b[g]]=[b[g],b[h]],a(b))},f=(h,m)=>{a(n.map((b,g)=>g===h?{...b,...m}:b))};return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("span",{className:"font-bold",children:"mode:"}),d.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:h=>t({...e,mode:h.target.value}),children:[d.jsx("option",{value:"project",children:"project"}),d.jsx("option",{value:"steps",children:"steps"})]})]}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"project = 事件驱动流水线(默认) · steps = 顺序脚本"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",n.length,")"]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:s,"aria-label":"添加 stage",children:[d.jsx(Di,{size:11,strokeWidth:3})," 添加 stage"]})]}),n.length===0?d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没 stage。点"添加 stage"开始。'}):d.jsx("div",{className:"flex flex-col gap-3",children:n.map((h,m)=>d.jsx(BO,{stage:h,index:m,total:n.length,onChange:b=>f(m,b),onRemove:()=>o(m),onMoveUp:()=>c(m,-1),onMoveDown:()=>c(m,1)},m))})]})]})}function BO({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:o,onMoveDown:c}){const f=e.on_fail??{};return d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&d.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),d.jsxs("div",{className:"flex gap-1",children:[d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":"上移",children:d.jsx(O2,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":"下移",children:d.jsx(xc,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":"删除 stage",children:d.jsx(Il,{size:12,strokeWidth:3})})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[d.jsx(lr,{label:"name",hint:"stage 唯一名",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:h=>a({name:h.target.value}),placeholder:"develop"})}),d.jsx(lr,{label:"profile",hint:"skill 画像,可空",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:h=>a({profile:h.target.value||void 0}),placeholder:"fullstack"})}),d.jsx(lr,{label:"card_state",hint:"本 stage 期间卡片状态",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:h=>a({card_state:h.target.value||void 0}),placeholder:"Inprogress"})}),d.jsx(lr,{label:"timeout",hint:"可选,如 30m 2h",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:h=>a({timeout:h.target.value||void 0}),placeholder:"2h"})}),d.jsx(lr,{label:"trigger",hint:"触发条件,可空走默认",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:h=>a({trigger:h.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),d.jsx(lr,{label:"on_complete",hint:"成功后动作",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:h=>a({on_complete:h.target.value}),placeholder:"move_card Done"})})]}),d.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[d.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[d.jsx(lr,{label:"action",hint:"失败时动作,如 label NEEDS-FIX",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:h=>a({on_fail:{...f,action:h.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),d.jsx(lr,{label:"comment",hint:"写进卡片的注释",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:h=>a({on_fail:{...f,comment:h.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),d.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:h=>a({on_fail:{...f,halt:h.target.checked}})}),d.jsx("span",{className:"font-bold",children:"halt"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(失败后停流水线;去掉则继续下一张卡)"})]})]})]})}function lr({label:e,hint:t,children:n}){return d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&d.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function UO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[o,c]=O.useState(""),[f,h]=O.useState("blank");O.useEffect(()=>{const x=E=>{E.key==="Escape"&&e()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[e]);const m=o.trim(),b=m.endsWith(".yaml")?m:m?`${m}.yaml`:"",g=b&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(b),v=()=>{!g||s||t(b,f)};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsxs("header",{className:"flex items-start justify-between mb-4",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"新建 pipeline"}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":"关闭",children:d.jsx(Xi,{size:14,strokeWidth:3})})]}),d.jsxs("form",{onSubmit:x=>{x.preventDefault(),v()},className:"flex flex-col gap-4",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:"文件名"}),d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如 ci",value:o,onChange:x=>c(x.target.value),autoFocus:!0}),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["实际会保存为 ",d.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:b||"xxx.yaml"}),"。 只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。"]})]}),d.jsxs("fieldset",{className:"flex flex-col gap-2",children:[d.jsx("legend",{className:"text-sm font-bold mb-1",children:"初始内容"}),d.jsx(Sm,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:h}),d.jsx(Sm,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:h,disabled:!a,disabledReason:"sample.yaml.example 不存在"}),d.jsx(Sm,{value:"active",current:f,label:"复制当前活动的",desc:"从 project.yaml 复制(基于目前的配置改)",onSelect:h,disabled:!n,disabledReason:"project.yaml 不存在"})]}),d.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[d.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!g||s,"aria-label":"创建 pipeline",children:[s?d.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(Di,{size:13,strokeWidth:3}),"创建"]})]})]})]})})}function Sm({value:e,current:t,label:n,desc:a,onSelect:s,disabled:o,disabledReason:c}){const f=t===e;return d.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":f?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:f,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:n}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function $O(){var o;const{name:e=""}=$E(),t=wr(),[n,a]=O.useState("overview"),s=st({queryKey:["project",e],queryFn:()=>eA(e),enabled:!!e});return d.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[d.jsx(XE,{size:14,strokeWidth:3}),"返回"]}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),d.jsx(ds,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"看板"})]}),d.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[d.jsx(Wu,{current:n,value:"overview",onSelect:a,icon:G2,children:"概览"}),d.jsx(Wu,{current:n,value:"config",onSelect:a,icon:t1,children:"配置"}),d.jsx(Wu,{current:n,value:"pipelines",onSelect:a,icon:r1,children:"Pipelines"}),d.jsx(Wu,{current:n,value:"danger",onSelect:a,icon:Il,children:"危险操作"})]}),n==="overview"&&d.jsx(FO,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&d.jsx(PO,{name:e}),n==="pipelines"&&d.jsx(qO,{name:e}),n==="danger"&&d.jsx(HO,{name:e,repoDir:((o=s.data)==null?void 0:o.repoDir)??null})]})}function Wu({current:e,value:t,onSelect:n,icon:a,children:s}){const o=e===t;return d.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[d.jsx(a,{size:13,strokeWidth:2.5}),s]})}function FO({name:e,data:t,loading:n}){return n?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):t?d.jsx("div",{className:"nb-card",children:d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"仓库路径"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),d.jsx("dt",{className:"font-bold",children:"PM 后端"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),d.jsx("dt",{className:"font-bold",children:"Agent"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),d.jsx("dt",{className:"font-bold",children:"卡片"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," 张 · ",t.cards.inprogress," 进行中 · ",t.cards.done," 完成"]}),d.jsx("dt",{className:"font-bold",children:"Worker"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," 个(",t.workers.active," 活跃)"]}),d.jsx("dt",{className:"font-bold",children:"Pipeline"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),d.jsx("dt",{className:"font-bold",children:"最近活动"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsxs("p",{children:["项目 ",e," 不存在或无法读取。"]})})}function PO({name:e}){const t=qn(),{alert:n}=si(),{data:a,isLoading:s,isError:o,error:c,refetch:f}=st({queryKey:["project-conf",e],queryFn:()=>nA(e)}),[h,m]=O.useState(null),[b,g]=O.useState(null);O.useEffect(()=>{a&&h===null&&(m(a.content),g(a.etag))},[a,h]);const v=h!==null&&a!==void 0&&h!==a.content,x=Pn({mutationFn:()=>{if(h===null||b===null)throw new Error("no draft");return iA(e,h,b)},onSuccess:E=>{g(E.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:E=>{const w=E.status;n({title:w===409?"配置已被其他地方修改":"保存失败",body:w===409?'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。':E instanceof Error?E.message:String(E)})}});return s?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):o?d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsxs("p",{children:["加载失败: ",c instanceof Error?c.message:String(c)]})}):d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:d.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),b&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",b]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{m(null),f()},disabled:x.isPending,"aria-label":"重新加载",children:[d.jsx(Cl,{size:13,strokeWidth:2.5}),"重新加载"]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>x.mutate(),disabled:!v||x.isPending,"aria-label":"保存配置",children:[x.isPending?d.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):x.isSuccess&&!v?d.jsx(N2,{size:13,strokeWidth:3}):d.jsx(zf,{size:13,strokeWidth:3}),"保存"]})]})]}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:h??"",onChange:E=>m(E.target.value),spellCheck:!1,"aria-label":"conf 文件编辑器"}),v&&d.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● 未保存的修改"})]})}function qO({name:e}){const t=qn(),{confirm:n,alert:a}=si(),{data:s,isLoading:o}=st({queryKey:["project-pipelines",e],queryFn:()=>rA(e)}),[c,f]=O.useState(null),[h,m]=O.useState(!1),b=Pn({mutationFn:E=>sA(e,E),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:E=>{a({title:"切换失败",body:E instanceof Error?E.message:String(E)})}}),g=Pn({mutationFn:E=>uA(e,E),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:E=>{a({title:"删除失败",body:E instanceof Error?E.message:String(E)})}}),v=Pn({mutationFn:E=>cA(e,E.name,E.template),onSuccess:E=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),m(!1),f(E.name)},onError:E=>{a({title:"创建失败",body:E instanceof Error?E.message:String(E)})}});if(o)return d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})});const x=[];s!=null&&s.active&&x.push({name:s.active,isActive:!0});for(const E of(s==null?void 0:s.available)??[])x.push({name:E.name,isActive:!1});return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>m(!0),disabled:v.isPending,"aria-label":"新建 pipeline",children:[d.jsx(Di,{size:12,strokeWidth:3}),"新建 pipeline"]})]}),x.length===0?d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没有 pipeline 文件。点"新建 pipeline"开始。'}):d.jsx("ul",{className:"flex flex-col gap-2",children:x.map(E=>d.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsx(r1,{size:16,strokeWidth:2.5}),d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:E.name}),E.isActive&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),d.jsxs("div",{className:"flex gap-1",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(E.name),"aria-label":`编辑 ${E.name}`,children:[d.jsx(Kp,{size:11,strokeWidth:2.5}),"编辑"]}),!E.isActive&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`切换到 ${E.name}`,body:`当前 project.yaml 会被 ${E.name} 的内容覆盖。继续?`,confirm:"切换"})&&b.mutate(E.name)},disabled:b.isPending,"aria-label":`切换到 ${E.name}`,children:"切换"}),d.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`删除 ${E.name}`,body:"这个 pipeline 文件会被永久删除。",confirm:"删除",danger:!0})&&g.mutate(E.name)},disabled:g.isPending,"aria-label":`删除 ${E.name}`,children:d.jsx(Il,{size:11,strokeWidth:2.5})})]})]})]},E.name))})]}),c&&d.jsx(IO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),h&&d.jsx(UO,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:v.isPending,onCancel:()=>m(!1),onCreate:(E,w)=>v.mutate({name:E,template:w})})]})}function HO({name:e,repoDir:t}){const n=wr(),a=qn(),{alert:s}=si(),[o,c]=O.useState(""),[f,h]=O.useState(!0),m=Pn({mutationFn:()=>aA(e,{includeClaudeDir:f}),onSuccess:b=>{a.invalidateQueries({queryKey:["projects"]});const g=b.claudeRemoved.filter(v=>v.ok).map(v=>v.path);s({title:"已删除",body:g.length>0?`项目已删除。同时清理了:
489
- ${g.join(`
490
- `)}`:"项目已删除。"}).then(()=>n("/projects"))},onError:b=>{s({title:"删除失败",body:b instanceof Error?b.message:String(b)})}});return d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:"删除项目"}),d.jsxs("p",{className:"text-sm mb-4",children:["这会清理 ",d.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),"(包括所有卡片、runtime、logs)。"]}),t&&d.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f,onChange:b=>h(b.target.checked),className:"mt-0.5"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:"同时清理 repo 的 .claude/"}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:"repo 本身不动,只清这个目录。"})]})]}),d.jsx("div",{className:"mb-4",children:d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsxs("span",{className:"text-sm font-bold",children:["输入项目名 ",d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," 确认:"]}),d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:o,onChange:b=>c(b.target.value),placeholder:e})]})}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:o!==e||m.isPending,onClick:()=>m.mutate(),"aria-label":"永久删除项目",children:[m.isPending?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(Il,{size:14,strokeWidth:3}),"永久删除"]})]})}function og(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return $t(`/api/skills${t}`)}function KO(e){return $t(`/api/skills/${encodeURIComponent(e)}`)}function GO(e,t){return $t(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Wf(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function QO(e,t){return Wf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function YO(e,t){return fetch(`/api/skills/${encodeURIComponent(e)}/link?project=${encodeURIComponent(t)}`,{method:"DELETE"}).then(n=>{if(!n.ok)throw new Error(`${n.status}`);return n.json()})}function VO(e,t){return Wf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function XO(e,t){return Wf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function WO(){return Wf("/api/skills/sync")}function ZO({project:e,isPending:t,onCancel:n,onCreate:a}){var A;const[s,o]=O.useState(""),[c,f]=O.useState(""),[h,m]=O.useState(new Set),[b,g]=O.useState(!0),v=st({queryKey:["skills-all",e],queryFn:()=>og(e)});O.useEffect(()=>{const T=j=>{j.key==="Escape"&&n()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n]);const E=s.trim().length>0&&s.trim().length<=200&&!t,w=T=>{const j=new Set(h);j.has(T)?j.delete(T):j.add(T),m(j)},k=()=>{E&&a({title:s.trim(),description:c.trim(),skills:[...h],labels:b?["AI-PIPELINE"]:[]})},_=((A=v.data)==null?void 0:A.data)??[];return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[d.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:"新建卡片"}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:d.jsx(Xi,{size:14,strokeWidth:3})})]}),d.jsxs("form",{onSubmit:T=>{T.preventDefault(),k()},className:"flex flex-col gap-4 overflow-auto",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:"标题 *"}),d.jsx("input",{type:"text",className:"nb-input w-full",placeholder:"例如:接入 GitHub OAuth 登录",value:s,onChange:T=>o(T.target.value),maxLength:200,autoFocus:!0,required:!0}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"写简短明了的目标(<200 字符)"})]}),d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:"描述"}),d.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容",value:c,onChange:T=>f(T.target.value)}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。"})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm font-bold",children:"Skills"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。"}),v.isLoading&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),v.isError&&d.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",v.error instanceof Error?v.error.message:String(v.error)]}),_.length>0&&d.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(T=>{const j=h.has(T.name);return d.jsx("button",{type:"button",onClick:()=>w(T.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",j?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":j,children:T.name},T.name)})}),h.size>0&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["已选 ",h.size," 个:",[...h].join(", ")]})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm font-bold",children:"流水线"}),d.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[d.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:b,onChange:T=>g(T.target.checked)}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:"加入流水线(`AI-PIPELINE` 标签)"}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:"打开后 pipeline 会识别这张卡并派 worker 跑。关闭则只是一个普通 todo,需要人工改标签才会被流水线拾起。"})]})]})]})]}),d.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:k,disabled:!E,type:"button","aria-label":"创建卡片",children:[t?d.jsx(Ut,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(Di,{size:13,strokeWidth:3}),"创建"]})]})]})})}function JO(e){return $t(`/api/projects/${encodeURIComponent(e)}/cards`)}function eR(e,t){return $t(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function ql(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const a=await n.text();throw new Error(`${n.status} ${n.statusText}: ${a}`)}return n.json().catch(()=>({}))}function tR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function nR(e,t){const n=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"DELETE"});if(!n.ok){const a=await n.text();throw new Error(`${n.status}: ${a}`)}}function iR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function aR(e,t){const n=typeof t=="string"?{title:t}:t;return ql(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function rR(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({state:n})});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}}async function sR(e,t,n){const a=await fetch(`/api/projects/${encodeURIComponent(e)}/cards/${t}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(n)});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return a.json()}function lR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function oR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function cR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function uR(e){const t=qn();O.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const h=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",h.project]}),t.invalidateQueries({queryKey:["card",h.project,h.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const h=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",h.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const h=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",h.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.moved",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),a.addEventListener("pipeline.started",c),a.addEventListener("pipeline.stopped",c),()=>a.close()},[e,t])}const fR=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),dR=new Set(["frontend","backend","mobile","database","devops"]),hR=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),mR=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function pR(e){return fR.has(e)?"lang":dR.has(e)?"end":hR.has(e)?"persona":mR.has(e)?"workflow":"other"}const gR={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function sS({name:e}){const t=gR[pR(e)];return d.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function lS({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return d.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function bR({card:e,onClick:t,done:n,draggable:a}){const s=e.labels.some(o=>o.startsWith("STARTED-"))&&!n;return d.jsxs("article",{onClick:t,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t())},draggable:a,onDragStart:o=>{o.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),o.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",a?"active:cursor-grabbing":""].join(" "),children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),s&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),d.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&d.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(o=>d.jsx(sS,{name:o},o)),e.labels.filter(o=>o==="NEEDS-FIX").map(o=>d.jsx(lS,{label:o,kind:"warn"},o))]}),e.checklist&&e.checklist.total>0&&d.jsx(yR,{stats:e.checklist}),d.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[d.jsx("span",{children:xR(e.updatedAt??e.createdAt)}),e.branch&&d.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function yR({stats:e}){return d.jsxs("div",{className:"mb-2",children:[d.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[d.jsxs("span",{className:"font-bold",children:["检查清单 ",e.done,"/",e.total]}),d.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),d.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:d.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),d.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((t,n)=>d.jsxs("li",{className:`flex items-start gap-1 ${t.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{className:"flex-shrink-0 mt-0.5",children:t.done?"✓":"○"}),d.jsx("span",{className:"line-clamp-1",children:t.text})]},n)),e.items.length>3&&d.jsxs("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:["… 还有 ",e.items.length-3," 条"]})]})]})}function xR(e){if(!e)return"—";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()}function vR({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[o,c]=O.useState(!1);return d.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const h=f.dataTransfer.getData("application/x-sps-card-seq"),m=Number.parseInt(h,10);Number.isFinite(m)&&(f.preventDefault(),s(m))},children:[d.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[d.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),d.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>d.jsx(bR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function pp(e,t){if(!e)return"";const n=e.split(`
491
- `),a=new RegExp(`^##\\s+${t}\\s*$`),s=n.findIndex(c=>a.test(c));if(s===-1)return"";let o=n.length;for(let c=s+1;c<n.length;c++)if(/^##\s+/.test(n[c]??"")){o=c;break}return n.slice(s+1,o).join(`
492
- `).trim()}function wm(e){return pp(e,"描述")}function ER({project:e,seq:t,onClose:n,onChanged:a}){var U,ae,G,he,R,L,Z,C,pe,_e,ve;const s=qn(),{confirm:o,alert:c}=si(),{data:f,isLoading:h,isError:m,error:b,refetch:g}=st({queryKey:["card",e,t],queryFn:()=>eR(e,t)}),[v,x]=O.useState(!1),[E,w]=O.useState(""),[k,_]=O.useState(""),[A,T]=O.useState(new Set),[j,F]=O.useState([]),[M,q]=O.useState(""),K=st({queryKey:["skills-all",e],queryFn:()=>og(e),enabled:v}),D=((ae=(U=st({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}).data)==null?void 0:U.data.find(ce=>ce.name===e))==null?void 0:ae.pipelineStatus)==="running";O.useEffect(()=>{v&&f&&(w(f.title),_(wm(f.body)),T(new Set(f.skills)),F([...f.labels]))},[v,f]),O.useEffect(()=>{const ce=ke=>{ke.key==="Escape"&&(v?x(!1):n())};return window.addEventListener("keydown",ce),()=>window.removeEventListener("keydown",ce)},[n,v]);const P=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const ce={},ke=E.trim();ke&&ke!==f.title&&(ce.title=ke);const Ke=wm(f.body);k!==Ke&&(ce.description=k);const Dt=[...A].sort(),yn=[...f.skills].sort();return JSON.stringify(Dt)!==JSON.stringify(yn)&&(ce.skills=Dt),JSON.stringify(j)!==JSON.stringify(f.labels)&&(ce.labels=j),Object.keys(ce).length===0?Promise.resolve({ok:!0,noop:!0}):sR(e,t,ce)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),x(!1),a()},onError:ce=>{c({title:"保存失败",body:ce instanceof Error?ce.message:String(ce)})}}),J=O.useMemo(()=>{if(!v||!f)return!1;if(E.trim()!==f.title||k!==wm(f.body))return!0;const ce=[...A].sort(),ke=[...f.skills].sort();return JSON.stringify(ce)!==JSON.stringify(ke)||JSON.stringify(j)!==JSON.stringify(f.labels)},[v,f,E,k,A,j]),re=ce=>{const ke=new Set(A);ke.has(ce)?ke.delete(ce):ke.add(ce),T(ke)},Q=()=>{const ce=M.trim();if(ce){if(j.includes(ce)){q("");return}F([...j,ce]),q("")}},Y=ce=>{F(j.filter(ke=>ke!==ce))};return d.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(f==null?void 0:f.state)&&d.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:f.state}),v&&d.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:"⚠ 编辑中"})]}),v?d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:E,onChange:ce=>w(ce.target.value),maxLength:200,"aria-label":"卡片标题"}):d.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(f==null?void 0:f.title)??"加载中…"})]}),d.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!v&&f&&d.jsxs("button",{onClick:()=>x(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":"编辑卡片",children:[d.jsx(Kp,{size:12,strokeWidth:2.5})," 编辑"]}),d.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:d.jsx(Xi,{size:14,strokeWidth:3})})]})]}),h&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),m&&d.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",b instanceof Error?b.message:String(b)]}),f&&d.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!v&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(Z2,{size:14}),d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),v?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),K.isLoading&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),K.data&&K.data.data.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1.5",children:K.data.data.map(ce=>{const ke=A.has(ce.name);return d.jsx("button",{type:"button",onClick:()=>re(ce.name),"aria-pressed":ke,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ke?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),children:ce.name},ce.name)})})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),d.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[j.map(ce=>d.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[ce,d.jsx("button",{type:"button",onClick:()=>Y(ce),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${ce}`,children:d.jsx(Xi,{size:10,strokeWidth:3})})]},ce)),d.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:M,onChange:ce=>q(ce.target.value),onKeyDown:ce=>{ce.key==="Enter"&&!ce.nativeEvent.isComposing&&(ce.preventDefault(),Q())}}),M&&d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:Q,"aria-label":"添加 label",children:d.jsx(Di,{size:10,strokeWidth:3})})]}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):d.jsxs(d.Fragment,{children:[f.skills.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(ce=>d.jsx(sS,{name:ce},ce))})]}),f.labels.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(ce=>d.jsx(lS,{label:ce,kind:ce==="NEEDS-FIX"?"warn":"default"},ce))})]})]}),v?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:k,onChange:ce=>_(ce.target.value),"aria-label":"卡片描述"}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),(((C=f.checklist)==null?void 0:C.total)??0)>0&&d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[d.jsx("div",{className:"flex items-center justify-between mb-2",children:d.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",((pe=f.checklist)==null?void 0:pe.done)??0,"/",((_e=f.checklist)==null?void 0:_e.total)??0]})}),d.jsx("ul",{className:"text-sm space-y-1",children:(((ve=f.checklist)==null?void 0:ve.items)??[]).map((ce,ke)=>d.jsxs("li",{className:`flex items-start gap-2 ${ce.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{children:ce.done?"✓":"○"}),d.jsx("span",{children:ce.text})]},ke))})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:pp(f.body,"描述")||"(空)"})]}),d.jsxs("div",{children:[d.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["检查清单 ",d.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((G=f.checklist)==null?void 0:G.done)??0,"/",((he=f.checklist)==null?void 0:he.total)??0]})]}),d.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((R=f.checklist)==null?void 0:R.total)??0)>0?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex items-center justify-end mb-2",children:d.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:d.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((L=f.checklist)==null?void 0:L.percent)??0}%`}})})}),d.jsx("ul",{className:"text-sm space-y-1",children:(((Z=f.checklist)==null?void 0:Z.items)??[]).map((ce,ke)=>d.jsxs("li",{className:`flex items-start gap-2 ${ce.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{children:ce.done?"✓":"○"}),d.jsx("span",{children:ce.text})]},ke))})]}):d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["暂无清单项。在描述里用 ",d.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:"- [ ] 项"})," 语法添加。"]})})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"日志"}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:pp(f.body,"日志")||"(空)"})]})]}),d.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:v?d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{x(!1),g()},disabled:P.isPending,children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>P.mutate(),disabled:!J||!E.trim()||P.isPending,"aria-label":"保存卡片修改",children:[P.isPending?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(zf,{size:14,strokeWidth:3}),"保存"]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||D,title:f.state==="Done"?"卡片已完成;先拖回 Todo 再启动":D?"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动":void 0,onClick:async()=>{try{await iR(e,t),a()}catch(ce){c({title:"启动 worker 失败",body:ce instanceof Error?ce.message:String(ce)})}},children:[d.jsx(Gp,{size:14,strokeWidth:3}),"启动 worker"]}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await o({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0}))try{await tR(e,t),a(),n()}catch(ke){c({title:"重置失败",body:ke instanceof Error?ke.message:String(ke)})}},children:[d.jsx(e1,{size:14,strokeWidth:2.5}),"重置卡片"]}),d.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await o({title:`删除卡片 #${t}`,body:`即将删除 "${f.title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?`,confirm:"继续",danger:!0})||!await o({title:"最终确认",body:`请再次确认删除卡片 #${t}。`,confirm:"确定删除",danger:!0})))try{await nR(e,t),a(),n()}catch(Ke){c({title:"删除失败",body:Ke instanceof Error?Ke.message:String(Ke)})}},"aria-label":"删除卡片",children:[d.jsx(Il,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function SR({current:e,onChange:t}){const[n,a]=O.useState(!1),s=O.useRef(null),{data:o}=st({queryKey:["projects"],queryFn:_r});return O.useEffect(()=>{const c=f=>{var h;(h=s.current)!=null&&h.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),d.jsxs("div",{className:"relative",ref:s,children:[d.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,d.jsx(xc,{size:14,strokeWidth:2.5})]}),n&&o&&d.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)] overflow-hidden",children:o.data.map(c=>d.jsxs("button",{type:"button",onClick:()=>{t(c.name),a(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold",c.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),d.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const wR=[{state:"Planning",label:"Planning",bg:"var(--color-accent-purple)"},{state:"Backlog",label:"Backlog",bg:"var(--color-bg-cream)"},{state:"Todo",label:"Todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-secondary)"},{state:"QA",label:"QA / Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}],oS="sps-console:last-board-project";function _R(){if(typeof window>"u")return null;try{return localStorage.getItem(oS)}catch{return null}}function kR(e){if(!(typeof window>"u"))try{localStorage.setItem(oS,e)}catch{}}function NR(){var Y,U,ae;const[e,t]=YE(),n=e.get("project"),[a,s]=O.useState(null),[o,c]=O.useState(""),[f,h]=O.useState(()=>new Set),[m,b]=O.useState(()=>new Set),{confirm:g,alert:v}=si();uR(n);const x=st({queryKey:["projects"],queryFn:_r}),E=st({queryKey:["cards",n],queryFn:()=>JO(n??""),enabled:!!n}),w=qn(),k=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},_=G=>{t({project:G})};O.useEffect(()=>{var he;if(n){kR(n);return}const G=_R();G&&((he=x.data)!=null&&he.data.some(R=>R.name===G))&&t({project:G},{replace:!0})},[n,x.data,t]);const A=Pn({mutationFn:()=>lR(n),onSuccess:()=>{k()},onError:G=>{v({title:"启动 pipeline 失败",body:G instanceof Error?G.message:String(G)})}}),T=Pn({mutationFn:()=>oR(n),onSuccess:()=>k(),onError:G=>{v({title:"停止 pipeline 失败",body:G instanceof Error?G.message:String(G)})}}),j=Pn({mutationFn:()=>cR(n,{all:!0}),onSuccess:()=>k(),onError:G=>{v({title:"重置失败",body:G instanceof Error?G.message:String(G)})}}),[F,M]=O.useState(!1),q=Pn({mutationFn:G=>aR(n,G),onSuccess:()=>{k(),M(!1)},onError:G=>{v({title:"新建卡片失败",body:G instanceof Error?G.message:String(G)})}}),K=Pn({mutationFn:({seq:G,state:he})=>rR(n,G,he),onMutate:async({seq:G,state:he})=>{await w.cancelQueries({queryKey:["cards",n]});const R=w.getQueryData(["cards",n]);return R&&w.setQueryData(["cards",n],{...R,data:R.data.map(L=>L.seq===G?{...L,state:he}:L)}),{prev:R}},onError:(G,he,R)=>{R!=null&&R.prev&&w.setQueryData(["cards",n],R.prev),v({title:"移动卡片失败",body:G instanceof Error?G.message:String(G)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),te=((Y=E.data)==null?void 0:Y.data)??[],{allSkills:D,allLabels:P}=O.useMemo(()=>{const G=new Set,he=new Set;for(const R of te){for(const L of R.skills)G.add(L);for(const L of R.labels)he.add(L)}return{allSkills:[...G].sort(),allLabels:[...he].sort()}},[te]);if(!n)return d.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),d.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),d.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:(U=x.data)==null?void 0:U.data.map(G=>d.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>_(G.name),type:"button",children:G.name},G.name))})]})]});const J=te.filter(G=>{if(o){const he=o.toLowerCase();if(!(G.title.toLowerCase().includes(he)||G.skills.some(L=>L.toLowerCase().includes(he))||G.labels.some(L=>L.toLowerCase().includes(he))))return!1}return!(f.size>0&&!G.skills.some(R=>f.has(R))||m.size>0&&!G.labels.some(R=>m.has(R)))}),re=(ae=x.data)==null?void 0:ae.data.find(G=>G.name===n),Q=(re==null?void 0:re.pipelineStatus)==="running";return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:re?`${re.name} · ${re.cards.total} cards · ${re.workers.active} workers 活跃`:"加载中…"})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsx(SR,{current:n,onChange:_}),d.jsxs("button",{className:Q?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>Q?T.mutate():A.mutate(),disabled:A.isPending||T.isPending,type:"button","aria-label":Q?"停止 pipeline":"启动 pipeline",title:Q?"停止 pipeline":"启动 pipeline",children:[A.isPending||T.isPending?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):Q?d.jsx(n1,{size:14,strokeWidth:3}):d.jsx(Gp,{size:14,strokeWidth:3}),Q?"停止":"启动"]}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await g({title:"重置整个流水线",body:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",confirm:"重置全部",danger:!0})&&j.mutate()},disabled:j.isPending,children:[j.isPending?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(e1,{size:14,strokeWidth:2.5}),"重置"]}),d.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:q.isPending,children:[q.isPending?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(Di,{size:14,strokeWidth:3}),"新卡片"]})]})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(vf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:G=>c(G.target.value),"aria-label":"搜索卡片"})]}),d.jsx(e0,{label:"skill",options:D,selected:f,onChange:h}),d.jsx(e0,{label:"label",options:P,selected:m,onChange:b}),(o||f.size>0||m.size>0)&&d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),h(new Set),b(new Set)},type:"button","aria-label":"清空筛选",children:[d.jsx(Xi,{size:11,strokeWidth:3}),"清空"]}),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[d.jsx(X2,{size:12}),J.length," / ",te.length]})]}),E.isError&&d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),d.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:E.error instanceof Error?E.error.message:String(E.error)})]}),!E.isError&&d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:wR.map(G=>d.jsx(vR,{label:G.label,bg:G.bg,cards:J.filter(TR(G.state)),onCardClick:he=>s(he.seq),onDropCard:he=>K.mutate({seq:he,state:G.state})},G.state))}),a!==null&&d.jsx(ER,{project:n,seq:a,onClose:()=>s(null),onChanged:k}),F&&d.jsx(ZO,{project:n,isPending:q.isPending,onCancel:()=>M(!1),onCreate:G=>q.mutate(G)})]})}function TR(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function e0({label:e,options:t,selected:n,onChange:a}){const[s,o]=O.useState(!1),c=O.useRef(null);O.useEffect(()=>{if(!s)return;const b=v=>{var x;(x=c.current)!=null&&x.contains(v.target)||o(!1)},g=v=>{v.key==="Escape"&&o(!1)};return window.addEventListener("click",b),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",b),window.removeEventListener("keydown",g)}},[s]);const f=b=>{const g=new Set(n);g.has(b)?g.delete(b):g.add(b),a(g)},h=t.length===0,m=n.size;return d.jsxs("div",{ref:c,className:"relative",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!h&&o(b=>!b),disabled:h,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,m>0&&d.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:m}),d.jsx(xc,{size:11,strokeWidth:3,className:["transition-transform",s?"rotate-180":""].join(" ")})]}),s&&d.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(b=>{const g=n.has(b);return d.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",g?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[d.jsx("input",{type:"checkbox",checked:g,onChange:()=>f(b),className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",children:b})]},b)}),m>0&&d.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>a(new Set),children:"清空选择"})]})]})}function CR(){return $t("/api/workers/all")}function AR(e){return $t(`/api/projects/${encodeURIComponent(e)}/workers`)}function OR(e,t){return $t(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function cS(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return n.json().catch(()=>({}))}function t0(e,t){return cS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function RR(e,t,n){return cS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function cg({state:e}){const n={running:{bg:"var(--color-running-bg)",color:"var(--color-running)",label:"running"},starting:{bg:"var(--color-secondary)",color:"var(--color-text)",label:"starting",icon:d.jsx(Ut,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:d.jsx(AC,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return d.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function ug(e){if(e==null||e<=0)return"—";const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m`:a>0?`${a}m ${s}s`:`${s}s`}function MR(e){if(e==null||e<=0)return"text-[var(--color-text-muted)]";const t=e/6e4;return t<10?"text-[var(--color-running)]":t<60?"text-[var(--color-stuck)]":"text-[var(--color-crashed)]"}function fg(e){const t=Date.now()-new Date(e).getTime();return t<6e4?`${Math.floor(t/1e3)}s 前`:t<36e5?`${Math.floor(t/6e4)}m 前`:`${Math.floor(t/36e5)}h 前`}function jR({alerts:e,selected:t,onSelect:n}){return e.length===0?d.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[d.jsx(If,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),d.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:"全部 worker 健康"})]}):d.jsxs("section",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[d.jsx(BC,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),d.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return d.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(cg,{state:a.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&d.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),d.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[d.jsx(z2,{size:10,strokeWidth:2.5}),ug(a.runtimeMs)]})]}),a.markerUpdatedAt&&d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?"PID 已死。":`marker 停 ${fg(a.markerUpdatedAt)}。`})]},`${a.project}-${a.slot}`)})})]})}function DR({active:e,selected:t,onSelect:n}){return e.length===0?d.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"没有 worker 在运行。"})}):d.jsxs("section",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[d.jsx(Df,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return d.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(cg,{state:a.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),d.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${MR(a.runtimeMs)}`,children:ug(a.runtimeMs)})]}),a.card&&d.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&d.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&d.jsxs("span",{className:"ml-auto",children:["marker ",fg(a.markerUpdatedAt)]})]}),a.lastLogLine&&d.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[d.jsx(i1,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function LR({capacity:e,selected:t,onSelect:n}){return e.length===0?null:d.jsxs("section",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),d.jsx("div",{className:"nb-card p-0 overflow-hidden",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[d.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"项目"}),d.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"占用"}),d.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),d.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"其它"}),d.jsx("th",{className:"px-3 py-2"})]})}),d.jsx("tbody",{children:e.map(a=>{const s=a.running+a.starting+a.stuck+a.crashed,o=(t==null?void 0:t.project)===a.project;return d.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",o?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[d.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(IR,{total:a.total,cap:a})}),d.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[d.jsx("span",{className:"text-[var(--color-running)] font-bold",children:a.running}),d.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.total]})]}),d.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[a.starting>0&&d.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&d.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&d.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),s===0&&d.jsx("span",{children:"idle"})]}),d.jsx("td",{className:"px-3 py-2 text-right",children:d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"详情 →"})})]},a.project)})})]})})]})}function IR({total:e,cap:t}){const n=[];for(let a=0;a<t.crashed;a++)n.push("crashed");for(let a=0;a<t.stuck;a++)n.push("stuck");for(let a=0;a<t.starting;a++)n.push("starting");for(let a=0;a<t.running;a++)n.push("running");for(let a=0;a<t.idle;a++)n.push("idle");return d.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>d.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:zR(a)},title:a},s)),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function zR(e){switch(e){case"running":return"var(--color-running-bg)";case"starting":return"var(--color-secondary)";case"stuck":return"var(--color-stuck-bg)";case"crashed":return"var(--color-crashed-bg)";default:return"var(--color-idle-bg)"}}function BR({project:e,initialSlot:t,onChange:n}){var h;const a=st({queryKey:["workers",e],queryFn:()=>AR(e),refetchInterval:3e3}),s=((h=a.data)==null?void 0:h.data)??[],[o,c]=O.useState(null);O.useEffect(()=>{if(s.length===0){c(null);return}const m=s[0].slot;c(b=>b!=null&&s.some(g=>g.slot===b)?b:t!=null&&s.some(g=>g.slot===t)?t:m)},[e,t,s.length]);const f=s.find(m=>m.slot===o)??null;return d.jsxs("div",{className:"flex flex-col h-full",children:[d.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),d.jsx(ds,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"看板 →"})]}),a.isLoading&&s.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 workers…"}):s.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"该项目没有 worker slot。"}):d.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(m=>d.jsx(UR,{worker:m,active:m.slot===o,onClick:()=>c(m.slot)},m.slot))})]}),f?d.jsx($R,{project:e,worker:f,onChange:n}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:s.length===0?"无 worker":"请选择一个 worker"})})]})}function UR({worker:e,active:t,onClick:n}){return d.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(cg,{state:e.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?d.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):d.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:"空闲"})]})}function $R({project:e,worker:t,onChange:n}){var m,b;const{confirm:a,alert:s}=si(),o=t.state==="crashed"||t.state==="stuck",c=st({queryKey:["worker-detail",e,t.slot],queryFn:()=>OR(e,t.slot),refetchInterval:3e3}),f=((m=c.data)==null?void 0:m.recentOutput)??[],h=((b=c.data)==null?void 0:b.recentLogs)??[];return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?d.jsxs("div",{children:[d.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:"当前卡片"}),d.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):d.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:"slot 空闲,没有当前卡片。"}),d.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"Stage"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),d.jsx("dt",{className:"font-bold",children:"PID"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),d.jsx("dt",{className:"font-bold",children:"Runtime"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:ug(t.runtimeMs)}),d.jsx("dt",{className:"font-bold",children:"Started"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),d.jsx("dt",{className:"font-bold",children:"Marker"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?fg(t.markerUpdatedAt):"—"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[d.jsx(i1,{size:10,strokeWidth:2.5}),"Claude 输出 · 最近 ",f.length," 行"]}),c.isLoading&&f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载中…"}):f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"还没收到 session 输出。Worker 刚启动时需要几秒。"}):d.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:f.map(g=>`${g.ts?`${g.ts} [${g.kind}] `:`[${g.kind}] `}${g.text}`).join(`
493
- `)})]}),h.length>0&&d.jsxs("div",{children:[d.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:["Supervisor 心跳 · 最近 ",h.length," 行"]}),d.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:h.map(g=>`${g.ts??""} [${g.level}] ${g.msg}`).join(`
494
- `)}),d.jsx(ds,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:"查看完整 log →"})]})]}),d.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[o&&t.card&&d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`重启 worker-${t.slot}`,body:`先杀进程,再重新 launch 到 #${t.card.seq}`,confirm:"重启"})){try{await t0(e,t.slot)}catch{}try{await RR(e,t.slot,t.card.seq),n()}catch(v){s({title:"重启失败",body:v instanceof Error?v.message:String(v)})}}},children:[d.jsx(LC,{size:11,strokeWidth:2.5})," 重启"]}),t.state!=="idle"&&d.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`终止 worker-${t.slot}`,body:"当前任务强制中断。",confirm:"终止",danger:!0}))try{await t0(e,t.slot),n()}catch(v){s({title:"终止失败",body:v instanceof Error?v.message:String(v)})}},children:[d.jsx(HC,{size:11,strokeWidth:2.5})," 终止"]})]})]})}function FR(){var o;const e=qn(),[t,n]=O.useState(null),a=st({queryKey:["workers-agg"],queryFn:CR,refetchInterval:5e3});O.useEffect(()=>{if(!a.data)return;const c=a.data.capacity.map(h=>h.project),f=[];for(const h of c){const m=new EventSource(`/stream/projects/${encodeURIComponent(h)}`),b=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};m.addEventListener("worker.updated",b),m.addEventListener("worker.added",b),m.addEventListener("worker.deleted",b),m.addEventListener("card.updated",b),f.push(m)}return()=>{for(const h of f)h.close()}},[(o=a.data)==null?void 0:o.capacity.map(c=>c.project).join(","),e]);const s=O.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const c={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of a.data.capacity)c.running+=f.running,c.starting+=f.starting,c.stuck+=f.stuck,c.crashed+=f.crashed,c.idle+=f.idle;return c},[a.data]);return d.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["跨 ",s.projects," 项目 · ",s.running," 跑 · ",s.starting," 启动 ·"," ",d.jsxs("span",{className:"text-[var(--color-stuck)]",children:[s.stuck," 卡"]})," ·"," ",d.jsxs("span",{className:"text-[var(--color-crashed)]",children:[s.crashed," 崩"]})," · ",s.idle," 闲"]})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"刷新",children:[a.isFetching?d.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Cl,{size:12,strokeWidth:2.5}),"刷新"]})]}),d.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[d.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[a.isLoading&&d.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"加载中…"}),a.isError&&d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsxs("p",{children:["加载失败: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&d.jsxs(d.Fragment,{children:[d.jsx(jR,{alerts:a.data.alerts,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),d.jsx(DR,{active:a.data.active,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),d.jsx(LR,{capacity:a.data.capacity,selected:t,onSelect:c=>n({project:c})})]})]}),d.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:t?d.jsx(BR,{project:t.project,initialSlot:t.slot,onChange:()=>e.invalidateQueries({queryKey:["workers-agg"]})}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:d.jsxs("div",{children:[d.jsx(Df,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"点击项目 / worker 查看详情"})]})})})]})]})}function PR(e){const t=new URLSearchParams;return e.project&&t.set("project",e.project),e.worker&&t.set("worker",e.worker),t.set("limit",String(e.limit)),e.since&&t.set("since",e.since),$t(`/api/logs?${t}`)}function qR(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const HR=["error","warn","info","debug"],KR=["error","warn","info"];function GR(){var K,te;const[e,t]=YE(),n=e.get("project"),a=e.get("worker")??"",[s,o]=O.useState([]),[c,f]=O.useState(!1),[h,m]=O.useState(!0),[b,g]=O.useState(()=>new Set(KR)),[v,x]=O.useState(""),[E,w]=O.useState("live"),[k,_]=O.useState(()=>{const D=new Date(Date.now()-36e5),P=J=>String(J).padStart(2,"0");return`${D.getFullYear()}-${P(D.getMonth()+1)}-${P(D.getDate())}T${P(D.getHours())}:${P(D.getMinutes())}`}),A=O.useRef(null),T=!n,j=st({queryKey:["projects"],queryFn:_r}),{data:F,refetch:M}=st({queryKey:["logs",n??"agg",a,E,E==="history"?k:"live"],queryFn:()=>PR({project:n||void 0,worker:a||void 0,limit:E==="history"?2e3:500,since:E==="history"?new Date(k).toISOString():void 0}),refetchInterval:T&&E==="live"?5e3:!1});O.useEffect(()=>{F!=null&&F.data&&o(F.data)},[F]),O.useEffect(()=>{if(!n||E!=="live")return;const D=qR({project:n,worker:a||void 0}),P=new EventSource(D);return P.addEventListener("log.line",J=>{if(!c)try{const re=JSON.parse(J.data);o(Q=>{const Y=[...Q,re];return Y.length>5e3&&Y.splice(0,Y.length-5e3),Y})}catch{}}),()=>P.close()},[n,a,c,E]),O.useEffect(()=>{if(!h)return;const D=A.current;D&&(D.scrollTop=D.scrollHeight)},[s,h]);const q=O.useMemo(()=>{const D=v.toLowerCase();return s.filter(P=>!(!b.has(P.level)||D&&!P.msg.toLowerCase().includes(D)))},[s,b,v]);return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[T?`全部项目(${((K=j.data)==null?void 0:K.data.length)??0})`:n,a&&` · worker-${a}`," · ",T&&E==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&d.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[d.jsxs("button",{type:"button",onClick:()=>w("live"),"aria-pressed":E==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",E==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(JE,{size:11,strokeWidth:2.5}),"实时"]}),d.jsxs("button",{type:"button",onClick:()=>w("history"),"aria-pressed":E==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",E==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(nC,{size:11,strokeWidth:2.5}),"历史"]})]}),E==="history"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:k,onChange:D=>_(D.target.value),"aria-label":"查询起始时间"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[d.jsx(vf,{size:11,strokeWidth:3}),"查询"]})]}),d.jsxs("div",{className:"relative",children:[d.jsx(sc,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),d.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:n??"",onChange:D=>{const P=D.target.value;t(P?{project:P}:{})},"aria-label":"筛选项目",children:[d.jsx("option",{value:"",children:"全部项目"}),(te=j.data)==null?void 0:te.data.map(D=>d.jsx("option",{value:D.name,children:D.name},D.name))]}),d.jsx(xc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(vf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:v,onChange:D=>x(D.target.value),"aria-label":"过滤日志"})]}),d.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:HR.map(D=>d.jsx(QR,{level:D,enabled:b.has(D),onToggle:()=>{g(P=>{const J=new Set(P);return J.has(D)?J.delete(D):J.add(D),J})}},D))}),d.jsxs("div",{className:"ml-auto flex gap-2",children:[E==="live"&&d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>m(D=>!D),type:"button",children:h?"✓ Auto-scroll":"Auto-scroll"}),d.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(D=>!D),type:"button",children:c?d.jsxs(d.Fragment,{children:[d.jsx(Gp,{size:12,strokeWidth:3})," Resume"]}):d.jsxs(d.Fragment,{children:[d.jsx(gC,{size:12,strokeWidth:3})," Pause"]})})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const D=new Blob([q.map(re=>re.raw).join(`
495
- `)],{type:"text/plain"}),P=URL.createObjectURL(D),J=document.createElement("a");J.href=P,J.download=`${n}-log-${Date.now()}.log`,J.click(),URL.revokeObjectURL(P)},type:"button",children:[d.jsx(WE,{size:12,strokeWidth:2.5})," Export"]})]})]}),d.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[d.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[d.jsx("span",{className:"text-[var(--color-text-muted)]",children:(F==null?void 0:F.file)??"~/.coral/projects/.../logs/*.log"}),E==="live"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):d.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),d.jsxs("div",{ref:A,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:D=>{const P=D.currentTarget;!(P.scrollHeight-P.scrollTop-P.clientHeight<40)&&h&&m(!1)},children:[q.map((D,P)=>d.jsx(YR,{line:D},P)),q.length===0&&d.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}function QR({level:e,enabled:t,onToggle:n}){const a={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},s={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return d.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:a[e],color:s[e]}:{},children:e.toUpperCase()})}function YR({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return d.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[d.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&d.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),d.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),d.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function VR(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const XR=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WR=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,ZR={};function n0(e,t){return(ZR.jsx?WR:XR).test(e)}const JR=/[ \t\n\f\r]/g;function eM(e){return typeof e=="object"?e.type==="text"?i0(e.value):!1:i0(e)}function i0(e){return e.replace(JR,"")===""}class wc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}wc.prototype.normal={};wc.prototype.property={};wc.prototype.space=void 0;function uS(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new wc(n,a,t)}function gp(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let tM=0;const Pe=ps(),Zt=ps(),bp=ps(),fe=ps(),St=ps(),pl=ps(),ti=ps();function ps(){return 2**++tM}const yp=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:Zt,commaOrSpaceSeparated:ti,commaSeparated:pl,number:fe,overloadedBoolean:bp,spaceSeparated:St},Symbol.toStringTag,{value:"Module"})),_m=Object.keys(yp);class dg extends Hn{constructor(t,n,a,s){let o=-1;if(super(t,n),a0(this,"space",s),typeof a=="number")for(;++o<_m.length;){const c=_m[o];a0(this,_m[o],(a&yp[c])===yp[c])}}}dg.prototype.defined=!0;function a0(e,t,n){n&&(e[t]=n)}function Hl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new dg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[gp(a)]=a,n[gp(o.attribute)]=a}return new wc(t,n,e.space)}const fS=Hl({properties:{ariaActiveDescendant:null,ariaAtomic:Zt,ariaAutoComplete:null,ariaBusy:Zt,ariaChecked:Zt,ariaColCount:fe,ariaColIndex:fe,ariaColSpan:fe,ariaControls:St,ariaCurrent:null,ariaDescribedBy:St,ariaDetails:null,ariaDisabled:Zt,ariaDropEffect:St,ariaErrorMessage:null,ariaExpanded:Zt,ariaFlowTo:St,ariaGrabbed:Zt,ariaHasPopup:null,ariaHidden:Zt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:St,ariaLevel:fe,ariaLive:null,ariaModal:Zt,ariaMultiLine:Zt,ariaMultiSelectable:Zt,ariaOrientation:null,ariaOwns:St,ariaPlaceholder:null,ariaPosInSet:fe,ariaPressed:Zt,ariaReadOnly:Zt,ariaRelevant:null,ariaRequired:Zt,ariaRoleDescription:St,ariaRowCount:fe,ariaRowIndex:fe,ariaRowSpan:fe,ariaSelected:Zt,ariaSetSize:fe,ariaSort:null,ariaValueMax:fe,ariaValueMin:fe,ariaValueNow:fe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function dS(e,t){return t in e?e[t]:t}function hS(e,t){return dS(e,t.toLowerCase())}const nM=Hl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pl,acceptCharset:St,accessKey:St,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:St,autoFocus:Pe,autoPlay:Pe,blocking:St,capture:null,charSet:null,checked:Pe,cite:null,className:St,cols:fe,colSpan:null,content:null,contentEditable:Zt,controls:Pe,controlsList:St,coords:fe|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:bp,draggable:Zt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:St,height:fe,hidden:bp,high:fe,href:null,hrefLang:null,htmlFor:St,httpEquiv:St,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:St,itemRef:St,itemScope:Pe,itemType:St,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:fe,manifest:null,max:null,maxLength:fe,media:null,method:null,min:null,minLength:fe,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,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:Pe,optimum:fe,pattern:null,ping:St,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:St,required:Pe,reversed:Pe,rows:fe,rowSpan:fe,sandbox:St,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:fe,sizes:null,slot:null,span:fe,spellCheck:Zt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:fe,step:null,style:null,tabIndex:fe,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:Zt,width:fe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:St,axis:null,background:null,bgColor:null,border:fe,borderColor:null,bottomMargin:fe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:fe,leftMargin:fe,link:null,longDesc:null,lowSrc:null,marginHeight:fe,marginWidth:fe,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:fe,rules:null,scheme:null,scrolling:Zt,standby:null,summary:null,text:null,topMargin:fe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:fe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:fe,security:null,unselectable:null},space:"html",transform:hS}),iM=Hl({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:ti,accentHeight:fe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:fe,amplitude:fe,arabicForm:null,ascent:fe,attributeName:null,attributeType:null,azimuth:fe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:fe,by:null,calcMode:null,capHeight:fe,className:St,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:fe,diffuseConstant:fe,direction:null,display:null,dur:null,divisor:fe,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:fe,enableBackground:null,end:null,event:null,exponent:fe,externalResourcesRequired:null,fill:null,fillOpacity:fe,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:pl,g2:pl,glyphName:pl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:fe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:fe,horizOriginX:fe,horizOriginY:fe,id:null,ideographic:fe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:fe,k:fe,k1:fe,k2:fe,k3:fe,k4:fe,kernelMatrix:ti,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:fe,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:fe,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:fe,overlineThickness:fe,paintOrder:null,panose1:null,path:null,pathLength:fe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:St,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:fe,pointsAtY:fe,pointsAtZ:fe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ti,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ti,rev:ti,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ti,requiredFeatures:ti,requiredFonts:ti,requiredFormats:ti,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:fe,specularExponent:fe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:fe,strikethroughThickness:fe,string:null,stroke:null,strokeDashArray:ti,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:fe,strokeOpacity:fe,strokeWidth:null,style:null,surfaceScale:fe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ti,tabIndex:fe,tableValues:null,target:null,targetX:fe,targetY:fe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ti,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:fe,underlineThickness:fe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:fe,values:null,vAlphabetic:fe,vMathematical:fe,vectorEffect:null,vHanging:fe,vIdeographic:fe,version:null,vertAdvY:fe,vertOriginX:fe,vertOriginY:fe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:fe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:dS}),mS=Hl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),pS=Hl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:hS}),gS=Hl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aM={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"},rM=/[A-Z]/g,r0=/-[a-z]/g,sM=/^data[-\w.:]+$/i;function lM(e,t){const n=gp(t);let a=t,s=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(r0,cM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!r0.test(o)){let c=o.replace(rM,oM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=dg}return new s(a,t)}function oM(e){return"-"+e.toLowerCase()}function cM(e){return e.charAt(1).toUpperCase()}const uM=uS([fS,nM,mS,pS,gS],"html"),hg=uS([fS,iM,mS,pS,gS],"svg");function fM(e){return e.join(" ").trim()}var al={},km,s0;function dM(){if(s0)return km;s0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
496
- `,m="/",b="*",g="",v="comment",x="declaration";function E(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var A=1,T=1;function j(Q){var Y=Q.match(t);Y&&(A+=Y.length);var U=Q.lastIndexOf(h);T=~U?Q.length-U:T+Q.length}function F(){var Q={line:A,column:T};return function(Y){return Y.position=new M(Q),te(),Y}}function M(Q){this.start=Q,this.end={line:A,column:T},this.source=_.source}M.prototype.content=k;function q(Q){var Y=new Error(_.source+":"+A+":"+T+": "+Q);if(Y.reason=Q,Y.filename=_.source,Y.line=A,Y.column=T,Y.source=k,!_.silent)throw Y}function K(Q){var Y=Q.exec(k);if(Y){var U=Y[0];return j(U),k=k.slice(U.length),Y}}function te(){K(n)}function D(Q){var Y;for(Q=Q||[];Y=P();)Y!==!1&&Q.push(Y);return Q}function P(){var Q=F();if(!(m!=k.charAt(0)||b!=k.charAt(1))){for(var Y=2;g!=k.charAt(Y)&&(b!=k.charAt(Y)||m!=k.charAt(Y+1));)++Y;if(Y+=2,g===k.charAt(Y-1))return q("End of comment missing");var U=k.slice(2,Y-2);return T+=2,j(U),k=k.slice(Y),T+=2,Q({type:v,comment:U})}}function J(){var Q=F(),Y=K(a);if(Y){if(P(),!K(s))return q("property missing ':'");var U=K(o),ae=Q({type:x,property:w(Y[0].replace(e,g)),value:U?w(U[0].replace(e,g)):g});return K(c),ae}}function re(){var Q=[];D(Q);for(var Y;Y=J();)Y!==!1&&(Q.push(Y),D(Q));return Q}return te(),re()}function w(k){return k?k.replace(f,g):g}return km=E,km}var l0;function hM(){if(l0)return al;l0=1;var e=al&&al.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(al,"__esModule",{value:!0}),al.default=n;const t=e(dM());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:b}=h;f?s(m,b,h):b&&(o=o||{},o[m]=b)}),o}return al}var Ko={},o0;function mM(){if(o0)return Ko;o0=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||n.test(m)||e.test(m)},c=function(m,b){return b.toUpperCase()},f=function(m,b){return"".concat(b,"-")},h=function(m,b){return b===void 0&&(b={}),o(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(s,f):m=m.replace(a,f),m.replace(t,c))};return Ko.camelCase=h,Ko}var Go,c0;function pM(){if(c0)return Go;c0=1;var e=Go&&Go.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(hM()),n=mM();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,h){f&&h&&(c[(0,n.camelCase)(f,o)]=h)}),c}return a.default=a,Go=a,Go}var gM=pM();const bM=Ap(gM),bS=yS("end"),mg=yS("start");function yS(e){return t;function t(n){const a=n&&n.position&&n.position[e]||{};if(typeof a.line=="number"&&a.line>0&&typeof a.column=="number"&&a.column>0)return{line:a.line,column:a.column,offset:typeof a.offset=="number"&&a.offset>-1?a.offset:void 0}}}function yM(e){const t=mg(e),n=bS(e);if(t&&n)return{start:t,end:n}}function Jo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?u0(e.position):"start"in e||"end"in e?u0(e):"line"in e||"column"in e?xp(e):""}function xp(e){return f0(e&&e.line)+":"+f0(e&&e.column)}function u0(e){return xp(e&&e.start)+"-"+xp(e&&e.end)}function f0(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Jo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="";bn.prototype.name="";bn.prototype.reason="";bn.prototype.message="";bn.prototype.stack="";bn.prototype.column=void 0;bn.prototype.line=void 0;bn.prototype.ancestors=void 0;bn.prototype.cause=void 0;bn.prototype.fatal=void 0;bn.prototype.place=void 0;bn.prototype.ruleId=void 0;bn.prototype.source=void 0;const pg={}.hasOwnProperty,xM=new Map,vM=/[A-Z]/g,EM=new Set(["table","tbody","thead","tfoot","tr"]),SM=new Set(["td","th"]),xS="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wM(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let a;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");a=RM(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");a=OM(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:a,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?hg:uM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=vS(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function vS(e,t,n){if(t.type==="element")return _M(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return kM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return TM(e,t,n);if(t.type==="mdxjsEsm")return NM(e,t);if(t.type==="root")return CM(e,t,n);if(t.type==="text")return AM(e,t)}function _M(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=hg,e.schema=s),e.ancestors.push(t);const o=SS(e,t.tagName,!1),c=MM(e,t);let f=bg(e,t);return EM.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!eM(h):!0})),ES(e,c,o,t),gg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function kM(e,t){if(t.data&&t.data.estree&&e.evaluater){const a=t.data.estree.body[0];return a.type,e.evaluater.evaluateExpression(a.expression)}uc(e,t.position)}function NM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);uc(e,t.position)}function TM(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=hg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:SS(e,t.name,!0),c=jM(e,t),f=bg(e,t);return ES(e,c,o,t),gg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function CM(e,t,n){const a={};return gg(a,bg(e,t)),e.create(t,e.Fragment,a,n)}function AM(e,t){return t.value}function ES(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function gg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function OM(e,t,n){return a;function a(s,o,c,f){const m=Array.isArray(c.children)?n:t;return f?m(o,c,f):m(o,c)}}function RM(e,t){return n;function n(a,s,o,c){const f=Array.isArray(o.children),h=mg(a);return t(s,o,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function MM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&pg.call(t.properties,s)){const o=DM(e,s,t.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&SM.has(t.tagName)?a=f:n[c]=f}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function jM(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else uc(e,t.position);else{const s=a.name;let o;if(a.value&&typeof a.value=="object")if(a.value.data&&a.value.data.estree&&e.evaluater){const f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else uc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function bg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:xM;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=s.get(h)||0;c=h+"-"+m,s.set(h,m+1)}}const f=vS(e,o,c);f!==void 0&&n.push(f)}return n}function DM(e,t,n){const a=lM(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?VR(n):fM(n)),a.property==="style"){let s=typeof n=="object"?n:LM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=IM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?aM[a.property]||a.property:a.attribute,n]}}function LM(e,t){try{return bM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:a,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=xS+"#cannot-parse-style-attribute",s}}function SS(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const f=n0(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=n0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return pg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);uc(e)}function uc(e,t){const n=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=xS+"#cannot-handle-mdx-estrees-without-createevaluater",n}function IM(e){const t={};let n;for(n in e)pg.call(e,n)&&(t[zM(n)]=e[n]);return t}function zM(e){let t=e.replace(vM,BM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function BM(e){return"-"+e.toLowerCase()}const Nm={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"]},UM={};function yg(e,t){const n=UM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return wS(e,a,s)}function wS(e,t,n){if($M(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return d0(e.children,t,n)}return Array.isArray(e)?d0(e,t,n):""}function d0(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=wS(e[s],t,n);return a.join("")}function $M(e){return!!(e&&typeof e=="object")}const h0=document.createElement("i");function xg(e){const t="&"+e+";";h0.innerHTML=t;const n=h0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ai(e,t,n,a){const s=e.length;let o=0,c;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,a.length<1e4)c=Array.from(a),c.unshift(t,n),e.splice(...c);else for(n&&e.splice(t,n);o<a.length;)c=a.slice(o,o+1e4),c.unshift(t,0),e.splice(...c),o+=1e4,t+=1e4}function xi(e,t){return e.length>0?(ai(e,e.length,0,t),e):t}const m0={}.hasOwnProperty;function _S(e){const t={};let n=-1;for(;++n<e.length;)FM(t,e[n]);return t}function FM(e,t){let n;for(n in t){const s=(m0.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){m0.call(s,c)||(s[c]=[]);const f=o[c];PM(s[c],Array.isArray(f)?f:f?[f]:[])}}}function PM(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);ai(e,0,0,a)}function kS(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function Mi(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=Nr(/[A-Za-z]/),pn=Nr(/[\dA-Za-z]/),qM=Nr(/[#-'*+\--9=?A-Z^-~]/);function kf(e){return e!==null&&(e<32||e===127)}const vp=Nr(/\d/),HM=Nr(/[\dA-Fa-f]/),KM=Nr(/[!-/:-@[-`{-~]/);function Oe(e){return e!==null&&e<-2}function xt(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const Zf=Nr(new RegExp("\\p{P}|\\p{S}","u")),fs=Nr(/\s/);function Nr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&pn(e.charCodeAt(n+1))&&pn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(n+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function tt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return Ye(h)?(e.enter(n),f(h)):t(h)}function f(h){return Ye(h)&&o++<s?(e.consume(h),f):(e.exit(n),t(h))}}const GM={tokenize:QM};function QM(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),tt(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Oe(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const YM={tokenize:VM},p0={tokenize:XM};function VM(e){const t=this,n=[];let a=0,s,o,c;return f;function f(T){if(a<n.length){const j=n[a];return t.containerState=j[1],e.attempt(j[0].continuation,h,m)(T)}return m(T)}function h(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&A();const j=t.events.length;let F=j,M;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){M=t.events[F][1].end;break}_(a);let q=j;for(;q<t.events.length;)t.events[q][1].end={...M},q++;return ai(t.events,F+1,0,t.events.slice(j)),t.events.length=q,m(T)}return f(T)}function m(T){if(a===n.length){if(!s)return v(T);if(s.currentConstruct&&s.currentConstruct.concrete)return E(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(p0,b,g)(T)}function b(T){return s&&A(),_(a),v(T)}function g(T){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,E(T)}function v(T){return t.containerState={},e.attempt(p0,x,E)(T)}function x(T){return a++,n.push([t.currentConstruct,t.containerState]),v(T)}function E(T){if(T===null){s&&A(),_(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(T)}function w(T){if(T===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return Oe(T)?(e.consume(T),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(T),w)}function k(T,j){const F=t.sliceStream(T);if(j&&F.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write(F),t.parser.lazy[T.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const q=t.events.length;let K=q,te,D;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(te){D=t.events[K][1].end;break}te=!0}for(_(a),M=q;M<t.events.length;)t.events[M][1].end={...D},M++;ai(t.events,K+1,0,t.events.slice(q)),t.events.length=M}}function _(T){let j=n.length;for(;j-- >T;){const F=n[j];t.containerState=F[1],F[0].exit.call(t,e)}n.length=T}function A(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function XM(e,t,n){return tt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rl(e){if(e===null||xt(e)||fs(e))return 1;if(Zf(e))return 2}function Jf(e,t,n){const a=[];let s=-1;for(;++s<e.length;){const o=e[s].resolveAll;o&&!a.includes(o)&&(t=o(t,n),a.push(o))}return t}const Ep={name:"attention",resolveAll:WM,tokenize:ZM};function WM(e,t){let n=-1,a,s,o,c,f,h,m,b;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},v={...e[n][1].start};g0(g,-h),g0(v,h),c={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=xi(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=xi(m,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=xi(m,Jf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=xi(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,m=xi(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,ai(e,a-1,n-a+3,m),n=a+m.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function ZM(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Rl(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),b=Rl(h),g=!b||b===2&&s||n.includes(h),v=!s||s===2&&b||n.includes(a);return m._open=!!(o===42?g:g&&(s||!v)),m._close=!!(o===42?v:v&&(b||!g)),t(h)}}function g0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JM={name:"autolink",tokenize:ej};function ej(e,t,n){let a=0;return s;function s(x){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(x){return Tn(x)?(e.consume(x),c):x===64?n(x):m(x)}function c(x){return x===43||x===45||x===46||pn(x)?(a=1,f(x)):m(x)}function f(x){return x===58?(e.consume(x),a=0,h):(x===43||x===45||x===46||pn(x))&&a++<32?(e.consume(x),f):(a=0,m(x))}function h(x){return x===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):x===null||x===32||x===60||kf(x)?n(x):(e.consume(x),h)}function m(x){return x===64?(e.consume(x),b):qM(x)?(e.consume(x),m):n(x)}function b(x){return pn(x)?g(x):n(x)}function g(x){return x===46?(e.consume(x),a=0,b):x===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(x),e.exit("autolinkMarker"),e.exit("autolink"),t):v(x)}function v(x){if((x===45||pn(x))&&a++<63){const E=x===45?v:g;return e.consume(x),E}return n(x)}}const _c={partial:!0,tokenize:tj};function tj(e,t,n){return a;function a(o){return Ye(o)?tt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Oe(o)?t(o):n(o)}}const NS={continuation:{tokenize:ij},exit:aj,name:"blockQuote",tokenize:nj};function nj(e,t,n){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Ye(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function ij(e,t,n){const a=this;return s;function s(c){return Ye(c)?tt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(NS,t,n)(c)}}function aj(e){e.exit("blockQuote")}const TS={name:"characterEscape",tokenize:rj};function rj(e,t,n){return a;function a(o){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(o),e.exit("escapeMarker"),s}function s(o){return KM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const CS={name:"characterReference",tokenize:sj};function sj(e,t,n){const a=this;let s=0,o,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=pn,b(g))}function m(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=HM,b):(e.enter("characterReferenceValue"),o=7,c=vp,b(g))}function b(g){if(g===59&&s){const v=e.exit("characterReferenceValue");return c===pn&&!xg(a.sliceSerialize(v))?n(g):(e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return c(g)&&s++<o?(e.consume(g),b):n(g)}}const b0={partial:!0,tokenize:oj},y0={concrete:!0,name:"codeFenced",tokenize:lj};function lj(e,t,n){const a=this,s={partial:!0,tokenize:F};let o=0,c=0,f;return h;function h(M){return m(M)}function m(M){const q=a.events[a.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===f?(c++,e.consume(M),b):c<3?n(M):(e.exit("codeFencedFenceSequence"),Ye(M)?tt(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Oe(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(b0,w,j)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||Oe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ye(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),tt(e,x,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),v)}function x(M){return M===null||Oe(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||Oe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),E)}function w(M){return e.attempt(s,j,k)(M)}function k(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Ye(M)?tt(e,A,"linePrefix",o+1)(M):A(M)}function A(M){return M===null||Oe(M)?e.check(b0,w,j)(M):(e.enter("codeFlowValue"),T(M))}function T(M){return M===null||Oe(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),T)}function j(M){return e.exit("codeFenced"),t(M)}function F(M,q,K){let te=0;return D;function D(Y){return M.enter("lineEnding"),M.consume(Y),M.exit("lineEnding"),P}function P(Y){return M.enter("codeFencedFence"),Ye(Y)?tt(M,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):J(Y)}function J(Y){return Y===f?(M.enter("codeFencedFenceSequence"),re(Y)):K(Y)}function re(Y){return Y===f?(te++,M.consume(Y),re):te>=c?(M.exit("codeFencedFenceSequence"),Ye(Y)?tt(M,Q,"whitespace")(Y):Q(Y)):K(Y)}function Q(Y){return Y===null||Oe(Y)?(M.exit("codeFencedFence"),q(Y)):K(Y)}}}function oj(e,t,n){const a=this;return s;function s(c){return c===null?n(c):(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}const Tm={name:"codeIndented",tokenize:uj},cj={partial:!0,tokenize:fj};function uj(e,t,n){const a=this;return s;function s(m){return e.enter("codeIndented"),tt(e,o,"linePrefix",5)(m)}function o(m){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?h(m):Oe(m)?e.attempt(cj,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Oe(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function fj(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Oe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):tt(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Oe(c)?s(c):n(c)}}const dj={name:"codeText",previous:mj,resolve:hj,tokenize:pj};function hj(e){let t=e.length-4,n=3,a,s;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(a=n;++a<t;)if(e[a][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(a=n-1,t++;++a<=t;)s===void 0?a!==t&&e[a][1].type!=="lineEnding"&&(s=a):(a===t||e[a][1].type==="lineEnding")&&(e[s][1].type="codeTextData",a!==s+2&&(e[s][1].end=e[a-1][1].end,e.splice(s+2,a-s-2),t-=a-s-2,a=s+2),s=void 0);return e}function mj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function pj(e,t,n){let a=0,s,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(o=e.enter("codeTextSequence"),s=0,b(g)):Oe(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||Oe(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),m)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",m(g))}}class gj{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Qo(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qo(this.left,n.reverse())}}}function Qo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function AS(e){const t={};let n=-1,a,s,o,c,f,h,m;const b=new gj(e);for(;++n<b.length;){for(;n in t;)n=t[n];if(a=b.get(n),n&&a[1].type==="chunkFlow"&&b.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,bj(b,n)),n=t[n],m=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=b.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...b.get(s)[1].start},f=b.slice(s,n),f.unshift(a),b.splice(s,n-s+1,f))}}return ai(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function bj(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let b,g,v=-1,x=n,E=0,w=0;const k=[w];for(;x;){for(;e.get(++s)[1]!==x;);o.push(s),x._tokenizer||(b=a.sliceStream(x),x.next||b.push(null),g&&c.defineSkip(x.start),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),x._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=x,x=x.next}for(x=n;++v<f.length;)f[v][0]==="exit"&&f[v-1][0]==="enter"&&f[v][1].type===f[v-1][1].type&&f[v][1].start.line!==f[v][1].end.line&&(w=v+1,k.push(w),x._tokenizer=void 0,x.previous=void 0,x=x.next);for(c.events=[],x?(x._tokenizer=void 0,x.previous=void 0):k.pop(),v=k.length;v--;){const _=f.slice(k[v],k[v+1]),A=o.pop();h.push([A,A+_.length-1]),e.splice(A,2,_)}for(h.reverse(),v=-1;++v<h.length;)m[E+h[v][0]]=E+h[v][1],E+=h[v][1]-h[v][0]-1;return m}const yj={resolve:vj,tokenize:Ej},xj={partial:!0,tokenize:Sj};function vj(e){return AS(e),e}function Ej(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):Oe(f)?e.check(xj,c,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Sj(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),tt(e,o,"linePrefix")}function o(c){if(c===null||Oe(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function OS(e,t,n,a,s,o,c,f,h){const m=h||Number.POSITIVE_INFINITY;let b=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(_),e.exit(o),v):_===null||_===32||_===41||kf(_)?n(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(_))}function v(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===62?(e.exit("chunkString"),e.exit(f),v(_)):_===null||_===60||Oe(_)?n(_):(e.consume(_),_===92?E:x)}function E(_){return _===60||_===62||_===92?(e.consume(_),x):x(_)}function w(_){return!b&&(_===null||_===41||xt(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(_)):b<m&&_===40?(e.consume(_),b++,w):_===41?(e.consume(_),b--,w):_===null||_===32||_===40||kf(_)?n(_):(e.consume(_),_===92?k:w)}function k(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function RS(e,t,n,a,s,o){const c=this;let f=0,h;return m;function m(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(o),b}function b(x){return f>999||x===null||x===91||x===93&&!h||x===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(x):x===93?(e.exit(o),e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):Oe(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(x))}function g(x){return x===null||x===91||x===93||Oe(x)||f++>999?(e.exit("chunkString"),b(x)):(e.consume(x),h||(h=!Ye(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),f++,g):g(x)}}function MS(e,t,n,a,s,o){let c;return f;function f(v){return v===34||v===39||v===40?(e.enter(a),e.enter(s),e.consume(v),e.exit(s),c=v===40?41:v,h):n(v)}function h(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):(e.enter(o),m(v))}function m(v){return v===c?(e.exit(o),h(c)):v===null?n(v):Oe(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),tt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===c||v===null||Oe(v)?(e.exit("chunkString"),m(v)):(e.consume(v),v===92?g:b)}function g(v){return v===c||v===92?(e.consume(v),b):b(v)}}function ec(e,t){let n;return a;function a(s){return Oe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Ye(s)?tt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const wj={name:"definition",tokenize:kj},_j={partial:!0,tokenize:Nj};function kj(e,t,n){const a=this;let s;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return RS.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function f(x){return s=Mi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),h):n(x)}function h(x){return xt(x)?ec(e,m)(x):m(x)}function m(x){return OS(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(_j,g,g)(x)}function g(x){return Ye(x)?tt(e,v,"whitespace")(x):v(x)}function v(x){return x===null||Oe(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):n(x)}}function Nj(e,t,n){return a;function a(f){return xt(f)?ec(e,s)(f):n(f)}function s(f){return MS(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ye(f)?tt(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Oe(f)?t(f):n(f)}}const Tj={name:"hardBreakEscape",tokenize:Cj};function Cj(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Oe(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Aj={name:"headingAtx",resolve:Oj,tokenize:Rj};function Oj(e,t){let n=e.length-2,a=3,s,o;return e[a][1].type==="whitespace"&&(a+=2),n-2>a&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(a===n-1||n-4>a&&e[n-2][1].type==="whitespace")&&(n-=a+1===n?2:4),n>a&&(s={type:"atxHeadingText",start:e[a][1].start,end:e[n][1].end},o={type:"chunkText",start:e[a][1].start,end:e[n][1].end,contentType:"text"},ai(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function Rj(e,t,n){let a=0;return s;function s(b){return e.enter("atxHeading"),o(b)}function o(b){return e.enter("atxHeadingSequence"),c(b)}function c(b){return b===35&&a++<6?(e.consume(b),c):b===null||xt(b)?(e.exit("atxHeadingSequence"),f(b)):n(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||Oe(b)?(e.exit("atxHeading"),t(b)):Ye(b)?tt(e,f,"whitespace")(b):(e.enter("atxHeadingText"),m(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),f(b))}function m(b){return b===null||b===35||xt(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),m)}}const Mj=["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"],x0=["pre","script","style","textarea"],jj={concrete:!0,name:"htmlFlow",resolveTo:Ij,tokenize:zj},Dj={partial:!0,tokenize:Uj},Lj={partial:!0,tokenize:Bj};function Ij(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function zj(e,t,n){const a=this;let s,o,c,f,h;return m;function m(C){return b(C)}function b(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),g}function g(C){return C===33?(e.consume(C),v):C===47?(e.consume(C),o=!0,w):C===63?(e.consume(C),s=3,a.interrupt?t:R):Tn(C)?(e.consume(C),c=String.fromCharCode(C),k):n(C)}function v(C){return C===45?(e.consume(C),s=2,x):C===91?(e.consume(C),s=5,f=0,E):Tn(C)?(e.consume(C),s=4,a.interrupt?t:R):n(C)}function x(C){return C===45?(e.consume(C),a.interrupt?t:R):n(C)}function E(C){const pe="CDATA[";return C===pe.charCodeAt(f++)?(e.consume(C),f===pe.length?a.interrupt?t:J:E):n(C)}function w(C){return Tn(C)?(e.consume(C),c=String.fromCharCode(C),k):n(C)}function k(C){if(C===null||C===47||C===62||xt(C)){const pe=C===47,_e=c.toLowerCase();return!pe&&!o&&x0.includes(_e)?(s=1,a.interrupt?t(C):J(C)):Mj.includes(c.toLowerCase())?(s=6,pe?(e.consume(C),_):a.interrupt?t(C):J(C)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(C):o?A(C):T(C))}return C===45||pn(C)?(e.consume(C),c+=String.fromCharCode(C),k):n(C)}function _(C){return C===62?(e.consume(C),a.interrupt?t:J):n(C)}function A(C){return Ye(C)?(e.consume(C),A):D(C)}function T(C){return C===47?(e.consume(C),D):C===58||C===95||Tn(C)?(e.consume(C),j):Ye(C)?(e.consume(C),T):D(C)}function j(C){return C===45||C===46||C===58||C===95||pn(C)?(e.consume(C),j):F(C)}function F(C){return C===61?(e.consume(C),M):Ye(C)?(e.consume(C),F):T(C)}function M(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),h=C,q):Ye(C)?(e.consume(C),M):K(C)}function q(C){return C===h?(e.consume(C),h=null,te):C===null||Oe(C)?n(C):(e.consume(C),q)}function K(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||xt(C)?F(C):(e.consume(C),K)}function te(C){return C===47||C===62||Ye(C)?T(C):n(C)}function D(C){return C===62?(e.consume(C),P):n(C)}function P(C){return C===null||Oe(C)?J(C):Ye(C)?(e.consume(C),P):n(C)}function J(C){return C===45&&s===2?(e.consume(C),U):C===60&&s===1?(e.consume(C),ae):C===62&&s===4?(e.consume(C),L):C===63&&s===3?(e.consume(C),R):C===93&&s===5?(e.consume(C),he):Oe(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Dj,Z,re)(C)):C===null||Oe(C)?(e.exit("htmlFlowData"),re(C)):(e.consume(C),J)}function re(C){return e.check(Lj,Q,Z)(C)}function Q(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),Y}function Y(C){return C===null||Oe(C)?re(C):(e.enter("htmlFlowData"),J(C))}function U(C){return C===45?(e.consume(C),R):J(C)}function ae(C){return C===47?(e.consume(C),c="",G):J(C)}function G(C){if(C===62){const pe=c.toLowerCase();return x0.includes(pe)?(e.consume(C),L):J(C)}return Tn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),G):J(C)}function he(C){return C===93?(e.consume(C),R):J(C)}function R(C){return C===62?(e.consume(C),L):C===45&&s===2?(e.consume(C),R):J(C)}function L(C){return C===null||Oe(C)?(e.exit("htmlFlowData"),Z(C)):(e.consume(C),L)}function Z(C){return e.exit("htmlFlow"),t(C)}}function Bj(e,t,n){const a=this;return s;function s(c){return Oe(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),o):n(c)}function o(c){return a.parser.lazy[a.now().line]?n(c):t(c)}}function Uj(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(_c,t,n)}}const $j={name:"htmlText",tokenize:Fj};function Fj(e,t,n){const a=this;let s,o,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),F):R===63?(e.consume(R),T):Tn(R)?(e.consume(R),K):n(R)}function m(R){return R===45?(e.consume(R),b):R===91?(e.consume(R),o=0,E):Tn(R)?(e.consume(R),A):n(R)}function b(R){return R===45?(e.consume(R),x):n(R)}function g(R){return R===null?n(R):R===45?(e.consume(R),v):Oe(R)?(c=g,ae(R)):(e.consume(R),g)}function v(R){return R===45?(e.consume(R),x):g(R)}function x(R){return R===62?U(R):R===45?v(R):g(R)}function E(R){const L="CDATA[";return R===L.charCodeAt(o++)?(e.consume(R),o===L.length?w:E):n(R)}function w(R){return R===null?n(R):R===93?(e.consume(R),k):Oe(R)?(c=w,ae(R)):(e.consume(R),w)}function k(R){return R===93?(e.consume(R),_):w(R)}function _(R){return R===62?U(R):R===93?(e.consume(R),_):w(R)}function A(R){return R===null||R===62?U(R):Oe(R)?(c=A,ae(R)):(e.consume(R),A)}function T(R){return R===null?n(R):R===63?(e.consume(R),j):Oe(R)?(c=T,ae(R)):(e.consume(R),T)}function j(R){return R===62?U(R):T(R)}function F(R){return Tn(R)?(e.consume(R),M):n(R)}function M(R){return R===45||pn(R)?(e.consume(R),M):q(R)}function q(R){return Oe(R)?(c=q,ae(R)):Ye(R)?(e.consume(R),q):U(R)}function K(R){return R===45||pn(R)?(e.consume(R),K):R===47||R===62||xt(R)?te(R):n(R)}function te(R){return R===47?(e.consume(R),U):R===58||R===95||Tn(R)?(e.consume(R),D):Oe(R)?(c=te,ae(R)):Ye(R)?(e.consume(R),te):U(R)}function D(R){return R===45||R===46||R===58||R===95||pn(R)?(e.consume(R),D):P(R)}function P(R){return R===61?(e.consume(R),J):Oe(R)?(c=P,ae(R)):Ye(R)?(e.consume(R),P):te(R)}function J(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),s=R,re):Oe(R)?(c=J,ae(R)):Ye(R)?(e.consume(R),J):(e.consume(R),Q)}function re(R){return R===s?(e.consume(R),s=void 0,Y):R===null?n(R):Oe(R)?(c=re,ae(R)):(e.consume(R),re)}function Q(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||xt(R)?te(R):(e.consume(R),Q)}function Y(R){return R===47||R===62||xt(R)?te(R):n(R)}function U(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ae(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),G}function G(R){return Ye(R)?tt(e,he,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):he(R)}function he(R){return e.enter("htmlTextData"),c(R)}}const vg={name:"labelEnd",resolveAll:Kj,resolveTo:Gj,tokenize:Qj},Pj={tokenize:Yj},qj={tokenize:Vj},Hj={tokenize:Xj};function Kj(e){let t=-1;const n=[];for(;++t<e.length;){const a=e[t][1];if(n.push(e[t]),a.type==="labelImage"||a.type==="labelLink"||a.type==="labelEnd"){const s=a.type==="labelImage"?4:2;a.type="data",t+=s}}return e.length!==n.length&&ai(e,0,e.length,n),e}function Gj(e,t){let n=e.length,a=0,s,o,c,f;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=xi(f,e.slice(o+1,o+a+3)),f=xi(f,[["enter",b,t]]),f=xi(f,Jf(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=xi(f,[["exit",b,t],e[c-2],e[c-1],["exit",m,t]]),f=xi(f,e.slice(c+1)),f=xi(f,[["exit",h,t]]),ai(e,o,e.length,f),e}function Qj(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return f;function f(v){return o?o._inactive?g(v):(c=a.parser.defined.includes(Mi(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),h):n(v)}function h(v){return v===40?e.attempt(Pj,b,c?b:g)(v):v===91?e.attempt(qj,b,c?m:g)(v):c?b(v):g(v)}function m(v){return e.attempt(Hj,b,g)(v)}function b(v){return t(v)}function g(v){return o._balanced=!0,n(v)}}function Yj(e,t,n){return a;function a(g){return e.enter("resource"),e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),s}function s(g){return xt(g)?ec(e,o)(g):o(g)}function o(g){return g===41?b(g):OS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return xt(g)?ec(e,h)(g):b(g)}function f(g){return n(g)}function h(g){return g===34||g===39||g===40?MS(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function m(g){return xt(g)?ec(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function Vj(e,t,n){const a=this;return s;function s(f){return RS.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes(Mi(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function Xj(e,t,n){return a;function a(o){return e.enter("reference"),e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),s}function s(o){return o===93?(e.enter("referenceMarker"),e.consume(o),e.exit("referenceMarker"),e.exit("reference"),t):n(o)}}const Wj={name:"labelStartImage",resolveAll:vg.resolveAll,tokenize:Zj};function Zj(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const Jj={name:"labelStartLink",resolveAll:vg.resolveAll,tokenize:eD};function eD(e,t,n){const a=this;return s;function s(c){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelLink"),o}function o(c){return c===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(c):t(c)}}const Cm={name:"lineEnding",tokenize:tD};function tD(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),tt(e,t,"linePrefix")}}const pf={name:"thematicBreak",tokenize:nD};function nD(e,t,n){let a=0,s;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return s=m,f(m)}function f(m){return m===s?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||Oe(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===s?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),Ye(m)?tt(e,f,"whitespace")(m):f(m))}}const Bn={continuation:{tokenize:sD},exit:oD,name:"list",tokenize:rD},iD={partial:!0,tokenize:cD},aD={partial:!0,tokenize:lD};function rD(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(x){const E=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:vp(x)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(pf,n,m)(x):m(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(x)}return n(x)}function h(x){return vp(x)&&++c<10?(e.consume(x),h):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),m(x)):n(x)}function m(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(_c,a.interrupt?n:b,e.attempt(iD,v,g))}function b(x){return a.containerState.initialBlankLine=!0,o++,v(x)}function g(x){return Ye(x)?(e.enter("listItemPrefixWhitespace"),e.consume(x),e.exit("listItemPrefixWhitespace"),v):n(x)}function v(x){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(x)}}function sD(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(_c,s,o);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,tt(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!Ye(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(aD,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,tt(e,e.attempt(Bn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function lD(e,t,n){const a=this;return tt(e,s,"listItemIndent",a.containerState.size+1);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="listItemIndent"&&c[2].sliceSerialize(c[1],!0).length===a.containerState.size?t(o):n(o)}}function oD(e){e.exit(this.containerState.type)}function cD(e,t,n){const a=this;return tt(e,s,"listItemPrefixWhitespace",a.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(o){const c=a.events[a.events.length-1];return!Ye(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const v0={name:"setextUnderline",resolveTo:uD,tokenize:fD};function uD(e,t){let n=e.length,a,s,o;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){a=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!o&&e[n][1].type==="definition"&&(o=n);const c={type:"setextHeading",start:{...e[a][1].start},end:{...e[e.length-1][1].end}};return e[s][1].type="setextHeadingText",o?(e.splice(s,0,["enter",c,t]),e.splice(o+1,0,["exit",e[a][1],t]),e[a][1].end={...e[o][1].end}):e[a][1]=c,e.push(["exit",c,t]),e}function fD(e,t,n){const a=this;let s;return o;function o(m){let b=a.events.length,g;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){g=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===s?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),Ye(m)?tt(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Oe(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const dD={tokenize:hD};function hD(e){const t=this,n=e.attempt(_c,a,e.attempt(this.parser.constructs.flowInitial,s,tt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(yj,s)),"linePrefix")));return n;function a(o){if(o===null){e.consume(o);return}return e.enter("lineEndingBlank"),e.consume(o),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function s(o){if(o===null){e.consume(o);return}return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const mD={resolveAll:DS()},pD=jS("string"),gD=jS("text");function jS(e){return{resolveAll:DS(e==="text"?bD:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,f);return c;function c(b){return m(b)?o(b):f(b)}function f(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),h}function h(b){return m(b)?(n.exit("data"),o(b)):(n.consume(b),h)}function m(b){if(b===null)return!0;const g=s[b];let v=-1;if(g)for(;++v<g.length;){const x=g[v];if(!x.previous||x.previous.call(a,a.previous))return!0}return!1}}}function DS(e){return t;function t(n,a){let s=-1,o;for(;++s<=n.length;)o===void 0?n[s]&&n[s][1].type==="data"&&(o=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==o+2&&(n[o][1].end=n[s-1][1].end,n.splice(o+2,s-o-2),s=o+2),o=void 0);return e?e(n,a):n}}function bD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,f=0,h;for(;o--;){const m=s[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const yD={42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:NS},xD={91:wj},vD={[-2]:Tm,[-1]:Tm,32:Tm},ED={35:Aj,42:pf,45:[v0,pf],60:jj,61:v0,95:pf,96:y0,126:y0},SD={38:CS,92:TS},wD={[-5]:Cm,[-4]:Cm,[-3]:Cm,33:Wj,38:CS,42:Ep,60:[JM,$j],91:Jj,92:[Tj,TS],93:vg,95:Ep,96:dj},_D={null:[Ep,mD]},kD={null:[42,95]},ND={null:[]},TD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:kD,contentInitial:xD,disable:ND,document:yD,flow:ED,flowInitial:vD,insideSpan:_D,string:SD,text:wD},Symbol.toStringTag,{value:"Module"}));function CD(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],f=[];const h={attempt:q(F),check:q(M),consume:A,enter:T,exit:j,interrupt:q(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let b=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function g(P){return c=xi(c,P),k(),c[c.length-1]!==null?[]:(K(t,0),m.events=Jf(o,m.events,m),m.events)}function v(P,J){return OD(x(P),J)}function x(P){return AD(c,P)}function E(){const{_bufferIndex:P,_index:J,line:re,column:Q,offset:Y}=a;return{_bufferIndex:P,_index:J,line:re,column:Q,offset:Y}}function w(P){s[P.line]=P.column,D()}function k(){let P;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(P=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===P&&a._bufferIndex<J.length;)_(J.charCodeAt(a._bufferIndex));else _(J)}}function _(P){b=b(P)}function A(P){Oe(P)?(a.line++,a.column=1,a.offset+=P===-3?2:1,D()):P!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=P}function T(P,J){const re=J||{};return re.type=P,re.start=E(),m.events.push(["enter",re,m]),f.push(re),re}function j(P){const J=f.pop();return J.end=E(),m.events.push(["exit",J,m]),J}function F(P,J){K(P,J.from)}function M(P,J){J.restore()}function q(P,J){return re;function re(Q,Y,U){let ae,G,he,R;return Array.isArray(Q)?Z(Q):"tokenize"in Q?Z([Q]):L(Q);function L(ve){return ce;function ce(ke){const Ke=ke!==null&&ve[ke],Dt=ke!==null&&ve.null,yn=[...Array.isArray(Ke)?Ke:Ke?[Ke]:[],...Array.isArray(Dt)?Dt:Dt?[Dt]:[]];return Z(yn)(ke)}}function Z(ve){return ae=ve,G=0,ve.length===0?U:C(ve[G])}function C(ve){return ce;function ce(ke){return R=te(),he=ve,ve.partial||(m.currentConstruct=ve),ve.name&&m.parser.constructs.disable.null.includes(ve.name)?_e():ve.tokenize.call(J?Object.assign(Object.create(m),J):m,h,pe,_e)(ke)}}function pe(ve){return P(he,R),Y}function _e(ve){return R.restore(),++G<ae.length?C(ae[G]):U}}}function K(P,J){P.resolveAll&&!o.includes(P)&&o.push(P),P.resolve&&ai(m.events,J,m.events.length-J,P.resolve(m.events.slice(J),m)),P.resolveTo&&(m.events=P.resolveTo(m.events,m))}function te(){const P=E(),J=m.previous,re=m.currentConstruct,Q=m.events.length,Y=Array.from(f);return{from:Q,restore:U};function U(){a=P,m.previous=J,m.currentConstruct=re,m.events.length=Q,f=Y,D()}}function D(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function AD(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function OD(e,t){let n=-1;const a=[];let s;for(;++n<e.length;){const o=e[n];let c;if(typeof o=="string")c=o;else switch(o){case-5:{c="\r";break}case-4:{c=`
497
- `;break}case-3:{c=`\r
498
- `;break}case-2:{c=t?" ":" ";break}case-1:{if(!t&&s)continue;c=" ";break}default:c=String.fromCharCode(o)}s=o===-2,a.push(c)}return a.join("")}function RD(e){const a={constructs:_S([TD,...(e||{}).extensions||[]]),content:s(GM),defined:[],document:s(YM),flow:s(dD),lazy:{},string:s(pD),text:s(gD)};return a;function s(o){return c;function c(f){return CD(a,o,f)}}}function MD(e){for(;!AS(e););return e}const E0=/[\0\t\n\r]/g;function jD(){let e=1,t="",n=!0,a;return s;function s(o,c,f){const h=[];let m,b,g,v,x;for(o=t+(typeof o=="string"?o.toString():new TextDecoder(c||void 0).decode(o)),g=0,t="",n&&(o.charCodeAt(0)===65279&&g++,n=void 0);g<o.length;){if(E0.lastIndex=g,m=E0.exec(o),v=m&&m.index!==void 0?m.index:o.length,x=o.charCodeAt(v),!m){t=o.slice(g);break}if(x===10&&g===v&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),g<v&&(h.push(o.slice(g,v)),e+=v-g),x){case 0:{h.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}g=v+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const DD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function LD(e){return e.replace(DD,ID)}function ID(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return kS(n.slice(o?2:1),o?16:10)}return xg(n)||e}const LS={}.hasOwnProperty;function zD(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),BD(n)(MD(RD(n).document().write(jD()(e,t,!0))))}function BD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(zi),autolinkProtocol:te,autolinkEmail:te,atxHeading:o(Ii),blockQuote:o(Dt),characterEscape:te,characterReference:te,codeFenced:o(yn),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(yn,c),codeText:o(Ji,c),codeTextData:te,data:te,codeFlowValue:te,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Kn),hardBreakEscape:o(Ze),hardBreakTrailing:o(Ze),htmlFlow:o(_i,c),htmlFlowData:te,htmlText:o(_i,c),htmlTextData:te,image:o(li),label:c,link:o(zi),listItem:o(Tr),listItemValue:v,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Gl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Ii),strong:o(bs),thematicBreak:o(ys)},exit:{atxHeading:h(),atxHeadingSequence:F,autolink:h(),autolinkEmail:Ke,autolinkProtocol:ke,blockQuote:h(),characterEscapeValue:D,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:ve,characterReference:ce,codeFenced:h(k),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:E,codeFlowValue:D,codeIndented:h(_),codeText:h(Y),codeTextData:D,data:D,definition:h(),definitionDestinationString:j,definitionLabelString:A,definitionTitleString:T,emphasis:h(),hardBreakEscape:h(J),hardBreakTrailing:h(J),htmlFlow:h(re),htmlFlowData:D,htmlText:h(Q),htmlTextData:D,image:h(ae),label:he,labelText:G,lineEnding:P,link:h(U),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:pe,resourceDestinationString:R,resourceTitleString:L,resource:Z,setextHeading:h(K),setextHeadingLineSequence:q,setextHeadingText:M,strong:h(),thematicBreak:h()}};IS(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let de={type:"root",children:[]};const Re={stack:[de],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:b,data:n},qe=[];let nt=-1;for(;++nt<ne.length;)if(ne[nt][1].type==="listOrdered"||ne[nt][1].type==="listUnordered")if(ne[nt][0]==="enter")qe.push(nt);else{const xn=qe.pop();nt=s(ne,xn,nt)}for(nt=-1;++nt<ne.length;){const xn=t[ne[nt][0]];LS.call(xn,ne[nt][1].type)&&xn[ne[nt][1].type].call(Object.assign({sliceSerialize:ne[nt][2].sliceSerialize},Re),ne[nt][1])}if(Re.tokenStack.length>0){const xn=Re.tokenStack[Re.tokenStack.length-1];(xn[1]||S0).call(Re,void 0,xn[0])}for(de.position={start:or(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:or(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},nt=-1;++nt<t.transforms.length;)de=t.transforms[nt](de)||de;return de}function s(ne,de,Re){let qe=de-1,nt=-1,xn=!1,ki,an,Lt,un;for(;++qe<=Re;){const ot=ne[qe];switch(ot[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ot[0]==="enter"?nt++:nt--,un=void 0;break}case"lineEndingBlank":{ot[0]==="enter"&&(ki&&!un&&!nt&&!Lt&&(Lt=qe),un=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:un=void 0}if(!nt&&ot[0]==="enter"&&ot[1].type==="listItemPrefix"||nt===-1&&ot[0]==="exit"&&(ot[1].type==="listUnordered"||ot[1].type==="listOrdered")){if(ki){let Bi=qe;for(an=void 0;Bi--;){const vn=ne[Bi];if(vn[1].type==="lineEnding"||vn[1].type==="lineEndingBlank"){if(vn[0]==="exit")continue;an&&(ne[an][1].type="lineEndingBlank",xn=!0),vn[1].type="lineEnding",an=Bi}else if(!(vn[1].type==="linePrefix"||vn[1].type==="blockQuotePrefix"||vn[1].type==="blockQuotePrefixWhitespace"||vn[1].type==="blockQuoteMarker"||vn[1].type==="listItemIndent"))break}Lt&&(!an||Lt<an)&&(ki._spread=!0),ki.end=Object.assign({},an?ne[an][1].start:ot[1].end),ne.splice(an||qe,0,["exit",ki,ot[2]]),qe++,Re++}if(ot[1].type==="listItemPrefix"){const Bi={type:"listItem",_spread:!1,start:Object.assign({},ot[1].start),end:void 0};ki=Bi,ne.splice(qe,0,["enter",Bi,ot[2]]),qe++,Re++,Lt=void 0,un=!0}}}return ne[de][1]._spread=xn,Re}function o(ne,de){return Re;function Re(qe){f.call(this,ne(qe),qe),de&&de.call(this,qe)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,de,Re){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([de,Re||void 0]),ne.position={start:or(de.start),end:void 0}}function h(ne){return de;function de(Re){ne&&ne.call(this,Re),m.call(this,Re)}}function m(ne,de){const Re=this.stack.pop(),qe=this.tokenStack.pop();if(qe)qe[0].type!==ne.type&&(de?de.call(this,ne,qe[0]):(qe[1]||S0).call(this,ne,qe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Jo({start:ne.start,end:ne.end})+"): it’s not open");Re.position.end=or(ne.end)}function b(){return yg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(ne){if(this.data.expectingFirstListItemValue){const de=this.stack[this.stack.length-2];de.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.lang=ne}function E(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.meta=ne}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne.replace(/(\r?\n|\r)$/g,"")}function A(ne){const de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=Mi(this.sliceSerialize(ne)).toLowerCase()}function T(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function j(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function F(ne){const de=this.stack[this.stack.length-1];if(!de.depth){const Re=this.sliceSerialize(ne).length;de.depth=Re}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function q(ne){const de=this.stack[this.stack.length-1];de.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function te(ne){const Re=this.stack[this.stack.length-1].children;let qe=Re[Re.length-1];(!qe||qe.type!=="text")&&(qe=Ot(),qe.position={start:or(ne.start),end:void 0},Re.push(qe)),this.stack.push(qe)}function D(ne){const de=this.stack.pop();de.value+=this.sliceSerialize(ne),de.position.end=or(ne.end)}function P(ne){const de=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=de.children[de.children.length-1];Re.position.end=or(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(de.type)&&(te.call(this,ne),D.call(this,ne))}function J(){this.data.atHardBreak=!0}function re(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function Q(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function Y(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.value=ne}function U(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function ae(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const de=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=de,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function G(ne){const de=this.sliceSerialize(ne),Re=this.stack[this.stack.length-2];Re.label=LD(de),Re.identifier=Mi(de).toLowerCase()}function he(){const ne=this.stack[this.stack.length-1],de=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const qe=ne.children;Re.children=qe}else Re.alt=de}function R(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.url=ne}function L(){const ne=this.resume(),de=this.stack[this.stack.length-1];de.title=ne}function Z(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function pe(ne){const de=this.resume(),Re=this.stack[this.stack.length-1];Re.label=de,Re.identifier=Mi(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function _e(ne){this.data.characterReferenceType=ne.type}function ve(ne){const de=this.sliceSerialize(ne),Re=this.data.characterReferenceType;let qe;Re?(qe=kS(de,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):qe=xg(de);const nt=this.stack[this.stack.length-1];nt.value+=qe}function ce(ne){const de=this.stack.pop();de.position.end=or(ne.end)}function ke(ne){D.call(this,ne);const de=this.stack[this.stack.length-1];de.url=this.sliceSerialize(ne)}function Ke(ne){D.call(this,ne);const de=this.stack[this.stack.length-1];de.url="mailto:"+this.sliceSerialize(ne)}function Dt(){return{type:"blockquote",children:[]}}function yn(){return{type:"code",lang:null,meta:null,value:""}}function Ji(){return{type:"inlineCode",value:""}}function Ra(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Kn(){return{type:"emphasis",children:[]}}function Ii(){return{type:"heading",depth:0,children:[]}}function Ze(){return{type:"break"}}function _i(){return{type:"html",value:""}}function li(){return{type:"image",title:null,url:"",alt:null}}function zi(){return{type:"link",title:null,url:"",children:[]}}function ea(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Tr(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function Gl(){return{type:"paragraph",children:[]}}function bs(){return{type:"strong",children:[]}}function Ot(){return{type:"text",value:""}}function ys(){return{type:"thematicBreak"}}}function or(e){return{line:e.line,column:e.column,offset:e.offset}}function IS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?IS(e,a):UD(e,a)}}function UD(e,t){let n;for(n in t)if(LS.call(t,n))switch(n){case"canContainEols":{const a=t[n];a&&e[n].push(...a);break}case"transforms":{const a=t[n];a&&e[n].push(...a);break}case"enter":case"exit":{const a=t[n];a&&Object.assign(e[n],a);break}}}function S0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is still open")}function $D(e){const t=this;t.parser=n;function n(a){return zD(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function FD(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function PD(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
499
- `}]}function qD(e,t){const n=t.value?t.value+`
500
- `:"",a={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(a.className=["language-"+s[0]]);let o={type:"element",tagName:"code",properties:a,children:[{type:"text",value:n}]};return t.meta&&(o.data={meta:t.meta}),e.patch(t,o),o=e.applyData(t,o),o={type:"element",tagName:"pre",properties:{},children:[o]},e.patch(t,o),o}function HD(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KD(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GD(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Kl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function QD(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YD(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function zS(e,t){const n=t.referenceType;let a="]";if(n==="collapsed"?a+="[]":n==="full"&&(a+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+a}];const s=e.all(t),o=s[0];o&&o.type==="text"?o.value="["+o.value:s.unshift({type:"text",value:"["});const c=s[s.length-1];return c&&c.type==="text"?c.value+=a:s.push({type:"text",value:a}),s}function VD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return zS(e,t);const s={src:Kl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function XD(e,t){const n={src:Kl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function WD(e,t){const n={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,n);const a={type:"element",tagName:"code",properties:{},children:[n]};return e.patch(t,a),e.applyData(t,a)}function ZD(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return zS(e,t);const s={href:Kl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function JD(e,t){const n={href:Kl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function eL(e,t,n){const a=e.all(t),s=n?tL(n):BS(t),o={},c=[];if(typeof t.checked=="boolean"){const b=a[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const b=a[f];(s||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
501
- `}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const h=a[a.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
502
- `});const m={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,m),e.applyData(t,m)}function tL(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const n=e.children;let a=-1;for(;!t&&++a<n.length;)t=BS(n[a])}return t}function BS(e){const t=e.spread;return t??e.children.length>1}function nL(e,t){const n={},a=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<a.length;){const c=a[s];if(c.type==="element"&&c.tagName==="li"&&c.properties&&Array.isArray(c.properties.className)&&c.properties.className.includes("task-list-item")){n.className=["contains-task-list"];break}}const o={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(a,!0)};return e.patch(t,o),e.applyData(t,o)}function iL(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aL(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function rL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function sL(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=mg(t.children[1]),h=bS(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function lL(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const g=t.children[h],v={},x=c?c[h]:void 0;x&&(v.align=x);let E={type:"element",tagName:o,properties:v,children:[]};g&&(E.children=e.all(g),e.patch(g,E),E=e.applyData(g,E)),m.push(E)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,b),e.applyData(t,b)}function oL(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const w0=9,_0=32;function cL(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(k0(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(k0(t.slice(s),s>0,!1)),o.join("")}function k0(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===w0||o===_0;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===w0||o===_0;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function uL(e,t){const n={type:"text",value:cL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function fL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const dL={blockquote:FD,break:PD,code:qD,delete:HD,emphasis:KD,footnoteReference:GD,heading:QD,html:YD,imageReference:VD,image:XD,inlineCode:WD,linkReference:ZD,link:JD,listItem:eL,list:nL,paragraph:iL,root:aL,strong:rL,table:sL,tableCell:oL,tableRow:lL,text:uL,thematicBreak:fL,toml:Zu,yaml:Zu,definition:Zu,footnoteDefinition:Zu};function Zu(){}const US=-1,ed=0,tc=1,Nf=2,Eg=3,Sg=4,wg=5,_g=6,$S=7,FS=8,N0=typeof self=="object"?self:globalThis,hL=(e,t)=>{const n=(s,o)=>(e.set(o,s),s),a=s=>{if(e.has(s))return e.get(s);const[o,c]=t[s];switch(o){case ed:case US:return n(c,s);case tc:{const f=n([],s);for(const h of c)f.push(a(h));return f}case Nf:{const f=n({},s);for(const[h,m]of c)f[a(h)]=a(m);return f}case Eg:return n(new Date(c),s);case Sg:{const{source:f,flags:h}=c;return n(new RegExp(f,h),s)}case wg:{const f=n(new Map,s);for(const[h,m]of c)f.set(a(h),a(m));return f}case _g:{const f=n(new Set,s);for(const h of c)f.add(a(h));return f}case $S:{const{name:f,message:h}=c;return n(new N0[f](h),s)}case FS:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(new N0[o](c),s)};return a},T0=e=>hL(new Map,e)(0),rl="",{toString:mL}={},{keys:pL}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[ed,t];const n=mL.call(e).slice(8,-1);switch(n){case"Array":return[tc,rl];case"Object":return[Nf,rl];case"Date":return[Eg,rl];case"RegExp":return[Sg,rl];case"Map":return[wg,rl];case"Set":return[_g,rl];case"DataView":return[tc,n]}return n.includes("Array")?[tc,n]:n.includes("Error")?[$S,n]:[Nf,n]},Ju=([e,t])=>e===ed&&(t==="function"||t==="symbol"),gL=(e,t,n,a)=>{const s=(c,f)=>{const h=a.push(c)-1;return n.set(f,h),h},o=c=>{if(n.has(c))return n.get(c);let[f,h]=Yo(c);switch(f){case ed:{let b=c;switch(h){case"bigint":f=FS,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return s([US],c)}return s([f,b],c)}case tc:{if(h){let v=c;return h==="DataView"?v=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(v=new Uint8Array(c)),s([h,[...v]],c)}const b=[],g=s([f,b],c);for(const v of c)b.push(o(v));return g}case Nf:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const b=[],g=s([f,b],c);for(const v of pL(c))(e||!Ju(Yo(c[v])))&&b.push([o(v),o(c[v])]);return g}case Eg:return s([f,c.toISOString()],c);case Sg:{const{source:b,flags:g}=c;return s([f,{source:b,flags:g}],c)}case wg:{const b=[],g=s([f,b],c);for(const[v,x]of c)(e||!(Ju(Yo(v))||Ju(Yo(x))))&&b.push([o(v),o(x)]);return g}case _g:{const b=[],g=s([f,b],c);for(const v of c)(e||!Ju(Yo(v)))&&b.push(o(v));return g}}const{message:m}=c;return s([f,{name:h,message:m}],c)};return o},C0=(e,{json:t,lossy:n}={})=>{const a=[];return gL(!(t||n),!!t,new Map,a)(e),a},Tf=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?T0(C0(e,t)):structuredClone(e):(e,t)=>T0(C0(e,t));function bL(e,t){const n=[{type:"text",value:"↩"}];return t>1&&n.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),n}function yL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function xL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||bL,a=e.options.footnoteBackLabel||yL,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const b=e.all(m),g=String(m.identifier).toUpperCase(),v=Kl(g.toLowerCase());let x=0;const E=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++x<=w;){E.length>0&&E.push({type:"text",value:" "});let A=typeof n=="string"?n:n(h,x);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,x),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const k=b[b.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const A=k.children[k.children.length-1];A&&A.type==="text"?A.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...E)}else b.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(b,!0)};e.patch(m,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Tf(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
503
- `},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
504
- `}]}}const kc=(function(e){if(e==null)return wL;if(typeof e=="function")return td(e);if(typeof e=="object")return Array.isArray(e)?vL(e):EL(e);if(typeof e=="string")return SL(e);throw new Error("Expected function, string, or object as test")});function vL(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=kc(e[n]);return td(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function EL(e){const t=e;return td(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function SL(e){return td(t);function t(n){return n&&n.type===e}}function td(e){return t;function t(n,a,s){return!!(_L(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function wL(){return!0}function _L(e){return e!==null&&typeof e=="object"&&"type"in e}const PS=[],kL=!0,Sp=!1,NL="skip";function qS(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=kc(s),c=a?-1:1;f(e,void 0,[])();function f(h,m,b){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const x=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(h.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=PS,E,w,k;if((!t||o(h,m,b[b.length-1]||void 0))&&(x=TL(n(h,b)),x[0]===Sp))return x;if("children"in h&&h.children){const _=h;if(_.children&&x[0]!==NL)for(w=(a?_.children.length:-1)+c,k=b.concat(_);w>-1&&w<_.children.length;){const A=_.children[w];if(E=f(A,w,k)(),E[0]===Sp)return E;w=typeof E[1]=="number"?E[1]:w+c}}return x}}}function TL(e){return Array.isArray(e)?e:typeof e=="number"?[kL,e]:e==null?PS:[e]}function nd(e,t,n,a){let s,o,c;typeof t=="function"&&typeof n!="function"?(o=void 0,c=t,s=n):(o=t,c=n,s=a),qS(e,o,f,s);function f(h,m){const b=m[m.length-1],g=b?b.children.indexOf(h):void 0;return c(h,g,b)}}const wp={}.hasOwnProperty,CL={};function AL(e,t){const n=t||CL,a=new Map,s=new Map,o=new Map,c={...dL,...n.handlers},f={all:m,applyData:RL,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:n,patch:OL,wrap:jL};return nd(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?a:s,v=String(b.identifier).toUpperCase();g.has(v)||g.set(v,b)}}),f;function h(b,g){const v=b.type,x=f.handlers[v];if(wp.call(f.handlers,v)&&x)return x(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(v)){if("children"in b){const{children:w,...k}=b,_=Tf(k);return _.children=f.all(b),_}return Tf(b)}return(f.options.unknownHandler||ML)(f,b,g)}function m(b){const g=[];if("children"in b){const v=b.children;let x=-1;for(;++x<v.length;){const E=f.one(v[x],b);if(E){if(x&&v[x-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=A0(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=A0(w.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function OL(e,t){e.position&&(t.position=yM(e))}function RL(e,t){let n=t;if(e&&e.data){const a=e.data.hName,s=e.data.hChildren,o=e.data.hProperties;if(typeof a=="string")if(n.type==="element")n.tagName=a;else{const c="children"in n?n.children:[n];n={type:"element",tagName:a,properties:{},children:c}}n.type==="element"&&o&&Object.assign(n.properties,Tf(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function ML(e,t){const n=t.data||{},a="value"in t&&!(wp.call(n,"hProperties")||wp.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function jL(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
505
- `});++a<e.length;)a&&n.push({type:"text",value:`
506
- `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
507
- `}),n}function A0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function O0(e,t){const n=AL(e,t),a=n.one(e,void 0),s=xL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
508
- `},s),o}function DL(e,t){return e&&"run"in e?async function(n,a){const s=O0(n,{file:a,...t});await e.run(s,a)}:function(n,a){return O0(n,{file:a,...e||t})}}function R0(e){if(e)throw e}var Am,M0;function LL(){if(M0)return Am;M0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var b=e.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!g)return!1;var v;for(v in m);return typeof v>"u"||e.call(m,v)},c=function(m,b){n&&b.name==="__proto__"?n(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},f=function(m,b){if(b==="__proto__")if(e.call(m,b)){if(a)return a(m,b).value}else return;return m[b]};return Am=function h(){var m,b,g,v,x,E,w=arguments[0],k=1,_=arguments.length,A=!1;for(typeof w=="boolean"&&(A=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(m=arguments[k],m!=null)for(b in m)g=f(w,b),v=f(m,b),w!==v&&(A&&v&&(o(v)||(x=s(v)))?(x?(x=!1,E=g&&s(g)?g:[]):E=g&&o(g)?g:{},c(w,{name:b,newValue:h(A,E,v)})):typeof v<"u"&&c(w,{name:b,newValue:v}));return w},Am}var IL=LL();const Om=Ap(IL);function _p(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function zL(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(h,...m){const b=e[++o];let g=-1;if(h){c(h);return}for(;++g<s.length;)(m[g]===null||m[g]===void 0)&&(m[g]=s[g]);s=m,b?BL(b,f)(...m):c(null,...m)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function BL(e,t){let n;return a;function a(...c){const f=e.length>c.length;let h;f&&c.push(s);try{h=e.apply(this,c)}catch(m){const b=m;if(f&&n)throw b;return s(b)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,s):h instanceof Error?s(h):o(h))}function s(c,...f){n||(n=!0,t(c,...f))}function o(c){s(null,c)}}const Ki={basename:UL,dirname:$L,extname:FL,join:PL,sep:"/"};function UL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Nc(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function $L(e){if(Nc(e),e.length===0)return".";let t=-1,n=e.length,a;for(;--n;)if(e.codePointAt(n)===47){if(a){t=n;break}}else a||(a=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function FL(e){Nc(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function PL(...e){let t=-1,n;for(;++t<e.length;)Nc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":qL(n)}function qL(e){Nc(e);const t=e.codePointAt(0)===47;let n=HL(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function HL(e,t){let n="",a=0,s=-1,o=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else f===46&&o>-1?o++:o=-1}return n}function Nc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const KL={cwd:GL};function GL(){return"/"}function kp(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function QL(e){if(typeof e=="string")e=new URL(e);else if(!kp(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return YL(e)}function YL(e){if(e.hostname!==""){const a=new TypeError('File URL host must be "localhost" or empty on darwin');throw a.code="ERR_INVALID_FILE_URL_HOST",a}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const a=t.codePointAt(n+2);if(a===70||a===102){const s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Rm=["history","path","basename","stem","extname","dirname"];class HS{constructor(t){let n;t?kp(t)?n={path:t}:typeof t=="string"||VL(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":KL.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rm.length;){const o=Rm[a];o in n&&n[o]!==void 0&&n[o]!==null&&(this[o]=o==="history"?[...n[o]]:n[o])}let s;for(s in n)Rm.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Ki.basename(this.path):void 0}set basename(t){jm(t,"basename"),Mm(t,"basename"),this.path=Ki.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Ki.dirname(this.path):void 0}set dirname(t){j0(this.basename,"dirname"),this.path=Ki.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Ki.extname(this.path):void 0}set extname(t){if(Mm(t,"extname"),j0(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Ki.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kp(t)&&(t=QL(t)),jm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Ki.basename(this.path,this.extname):void 0}set stem(t){jm(t,"stem"),Mm(t,"stem"),this.path=Ki.join(this.dirname||"",t+(this.extname||""))}fail(t,n,a){const s=this.message(t,n,a);throw s.fatal=!0,s}info(t,n,a){const s=this.message(t,n,a);return s.fatal=void 0,s}message(t,n,a){const s=new bn(t,n,a);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Mm(e,t){if(e&&e.includes(Ki.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Ki.sep+"`")}function jm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function j0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function VL(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const XL=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),WL={}.hasOwnProperty;class kg extends XL{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=zL()}copy(){const t=new kg;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Om(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Im("data",this.frozen),this.namespace[t]=n,this):WL.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Im("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...a]=this.attachers[this.freezeIndex];if(a[0]===!1)continue;a[0]===!0&&(a[0]=void 0);const s=n.call(t,...a);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=ef(t),a=this.parser||this.Parser;return Dm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),Dm("process",this.parser||this.Parser),Lm("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const f=ef(t),h=a.parse(f);a.run(h,f,function(b,g,v){if(b||!g||!v)return m(b);const x=g,E=a.stringify(x,v);e3(E)?v.value=E:v.result=E,m(b,v)});function m(b,g){b||!g?c(b):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),Dm("processSync",this.parser||this.Parser),Lm("processSync",this.compiler||this.Compiler),this.process(t,s),L0("processSync","process",n),a;function s(o,c){n=!0,R0(o),a=c}}run(t,n,a){D0(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const h=ef(n);s.run(t,h,m);function m(b,g,v){const x=g||t;b?f(b):c?c(x):a(void 0,x,v)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),L0("runSync","run",a),s;function o(c,f){R0(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=ef(n),s=this.compiler||this.Compiler;return Lm("stringify",s),D0(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Im("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...g]=m;h(b,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))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");f(m.plugins),m.settings&&(s.settings=Om(!0,s.settings,m.settings))}function f(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const g=m[b];o(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,b){let g=-1,v=-1;for(;++g<a.length;)if(a[g][0]===m){v=g;break}if(v===-1)a.push([m,...b]);else if(b.length>0){let[x,...E]=b;const w=a[v][1];_p(w)&&_p(x)&&(x=Om(!0,w,x)),a[v]=[m,x,...E]}}}}const ZL=new kg().freeze();function Dm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Im(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function D0(e){if(!_p(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function L0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ef(e){return JL(e)?e:new HS(e)}function JL(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function e3(e){return typeof e=="string"||t3(e)}function t3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const n3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",I0=[],z0={allowDangerousHtml:!0},i3=/^(https?|ircs?|mailto|xmpp)$/i,a3=[{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 Ng(e){const t=r3(e),n=s3(e);return l3(t.runSync(t.parse(n),n),e)}function r3(e){const t=e.rehypePlugins||I0,n=e.remarkPlugins||I0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...z0}:z0;return ZL().use($D).use(n).use(DL,a).use(t)}function s3(e){const t=e.children||"",n=new HS;return typeof t=="string"&&(n.value=t),n}function l3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||o3;for(const b of a3)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+n3+b.id,void 0);return nd(e,m),wM(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(b,g,v){if(b.type==="raw"&&v&&typeof g=="number")return c?v.children.splice(g,1):v.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let x;for(x in Nm)if(Object.hasOwn(Nm,x)&&Object.hasOwn(b.properties,x)){const E=b.properties[x],w=Nm[x];(w===null||w.includes(b.tagName))&&(b.properties[x]=h(String(E||""),x,b))}}if(b.type==="element"){let x=n?!n.includes(b.tagName):o?o.includes(b.tagName):!1;if(!x&&a&&typeof g=="number"&&(x=!a(b,g,v)),x&&v&&typeof g=="number")return f&&b.children?v.children.splice(g,1,...b.children):v.children.splice(g,1),g}}}function o3(e){const t=e.indexOf(":"),n=e.indexOf("?"),a=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||a!==-1&&t>a||i3.test(e.slice(0,t))?e:""}function B0(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let a=0,s=n.indexOf(t);for(;s!==-1;)a++,s=n.indexOf(t,s+t.length);return a}function c3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function u3(e,t,n){const s=kc((n||{}).ignore||[]),o=f3(t);let c=-1;for(;++c<o.length;)qS(e,"text",f);function f(m,b){let g=-1,v;for(;++g<b.length;){const x=b[g],E=v?v.children:void 0;if(s(x,E?E.indexOf(x):void 0,v))return;v=x}if(v)return h(m,b)}function h(m,b){const g=b[b.length-1],v=o[c][0],x=o[c][1];let E=0;const k=g.children.indexOf(m);let _=!1,A=[];v.lastIndex=0;let T=v.exec(m.value);for(;T;){const j=T.index,F={index:T.index,input:T.input,stack:[...b,m]};let M=x(...T,F);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=j+1:(E!==j&&A.push({type:"text",value:m.value.slice(E,j)}),Array.isArray(M)?A.push(...M):M&&A.push(M),E=j+T[0].length,_=!0),!v.global)break;T=v.exec(m.value)}return _?(E<m.value.length&&A.push({type:"text",value:m.value.slice(E)}),g.children.splice(k,1,...A)):A=[m],k+A.length}}function f3(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let a=-1;for(;++a<n.length;){const s=n[a];t.push([d3(s[0]),h3(s[1])])}return t}function d3(e){return typeof e=="string"?new RegExp(c3(e),"g"):e}function h3(e){return typeof e=="function"?e:function(){return e}}const zm="phrasing",Bm=["autolink","link","image","label"];function m3(){return{transforms:[E3],enter:{literalAutolink:g3,literalAutolinkEmail:Um,literalAutolinkHttp:Um,literalAutolinkWww:Um},exit:{literalAutolink:v3,literalAutolinkEmail:x3,literalAutolinkHttp:b3,literalAutolinkWww:y3}}}function p3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:zm,notInConstruct:Bm},{character:":",before:"[ps]",after:"\\/",inConstruct:zm,notInConstruct:Bm}]}}function g3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Um(e){this.config.enter.autolinkProtocol.call(this,e)}function b3(e){this.config.exit.autolinkProtocol.call(this,e)}function y3(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function x3(e){this.config.exit.autolinkEmail.call(this,e)}function v3(e){this.exit(e)}function E3(e){u3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,S3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),w3]],{ignore:["link","linkReference"]})}function S3(e,t,n,a,s){let o="";if(!KS(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!_3(n)))return!1;const c=k3(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function w3(e,t,n,a){return!KS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function _3(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function k3(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],a=n.indexOf(")");const s=B0(e,"(");let o=B0(e,")");for(;a!==-1&&s>o;)e+=n.slice(0,a+1),n=n.slice(a+1),a=n.indexOf(")"),o++;return[e,n]}function KS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fs(n)||Zf(n))&&(!t||n!==47)}GS.peek=D3;function N3(){this.buffer()}function T3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function C3(){this.buffer()}function A3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function O3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function R3(e){this.exit(e)}function M3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Mi(this.sliceSerialize(e)).toLowerCase(),n.label=t}function j3(e){this.exit(e)}function D3(){return"["}function GS(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),f(),c(),o+=s.move("]"),o}function L3(){return{enter:{gfmFootnoteCallString:N3,gfmFootnoteCall:T3,gfmFootnoteDefinitionLabelString:C3,gfmFootnoteDefinition:A3},exit:{gfmFootnoteCallString:O3,gfmFootnoteCall:R3,gfmFootnoteDefinitionLabelString:M3,gfmFootnoteDefinition:j3}}}function I3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:GS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const f=o.createTracker(c);let h=f.move("[^");const m=o.enter("footnoteDefinition"),b=o.enter("label");return h+=f.move(o.safe(o.associationId(a),{before:h,after:"]"})),b(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
509
- `:" ")+o.indentLines(o.containerFlow(a,f.current()),t?QS:z3))),m(),h}}function z3(e,t,n){return t===0?e:QS(e,t,n)}function QS(e,t,n){return(n?"":" ")+e}const B3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];YS.peek=q3;function U3(){return{canContainEols:["delete"],enter:{strikethrough:F3},exit:{strikethrough:P3}}}function $3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:B3}],handlers:{delete:YS}}}function F3(e){this.enter({type:"delete",children:[]},e)}function P3(e){this.exit(e)}function YS(e,t,n,a){const s=n.createTracker(a),o=n.enter("strikethrough");let c=s.move("~~");return c+=n.containerPhrasing(e,{...s.current(),before:c,after:"~"}),c+=s.move("~~"),o(),c}function q3(){return"~"}function H3(e){return e.length}function K3(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||H3,o=[],c=[],f=[],h=[];let m=0,b=-1;for(;++b<e.length;){const w=[],k=[];let _=-1;for(e[b].length>m&&(m=e[b].length);++_<e[b].length;){const A=G3(e[b][_]);if(n.alignDelimiters!==!1){const T=s(A);k[_]=T,(h[_]===void 0||T>h[_])&&(h[_]=T)}w.push(A)}c[b]=w,f[b]=k}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<m;)o[g]=U0(a[g]);else{const w=U0(a);for(;++g<m;)o[g]=w}g=-1;const v=[],x=[];for(;++g<m;){const w=o[g];let k="",_="";w===99?(k=":",_=":"):w===108?k=":":w===114&&(_=":");let A=n.alignDelimiters===!1?1:Math.max(1,h[g]-k.length-_.length);const T=k+"-".repeat(A)+_;n.alignDelimiters!==!1&&(A=k.length+A+_.length,A>h[g]&&(h[g]=A),x[g]=A),v[g]=T}c.splice(1,0,v),f.splice(1,0,x),b=-1;const E=[];for(;++b<c.length;){const w=c[b],k=f[b];g=-1;const _=[];for(;++g<m;){const A=w[g]||"";let T="",j="";if(n.alignDelimiters!==!1){const F=h[g]-(k[g]||0),M=o[g];M===114?T=" ".repeat(F):M===99?F%2?(T=" ".repeat(F/2+.5),j=" ".repeat(F/2-.5)):(T=" ".repeat(F/2),j=T):j=" ".repeat(F)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(T),_.push(A),n.alignDelimiters!==!1&&_.push(j),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==m-1)&&_.push("|")}E.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return E.join(`
510
- `)}function G3(e){return e==null?"":String(e)}function U0(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function Q3(e,t,n,a){const s=n.enter("blockquote"),o=n.createTracker(a);o.move("> "),o.shift(2);const c=n.indentLines(n.containerFlow(e,o.current()),Y3);return s(),c}function Y3(e,t,n){return">"+(n?"":" ")+e}function V3(e,t){return $0(e,t.inConstruct,!0)&&!$0(e,t.notInConstruct,!1)}function $0(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let a=-1;for(;++a<t.length;)if(e.includes(t[a]))return!0;return!1}function F0(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
511
- `&&V3(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
512
- `}function X3(e,t){const n=String(e);let a=n.indexOf(t),s=a,o=0,c=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;a!==-1;)a===s?++o>c&&(c=o):o=1,s=a+t.length,a=n.indexOf(t,s);return c}function W3(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function Z3(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function J3(e,t,n,a){const s=Z3(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(W3(e,n)){const g=n.enter("codeIndented"),v=n.indentLines(o,eI);return g(),v}const f=n.createTracker(a),h=s.repeat(Math.max(X3(o,s)+1,3)),m=n.enter("codeFenced");let b=f.move(h);if(e.lang){const g=n.enter(`codeFencedLang${c}`);b+=f.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(n.safe(e.meta,{before:b,after:`
513
- `,encode:["`"],...f.current()})),g()}return b+=f.move(`
514
- `),o&&(b+=f.move(o+`
515
- `)),b+=f.move(h),m(),b}function eI(e,t,n){return(n?"":" ")+e}function Tg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function tI(e,t,n,a){const s=Tg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("[");return m+=h.move(n.safe(n.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":`
516
- `,...h.current()}))),f(),e.title&&(f=n.enter(`title${o}`),m+=h.move(" "+s),m+=h.move(n.safe(e.title,{before:m,after:s,...h.current()})),m+=h.move(s),f()),c(),m}function nI(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function fc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Cf(e,t,n){const a=Rl(e),s=Rl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}VS.peek=iI;function VS(e,t,n,a){const s=nI(n),o=n.enter("emphasis"),c=n.createTracker(a),f=c.move(s);let h=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const m=h.charCodeAt(0),b=Cf(a.before.charCodeAt(a.before.length-1),m,s);b.inside&&(h=fc(m)+h.slice(1));const g=h.charCodeAt(h.length-1),v=Cf(a.after.charCodeAt(0),g,s);v.inside&&(h=h.slice(0,-1)+fc(g));const x=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},f+h+x}function iI(e,t,n){return n.options.emphasis||"*"}function aI(e,t){let n=!1;return nd(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Sp}),!!((!e.depth||e.depth<3)&&yg(e)&&(t.options.setext||n))}function rI(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(aI(e,n)){const b=n.enter("headingSetext"),g=n.enter("phrasing"),v=n.containerPhrasing(e,{...o.current(),before:`
517
- `,after:`
518
- `});return g(),b(),v+`
519
- `+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
520
- `))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),h=n.enter("phrasing");o.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
521
- `,...o.current()});return/^[\t ]/.test(m)&&(m=fc(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),h(),f(),m}XS.peek=sI;function XS(e){return e.value||""}function sI(){return"<"}WS.peek=lI;function WS(e,t,n,a){const s=Tg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("![");return m+=h.move(n.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${o}`),m+=h.move(" "+s),m+=h.move(n.safe(e.title,{before:m,after:s,...h.current()})),m+=h.move(s),f()),m+=h.move(")"),c(),m}function lI(){return"!"}ZS.peek=oI;function ZS(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("![");const m=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=b,o(),s==="full"||!m||m!==g?h+=f.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function oI(){return"!"}JS.peek=cI;function JS(e,t,n){let a=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],f=n.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return s+a+s}function cI(){return"`"}function ew(e,t){const n=yg(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}tw.peek=uI;function tw(e,t,n,a){const s=Tg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,h;if(ew(e,n)){const b=n.stack;n.stack=[],f=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),n.stack=b,g}f=n.enter("link"),h=n.enter("label");let m=c.move("[");return m+=c.move(n.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(n.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=n.enter("destinationRaw"),m+=c.move(n.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=n.enter(`title${o}`),m+=c.move(" "+s),m+=c.move(n.safe(e.title,{before:m,after:s,...c.current()})),m+=c.move(s),h()),m+=c.move(")"),f(),m}function uI(e,t,n){return ew(e,n)?"<":"["}nw.peek=fI;function nw(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("[");const m=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=b,o(),s==="full"||!m||m!==g?h+=f.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function fI(){return"["}function Cg(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function dI(e){const t=Cg(e),n=e.options.bulletOther;if(!n)return t==="*"?"-":"*";if(n!=="*"&&n!=="+"&&n!=="-")throw new Error("Cannot serialize items with `"+n+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(n===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+n+"`) to be different");return n}function hI(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function iw(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function mI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?hI(n):Cg(n);const f=e.ordered?c==="."?")":".":dI(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.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&&(h=!0),iw(n)===c&&b){let g=-1;for(;++g<e.children.length;){const v=e.children[g];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),n.bulletCurrent=c;const m=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),m}function pI(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function gI(e,t,n,a){const s=pI(n);let o=n.bulletCurrent||Cg(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),b);return h(),m;function b(g,v,x){return v?(x?"":" ".repeat(c))+g:(x?o:o+" ".repeat(c-o.length))+g}}function bI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const yI=kc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xI(e,t,n,a){return(e.children.some(function(c){return yI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function vI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}aw.peek=EI;function aw(e,t,n,a){const s=vI(n),o=n.enter("strong"),c=n.createTracker(a),f=c.move(s+s);let h=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const m=h.charCodeAt(0),b=Cf(a.before.charCodeAt(a.before.length-1),m,s);b.inside&&(h=fc(m)+h.slice(1));const g=h.charCodeAt(h.length-1),v=Cf(a.after.charCodeAt(0),g,s);v.inside&&(h=h.slice(0,-1)+fc(g));const x=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},f+h+x}function EI(e,t,n){return n.options.strong||"*"}function SI(e,t,n,a){return n.safe(e.value,a)}function wI(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function _I(e,t,n){const a=(iw(n)+(n.options.ruleSpaces?" ":"")).repeat(wI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const rw={blockquote:Q3,break:F0,code:J3,definition:tI,emphasis:VS,hardBreak:F0,heading:rI,html:XS,image:WS,imageReference:ZS,inlineCode:JS,link:tw,linkReference:nw,list:mI,listItem:gI,paragraph:bI,root:xI,strong:aw,text:SI,thematicBreak:_I};function kI(){return{enter:{table:NI,tableData:P0,tableHeader:P0,tableRow:CI},exit:{codeText:AI,table:TI,tableData:$m,tableHeader:$m,tableRow:$m}}}function NI(e){const t=e._align;this.enter({type:"table",align:t.map(function(n){return n==="none"?null:n}),children:[]},e),this.data.inTable=!0}function TI(e){this.exit(e),this.data.inTable=void 0}function CI(e){this.enter({type:"tableRow",children:[]},e)}function $m(e){this.exit(e)}function P0(e){this.enter({type:"tableCell",children:[]},e)}function AI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,OI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function OI(e,t){return t==="|"?t:e}function RI(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
522
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:h,tableRow:f}};function c(x,E,w,k){return m(b(x,w,k),x.align)}function f(x,E,w,k){const _=g(x,w,k),A=m([_]);return A.slice(0,A.indexOf(`
523
- `))}function h(x,E,w,k){const _=w.enter("tableCell"),A=w.enter("phrasing"),T=w.containerPhrasing(x,{...k,before:o,after:o});return A(),_(),T}function m(x,E){return K3(x,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function b(x,E,w){const k=x.children;let _=-1;const A=[],T=E.enter("table");for(;++_<k.length;)A[_]=g(k[_],E,w);return T(),A}function g(x,E,w){const k=x.children;let _=-1;const A=[],T=E.enter("tableRow");for(;++_<k.length;)A[_]=h(k[_],x,E,w);return T(),A}function v(x,E,w){let k=rw.inlineCode(x,E,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function MI(){return{exit:{taskListCheckValueChecked:q0,taskListCheckValueUnchecked:q0,paragraph:DI}}}function jI(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:LI}}}function q0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function DI(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function LI(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);o&&f.move(c);let h=rw.listItem(e,t,n,{...a,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(b){return b+c}}function II(){return[m3(),L3(),U3(),kI(),MI()]}function zI(e){return{extensions:[p3(),I3(e),$3(),RI(e),jI()]}}const BI={tokenize:HI,partial:!0},sw={tokenize:KI,partial:!0},lw={tokenize:GI,partial:!0},ow={tokenize:QI,partial:!0},UI={tokenize:YI,partial:!0},cw={name:"wwwAutolink",tokenize:PI,previous:fw},uw={name:"protocolAutolink",tokenize:qI,previous:dw},Oa={name:"emailAutolink",tokenize:FI,previous:hw},Zi={};function $I(){return{text:Zi}}let Vr=48;for(;Vr<123;)Zi[Vr]=Oa,Vr++,Vr===58?Vr=65:Vr===91&&(Vr=97);Zi[43]=Oa;Zi[45]=Oa;Zi[46]=Oa;Zi[95]=Oa;Zi[72]=[Oa,uw];Zi[104]=[Oa,uw];Zi[87]=[Oa,cw];Zi[119]=[Oa,cw];function FI(e,t,n){const a=this;let s,o;return c;function c(g){return!Np(g)||!hw.call(a,a.previous)||Ag(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Np(g)?(e.consume(g),f):g===64?(e.consume(g),h):n(g)}function h(g){return g===46?e.check(UI,b,m)(g):g===45||g===95||pn(g)?(o=!0,e.consume(g),h):b(g)}function m(g){return e.consume(g),s=!0,h}function b(g){return o&&s&&Tn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function PI(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!fw.call(a,a.previous)||Ag(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(BI,e.attempt(sw,e.attempt(lw,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function qI(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&dw.call(a,a.previous)&&!Ag(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(Tn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const v=s.toLowerCase();if(v==="http"||v==="https")return e.consume(g),h}return n(g)}function h(g){return g===47?(e.consume(g),o?m:(o=!0,h)):n(g)}function m(g){return g===null||kf(g)||xt(g)||fs(g)||Zf(g)?n(g):e.attempt(sw,e.attempt(lw,b),n)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function HI(e,t,n){let a=0;return s;function s(c){return(c===87||c===119)&&a<3?(a++,e.consume(c),s):c===46&&a===3?(e.consume(c),o):n(c)}function o(c){return c===null?n(c):t(c)}}function KI(e,t,n){let a,s,o;return c;function c(m){return m===46||m===95?e.check(ow,h,f)(m):m===null||xt(m)||fs(m)||m!==45&&Zf(m)?h(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(s=a,a=void 0),e.consume(m),c}function h(m){return s||a||!o?n(m):t(m)}}function GI(e,t){let n=0,a=0;return s;function s(c){return c===40?(n++,e.consume(c),s):c===41&&a<n?o(c):c===33||c===34||c===38||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===60||c===63||c===93||c===95||c===126?e.check(ow,t,o)(c):c===null||xt(c)||fs(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function QI(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||xt(f)||fs(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||xt(f)||fs(f)?t(f):a(f)}function o(f){return Tn(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):Tn(f)?(e.consume(f),c):n(f)}}function YI(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return pn(o)?n(o):t(o)}}function fw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||xt(e)}function dw(e){return!Tn(e)}function hw(e){return!(e===47||Np(e))}function Np(e){return e===43||e===45||e===46||e===95||pn(e)}function Ag(e){let t=e.length,n=!1;for(;t--;){const a=e[t][1];if((a.type==="labelLink"||a.type==="labelImage")&&!a._balanced){n=!0;break}if(a._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const VI={tokenize:iz,partial:!0};function XI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ez,continuation:{tokenize:tz},exit:nz}},text:{91:{name:"gfmFootnoteCall",tokenize:JI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:WI,resolveTo:ZI}}}}function WI(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const h=a.events[s][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return n(h);const m=Mi(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function ZI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function JI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),h}function h(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(g){if(o>999||g===93&&!c||g===null||g===91||xt(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return s.includes(Mi(a.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return xt(g)||(c=!0),o++,e.consume(g),g===92?b:m}function b(g){return g===91||g===92||g===93?(e.consume(g),o++,m):m(g)}}function ez(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return h;function h(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(E)}function b(E){if(c>999||E===93&&!f||E===null||E===91||xt(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Mi(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return xt(E)||(f=!0),c++,e.consume(E),E===92?g:b}function g(E){return E===91||E===92||E===93?(e.consume(E),c++,b):b(E)}function v(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(o)||s.push(o),tt(e,x,"gfmFootnoteDefinitionWhitespace")):n(E)}function x(E){return t(E)}}function tz(e,t,n){return e.check(_c,t,e.attempt(VI,t,n))}function nz(e){e.exit("gfmFootnoteDefinition")}function iz(e,t,n){const a=this;return tt(e,s,"gfmFootnoteDefinitionIndent",5);function s(o){const c=a.events[a.events.length-1];return c&&c[1].type==="gfmFootnoteDefinitionIndent"&&c[2].sliceSerialize(c[1],!0).length===4?t(o):n(o)}}function az(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let m=h;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[h][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},v=[["enter",b,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",g,f]],x=f.parser.constructs.insideSpan.null;x&&ai(v,v.length,0,Jf(x,c.slice(m+1,h),f)),ai(v,v.length,0,[["exit",g,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",b,f]]),ai(c,m-1,h-m+3,v),h=m+v.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,f,h){const m=this.previous,b=this.events;let g=0;return v;function v(E){return m===126&&b[b.length-1][1].type!=="characterEscape"?h(E):(c.enter("strikethroughSequenceTemporary"),x(E))}function x(E){const w=Rl(m);if(E===126)return g>1?h(E):(c.consume(E),g++,x);if(g<2&&!n)return h(E);const k=c.exit("strikethroughSequenceTemporary"),_=Rl(E);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,f(E)}}}class rz{constructor(){this.map=[]}add(t,n,a){sz(this,t,n,a)}consume(t){if(this.map.sort(function(o,c){return o[0]-c[0]}),this.map.length===0)return;let n=this.map.length;const a=[];for(;n>0;)n-=1,a.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];a.push(t.slice()),t.length=0;let s=a.pop();for(;s;){for(const o of s)t.push(o);s=a.pop()}this.map.length=0}}function sz(e,t,n,a){let s=0;if(!(n===0&&a.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...a);return}s+=1}e.map.push([t,n,a])}}function lz(e,t){let n=!1;const a=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&a.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const o=a.length-1;a[o]=a[o]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return a}function oz(){return{flow:{null:{name:"table",tokenize:cz,resolveAll:uz}}}}function cz(e,t,n){const a=this;let s=0,o=0,c;return f;function f(D){let P=a.events.length-1;for(;P>-1;){const Q=a.events[P][1].type;if(Q==="lineEnding"||Q==="linePrefix")P--;else break}const J=P>-1?a.events[P][1].type:null,re=J==="tableHead"||J==="tableRow"?M:h;return re===M&&a.parser.lazy[a.now().line]?n(D):re(D)}function h(D){return e.enter("tableHead"),e.enter("tableRow"),m(D)}function m(D){return D===124||(c=!0,o+=1),b(D)}function b(D){return D===null?n(D):Oe(D)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(D),e.exit("lineEnding"),x):n(D):Ye(D)?tt(e,b,"whitespace")(D):(o+=1,c&&(c=!1,s+=1),D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(D)))}function g(D){return D===null||D===124||xt(D)?(e.exit("data"),b(D)):(e.consume(D),D===92?v:g)}function v(D){return D===92||D===124?(e.consume(D),g):g(D)}function x(D){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(D):(e.enter("tableDelimiterRow"),c=!1,Ye(D)?tt(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(D):E(D))}function E(D){return D===45||D===58?k(D):D===124?(c=!0,e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),w):F(D)}function w(D){return Ye(D)?tt(e,k,"whitespace")(D):k(D)}function k(D){return D===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),_):D===45?(o+=1,_(D)):D===null||Oe(D)?j(D):F(D)}function _(D){return D===45?(e.enter("tableDelimiterFiller"),A(D)):F(D)}function A(D){return D===45?(e.consume(D),A):D===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(D),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(D))}function T(D){return Ye(D)?tt(e,j,"whitespace")(D):j(D)}function j(D){return D===124?E(D):D===null||Oe(D)?!c||s!==o?F(D):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(D)):F(D)}function F(D){return n(D)}function M(D){return e.enter("tableRow"),q(D)}function q(D){return D===124?(e.enter("tableCellDivider"),e.consume(D),e.exit("tableCellDivider"),q):D===null||Oe(D)?(e.exit("tableRow"),t(D)):Ye(D)?tt(e,q,"whitespace")(D):(e.enter("data"),K(D))}function K(D){return D===null||D===124||xt(D)?(e.exit("data"),q(D)):(e.consume(D),D===92?te:K)}function te(D){return D===92||D===124?(e.consume(D),K):K(D)}}function uz(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,b,g;const v=new rz;for(;++n<e.length;){const x=e[n],E=x[1];x[0]==="enter"?E.type==="tableHead"?(f=!1,h!==0&&(H0(v,t,h,m,b),b=void 0,h=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(n,0,[["enter",m,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,g=void 0,o=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(n,0,[["enter",b,t]])),s=E.type==="tableDelimiterRow"?2:b?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],g=tf(v,t,o,s,void 0,g),o=[0,0,0,0]),c[2]=n)):E.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],g=tf(v,t,o,s,void 0,g)),o=c,c=[o[1],n,0,0])):E.type==="tableHead"?(f=!0,h=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=n,o[1]!==0?(c[0]=c[1],g=tf(v,t,o,s,n,g)):c[1]!==0&&(g=tf(v,t,c,s,n,g)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&H0(v,t,h,m,b),v.consume(t.events),n=-1;++n<t.events.length;){const x=t.events[n];x[0]==="enter"&&x[1].type==="table"&&(x[1]._align=lz(t.events,n))}return e}function tf(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(o.end=Object.assign({},sl(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const h=sl(t.events,n[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const m=sl(t.events,n[2]),b=sl(t.events,n[3]),g={type:f,start:Object.assign({},m),end:Object.assign({},b)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const v=t.events[n[2]],x=t.events[n[3]];if(v[1].end=Object.assign({},x[1].end),v[1].type="chunkText",v[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,w=n[3]-n[2]-1;e.add(E,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},sl(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function H0(e,t,n,a,s){const o=[],c=sl(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function sl(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const fz={name:"tasklistCheck",tokenize:hz};function dz(){return{text:{91:fz}}}function hz(e,t,n){const a=this;return s;function s(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return xt(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):n(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return Oe(h)?t(h):Ye(h)?e.check({tokenize:mz},t,n)(h):n(h)}}function mz(e,t,n){return tt(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function pz(e){return _S([$I(),XI(),az(e),oz(),dz()])}const gz={};function Og(e){const t=this,n=e||gz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(pz(n)),o.push(II()),c.push(zI(n))}const K0=(function(e,t,n){const a=kc(n);if(!e||!e.type||!e.children)throw new Error("Expected parent node");if(typeof t=="number"){if(t<0||t===Number.POSITIVE_INFINITY)throw new Error("Expected positive finite number as index")}else if(t=e.children.indexOf(t),t<0)throw new Error("Expected child node or index");for(;++t<e.children.length;)if(a(e.children[t],t,e))return e.children[t]}),gs=(function(e){if(e==null)return xz;if(typeof e=="string")return yz(e);if(typeof e=="object")return bz(e);if(typeof e=="function")return Rg(e);throw new Error("Expected function, string, or array as `test`")});function bz(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gs(e[n]);return Rg(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function yz(e){return Rg(t);function t(n){return n.tagName===e}}function Rg(e){return t;function t(n,a,s){return!!(vz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function xz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function vz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const G0=/\n/g,Q0=/[\t ]+/g,Tp=gs("br"),Y0=gs(Cz),Ez=gs("p"),V0=gs("tr"),Sz=gs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Tz,Az]),mw=gs(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function wz(e,t){const n=t||{},a="children"in e?e.children:[],s=mw(e),o=bw(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...gw(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...pw(a[f],e,{whitespace:o,breakBefore:f?void 0:s,breakAfter:f<a.length-1?Tp(a[f+1]):s}));const h=[];let m;for(f=-1;++f<c.length;){const b=c[f];typeof b=="number"?m!==void 0&&b>m&&(m=b):b&&(m!==void 0&&m>-1&&h.push(`
524
- `.repeat(m)||" "),m=-1,h.push(b))}return h.join("")}function pw(e,t,n){return e.type==="element"?_z(e,t,n):e.type==="text"?n.whitespace==="normal"?gw(e,n):kz(e):[]}function _z(e,t,n){const a=bw(e,n),s=e.children||[];let o=-1,c=[];if(Sz(e))return c;let f,h;for(Tp(e)||V0(e)&&K0(t,e,V0)?h=`
525
- `:Ez(e)?(f=2,h=2):mw(e)&&(f=1,h=1);++o<s.length;)c=c.concat(pw(s[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<s.length-1?Tp(s[o+1]):h}));return Y0(e)&&K0(t,e,Y0)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function gw(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){G0.lastIndex=o;const h=G0.exec(n),m=h&&"index"in h?h.index:n.length;a.push(Nz(n.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function kz(e){return[String(e.value)]}function Nz(e,t,n){const a=[];let s=0,o;for(;s<e.length;){Q0.lastIndex=s;const c=Q0.exec(e);o=c?c.index:e.length,!s&&!o&&c&&!t&&a.push(""),s!==o&&a.push(e.slice(s,o)),s=c?o+c[0].length:o}return s!==o&&!n&&a.push(""),a.join(" ")}function bw(e,t){if(e.type==="element"){const n=e.properties||{};switch(e.tagName){case"listing":case"plaintext":case"xmp":return"pre";case"nobr":return"nowrap";case"pre":return n.wrap?"pre-wrap":"pre";case"td":case"th":return n.noWrap?"nowrap":t.whitespace;case"textarea":return"pre-wrap"}}return t.whitespace}function Tz(e){return!!(e.properties||{}).hidden}function Cz(e){return e.tagName==="td"||e.tagName==="th"}function Az(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Oz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,b,m],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:M.concat([{begin:/\(/,end:/\)/,keywords:j,contains:M.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:j,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,K,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:j,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Rz(e){const t={type:["boolean","byte","word","String"],built_in:["KeyboardController","MouseController","SoftwareSerial","EthernetServer","EthernetClient","LiquidCrystal","RobotControl","GSMVoiceCall","EthernetUDP","EsploraTFT","HttpClient","RobotMotor","WiFiClient","GSMScanner","FileSystem","Scheduler","GSMServer","YunClient","YunServer","IPAddress","GSMClient","GSMModem","Keyboard","Ethernet","Console","GSMBand","Esplora","Stepper","Process","WiFiUDP","GSM_SMS","Mailbox","USBHost","Firmata","PImage","Client","Server","GSMPIN","FileIO","Bridge","Serial","EEPROM","Stream","Mouse","Audio","Servo","File","Task","GPRS","WiFi","Wire","TFT","GSM","SPI","SD"],_hints:["setup","loop","runShellCommandAsynchronously","analogWriteResolution","retrieveCallingNumber","printFirmwareVersion","analogReadResolution","sendDigitalPortPair","noListenOnLocalhost","readJoystickButton","setFirmwareVersion","readJoystickSwitch","scrollDisplayRight","getVoiceCallStatus","scrollDisplayLeft","writeMicroseconds","delayMicroseconds","beginTransmission","getSignalStrength","runAsynchronously","getAsynchronously","listenOnLocalhost","getCurrentCarrier","readAccelerometer","messageAvailable","sendDigitalPorts","lineFollowConfig","countryNameWrite","runShellCommand","readStringUntil","rewindDirectory","readTemperature","setClockDivider","readLightSensor","endTransmission","analogReference","detachInterrupt","countryNameRead","attachInterrupt","encryptionType","readBytesUntil","robotNameWrite","readMicrophone","robotNameRead","cityNameWrite","userNameWrite","readJoystickY","readJoystickX","mouseReleased","openNextFile","scanNetworks","noInterrupts","digitalWrite","beginSpeaker","mousePressed","isActionDone","mouseDragged","displayLogos","noAutoscroll","addParameter","remoteNumber","getModifiers","keyboardRead","userNameRead","waitContinue","processInput","parseCommand","printVersion","readNetworks","writeMessage","blinkVersion","cityNameRead","readMessage","setDataMode","parsePacket","isListening","setBitOrder","beginPacket","isDirectory","motorsWrite","drawCompass","digitalRead","clearScreen","serialEvent","rightToLeft","setTextSize","leftToRight","requestFrom","keyReleased","compassRead","analogWrite","interrupts","WiFiServer","disconnect","playMelody","parseFloat","autoscroll","getPINUsed","setPINUsed","setTimeout","sendAnalog","readSlider","analogRead","beginWrite","createChar","motorsStop","keyPressed","tempoWrite","readButton","subnetMask","debugPrint","macAddress","writeGreen","randomSeed","attachGPRS","readString","sendString","remotePort","releaseAll","mouseMoved","background","getXChange","getYChange","answerCall","getResult","voiceCall","endPacket","constrain","getSocket","writeJSON","getButton","available","connected","findUntil","readBytes","exitValue","readGreen","writeBlue","startLoop","IPAddress","isPressed","sendSysex","pauseMode","gatewayIP","setCursor","getOemKey","tuneWrite","noDisplay","loadImage","switchPIN","onRequest","onReceive","changePIN","playFile","noBuffer","parseInt","overflow","checkPIN","knobRead","beginTFT","bitClear","updateIR","bitWrite","position","writeRGB","highByte","writeRed","setSpeed","readBlue","noStroke","remoteIP","transfer","shutdown","hangCall","beginSMS","endWrite","attached","maintain","noCursor","checkReg","checkPUK","shiftOut","isValid","shiftIn","pulseIn","connect","println","localIP","pinMode","getIMEI","display","noBlink","process","getBand","running","beginSD","drawBMP","lowByte","setBand","release","bitRead","prepare","pointTo","readRed","setMode","noFill","remove","listen","stroke","detach","attach","noTone","exists","buffer","height","bitSet","circle","config","cursor","random","IRread","setDNS","endSMS","getKey","micros","millis","begin","print","write","ready","flush","width","isPIN","blink","clear","press","mkdir","rmdir","close","point","yield","image","BSSID","click","delay","read","text","move","peek","beep","rect","line","open","seek","fill","size","turn","stop","home","find","step","tone","sqrt","RSSI","SSID","end","bit","tan","cos","sin","pow","map","abs","max","min","get","run","put"],literal:["DIGITAL_MESSAGE","FIRMATA_STRING","ANALOG_MESSAGE","REPORT_DIGITAL","REPORT_ANALOG","INPUT_PULLUP","SET_PIN_MODE","INTERNAL2V56","SYSTEM_RESET","LED_BUILTIN","INTERNAL1V1","SYSEX_START","INTERNAL","EXTERNAL","DEFAULT","OUTPUT","INPUT","HIGH","LOW"]},n=Oz(e),a=n.keywords;return a.type=[...a.type,...t.type],a.literal=[...a.literal,...t.literal],a.built_in=[...a.built_in,...t.built_in],a._hints=t._hints,n.name="Arduino",n.aliases=["ino"],n.supersetOf="cpp",n}function Mz(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},b={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},v=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],x=e.SHEBANG({binary:`(${v.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],_={match:/(\/[a-z._-]+)+/},A=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],j=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],F=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:k,built_in:[...A,...T,"set","shopt",...j,...F]},contains:[x,e.SHEBANG(),E,g,o,c,_,f,h,m,b,n]}}function jz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",k={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},_=[g,f,n,e.C_BLOCK_COMMENT_MODE,b,m],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:_.concat([{begin:/\(/,end:/\)/,keywords:k,contains:_.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:k,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(v,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(A,T,_,[g,{begin:e.IDENT_RE+"::",keywords:k},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:m,keywords:k}}}function Dz(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},F={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[F,g,f,n,e.C_BLOCK_COMMENT_MODE,b,m],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:M.concat([{begin:/\(/,end:/\)/,keywords:j,contains:M.concat(["self"]),relevance:0}]),relevance:0},K={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:j,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,K,F,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:j,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function Lz(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(b,{illegal:/\n/}),v={className:"subst",begin:/\{/,end:/\}/,keywords:c},x=e.inherit(v,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,x]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]},k=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});v.contains=[w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],x.contains=[k,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[m,w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},A={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",j={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,A],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[_,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},j]}}const Iz=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),zz=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],Bz=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],Uz=[...zz,...Bz],$z=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Fz=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),Pz=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),qz=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function Hz(e){const t=e.regex,n=Iz(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,a,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+Fz.join("|")+")"},{begin:":(:)?("+Pz.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+qz.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:$z.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+Uz.join("|")+")\\b"}]}}function Kz(e){const t=e.regex;return{name:"Diff",aliases:["patch"],contains:[{className:"meta",relevance:10,match:t.either(/^@@ +-\d+,\d+ +\+\d+,\d+ +@@/,/^\*\*\* +\d+,\d+ +\*\*\*\*$/,/^--- +\d+,\d+ +----$/)},{className:"comment",variants:[{begin:t.either(/Index: /,/^index/,/={3,}/,/^-{3}/,/^\*{3} /,/^\+{3}/,/^diff --git/),end:/$/},{match:/^\*{15}$/}]},{className:"addition",begin:/^\+/,end:/$/},{className:"deletion",begin:/^-/,end:/$/},{className:"addition",begin:/^!/,end:/$/}]}}function Gz(e){const o={keyword:["break","case","chan","const","continue","default","defer","else","fallthrough","for","func","go","goto","if","import","interface","map","package","range","return","select","struct","switch","type","var"],type:["bool","byte","complex64","complex128","error","float32","float64","int8","int16","int32","int64","string","uint8","uint16","uint32","uint64","int","uint","uintptr","rune"],literal:["true","false","iota","nil"],built_in:["append","cap","close","complex","copy","imag","len","make","new","panic","print","println","real","recover","delete"]};return{name:"Go",aliases:["golang"],keywords:o,illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"string",variants:[e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{begin:"`",end:"`"}]},{className:"number",variants:[{match:/-?\b0[xX]\.[a-fA-F0-9](_?[a-fA-F0-9])*[pP][+-]?\d(_?\d)*i?/,relevance:0},{match:/-?\b0[xX](_?[a-fA-F0-9])+((\.([a-fA-F0-9](_?[a-fA-F0-9])*)?)?[pP][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b0[oO](_?[0-7])*i?/,relevance:0},{match:/-?\.\d(_?\d)*([eE][+-]?\d(_?\d)*)?i?/,relevance:0},{match:/-?\b\d(_?\d)*(\.(\d(_?\d)*)?)?([eE][+-]?\d(_?\d)*)?i?/,relevance:0}]},{begin:/:=/},{className:"function",beginKeywords:"func",end:"\\s*(\\{|$)",excludeEnd:!0,contains:[e.TITLE_MODE,{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:o,illegal:/["']/}]}]}}function Qz(e){const t=e.regex,n=/[_A-Za-z][_0-9A-Za-z]*/;return{name:"GraphQL",aliases:["gql"],case_insensitive:!0,disableAutodetect:!1,keywords:{keyword:["query","mutation","subscription","type","input","schema","directive","interface","union","scalar","fragment","enum","on"],literal:["true","false","null"]},contains:[e.HASH_COMMENT_MODE,e.QUOTE_STRING_MODE,e.NUMBER_MODE,{scope:"punctuation",match:/[.]{3}/,relevance:0},{scope:"punctuation",begin:/[\!\(\)\:\=\[\]\{\|\}]{1}/,relevance:0},{scope:"variable",begin:/\$/,end:/\W/,excludeEnd:!0,relevance:0},{scope:"meta",match:/@\w+/,excludeEnd:!0},{scope:"symbol",begin:t.concat(n,t.lookahead(/\s*:/)),relevance:0}],illegal:[/[;<']/,/BEGIN/]}}function Yz(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,s,c,n,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,b=/'[^']*'/,g=t.either(h,m,b),v=t.concat(g,"(\\s*\\.\\s*",g,")*",t.lookahead(/\s*=\s*[^#\s]/));return{name:"TOML, also INI",aliases:["toml"],case_insensitive:!0,illegal:/\S/,contains:[a,{className:"section",begin:/\[+/,end:/\]+/},{begin:v,className:"attr",starts:{end:/$/,contains:[a,f,o,s,c,n]}}]}}var ll="[0-9](_*[0-9])*",nf=`\\.(${ll})`,af="[0-9a-fA-F](_*[0-9a-fA-F])*",X0={className:"number",variants:[{begin:`(\\b(${ll})((${nf})|\\.)?|(${nf}))[eE][+-]?(${ll})[fFdD]?\\b`},{begin:`\\b(${ll})((${nf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${nf})[fFdD]?\\b`},{begin:`\\b(${ll})[fFdD]\\b`},{begin:`\\b0[xX]((${af})\\.?|(${af})?\\.(${af}))[pP][+-]?(${ll})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${af})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function yw(e,t,n){return n===-1?"":e.replace(t,a=>yw(e,t,n-1))}function Vz(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+yw("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,X0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},X0,m]}}const W0="[A-Za-z$_][0-9A-Za-z$_]*",Xz=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Wz=["true","false","null","undefined","NaN","Infinity"],xw=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],vw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ew=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Zz=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Jz=[].concat(Ew,xw,vw);function e4(e){const t=e.regex,n=(G,{after:he})=>{const R="</"+G[0].slice(1);return G.input.indexOf(R,he)!==-1},a=W0,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,he)=>{const R=G[0].length+G.index,L=G.input[R];if(L==="<"||L===","){he.ignoreMatch();return}L===">"&&(n(G,{after:R})||he.ignoreMatch());let Z;const C=G.input.substring(R);if(Z=C.match(/^\s*=/)){he.ignoreMatch();return}if((Z=C.match(/^\s+extends\s+/))&&Z.index===0){he.ignoreMatch();return}}},f={$pattern:W0,keyword:Xz,literal:Wz,built_in:Jz,"variable.language":Zz},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,k,{match:/\$\d+/},g];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const j=[].concat(A,v.contains),F=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(j)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...xw,...vw]}},te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(G){return t.concat("(?!",G.join("|"),")")}const re={match:t.concat(/\b/,J([...Ew,"super","import"].map(G=>`${G}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ae={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:K},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),te,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,k,A,{match:/\$\d+/},g,K,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ae,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},re,P,q,Y,{match:/\$[(.]/}]}}function t4(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ol="[0-9](_*[0-9])*",rf=`\\.(${ol})`,sf="[0-9a-fA-F](_*[0-9a-fA-F])*",n4={className:"number",variants:[{begin:`(\\b(${ol})((${rf})|\\.)?|(${rf}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${rf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${rf})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${sf})\\.?|(${sf})?\\.(${sf}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function i4(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,s]}]};s.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},m=n4,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},v=g;return v.variants[1].contains=[g],g.variants[1].contains=[v],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,n,a,f,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,f,h,c,e.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
526
- `},m]}}const a4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),r4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],s4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],l4=[...r4,...s4],o4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),Sw=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),ww=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),c4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse(),u4=Sw.concat(ww).sort().reverse();function f4(e){const t=a4(e),n=u4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],f=[],h=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},m=function(T,j,F){return{className:T,begin:j,relevance:F}},b={$pattern:/[a-z-]+/,keyword:a,attribute:o4.join(" ")},g={begin:"\\(",end:"\\)",contains:f,keywords:b,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,m("variable","@@?"+s,10),m("variable","@\\{"+s+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const v=f.concat({begin:/\{/,end:/\}/,contains:c}),x={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},E={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+c4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:f,relevance:0}},k={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:v}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,x,m("keyword","all\\b"),m("variable","@\\{"+s+"\\}"),{begin:"\\b("+l4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Sw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+ww.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:v},{begin:"!important"},t.FUNCTION_DISPATCH]},A={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,k,A,E,_,x,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function d4(e){const t="\\[=*\\[",n="\\]=*\\]",a={begin:t,end:n,contains:["self"]},s=[e.COMMENT("--(?!"+t+")","$"),e.COMMENT("--"+t,n,{contains:[a],relevance:10})];return{name:"Lua",aliases:["pluto"],keywords:{$pattern:e.UNDERSCORE_IDENT_RE,literal:"true false nil",keyword:"and break do else elseif end for goto if in local not or repeat return then until while",built_in:"_G _ENV _VERSION __index __newindex __mode __call __metatable __tostring __len __gc __add __sub __mul __div __mod __pow __concat __unm __eq __lt __le assert collectgarbage dofile error getfenv getmetatable ipairs load loadfile loadstring module next pairs pcall print rawequal rawget rawset require select setfenv setmetatable tonumber tostring type unpack xpcall arg self coroutine resume yield status wrap create running debug getupvalue debug sethook getmetatable gethook setmetatable setlocal traceback setfenv getinfo setupvalue getlocal getregistry getfenv io lines write close flush open output type read stderr stdin input stdout popen tmpfile math log max acos huge ldexp pi cos tanh pow deg tan cosh sinh random randomseed frexp ceil floor rad abs sqrt modf asin min mod fmod log10 atan2 exp sin atan os exit setlocale date getenv difftime remove time clock tmpname rename execute package preload loadlib loaded loaders cpath config path seeall string sub upper len gfind rep find match char dump gmatch reverse byte format gsub lower table setn insert getn foreachi maxn foreach concat sort remove"},contains:s.concat([{className:"function",beginKeywords:"function",end:"\\)",contains:[e.inherit(e.TITLE_MODE,{begin:"([_a-zA-Z]\\w*\\.)*([_a-zA-Z]\\w*:)?[_a-zA-Z]\\w*"}),{className:"params",begin:"\\(",endsWithParent:!0,contains:s}].concat(s)},e.C_NUMBER_MODE,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{className:"string",begin:t,end:n,contains:[a],relevance:5}])}}function h4(e){const t={className:"variable",variants:[{begin:"\\$\\("+e.UNDERSCORE_IDENT_RE+"\\)",contains:[e.BACKSLASH_ESCAPE]},{begin:/\$[@%<?\^\+\*]/}]},n={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,t]},a={className:"variable",begin:/\$\([\w-]+\s/,end:/\)/,keywords:{built_in:"subst patsubst strip findstring filter filter-out sort word wordlist firstword lastword dir notdir suffix basename addsuffix addprefix join wildcard realpath abspath error warning shell origin flavor foreach if or and call eval file value"},contains:[t,n]},s={begin:"^"+e.UNDERSCORE_IDENT_RE+"\\s*(?=[:+?]?=)"},o={className:"meta",begin:/^\.PHONY:/,end:/$/,keywords:{$pattern:/[\.\w]+/,keyword:".PHONY"}},c={className:"section",begin:/^[^\s]+:/,end:/$/,contains:[t]};return{name:"Makefile",aliases:["mk","mak","make"],keywords:{$pattern:/[\w-]+/,keyword:"define endef undefine ifdef ifndef ifeq ifneq else endif include -include sinclude override export unexport private vpath"},contains:[e.HASH_COMMENT_MODE,t,n,a,s,o,c]}}function m4(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(m,{contains:[]}),v=e.inherit(b,{contains:[]});m.contains.push(v),b.contains.push(g);let x=[n,h];return[m,b,g,v].forEach(_=>{_.contains=_.contains.concat(x)}),x=x.concat(m,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:x},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:x}]}]},n,o,m,b,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},s,a,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function p4(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function g4(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[e.BACKSLASH_ESCAPE,o,h],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],v=(w,k,_="\\1")=>{const A=_==="\\1"?_:t.concat(_,k);return t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,A,/(?:\\.|[^\\\/])*?/,_,a)},x=(w,k,_)=>t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,_,a),E=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:v("s|tr|y",t.either(...g,{capture:!0}))},{begin:v("s|tr|y","\\(","\\)")},{begin:v("s|tr|y","\\[","\\]")},{begin:v("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:x("(?:m|qr)?",/\//,/\//)},{begin:x("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:x("m|qr",/\(/,/\)/)},{begin:x("m|qr",/\[/,/\]/)},{begin:x("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function b4(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(Q,Y)=>{Y.data._beginMatch=Q[1]||Q[2]},"on:end":(Q,Y)=>{Y.data._beginMatch!==Q[1]&&Y.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
527
- ]`,E={scope:"string",variants:[b,m,g,v]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},k=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],A=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],j={keyword:_,literal:(Q=>{const Y=[];return Q.forEach(U=>{Y.push(U),U.toLowerCase()===U?Y.push(U.toUpperCase()):Y.push(U.toLowerCase())}),Y})(k),built_in:A},F=Q=>Q.map(Y=>Y.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",F(A).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},q=t.concat(a,"\\b(?!\\()"),K={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),q],scope:{1:"title.class",3:"variable.constant"}},{match:[s,t.concat("::",t.lookahead(/(?!class\b)/))],scope:{1:"title.class"}},{match:[s,/::/,/class/],scope:{1:"title.class",3:"variable.language"}}]},te={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},D={relevance:0,begin:/\(/,end:/\)/,keywords:j,contains:[te,c,K,e.C_BLOCK_COMMENT_MODE,E,w,M]},P={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",F(_).join("\\b|"),"|",F(A).join("\\b|"),"\\b)"),a,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[D]};D.contains.push(P);const J=[te,K,e.C_BLOCK_COMMENT_MODE,E,w,M],re={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...J]},...J,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:j,contains:[re,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,P,K,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",re,c,K,e.C_BLOCK_COMMENT_MODE,E,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,w]}}function y4(e){return{name:"PHP template",subLanguage:"xml",contains:[{begin:/<\?(php|=)?/,end:/\?>/,subLanguage:"php",contains:[{begin:"/\\*",end:"\\*/",skip:!0},{begin:'b"',end:'"',skip:!0},{begin:"b'",end:"'",skip:!0},e.inherit(e.APOS_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0}),e.inherit(e.QUOTE_STRING_MODE,{illegal:null,className:null,contains:null,skip:!0})]}]}}function x4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function v4(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},b={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,b,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},v="[0-9](_?[0-9])*",x=`(\\b(${v}))?\\.(${v})|\\b(${v})\\.`,E=`\\b|${a.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${v})|(${x}))[eE][+-]?(${v})[jJ]?(?=${E})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${v})[jJ](?=${E})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,w,g,e.HASH_COMMENT_MODE]}]};return m.contains=[g,w,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,_,g]}]}}function E4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function S4(e){const t=e.regex,n=/(?:(?:[a-zA-Z]|\.[._a-zA-Z])[._a-zA-Z0-9]*)|\.(?!\d)/,a=t.either(/0[xX][0-9a-fA-F]+\.[0-9a-fA-F]*[pP][+-]?\d+i?/,/0[xX][0-9a-fA-F]+(?:[pP][+-]?\d+)?[Li]?/,/(?:\d+(?:\.\d*)?|\.\d+)(?:[eE][+-]?\d+)?[Li]?/),s=/[=!<>:]=|\|\||&&|:::?|<-|<<-|->>|->|\|>|[-+*\/?!$&|:<=>@^~]|\*\*/,o=t.either(/[()]/,/[{}]/,/\[\[/,/[[\]]/,/\\/,/,/);return{name:"R",keywords:{$pattern:n,keyword:"function if in break next repeat else for while",literal:"NULL NA TRUE FALSE Inf NaN NA_integer_|10 NA_real_|10 NA_character_|10 NA_complex_|10",built_in:"LETTERS letters month.abb month.name pi T F abs acos acosh all any anyNA Arg as.call as.character as.complex as.double as.environment as.integer as.logical as.null.default as.numeric as.raw asin asinh atan atanh attr attributes baseenv browser c call ceiling class Conj cos cosh cospi cummax cummin cumprod cumsum digamma dim dimnames emptyenv exp expression floor forceAndCall gamma gc.time globalenv Im interactive invisible is.array is.atomic is.call is.character is.complex is.double is.environment is.expression is.finite is.function is.infinite is.integer is.language is.list is.logical is.matrix is.na is.name is.nan is.null is.numeric is.object is.pairlist is.raw is.recursive is.single is.symbol lazyLoadDBfetch length lgamma list log max min missing Mod names nargs nzchar oldClass on.exit pos.to.env proc.time prod quote range Re rep retracemem return round seq_along seq_len seq.int sign signif sin sinh sinpi sqrt standardGeneric substitute sum switch tan tanh tanpi tracemem trigamma trunc unclass untracemem UseMethod xtfrm"},contains:[e.COMMENT(/#'/,/$/,{contains:[{scope:"doctag",match:/@examples/,starts:{end:t.lookahead(t.either(/\n^#'\s*(?=@[a-zA-Z]+)/,/\n^(?!#')/)),endsParent:!0}},{scope:"doctag",begin:"@param",end:/$/,contains:[{scope:"variable",variants:[{match:n},{match:/`(?:\\.|[^`\\])+`/}],endsParent:!0}]},{scope:"doctag",match:/@[a-zA-Z]+/},{scope:"keyword",match:/\\[a-zA-Z]+/}]}),e.HASH_COMMENT_MODE,{scope:"string",contains:[e.BACKSLASH_ESCAPE],variants:[e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\(/,end:/\)(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\{/,end:/\}(-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]"(-*)\[/,end:/\](-*)"/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\(/,end:/\)(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\{/,end:/\}(-*)'/}),e.END_SAME_AS_BEGIN({begin:/[rR]'(-*)\[/,end:/\](-*)'/}),{begin:'"',end:'"',relevance:0},{begin:"'",end:"'",relevance:0}]},{relevance:0,variants:[{scope:{1:"operator",2:"number"},match:[s,a]},{scope:{1:"operator",2:"number"},match:[/%[^%]*%/,a]},{scope:{1:"punctuation",2:"number"},match:[o,a]},{scope:{2:"number"},match:[/[^a-zA-Z0-9._]|^/,a]}]},{scope:{3:"operator"},match:[n,/\s+/,/<-/,/\s+/]},{scope:"operator",relevance:0,variants:[{match:s},{match:/%[^%]*%/}]},{scope:"punctuation",relevance:0,match:o},{begin:"`",end:"`",contains:[{begin:/\\./}]}]}}function w4(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},v="[1-9](_?[0-9])*|0",x="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${v})(\\.(${x}))?([eE][+-]?(${x})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);b.contains=M,w.contains=M;const D=[{begin:/^\s*=>/,starts:{end:"$",contains:M}},{className:"meta.prompt",begin:"^("+"[>?]>"+"|"+"[\\w#]+\\(\\w+\\):\\d+:\\d+[>*]"+"|"+"(\\w+-)?\\d+\\.\\d+\\.\\d+(p\\d+)?[^\\d][^>]+>"+")(?=[ ])",starts:{end:"$",keywords:c,contains:M}}];return m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(D).concat(m).concat(M)}}function _4(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:b,keyword:f,literal:h,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:b}},{className:"punctuation",begin:"->"},o]}}const k4=e=>({IMPORTANT:{scope:"meta",begin:"!important"},BLOCK_COMMENT:e.C_BLOCK_COMMENT_MODE,HEXCOLOR:{scope:"number",begin:/#(([0-9a-fA-F]{3,4})|(([0-9a-fA-F]{2}){3,4}))\b/},FUNCTION_DISPATCH:{className:"built_in",begin:/[\w-]+(?=\()/},ATTRIBUTE_SELECTOR_MODE:{scope:"selector-attr",begin:/\[/,end:/\]/,illegal:"$",contains:[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},CSS_NUMBER_MODE:{scope:"number",begin:e.NUMBER_RE+"(%|em|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc|px|deg|grad|rad|turn|s|ms|Hz|kHz|dpi|dpcm|dppx)?",relevance:0},CSS_VARIABLE:{className:"attr",begin:/--[A-Za-z_][A-Za-z0-9_-]*/}}),N4=["a","abbr","address","article","aside","audio","b","blockquote","body","button","canvas","caption","cite","code","dd","del","details","dfn","div","dl","dt","em","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","html","i","iframe","img","input","ins","kbd","label","legend","li","main","mark","menu","nav","object","ol","optgroup","option","p","picture","q","quote","samp","section","select","source","span","strong","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","ul","var","video"],T4=["defs","g","marker","mask","pattern","svg","switch","symbol","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feFlood","feGaussianBlur","feImage","feMerge","feMorphology","feOffset","feSpecularLighting","feTile","feTurbulence","linearGradient","radialGradient","stop","circle","ellipse","image","line","path","polygon","polyline","rect","text","use","textPath","tspan","foreignObject","clipPath"],C4=[...N4,...T4],A4=["any-hover","any-pointer","aspect-ratio","color","color-gamut","color-index","device-aspect-ratio","device-height","device-width","display-mode","forced-colors","grid","height","hover","inverted-colors","monochrome","orientation","overflow-block","overflow-inline","pointer","prefers-color-scheme","prefers-contrast","prefers-reduced-motion","prefers-reduced-transparency","resolution","scan","scripting","update","width","min-width","max-width","min-height","max-height"].sort().reverse(),O4=["active","any-link","blank","checked","current","default","defined","dir","disabled","drop","empty","enabled","first","first-child","first-of-type","fullscreen","future","focus","focus-visible","focus-within","has","host","host-context","hover","indeterminate","in-range","invalid","is","lang","last-child","last-of-type","left","link","local-link","not","nth-child","nth-col","nth-last-child","nth-last-col","nth-last-of-type","nth-of-type","only-child","only-of-type","optional","out-of-range","past","placeholder-shown","read-only","read-write","required","right","root","scope","target","target-within","user-invalid","valid","visited","where"].sort().reverse(),R4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),M4=["accent-color","align-content","align-items","align-self","alignment-baseline","all","anchor-name","animation","animation-composition","animation-delay","animation-direction","animation-duration","animation-fill-mode","animation-iteration-count","animation-name","animation-play-state","animation-range","animation-range-end","animation-range-start","animation-timeline","animation-timing-function","appearance","aspect-ratio","backdrop-filter","backface-visibility","background","background-attachment","background-blend-mode","background-clip","background-color","background-image","background-origin","background-position","background-position-x","background-position-y","background-repeat","background-size","baseline-shift","block-size","border","border-block","border-block-color","border-block-end","border-block-end-color","border-block-end-style","border-block-end-width","border-block-start","border-block-start-color","border-block-start-style","border-block-start-width","border-block-style","border-block-width","border-bottom","border-bottom-color","border-bottom-left-radius","border-bottom-right-radius","border-bottom-style","border-bottom-width","border-collapse","border-color","border-end-end-radius","border-end-start-radius","border-image","border-image-outset","border-image-repeat","border-image-slice","border-image-source","border-image-width","border-inline","border-inline-color","border-inline-end","border-inline-end-color","border-inline-end-style","border-inline-end-width","border-inline-start","border-inline-start-color","border-inline-start-style","border-inline-start-width","border-inline-style","border-inline-width","border-left","border-left-color","border-left-style","border-left-width","border-radius","border-right","border-right-color","border-right-style","border-right-width","border-spacing","border-start-end-radius","border-start-start-radius","border-style","border-top","border-top-color","border-top-left-radius","border-top-right-radius","border-top-style","border-top-width","border-width","bottom","box-align","box-decoration-break","box-direction","box-flex","box-flex-group","box-lines","box-ordinal-group","box-orient","box-pack","box-shadow","box-sizing","break-after","break-before","break-inside","caption-side","caret-color","clear","clip","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","color-scheme","column-count","column-fill","column-gap","column-rule","column-rule-color","column-rule-style","column-rule-width","column-span","column-width","columns","contain","contain-intrinsic-block-size","contain-intrinsic-height","contain-intrinsic-inline-size","contain-intrinsic-size","contain-intrinsic-width","container","container-name","container-type","content","content-visibility","counter-increment","counter-reset","counter-set","cue","cue-after","cue-before","cursor","cx","cy","direction","display","dominant-baseline","empty-cells","enable-background","field-sizing","fill","fill-opacity","fill-rule","filter","flex","flex-basis","flex-direction","flex-flow","flex-grow","flex-shrink","flex-wrap","float","flood-color","flood-opacity","flow","font","font-display","font-family","font-feature-settings","font-kerning","font-language-override","font-optical-sizing","font-palette","font-size","font-size-adjust","font-smooth","font-smoothing","font-stretch","font-style","font-synthesis","font-synthesis-position","font-synthesis-small-caps","font-synthesis-style","font-synthesis-weight","font-variant","font-variant-alternates","font-variant-caps","font-variant-east-asian","font-variant-emoji","font-variant-ligatures","font-variant-numeric","font-variant-position","font-variation-settings","font-weight","forced-color-adjust","gap","glyph-orientation-horizontal","glyph-orientation-vertical","grid","grid-area","grid-auto-columns","grid-auto-flow","grid-auto-rows","grid-column","grid-column-end","grid-column-start","grid-gap","grid-row","grid-row-end","grid-row-start","grid-template","grid-template-areas","grid-template-columns","grid-template-rows","hanging-punctuation","height","hyphenate-character","hyphenate-limit-chars","hyphens","icon","image-orientation","image-rendering","image-resolution","ime-mode","initial-letter","initial-letter-align","inline-size","inset","inset-area","inset-block","inset-block-end","inset-block-start","inset-inline","inset-inline-end","inset-inline-start","isolation","justify-content","justify-items","justify-self","kerning","left","letter-spacing","lighting-color","line-break","line-height","line-height-step","list-style","list-style-image","list-style-position","list-style-type","margin","margin-block","margin-block-end","margin-block-start","margin-bottom","margin-inline","margin-inline-end","margin-inline-start","margin-left","margin-right","margin-top","margin-trim","marker","marker-end","marker-mid","marker-start","marks","mask","mask-border","mask-border-mode","mask-border-outset","mask-border-repeat","mask-border-slice","mask-border-source","mask-border-width","mask-clip","mask-composite","mask-image","mask-mode","mask-origin","mask-position","mask-repeat","mask-size","mask-type","masonry-auto-flow","math-depth","math-shift","math-style","max-block-size","max-height","max-inline-size","max-width","min-block-size","min-height","min-inline-size","min-width","mix-blend-mode","nav-down","nav-index","nav-left","nav-right","nav-up","none","normal","object-fit","object-position","offset","offset-anchor","offset-distance","offset-path","offset-position","offset-rotate","opacity","order","orphans","outline","outline-color","outline-offset","outline-style","outline-width","overflow","overflow-anchor","overflow-block","overflow-clip-margin","overflow-inline","overflow-wrap","overflow-x","overflow-y","overlay","overscroll-behavior","overscroll-behavior-block","overscroll-behavior-inline","overscroll-behavior-x","overscroll-behavior-y","padding","padding-block","padding-block-end","padding-block-start","padding-bottom","padding-inline","padding-inline-end","padding-inline-start","padding-left","padding-right","padding-top","page","page-break-after","page-break-before","page-break-inside","paint-order","pause","pause-after","pause-before","perspective","perspective-origin","place-content","place-items","place-self","pointer-events","position","position-anchor","position-visibility","print-color-adjust","quotes","r","resize","rest","rest-after","rest-before","right","rotate","row-gap","ruby-align","ruby-position","scale","scroll-behavior","scroll-margin","scroll-margin-block","scroll-margin-block-end","scroll-margin-block-start","scroll-margin-bottom","scroll-margin-inline","scroll-margin-inline-end","scroll-margin-inline-start","scroll-margin-left","scroll-margin-right","scroll-margin-top","scroll-padding","scroll-padding-block","scroll-padding-block-end","scroll-padding-block-start","scroll-padding-bottom","scroll-padding-inline","scroll-padding-inline-end","scroll-padding-inline-start","scroll-padding-left","scroll-padding-right","scroll-padding-top","scroll-snap-align","scroll-snap-stop","scroll-snap-type","scroll-timeline","scroll-timeline-axis","scroll-timeline-name","scrollbar-color","scrollbar-gutter","scrollbar-width","shape-image-threshold","shape-margin","shape-outside","shape-rendering","speak","speak-as","src","stop-color","stop-opacity","stroke","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke-width","tab-size","table-layout","text-align","text-align-all","text-align-last","text-anchor","text-combine-upright","text-decoration","text-decoration-color","text-decoration-line","text-decoration-skip","text-decoration-skip-ink","text-decoration-style","text-decoration-thickness","text-emphasis","text-emphasis-color","text-emphasis-position","text-emphasis-style","text-indent","text-justify","text-orientation","text-overflow","text-rendering","text-shadow","text-size-adjust","text-transform","text-underline-offset","text-underline-position","text-wrap","text-wrap-mode","text-wrap-style","timeline-scope","top","touch-action","transform","transform-box","transform-origin","transform-style","transition","transition-behavior","transition-delay","transition-duration","transition-property","transition-timing-function","translate","unicode-bidi","user-modify","user-select","vector-effect","vertical-align","view-timeline","view-timeline-axis","view-timeline-inset","view-timeline-name","view-transition-name","visibility","voice-balance","voice-duration","voice-family","voice-pitch","voice-range","voice-rate","voice-stress","voice-volume","white-space","white-space-collapse","widows","width","will-change","word-break","word-spacing","word-wrap","writing-mode","x","y","z-index","zoom"].sort().reverse();function j4(e){const t=k4(e),n=R4,a=O4,s="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+C4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+M4.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:A4.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function D4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function L4(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],v=["create table","insert into","primary key","foreign key","not null","alter table","add constraint","grouping sets","on overflow","character set","respect nulls","ignore nulls","nulls first","nulls last","depth first","breadth first"],x=b,E=[...m,...h].filter(F=>!b.includes(F)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function A(F){return t.concat(/\b/,t.either(...F.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:A(v),relevance:0};function j(F,{exceptions:M,when:q}={}){const K=q;return M=M||[],F.map(te=>te.match(/\|\d+$/)||M.includes(te)?te:K(te)?`${te}|0`:te)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:j(E,{when:F=>F.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:A(c)},T,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}function _w(e){return e?typeof e=="string"?e:e.source:null}function Vo(e){return gt("(?=",e,")")}function gt(...e){return e.map(n=>_w(n)).join("")}function I4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function _n(...e){return"("+(I4(e).capture?"":"?:")+e.map(a=>_w(a)).join("|")+")"}const Mg=e=>gt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),z4=["Protocol","Type"].map(Mg),Z0=["init","self"].map(Mg),B4=["Any","Self"],Fm=["actor","any","associatedtype","async","await",/as\?/,/as!/,"as","borrowing","break","case","catch","class","consume","consuming","continue","convenience","copy","default","defer","deinit","didSet","distributed","do","dynamic","each","else","enum","extension","fallthrough",/fileprivate\(set\)/,"fileprivate","final","for","func","get","guard","if","import","indirect","infix",/init\?/,/init!/,"inout",/internal\(set\)/,"internal","in","is","isolated","nonisolated","lazy","let","macro","mutating","nonmutating",/open\(set\)/,"open","operator","optional","override","package","postfix","precedencegroup","prefix",/private\(set\)/,"private","protocol",/public\(set\)/,"public","repeat","required","rethrows","return","set","some","static","struct","subscript","super","switch","throws","throw",/try\?/,/try!/,"try","typealias",/unowned\(safe\)/,/unowned\(unsafe\)/,"unowned","var","weak","where","while","willSet"],J0=["false","nil","true"],U4=["assignment","associativity","higherThan","left","lowerThan","none","right"],$4=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],eE=["abs","all","any","assert","assertionFailure","debugPrint","dump","fatalError","getVaList","isKnownUniquelyReferenced","max","min","numericCast","pointwiseMax","pointwiseMin","precondition","preconditionFailure","print","readLine","repeatElement","sequence","stride","swap","swift_unboxFromSwiftValueWithType","transcode","type","unsafeBitCast","unsafeDowncast","withExtendedLifetime","withUnsafeMutablePointer","withUnsafePointer","withVaList","withoutActuallyEscaping","zip"],kw=_n(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Nw=_n(kw,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Pm=gt(kw,Nw,"*"),Tw=_n(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Af=_n(Tw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Hi=gt(Tw,Af,"*"),lf=gt(/[A-Z]/,Af,"*"),F4=["attached","autoclosure",gt(/convention\(/,_n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",gt(/objc\(/,Hi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],P4=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function q4(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,_n(...z4,...Z0)],className:{2:"keyword"}},o={match:gt(/\./,_n(...Fm)),relevance:0},c=Fm.filter(Ze=>typeof Ze=="string").concat(["_|0"]),f=Fm.filter(Ze=>typeof Ze!="string").concat(B4).map(Mg),h={variants:[{className:"keyword",match:_n(...f,...Z0)}]},m={$pattern:_n(/\b\w+/,/#\w+/),keyword:c.concat($4),literal:J0},b=[s,o,h],g={match:gt(/\./,_n(...eE)),relevance:0},v={className:"built_in",match:gt(/\b/,_n(...eE),/(?=\()/)},x=[g,v],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Pm},{match:`\\.(\\.|${Nw})+`}]},k=[E,w],_="([0-9]_*)+",A="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${A})(\\.(${A}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(Ze="")=>({className:"subst",variants:[{match:gt(/\\/,Ze,/[0\\tnr"']/)},{match:gt(/\\/,Ze,/u\{[0-9a-fA-F]{1,8}\}/)}]}),F=(Ze="")=>({className:"subst",match:gt(/\\/,Ze,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(Ze="")=>({className:"subst",label:"interpol",begin:gt(/\\/,Ze,/\(/),end:/\)/}),q=(Ze="")=>({begin:gt(Ze,/"""/),end:gt(/"""/,Ze),contains:[j(Ze),F(Ze),M(Ze)]}),K=(Ze="")=>({begin:gt(Ze,/"/),end:gt(/"/,Ze),contains:[j(Ze),M(Ze)]}),te={className:"string",variants:[q(),q("#"),q("##"),q("###"),K(),K("#"),K("##"),K("###")]},D=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],P={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:D},J=Ze=>{const _i=gt(Ze,/\//),li=gt(/\//,Ze);return{begin:_i,end:li,contains:[...D,{scope:"comment",begin:`#(?!.*${li})`,end:/$/}]}},re={scope:"regexp",variants:[J("###"),J("##"),J("#"),P]},Q={match:gt(/`/,Hi,/`/)},Y={className:"variable",match:/\$\d+/},U={className:"variable",match:`\\$${Af}+`},ae=[Q,Y,U],G={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:P4,contains:[...k,T,te]}]}},he={scope:"keyword",match:gt(/@/,_n(...F4),Vo(_n(/\(/,/\s+/)))},R={scope:"meta",match:gt(/@/,Hi)},L=[G,he,R],Z={match:Vo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:gt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Af,"+")},{className:"type",match:lf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:gt(/\s+&\s+/,Vo(lf)),relevance:0}]},C={begin:/</,end:/>/,keywords:m,contains:[...a,...b,...L,E,Z]};Z.contains.push(C);const pe={match:gt(Hi,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",pe,...a,re,...b,...x,...k,T,te,...ae,...L,Z]},ve={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,Z]},ce={begin:_n(Vo(gt(Hi,/\s*:/)),Vo(gt(Hi,/\s+/,Hi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Hi}]},ke={begin:/\(/,end:/\)/,keywords:m,contains:[ce,...a,...b,...k,T,te,...L,Z,_e],endsParent:!0,illegal:/["']/},Ke={match:[/(func|macro)/,/\s+/,_n(Q.match,Hi,Pm)],className:{1:"keyword",3:"title.function"},contains:[ve,ke,t],illegal:[/\[/,/%/]},Dt={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[ve,ke,t],illegal:/\[|%/},yn={match:[/operator/,/\s+/,Pm],className:{1:"keyword",3:"title"}},Ji={begin:[/precedencegroup/,/\s+/,lf],className:{1:"keyword",3:"title"},contains:[Z],keywords:[...U4,...J0],end:/}/},Ra={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Kn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Ii={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Hi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[ve,...b,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:lf},...b],relevance:0}]};for(const Ze of te.variants){const _i=Ze.contains.find(zi=>zi.label==="interpol");_i.keywords=m;const li=[...b,...x,...k,T,te,...ae];_i.contains=[...li,{begin:/\(/,end:/\)/,contains:["self",...li]}]}return{name:"Swift",keywords:m,contains:[...a,Ke,Dt,Ra,Kn,Ii,yn,Ji,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},re,...b,...x,...k,T,te,...ae,...L,Z,_e]}}const Of="[A-Za-z$_][0-9A-Za-z$_]*",Cw=["as","in","of","if","for","while","finally","var","new","function","do","return","void","else","break","catch","instanceof","with","throw","case","default","try","switch","continue","typeof","delete","let","yield","const","class","debugger","async","await","static","import","from","export","extends","using"],Aw=["true","false","null","undefined","NaN","Infinity"],Ow=["Object","Function","Boolean","Symbol","Math","Date","Number","BigInt","String","RegExp","Array","Float32Array","Float64Array","Int8Array","Uint8Array","Uint8ClampedArray","Int16Array","Int32Array","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array","Set","Map","WeakSet","WeakMap","ArrayBuffer","SharedArrayBuffer","Atomics","DataView","JSON","Promise","Generator","GeneratorFunction","AsyncFunction","Reflect","Proxy","Intl","WebAssembly"],Rw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Mw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],jw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Dw=[].concat(Mw,Ow,Rw);function H4(e){const t=e.regex,n=(G,{after:he})=>{const R="</"+G[0].slice(1);return G.input.indexOf(R,he)!==-1},a=Of,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(G,he)=>{const R=G[0].length+G.index,L=G.input[R];if(L==="<"||L===","){he.ignoreMatch();return}L===">"&&(n(G,{after:R})||he.ignoreMatch());let Z;const C=G.input.substring(R);if(Z=C.match(/^\s*=/)){he.ignoreMatch();return}if((Z=C.match(/^\s+extends\s+/))&&Z.index===0){he.ignoreMatch();return}}},f={$pattern:Of,keyword:Cw,literal:Aw,built_in:Dw,"variable.language":jw},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},v={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},x={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,v],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,k,{match:/\$\d+/},g];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const j=[].concat(A,v.contains),F=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(j)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F},q={variants:[{match:[/class/,/\s+/,a,/\s+/,/extends/,/\s+/,t.concat(a,"(",t.concat(/\./,a),")*")],scope:{1:"keyword",3:"title.class",5:"keyword",7:"title.class.inherited"}},{match:[/class/,/\s+/,a],scope:{1:"keyword",3:"title.class"}}]},K={relevance:0,match:t.either(/\bJSON/,/\b[A-Z][a-z]+([A-Z][a-z]*|\d)*/,/\b[A-Z]{2,}([A-Z][a-z]+|\d)+([A-Z][a-z]*)*/,/\b[A-Z]{2,}[a-z]+([A-Z][a-z]+|\d)*([A-Z][a-z]*)*/),className:"title.class",keywords:{_:[...Ow,...Rw]}},te={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},D={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},P={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(G){return t.concat("(?!",G.join("|"),")")}const re={match:t.concat(/\b/,J([...Mw,"super","import"].map(G=>`${G}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},Q={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},Y={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},U="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ae={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(U)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:F,CLASS_REFERENCE:K},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),te,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,k,A,{match:/\$\d+/},g,K,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ae,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[A,e.REGEXP_MODE,{className:"function",begin:U,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:F}]}]},{begin:/,/,relevance:0},{match:/\s+/,relevance:0},{variants:[{begin:s.begin,end:s.end},{match:o},{begin:c.begin,"on:begin":c.isTrulyOpeningTag,end:c.end}],subLanguage:"xml",contains:[{begin:c.begin,end:c.end,skip:!0,contains:["self"]}]}]},D,{beginKeywords:"while if switch catch for"},{begin:"\\b(?!function)"+e.UNDERSCORE_IDENT_RE+"\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)\\s*\\{",returnBegin:!0,label:"func.def",contains:[M,e.inherit(e.TITLE_MODE,{begin:a,className:"title.function"})]},{match:/\.\.\./,relevance:0},Q,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},re,P,q,Y,{match:/\$[(.]/}]}}function K4(e){const t=e.regex,n=H4(e),a=Of,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Of,keyword:Cw.concat(h),literal:Aw,built_in:Dw.concat(s),"variable.language":jw},b={className:"meta",begin:"@"+a},g=(w,k,_)=>{const A=w.contains.findIndex(T=>T.label===k);if(A===-1)throw new Error("can not find mode to replace");w.contains.splice(A,1,_)};Object.assign(n.keywords,m),n.exports.PARAMS_CONTAINS.push(b);const v=n.contains.find(w=>w.scope==="attr"),x=Object.assign({},v,{match:t.concat(a,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,v,x]),n.contains=n.contains.concat([b,o,c,x]),g(n,"shebang",e.SHEBANG()),g(n,"use_strict",f);const E=n.contains.find(w=>w.label==="func.def");return E.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function G4(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),v=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,h,m,b,g,v,{className:"meta",begin:/[\t ]*#(const|disable|else|elseif|enable|end|externalsource|if|region)\b/,end:/$/,keywords:{keyword:"const disable else elseif enable end externalsource if region then"},contains:[v]}]}}function Q4(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,s,e.QUOTE_STRING_MODE,h,m,f]}}function Y4(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function V4(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),v={className:"number",begin:"\\b"+"[0-9]{4}(-[0-9][0-9]){0,2}"+"([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?"+"(\\.[0-9]*)?"+"([ \\t])*(Z|[-+][0-9][0-9]?(:[0-9][0-9])?)?"+"\\b"},x={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},k=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},v,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,w,o,c],_=[...k];return _.pop(),_.push(f),x.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}const X4={arduino:Rz,bash:Mz,c:jz,cpp:Dz,csharp:Lz,css:Hz,diff:Kz,go:Gz,graphql:Qz,ini:Yz,java:Vz,javascript:e4,json:t4,kotlin:i4,less:f4,lua:d4,makefile:h4,markdown:m4,objectivec:p4,perl:g4,php:b4,"php-template":y4,plaintext:x4,python:v4,"python-repl":E4,r:S4,ruby:w4,rust:_4,scss:j4,shell:D4,sql:L4,swift:q4,typescript:K4,vbnet:G4,wasm:Q4,xml:Y4,yaml:V4};var qm,tE;function W4(){if(tE)return qm;tE=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(se=>{const ge=B[se],Le=typeof ge;(Le==="object"||Le==="function")&&!Object.isFrozen(ge)&&e(ge)}),B}class t{constructor(se){se.data===void 0&&(se.data={}),this.data=se.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(B,...se){const ge=Object.create(null);for(const Le in B)ge[Le]=B[Le];return se.forEach(function(Le){for(const wt in Le)ge[wt]=Le[wt]}),ge}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:se})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const ge=B.split(".");return[`${se}${ge.shift()}`,...ge.map((Le,wt)=>`${Le}${"_".repeat(wt+1)}`)].join(" ")}return`${se}${B}`};class f{constructor(se,ge){this.buffer="",this.classPrefix=ge.classPrefix,se.walk(this)}addText(se){this.buffer+=n(se)}openNode(se){if(!o(se))return;const ge=c(se.scope,{prefix:this.classPrefix});this.span(ge)}closeNode(se){o(se)&&(this.buffer+=s)}value(){return this.buffer}span(se){this.buffer+=`<span class="${se}">`}}const h=(B={})=>{const se={children:[]};return Object.assign(se,B),se};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(se){this.top.children.push(se)}openNode(se){const ge=h({scope:se});this.add(ge),this.stack.push(ge)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(se){return this.constructor._walk(se,this.rootNode)}static _walk(se,ge){return typeof ge=="string"?se.addText(ge):ge.children&&(se.openNode(ge),ge.children.forEach(Le=>this._walk(se,Le)),se.closeNode(ge)),se}static _collapse(se){typeof se!="string"&&se.children&&(se.children.every(ge=>typeof ge=="string")?se.children=[se.children.join("")]:se.children.forEach(ge=>{m._collapse(ge)}))}}class b extends m{constructor(se){super(),this.options=se}addText(se){se!==""&&this.add(se)}startScope(se){this.openNode(se)}endScope(){this.closeNode()}__addSublanguage(se,ge){const Le=se.root;ge&&(Le.scope=`language:${ge}`),this.add(Le)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function v(B){return w("(?=",B,")")}function x(B){return w("(?:",B,")*")}function E(B){return w("(?:",B,")?")}function w(...B){return B.map(ge=>g(ge)).join("")}function k(B){const se=B[B.length-1];return typeof se=="object"&&se.constructor===Object?(B.splice(B.length-1,1),se):{}}function _(...B){return"("+(k(B).capture?"":"?:")+B.map(Le=>g(Le)).join("|")+")"}function A(B){return new RegExp(B.toString()+"|").exec("").length-1}function T(B,se){const ge=B&&B.exec(se);return ge&&ge.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function F(B,{joinWith:se}){let ge=0;return B.map(Le=>{ge+=1;const wt=ge;let bt=g(Le),Ee="";for(;bt.length>0;){const ye=j.exec(bt);if(!ye){Ee+=bt;break}Ee+=bt.substring(0,ye.index),bt=bt.substring(ye.index+ye[0].length),ye[0][0]==="\\"&&ye[1]?Ee+="\\"+String(Number(ye[1])+wt):(Ee+=ye[0],ye[0]==="("&&ge++)}return Ee}).map(Le=>`(${Le})`).join(se)}const M=/\b\B/,q="[a-zA-Z]\\w*",K="[a-zA-Z_]\\w*",te="\\b\\d+(\\.\\d+)?",D="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",P="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",re=(B={})=>{const se=/^#![ ]*\//;return B.binary&&(B.begin=w(se,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:se,end:/$/,relevance:0,"on:begin":(ge,Le)=>{ge.index!==0&&Le.ignoreMatch()}},B)},Q={begin:"\\\\[\\s\\S]",relevance:0},Y={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[Q]},U={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[Q]},ae={begin:/\b(a|an|the|are|I'm|isn't|don't|doesn't|won't|but|just|should|pretty|simply|enough|gonna|going|wtf|so|such|will|you|your|they|like|more)\b/},G=function(B,se,ge={}){const Le=a({scope:"comment",begin:B,end:se,contains:[]},ge);Le.contains.push({scope:"doctag",begin:"[ ]*(?=(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):)",end:/(TODO|FIXME|NOTE|BUG|OPTIMIZE|HACK|XXX):/,excludeBegin:!0,relevance:0});const wt=_("I","a","is","so","us","to","at","if","in","it","on",/[A-Za-z]+['](d|ve|re|ll|t|s|n)/,/[A-Za-z]+[-][a-z]+/,/[A-Za-z][a-z]{2,}/);return Le.contains.push({begin:w(/[ ]+/,"(",wt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),Le},he=G("//","$"),R=G("/\\*","\\*/"),L=G("#","$"),Z={scope:"number",begin:te,relevance:0},C={scope:"number",begin:D,relevance:0},pe={scope:"number",begin:P,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[Q,{begin:/\[/,end:/\]/,relevance:0,contains:[Q]}]},ve={scope:"title",begin:q,relevance:0},ce={scope:"title",begin:K,relevance:0},ke={begin:"\\.\\s*"+K,relevance:0};var Dt=Object.freeze({__proto__:null,APOS_STRING_MODE:Y,BACKSLASH_ESCAPE:Q,BINARY_NUMBER_MODE:pe,BINARY_NUMBER_RE:P,COMMENT:G,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:he,C_NUMBER_MODE:C,C_NUMBER_RE:D,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(se,ge)=>{ge.data._beginMatch=se[1]},"on:end":(se,ge)=>{ge.data._beginMatch!==se[1]&&ge.ignoreMatch()}})},HASH_COMMENT_MODE:L,IDENT_RE:q,MATCH_NOTHING_RE:M,METHOD_GUARD:ke,NUMBER_MODE:Z,NUMBER_RE:te,PHRASAL_WORDS_MODE:ae,QUOTE_STRING_MODE:U,REGEXP_MODE:_e,RE_STARTERS_RE:J,SHEBANG:re,TITLE_MODE:ve,UNDERSCORE_IDENT_RE:K,UNDERSCORE_TITLE_MODE:ce});function yn(B,se){B.input[B.index-1]==="."&&se.ignoreMatch()}function Ji(B,se){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,se){se&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=yn,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Kn(B,se){Array.isArray(B.illegal)&&(B.illegal=_(...B.illegal))}function Ii(B,se){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Ze(B,se){B.relevance===void 0&&(B.relevance=1)}const _i=(B,se)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const ge=Object.assign({},B);Object.keys(B).forEach(Le=>{delete B[Le]}),B.keywords=ge.keywords,B.begin=w(ge.beforeMatch,v(ge.begin)),B.starts={relevance:0,contains:[Object.assign(ge,{endsParent:!0})]},B.relevance=0,delete ge.beforeMatch},li=["of","and","for","in","not","or","if","then","parent","list","value"],zi="keyword";function ea(B,se,ge=zi){const Le=Object.create(null);return typeof B=="string"?wt(ge,B.split(" ")):Array.isArray(B)?wt(ge,B):Object.keys(B).forEach(function(bt){Object.assign(Le,ea(B[bt],se,bt))}),Le;function wt(bt,Ee){se&&(Ee=Ee.map(ye=>ye.toLowerCase())),Ee.forEach(function(ye){const De=ye.split("|");Le[De[0]]=[bt,Tr(De[0],De[1])]})}}function Tr(B,se){return se?Number(se):Gl(B)?0:1}function Gl(B){return li.includes(B.toLowerCase())}const bs={},Ot=B=>{console.error(B)},ys=(B,...se)=>{console.log(`WARN: ${B}`,...se)},ne=(B,se)=>{bs[`${B}/${se}`]||(console.log(`Deprecated as of ${B}. ${se}`),bs[`${B}/${se}`]=!0)},de=new Error;function Re(B,se,{key:ge}){let Le=0;const wt=B[ge],bt={},Ee={};for(let ye=1;ye<=se.length;ye++)Ee[ye+Le]=wt[ye],bt[ye+Le]=!0,Le+=A(se[ye-1]);B[ge]=Ee,B[ge]._emit=bt,B[ge]._multi=!0}function qe(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Ot("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),de;if(typeof B.beginScope!="object"||B.beginScope===null)throw Ot("beginScope must be object"),de;Re(B,B.begin,{key:"beginScope"}),B.begin=F(B.begin,{joinWith:""})}}function nt(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Ot("skip, excludeEnd, returnEnd not compatible with endScope: {}"),de;if(typeof B.endScope!="object"||B.endScope===null)throw Ot("endScope must be object"),de;Re(B,B.end,{key:"endScope"}),B.end=F(B.end,{joinWith:""})}}function xn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function ki(B){xn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),qe(B),nt(B)}function an(B){function se(Ee,ye){return new RegExp(g(Ee),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(ye?"g":""))}class ge{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ye,De){De.position=this.position++,this.matchIndexes[this.matchAt]=De,this.regexes.push([De,ye]),this.matchAt+=A(ye)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ye=this.regexes.map(De=>De[1]);this.matcherRe=se(F(ye,{joinWith:"|"}),!0),this.lastIndex=0}exec(ye){this.matcherRe.lastIndex=this.lastIndex;const De=this.matcherRe.exec(ye);if(!De)return null;const Ft=De.findIndex((ta,vs)=>vs>0&&ta!==void 0),Nt=this.matchIndexes[Ft];return De.splice(0,Ft),Object.assign(De,Nt)}}class Le{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ye){if(this.multiRegexes[ye])return this.multiRegexes[ye];const De=new ge;return this.rules.slice(ye).forEach(([Ft,Nt])=>De.addRule(Ft,Nt)),De.compile(),this.multiRegexes[ye]=De,De}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ye,De){this.rules.push([ye,De]),De.type==="begin"&&this.count++}exec(ye){const De=this.getMatcher(this.regexIndex);De.lastIndex=this.lastIndex;let Ft=De.exec(ye);if(this.resumingScanAtSamePosition()&&!(Ft&&Ft.index===this.lastIndex)){const Nt=this.getMatcher(0);Nt.lastIndex=this.lastIndex+1,Ft=Nt.exec(ye)}return Ft&&(this.regexIndex+=Ft.position+1,this.regexIndex===this.count&&this.considerAll()),Ft}}function wt(Ee){const ye=new Le;return Ee.contains.forEach(De=>ye.addRule(De.begin,{rule:De,type:"begin"})),Ee.terminatorEnd&&ye.addRule(Ee.terminatorEnd,{type:"end"}),Ee.illegal&&ye.addRule(Ee.illegal,{type:"illegal"}),ye}function bt(Ee,ye){const De=Ee;if(Ee.isCompiled)return De;[Ji,Ii,ki,_i].forEach(Nt=>Nt(Ee,ye)),B.compilerExtensions.forEach(Nt=>Nt(Ee,ye)),Ee.__beforeBegin=null,[Ra,Kn,Ze].forEach(Nt=>Nt(Ee,ye)),Ee.isCompiled=!0;let Ft=null;return typeof Ee.keywords=="object"&&Ee.keywords.$pattern&&(Ee.keywords=Object.assign({},Ee.keywords),Ft=Ee.keywords.$pattern,delete Ee.keywords.$pattern),Ft=Ft||/\w+/,Ee.keywords&&(Ee.keywords=ea(Ee.keywords,B.case_insensitive)),De.keywordPatternRe=se(Ft,!0),ye&&(Ee.begin||(Ee.begin=/\B|\b/),De.beginRe=se(De.begin),!Ee.end&&!Ee.endsWithParent&&(Ee.end=/\B|\b/),Ee.end&&(De.endRe=se(De.end)),De.terminatorEnd=g(De.end)||"",Ee.endsWithParent&&ye.terminatorEnd&&(De.terminatorEnd+=(Ee.end?"|":"")+ye.terminatorEnd)),Ee.illegal&&(De.illegalRe=se(Ee.illegal)),Ee.contains||(Ee.contains=[]),Ee.contains=[].concat(...Ee.contains.map(function(Nt){return un(Nt==="self"?Ee:Nt)})),Ee.contains.forEach(function(Nt){bt(Nt,De)}),Ee.starts&&bt(Ee.starts,ye),De.matcher=wt(De),De}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),bt(B)}function Lt(B){return B?B.endsWithParent||Lt(B.starts):!1}function un(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(se){return a(B,{variants:null},se)})),B.cachedVariants?B.cachedVariants:Lt(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var ot="11.11.1";class Bi extends Error{constructor(se,ge){super(se),this.name="HTMLInjectionError",this.html=ge}}const vn=n,Tc=a,Cr=Symbol("nomatch"),xs=7,Ar=function(B){const se=Object.create(null),ge=Object.create(null),Le=[];let wt=!0;const bt="Could not find the language '{}', did you forget to load/include a language module?",Ee={disableAutodetect:!0,name:"Plain text",contains:[]};let ye={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function De(ue){return ye.noHighlightRe.test(ue)}function Ft(ue){let Ne=ue.className+" ";Ne+=ue.parentNode?ue.parentNode.className:"";const He=ye.languageDetectRe.exec(Ne);if(He){const ct=En(He[1]);return ct||(ys(bt.replace("{}",He[1])),ys("Falling back to no-highlight mode for this block.",ue)),ct?He[1]:"no-highlight"}return Ne.split(/\s+/).find(ct=>De(ct)||En(ct))}function Nt(ue,Ne,He){let ct="",qt="";typeof Ne=="object"?(ct=ue,He=Ne.ignoreIllegals,qt=Ne.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
528
- https://github.com/highlightjs/highlight.js/issues/2277`),qt=ue,ct=Ne),He===void 0&&(He=!0);const dn={code:ct,language:qt};Rr("before:highlight",dn);const Gn=dn.result?dn.result:ta(dn.language,dn.code,He);return Gn.code=dn.code,Rr("after:highlight",Gn),Gn}function ta(ue,Ne,He,ct){const qt=Object.create(null);function dn(me,Se){return me.keywords[Se]}function Gn(){if(!je.keywords){Qt.addText(ut);return}let me=0;je.keywordPatternRe.lastIndex=0;let Se=je.keywordPatternRe.exec(ut),Be="";for(;Se;){Be+=ut.substring(me,Se.index);const Ve=rn.case_insensitive?Se[0].toLowerCase():Se[0],Rt=dn(je,Ve);if(Rt){const[oi,Zl]=Rt;if(Qt.addText(Be),Be="",qt[Ve]=(qt[Ve]||0)+1,qt[Ve]<=xs&&(La+=Zl),oi.startsWith("_"))Be+=Se[0];else{const Dc=rn.classNameAliases[oi]||oi;Qn(Se[0],Dc)}}else Be+=Se[0];me=je.keywordPatternRe.lastIndex,Se=je.keywordPatternRe.exec(ut)}Be+=ut.substring(me),Qt.addText(Be)}function An(){if(ut==="")return;let me=null;if(typeof je.subLanguage=="string"){if(!se[je.subLanguage]){Qt.addText(ut);return}me=ta(je.subLanguage,ut,!0,jc[je.subLanguage]),jc[je.subLanguage]=me._top}else me=Es(ut,je.subLanguage.length?je.subLanguage:null);je.relevance>0&&(La+=me.relevance),Qt.__addSublanguage(me._emitter,me.language)}function Et(){je.subLanguage!=null?An():Gn(),ut=""}function Qn(me,Se){me!==""&&(Qt.startScope(Se),Qt.addText(me),Qt.endScope())}function Rc(me,Se){let Be=1;const Ve=Se.length-1;for(;Be<=Ve;){if(!me._emit[Be]){Be++;continue}const Rt=rn.classNameAliases[me[Be]]||me[Be],oi=Se[Be];Rt?Qn(oi,Rt):(ut=oi,Gn(),ut=""),Be++}}function ws(me,Se){return me.scope&&typeof me.scope=="string"&&Qt.openNode(rn.classNameAliases[me.scope]||me.scope),me.beginScope&&(me.beginScope._wrap?(Qn(ut,rn.classNameAliases[me.beginScope._wrap]||me.beginScope._wrap),ut=""):me.beginScope._multi&&(Rc(me.beginScope,Se),ut="")),je=Object.create(me,{parent:{value:je}}),je}function Vl(me,Se,Be){let Ve=T(me.endRe,Be);if(Ve){if(me["on:end"]){const Rt=new t(me);me["on:end"](Se,Rt),Rt.isMatchIgnored&&(Ve=!1)}if(Ve){for(;me.endsParent&&me.parent;)me=me.parent;return me}}if(me.endsWithParent)return Vl(me.parent,Se,Be)}function _s(me){return je.matcher.regexIndex===0?(ut+=me[0],1):(Ia=!0,0)}function id(me){const Se=me[0],Be=me.rule,Ve=new t(Be),Rt=[Be.__beforeBegin,Be["on:begin"]];for(const oi of Rt)if(oi&&(oi(me,Ve),Ve.isMatchIgnored))return _s(Se);return Be.skip?ut+=Se:(Be.excludeBegin&&(ut+=Se),Et(),!Be.returnBegin&&!Be.excludeBegin&&(ut=Se)),ws(Be,me),Be.returnBegin?0:Se.length}function On(me){const Se=me[0],Be=Ne.substring(me.index),Ve=Vl(je,me,Be);if(!Ve)return Cr;const Rt=je;je.endScope&&je.endScope._wrap?(Et(),Qn(Se,je.endScope._wrap)):je.endScope&&je.endScope._multi?(Et(),Rc(je.endScope,me)):Rt.skip?ut+=Se:(Rt.returnEnd||Rt.excludeEnd||(ut+=Se),Et(),Rt.excludeEnd&&(ut=Se));do je.scope&&Qt.closeNode(),!je.skip&&!je.subLanguage&&(La+=je.relevance),je=je.parent;while(je!==Ve.parent);return Ve.starts&&ws(Ve.starts,me),Rt.returnEnd?0:Se.length}function Xl(){const me=[];for(let Se=je;Se!==rn;Se=Se.parent)Se.scope&&me.unshift(Se.scope);me.forEach(Se=>Qt.openNode(Se))}let Mr={};function ks(me,Se){const Be=Se&&Se[0];if(ut+=me,Be==null)return Et(),0;if(Mr.type==="begin"&&Se.type==="end"&&Mr.index===Se.index&&Be===""){if(ut+=Ne.slice(Se.index,Se.index+1),!wt){const Ve=new Error(`0 width match regex (${ue})`);throw Ve.languageName=ue,Ve.badRule=Mr.rule,Ve}return 1}if(Mr=Se,Se.type==="begin")return id(Se);if(Se.type==="illegal"&&!He){const Ve=new Error('Illegal lexeme "'+Be+'" for mode "'+(je.scope||"<unnamed>")+'"');throw Ve.mode=je,Ve}else if(Se.type==="end"){const Ve=On(Se);if(Ve!==Cr)return Ve}if(Se.type==="illegal"&&Be==="")return ut+=`
529
- `,1;if(Wl>1e5&&Wl>Se.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ut+=Be,Be.length}const rn=En(ue);if(!rn)throw Ot(bt.replace("{}",ue)),new Error('Unknown language: "'+ue+'"');const Mc=an(rn);let Ns="",je=ct||Mc;const jc={},Qt=new ye.__emitter(ye);Xl();let ut="",La=0,aa=0,Wl=0,Ia=!1;try{if(rn.__emitTokens)rn.__emitTokens(Ne,Qt);else{for(je.matcher.considerAll();;){Wl++,Ia?Ia=!1:je.matcher.considerAll(),je.matcher.lastIndex=aa;const me=je.matcher.exec(Ne);if(!me)break;const Se=Ne.substring(aa,me.index),Be=ks(Se,me);aa=me.index+Be}ks(Ne.substring(aa))}return Qt.finalize(),Ns=Qt.toHTML(),{language:ue,value:Ns,relevance:La,illegal:!1,_emitter:Qt,_top:je}}catch(me){if(me.message&&me.message.includes("Illegal"))return{language:ue,value:vn(Ne),illegal:!0,relevance:0,_illegalBy:{message:me.message,index:aa,context:Ne.slice(aa-100,aa+100),mode:me.mode,resultSoFar:Ns},_emitter:Qt};if(wt)return{language:ue,value:vn(Ne),illegal:!1,relevance:0,errorRaised:me,_emitter:Qt,_top:je};throw me}}function vs(ue){const Ne={value:vn(ue),illegal:!1,relevance:0,_top:Ee,_emitter:new ye.__emitter(ye)};return Ne._emitter.addText(ue),Ne}function Es(ue,Ne){Ne=Ne||ye.languages||Object.keys(se);const He=vs(ue),ct=Ne.filter(En).filter(ja).map(Et=>ta(Et,ue,!1));ct.unshift(He);const qt=ct.sort((Et,Qn)=>{if(Et.relevance!==Qn.relevance)return Qn.relevance-Et.relevance;if(Et.language&&Qn.language){if(En(Et.language).supersetOf===Qn.language)return 1;if(En(Qn.language).supersetOf===Et.language)return-1}return 0}),[dn,Gn]=qt,An=dn;return An.secondBest=Gn,An}function Ui(ue,Ne,He){const ct=Ne&&ge[Ne]||He;ue.classList.add("hljs"),ue.classList.add(`language-${ct}`)}function Pt(ue){let Ne=null;const He=Ft(ue);if(De(He))return;if(Rr("before:highlightElement",{el:ue,language:He}),ue.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",ue);return}if(ue.children.length>0&&(ye.ignoreUnescapedHTML||(console.warn("One of your code blocks includes unescaped HTML. This is a potentially serious security risk."),console.warn("https://github.com/highlightjs/highlight.js/wiki/security"),console.warn("The element with unescaped HTML:"),console.warn(ue)),ye.throwUnescapedHTML))throw new Bi("One of your code blocks includes unescaped HTML.",ue.innerHTML);Ne=ue;const ct=Ne.textContent,qt=He?Nt(ct,{language:He,ignoreIllegals:!0}):Es(ct);ue.innerHTML=qt.value,ue.dataset.highlighted="yes",Ui(ue,He,qt.language),ue.result={language:qt.language,re:qt.relevance,relevance:qt.relevance},qt.secondBest&&(ue.secondBest={language:qt.secondBest.language,relevance:qt.secondBest.relevance}),Rr("after:highlightElement",{el:ue,result:qt,text:ct})}function fn(ue){ye=Tc(ye,ue)}const Ma=()=>{Ss(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ql(){Ss(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Cc=!1;function Ss(){function ue(){Ss()}if(document.readyState==="loading"){Cc||window.addEventListener("DOMContentLoaded",ue,!1),Cc=!0;return}document.querySelectorAll(ye.cssSelector).forEach(Pt)}function Ac(ue,Ne){let He=null;try{He=Ne(B)}catch(ct){if(Ot("Language definition for '{}' could not be registered.".replace("{}",ue)),wt)Ot(ct);else throw ct;He=Ee}He.name||(He.name=ue),se[ue]=He,He.rawDefinition=Ne.bind(null,B),He.aliases&&na(He.aliases,{languageName:ue})}function Or(ue){delete se[ue];for(const Ne of Object.keys(ge))ge[Ne]===ue&&delete ge[Ne]}function Yl(){return Object.keys(se)}function En(ue){return ue=(ue||"").toLowerCase(),se[ue]||se[ge[ue]]}function na(ue,{languageName:Ne}){typeof ue=="string"&&(ue=[ue]),ue.forEach(He=>{ge[He.toLowerCase()]=Ne})}function ja(ue){const Ne=En(ue);return Ne&&!Ne.disableAutodetect}function Da(ue){ue["before:highlightBlock"]&&!ue["before:highlightElement"]&&(ue["before:highlightElement"]=Ne=>{ue["before:highlightBlock"](Object.assign({block:Ne.el},Ne))}),ue["after:highlightBlock"]&&!ue["after:highlightElement"]&&(ue["after:highlightElement"]=Ne=>{ue["after:highlightBlock"](Object.assign({block:Ne.el},Ne))})}function Gt(ue){Da(ue),Le.push(ue)}function Oc(ue){const Ne=Le.indexOf(ue);Ne!==-1&&Le.splice(Ne,1)}function Rr(ue,Ne){const He=ue;Le.forEach(function(ct){ct[He]&&ct[He](Ne)})}function ia(ue){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),Pt(ue)}Object.assign(B,{highlight:Nt,highlightAuto:Es,highlightAll:Ss,highlightElement:Pt,highlightBlock:ia,configure:fn,initHighlighting:Ma,initHighlightingOnLoad:Ql,registerLanguage:Ac,unregisterLanguage:Or,listLanguages:Yl,getLanguage:En,registerAliases:na,autoDetection:ja,inherit:Tc,addPlugin:Gt,removePlugin:Oc}),B.debugMode=function(){wt=!1},B.safeMode=function(){wt=!0},B.versionString=ot,B.regex={concat:w,lookahead:v,either:_,optional:E,anyNumberOfTimes:x};for(const ue in Dt)typeof Dt[ue]=="object"&&e(Dt[ue]);return Object.assign(B,Dt),B},Cn=Ar({});return Cn.newInstance=()=>Ar({}),qm=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,qm}var Z4=W4();const J4=Ap(Z4),nE={},eB="hljs-";function tB(e){const t=J4.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:f};function n(h,m,b){const g=b||nE,v=typeof g.prefix=="string"?g.prefix:eB;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:nB,classPrefix:v});const x=t.highlight(m,{ignoreIllegals:!0,language:h});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const E=x._emitter.root,w=E.data;return w.language=x.language,w.relevance=x.relevance,E}function a(h,m){const g=(m||nE).subset||s();let v=-1,x=0,E;for(;++v<g.length;){const w=g[v];if(!t.getLanguage(w))continue;const k=n(w,h,m);k.data&&k.data.relevance!==void 0&&k.data.relevance>x&&(x=k.data.relevance,E=k)}return E||{type:"root",children:[],data:{language:void 0,relevance:x}}}function s(){return t.listLanguages()}function o(h,m){if(typeof h=="string")t.registerLanguage(h,m);else{let b;for(b in h)Object.hasOwn(h,b)&&t.registerLanguage(b,h[b])}}function c(h,m){if(typeof h=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let b;for(b in h)if(Object.hasOwn(h,b)){const g=h[b];t.registerAliases(typeof g=="string"?g:[...g],{languageName:b})}}}function f(h){return!!t.getLanguage(h)}}class nB{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],a=n.children[n.children.length-1];a&&a.type==="text"?a.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const a=this.stack[this.stack.length-1],s=t.root.children;n?a.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):a.children.push(...s)}openNode(t){const n=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):n.options.classPrefix+c}),s=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const iB={};function jg(e){const t=e||iB,n=t.aliases,a=t.detect||!1,s=t.languages||X4,o=t.plainText,c=t.prefix,f=t.subset;let h="hljs";const m=tB(s);if(n&&m.registerAlias(n),c){const b=c.indexOf("-");h=b===-1?c:c.slice(0,b)}return function(b,g){nd(b,"element",function(v,x,E){if(v.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=aB(v);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(v.properties.className)||(v.properties.className=[]),v.properties.className.includes(h)||v.properties.className.unshift(h);const k=wz(v,{whitespace:"pre"});let _;try{_=w?m.highlight(w,k,{prefix:c}):m.highlightAuto(k,{prefix:c,subset:f})}catch(A){const T=A;if(w&&/Unknown language/.test(T.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[E,v],cause:T,place:v.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&_.data&&_.data.language&&v.properties.className.push("language-"+_.data.language),_.children.length>0&&(v.children=_.children)})}}function aB(e){const t=e.properties.className;let n=-1;if(!Array.isArray(t))return;let a;for(;++n<t.length;){const s=String(t[n]);if(s==="no-highlight"||s==="nohighlight")return!1;!a&&s.slice(0,5)==="lang-"&&(a=s.slice(5)),!a&&s.slice(0,9)==="language-"&&(a=s.slice(9))}return a}function rB({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s,alert:o}=si(),{data:c,isLoading:f,isError:h,error:m,refetch:b}=st({queryKey:["skill",e],queryFn:()=>KO(e)});O.useEffect(()=>{const _=A=>{A.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const g=async(_,A)=>{try{await A(),await b(),a()}catch(T){o({title:`${_}失败`,body:T instanceof Error?T.message:String(T)})}},v=_=>g("link",()=>QO(e,_)),x=async _=>{await s({title:`从 ${_} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&await g("unlink",()=>YO(e,_))},E=_=>g("freeze",()=>VO(e,_)),w=async _=>{await s({title:`解冻 ${e} @ ${_}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&await g("unfreeze",()=>XO(e,_))},k=new Map(((c==null?void 0:c.linkedProjects)??[]).map(_=>[_.project,_.state]));return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),c&&d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[c.category," · ",c.origin||"local"]})]}),d.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:d.jsx(Xi,{size:16,strokeWidth:3})})]}),f&&d.jsx("p",{children:"加载中…"}),h&&d.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",m instanceof Error?m.message:String(m)]}),c&&d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),d.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(_=>{const A=k.get(_);return d.jsxs("div",{className:"flex items-center justify-between gap-3 p-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:_}),A==="linked"&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),A==="frozen"&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!A&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),d.jsxs("div",{className:"flex gap-2",children:[!A&&d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:[d.jsx(uC,{size:11})," link"]}),A==="linked"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(_),type:"button",children:[d.jsx(RC,{size:11})," freeze"]}),d.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(_),type:"button",children:"unlink"})]}),A==="frozen"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(_),type:"button",children:[d.jsx(H2,{size:11})," unfreeze"]}),d.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(_),type:"button",children:"unlink"})]})]})]},_)}),t.length===0&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),d.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:c.body?d.jsx(Ng,{remarkPlugins:[Og],rehypePlugins:[jg],children:c.body}):d.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),c.references.length>0&&d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),d.jsx("ul",{className:"flex flex-col gap-2",children:c.references.map(_=>d.jsx(sB,{skillName:e,file:_.name,lines:_.lines},_.name))})]})]})]})})}function sB({skillName:e,file:t,lines:n}){const[a,s]=O.useState(!1),{data:o,isLoading:c,isError:f,error:h}=st({queryKey:["skill-ref",e,t],queryFn:()=>GO(e,t),enabled:a,staleTime:1/0});return d.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[d.jsxs("button",{type:"button",onClick:()=>s(m=>!m),"aria-label":`${a?"收起":"展开"} ${t}`,"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[d.jsx(Lf,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),d.jsx(Hp,{size:12,strokeWidth:2.5}),d.jsx("span",{className:"flex-1 text-left font-bold",children:t}),d.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&d.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[c&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&d.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),o&&d.jsx("div",{className:"prose-chat text-sm",children:d.jsx(Ng,{remarkPlugins:[Og],rehypePlugins:[jg],children:o.content})})]})]})}const lB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],oB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function cB(){var v;const[e,t]=O.useState("all"),[n,a]=O.useState(""),[s,o]=O.useState(null),c=qn(),{data:f,isLoading:h}=st({queryKey:["skills"],queryFn:()=>og()}),m=st({queryKey:["projects"],queryFn:_r}),b=O.useMemo(()=>((f==null?void 0:f.data)??[]).filter(E=>!(e!=="all"&&E.category!==e||n&&!E.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=O.useMemo(()=>{const x=(f==null?void 0:f.data)??[],E={all:x.length};for(const w of x)E[w.category]=(E[w.category]??0)+1;return E},[f]);return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h?"加载中…":`${(f==null?void 0:f.data.length)??0} 个 user-level skill`})]}),d.jsx("div",{className:"flex gap-3 items-center",children:d.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await WO(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[d.jsx(Cl,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(vf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:n,onChange:x=>a(x.target.value),"aria-label":"搜索 skill"})]}),d.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:lB.map(x=>d.jsxs("button",{type:"button",onClick:()=>t(x.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===x.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[x.label," ",g[x.value]]},x.value))})]}),d.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:b.map(x=>{var E;return d.jsx(uB,{skill:x,projectCount:((E=m.data)==null?void 0:E.data.length)??0,onOpen:()=>o(x.name)},x.name)})}),s&&d.jsx(rB,{name:s,projects:((v=m.data)==null?void 0:v.data.map(x=>x.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function uB({skill:e,projectCount:t,onOpen:n}){const a=oB[e.category];return d.jsxs("article",{onClick:n,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),d.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),d.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[d.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),d.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function fB(){var s;const e=st({queryKey:["system-info"],queryFn:l1}),t=st({queryKey:["system-env"],queryFn:YC}),[n,a]=O.useState(!1);return d.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[d.jsx("header",{children:d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),d.jsx(dB,{current:(s=e.data)==null?void 0:s.version}),d.jsxs("section",{className:"nb-card",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"Node"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),d.jsx("dt",{className:"font-bold",children:"Platform"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),d.jsx("dt",{className:"font-bold",children:"PID"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),d.jsx("dt",{className:"font-bold",children:"Uptime"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:gB(e.data.uptimeMs)})]}):d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",d.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),n?d.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":"编辑 env 文件",children:[d.jsx(Kp,{size:12,strokeWidth:2.5})," 编辑"]})]}),n?d.jsx(hB,{onClose:()=>{a(!1),t.refetch()}}):t.data&&t.data.exists?d.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(o=>d.jsxs("div",{className:"contents",children:[d.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[o.masked&&d.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),o.key]}),d.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:o.value})]},o.key))}):d.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',d.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),"。"]})]}),d.jsx(mB,{})]})}function dB({current:e}){var E;const{confirm:t,alert:n}=si(),[a,s]=O.useState(!1),[o,c]=O.useState(null),f=st({queryKey:["latest-version"],queryFn:WC,enabled:!1}),[h,m]=O.useState(null),[b,g]=O.useState("npm i -g @coralai/sps-cli@latest"),v=async()=>{var k;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(k=f.data)==null?void 0:k.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){s(!0),c(null),m(null);try{const _=await ZC();if(c(_.output),m(_.installedVersion),g(_.command),_.ok)n({title:"升级完成",body:`装上了 v${_.installedVersion}。请 \`pkill -f "sps console"\` 再重启以生效。`});else{const A=_.installedVersion&&_.installedVersion===e?`npm 执行完毕但版本没变(仍 ${_.installedVersion})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。`:"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。";n({title:"升级未生效",body:A})}}catch(_){c(_.message),n({title:"升级失败",body:_.message})}finally{s(!1)}}},x=async()=>{const w=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:b;try{await navigator.clipboard.writeText(w),n({title:"命令已复制",body:`粘贴到终端运行即可:
530
- ${w}`})}catch{n({title:"复制失败",body:`请手动复制:
531
- ${w}`})}};return d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":"检查最新版本",children:[f.isFetching?d.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Cl,{size:12,strokeWidth:2.5}),"检查更新"]})]}),d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:"npm (最新)"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[f.data.latest,f.data.upToDate?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:v,disabled:a,type:"button","aria-label":"升级到最新版本",children:[a?d.jsx(Ut,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(WE,{size:11,strokeWidth:2.5}),"升级"]}),d.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:x,type:"button","aria-label":"复制升级命令",title:"自动升级失败时手动跑",children:[d.jsx(U2,{size:11,strokeWidth:2.5})," 复制命令"]})]})]})]}),h&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:"已安装"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[h,h===((E=f.data)==null?void 0:E.latest)?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"已生效(重启 console 后可见)"}):h===e?d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"未升级成功"}):null]})]}),f.isError&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:"检查"}),d.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),o&&d.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:o})]})}function hB({onClose:e}){const t=qn(),{alert:n}=si(),a=st({queryKey:["system-env-raw"],queryFn:VC}),[s,o]=O.useState(null),[c,f]=O.useState(null);O.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const h=s!==null&&a.data&&s!==a.data.content,m=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return XC(s,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:b=>{const g=b.status;n({title:g===409?"env 被其他地方修改了":"保存失败",body:g===409?"请点取消后重开编辑。":b instanceof Error?b.message:String(b)})}});return a.isLoading?d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:s??"",onChange:b=>o(b.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),d.jsxs("div",{className:"flex items-center justify-between mt-3",children:[d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",h?" · ● 未保存":""]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:m.isPending,type:"button",children:[d.jsx(Xi,{size:12,strokeWidth:3})," 取消"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>m.mutate(),disabled:!h||m.isPending,type:"button","aria-label":"保存 env",children:[m.isPending?d.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(zf,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function mB(){var g;const{alert:e}=si(),t=st({queryKey:["projects"],queryFn:_r}),[n,a]=O.useState({}),[s,o]=O.useState({}),[c,f]=O.useState({}),h=(((g=t.data)==null?void 0:g.data)??[]).map(v=>({project:v.name})),m=async(v,x)=>{o(E=>({...E,[v]:x?"fix":"check"}));try{const E=await JC(v,x);a(w=>({...w,[v]:E})),f(w=>({...w,[v]:!0}))}catch(E){e({title:`doctor ${x?"修复":"检查"}失败`,body:E instanceof Error?E.message:String(E)})}finally{o(E=>({...E,[v]:null}))}},b=async()=>{for(const v of h)await m(v.project,!1)};return d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),d.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{b()},disabled:h.length===0||Object.values(s).some(Boolean),type:"button",children:[d.jsx(Cl,{size:12,strokeWidth:2.5}),"检查全部"]})]}),h.length===0?d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"}):d.jsx("ul",{className:"flex flex-col gap-2",children:h.map(v=>{const x=n[v.project],E=s[v.project],w=x?x.checks.filter(T=>T.status==="fail").length:0,k=x?x.checks.filter(T=>T.status==="warn").length:0,_=c[v.project]??!1,A=x!=null;return d.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[d.jsxs("button",{type:"button",onClick:()=>f(T=>({...T,[v.project]:!_})),disabled:!A,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":_?"折叠":"展开",children:[A&&x.ok?d.jsx(lp,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):A?d.jsx(rc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):d.jsx(lp,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),A&&(_?d.jsx(xc,{size:12}):d.jsx(Lf,{size:12})),d.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:v.project}),A?x.ok?d.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):d.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[w," fail · ",k," warn"]}):d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:'点 "检查" 运行 sps doctor'})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{m(v.project,!1)},disabled:!!E,type:"button","aria-label":"检查",children:[E==="check"?d.jsx(Ut,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(Cl,{size:11,strokeWidth:2.5}),"检查"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{m(v.project,!0)},disabled:!!E||A&&x.ok,type:"button","aria-label":"自动修复",title:A&&x.ok?"已无可修问题":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等",children:[E==="fix"?d.jsx(Ut,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(s1,{size:11,strokeWidth:2.5}),"修复"]})]}),_&&A&&d.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[d.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:x.checks.map((T,j)=>d.jsx(pB,{check:T},`${T.name}-${j}`))}),x.fixes.length>0&&d.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[d.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:"已修复"}),d.jsx("ul",{className:"text-xs list-disc pl-4",children:x.fixes.map((T,j)=>d.jsx("li",{children:T},j))})]})]})]},v.project)})})]})}function pB({check:e}){const t=e.status==="pass"?d.jsx(lp,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?d.jsx(rc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?d.jsx(rc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):d.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"pt-0.5 shrink-0",children:t}),d.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),d.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function gB(e){const t=Math.floor(e/1e3),n=Math.floor(t/3600),a=Math.floor(t%3600/60),s=t%60;return n>0?`${n}h ${a}m ${s}s`:a>0?`${a}m ${s}s`:`${s}s`}function bB(){return $t("/api/chat/sessions")}function yB(e){return $t(`/api/chat/sessions/${e}`)}async function iE(e={}){const t=await fetch("/api/chat/sessions",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)});if(!t.ok)throw new Error(`${t.status}: ${await t.text()}`);return await t.json()}async function xB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function vB(e,t){const n=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t})});if(!n.ok)throw new Error(`${n.status}: ${await n.text()}`);return await n.json()}async function EB(e){const t=await fetch(`/api/chat/sessions/${e}/interrupt`,{method:"POST"});if(!t.ok&&t.status!==204)throw new Error(`${t.status}: ${await t.text()}`)}function SB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return $t(`/api/chat/sessions/${e}/messages${n}`)}function aE(){var j,F,M,q,K,te,D;const{sessionId:e}=$E(),t=wr(),n=qn(),{confirm:a,alert:s}=si(),o=st({queryKey:["chat-sessions"],queryFn:bB}),c=st({queryKey:["chat-session",e],queryFn:()=>yB(e??""),enabled:!!e}),[f,h]=O.useState(null),[m,b]=O.useState(""),[g,v]=O.useState(!1),x=O.useRef(null),[E,w]=O.useState(!1);O.useEffect(()=>{if(!e)return;const P=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let J=!0;return P.addEventListener("open",()=>{if(J){J=!1;return}const re=n.getQueryData(["chat-session",e]),Q=re!=null&&re.messages.length?re.messages[re.messages.length-1].ts:void 0;SB(e,Q).then(Y=>{Y.data.length!==0&&n.setQueryData(["chat-session",e],U=>{if(!U)return U;const ae=new Set(U.messages.map(he=>he.id)),G=Y.data.filter(he=>!ae.has(he.id));return G.length===0?U:{...U,messages:[...U.messages,...G],lastMessageAt:G[G.length-1].ts,messageCount:U.messageCount+G.length}})}).catch(()=>{})}),P.addEventListener("chat.message",re=>{try{const Q=JSON.parse(re.data);n.setQueryData(["chat-session",e],Y=>{if(!Y||Y.messages.some(G=>G.id===Q.message.id))return Y;const ae=Y.messages.findIndex(G=>G.role==="user"&&G.id.startsWith("optim-")&&G.content===Q.message.content);if(ae>=0){const G=[...Y.messages];return G[ae]=Q.message,{...Y,messages:G}}return{...Y,messages:[...Y.messages,Q.message]}})}catch{}}),P.addEventListener("chat.message.pending",re=>{try{const Q=JSON.parse(re.data);h({id:Q.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),P.addEventListener("chat.message.chunk.text",re=>{try{const Q=JSON.parse(re.data);h(Y=>{if(!Y||Y.id!==Q.assistantId)return Y;const U=[...Y.blocks],ae=U[U.length-1];return ae&&ae.type==="text"?U[U.length-1]={...ae,target:ae.target+Q.text}:U.push({type:"text",target:Q.text,displayed:""}),{...Y,blocks:U}})}catch{}}),P.addEventListener("chat.message.chunk.tool_use",re=>{try{const Q=JSON.parse(re.data);h(Y=>!Y||Y.id!==Q.assistantId?Y:{...Y,blocks:[...Y.blocks,{type:"tool_use",id:Q.id,title:Q.title,kind:Q.kind,status:Q.status}]})}catch{}}),P.addEventListener("chat.message.chunk.tool_update",re=>{try{const Q=JSON.parse(re.data);h(Y=>!Y||Y.id!==Q.assistantId?Y:{...Y,blocks:Y.blocks.map(U=>U.type==="tool_use"&&U.id===Q.id?{...U,status:Q.status}:U)})}catch{}}),P.addEventListener("chat.message.complete",re=>{try{const Q=JSON.parse(re.data);h(Y=>Y&&Y.id===Q.assistantId?{...Y,done:!0,finalMessage:Q.message}:Y)}catch{}}),()=>P.close()},[e,n]),O.useEffect(()=>{if(!f)return;const P=f.blocks.reduce((re,Q)=>Q.type==="text"?re+(Q.target.length-Q.displayed.length):re,0);if(P<=0){if(f.done&&f.finalMessage){const re=f.finalMessage;n.setQueryData(["chat-session",e],Q=>!Q||Q.messages.some(Y=>Y.id===re.id)?Q:{...Q,messages:[...Q.messages,re],lastMessageAt:re.ts,messageCount:Q.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),h(null),v(!1)}return}const J=setTimeout(()=>{h(re=>{if(!re)return re;let Q=Math.max(1,Math.ceil(P/40));const Y=re.blocks.map(U=>{if(U.type!=="text"||Q<=0)return U;const ae=U.target.length-U.displayed.length;if(ae<=0)return U;const G=Math.min(ae,Q);return Q-=G,{...U,displayed:U.target.slice(0,U.displayed.length+G)}});return{...re,blocks:Y}})},25);return()=>clearTimeout(J)},[f,n,e]),O.useEffect(()=>{const P=x.current;P&&(P.scrollTop=P.scrollHeight)},[c.data,f]);const k=O.useCallback(async(P={})=>{var J,re;try{const Q=await iE({cwd:((J=P.cwd)==null?void 0:J.trim())||void 0,title:((re=P.title)==null?void 0:re.trim())||void 0});n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${Q.id}`),w(!1)}catch(Q){s({title:"新建对话失败",body:Q instanceof Error?Q.message:String(Q)})}},[n,t,s]),_=O.useCallback(async()=>{const P=m.trim();if(!P||g)return;let J=e;if(!J){const Q=await iE();n.invalidateQueries({queryKey:["chat-sessions"]}),J=Q.id,t(`/chat/${J}`,{replace:!0})}const re={id:`optim-${Date.now()}`,role:"user",content:P,ts:new Date().toISOString(),status:"complete"};n.setQueryData(["chat-session",J],Q=>Q?{...Q,messages:[...Q.messages,re],lastMessageAt:re.ts,messageCount:Q.messageCount+1}:{id:J,createdAt:re.ts,lastMessageAt:re.ts,title:P.slice(0,60),project:null,messageCount:1,messages:[re]}),b(""),v(!0);try{await vB(J,P)}catch(Q){v(!1),console.error("sendMessage failed",Q),s({title:"发送失败",body:Q instanceof Error?Q.message:String(Q)})}},[m,g,e,n,t,s]),A=O.useCallback(async P=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await xB(P),n.invalidateQueries({queryKey:["chat-sessions"]}),e===P&&t("/chat"))},[n,e,t,a]),T=O.useCallback(async()=>{if(e)try{await EB(e)}catch(P){s({title:"中断失败",body:P instanceof Error?P.message:String(P)})}},[e,s]);return d.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[d.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[d.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>w(!0),type:"button",children:[d.jsx(Di,{size:14,strokeWidth:3}),"新建对话"]}),d.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((j=o.data)==null?void 0:j.data.length)??0]}),d.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((F=o.data)==null?void 0:F.data)??[]).map(P=>d.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===P.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsxs("button",{type:"button","aria-label":`打开对话 ${P.title}${P.cwd?`(工作目录 ${P.cwd})`:""}`,onClick:()=>t(`/chat/${P.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[d.jsx(Pv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold truncate",children:P.title}),d.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[P.messageCount," msg · ",zw(P.lastMessageAt??P.createdAt)]}),P.cwd&&d.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:P.cwd,children:[d.jsx(sc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",dir:"rtl",children:P.cwd})]})]})]}),d.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:J=>{J.stopPropagation(),A(P.id)},children:d.jsx(Il,{size:12})})]},P.id)),(((M=o.data)==null?void 0:M.data)??[]).length===0&&d.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),d.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?d.jsxs(d.Fragment,{children:[d.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((q=c.data)==null?void 0:q.title)??"新对话"}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e}),((K=c.data)==null?void 0:K.cwd)&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:c.data.cwd,children:[d.jsx(sc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",children:c.data.cwd})]})]}),d.jsxs("div",{ref:x,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((te=c.data)==null?void 0:te.messages)??[]).map(P=>d.jsx(_B,{msg:P},P.id)),f&&d.jsx(kB,{pending:f}),!c.isLoading&&(((D=c.data)==null?void 0:D.messages)??[]).length===0&&!f&&!g&&d.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),d.jsx("div",{className:"border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)]",children:d.jsxs("div",{className:"flex gap-2 items-end",children:[d.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:"说点什么… (Enter 发送,Shift+Enter 换行)",rows:2,value:m,onChange:P=>b(P.target.value),onKeyDown:P=>{P.key==="Enter"&&!P.shiftKey&&!P.nativeEvent.isComposing&&(P.preventDefault(),_())},"aria-label":"消息输入"}),f?d.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:T,type:"button","aria-label":"中断生成",children:[d.jsx(n1,{size:14,strokeWidth:3}),"中断"]}):d.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:_,disabled:!m.trim()||g,type:"button","aria-label":"发送",children:[g?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(NC,{size:14,strokeWidth:3}),"发送"]})]})})]}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:d.jsx(Pv,{size:32,strokeWidth:2.5})}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),d.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})}),E&&d.jsx(wB,{onCancel:()=>w(!1),onCreate:P=>k(P)})]})}function wB({onCancel:e,onCreate:t}){const[n,a]=O.useState(""),[s,o]=O.useState(""),[c,f]=O.useState(!1),[h,m]=O.useState(!1);O.useEffect(()=>{if(h)return;const g=v=>{v.key==="Escape"&&(v.preventDefault(),e())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e,h]);const b=async()=>{if(!c){f(!0);try{t({title:n.trim()||void 0,cwd:s.trim()||void 0})}finally{f(!1)}}};return d.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",role:"presentation",children:[d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":"新建对话",children:[d.jsxs("header",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:"新建对话"}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":"关闭",children:d.jsx(Xi,{size:16,strokeWidth:3})})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"标题(可选)"}),d.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:"留空 = 自动用首条消息生成",value:n,onChange:g=>a(g.target.value),autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"工作目录(可选)"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:s,onChange:g=>o(g.target.value)}),d.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>m(!0),"aria-label":"浏览选择目录",title:"浏览选择目录",children:[d.jsx(ZE,{size:14,strokeWidth:2.5}),"浏览"]})]}),d.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[d.jsx(sc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),"Agent 在该目录下读写文件。绝对路径,必须存在。 留空则用 daemon 启动时的目录。"]})]}),d.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:"取消"}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:b,disabled:c,children:[c?d.jsx(Ut,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(Di,{size:14,strokeWidth:3}),"创建"]})]})]})]}),h&&d.jsx(o1,{initialPath:s.trim()||void 0,onCancel:()=>m(!1),onSelect:g=>{o(g),m(!1)}})]})}function _B({msg:e}){const t=e.role==="user",n=e.role==="error",a=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}];return d.jsx("div",{className:t?"self-end max-w-3xl":"self-start max-w-3xl",children:d.jsxs("div",{className:["nb-card",t?"bg-[var(--color-secondary)]":n?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[d.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[t?"你":n?"错误":"assistant",d.jsx("span",{className:"font-normal",children:"·"}),d.jsx("span",{className:"font-normal",children:zw(e.ts)})]}),d.jsx("div",{className:"flex flex-col gap-2",children:a.map((s,o)=>d.jsx(NB,{block:s},o))}),e.truncated&&d.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 输出超过 10MB,已截断"})]})})}function kB({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return d.jsx("div",{className:"self-start max-w-3xl",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[d.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",d.jsx("span",{className:"font-normal",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[d.jsx(Ut,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,a)=>{if(n.type==="text"){const s=a===t;return d.jsxs("div",{className:"relative",children:[d.jsx(Lw,{text:n.displayed}),s&&d.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return d.jsx(Iw,{tool:n},a)})]})]})})}function NB({block:e}){return e.type==="text"?d.jsx(Lw,{text:e.text}):d.jsx(Iw,{tool:e})}function Lw({text:e}){return e?d.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:d.jsx(Ng,{remarkPlugins:[Og],rehypePlugins:[jg],children:e})}):null}function Iw({tool:e}){const[t,n]=O.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return d.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[d.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[d.jsx(Lf,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),d.jsx(s1,{size:12,strokeWidth:2.5}),d.jsx("span",{className:"font-bold",children:e.kind}),d.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&d.jsx(Ut,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&d.jsx(If,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&d.jsx(L2,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&d.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[d.jsxs("div",{children:["id: ",d.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),d.jsxs("div",{children:["status: ",d.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function zw(e){if(!e)return"";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m`:n<864e5?`${Math.floor(n/36e5)}h`:t.toLocaleDateString()}function TB(){return d.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:"404 · 页面不存在"}),d.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"没找到这个页面。可能是链接过期了。"}),d.jsx(ds,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"返回首页"})]})}function CB(){return d.jsx(gA,{children:d.jsx(IT,{children:d.jsxs(zn,{element:d.jsx(mA,{}),children:[d.jsx(zn,{index:!0,element:d.jsx(jT,{to:"/projects",replace:!0})}),d.jsx(zn,{path:"/projects",element:d.jsx(bA,{})}),d.jsx(zn,{path:"/projects/new",element:d.jsx(TA,{})}),d.jsx(zn,{path:"/projects/:name",element:d.jsx($O,{})}),d.jsx(zn,{path:"/board",element:d.jsx(NR,{})}),d.jsx(zn,{path:"/workers",element:d.jsx(FR,{})}),d.jsx(zn,{path:"/logs",element:d.jsx(GR,{})}),d.jsx(zn,{path:"/skills",element:d.jsx(cB,{})}),d.jsx(zn,{path:"/system",element:d.jsx(fB,{})}),d.jsx(zn,{path:"/chat",element:d.jsx(aE,{})}),d.jsx(zn,{path:"/chat/:sessionId",element:d.jsx(aE,{})}),d.jsx(zn,{path:"*",element:d.jsx(TB,{})})]})})})}pA();const AB=new wN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Bw=document.getElementById("root");if(!Bw)throw new Error("#root not found");Zk.createRoot(Bw).render(d.jsx(O.StrictMode,{children:d.jsx(_N,{client:AB,children:d.jsx(l2,{children:d.jsx(_A,{children:d.jsx(CB,{})})})})}));