@coralai/sps-cli 0.51.14 → 0.51.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,557 @@
1
+ var X_=Object.defineProperty;var gv=e=>{throw TypeError(e)};var Z_=(e,t,n)=>t in e?X_(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var bv=(e,t,n)=>Z_(e,typeof t!="symbol"?t+"":t,n),lp=(e,t,n)=>t.has(e)||gv("Cannot "+n);var I=(e,t,n)=>(lp(e,t,"read from private field"),n?n.call(e):t.get(e)),je=(e,t,n)=>t.has(e)?gv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),we=(e,t,n,a)=>(lp(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Ke=(e,t,n)=>(lp(e,t,"access private method"),n);var Gu=(e,t,n,a)=>({set _(s){we(e,t,s,n)},get _(){return I(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 Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var op={exports:{}},qo={};/**
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 yv;function J_(){if(yv)return qo;yv=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 d in s)d!=="key"&&(o[d]=s[d])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return qo.Fragment=t,qo.jsx=n,qo.jsxs=n,qo}var xv;function eN(){return xv||(xv=1,op.exports=J_()),op.exports}var h=eN(),cp={exports:{}},Pe={};/**
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 vv;function tN(){if(vv)return Pe;vv=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"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),v=Symbol.iterator;function x(R){return R===null||typeof R!="object"?null:(R=v&&R[v]||R["@@iterator"],typeof R=="function"?R:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function _(R,Q,j){this.props=R,this.context=Q,this.refs=S,this.updater=j||E}_.prototype.isReactComponent={},_.prototype.setState=function(R,Q){if(typeof R!="object"&&typeof R!="function"&&R!=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,R,Q,"setState")},_.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function C(){}C.prototype=_.prototype;function T(R,Q,j){this.props=R,this.context=Q,this.refs=S,this.updater=j||E}var D=T.prototype=new C;D.constructor=T,w(D,_.prototype),D.isPureReactComponent=!0;var B=Array.isArray;function M(){}var q={H:null,A:null,T:null,S:null},F=Object.prototype.hasOwnProperty;function ee(R,Q,j){var ge=j.ref;return{$$typeof:e,type:R,key:Q,ref:ge!==void 0?ge:null,props:j}}function U(R,Q){return ee(R.type,Q,R.props)}function X(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function J(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(j){return Q[j]})}var pe=/\/+/g;function ue(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?J(""+R.key):Q.toString(36)}function te(R){switch(R.status){case"fulfilled":return R.value;case"rejected":throw R.reason;default:switch(typeof R.status=="string"?R.then(M,M):(R.status="pending",R.then(function(Q){R.status==="pending"&&(R.status="fulfilled",R.value=Q)},function(Q){R.status==="pending"&&(R.status="rejected",R.reason=Q)})),R.status){case"fulfilled":return R.value;case"rejected":throw R.reason}}throw R}function $(R,Q,j,ge,_e){var Y=typeof R;(Y==="undefined"||Y==="boolean")&&(R=null);var xe=!1;if(R===null)xe=!0;else switch(Y){case"bigint":case"string":case"number":xe=!0;break;case"object":switch(R.$$typeof){case e:case t:xe=!0;break;case b:return xe=R._init,$(xe(R._payload),Q,j,ge,_e)}}if(xe)return _e=_e(R),xe=ge===""?"."+ue(R,0):ge,B(_e)?(j="",xe!=null&&(j=xe.replace(pe,"$&/")+"/"),$(_e,Q,j,"",function(ye){return ye})):_e!=null&&(X(_e)&&(_e=U(_e,j+(_e.key==null||R&&R.key===_e.key?"":(""+_e.key).replace(pe,"$&/")+"/")+xe)),Q.push(_e)),1;xe=0;var V=ge===""?".":ge+":";if(B(R))for(var ae=0;ae<R.length;ae++)ge=R[ae],Y=V+ue(ge,ae),xe+=$(ge,Q,j,Y,_e);else if(ae=x(R),typeof ae=="function")for(R=ae.call(R),ae=0;!(ge=R.next()).done;)ge=ge.value,Y=V+ue(ge,ae++),xe+=$(ge,Q,j,Y,_e);else if(Y==="object"){if(typeof R.then=="function")return $(te(R),Q,j,ge,_e);throw Q=String(R),Error("Objects are not valid as a React child (found: "+(Q==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":Q)+"). If you meant to render a collection of children, use an array instead.")}return xe}function ce(R,Q,j){if(R==null)return R;var ge=[],_e=0;return $(R,ge,"","",function(Y){return Q.call(j,Y,_e++)}),ge}function de(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(j){(R._status===0||R._status===-1)&&(R._status=1,R._result=j)},function(j){(R._status===0||R._status===-1)&&(R._status=2,R._result=j)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var re=typeof reportError=="function"?reportError:function(R){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var Q=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof R=="object"&&R!==null&&typeof R.message=="string"?String(R.message):String(R),error:R});if(!window.dispatchEvent(Q))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",R);return}console.error(R)},O={map:ce,forEach:function(R,Q,j){ce(R,function(){Q.apply(this,arguments)},j)},count:function(R){var Q=0;return ce(R,function(){Q++}),Q},toArray:function(R){return ce(R,function(Q){return Q})||[]},only:function(R){if(!X(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Pe.Activity=g,Pe.Children=O,Pe.Component=_,Pe.Fragment=n,Pe.Profiler=s,Pe.PureComponent=T,Pe.StrictMode=a,Pe.Suspense=f,Pe.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=q,Pe.__COMPILER_RUNTIME={__proto__:null,c:function(R){return q.H.useMemoCache(R)}},Pe.cache=function(R){return function(){return R.apply(null,arguments)}},Pe.cacheSignal=function(){return null},Pe.cloneElement=function(R,Q,j){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var ge=w({},R.props),_e=R.key;if(Q!=null)for(Y in Q.key!==void 0&&(_e=""+Q.key),Q)!F.call(Q,Y)||Y==="key"||Y==="__self"||Y==="__source"||Y==="ref"&&Q.ref===void 0||(ge[Y]=Q[Y]);var Y=arguments.length-2;if(Y===1)ge.children=j;else if(1<Y){for(var xe=Array(Y),V=0;V<Y;V++)xe[V]=arguments[V+2];ge.children=xe}return ee(R.type,_e,ge)},Pe.createContext=function(R){return R={$$typeof:c,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null},R.Provider=R,R.Consumer={$$typeof:o,_context:R},R},Pe.createElement=function(R,Q,j){var ge,_e={},Y=null;if(Q!=null)for(ge in Q.key!==void 0&&(Y=""+Q.key),Q)F.call(Q,ge)&&ge!=="key"&&ge!=="__self"&&ge!=="__source"&&(_e[ge]=Q[ge]);var xe=arguments.length-2;if(xe===1)_e.children=j;else if(1<xe){for(var V=Array(xe),ae=0;ae<xe;ae++)V[ae]=arguments[ae+2];_e.children=V}if(R&&R.defaultProps)for(ge in xe=R.defaultProps,xe)_e[ge]===void 0&&(_e[ge]=xe[ge]);return ee(R,Y,_e)},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:d,render:R}},Pe.isValidElement=X,Pe.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:de}},Pe.memo=function(R,Q){return{$$typeof:p,type:R,compare:Q===void 0?null:Q}},Pe.startTransition=function(R){var Q=q.T,j={};q.T=j;try{var ge=R(),_e=q.S;_e!==null&&_e(j,ge),typeof ge=="object"&&ge!==null&&typeof ge.then=="function"&&ge.then(M,re)}catch(Y){re(Y)}finally{Q!==null&&j.types!==null&&(Q.types=j.types),q.T=Q}},Pe.unstable_useCacheRefresh=function(){return q.H.useCacheRefresh()},Pe.use=function(R){return q.H.use(R)},Pe.useActionState=function(R,Q,j){return q.H.useActionState(R,Q,j)},Pe.useCallback=function(R,Q){return q.H.useCallback(R,Q)},Pe.useContext=function(R){return q.H.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R,Q){return q.H.useDeferredValue(R,Q)},Pe.useEffect=function(R,Q){return q.H.useEffect(R,Q)},Pe.useEffectEvent=function(R){return q.H.useEffectEvent(R)},Pe.useId=function(){return q.H.useId()},Pe.useImperativeHandle=function(R,Q,j){return q.H.useImperativeHandle(R,Q,j)},Pe.useInsertionEffect=function(R,Q){return q.H.useInsertionEffect(R,Q)},Pe.useLayoutEffect=function(R,Q){return q.H.useLayoutEffect(R,Q)},Pe.useMemo=function(R,Q){return q.H.useMemo(R,Q)},Pe.useOptimistic=function(R,Q){return q.H.useOptimistic(R,Q)},Pe.useReducer=function(R,Q,j){return q.H.useReducer(R,Q,j)},Pe.useRef=function(R){return q.H.useRef(R)},Pe.useState=function(R){return q.H.useState(R)},Pe.useSyncExternalStore=function(R,Q,j){return q.H.useSyncExternalStore(R,Q,j)},Pe.useTransition=function(){return q.H.useTransition()},Pe.version="19.2.5",Pe}var wv;function Im(){return wv||(wv=1,cp.exports=tN()),cp.exports}var A=Im(),up={exports:{}},$o={},dp={exports:{}},fp={};/**
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 kv;function nN(){return kv||(kv=1,(function(e){function t($,ce){var de=$.length;$.push(ce);e:for(;0<de;){var re=de-1>>>1,O=$[re];if(0<s(O,ce))$[re]=ce,$[de]=O,de=re;else break e}}function n($){return $.length===0?null:$[0]}function a($){if($.length===0)return null;var ce=$[0],de=$.pop();if(de!==ce){$[0]=de;e:for(var re=0,O=$.length,R=O>>>1;re<R;){var Q=2*(re+1)-1,j=$[Q],ge=Q+1,_e=$[ge];if(0>s(j,de))ge<O&&0>s(_e,j)?($[re]=_e,$[ge]=de,re=ge):($[re]=j,$[Q]=de,re=Q);else if(ge<O&&0>s(_e,de))$[re]=_e,$[ge]=de,re=ge;else break e}}return ce}function s($,ce){var de=$.sortIndex-ce.sortIndex;return de!==0?de:$.id-ce.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,d=c.now();e.unstable_now=function(){return c.now()-d}}var f=[],p=[],b=1,g=null,v=3,x=!1,E=!1,w=!1,S=!1,_=typeof setTimeout=="function"?setTimeout:null,C=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function D($){for(var ce=n(p);ce!==null;){if(ce.callback===null)a(p);else if(ce.startTime<=$)a(p),ce.sortIndex=ce.expirationTime,t(f,ce);else break;ce=n(p)}}function B($){if(w=!1,D($),!E)if(n(f)!==null)E=!0,M||(M=!0,J());else{var ce=n(p);ce!==null&&te(B,ce.startTime-$)}}var M=!1,q=-1,F=5,ee=-1;function U(){return S?!0:!(e.unstable_now()-ee<F)}function X(){if(S=!1,M){var $=e.unstable_now();ee=$;var ce=!0;try{e:{E=!1,w&&(w=!1,C(q),q=-1),x=!0;var de=v;try{t:{for(D($),g=n(f);g!==null&&!(g.expirationTime>$&&U());){var re=g.callback;if(typeof re=="function"){g.callback=null,v=g.priorityLevel;var O=re(g.expirationTime<=$);if($=e.unstable_now(),typeof O=="function"){g.callback=O,D($),ce=!0;break t}g===n(f)&&a(f),D($)}else a(f);g=n(f)}if(g!==null)ce=!0;else{var R=n(p);R!==null&&te(B,R.startTime-$),ce=!1}}break e}finally{g=null,v=de,x=!1}ce=void 0}}finally{ce?J():M=!1}}}var J;if(typeof T=="function")J=function(){T(X)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,ue=pe.port2;pe.port1.onmessage=X,J=function(){ue.postMessage(null)}}else J=function(){_(X,0)};function te($,ce){q=_(function(){$(e.unstable_now())},ce)}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($){$.callback=null},e.unstable_forceFrameRate=function($){0>$||125<$?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):F=0<$?Math.floor(1e3/$):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function($){switch(v){case 1:case 2:case 3:var ce=3;break;default:ce=v}var de=v;v=ce;try{return $()}finally{v=de}},e.unstable_requestPaint=function(){S=!0},e.unstable_runWithPriority=function($,ce){switch($){case 1:case 2:case 3:case 4:case 5:break;default:$=3}var de=v;v=$;try{return ce()}finally{v=de}},e.unstable_scheduleCallback=function($,ce,de){var re=e.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?re+de:re):de=re,$){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=de+O,$={id:b++,callback:ce,priorityLevel:$,startTime:de,expirationTime:O,sortIndex:-1},de>re?($.sortIndex=de,t(p,$),n(f)===null&&$===n(p)&&(w?(C(q),q=-1):w=!0,te(B,de-re))):($.sortIndex=O,t(f,$),E||x||(E=!0,M||(M=!0,J()))),$},e.unstable_shouldYield=U,e.unstable_wrapCallback=function($){var ce=v;return function(){var de=v;v=ce;try{return $.apply(this,arguments)}finally{v=de}}}})(fp)),fp}var Ev;function iN(){return Ev||(Ev=1,dp.exports=nN()),dp.exports}var hp={exports:{}},yn={};/**
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 Sv;function aN(){if(Sv)return yn;Sv=1;var e=Im();function t(f){var p="https://react.dev/errors/"+f;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+f+"; visit "+p+" 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(f,p,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:f,containerInfo:p,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(f,p){if(f==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return yn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,yn.createPortal=function(f,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(t(299));return o(f,p,null,b)},yn.flushSync=function(f){var p=c.T,b=a.p;try{if(c.T=null,a.p=2,f)return f()}finally{c.T=p,a.p=b,a.d.f()}},yn.preconnect=function(f,p){typeof f=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,a.d.C(f,p))},yn.prefetchDNS=function(f){typeof f=="string"&&a.d.D(f)},yn.preinit=function(f,p){if(typeof f=="string"&&p&&typeof p.as=="string"){var b=p.as,g=d(b,p.crossOrigin),v=typeof p.integrity=="string"?p.integrity:void 0,x=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?a.d.S(f,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):b==="script"&&a.d.X(f,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},yn.preinitModule=function(f,p){if(typeof f=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=d(p.as,p.crossOrigin);a.d.M(f,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&a.d.M(f)},yn.preload=function(f,p){if(typeof f=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,g=d(b,p.crossOrigin);a.d.L(f,b,{crossOrigin:g,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},yn.preloadModule=function(f,p){if(typeof f=="string")if(p){var b=d(p.as,p.crossOrigin);a.d.m(f,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else a.d.m(f)},yn.requestFormReset=function(f){a.d.r(f)},yn.unstable_batchedUpdates=function(f,p){return f(p)},yn.useFormState=function(f,p,b){return c.H.useFormState(f,p,b)},yn.useFormStatus=function(){return c.H.useHostTransitionStatus()},yn.version="19.2.5",yn}var _v;function rN(){if(_v)return hp.exports;_v=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(),hp.exports=aN(),hp.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 Nv;function sN(){if(Nv)return $o;Nv=1;var e=iN(),t=Im(),n=rN();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 d(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 f(i){if(o(i)!==i)throw Error(a(188))}function p(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 m=l.return;if(m===null)break;var y=m.alternate;if(y===null){if(u=m.return,u!==null){l=u;continue}break}if(m.child===y.child){for(y=m.child;y;){if(y===l)return f(m),i;if(y===u)return f(m),r;y=y.sibling}throw Error(a(188))}if(l.return!==u.return)l=m,u=y;else{for(var k=!1,N=m.child;N;){if(N===l){k=!0,l=m,u=y;break}if(N===u){k=!0,u=m,l=y;break}N=N.sibling}if(!k){for(N=y.child;N;){if(N===l){k=!0,l=y,u=m;break}if(N===u){k=!0,u=y,l=m;break}N=N.sibling}if(!k)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"),S=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),C=Symbol.for("react.consumer"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),q=Symbol.for("react.memo"),F=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function J(i){return i===null||typeof i!="object"?null:(i=X&&i[X]||i["@@iterator"],typeof i=="function"?i:null)}var pe=Symbol.for("react.client.reference");function ue(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===pe?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case S:return"StrictMode";case B:return"Suspense";case M:return"SuspenseList";case ee:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case T:return i.displayName||"Context";case C:return(i._context.displayName||"Context")+".Consumer";case D: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:ue(i.type)||"Memo";case F:r=i._payload,i=i._init;try{return ue(i(r))}catch{}}return null}var te=Array.isArray,$=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ce=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,de={pending:!1,data:null,method:null,action:null},re=[],O=-1;function R(i){return{current:i}}function Q(i){0>O||(i.current=re[O],re[O]=null,O--)}function j(i,r){O++,re[O]=i.current,i.current=r}var ge=R(null),_e=R(null),Y=R(null),xe=R(null);function V(i,r){switch(j(Y,r),j(_e,i),j(ge,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?Ux(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=Ux(r),i=Px(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}Q(ge),j(ge,i)}function ae(){Q(ge),Q(_e),Q(Y)}function ye(i){i.memoizedState!==null&&j(xe,i);var r=ge.current,l=Px(r,i.type);r!==l&&(j(_e,i),j(ge,l))}function Be(i){_e.current===i&&(Q(ge),Q(_e)),xe.current===i&&(Q(xe),Bo._currentValue=de)}var jt,St;function on(i){if(jt===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);jt=r&&r[1]||"",St=-1<l.stack.indexOf(`
42
+ at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
43
+ `+jt+i+St}var Pi=!1;function tt(i,r){if(!i||Pi)return"";Pi=!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(Z){var W=Z}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(Z){W=Z}i.call(oe.prototype)}}else{try{throw Error()}catch(Z){W=Z}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Z){if(Z&&W&&typeof Z.stack=="string")return[Z.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var m=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");m&&m.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),k=y[0],N=y[1];if(k&&N){var L=k.split(`
44
+ `),G=N.split(`
45
+ `);for(m=u=0;u<L.length&&!L[u].includes("DetermineComponentFrameRoot");)u++;for(;m<G.length&&!G[m].includes("DetermineComponentFrameRoot");)m++;if(u===L.length||m===G.length)for(u=L.length-1,m=G.length-1;1<=u&&0<=m&&L[u]!==G[m];)m--;for(;1<=u&&0<=m;u--,m--)if(L[u]!==G[m]){if(u!==1||m!==1)do if(u--,m--,0>m||L[u]!==G[m]){var ie=`
46
+ `+L[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=m);break}}}finally{Pi=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?on(l):""}function Ti(i,r){switch(i.tag){case 26:case 27:case 5:return on(i.type);case 16:return on("Lazy");case 13:return i.child!==r&&r!==null?on("Suspense Fallback"):on("Suspense");case 19:return on("SuspenseList");case 0:case 15:return tt(i.type,!1);case 11:return tt(i.type.render,!1);case 1:return tt(i.type,!0);case 31:return on("Activity");default:return""}}function ui(i){try{var r="",l=null;do r+=Ti(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
47
+ Error generating stack: `+u.message+`
48
+ `+u.stack}}var Fi=Object.prototype.hasOwnProperty,na=e.unstable_scheduleCallback,Tr=e.unstable_cancelCallback,Ql=e.unstable_shouldYield,ys=e.unstable_requestPaint,Lt=e.unstable_now,xs=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,me=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,Qe=e.unstable_LowPriority,rt=e.unstable_IdlePriority,En=e.log,Ai=e.unstable_setDisableYieldValue,cn=null,Pt=null;function mn(i){if(typeof En=="function"&&Ai(i),Pt&&typeof Pt.setStrictMode=="function")try{Pt.setStrictMode(cn,i)}catch{}}var dt=Math.clz32?Math.clz32:jc,qi=Math.log,Sn=Math.LN2;function jc(i){return i>>>=0,i===0?32:31-(qi(i)/Sn|0)|0}var Ar=256,vs=262144,jr=4194304;function Dn(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 z(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var m=0,y=i.suspendedLanes,k=i.pingedLanes;i=i.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?m=Dn(u):(k&=N,k!==0?m=Dn(k):l||(l=N&~i,l!==0&&(m=Dn(l))))):(N=u&~y,N!==0?m=Dn(N):k!==0?m=Dn(k):l||(l=u&~i,l!==0&&(m=Dn(l)))),m===0?0:r!==0&&r!==m&&(r&y)===0&&(y=m&-m,l=r&-r,y>=l||y===32&&(l&4194048)!==0)?r:m}function se(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function ve(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 ze(){var i=jr;return jr<<=1,(jr&62914560)===0&&(jr=4194304),i}function Ct(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function vt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function Se(i,r,l,u,m,y){var k=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,L=i.expirationTimes,G=i.hiddenUpdates;for(l=k&~l;0<l;){var ie=31-dt(l),oe=1<<ie;N[ie]=0,L[ie]=-1;var W=G[ie];if(W!==null)for(G[ie]=null,ie=0;ie<W.length;ie++){var Z=W[ie];Z!==null&&(Z.lane&=-536870913)}l&=~oe}u!==0&&ke(i,u,0),y!==0&&m===0&&i.tag!==0&&(i.suspendedLanes|=y&~(k&~r))}function ke(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-dt(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function Ie(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-dt(l),m=1<<u;m&r|i[u]&r&&(i[u]|=r),l&=~m}}function Kt(i,r){var l=r&-r;return l=(l&42)!==0?1:Ot(l),(l&(i.suspendedLanes|r))!==0?0:l}function Ot(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 ia(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function ws(){var i=ce.p;return i!==0?i:(i=window.event,i===void 0?32:cv(i.type))}function ks(i,r){var l=ce.p;try{return ce.p=i,r()}finally{ce.p=l}}var $i=Math.random().toString(36).slice(2),Gt="__reactFiber$"+$i,gn="__reactProps$"+$i,Ma="__reactContainer$"+$i,Yl="__reactEvents$"+$i,Oc="__reactListeners$"+$i,Es="__reactHandles$"+$i,Dc="__reactResources$"+$i,Or="__reactMarker$"+$i;function Vl(i){delete i[Gt],delete i[gn],delete i[Yl],delete i[Oc],delete i[Es]}function _n(i){var r=i[Gt];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ma]||l[Gt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Qx(i);i!==null;){if(l=i[Gt])return l;i=Qx(i)}return r}i=l,l=i.parentNode}return null}function aa(i){if(i=i[Gt]||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 Ra(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function La(i){var r=i[Dc];return r||(r=i[Dc]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Wt(i){i[Or]=!0}var Mc=new Set,Dr={};function ra(i,r){fe(i,r),fe(i+"Capture",r)}function fe(i,r){for(Dr[i]=r,i=0;i<r.length;i++)Mc.add(r[i])}var Ae=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]*$"),Ye={},ft={};function Qt(i){return Fi.call(ft,i)?!0:Fi.call(Ye,i)?!1:Ae.test(i)?ft[i]=!0:(Ye[i]=!0,!1)}function bn(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 Vn(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 Mn(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 _t(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Wn(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 m=u.get,y=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return m.call(this)},set:function(k){l=""+k,y.call(this,k)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(k){l=""+k},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function Ss(i){if(!i._valueTracker){var r=Wn(i)?"checked":"value";i._valueTracker=Rc(i,r,""+i[r])}}function Wl(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return i&&(u=Wn(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 sf=/[\n"\\]/g;function Rn(i){return i.replace(sf,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Xl(i,r,l,u,m,y,k,N){i.name="",k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?i.type=k:i.removeAttribute("type"),r!=null?k==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+_t(r)):i.value!==""+_t(r)&&(i.value=""+_t(r)):k!=="submit"&&k!=="reset"||i.removeAttribute("value"),r!=null?Ns(i,k,_t(r)):l!=null?Ns(i,k,_t(l)):u!=null&&i.removeAttribute("value"),m==null&&y!=null&&(i.defaultChecked=!!y),m!=null&&(i.checked=m&&typeof m!="function"&&typeof m!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+_t(N):i.removeAttribute("name")}function Mr(i,r,l,u,m,y,k,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)){Ss(i);return}l=l!=null?""+_t(l):"",r=r!=null?""+_t(r):l,N||r===i.value||(i.value=r),i.defaultValue=r}u=u??m,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=N?i.checked:!!u,i.defaultChecked=!!u,k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"&&(i.name=k),Ss(i)}function Ns(i,r,l){r==="number"&&_s(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function un(i,r,l,u){if(i=i.options,r){r={};for(var m=0;m<l.length;m++)r["$"+l[m]]=!0;for(l=0;l<i.length;l++)m=r.hasOwnProperty("$"+i[l].value),i[l].selected!==m&&(i[l].selected=m),m&&u&&(i[l].defaultSelected=!0)}else{for(l=""+_t(l),r=null,m=0;m<i.length;m++){if(i[m].value===l){i[m].selected=!0,u&&(i[m].defaultSelected=!0);return}r!==null||i[m].disabled||(r=i[m])}r!==null&&(r.selected=!0)}}function Lc(i,r,l){if(r!=null&&(r=""+_t(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+_t(l):""}function Cs(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=_t(r),i.defaultValue=l,u=i.textContent,u===l&&u!==""&&u!==null&&(i.value=u),Ss(i)}function Le(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var Ic=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 Xt(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||Ic.has(r)?r==="float"?i.cssFloat=l:i[r]=(""+l).trim():i[r]=l+"px"}function ht(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 m in r)u=r[m],r.hasOwnProperty(m)&&l[m]!==u&&Xt(i,m,u)}else for(var y in r)r.hasOwnProperty(y)&&Xt(i,y,r[y])}function Ia(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 sa=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"]]),Zl=/^[\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 za(i){return Zl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function be(){}var Ne=null;function qe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ze=null,It=null;function di(i){var r=aa(i);if(r&&(i=r.stateNode)){var l=i[gn]||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="'+Rn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var m=u[gn]||null;if(!m)throw Error(a(90));Xl(u,m.value,m.defaultValue,m.defaultValue,m.checked,m.defaultChecked,m.type,m.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===i.form&&Wl(u)}break e;case"textarea":Lc(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&un(i,!!l.multiple,r,!1)}}}var Jl=!1;function zc(i,r,l){if(Jl)return i(r,l);Jl=!0;try{var u=i(r);return u}finally{if(Jl=!1,(Ze!==null||It!==null)&&(Su(),Ze&&(r=Ze,i=It,It=Ze=null,di(r),i)))for(r=0;r<i.length;r++)di(i[r])}}function eo(i,r){var l=i.stateNode;if(l===null)return null;var u=l[gn]||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 la=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),lf=!1;if(la)try{var to={};Object.defineProperty(to,"passive",{get:function(){lf=!0}}),window.addEventListener("test",to,to),window.removeEventListener("test",to,to)}catch{lf=!1}var Ba=null,of=null,Bc=null;function Pg(){if(Bc)return Bc;var i,r=of,l=r.length,u,m="value"in Ba?Ba.value:Ba.textContent,y=m.length;for(i=0;i<l&&r[i]===m[i];i++);var k=l-i;for(u=1;u<=k&&r[l-u]===m[y-u];u++);return Bc=m.slice(i,1<u?1-u:void 0)}function Uc(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 Pc(){return!0}function Fg(){return!1}function Ln(i){function r(l,u,m,y,k){this._reactName=l,this._targetInst=m,this.type=u,this.nativeEvent=y,this.target=k,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)?Pc:Fg,this.isPropagationStopped=Fg,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=Pc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Pc)},persist:function(){},isPersistent:Pc}),r}var Rr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fc=Ln(Rr),no=g({},Rr,{view:0,detail:0}),V1=Ln(no),cf,uf,io,qc=g({},no,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:ff,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!==io&&(io&&i.type==="mousemove"?(cf=i.screenX-io.screenX,uf=i.screenY-io.screenY):uf=cf=0,io=i),cf)},movementY:function(i){return"movementY"in i?i.movementY:uf}}),qg=Ln(qc),W1=g({},qc,{dataTransfer:0}),X1=Ln(W1),Z1=g({},no,{relatedTarget:0}),df=Ln(Z1),J1=g({},Rr,{animationName:0,elapsedTime:0,pseudoElement:0}),eS=Ln(J1),tS=g({},Rr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),nS=Ln(tS),iS=g({},Rr,{data:0}),$g=Ln(iS),aS={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rS={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"},sS={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function lS(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=sS[i])?!!r[i]:!1}function ff(){return lS}var oS=g({},no,{key:function(i){if(i.key){var r=aS[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Uc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?rS[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:ff,charCode:function(i){return i.type==="keypress"?Uc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Uc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),cS=Ln(oS),uS=g({},qc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=Ln(uS),dS=g({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ff}),fS=Ln(dS),hS=g({},Rr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pS=Ln(hS),mS=g({},qc,{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}),gS=Ln(mS),bS=g({},Rr,{newState:0,oldState:0}),yS=Ln(bS),xS=[9,13,27,32],hf=la&&"CompositionEvent"in window,ao=null;la&&"documentMode"in document&&(ao=document.documentMode);var vS=la&&"TextEvent"in window&&!ao,Kg=la&&(!hf||ao&&8<ao&&11>=ao),Gg=" ",Qg=!1;function Yg(i,r){switch(i){case"keyup":return xS.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Vg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ts=!1;function wS(i,r){switch(i){case"compositionend":return Vg(r);case"keypress":return r.which!==32?null:(Qg=!0,Gg);case"textInput":return i=r.data,i===Gg&&Qg?null:i;default:return null}}function kS(i,r){if(Ts)return i==="compositionend"||!hf&&Yg(i,r)?(i=Pg(),Bc=of=Ba=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 Kg&&r.locale!=="ko"?null:r.data;default:return null}}var ES={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 Wg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!ES[i.type]:r==="textarea"}function Xg(i,r,l,u){Ze?It?It.push(u):It=[u]:Ze=u,r=Ou(r,"onChange"),0<r.length&&(l=new Fc("onChange","change",null,l,u),i.push({event:l,listeners:r}))}var ro=null,so=null;function SS(i){Mx(i,0)}function $c(i){var r=Ra(i);if(Wl(r))return i}function Zg(i,r){if(i==="change")return r}var Jg=!1;if(la){var pf;if(la){var mf="oninput"in document;if(!mf){var eb=document.createElement("div");eb.setAttribute("oninput","return;"),mf=typeof eb.oninput=="function"}pf=mf}else pf=!1;Jg=pf&&(!document.documentMode||9<document.documentMode)}function tb(){ro&&(ro.detachEvent("onpropertychange",nb),so=ro=null)}function nb(i){if(i.propertyName==="value"&&$c(so)){var r=[];Xg(r,so,i,qe(i)),zc(SS,r)}}function _S(i,r,l){i==="focusin"?(tb(),ro=r,so=l,ro.attachEvent("onpropertychange",nb)):i==="focusout"&&tb()}function NS(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return $c(so)}function CS(i,r){if(i==="click")return $c(r)}function TS(i,r){if(i==="input"||i==="change")return $c(r)}function AS(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Xn=typeof Object.is=="function"?Object.is:AS;function lo(i,r){if(Xn(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 m=l[u];if(!Fi.call(r,m)||!Xn(i[m],r[m]))return!1}return!0}function ib(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ab(i,r){var l=ib(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=ib(l)}}function rb(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?rb(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function sb(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 gf(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 jS=la&&"documentMode"in document&&11>=document.documentMode,As=null,bf=null,oo=null,yf=!1;function lb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;yf||As==null||As!==_s(u)||(u=As,"selectionStart"in u&&gf(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}),oo&&lo(oo,u)||(oo=u,u=Ou(bf,"onSelect"),0<u.length&&(r=new Fc("onSelect","select",null,r,l),i.push({event:r,listeners:u}),r.target=As)))}function Lr(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var js={animationend:Lr("Animation","AnimationEnd"),animationiteration:Lr("Animation","AnimationIteration"),animationstart:Lr("Animation","AnimationStart"),transitionrun:Lr("Transition","TransitionRun"),transitionstart:Lr("Transition","TransitionStart"),transitioncancel:Lr("Transition","TransitionCancel"),transitionend:Lr("Transition","TransitionEnd")},xf={},ob={};la&&(ob=document.createElement("div").style,"AnimationEvent"in window||(delete js.animationend.animation,delete js.animationiteration.animation,delete js.animationstart.animation),"TransitionEvent"in window||delete js.transitionend.transition);function Ir(i){if(xf[i])return xf[i];if(!js[i])return i;var r=js[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in ob)return xf[i]=r[l];return i}var cb=Ir("animationend"),ub=Ir("animationiteration"),db=Ir("animationstart"),OS=Ir("transitionrun"),DS=Ir("transitionstart"),MS=Ir("transitioncancel"),fb=Ir("transitionend"),hb=new Map,vf="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(" ");vf.push("scrollEnd");function ji(i,r){hb.set(i,r),ra(r,[i])}var Hc=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)},fi=[],Os=0,wf=0;function Kc(){for(var i=Os,r=wf=Os=0;r<i;){var l=fi[r];fi[r++]=null;var u=fi[r];fi[r++]=null;var m=fi[r];fi[r++]=null;var y=fi[r];if(fi[r++]=null,u!==null&&m!==null){var k=u.pending;k===null?m.next=m:(m.next=k.next,k.next=m),u.pending=m}y!==0&&pb(l,m,y)}}function Gc(i,r,l,u){fi[Os++]=i,fi[Os++]=r,fi[Os++]=l,fi[Os++]=u,wf|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function kf(i,r,l,u){return Gc(i,r,l,u),Qc(i)}function zr(i,r){return Gc(i,null,null,r),Qc(i)}function pb(i,r,l){i.lanes|=l;var u=i.alternate;u!==null&&(u.lanes|=l);for(var m=!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||(m=!0)),i=y,y=y.return;return i.tag===3?(y=i.stateNode,m&&r!==null&&(m=31-dt(l),i=y.hiddenUpdates,u=i[m],u===null?i[m]=[r]:u.push(r),r.lane=l|536870912),y):null}function Qc(i){if(50<Oo)throw Oo=0,Oh=null,Error(a(185));for(var r=i.return;r!==null;)i=r,r=i.return;return i.tag===3?i.stateNode:null}var Ds={};function RS(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 Zn(i,r,l,u){return new RS(i,r,l,u)}function Ef(i){return i=i.prototype,!(!i||!i.isReactComponent)}function oa(i,r){var l=i.alternate;return l===null?(l=Zn(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 mb(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 Yc(i,r,l,u,m,y){var k=0;if(u=i,typeof i=="function")Ef(i)&&(k=1);else if(typeof i=="string")k=U_(i,l,ge.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case ee:return i=Zn(31,l,r,m),i.elementType=ee,i.lanes=y,i;case w:return Br(l.children,m,y,r);case S:k=8,m|=24;break;case _:return i=Zn(12,l,r,m|2),i.elementType=_,i.lanes=y,i;case B:return i=Zn(13,l,r,m),i.elementType=B,i.lanes=y,i;case M:return i=Zn(19,l,r,m),i.elementType=M,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:k=10;break e;case C:k=9;break e;case D:k=11;break e;case q:k=14;break e;case F:k=16,u=null;break e}k=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Zn(k,l,r,m),r.elementType=i,r.type=u,r.lanes=y,r}function Br(i,r,l,u){return i=Zn(7,i,u,r),i.lanes=l,i}function Sf(i,r,l){return i=Zn(6,i,null,r),i.lanes=l,i}function gb(i){var r=Zn(18,null,null,0);return r.stateNode=i,r}function _f(i,r,l){return r=Zn(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var bb=new WeakMap;function hi(i,r){if(typeof i=="object"&&i!==null){var l=bb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:ui(r)},bb.set(i,r),r)}return{value:i,source:r,stack:ui(r)}}var Ms=[],Rs=0,Vc=null,co=0,pi=[],mi=0,Ua=null,Hi=1,Ki="";function ca(i,r){Ms[Rs++]=co,Ms[Rs++]=Vc,Vc=i,co=r}function yb(i,r,l){pi[mi++]=Hi,pi[mi++]=Ki,pi[mi++]=Ua,Ua=i;var u=Hi;i=Ki;var m=32-dt(u)-1;u&=~(1<<m),l+=1;var y=32-dt(r)+m;if(30<y){var k=m-m%5;y=(u&(1<<k)-1).toString(32),u>>=k,m-=k,Hi=1<<32-dt(r)+m|l<<m|u,Ki=y+i}else Hi=1<<y|l<<m|u,Ki=i}function Nf(i){i.return!==null&&(ca(i,1),yb(i,1,0))}function Cf(i){for(;i===Vc;)Vc=Ms[--Rs],Ms[Rs]=null,co=Ms[--Rs],Ms[Rs]=null;for(;i===Ua;)Ua=pi[--mi],pi[mi]=null,Ki=pi[--mi],pi[mi]=null,Hi=pi[--mi],pi[mi]=null}function xb(i,r){pi[mi++]=Hi,pi[mi++]=Ki,pi[mi++]=Ua,Hi=r.id,Ki=r.overflow,Ua=i}var dn=null,Tt=null,nt=!1,Pa=null,gi=!1,Tf=Error(a(519));function Fa(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw uo(hi(r,i)),Tf}function vb(i){var r=i.stateNode,l=i.type,u=i.memoizedProps;switch(r[Gt]=i,r[gn]=u,l){case"dialog":We("cancel",r),We("close",r);break;case"iframe":case"object":case"embed":We("load",r);break;case"video":case"audio":for(l=0;l<Mo.length;l++)We(Mo[l],r);break;case"source":We("error",r);break;case"img":case"image":case"link":We("error",r),We("load",r);break;case"details":We("toggle",r);break;case"input":We("invalid",r),Mr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":We("invalid",r);break;case"textarea":We("invalid",r),Cs(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||zx(r.textContent,l)?(u.popover!=null&&(We("beforetoggle",r),We("toggle",r)),u.onScroll!=null&&We("scroll",r),u.onScrollEnd!=null&&We("scrollend",r),u.onClick!=null&&(r.onclick=be),r=!0):r=!1,r||Fa(i,!0)}function wb(i){for(dn=i.return;dn;)switch(dn.tag){case 5:case 31:case 13:gi=!1;return;case 27:case 3:gi=!0;return;default:dn=dn.return}}function Ls(i){if(i!==dn)return!1;if(!nt)return wb(i),nt=!0,!1;var r=i.tag,l;if((l=r!==3&&r!==27)&&((l=r===5)&&(l=i.type,l=!(l!=="form"&&l!=="button")||Gh(i.type,i.memoizedProps)),l=!l),l&&Tt&&Fa(i),wb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Tt=Gx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Tt=Gx(i)}else r===27?(r=Tt,tr(i.type)?(i=Xh,Xh=null,Tt=i):Tt=r):Tt=dn?yi(i.stateNode.nextSibling):null;return!0}function Ur(){Tt=dn=null,nt=!1}function Af(){var i=Pa;return i!==null&&(Un===null?Un=i:Un.push.apply(Un,i),Pa=null),i}function uo(i){Pa===null?Pa=[i]:Pa.push(i)}var jf=R(null),Pr=null,ua=null;function qa(i,r,l){j(jf,r._currentValue),r._currentValue=l}function da(i){i._currentValue=jf.current,Q(jf)}function Of(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 Df(i,r,l,u){var m=i.child;for(m!==null&&(m.return=i);m!==null;){var y=m.dependencies;if(y!==null){var k=m.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=m;for(var L=0;L<r.length;L++)if(N.context===r[L]){y.lanes|=l,N=y.alternate,N!==null&&(N.lanes|=l),Of(y.return,l,i),u||(k=null);break e}y=N.next}}else if(m.tag===18){if(k=m.return,k===null)throw Error(a(341));k.lanes|=l,y=k.alternate,y!==null&&(y.lanes|=l),Of(k,l,i),k=null}else k=m.child;if(k!==null)k.return=m;else for(k=m;k!==null;){if(k===i){k=null;break}if(m=k.sibling,m!==null){m.return=k.return,k=m;break}k=k.return}m=k}}function Is(i,r,l,u){i=null;for(var m=r,y=!1;m!==null;){if(!y){if((m.flags&524288)!==0)y=!0;else if((m.flags&262144)!==0)break}if(m.tag===10){var k=m.alternate;if(k===null)throw Error(a(387));if(k=k.memoizedProps,k!==null){var N=m.type;Xn(m.pendingProps.value,k.value)||(i!==null?i.push(N):i=[N])}}else if(m===xe.current){if(k=m.alternate,k===null)throw Error(a(387));k.memoizedState.memoizedState!==m.memoizedState.memoizedState&&(i!==null?i.push(Bo):i=[Bo])}m=m.return}i!==null&&Df(r,i,l,u),r.flags|=262144}function Wc(i){for(i=i.firstContext;i!==null;){if(!Xn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function Fr(i){Pr=i,ua=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function fn(i){return kb(Pr,i)}function Xc(i,r){return Pr===null&&Fr(i),kb(i,r)}function kb(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},ua===null){if(i===null)throw Error(a(308));ua=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else ua=ua.next=r;return l}var LS=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()})}},IS=e.unstable_scheduleCallback,zS=e.unstable_NormalPriority,Zt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Mf(){return{controller:new LS,data:new Map,refCount:0}}function fo(i){i.refCount--,i.refCount===0&&IS(zS,function(){i.controller.abort()})}var ho=null,Rf=0,zs=0,Bs=null;function BS(i,r){if(ho===null){var l=ho=[];Rf=0,zs=zh(),Bs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Rf++,r.then(Eb,Eb),r}function Eb(){if(--Rf===0&&ho!==null){Bs!==null&&(Bs.status="fulfilled");var i=ho;ho=null,zs=0,Bs=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function US(i,r){var l=[],u={status:"pending",value:null,reason:null,then:function(m){l.push(m)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var m=0;m<l.length;m++)(0,l[m])(r)},function(m){for(u.status="rejected",u.reason=m,m=0;m<l.length;m++)(0,l[m])(void 0)}),u}var Sb=$.S;$.S=function(i,r){lx=Lt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&BS(i,r),Sb!==null&&Sb(i,r)};var qr=R(null);function Lf(){var i=qr.current;return i!==null?i:wt.pooledCache}function Zc(i,r){r===null?j(qr,qr.current):j(qr,r.pool)}function _b(){var i=Lf();return i===null?null:{parent:Zt._currentValue,pool:i}}var Us=Error(a(460)),If=Error(a(474)),Jc=Error(a(542)),eu={then:function(){}};function Nb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Cb(i,r,l){switch(l=i[l],l===void 0?i.push(r):l!==r&&(r.then(be,be),r=l),r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Ab(i),i;default:if(typeof r.status=="string")r.then(be,be);else{if(i=wt,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var m=r;m.status="fulfilled",m.value=u}},function(u){if(r.status==="pending"){var m=r;m.status="rejected",m.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Ab(i),i}throw Hr=r,Us}}function $r(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Hr=l,Us):l}}var Hr=null;function Tb(){if(Hr===null)throw Error(a(459));var i=Hr;return Hr=null,i}function Ab(i){if(i===Us||i===Jc)throw Error(a(483))}var Ps=null,po=0;function tu(i){var r=po;return po+=1,Ps===null&&(Ps=[]),Cb(Ps,i,r)}function mo(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function nu(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 jb(i){function r(H,P){if(i){var K=H.deletions;K===null?(H.deletions=[P],H.flags|=16):K.push(P)}}function l(H,P){if(!i)return null;for(;P!==null;)r(H,P),P=P.sibling;return null}function u(H){for(var P=new Map;H!==null;)H.key!==null?P.set(H.key,H):P.set(H.index,H),H=H.sibling;return P}function m(H,P){return H=oa(H,P),H.index=0,H.sibling=null,H}function y(H,P,K){return H.index=K,i?(K=H.alternate,K!==null?(K=K.index,K<P?(H.flags|=67108866,P):K):(H.flags|=67108866,P)):(H.flags|=1048576,P)}function k(H){return i&&H.alternate===null&&(H.flags|=67108866),H}function N(H,P,K,le){return P===null||P.tag!==6?(P=Sf(K,H.mode,le),P.return=H,P):(P=m(P,K),P.return=H,P)}function L(H,P,K,le){var Oe=K.type;return Oe===w?ie(H,P,K.props.children,le,K.key):P!==null&&(P.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===F&&$r(Oe)===P.type)?(P=m(P,K.props),mo(P,K),P.return=H,P):(P=Yc(K.type,K.key,K.props,null,H.mode,le),mo(P,K),P.return=H,P)}function G(H,P,K,le){return P===null||P.tag!==4||P.stateNode.containerInfo!==K.containerInfo||P.stateNode.implementation!==K.implementation?(P=_f(K,H.mode,le),P.return=H,P):(P=m(P,K.children||[]),P.return=H,P)}function ie(H,P,K,le,Oe){return P===null||P.tag!==7?(P=Br(K,H.mode,le,Oe),P.return=H,P):(P=m(P,K),P.return=H,P)}function oe(H,P,K){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Sf(""+P,H.mode,K),P.return=H,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case x:return K=Yc(P.type,P.key,P.props,null,H.mode,K),mo(K,P),K.return=H,K;case E:return P=_f(P,H.mode,K),P.return=H,P;case F:return P=$r(P),oe(H,P,K)}if(te(P)||J(P))return P=Br(P,H.mode,K,null),P.return=H,P;if(typeof P.then=="function")return oe(H,tu(P),K);if(P.$$typeof===T)return oe(H,Xc(H,P),K);nu(H,P)}return null}function W(H,P,K,le){var Oe=P!==null?P.key:null;if(typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint")return Oe!==null?null:N(H,P,""+K,le);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case x:return K.key===Oe?L(H,P,K,le):null;case E:return K.key===Oe?G(H,P,K,le):null;case F:return K=$r(K),W(H,P,K,le)}if(te(K)||J(K))return Oe!==null?null:ie(H,P,K,le,null);if(typeof K.then=="function")return W(H,P,tu(K),le);if(K.$$typeof===T)return W(H,P,Xc(H,K),le);nu(H,K)}return null}function Z(H,P,K,le,Oe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return H=H.get(K)||null,N(P,H,""+le,Oe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return H=H.get(le.key===null?K:le.key)||null,L(P,H,le,Oe);case E:return H=H.get(le.key===null?K:le.key)||null,G(P,H,le,Oe);case F:return le=$r(le),Z(H,P,K,le,Oe)}if(te(le)||J(le))return H=H.get(K)||null,ie(P,H,le,Oe,null);if(typeof le.then=="function")return Z(H,P,K,tu(le),Oe);if(le.$$typeof===T)return Z(H,P,K,Xc(P,le),Oe);nu(P,le)}return null}function Ee(H,P,K,le){for(var Oe=null,st=null,Ce=P,He=P=0,et=null;Ce!==null&&He<K.length;He++){Ce.index>He?(et=Ce,Ce=null):et=Ce.sibling;var lt=W(H,Ce,K[He],le);if(lt===null){Ce===null&&(Ce=et);break}i&&Ce&&lt.alternate===null&&r(H,Ce),P=y(lt,P,He),st===null?Oe=lt:st.sibling=lt,st=lt,Ce=et}if(He===K.length)return l(H,Ce),nt&&ca(H,He),Oe;if(Ce===null){for(;He<K.length;He++)Ce=oe(H,K[He],le),Ce!==null&&(P=y(Ce,P,He),st===null?Oe=Ce:st.sibling=Ce,st=Ce);return nt&&ca(H,He),Oe}for(Ce=u(Ce);He<K.length;He++)et=Z(Ce,H,He,K[He],le),et!==null&&(i&&et.alternate!==null&&Ce.delete(et.key===null?He:et.key),P=y(et,P,He),st===null?Oe=et:st.sibling=et,st=et);return i&&Ce.forEach(function(sr){return r(H,sr)}),nt&&ca(H,He),Oe}function Re(H,P,K,le){if(K==null)throw Error(a(151));for(var Oe=null,st=null,Ce=P,He=P=0,et=null,lt=K.next();Ce!==null&&!lt.done;He++,lt=K.next()){Ce.index>He?(et=Ce,Ce=null):et=Ce.sibling;var sr=W(H,Ce,lt.value,le);if(sr===null){Ce===null&&(Ce=et);break}i&&Ce&&sr.alternate===null&&r(H,Ce),P=y(sr,P,He),st===null?Oe=sr:st.sibling=sr,st=sr,Ce=et}if(lt.done)return l(H,Ce),nt&&ca(H,He),Oe;if(Ce===null){for(;!lt.done;He++,lt=K.next())lt=oe(H,lt.value,le),lt!==null&&(P=y(lt,P,He),st===null?Oe=lt:st.sibling=lt,st=lt);return nt&&ca(H,He),Oe}for(Ce=u(Ce);!lt.done;He++,lt=K.next())lt=Z(Ce,H,He,lt.value,le),lt!==null&&(i&&lt.alternate!==null&&Ce.delete(lt.key===null?He:lt.key),P=y(lt,P,He),st===null?Oe=lt:st.sibling=lt,st=lt);return i&&Ce.forEach(function(W_){return r(H,W_)}),nt&&ca(H,He),Oe}function yt(H,P,K,le){if(typeof K=="object"&&K!==null&&K.type===w&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case x:e:{for(var Oe=K.key;P!==null;){if(P.key===Oe){if(Oe=K.type,Oe===w){if(P.tag===7){l(H,P.sibling),le=m(P,K.props.children),le.return=H,H=le;break e}}else if(P.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===F&&$r(Oe)===P.type){l(H,P.sibling),le=m(P,K.props),mo(le,K),le.return=H,H=le;break e}l(H,P);break}else r(H,P);P=P.sibling}K.type===w?(le=Br(K.props.children,H.mode,le,K.key),le.return=H,H=le):(le=Yc(K.type,K.key,K.props,null,H.mode,le),mo(le,K),le.return=H,H=le)}return k(H);case E:e:{for(Oe=K.key;P!==null;){if(P.key===Oe)if(P.tag===4&&P.stateNode.containerInfo===K.containerInfo&&P.stateNode.implementation===K.implementation){l(H,P.sibling),le=m(P,K.children||[]),le.return=H,H=le;break e}else{l(H,P);break}else r(H,P);P=P.sibling}le=_f(K,H.mode,le),le.return=H,H=le}return k(H);case F:return K=$r(K),yt(H,P,K,le)}if(te(K))return Ee(H,P,K,le);if(J(K)){if(Oe=J(K),typeof Oe!="function")throw Error(a(150));return K=Oe.call(K),Re(H,P,K,le)}if(typeof K.then=="function")return yt(H,P,tu(K),le);if(K.$$typeof===T)return yt(H,P,Xc(H,K),le);nu(H,K)}return typeof K=="string"&&K!==""||typeof K=="number"||typeof K=="bigint"?(K=""+K,P!==null&&P.tag===6?(l(H,P.sibling),le=m(P,K),le.return=H,H=le):(l(H,P),le=Sf(K,H.mode,le),le.return=H,H=le),k(H)):l(H,P)}return function(H,P,K,le){try{po=0;var Oe=yt(H,P,K,le);return Ps=null,Oe}catch(Ce){if(Ce===Us||Ce===Jc)throw Ce;var st=Zn(29,Ce,null,H.mode);return st.lanes=le,st.return=H,st}finally{}}}var Kr=jb(!0),Ob=jb(!1),$a=!1;function zf(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Bf(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 Ha(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ka(i,r,l){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(ot&2)!==0){var m=u.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),u.pending=r,r=Qc(i),pb(i,null,l),r}return Gc(i,u,r,l),Qc(i)}function go(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,Ie(i,l)}}function Uf(i,r){var l=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var m=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var k={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};y===null?m=y=k:y=y.next=k,l=l.next}while(l!==null);y===null?m=y=r:y=y.next=r}else m=y=r;l={baseState:u.baseState,firstBaseUpdate:m,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 Pf=!1;function bo(){if(Pf){var i=Bs;if(i!==null)throw i}}function yo(i,r,l,u){Pf=!1;var m=i.updateQueue;$a=!1;var y=m.firstBaseUpdate,k=m.lastBaseUpdate,N=m.shared.pending;if(N!==null){m.shared.pending=null;var L=N,G=L.next;L.next=null,k===null?y=G:k.next=G,k=L;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==k&&(N===null?ie.firstBaseUpdate=G:N.next=G,ie.lastBaseUpdate=L))}if(y!==null){var oe=m.baseState;k=0,ie=G=L=null,N=y;do{var W=N.lane&-536870913,Z=W!==N.lane;if(Z?(Je&W)===W:(u&W)===W){W!==0&&W===zs&&(Pf=!0),ie!==null&&(ie=ie.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var Ee=i,Re=N;W=r;var yt=l;switch(Re.tag){case 1:if(Ee=Re.payload,typeof Ee=="function"){oe=Ee.call(yt,oe,W);break e}oe=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Re.payload,W=typeof Ee=="function"?Ee.call(yt,oe,W):Ee,W==null)break e;oe=g({},oe,W);break e;case 2:$a=!0}}W=N.callback,W!==null&&(i.flags|=64,Z&&(i.flags|=8192),Z=m.callbacks,Z===null?m.callbacks=[W]:Z.push(W))}else Z={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?(G=ie=Z,L=oe):ie=ie.next=Z,k|=W;if(N=N.next,N===null){if(N=m.shared.pending,N===null)break;Z=N,N=Z.next,Z.next=null,m.lastBaseUpdate=Z,m.shared.pending=null}}while(!0);ie===null&&(L=oe),m.baseState=L,m.firstBaseUpdate=G,m.lastBaseUpdate=ie,y===null&&(m.shared.lanes=0),Wa|=k,i.lanes=k,i.memoizedState=oe}}function Db(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Mb(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Db(l[i],r)}var Fs=R(null),iu=R(0);function Rb(i,r){i=va,j(iu,i),j(Fs,r),va=i|r.baseLanes}function Ff(){j(iu,va),j(Fs,Fs.current)}function qf(){va=iu.current,Q(Fs),Q(iu)}var Jn=R(null),bi=null;function Ga(i){var r=i.alternate;j(Yt,Yt.current&1),j(Jn,i),bi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(bi=i)}function $f(i){j(Yt,Yt.current),j(Jn,i),bi===null&&(bi=i)}function Lb(i){i.tag===22?(j(Yt,Yt.current),j(Jn,i),bi===null&&(bi=i)):Qa()}function Qa(){j(Yt,Yt.current),j(Jn,Jn.current)}function ei(i){Q(Jn),bi===i&&(bi=null),Q(Yt)}var Yt=R(0);function au(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Vh(l)||Wh(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 fa=0,$e=null,gt=null,Jt=null,ru=!1,qs=!1,Gr=!1,su=0,xo=0,$s=null,PS=0;function Ft(){throw Error(a(321))}function Hf(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Xn(i[l],r[l]))return!1;return!0}function Kf(i,r,l,u,m,y){return fa=y,$e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,$.H=i===null||i.memoizedState===null?yy:sh,Gr=!1,y=l(u,m),Gr=!1,qs&&(y=zb(r,l,u,m)),Ib(i),y}function Ib(i){$.H=ko;var r=gt!==null&&gt.next!==null;if(fa=0,Jt=gt=$e=null,ru=!1,xo=0,$s=null,r)throw Error(a(300));i===null||en||(i=i.dependencies,i!==null&&Wc(i)&&(en=!0))}function zb(i,r,l,u){$e=i;var m=0;do{if(qs&&($s=null),xo=0,qs=!1,25<=m)throw Error(a(301));if(m+=1,Jt=gt=null,i.updateQueue!=null){var y=i.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}$.H=xy,y=r(l,u)}while(qs);return y}function FS(){var i=$.H,r=i.useState()[0];return r=typeof r.then=="function"?vo(r):r,i=i.useState()[0],(gt!==null?gt.memoizedState:null)!==i&&($e.flags|=1024),r}function Gf(){var i=su!==0;return su=0,i}function Qf(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Yf(i){if(ru){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}ru=!1}fa=0,Jt=gt=$e=null,qs=!1,xo=su=0,$s=null}function Nn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?$e.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function Vt(){if(gt===null){var i=$e.alternate;i=i!==null?i.memoizedState:null}else i=gt.next;var r=Jt===null?$e.memoizedState:Jt.next;if(r!==null)Jt=r,gt=i;else{if(i===null)throw $e.alternate===null?Error(a(467)):Error(a(310));gt=i,i={memoizedState:gt.memoizedState,baseState:gt.baseState,baseQueue:gt.baseQueue,queue:gt.queue,next:null},Jt===null?$e.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vo(i){var r=xo;return xo+=1,$s===null&&($s=[]),i=Cb($s,i,r),r=$e,(Jt===null?r.memoizedState:Jt.next)===null&&(r=r.alternate,$.H=r===null||r.memoizedState===null?yy:sh),i}function ou(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return vo(i);if(i.$$typeof===T)return fn(i)}throw Error(a(438,String(i)))}function Vf(i){var r=null,l=$e.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=$e.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(m){return m.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=lu(),$e.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]=U;return r.index++,l}function ha(i,r){return typeof r=="function"?r(i):r}function cu(i){var r=Vt();return Wf(r,gt,i)}function Wf(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var m=i.baseQueue,y=u.pending;if(y!==null){if(m!==null){var k=m.next;m.next=y.next,y.next=k}r.baseQueue=m=y,u.pending=null}if(y=i.baseState,m===null)i.memoizedState=y;else{r=m.next;var N=k=null,L=null,G=r,ie=!1;do{var oe=G.lane&-536870913;if(oe!==G.lane?(Je&oe)===oe:(fa&oe)===oe){var W=G.revertLane;if(W===0)L!==null&&(L=L.next={lane:0,revertLane:0,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),oe===zs&&(ie=!0);else if((fa&W)===W){G=G.next,W===zs&&(ie=!0);continue}else oe={lane:0,revertLane:G.revertLane,gesture:null,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},L===null?(N=L=oe,k=y):L=L.next=oe,$e.lanes|=W,Wa|=W;oe=G.action,Gr&&l(y,oe),y=G.hasEagerState?G.eagerState:l(y,oe)}else W={lane:oe,revertLane:G.revertLane,gesture:G.gesture,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null},L===null?(N=L=W,k=y):L=L.next=W,$e.lanes|=oe,Wa|=oe;G=G.next}while(G!==null&&G!==r);if(L===null?k=y:L.next=N,!Xn(y,i.memoizedState)&&(en=!0,ie&&(l=Bs,l!==null)))throw l;i.memoizedState=y,i.baseState=k,i.baseQueue=L,u.lastRenderedState=y}return m===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Xf(i){var r=Vt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var u=l.dispatch,m=l.pending,y=r.memoizedState;if(m!==null){l.pending=null;var k=m=m.next;do y=i(y,k.action),k=k.next;while(k!==m);Xn(y,r.memoizedState)||(en=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),l.lastRenderedState=y}return[y,u]}function Bb(i,r,l){var u=$e,m=Vt(),y=nt;if(y){if(l===void 0)throw Error(a(407));l=l()}else l=r();var k=!Xn((gt||m).memoizedState,l);if(k&&(m.memoizedState=l,en=!0),m=m.queue,eh(Fb.bind(null,u,m,i),[i]),m.getSnapshot!==r||k||Jt!==null&&Jt.memoizedState.tag&1){if(u.flags|=2048,Hs(9,{destroy:void 0},Pb.bind(null,u,m,l,r),null),wt===null)throw Error(a(349));y||(fa&127)!==0||Ub(u,r,l)}return l}function Ub(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=$e.updateQueue,r===null?(r=lu(),$e.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function Pb(i,r,l,u){r.value=l,r.getSnapshot=u,qb(r)&&$b(i)}function Fb(i,r,l){return l(function(){qb(r)&&$b(i)})}function qb(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Xn(i,l)}catch{return!0}}function $b(i){var r=zr(i,2);r!==null&&Pn(r,i,2)}function Zf(i){var r=Nn();if(typeof i=="function"){var l=i;if(i=l(),Gr){mn(!0);try{l()}finally{mn(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:i},r}function Hb(i,r,l,u){return i.baseState=l,Wf(i,gt,typeof u=="function"?u:ha)}function qS(i,r,l,u,m){if(fu(i))throw Error(a(485));if(i=r.action,i!==null){var y={payload:m,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(k){y.listeners.push(k)}};$.T!==null?l(!0):y.isTransition=!1,u(y),l=r.pending,l===null?(y.next=r.pending=y,Kb(r,y)):(y.next=l.next,r.pending=l.next=y)}}function Kb(i,r){var l=r.action,u=r.payload,m=i.state;if(r.isTransition){var y=$.T,k={};$.T=k;try{var N=l(m,u),L=$.S;L!==null&&L(k,N),Gb(i,r,N)}catch(G){Jf(i,r,G)}finally{y!==null&&k.types!==null&&(y.types=k.types),$.T=y}}else try{y=l(m,u),Gb(i,r,y)}catch(G){Jf(i,r,G)}}function Gb(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Qb(i,r,u)},function(u){return Jf(i,r,u)}):Qb(i,r,l)}function Qb(i,r,l){r.status="fulfilled",r.value=l,Yb(r),i.state=l,r=i.pending,r!==null&&(l=r.next,l===r?i.pending=null:(l=l.next,r.next=l,Kb(i,l)))}function Jf(i,r,l){var u=i.pending;if(i.pending=null,u!==null){u=u.next;do r.status="rejected",r.reason=l,Yb(r),r=r.next;while(r!==u)}i.action=null}function Yb(i){i=i.listeners;for(var r=0;r<i.length;r++)(0,i[r])()}function Vb(i,r){return r}function Wb(i,r){if(nt){var l=wt.formState;if(l!==null){e:{var u=$e;if(nt){if(Tt){t:{for(var m=Tt,y=gi;m.nodeType!==8;){if(!y){m=null;break t}if(m=yi(m.nextSibling),m===null){m=null;break t}}y=m.data,m=y==="F!"||y==="F"?m:null}if(m){Tt=yi(m.nextSibling),u=m.data==="F!";break e}}Fa(u)}u=!1}u&&(r=l[0])}}return l=Nn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vb,lastRenderedState:r},l.queue=u,l=my.bind(null,$e,u),u.dispatch=l,u=Zf(!1),y=rh.bind(null,$e,!1,u.queue),u=Nn(),m={state:r,dispatch:null,action:i,pending:null},u.queue=m,l=qS.bind(null,$e,m,y,l),m.dispatch=l,u.memoizedState=i,[r,l,!1]}function Xb(i){var r=Vt();return Zb(r,gt,i)}function Zb(i,r,l){if(r=Wf(i,r,Vb)[0],i=cu(ha)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=vo(r)}catch(k){throw k===Us?Jc:k}else u=r;r=Vt();var m=r.queue,y=m.dispatch;return l!==r.memoizedState&&($e.flags|=2048,Hs(9,{destroy:void 0},$S.bind(null,m,l),null)),[u,y,i]}function $S(i,r){i.action=r}function Jb(i){var r=Vt(),l=gt;if(l!==null)return Zb(r,l,i);Vt(),r=r.memoizedState,l=Vt();var u=l.queue.dispatch;return l.memoizedState=i,[r,u,!1]}function Hs(i,r,l,u){return i={tag:i,create:l,deps:u,inst:r,next:null},r=$e.updateQueue,r===null&&(r=lu(),$e.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 ey(){return Vt().memoizedState}function uu(i,r,l,u){var m=Nn();$e.flags|=i,m.memoizedState=Hs(1|r,{destroy:void 0},l,u===void 0?null:u)}function du(i,r,l,u){var m=Vt();u=u===void 0?null:u;var y=m.memoizedState.inst;gt!==null&&u!==null&&Hf(u,gt.memoizedState.deps)?m.memoizedState=Hs(r,y,l,u):($e.flags|=i,m.memoizedState=Hs(1|r,y,l,u))}function ty(i,r){uu(8390656,8,i,r)}function eh(i,r){du(2048,8,i,r)}function HS(i){$e.flags|=4;var r=$e.updateQueue;if(r===null)r=lu(),$e.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function ny(i){var r=Vt().memoizedState;return HS({ref:r,nextImpl:i}),function(){if((ot&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function iy(i,r){return du(4,2,i,r)}function ay(i,r){return du(4,4,i,r)}function ry(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 sy(i,r,l){l=l!=null?l.concat([i]):null,du(4,4,ry.bind(null,r,i),l)}function th(){}function ly(i,r){var l=Vt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&Hf(r,u[1])?u[0]:(l.memoizedState=[i,r],i)}function oy(i,r){var l=Vt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Hf(r,u[1]))return u[0];if(u=i(),Gr){mn(!0);try{i()}finally{mn(!1)}}return l.memoizedState=[u,r],u}function nh(i,r,l){return l===void 0||(fa&1073741824)!==0&&(Je&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=cx(),$e.lanes|=i,Wa|=i,l)}function cy(i,r,l,u){return Xn(l,r)?l:Fs.current!==null?(i=nh(i,l,u),Xn(i,r)||(en=!0),i):(fa&42)===0||(fa&1073741824)!==0&&(Je&261930)===0?(en=!0,i.memoizedState=l):(i=cx(),$e.lanes|=i,Wa|=i,r)}function uy(i,r,l,u,m){var y=ce.p;ce.p=y!==0&&8>y?y:8;var k=$.T,N={};$.T=N,rh(i,!1,r,l);try{var L=m(),G=$.S;if(G!==null&&G(N,L),L!==null&&typeof L=="object"&&typeof L.then=="function"){var ie=US(L,u);wo(i,r,ie,ii(i))}else wo(i,r,u,ii(i))}catch(oe){wo(i,r,{then:function(){},status:"rejected",reason:oe},ii())}finally{ce.p=y,k!==null&&N.types!==null&&(k.types=N.types),$.T=k}}function KS(){}function ih(i,r,l,u){if(i.tag!==5)throw Error(a(476));var m=dy(i).queue;uy(i,m,r,de,l===null?KS:function(){return fy(i),l(u)})}function dy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:de,baseState:de,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:de},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ha,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function fy(i){var r=dy(i);r.next===null&&(r=i.alternate.memoizedState),wo(i,r.next.queue,{},ii())}function ah(){return fn(Bo)}function hy(){return Vt().memoizedState}function py(){return Vt().memoizedState}function GS(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ii();i=Ha(l);var u=Ka(r,i,l);u!==null&&(Pn(u,r,l),go(u,r,l)),r={cache:Mf()},i.payload=r;return}r=r.return}}function QS(i,r,l){var u=ii();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fu(i)?gy(r,l):(l=kf(i,r,l,u),l!==null&&(Pn(l,i,u),by(l,r,u)))}function my(i,r,l){var u=ii();wo(i,r,l,u)}function wo(i,r,l,u){var m={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fu(i))gy(r,m);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var k=r.lastRenderedState,N=y(k,l);if(m.hasEagerState=!0,m.eagerState=N,Xn(N,k))return Gc(i,r,m,0),wt===null&&Kc(),!1}catch{}finally{}if(l=kf(i,r,m,u),l!==null)return Pn(l,i,u),by(l,r,u),!0}return!1}function rh(i,r,l,u){if(u={lane:2,revertLane:zh(),gesture:null,action:u,hasEagerState:!1,eagerState:null,next:null},fu(i)){if(r)throw Error(a(479))}else r=kf(i,l,u,2),r!==null&&Pn(r,i,2)}function fu(i){var r=i.alternate;return i===$e||r!==null&&r===$e}function gy(i,r){qs=ru=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function by(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Ie(i,l)}}var ko={readContext:fn,use:ou,useCallback:Ft,useContext:Ft,useEffect:Ft,useImperativeHandle:Ft,useLayoutEffect:Ft,useInsertionEffect:Ft,useMemo:Ft,useReducer:Ft,useRef:Ft,useState:Ft,useDebugValue:Ft,useDeferredValue:Ft,useTransition:Ft,useSyncExternalStore:Ft,useId:Ft,useHostTransitionStatus:Ft,useFormState:Ft,useActionState:Ft,useOptimistic:Ft,useMemoCache:Ft,useCacheRefresh:Ft};ko.useEffectEvent=Ft;var yy={readContext:fn,use:ou,useCallback:function(i,r){return Nn().memoizedState=[i,r===void 0?null:r],i},useContext:fn,useEffect:ty,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,uu(4194308,4,ry.bind(null,r,i),l)},useLayoutEffect:function(i,r){return uu(4194308,4,i,r)},useInsertionEffect:function(i,r){uu(4,2,i,r)},useMemo:function(i,r){var l=Nn();r=r===void 0?null:r;var u=i();if(Gr){mn(!0);try{i()}finally{mn(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=Nn();if(l!==void 0){var m=l(r);if(Gr){mn(!0);try{l(r)}finally{mn(!1)}}}else m=r;return u.memoizedState=u.baseState=m,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:m},u.queue=i,i=i.dispatch=QS.bind(null,$e,i),[u.memoizedState,i]},useRef:function(i){var r=Nn();return i={current:i},r.memoizedState=i},useState:function(i){i=Zf(i);var r=i.queue,l=my.bind(null,$e,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:th,useDeferredValue:function(i,r){var l=Nn();return nh(l,i,r)},useTransition:function(){var i=Zf(!1);return i=uy.bind(null,$e,i.queue,!0,!1),Nn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=$e,m=Nn();if(nt){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),wt===null)throw Error(a(349));(Je&127)!==0||Ub(u,r,l)}m.memoizedState=l;var y={value:l,getSnapshot:r};return m.queue=y,ty(Fb.bind(null,u,y,i),[i]),u.flags|=2048,Hs(9,{destroy:void 0},Pb.bind(null,u,y,l,r),null),l},useId:function(){var i=Nn(),r=wt.identifierPrefix;if(nt){var l=Ki,u=Hi;l=(u&~(1<<32-dt(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=su++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=PS++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:ah,useFormState:Wb,useActionState:Wb,useOptimistic:function(i){var r=Nn();r.memoizedState=r.baseState=i;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return r.queue=l,r=rh.bind(null,$e,!0,l),l.dispatch=r,[i,r]},useMemoCache:Vf,useCacheRefresh:function(){return Nn().memoizedState=GS.bind(null,$e)},useEffectEvent:function(i){var r=Nn(),l={impl:i};return r.memoizedState=l,function(){if((ot&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},sh={readContext:fn,use:ou,useCallback:ly,useContext:fn,useEffect:eh,useImperativeHandle:sy,useInsertionEffect:iy,useLayoutEffect:ay,useMemo:oy,useReducer:cu,useRef:ey,useState:function(){return cu(ha)},useDebugValue:th,useDeferredValue:function(i,r){var l=Vt();return cy(l,gt.memoizedState,i,r)},useTransition:function(){var i=cu(ha)[0],r=Vt().memoizedState;return[typeof i=="boolean"?i:vo(i),r]},useSyncExternalStore:Bb,useId:hy,useHostTransitionStatus:ah,useFormState:Xb,useActionState:Xb,useOptimistic:function(i,r){var l=Vt();return Hb(l,gt,i,r)},useMemoCache:Vf,useCacheRefresh:py};sh.useEffectEvent=ny;var xy={readContext:fn,use:ou,useCallback:ly,useContext:fn,useEffect:eh,useImperativeHandle:sy,useInsertionEffect:iy,useLayoutEffect:ay,useMemo:oy,useReducer:Xf,useRef:ey,useState:function(){return Xf(ha)},useDebugValue:th,useDeferredValue:function(i,r){var l=Vt();return gt===null?nh(l,i,r):cy(l,gt.memoizedState,i,r)},useTransition:function(){var i=Xf(ha)[0],r=Vt().memoizedState;return[typeof i=="boolean"?i:vo(i),r]},useSyncExternalStore:Bb,useId:hy,useHostTransitionStatus:ah,useFormState:Jb,useActionState:Jb,useOptimistic:function(i,r){var l=Vt();return gt!==null?Hb(l,gt,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Vf,useCacheRefresh:py};xy.useEffectEvent=ny;function lh(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 oh={enqueueSetState:function(i,r,l){i=i._reactInternals;var u=ii(),m=Ha(u);m.payload=r,l!=null&&(m.callback=l),r=Ka(i,m,u),r!==null&&(Pn(r,i,u),go(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ii(),m=Ha(u);m.tag=1,m.payload=r,l!=null&&(m.callback=l),r=Ka(i,m,u),r!==null&&(Pn(r,i,u),go(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ii(),u=Ha(l);u.tag=2,r!=null&&(u.callback=r),r=Ka(i,u,l),r!==null&&(Pn(r,i,l),go(r,i,l))}};function vy(i,r,l,u,m,y,k){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,k):r.prototype&&r.prototype.isPureReactComponent?!lo(l,u)||!lo(m,y):!0}function wy(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&&oh.enqueueReplaceState(r,r.state,null)}function Qr(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 m in i)l[m]===void 0&&(l[m]=i[m])}return l}function ky(i){Hc(i)}function Ey(i){console.error(i)}function Sy(i){Hc(i)}function hu(i,r){try{var l=i.onUncaughtError;l(r.value,{componentStack:r.stack})}catch(u){setTimeout(function(){throw u})}}function _y(i,r,l){try{var u=i.onCaughtError;u(l.value,{componentStack:l.stack,errorBoundary:r.tag===1?r.stateNode:null})}catch(m){setTimeout(function(){throw m})}}function ch(i,r,l){return l=Ha(l),l.tag=3,l.payload={element:null},l.callback=function(){hu(i,r)},l}function Ny(i){return i=Ha(i),i.tag=3,i}function Cy(i,r,l,u){var m=l.type.getDerivedStateFromError;if(typeof m=="function"){var y=u.value;i.payload=function(){return m(y)},i.callback=function(){_y(r,l,u)}}var k=l.stateNode;k!==null&&typeof k.componentDidCatch=="function"&&(i.callback=function(){_y(r,l,u),typeof m!="function"&&(Xa===null?Xa=new Set([this]):Xa.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function YS(i,r,l,u,m){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Is(r,l,m,!0),l=Jn.current,l!==null){switch(l.tag){case 31:case 13:return bi===null?_u():l.alternate===null&&qt===0&&(qt=3),l.flags&=-257,l.flags|=65536,l.lanes=m,u===eu?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),Rh(i,u,m)),!1;case 22:return l.flags|=65536,u===eu?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,m)),!1}throw Error(a(435,l.tag))}return Rh(i,u,m),_u(),!1}if(nt)return r=Jn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=m,u!==Tf&&(i=Error(a(422),{cause:u}),uo(hi(i,l)))):(u!==Tf&&(r=Error(a(423),{cause:u}),uo(hi(r,l))),i=i.current.alternate,i.flags|=65536,m&=-m,i.lanes|=m,u=hi(u,l),m=ch(i.stateNode,u,m),Uf(i,m),qt!==4&&(qt=2)),!1;var y=Error(a(520),{cause:u});if(y=hi(y,l),jo===null?jo=[y]:jo.push(y),qt!==4&&(qt=2),r===null)return!0;u=hi(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=m&-m,l.lanes|=i,i=ch(l.stateNode,u,i),Uf(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,m&=-m,l.lanes|=m,m=Ny(m),Cy(m,i,l,u),Uf(l,m),!1}l=l.return}while(l!==null);return!1}var uh=Error(a(461)),en=!1;function hn(i,r,l,u){r.child=i===null?Ob(r,null,l,u):Kr(r,i.child,l,u)}function Ty(i,r,l,u,m){l=l.render;var y=r.ref;if("ref"in u){var k={};for(var N in u)N!=="ref"&&(k[N]=u[N])}else k=u;return Fr(r),u=Kf(i,r,l,k,y,m),N=Gf(),i!==null&&!en?(Qf(i,r,m),pa(i,r,m)):(nt&&N&&Nf(r),r.flags|=1,hn(i,r,u,m),r.child)}function Ay(i,r,l,u,m){if(i===null){var y=l.type;return typeof y=="function"&&!Ef(y)&&y.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=y,jy(i,r,y,u,m)):(i=Yc(l.type,null,u,r,r.mode,m),i.ref=r.ref,i.return=r,r.child=i)}if(y=i.child,!yh(i,m)){var k=y.memoizedProps;if(l=l.compare,l=l!==null?l:lo,l(k,u)&&i.ref===r.ref)return pa(i,r,m)}return r.flags|=1,i=oa(y,u),i.ref=r.ref,i.return=r,r.child=i}function jy(i,r,l,u,m){if(i!==null){var y=i.memoizedProps;if(lo(y,u)&&i.ref===r.ref)if(en=!1,r.pendingProps=u=y,yh(i,m))(i.flags&131072)!==0&&(en=!0);else return r.lanes=i.lanes,pa(i,r,m)}return dh(i,r,l,u,m)}function Oy(i,r,l,u){var m=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,m=0;u!==null;)m=m|u.lanes|u.childLanes,u=u.sibling;u=m&~y}else u=0,r.child=null;return Dy(i,r,y,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Zc(r,y!==null?y.cachePool:null),y!==null?Rb(r,y):Ff(),Lb(r);else return u=r.lanes=536870912,Dy(i,r,y!==null?y.baseLanes|l:l,l,u)}else y!==null?(Zc(r,y.cachePool),Rb(r,y),Qa(),r.memoizedState=null):(i!==null&&Zc(r,null),Ff(),Qa());return hn(i,r,m,l),r.child}function Eo(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Dy(i,r,l,u,m){var y=Lf();return y=y===null?null:{parent:Zt._currentValue,pool:y},r.memoizedState={baseLanes:l,cachePool:y},i!==null&&Zc(r,null),Ff(),Lb(r),i!==null&&Is(i,r,u,!0),r.childLanes=m,null}function pu(i,r){return r=gu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function My(i,r,l){return Kr(r,i.child,null,l),i=pu(r,r.pendingProps),i.flags|=2,ei(r),r.memoizedState=null,i}function VS(i,r,l){var u=r.pendingProps,m=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(nt){if(u.mode==="hidden")return i=pu(r,u),r.lanes=536870912,Eo(null,i);if($f(r),(i=Tt)?(i=Kx(i,gi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ua!==null?{id:Hi,overflow:Ki}:null,retryLane:536870912,hydrationErrors:null},l=gb(i),l.return=r,r.child=l,dn=r,Tt=null)):i=null,i===null)throw Fa(r);return r.lanes=536870912,null}return pu(r,u)}var y=i.memoizedState;if(y!==null){var k=y.dehydrated;if($f(r),m)if(r.flags&256)r.flags&=-257,r=My(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(en||Is(i,r,l,!1),m=(l&i.childLanes)!==0,en||m){if(u=wt,u!==null&&(k=Kt(u,l),k!==0&&k!==y.retryLane))throw y.retryLane=k,zr(i,k),Pn(u,i,k),uh;_u(),r=My(i,r,l)}else i=y.treeContext,Tt=yi(k.nextSibling),dn=r,nt=!0,Pa=null,gi=!1,i!==null&&xb(r,i),r=pu(r,u),r.flags|=4096;return r}return i=oa(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function mu(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 dh(i,r,l,u,m){return Fr(r),l=Kf(i,r,l,u,void 0,m),u=Gf(),i!==null&&!en?(Qf(i,r,m),pa(i,r,m)):(nt&&u&&Nf(r),r.flags|=1,hn(i,r,l,m),r.child)}function Ry(i,r,l,u,m,y){return Fr(r),r.updateQueue=null,l=zb(r,u,l,m),Ib(i),u=Gf(),i!==null&&!en?(Qf(i,r,y),pa(i,r,y)):(nt&&u&&Nf(r),r.flags|=1,hn(i,r,l,y),r.child)}function Ly(i,r,l,u,m){if(Fr(r),r.stateNode===null){var y=Ds,k=l.contextType;typeof k=="object"&&k!==null&&(y=fn(k)),y=new l(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=oh,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},zf(r),k=l.contextType,y.context=typeof k=="object"&&k!==null?fn(k):Ds,y.state=r.memoizedState,k=l.getDerivedStateFromProps,typeof k=="function"&&(lh(r,l,k,u),y.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(k=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),k!==y.state&&oh.enqueueReplaceState(y,y.state,null),yo(r,u,y,m),bo(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){y=r.stateNode;var N=r.memoizedProps,L=Qr(l,N);y.props=L;var G=y.context,ie=l.contextType;k=Ds,typeof ie=="object"&&ie!==null&&(k=fn(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||G!==k)&&wy(r,y,u,k),$a=!1;var W=r.memoizedState;y.state=W,yo(r,u,y,m),bo(),G=r.memoizedState,N||W!==G||$a?(typeof oe=="function"&&(lh(r,l,oe,u),G=r.memoizedState),(L=$a||vy(r,l,L,u,W,G,k))?(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=G),y.props=u,y.state=G,y.context=k,u=L):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,Bf(i,r),k=r.memoizedProps,ie=Qr(l,k),y.props=ie,oe=r.pendingProps,W=y.context,G=l.contextType,L=Ds,typeof G=="object"&&G!==null&&(L=fn(G)),N=l.getDerivedStateFromProps,(G=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(k!==oe||W!==L)&&wy(r,y,u,L),$a=!1,W=r.memoizedState,y.state=W,yo(r,u,y,m),bo();var Z=r.memoizedState;k!==oe||W!==Z||$a||i!==null&&i.dependencies!==null&&Wc(i.dependencies)?(typeof N=="function"&&(lh(r,l,N,u),Z=r.memoizedState),(ie=$a||vy(r,l,ie,u,W,Z,L)||i!==null&&i.dependencies!==null&&Wc(i.dependencies))?(G||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,Z,L),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,Z,L)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Z),y.props=u,y.state=Z,y.context=L,u=ie):(typeof y.componentDidUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||k===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return y=u,mu(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=Kr(r,i.child,null,m),r.child=Kr(r,null,l,m)):hn(i,r,l,m),r.memoizedState=y.state,i=r.child):i=pa(i,r,m),i}function Iy(i,r,l,u){return Ur(),r.flags|=256,hn(i,r,l,u),r.child}var fh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function hh(i){return{baseLanes:i,cachePool:_b()}}function ph(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=ni),i}function zy(i,r,l){var u=r.pendingProps,m=!1,y=(r.flags&128)!==0,k;if((k=y)||(k=i!==null&&i.memoizedState===null?!1:(Yt.current&2)!==0),k&&(m=!0,r.flags&=-129),k=(r.flags&32)!==0,r.flags&=-33,i===null){if(nt){if(m?Ga(r):Qa(),(i=Tt)?(i=Kx(i,gi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ua!==null?{id:Hi,overflow:Ki}:null,retryLane:536870912,hydrationErrors:null},l=gb(i),l.return=r,r.child=l,dn=r,Tt=null)):i=null,i===null)throw Fa(r);return Wh(i)?r.lanes=32:r.lanes=536870912,null}var N=u.children;return u=u.fallback,m?(Qa(),m=r.mode,N=gu({mode:"hidden",children:N},m),u=Br(u,m,l,null),N.return=r,u.return=r,N.sibling=u,r.child=N,u=r.child,u.memoizedState=hh(l),u.childLanes=ph(i,k,l),r.memoizedState=fh,Eo(null,u)):(Ga(r),mh(r,N))}var L=i.memoizedState;if(L!==null&&(N=L.dehydrated,N!==null)){if(y)r.flags&256?(Ga(r),r.flags&=-257,r=gh(i,r,l)):r.memoizedState!==null?(Qa(),r.child=i.child,r.flags|=128,r=null):(Qa(),N=u.fallback,m=r.mode,u=gu({mode:"visible",children:u.children},m),N=Br(N,m,l,null),N.flags|=2,u.return=r,N.return=r,u.sibling=N,r.child=u,Kr(r,i.child,null,l),u=r.child,u.memoizedState=hh(l),u.childLanes=ph(i,k,l),r.memoizedState=fh,r=Eo(null,u));else if(Ga(r),Wh(N)){if(k=N.nextSibling&&N.nextSibling.dataset,k)var G=k.dgst;k=G,u=Error(a(419)),u.stack="",u.digest=k,uo({value:u,source:null,stack:null}),r=gh(i,r,l)}else if(en||Is(i,r,l,!1),k=(l&i.childLanes)!==0,en||k){if(k=wt,k!==null&&(u=Kt(k,l),u!==0&&u!==L.retryLane))throw L.retryLane=u,zr(i,u),Pn(k,i,u),uh;Vh(N)||_u(),r=gh(i,r,l)}else Vh(N)?(r.flags|=192,r.child=i.child,r=null):(i=L.treeContext,Tt=yi(N.nextSibling),dn=r,nt=!0,Pa=null,gi=!1,i!==null&&xb(r,i),r=mh(r,u.children),r.flags|=4096);return r}return m?(Qa(),N=u.fallback,m=r.mode,L=i.child,G=L.sibling,u=oa(L,{mode:"hidden",children:u.children}),u.subtreeFlags=L.subtreeFlags&65011712,G!==null?N=oa(G,N):(N=Br(N,m,l,null),N.flags|=2),N.return=r,u.return=r,u.sibling=N,r.child=u,Eo(null,u),u=r.child,N=i.child.memoizedState,N===null?N=hh(l):(m=N.cachePool,m!==null?(L=Zt._currentValue,m=m.parent!==L?{parent:L,pool:L}:m):m=_b(),N={baseLanes:N.baseLanes|l,cachePool:m}),u.memoizedState=N,u.childLanes=ph(i,k,l),r.memoizedState=fh,Eo(i.child,u)):(Ga(r),l=i.child,i=l.sibling,l=oa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(k=r.deletions,k===null?(r.deletions=[i],r.flags|=16):k.push(i)),r.child=l,r.memoizedState=null,l)}function mh(i,r){return r=gu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function gu(i,r){return i=Zn(22,i,null,r),i.lanes=0,i}function gh(i,r,l){return Kr(r,i.child,null,l),i=mh(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function By(i,r,l){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),Of(i.return,r,l)}function bh(i,r,l,u,m,y){var k=i.memoizedState;k===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:m,treeForkCount:y}:(k.isBackwards=r,k.rendering=null,k.renderingStartTime=0,k.last=u,k.tail=l,k.tailMode=m,k.treeForkCount=y)}function Uy(i,r,l){var u=r.pendingProps,m=u.revealOrder,y=u.tail;u=u.children;var k=Yt.current,N=(k&2)!==0;if(N?(k=k&1|2,r.flags|=128):k&=1,j(Yt,k),hn(i,r,u,l),u=nt?co:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&By(i,l,r);else if(i.tag===19)By(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(m){case"forwards":for(l=r.child,m=null;l!==null;)i=l.alternate,i!==null&&au(i)===null&&(m=l),l=l.sibling;l=m,l===null?(m=r.child,r.child=null):(m=l.sibling,l.sibling=null),bh(r,!1,m,l,y,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,m=r.child,r.child=null;m!==null;){if(i=m.alternate,i!==null&&au(i)===null){r.child=m;break}i=m.sibling,m.sibling=l,l=m,m=i}bh(r,!0,l,null,y,u);break;case"together":bh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function pa(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Wa|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(Is(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=oa(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=oa(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function yh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Wc(i)))}function WS(i,r,l){switch(r.tag){case 3:V(r,r.stateNode.containerInfo),qa(r,Zt,i.memoizedState.cache),Ur();break;case 27:case 5:ye(r);break;case 4:V(r,r.stateNode.containerInfo);break;case 10:qa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,$f(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ga(r),r.flags|=128,null):(l&r.child.childLanes)!==0?zy(i,r,l):(Ga(r),i=pa(i,r,l),i!==null?i.sibling:null);Ga(r);break;case 19:var m=(i.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Is(i,r,l,!1),u=(l&r.childLanes)!==0),m){if(u)return Uy(i,r,l);r.flags|=128}if(m=r.memoizedState,m!==null&&(m.rendering=null,m.tail=null,m.lastEffect=null),j(Yt,Yt.current),u)break;return null;case 22:return r.lanes=0,Oy(i,r,l,r.pendingProps);case 24:qa(r,Zt,i.memoizedState.cache)}return pa(i,r,l)}function Py(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)en=!0;else{if(!yh(i,l)&&(r.flags&128)===0)return en=!1,WS(i,r,l);en=(i.flags&131072)!==0}else en=!1,nt&&(r.flags&1048576)!==0&&yb(r,co,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=$r(r.elementType),r.type=i,typeof i=="function")Ef(i)?(u=Qr(i,u),r.tag=1,r=Ly(null,r,i,u,l)):(r.tag=0,r=dh(null,r,i,u,l));else{if(i!=null){var m=i.$$typeof;if(m===D){r.tag=11,r=Ty(null,r,i,u,l);break e}else if(m===q){r.tag=14,r=Ay(null,r,i,u,l);break e}}throw r=ue(i)||i,Error(a(306,r,""))}}return r;case 0:return dh(i,r,r.type,r.pendingProps,l);case 1:return u=r.type,m=Qr(u,r.pendingProps),Ly(i,r,u,m,l);case 3:e:{if(V(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var y=r.memoizedState;m=y.element,Bf(i,r),yo(r,u,null,l);var k=r.memoizedState;if(u=k.cache,qa(r,Zt,u),u!==y.cache&&Df(r,[Zt],l,!0),bo(),u=k.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:k.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=Iy(i,r,u,l);break e}else if(u!==m){m=hi(Error(a(424)),r),uo(m),r=Iy(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(Tt=yi(i.firstChild),dn=r,nt=!0,Pa=null,gi=!0,l=Ob(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Ur(),u===m){r=pa(i,r,l);break e}hn(i,r,u,l)}r=r.child}return r;case 26:return mu(i,r),i===null?(l=Xx(r.type,null,r.pendingProps,null))?r.memoizedState=l:nt||(l=r.type,i=r.pendingProps,u=Du(Y.current).createElement(l),u[Gt]=r,u[gn]=i,pn(u,l,i),Wt(u),r.stateNode=u):r.memoizedState=Xx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return ye(r),i===null&&nt&&(u=r.stateNode=Yx(r.type,r.pendingProps,Y.current),dn=r,gi=!0,m=Tt,tr(r.type)?(Xh=m,Tt=yi(u.firstChild)):Tt=m),hn(i,r,r.pendingProps.children,l),mu(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&nt&&((m=u=Tt)&&(u=N_(u,r.type,r.pendingProps,gi),u!==null?(r.stateNode=u,dn=r,Tt=yi(u.firstChild),gi=!1,m=!0):m=!1),m||Fa(r)),ye(r),m=r.type,y=r.pendingProps,k=i!==null?i.memoizedProps:null,u=y.children,Gh(m,y)?u=null:k!==null&&Gh(m,k)&&(r.flags|=32),r.memoizedState!==null&&(m=Kf(i,r,FS,null,null,l),Bo._currentValue=m),mu(i,r),hn(i,r,u,l),r.child;case 6:return i===null&&nt&&((i=l=Tt)&&(l=C_(l,r.pendingProps,gi),l!==null?(r.stateNode=l,dn=r,Tt=null,i=!0):i=!1),i||Fa(r)),null;case 13:return zy(i,r,l);case 4:return V(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Kr(r,null,u,l):hn(i,r,u,l),r.child;case 11:return Ty(i,r,r.type,r.pendingProps,l);case 7:return hn(i,r,r.pendingProps,l),r.child;case 8:return hn(i,r,r.pendingProps.children,l),r.child;case 12:return hn(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,qa(r,r.type,u.value),hn(i,r,u.children,l),r.child;case 9:return m=r.type._context,u=r.pendingProps.children,Fr(r),m=fn(m),u=u(m),r.flags|=1,hn(i,r,u,l),r.child;case 14:return Ay(i,r,r.type,r.pendingProps,l);case 15:return jy(i,r,r.type,r.pendingProps,l);case 19:return Uy(i,r,l);case 31:return VS(i,r,l);case 22:return Oy(i,r,l,r.pendingProps);case 24:return Fr(r),u=fn(Zt),i===null?(m=Lf(),m===null&&(m=wt,y=Mf(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=l),m=y),r.memoizedState={parent:u,cache:m},zf(r),qa(r,Zt,m)):((i.lanes&l)!==0&&(Bf(i,r),yo(r,null,null,l),bo()),m=i.memoizedState,y=r.memoizedState,m.parent!==u?(m={parent:u,cache:u},r.memoizedState=m,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=m),qa(r,Zt,u)):(u=y.cache,qa(r,Zt,u),u!==m.cache&&Df(r,[Zt],l,!0))),hn(i,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ma(i){i.flags|=4}function xh(i,r,l,u,m){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(m&335544128)===m)if(i.stateNode.complete)i.flags|=8192;else if(hx())i.flags|=8192;else throw Hr=eu,If}else i.flags&=-16777217}function Fy(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!nv(r))if(hx())i.flags|=8192;else throw Hr=eu,If}function bu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?ze():536870912,i.lanes|=r,Ys|=r)}function So(i,r){if(!nt)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 At(i){var r=i.alternate!==null&&i.alternate.child===i.child,l=0,u=0;if(r)for(var m=i.child;m!==null;)l|=m.lanes|m.childLanes,u|=m.subtreeFlags&65011712,u|=m.flags&65011712,m.return=i,m=m.sibling;else for(m=i.child;m!==null;)l|=m.lanes|m.childLanes,u|=m.subtreeFlags,u|=m.flags,m.return=i,m=m.sibling;return i.subtreeFlags|=u,i.childLanes=l,r}function XS(i,r,l){var u=r.pendingProps;switch(Cf(r),r.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return At(r),null;case 1:return At(r),null;case 3:return l=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),da(Zt),ae(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Ls(r)?ma(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Af())),At(r),null;case 26:var m=r.type,y=r.memoizedState;return i===null?(ma(r),y!==null?(At(r),Fy(r,y)):(At(r),xh(r,m,null,u,l))):y?y!==i.memoizedState?(ma(r),At(r),Fy(r,y)):(At(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ma(r),At(r),xh(r,m,i,u,l)),null;case 27:if(Be(r),l=Y.current,m=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ma(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return At(r),null}i=ge.current,Ls(r)?vb(r):(i=Yx(m,u,l),r.stateNode=i,ma(r))}return At(r),null;case 5:if(Be(r),m=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ma(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return At(r),null}if(y=ge.current,Ls(r))vb(r);else{var k=Du(Y.current);switch(y){case 1:y=k.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=k.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=k.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=k.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=k.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?k.createElement("select",{is:u.is}):k.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?k.createElement(m,{is:u.is}):k.createElement(m)}}y[Gt]=r,y[gn]=u;e:for(k=r.child;k!==null;){if(k.tag===5||k.tag===6)y.appendChild(k.stateNode);else if(k.tag!==4&&k.tag!==27&&k.child!==null){k.child.return=k,k=k.child;continue}if(k===r)break e;for(;k.sibling===null;){if(k.return===null||k.return===r)break e;k=k.return}k.sibling.return=k.return,k=k.sibling}r.stateNode=y;e:switch(pn(y,m,u),m){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ma(r)}}return At(r),xh(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ma(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=Y.current,Ls(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,m=dn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}i[Gt]=r,i=!!(i.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||zx(i.nodeValue,l)),i||Fa(r,!0)}else i=Du(i).createTextNode(u),i[Gt]=r,r.stateNode=i}return At(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(u=Ls(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[Gt]=r}else Ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),i=!1}else l=Af(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(ei(r),r):(ei(r),null);if((r.flags&128)!==0)throw Error(a(558))}return At(r),null;case 13:if(u=r.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(m=Ls(r),u!==null&&u.dehydrated!==null){if(i===null){if(!m)throw Error(a(318));if(m=r.memoizedState,m=m!==null?m.dehydrated:null,!m)throw Error(a(317));m[Gt]=r}else Ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;At(r),m=!1}else m=Af(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=m),m=!0;if(!m)return r.flags&256?(ei(r),r):(ei(r),null)}return ei(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,i=i!==null&&i.memoizedState!==null,l&&(u=r.child,m=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(m=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==m&&(u.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),bu(r,r.updateQueue),At(r),null);case 4:return ae(),i===null&&Fh(r.stateNode.containerInfo),At(r),null;case 10:return da(r.type),At(r),null;case 19:if(Q(Yt),u=r.memoizedState,u===null)return At(r),null;if(m=(r.flags&128)!==0,y=u.rendering,y===null)if(m)So(u,!1);else{if(qt!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(y=au(i),y!==null){for(r.flags|=128,So(u,!1),i=y.updateQueue,r.updateQueue=i,bu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)mb(l,i),l=l.sibling;return j(Yt,Yt.current&1|2),nt&&ca(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Lt()>ku&&(r.flags|=128,m=!0,So(u,!1),r.lanes=4194304)}else{if(!m)if(i=au(y),i!==null){if(r.flags|=128,m=!0,i=i.updateQueue,r.updateQueue=i,bu(r,i),So(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!nt)return At(r),null}else 2*Lt()-u.renderingStartTime>ku&&l!==536870912&&(r.flags|=128,m=!0,So(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=Lt(),i.sibling=null,l=Yt.current,j(Yt,m?l&1|2:l&1),nt&&ca(r,u.treeForkCount),i):(At(r),null);case 22:case 23:return ei(r),qf(),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&&(At(r),r.subtreeFlags&6&&(r.flags|=8192)):At(r),l=r.updateQueue,l!==null&&bu(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&&Q(qr),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),da(Zt),At(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function ZS(i,r){switch(Cf(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return da(Zt),ae(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return Be(r),null;case 31:if(r.memoizedState!==null){if(ei(r),r.alternate===null)throw Error(a(340));Ur()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(ei(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Ur()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return Q(Yt),null;case 4:return ae(),null;case 10:return da(r.type),null;case 22:case 23:return ei(r),qf(),i!==null&&Q(qr),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return da(Zt),null;case 25:return null;default:return null}}function qy(i,r){switch(Cf(r),r.tag){case 3:da(Zt),ae();break;case 26:case 27:case 5:Be(r);break;case 4:ae();break;case 31:r.memoizedState!==null&&ei(r);break;case 13:ei(r);break;case 19:Q(Yt);break;case 10:da(r.type);break;case 22:case 23:ei(r),qf(),i!==null&&Q(qr);break;case 24:da(Zt)}}function _o(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var m=u.next;l=m;do{if((l.tag&i)===i){u=void 0;var y=l.create,k=l.inst;u=y(),k.destroy=u}l=l.next}while(l!==m)}}catch(N){mt(r,r.return,N)}}function Ya(i,r,l){try{var u=r.updateQueue,m=u!==null?u.lastEffect:null;if(m!==null){var y=m.next;u=y;do{if((u.tag&i)===i){var k=u.inst,N=k.destroy;if(N!==void 0){k.destroy=void 0,m=r;var L=l,G=N;try{G()}catch(ie){mt(m,L,ie)}}}u=u.next}while(u!==y)}}catch(ie){mt(r,r.return,ie)}}function $y(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Mb(r,l)}catch(u){mt(i,i.return,u)}}}function Hy(i,r,l){l.props=Qr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){mt(i,r,u)}}function No(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(m){mt(i,r,m)}}function Gi(i,r){var l=i.ref,u=i.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(m){mt(i,r,m)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(m){mt(i,r,m)}else l.current=null}function Ky(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(m){mt(i,i.return,m)}}function vh(i,r,l){try{var u=i.stateNode;v_(u,i.type,l,r),u[gn]=r}catch(m){mt(i,i.return,m)}}function Gy(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&tr(i.type)||i.tag===4}function wh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Gy(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&&tr(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 kh(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=be));else if(u!==4&&(u===27&&tr(i.type)&&(l=i.stateNode,r=null),i=i.child,i!==null))for(kh(i,r,l),i=i.sibling;i!==null;)kh(i,r,l),i=i.sibling}function yu(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&&tr(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(yu(i,r,l),i=i.sibling;i!==null;)yu(i,r,l),i=i.sibling}function Qy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,m=r.attributes;m.length;)r.removeAttributeNode(m[0]);pn(r,u,l),r[Gt]=i,r[gn]=l}catch(y){mt(i,i.return,y)}}var ga=!1,tn=!1,Eh=!1,Yy=typeof WeakSet=="function"?WeakSet:Set,sn=null;function JS(i,r){if(i=i.containerInfo,Hh=Uu,i=sb(i),gf(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 m=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var k=0,N=-1,L=-1,G=0,ie=0,oe=i,W=null;t:for(;;){for(var Z;oe!==l||m!==0&&oe.nodeType!==3||(N=k+m),oe!==y||u!==0&&oe.nodeType!==3||(L=k+u),oe.nodeType===3&&(k+=oe.nodeValue.length),(Z=oe.firstChild)!==null;)W=oe,oe=Z;for(;;){if(oe===i)break t;if(W===l&&++G===m&&(N=k),W===y&&++ie===u&&(L=k),(Z=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=Z}l=N===-1||L===-1?null:{start:N,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kh={focusedElem:i,selectionRange:l},Uu=!1,sn=r;sn!==null;)if(r=sn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,sn=i;else for(;sn!==null;){switch(r=sn,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++)m=i[l],m.ref.impl=m.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&y!==null){i=void 0,l=r,m=y.memoizedProps,y=y.memoizedState,u=l.stateNode;try{var Ee=Qr(l.type,m);i=u.getSnapshotBeforeUpdate(Ee,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(Re){mt(l,l.return,Re)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,l=i.nodeType,l===9)Yh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Yh(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,sn=i;break}sn=r.return}}function Vy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ya(i,l),u&4&&_o(5,l);break;case 1:if(ya(i,l),u&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(k){mt(l,l.return,k)}else{var m=Qr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(m,r,i.__reactInternalSnapshotBeforeUpdate)}catch(k){mt(l,l.return,k)}}u&64&&$y(l),u&512&&No(l,l.return);break;case 3:if(ya(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{Mb(i,r)}catch(k){mt(l,l.return,k)}}break;case 27:r===null&&u&4&&Qy(l);case 26:case 5:ya(i,l),r===null&&u&4&&Ky(l),u&512&&No(l,l.return);break;case 12:ya(i,l);break;case 31:ya(i,l),u&4&&Zy(i,l);break;case 13:ya(i,l),u&4&&Jy(i,l),u&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=o_.bind(null,l),T_(i,l))));break;case 22:if(u=l.memoizedState!==null||ga,!u){r=r!==null&&r.memoizedState!==null||tn,m=ga;var y=tn;ga=u,(tn=r)&&!y?xa(i,l,(l.subtreeFlags&8772)!==0):ya(i,l),ga=m,tn=y}break;case 30:break;default:ya(i,l)}}function Wy(i){var r=i.alternate;r!==null&&(i.alternate=null,Wy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Vl(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 Dt=null,In=!1;function ba(i,r,l){for(l=l.child;l!==null;)Xy(i,r,l),l=l.sibling}function Xy(i,r,l){if(Pt&&typeof Pt.onCommitFiberUnmount=="function")try{Pt.onCommitFiberUnmount(cn,l)}catch{}switch(l.tag){case 26:tn||Gi(l,r),ba(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:tn||Gi(l,r);var u=Dt,m=In;tr(l.type)&&(Dt=l.stateNode,In=!1),ba(i,r,l),Lo(l.stateNode),Dt=u,In=m;break;case 5:tn||Gi(l,r);case 6:if(u=Dt,m=In,Dt=null,ba(i,r,l),Dt=u,In=m,Dt!==null)if(In)try{(Dt.nodeType===9?Dt.body:Dt.nodeName==="HTML"?Dt.ownerDocument.body:Dt).removeChild(l.stateNode)}catch(y){mt(l,r,y)}else try{Dt.removeChild(l.stateNode)}catch(y){mt(l,r,y)}break;case 18:Dt!==null&&(In?(i=Dt,$x(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),nl(i)):$x(Dt,l.stateNode));break;case 4:u=Dt,m=In,Dt=l.stateNode.containerInfo,In=!0,ba(i,r,l),Dt=u,In=m;break;case 0:case 11:case 14:case 15:Ya(2,l,r),tn||Ya(4,l,r),ba(i,r,l);break;case 1:tn||(Gi(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&Hy(l,r,u)),ba(i,r,l);break;case 21:ba(i,r,l);break;case 22:tn=(u=tn)||l.memoizedState!==null,ba(i,r,l),tn=u;break;default:ba(i,r,l)}}function Zy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{nl(i)}catch(l){mt(r,r.return,l)}}}function Jy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{nl(i)}catch(l){mt(r,r.return,l)}}function e_(i){switch(i.tag){case 31:case 13:case 19:var r=i.stateNode;return r===null&&(r=i.stateNode=new Yy),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Yy),r;default:throw Error(a(435,i.tag))}}function xu(i,r){var l=e_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var m=c_.bind(null,i,u);u.then(m,m)}})}function zn(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var m=l[u],y=i,k=r,N=k;e:for(;N!==null;){switch(N.tag){case 27:if(tr(N.type)){Dt=N.stateNode,In=!1;break e}break;case 5:Dt=N.stateNode,In=!1;break e;case 3:case 4:Dt=N.stateNode.containerInfo,In=!0;break e}N=N.return}if(Dt===null)throw Error(a(160));Xy(y,k,m),Dt=null,In=!1,y=m.alternate,y!==null&&(y.return=null),m.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)ex(r,i),r=r.sibling}var Oi=null;function ex(i,r){var l=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:zn(r,i),Bn(i),u&4&&(Ya(3,i,i.return),_o(3,i),Ya(5,i,i.return));break;case 1:zn(r,i),Bn(i),u&512&&(tn||l===null||Gi(l,l.return)),u&64&&ga&&(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 m=Oi;if(zn(r,i),Bn(i),u&512&&(tn||l===null||Gi(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,m=m.ownerDocument||m;t:switch(u){case"title":y=m.getElementsByTagName("title")[0],(!y||y[Or]||y[Gt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(u),m.head.insertBefore(y,m.querySelector("head > title"))),pn(y,u,l),y[Gt]=i,Wt(y),u=y;break e;case"link":var k=ev("link","href",m).get(u+(l.href||""));if(k){for(var N=0;N<k.length;N++)if(y=k[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)){k.splice(N,1);break t}}y=m.createElement(u),pn(y,u,l),m.head.appendChild(y);break;case"meta":if(k=ev("meta","content",m).get(u+(l.content||""))){for(N=0;N<k.length;N++)if(y=k[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)){k.splice(N,1);break t}}y=m.createElement(u),pn(y,u,l),m.head.appendChild(y);break;default:throw Error(a(468,u))}y[Gt]=i,Wt(y),u=y}i.stateNode=u}else tv(m,i.type,i.stateNode);else i.stateNode=Jx(m,u,i.memoizedProps);else y!==u?(y===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):y.count--,u===null?tv(m,i.type,i.stateNode):Jx(m,u,i.memoizedProps)):u===null&&i.stateNode!==null&&vh(i,i.memoizedProps,l.memoizedProps)}break;case 27:zn(r,i),Bn(i),u&512&&(tn||l===null||Gi(l,l.return)),l!==null&&u&4&&vh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(zn(r,i),Bn(i),u&512&&(tn||l===null||Gi(l,l.return)),i.flags&32){m=i.stateNode;try{Le(m,"")}catch(Ee){mt(i,i.return,Ee)}}u&4&&i.stateNode!=null&&(m=i.memoizedProps,vh(i,m,l!==null?l.memoizedProps:m)),u&1024&&(Eh=!0);break;case 6:if(zn(r,i),Bn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(Ee){mt(i,i.return,Ee)}}break;case 3:if(Lu=null,m=Oi,Oi=Mu(r.containerInfo),zn(r,i),Oi=m,Bn(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{nl(r.containerInfo)}catch(Ee){mt(i,i.return,Ee)}Eh&&(Eh=!1,tx(i));break;case 4:u=Oi,Oi=Mu(i.stateNode.containerInfo),zn(r,i),Bn(i),Oi=u;break;case 12:zn(r,i),Bn(i);break;case 31:zn(r,i),Bn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 13:zn(r,i),Bn(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(wu=Lt()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 22:m=i.memoizedState!==null;var L=l!==null&&l.memoizedState!==null,G=ga,ie=tn;if(ga=G||m,tn=ie||L,zn(r,i),tn=ie,ga=G,Bn(i),u&8192)e:for(r=i.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,m&&(l===null||L||ga||tn||Yr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){L=l=r;try{if(y=L.stateNode,m)k=y.style,typeof k.setProperty=="function"?k.setProperty("display","none","important"):k.display="none";else{N=L.stateNode;var oe=L.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(Ee){mt(L,L.return,Ee)}}}else if(r.tag===6){if(l===null){L=r;try{L.stateNode.nodeValue=m?"":L.memoizedProps}catch(Ee){mt(L,L.return,Ee)}}}else if(r.tag===18){if(l===null){L=r;try{var Z=L.stateNode;m?Hx(Z,!0):Hx(L.stateNode,!1)}catch(Ee){mt(L,L.return,Ee)}}}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,xu(i,l))));break;case 19:zn(r,i),Bn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 30:break;case 21:break;default:zn(r,i),Bn(i)}}function Bn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if(Gy(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var m=l.stateNode,y=wh(i);yu(i,y,m);break;case 5:var k=l.stateNode;l.flags&32&&(Le(k,""),l.flags&=-33);var N=wh(i);yu(i,N,k);break;case 3:case 4:var L=l.stateNode.containerInfo,G=wh(i);kh(i,G,L);break;default:throw Error(a(161))}}catch(ie){mt(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function tx(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;tx(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function ya(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Vy(i,r.alternate,r),r=r.sibling}function Yr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Ya(4,r,r.return),Yr(r);break;case 1:Gi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Hy(r,r.return,l),Yr(r);break;case 27:Lo(r.stateNode);case 26:case 5:Gi(r,r.return),Yr(r);break;case 22:r.memoizedState===null&&Yr(r);break;case 30:Yr(r);break;default:Yr(r)}i=i.sibling}}function xa(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,m=i,y=r,k=y.flags;switch(y.tag){case 0:case 11:case 15:xa(m,y,l),_o(4,y);break;case 1:if(xa(m,y,l),u=y,m=u.stateNode,typeof m.componentDidMount=="function")try{m.componentDidMount()}catch(G){mt(u,u.return,G)}if(u=y,m=u.updateQueue,m!==null){var N=u.stateNode;try{var L=m.shared.hiddenCallbacks;if(L!==null)for(m.shared.hiddenCallbacks=null,m=0;m<L.length;m++)Db(L[m],N)}catch(G){mt(u,u.return,G)}}l&&k&64&&$y(y),No(y,y.return);break;case 27:Qy(y);case 26:case 5:xa(m,y,l),l&&u===null&&k&4&&Ky(y),No(y,y.return);break;case 12:xa(m,y,l);break;case 31:xa(m,y,l),l&&k&4&&Zy(m,y);break;case 13:xa(m,y,l),l&&k&4&&Jy(m,y);break;case 22:y.memoizedState===null&&xa(m,y,l),No(y,y.return);break;case 30:break;default:xa(m,y,l)}r=r.sibling}}function Sh(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&&fo(l))}function _h(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&fo(i))}function Di(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)nx(i,r,l,u),r=r.sibling}function nx(i,r,l,u){var m=r.flags;switch(r.tag){case 0:case 11:case 15:Di(i,r,l,u),m&2048&&_o(9,r);break;case 1:Di(i,r,l,u);break;case 3:Di(i,r,l,u),m&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&fo(i)));break;case 12:if(m&2048){Di(i,r,l,u),i=r.stateNode;try{var y=r.memoizedProps,k=y.id,N=y.onPostCommit;typeof N=="function"&&N(k,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(L){mt(r,r.return,L)}}else Di(i,r,l,u);break;case 31:Di(i,r,l,u);break;case 13:Di(i,r,l,u);break;case 23:break;case 22:y=r.stateNode,k=r.alternate,r.memoizedState!==null?y._visibility&2?Di(i,r,l,u):Co(i,r):y._visibility&2?Di(i,r,l,u):(y._visibility|=2,Ks(i,r,l,u,(r.subtreeFlags&10256)!==0||!1)),m&2048&&Sh(k,r);break;case 24:Di(i,r,l,u),m&2048&&_h(r.alternate,r);break;default:Di(i,r,l,u)}}function Ks(i,r,l,u,m){for(m=m&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=i,k=r,N=l,L=u,G=k.flags;switch(k.tag){case 0:case 11:case 15:Ks(y,k,N,L,m),_o(8,k);break;case 23:break;case 22:var ie=k.stateNode;k.memoizedState!==null?ie._visibility&2?Ks(y,k,N,L,m):Co(y,k):(ie._visibility|=2,Ks(y,k,N,L,m)),m&&G&2048&&Sh(k.alternate,k);break;case 24:Ks(y,k,N,L,m),m&&G&2048&&_h(k.alternate,k);break;default:Ks(y,k,N,L,m)}r=r.sibling}}function Co(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,u=r,m=u.flags;switch(u.tag){case 22:Co(l,u),m&2048&&Sh(u.alternate,u);break;case 24:Co(l,u),m&2048&&_h(u.alternate,u);break;default:Co(l,u)}r=r.sibling}}var To=8192;function Gs(i,r,l){if(i.subtreeFlags&To)for(i=i.child;i!==null;)ix(i,r,l),i=i.sibling}function ix(i,r,l){switch(i.tag){case 26:Gs(i,r,l),i.flags&To&&i.memoizedState!==null&&P_(l,Oi,i.memoizedState,i.memoizedProps);break;case 5:Gs(i,r,l);break;case 3:case 4:var u=Oi;Oi=Mu(i.stateNode.containerInfo),Gs(i,r,l),Oi=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=To,To=16777216,Gs(i,r,l),To=u):Gs(i,r,l));break;default:Gs(i,r,l)}}function ax(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 Ao(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];sn=u,sx(u,i)}ax(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)rx(i),i=i.sibling}function rx(i){switch(i.tag){case 0:case 11:case 15:Ao(i),i.flags&2048&&Ya(9,i,i.return);break;case 3:Ao(i);break;case 12:Ao(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,vu(i)):Ao(i);break;default:Ao(i)}}function vu(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];sn=u,sx(u,i)}ax(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Ya(8,r,r.return),vu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,vu(r));break;default:vu(r)}i=i.sibling}}function sx(i,r){for(;sn!==null;){var l=sn;switch(l.tag){case 0:case 11:case 15:Ya(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:fo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,sn=u;else e:for(l=i;sn!==null;){u=sn;var m=u.sibling,y=u.return;if(Wy(u),u===l){sn=null;break e}if(m!==null){m.return=y,sn=m;break e}sn=y}}}var t_={getCacheForType:function(i){var r=fn(Zt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return fn(Zt).controller.signal}},n_=typeof WeakMap=="function"?WeakMap:Map,ot=0,wt=null,Ve=null,Je=0,pt=0,ti=null,Va=!1,Qs=!1,Nh=!1,va=0,qt=0,Wa=0,Vr=0,Ch=0,ni=0,Ys=0,jo=null,Un=null,Th=!1,wu=0,lx=0,ku=1/0,Eu=null,Xa=null,an=0,Za=null,Vs=null,wa=0,Ah=0,jh=null,ox=null,Oo=0,Oh=null;function ii(){return(ot&2)!==0&&Je!==0?Je&-Je:$.T!==null?zh():ws()}function cx(){if(ni===0)if((Je&536870912)===0||nt){var i=vs;vs<<=1,(vs&3932160)===0&&(vs=262144),ni=i}else ni=536870912;return i=Jn.current,i!==null&&(i.flags|=32),ni}function Pn(i,r,l){(i===wt&&(pt===2||pt===9)||i.cancelPendingCommit!==null)&&(Ws(i,0),Ja(i,Je,ni,!1)),vt(i,l),((ot&2)===0||i!==wt)&&(i===wt&&((ot&2)===0&&(Vr|=l),qt===4&&Ja(i,Je,ni,!1)),Qi(i))}function ux(i,r,l){if((ot&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||se(i,r),m=u?r_(i,r):Mh(i,r,!0),y=u;do{if(m===0){Qs&&!u&&Ja(i,r,0,!1);break}else{if(l=i.current.alternate,y&&!i_(l)){m=Mh(i,r,!1),y=!1;continue}if(m===2){if(y=r,i.errorRecoveryDisabledLanes&y)var k=0;else k=i.pendingLanes&-536870913,k=k!==0?k:k&536870912?536870912:0;if(k!==0){r=k;e:{var N=i;m=jo;var L=N.current.memoizedState.isDehydrated;if(L&&(Ws(N,k).flags|=256),k=Mh(N,k,!1),k!==2){if(Nh&&!L){N.errorRecoveryDisabledLanes|=y,Vr|=y,m=4;break e}y=Un,Un=m,y!==null&&(Un===null?Un=y:Un.push.apply(Un,y))}m=k}if(y=!1,m!==2)continue}}if(m===1){Ws(i,0),Ja(i,r,0,!0);break}e:{switch(u=i,y=m,y){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Ja(u,r,ni,!Va);break e;case 2:Un=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(m=wu+300-Lt(),10<m)){if(Ja(u,r,ni,!Va),z(u,0,!0)!==0)break e;wa=r,u.timeoutHandle=Fx(dx.bind(null,u,l,Un,Eu,Th,r,ni,Vr,Ys,Va,y,"Throttled",-0,0),m);break e}dx(u,l,Un,Eu,Th,r,ni,Vr,Ys,Va,y,null,-0,0)}}break}while(!0);Qi(i)}function dx(i,r,l,u,m,y,k,N,L,G,ie,oe,W,Z){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:be},ix(r,y,oe);var Ee=(y&62914560)===y?wu-Lt():(y&4194048)===y?lx-Lt():0;if(Ee=F_(oe,Ee),Ee!==null){wa=y,i.cancelPendingCommit=Ee(xx.bind(null,i,r,y,l,u,m,k,N,L,ie,oe,null,W,Z)),Ja(i,y,k,!G);return}}xx(i,r,y,l,u,m,k,N,L)}function i_(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 m=l[u],y=m.getSnapshot;m=m.value;try{if(!Xn(y(),m))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 Ja(i,r,l,u){r&=~Ch,r&=~Vr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var m=r;0<m;){var y=31-dt(m),k=1<<y;u[y]=-1,m&=~k}l!==0&&ke(i,l,r)}function Su(){return(ot&6)===0?(Do(0),!1):!0}function Dh(){if(Ve!==null){if(pt===0)var i=Ve.return;else i=Ve,ua=Pr=null,Yf(i),Ps=null,po=0,i=Ve;for(;i!==null;)qy(i.alternate,i),i=i.return;Ve=null}}function Ws(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,E_(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),wa=0,Dh(),wt=i,Ve=l=oa(i.current,null),Je=r,pt=0,ti=null,Va=!1,Qs=se(i,r),Nh=!1,Ys=ni=Ch=Vr=Wa=qt=0,Un=jo=null,Th=!1,(r&8)!==0&&(r|=r&32);var u=i.entangledLanes;if(u!==0)for(i=i.entanglements,u&=r;0<u;){var m=31-dt(u),y=1<<m;r|=i[m],u&=~y}return va=r,Kc(),l}function fx(i,r){$e=null,$.H=ko,r===Us||r===Jc?(r=Tb(),pt=3):r===If?(r=Tb(),pt=4):pt=r===uh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ti=r,Ve===null&&(qt=1,hu(i,hi(r,i.current)))}function hx(){var i=Jn.current;return i===null?!0:(Je&4194048)===Je?bi===null:(Je&62914560)===Je||(Je&536870912)!==0?i===bi:!1}function px(){var i=$.H;return $.H=ko,i===null?ko:i}function mx(){var i=$.A;return $.A=t_,i}function _u(){qt=4,Va||(Je&4194048)!==Je&&Jn.current!==null||(Qs=!0),(Wa&134217727)===0&&(Vr&134217727)===0||wt===null||Ja(wt,Je,ni,!1)}function Mh(i,r,l){var u=ot;ot|=2;var m=px(),y=mx();(wt!==i||Je!==r)&&(Eu=null,Ws(i,r)),r=!1;var k=qt;e:do try{if(pt!==0&&Ve!==null){var N=Ve,L=ti;switch(pt){case 8:Dh(),k=6;break e;case 3:case 2:case 9:case 6:Jn.current===null&&(r=!0);var G=pt;if(pt=0,ti=null,Xs(i,N,L,G),l&&Qs){k=0;break e}break;default:G=pt,pt=0,ti=null,Xs(i,N,L,G)}}a_(),k=qt;break}catch(ie){fx(i,ie)}while(!0);return r&&i.shellSuspendCounter++,ua=Pr=null,ot=u,$.H=m,$.A=y,Ve===null&&(wt=null,Je=0,Kc()),k}function a_(){for(;Ve!==null;)gx(Ve)}function r_(i,r){var l=ot;ot|=2;var u=px(),m=mx();wt!==i||Je!==r?(Eu=null,ku=Lt()+500,Ws(i,r)):Qs=se(i,r);e:do try{if(pt!==0&&Ve!==null){r=Ve;var y=ti;t:switch(pt){case 1:pt=0,ti=null,Xs(i,r,y,1);break;case 2:case 9:if(Nb(y)){pt=0,ti=null,bx(r);break}r=function(){pt!==2&&pt!==9||wt!==i||(pt=7),Qi(i)},y.then(r,r);break e;case 3:pt=7;break e;case 4:pt=5;break e;case 7:Nb(y)?(pt=0,ti=null,bx(r)):(pt=0,ti=null,Xs(i,r,y,7));break;case 5:var k=null;switch(Ve.tag){case 26:k=Ve.memoizedState;case 5:case 27:var N=Ve;if(k?nv(k):N.stateNode.complete){pt=0,ti=null;var L=N.sibling;if(L!==null)Ve=L;else{var G=N.return;G!==null?(Ve=G,Nu(G)):Ve=null}break t}}pt=0,ti=null,Xs(i,r,y,5);break;case 6:pt=0,ti=null,Xs(i,r,y,6);break;case 8:Dh(),qt=6;break e;default:throw Error(a(462))}}s_();break}catch(ie){fx(i,ie)}while(!0);return ua=Pr=null,$.H=u,$.A=m,ot=l,Ve!==null?0:(wt=null,Je=0,Kc(),qt)}function s_(){for(;Ve!==null&&!Ql();)gx(Ve)}function gx(i){var r=Py(i.alternate,i,va);i.memoizedProps=i.pendingProps,r===null?Nu(i):Ve=r}function bx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=Ry(l,r,r.pendingProps,r.type,void 0,Je);break;case 11:r=Ry(l,r,r.pendingProps,r.type.render,r.ref,Je);break;case 5:Yf(r);default:qy(l,r),r=Ve=mb(r,va),r=Py(l,r,va)}i.memoizedProps=i.pendingProps,r===null?Nu(i):Ve=r}function Xs(i,r,l,u){ua=Pr=null,Yf(r),Ps=null,po=0;var m=r.return;try{if(YS(i,m,r,l,Je)){qt=1,hu(i,hi(l,i.current)),Ve=null;return}}catch(y){if(m!==null)throw Ve=m,y;qt=1,hu(i,hi(l,i.current)),Ve=null;return}r.flags&32768?(nt||u===1?i=!0:Qs||(Je&536870912)!==0?i=!1:(Va=i=!0,(u===2||u===9||u===3||u===6)&&(u=Jn.current,u!==null&&u.tag===13&&(u.flags|=16384))),yx(r,i)):Nu(r)}function Nu(i){var r=i;do{if((r.flags&32768)!==0){yx(r,Va);return}i=r.return;var l=XS(r.alternate,r,va);if(l!==null){Ve=l;return}if(r=r.sibling,r!==null){Ve=r;return}Ve=r=i}while(r!==null);qt===0&&(qt=5)}function yx(i,r){do{var l=ZS(i.alternate,i);if(l!==null){l.flags&=32767,Ve=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Ve=i;return}Ve=i=l}while(i!==null);qt=6,Ve=null}function xx(i,r,l,u,m,y,k,N,L){i.cancelPendingCommit=null;do Cu();while(an!==0);if((ot&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(y=r.lanes|r.childLanes,y|=wf,Se(i,l,y,k,N,L),i===wt&&(Ve=wt=null,Je=0),Vs=r,Za=i,wa=l,Ah=y,jh=m,ox=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,u_(Me,function(){return Sx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=$.T,$.T=null,m=ce.p,ce.p=2,k=ot,ot|=4;try{JS(i,r,l)}finally{ot=k,ce.p=m,$.T=u}}an=1,vx(),wx(),kx()}}function vx(){if(an===1){an=0;var i=Za,r=Vs,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=$.T,$.T=null;var u=ce.p;ce.p=2;var m=ot;ot|=4;try{ex(r,i);var y=Kh,k=sb(i.containerInfo),N=y.focusedElem,L=y.selectionRange;if(k!==N&&N&&N.ownerDocument&&rb(N.ownerDocument.documentElement,N)){if(L!==null&&gf(N)){var G=L.start,ie=L.end;if(ie===void 0&&(ie=G),"selectionStart"in N)N.selectionStart=G,N.selectionEnd=Math.min(ie,N.value.length);else{var oe=N.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var Z=W.getSelection(),Ee=N.textContent.length,Re=Math.min(L.start,Ee),yt=L.end===void 0?Re:Math.min(L.end,Ee);!Z.extend&&Re>yt&&(k=yt,yt=Re,Re=k);var H=ab(N,Re),P=ab(N,yt);if(H&&P&&(Z.rangeCount!==1||Z.anchorNode!==H.node||Z.anchorOffset!==H.offset||Z.focusNode!==P.node||Z.focusOffset!==P.offset)){var K=oe.createRange();K.setStart(H.node,H.offset),Z.removeAllRanges(),Re>yt?(Z.addRange(K),Z.extend(P.node,P.offset)):(K.setEnd(P.node,P.offset),Z.addRange(K))}}}}for(oe=[],Z=N;Z=Z.parentNode;)Z.nodeType===1&&oe.push({element:Z,left:Z.scrollLeft,top:Z.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}}Uu=!!Hh,Kh=Hh=null}finally{ot=m,ce.p=u,$.T=l}}i.current=r,an=2}}function wx(){if(an===2){an=0;var i=Za,r=Vs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=$.T,$.T=null;var u=ce.p;ce.p=2;var m=ot;ot|=4;try{Vy(i,r.alternate,r)}finally{ot=m,ce.p=u,$.T=l}}an=3}}function kx(){if(an===4||an===3){an=0,ys();var i=Za,r=Vs,l=wa,u=ox;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?an=5:(an=0,Vs=Za=null,Ex(i,i.pendingLanes));var m=i.pendingLanes;if(m===0&&(Xa=null),ia(l),r=r.stateNode,Pt&&typeof Pt.onCommitFiberRoot=="function")try{Pt.onCommitFiberRoot(cn,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=$.T,m=ce.p,ce.p=2,$.T=null;try{for(var y=i.onRecoverableError,k=0;k<u.length;k++){var N=u[k];y(N.value,{componentStack:N.stack})}}finally{$.T=r,ce.p=m}}(wa&3)!==0&&Cu(),Qi(i),m=i.pendingLanes,(l&261930)!==0&&(m&42)!==0?i===Oh?Oo++:(Oo=0,Oh=i):Oo=0,Do(0)}}function Ex(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,fo(r)))}function Cu(){return vx(),wx(),kx(),Sx()}function Sx(){if(an!==5)return!1;var i=Za,r=Ah;Ah=0;var l=ia(wa),u=$.T,m=ce.p;try{ce.p=32>l?32:l,$.T=null,l=jh,jh=null;var y=Za,k=wa;if(an=0,Vs=Za=null,wa=0,(ot&6)!==0)throw Error(a(331));var N=ot;if(ot|=4,rx(y.current),nx(y,y.current,k,l),ot=N,Do(0,!1),Pt&&typeof Pt.onPostCommitFiberRoot=="function")try{Pt.onPostCommitFiberRoot(cn,y)}catch{}return!0}finally{ce.p=m,$.T=u,Ex(i,r)}}function _x(i,r,l){r=hi(l,r),r=ch(i.stateNode,r,2),i=Ka(i,r,2),i!==null&&(vt(i,2),Qi(i))}function mt(i,r,l){if(i.tag===3)_x(i,i,l);else for(;r!==null;){if(r.tag===3){_x(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=hi(l,i),l=Ny(2),u=Ka(r,l,2),u!==null&&(Cy(l,u,r,i),vt(u,2),Qi(u));break}}r=r.return}}function Rh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new n_;var m=new Set;u.set(r,m)}else m=u.get(r),m===void 0&&(m=new Set,u.set(r,m));m.has(l)||(Nh=!0,m.add(l),i=l_.bind(null,i,r,l),r.then(i,i))}function l_(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,wt===i&&(Je&l)===l&&(qt===4||qt===3&&(Je&62914560)===Je&&300>Lt()-wu?(ot&2)===0&&Ws(i,0):Ch|=l,Ys===Je&&(Ys=0)),Qi(i)}function Nx(i,r){r===0&&(r=ze()),i=zr(i,r),i!==null&&(vt(i,r),Qi(i))}function o_(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),Nx(i,l)}function c_(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,m=i.memoizedState;m!==null&&(l=m.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),Nx(i,l)}function u_(i,r){return na(i,r)}var Tu=null,Zs=null,Lh=!1,Au=!1,Ih=!1,er=0;function Qi(i){i!==Zs&&i.next===null&&(Zs===null?Tu=Zs=i:Zs=Zs.next=i),Au=!0,Lh||(Lh=!0,f_())}function Do(i,r){if(!Ih&&Au){Ih=!0;do for(var l=!1,u=Tu;u!==null;){if(i!==0){var m=u.pendingLanes;if(m===0)var y=0;else{var k=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-dt(42|i)+1)-1,y&=m&~(k&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(l=!0,jx(u,y))}else y=Je,y=z(u,u===wt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||se(u,y)||(l=!0,jx(u,y));u=u.next}while(l);Ih=!1}}function d_(){Cx()}function Cx(){Au=Lh=!1;var i=0;er!==0&&k_()&&(i=er);for(var r=Lt(),l=null,u=Tu;u!==null;){var m=u.next,y=Tx(u,r);y===0?(u.next=null,l===null?Tu=m:l.next=m,m===null&&(Zs=l)):(l=u,(i!==0||(y&3)!==0)&&(Au=!0)),u=m}an!==0&&an!==5||Do(i),er!==0&&(er=0)}function Tx(i,r){for(var l=i.suspendedLanes,u=i.pingedLanes,m=i.expirationTimes,y=i.pendingLanes&-62914561;0<y;){var k=31-dt(y),N=1<<k,L=m[k];L===-1?((N&l)===0||(N&u)!==0)&&(m[k]=ve(N,r)):L<=r&&(i.expiredLanes|=N),y&=~N}if(r=wt,l=Je,l=z(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(pt===2||pt===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),ia(l)){case 2:case 8:l=me;break;case 32:l=Me;break;case 268435456:l=rt;break;default:l=Me}return u=Ax.bind(null,i),l=na(l,u),i.callbackPriority=r,i.callbackNode=l,r}return u!==null&&u!==null&&Tr(u),i.callbackPriority=2,i.callbackNode=null,2}function Ax(i,r){if(an!==0&&an!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Cu()&&i.callbackNode!==l)return null;var u=Je;return u=z(i,i===wt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ux(i,u,r),Tx(i,Lt()),i.callbackNode!=null&&i.callbackNode===l?Ax.bind(null,i):null)}function jx(i,r){if(Cu())return null;ux(i,r,!0)}function f_(){S_(function(){(ot&6)!==0?na(ne,d_):Cx()})}function zh(){if(er===0){var i=zs;i===0&&(i=Ar,Ar<<=1,(Ar&261888)===0&&(Ar=256)),er=i}return er}function Ox(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:za(""+i)}function Dx(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 h_(i,r,l,u,m){if(r==="submit"&&l&&l.stateNode===m){var y=Ox((m[gn]||null).action),k=u.submitter;k&&(r=(r=k[gn]||null)?Ox(r.formAction):k.getAttribute("formAction"),r!==null&&(y=r,k=null));var N=new Fc("action","action",null,u,m);i.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(er!==0){var L=k?Dx(m,k):new FormData(m);ih(l,{pending:!0,data:L,method:m.method,action:y},null,L)}}else typeof y=="function"&&(N.preventDefault(),L=k?Dx(m,k):new FormData(m),ih(l,{pending:!0,data:L,method:m.method,action:y},y,L))},currentTarget:m}]})}}for(var Bh=0;Bh<vf.length;Bh++){var Uh=vf[Bh],p_=Uh.toLowerCase(),m_=Uh[0].toUpperCase()+Uh.slice(1);ji(p_,"on"+m_)}ji(cb,"onAnimationEnd"),ji(ub,"onAnimationIteration"),ji(db,"onAnimationStart"),ji("dblclick","onDoubleClick"),ji("focusin","onFocus"),ji("focusout","onBlur"),ji(OS,"onTransitionRun"),ji(DS,"onTransitionStart"),ji(MS,"onTransitionCancel"),ji(fb,"onTransitionEnd"),fe("onMouseEnter",["mouseout","mouseover"]),fe("onMouseLeave",["mouseout","mouseover"]),fe("onPointerEnter",["pointerout","pointerover"]),fe("onPointerLeave",["pointerout","pointerover"]),ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ra("onBeforeInput",["compositionend","keypress","textInput","paste"]),ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ra("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(" "),g_=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function Mx(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var u=i[l],m=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var k=u.length-1;0<=k;k--){var N=u[k],L=N.instance,G=N.currentTarget;if(N=N.listener,L!==y&&m.isPropagationStopped())break e;y=N,m.currentTarget=G;try{y(m)}catch(ie){Hc(ie)}m.currentTarget=null,y=L}else for(k=0;k<u.length;k++){if(N=u[k],L=N.instance,G=N.currentTarget,N=N.listener,L!==y&&m.isPropagationStopped())break e;y=N,m.currentTarget=G;try{y(m)}catch(ie){Hc(ie)}m.currentTarget=null,y=L}}}}function We(i,r){var l=r[Yl];l===void 0&&(l=r[Yl]=new Set);var u=i+"__bubble";l.has(u)||(Rx(r,i,2,!1),l.add(u))}function Ph(i,r,l){var u=0;r&&(u|=4),Rx(l,i,u,r)}var ju="_reactListening"+Math.random().toString(36).slice(2);function Fh(i){if(!i[ju]){i[ju]=!0,Mc.forEach(function(l){l!=="selectionchange"&&(g_.has(l)||Ph(l,!1,i),Ph(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[ju]||(r[ju]=!0,Ph("selectionchange",!1,r))}}function Rx(i,r,l,u){switch(cv(r)){case 2:var m=H_;break;case 8:m=K_;break;default:m=np}l=m.bind(null,r,l,i),m=void 0,!lf||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(m=!0),u?m!==void 0?i.addEventListener(r,l,{capture:!0,passive:m}):i.addEventListener(r,l,!0):m!==void 0?i.addEventListener(r,l,{passive:m}):i.addEventListener(r,l,!1)}function qh(i,r,l,u,m){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var k=u.tag;if(k===3||k===4){var N=u.stateNode.containerInfo;if(N===m)break;if(k===4)for(k=u.return;k!==null;){var L=k.tag;if((L===3||L===4)&&k.stateNode.containerInfo===m)return;k=k.return}for(;N!==null;){if(k=_n(N),k===null)return;if(L=k.tag,L===5||L===6||L===26||L===27){u=y=k;continue e}N=N.parentNode}}u=u.return}zc(function(){var G=y,ie=qe(l),oe=[];e:{var W=hb.get(i);if(W!==void 0){var Z=Fc,Ee=i;switch(i){case"keypress":if(Uc(l)===0)break e;case"keydown":case"keyup":Z=cS;break;case"focusin":Ee="focus",Z=df;break;case"focusout":Ee="blur",Z=df;break;case"beforeblur":case"afterblur":Z=df;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":Z=qg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=X1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=fS;break;case cb:case ub:case db:Z=eS;break;case fb:Z=pS;break;case"scroll":case"scrollend":Z=V1;break;case"wheel":Z=gS;break;case"copy":case"cut":case"paste":Z=nS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=Hg;break;case"toggle":case"beforetoggle":Z=yS}var Re=(r&4)!==0,yt=!Re&&(i==="scroll"||i==="scrollend"),H=Re?W!==null?W+"Capture":null:W;Re=[];for(var P=G,K;P!==null;){var le=P;if(K=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||K===null||H===null||(le=eo(P,H),le!=null&&Re.push(Ro(P,le,K))),yt)break;P=P.return}0<Re.length&&(W=new Z(W,Ee,null,l,ie),oe.push({event:W,listeners:Re}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",Z=i==="mouseout"||i==="pointerout",W&&l!==Ne&&(Ee=l.relatedTarget||l.fromElement)&&(_n(Ee)||Ee[Ma]))break e;if((Z||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,Z?(Ee=l.relatedTarget||l.toElement,Z=G,Ee=Ee?_n(Ee):null,Ee!==null&&(yt=o(Ee),Re=Ee.tag,Ee!==yt||Re!==5&&Re!==27&&Re!==6)&&(Ee=null)):(Z=null,Ee=G),Z!==Ee)){if(Re=qg,le="onMouseLeave",H="onMouseEnter",P="mouse",(i==="pointerout"||i==="pointerover")&&(Re=Hg,le="onPointerLeave",H="onPointerEnter",P="pointer"),yt=Z==null?W:Ra(Z),K=Ee==null?W:Ra(Ee),W=new Re(le,P+"leave",Z,l,ie),W.target=yt,W.relatedTarget=K,le=null,_n(ie)===G&&(Re=new Re(H,P+"enter",Ee,l,ie),Re.target=K,Re.relatedTarget=yt,le=Re),yt=le,Z&&Ee)t:{for(Re=b_,H=Z,P=Ee,K=0,le=H;le;le=Re(le))K++;le=0;for(var Oe=P;Oe;Oe=Re(Oe))le++;for(;0<K-le;)H=Re(H),K--;for(;0<le-K;)P=Re(P),le--;for(;K--;){if(H===P||P!==null&&H===P.alternate){Re=H;break t}H=Re(H),P=Re(P)}Re=null}else Re=null;Z!==null&&Lx(oe,W,Z,Re,!1),Ee!==null&&yt!==null&&Lx(oe,yt,Ee,Re,!0)}}e:{if(W=G?Ra(G):window,Z=W.nodeName&&W.nodeName.toLowerCase(),Z==="select"||Z==="input"&&W.type==="file")var st=Zg;else if(Wg(W))if(Jg)st=TS;else{st=NS;var Ce=_S}else Z=W.nodeName,!Z||Z.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?G&&Ia(G.elementType)&&(st=Zg):st=CS;if(st&&(st=st(i,G))){Xg(oe,st,l,ie);break e}Ce&&Ce(i,W,G),i==="focusout"&&G&&W.type==="number"&&G.memoizedProps.value!=null&&Ns(W,"number",W.value)}switch(Ce=G?Ra(G):window,i){case"focusin":(Wg(Ce)||Ce.contentEditable==="true")&&(As=Ce,bf=G,oo=null);break;case"focusout":oo=bf=As=null;break;case"mousedown":yf=!0;break;case"contextmenu":case"mouseup":case"dragend":yf=!1,lb(oe,l,ie);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":lb(oe,l,ie)}var He;if(hf)e:{switch(i){case"compositionstart":var et="onCompositionStart";break e;case"compositionend":et="onCompositionEnd";break e;case"compositionupdate":et="onCompositionUpdate";break e}et=void 0}else Ts?Yg(i,l)&&(et="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(et="onCompositionStart");et&&(Kg&&l.locale!=="ko"&&(Ts||et!=="onCompositionStart"?et==="onCompositionEnd"&&Ts&&(He=Pg()):(Ba=ie,of="value"in Ba?Ba.value:Ba.textContent,Ts=!0)),Ce=Ou(G,et),0<Ce.length&&(et=new $g(et,i,null,l,ie),oe.push({event:et,listeners:Ce}),He?et.data=He:(He=Vg(l),He!==null&&(et.data=He)))),(He=vS?wS(i,l):kS(i,l))&&(et=Ou(G,"onBeforeInput"),0<et.length&&(Ce=new $g("onBeforeInput","beforeinput",null,l,ie),oe.push({event:Ce,listeners:et}),Ce.data=He)),h_(oe,i,G,l,ie)}Mx(oe,r)})}function Ro(i,r,l){return{instance:i,listener:r,currentTarget:l}}function Ou(i,r){for(var l=r+"Capture",u=[];i!==null;){var m=i,y=m.stateNode;if(m=m.tag,m!==5&&m!==26&&m!==27||y===null||(m=eo(i,l),m!=null&&u.unshift(Ro(i,m,y)),m=eo(i,r),m!=null&&u.push(Ro(i,m,y))),i.tag===3)return u;i=i.return}return[]}function b_(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Lx(i,r,l,u,m){for(var y=r._reactName,k=[];l!==null&&l!==u;){var N=l,L=N.alternate,G=N.stateNode;if(N=N.tag,L!==null&&L===u)break;N!==5&&N!==26&&N!==27||G===null||(L=G,m?(G=eo(l,y),G!=null&&k.unshift(Ro(l,G,L))):m||(G=eo(l,y),G!=null&&k.push(Ro(l,G,L)))),l=l.return}k.length!==0&&i.push({event:r,listeners:k})}var y_=/\r\n?/g,x_=/\u0000|\uFFFD/g;function Ix(i){return(typeof i=="string"?i:""+i).replace(y_,`
49
+ `).replace(x_,"")}function zx(i,r){return r=Ix(r),Ix(i)===r}function bt(i,r,l,u,m,y){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||Le(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&Le(i,""+u);break;case"className":Vn(i,"class",u);break;case"tabIndex":Vn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Vn(i,l,u);break;case"style":ht(i,u,y);break;case"data":if(r!=="object"){Vn(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=za(""+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"&&bt(i,r,"name",m.name,m,null),bt(i,r,"formEncType",m.formEncType,m,null),bt(i,r,"formMethod",m.formMethod,m,null),bt(i,r,"formTarget",m.formTarget,m,null)):(bt(i,r,"encType",m.encType,m,null),bt(i,r,"method",m.method,m,null),bt(i,r,"target",m.target,m,null)));if(u==null||typeof u=="symbol"||typeof u=="boolean"){i.removeAttribute(l);break}u=za(""+u),i.setAttribute(l,u);break;case"onClick":u!=null&&(i.onclick=be);break;case"onScroll":u!=null&&We("scroll",i);break;case"onScrollEnd":u!=null&&We("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(m.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=za(""+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":We("beforetoggle",i),We("toggle",i),bn(i,"popover",u);break;case"xlinkActuate":Mn(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":Mn(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":Mn(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":Mn(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":Mn(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":Mn(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":Mn(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":Mn(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":Mn(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":bn(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=sa.get(l)||l,bn(i,l,u))}}function $h(i,r,l,u,m,y){switch(l){case"style":ht(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(m.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"children":typeof u=="string"?Le(i,u):(typeof u=="number"||typeof u=="bigint")&&Le(i,""+u);break;case"onScroll":u!=null&&We("scroll",i);break;case"onScrollEnd":u!=null&&We("scrollend",i);break;case"onClick":u!=null&&(i.onclick=be);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Dr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(m=l.endsWith("Capture"),r=l.slice(2,m?l.length-7:void 0),y=i[gn]||null,y=y!=null?y[l]:null,typeof y=="function"&&i.removeEventListener(r,y,m),typeof u=="function")){typeof y!="function"&&y!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,m);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):bn(i,l,u)}}}function pn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":We("error",i),We("load",i);var u=!1,m=!1,y;for(y in l)if(l.hasOwnProperty(y)){var k=l[y];if(k!=null)switch(y){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:bt(i,r,y,k,l,null)}}m&&bt(i,r,"srcSet",l.srcSet,l,null),u&&bt(i,r,"src",l.src,l,null);return;case"input":We("invalid",i);var N=y=k=m=null,L=null,G=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":m=ie;break;case"type":k=ie;break;case"checked":L=ie;break;case"defaultChecked":G=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:bt(i,r,u,ie,l,null)}}Mr(i,y,N,L,G,k,m,!1);return;case"select":We("invalid",i),u=k=y=null;for(m in l)if(l.hasOwnProperty(m)&&(N=l[m],N!=null))switch(m){case"value":y=N;break;case"defaultValue":k=N;break;case"multiple":u=N;default:bt(i,r,m,N,l,null)}r=y,l=k,i.multiple=!!u,r!=null?un(i,!!u,r,!1):l!=null&&un(i,!!u,l,!0);return;case"textarea":We("invalid",i),y=m=u=null;for(k in l)if(l.hasOwnProperty(k)&&(N=l[k],N!=null))switch(k){case"value":u=N;break;case"defaultValue":m=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:bt(i,r,k,N,l,null)}Cs(i,u,m,y);return;case"option":for(L in l)if(l.hasOwnProperty(L)&&(u=l[L],u!=null))switch(L){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:bt(i,r,L,u,l,null)}return;case"dialog":We("beforetoggle",i),We("toggle",i),We("cancel",i),We("close",i);break;case"iframe":case"object":We("load",i);break;case"video":case"audio":for(u=0;u<Mo.length;u++)We(Mo[u],i);break;case"image":We("error",i),We("load",i);break;case"details":We("toggle",i);break;case"embed":case"source":case"link":We("error",i),We("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(G in l)if(l.hasOwnProperty(G)&&(u=l[G],u!=null))switch(G){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:bt(i,r,G,u,l,null)}return;default:if(Ia(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&&bt(i,r,N,u,l,null))}function v_(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 m=null,y=null,k=null,N=null,L=null,G=null,ie=null;for(Z in l){var oe=l[Z];if(l.hasOwnProperty(Z)&&oe!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":L=oe;default:u.hasOwnProperty(Z)||bt(i,r,Z,null,u,oe)}}for(var W in u){var Z=u[W];if(oe=l[W],u.hasOwnProperty(W)&&(Z!=null||oe!=null))switch(W){case"type":y=Z;break;case"name":m=Z;break;case"checked":G=Z;break;case"defaultChecked":ie=Z;break;case"value":k=Z;break;case"defaultValue":N=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,r));break;default:Z!==oe&&bt(i,r,W,Z,u,oe)}}Xl(i,k,N,L,G,ie,y,m);return;case"select":Z=k=N=W=null;for(y in l)if(L=l[y],l.hasOwnProperty(y)&&L!=null)switch(y){case"value":break;case"multiple":Z=L;default:u.hasOwnProperty(y)||bt(i,r,y,null,u,L)}for(m in u)if(y=u[m],L=l[m],u.hasOwnProperty(m)&&(y!=null||L!=null))switch(m){case"value":W=y;break;case"defaultValue":N=y;break;case"multiple":k=y;default:y!==L&&bt(i,r,m,y,u,L)}r=N,l=k,u=Z,W!=null?un(i,!!l,W,!1):!!u!=!!l&&(r!=null?un(i,!!l,r,!0):un(i,!!l,l?[]:"",!1));return;case"textarea":Z=W=null;for(N in l)if(m=l[N],l.hasOwnProperty(N)&&m!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:bt(i,r,N,null,u,m)}for(k in u)if(m=u[k],y=l[k],u.hasOwnProperty(k)&&(m!=null||y!=null))switch(k){case"value":W=m;break;case"defaultValue":Z=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==y&&bt(i,r,k,m,u,y)}Lc(i,W,Z);return;case"option":for(var Ee in l)if(W=l[Ee],l.hasOwnProperty(Ee)&&W!=null&&!u.hasOwnProperty(Ee))switch(Ee){case"selected":i.selected=!1;break;default:bt(i,r,Ee,null,u,W)}for(L in u)if(W=u[L],Z=l[L],u.hasOwnProperty(L)&&W!==Z&&(W!=null||Z!=null))switch(L){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:bt(i,r,L,W,u,Z)}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 Re in l)W=l[Re],l.hasOwnProperty(Re)&&W!=null&&!u.hasOwnProperty(Re)&&bt(i,r,Re,null,u,W);for(G in u)if(W=u[G],Z=l[G],u.hasOwnProperty(G)&&W!==Z&&(W!=null||Z!=null))switch(G){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:bt(i,r,G,W,u,Z)}return;default:if(Ia(r)){for(var yt in l)W=l[yt],l.hasOwnProperty(yt)&&W!==void 0&&!u.hasOwnProperty(yt)&&$h(i,r,yt,void 0,u,W);for(ie in u)W=u[ie],Z=l[ie],!u.hasOwnProperty(ie)||W===Z||W===void 0&&Z===void 0||$h(i,r,ie,W,u,Z);return}}for(var H in l)W=l[H],l.hasOwnProperty(H)&&W!=null&&!u.hasOwnProperty(H)&&bt(i,r,H,null,u,W);for(oe in u)W=u[oe],Z=l[oe],!u.hasOwnProperty(oe)||W===Z||W==null&&Z==null||bt(i,r,oe,W,u,Z)}function Bx(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function w_(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var m=l[u],y=m.transferSize,k=m.initiatorType,N=m.duration;if(y&&N&&Bx(k)){for(k=0,N=m.responseEnd,u+=1;u<l.length;u++){var L=l[u],G=L.startTime;if(G>N)break;var ie=L.transferSize,oe=L.initiatorType;ie&&Bx(oe)&&(L=L.responseEnd,k+=ie*(L<N?1:(N-G)/(L-G)))}if(--u,r+=8*(y+k)/(m.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 Hh=null,Kh=null;function Du(i){return i.nodeType===9?i:i.ownerDocument}function Ux(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 Px(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 Gh(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 Qh=null;function k_(){var i=window.event;return i&&i.type==="popstate"?i===Qh?!1:(Qh=i,!0):(Qh=null,!1)}var Fx=typeof setTimeout=="function"?setTimeout:void 0,E_=typeof clearTimeout=="function"?clearTimeout:void 0,qx=typeof Promise=="function"?Promise:void 0,S_=typeof queueMicrotask=="function"?queueMicrotask:typeof qx<"u"?function(i){return qx.resolve(null).then(i).catch(__)}:Fx;function __(i){setTimeout(function(){throw i})}function tr(i){return i==="head"}function $x(i,r){var l=r,u=0;do{var m=l.nextSibling;if(i.removeChild(l),m&&m.nodeType===8)if(l=m.data,l==="/$"||l==="/&"){if(u===0){i.removeChild(m),nl(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Lo(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Lo(l);for(var y=l.firstChild;y;){var k=y.nextSibling,N=y.nodeName;y[Or]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=k}}else l==="body"&&Lo(i.ownerDocument.body);l=m}while(l);nl(r)}function Hx(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 Yh(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":Yh(l),Vl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function N_(i,r,l,u){for(;i.nodeType===1;){var m=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!==m.rel||i.getAttribute("href")!==(m.href==null||m.href===""?null:m.href)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin)||i.getAttribute("title")!==(m.title==null?null:m.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(y=i.getAttribute("src"),(y!==(m.src==null?null:m.src)||i.getAttribute("type")!==(m.type==null?null:m.type)||i.getAttribute("crossorigin")!==(m.crossOrigin==null?null:m.crossOrigin))&&y&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var y=m.name==null?null:""+m.name;if(m.type==="hidden"&&i.getAttribute("name")===y)return i}else return i;if(i=yi(i.nextSibling),i===null)break}return null}function C_(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=yi(i.nextSibling),i===null))return null;return i}function Kx(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=yi(i.nextSibling),i===null))return null;return i}function Vh(i){return i.data==="$?"||i.data==="$~"}function Wh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function T_(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 yi(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 Xh=null;function Gx(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return yi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Qx(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 Yx(i,r,l){switch(r=Du(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 Lo(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Vl(i)}var xi=new Map,Vx=new Set;function Mu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var ka=ce.d;ce.d={f:A_,r:j_,D:O_,C:D_,L:M_,m:R_,X:I_,S:L_,M:z_};function A_(){var i=ka.f(),r=Su();return i||r}function j_(i){var r=aa(i);r!==null&&r.tag===5&&r.type==="form"?fy(r):ka.r(i)}var Js=typeof document>"u"?null:document;function Wx(i,r,l){var u=Js;if(u&&typeof r=="string"&&r){var m=Rn(r);m='link[rel="'+i+'"][href="'+m+'"]',typeof l=="string"&&(m+='[crossorigin="'+l+'"]'),Vx.has(m)||(Vx.add(m),i={rel:i,crossOrigin:l,href:r},u.querySelector(m)===null&&(r=u.createElement("link"),pn(r,"link",i),Wt(r),u.head.appendChild(r)))}}function O_(i){ka.D(i),Wx("dns-prefetch",i,null)}function D_(i,r){ka.C(i,r),Wx("preconnect",i,r)}function M_(i,r,l){ka.L(i,r,l);var u=Js;if(u&&i&&r){var m='link[rel="preload"][as="'+Rn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+Rn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+Rn(l.imageSizes)+'"]')):m+='[href="'+Rn(i)+'"]';var y=m;switch(r){case"style":y=el(i);break;case"script":y=tl(i)}xi.has(y)||(i=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),xi.set(y,i),u.querySelector(m)!==null||r==="style"&&u.querySelector(Io(y))||r==="script"&&u.querySelector(zo(y))||(r=u.createElement("link"),pn(r,"link",i),Wt(r),u.head.appendChild(r)))}}function R_(i,r){ka.m(i,r);var l=Js;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",m='link[rel="modulepreload"][as="'+Rn(u)+'"][href="'+Rn(i)+'"]',y=m;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=tl(i)}if(!xi.has(y)&&(i=g({rel:"modulepreload",href:i},r),xi.set(y,i),l.querySelector(m)===null)){switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(zo(y)))return}u=l.createElement("link"),pn(u,"link",i),Wt(u),l.head.appendChild(u)}}}function L_(i,r,l){ka.S(i,r,l);var u=Js;if(u&&i){var m=La(u).hoistableStyles,y=el(i);r=r||"default";var k=m.get(y);if(!k){var N={loading:0,preload:null};if(k=u.querySelector(Io(y)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=xi.get(y))&&Zh(i,l);var L=k=u.createElement("link");Wt(L),pn(L,"link",i),L._p=new Promise(function(G,ie){L.onload=G,L.onerror=ie}),L.addEventListener("load",function(){N.loading|=1}),L.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Ru(k,r,u)}k={type:"stylesheet",instance:k,count:1,state:N},m.set(y,k)}}}function I_(i,r){ka.X(i,r);var l=Js;if(l&&i){var u=La(l).hoistableScripts,m=tl(i),y=u.get(m);y||(y=l.querySelector(zo(m)),y||(i=g({src:i,async:!0},r),(r=xi.get(m))&&Jh(i,r),y=l.createElement("script"),Wt(y),pn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function z_(i,r){ka.M(i,r);var l=Js;if(l&&i){var u=La(l).hoistableScripts,m=tl(i),y=u.get(m);y||(y=l.querySelector(zo(m)),y||(i=g({src:i,async:!0,type:"module"},r),(r=xi.get(m))&&Jh(i,r),y=l.createElement("script"),Wt(y),pn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function Xx(i,r,l,u){var m=(m=Y.current)?Mu(m):null;if(!m)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=el(l.href),l=La(m).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=el(l.href);var y=La(m).hoistableStyles,k=y.get(i);if(k||(m=m.ownerDocument||m,k={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(i,k),(y=m.querySelector(Io(i)))&&!y._p&&(k.instance=y,k.state.loading=5),xi.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},xi.set(i,l),y||B_(m,i,l,k.state))),r&&u===null)throw Error(a(528,""));return k}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=tl(l),l=La(m).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 el(i){return'href="'+Rn(i)+'"'}function Io(i){return'link[rel="stylesheet"]['+i+"]"}function Zx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function B_(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}),pn(r,"link",l),Wt(r),i.head.appendChild(r))}function tl(i){return'[src="'+Rn(i)+'"]'}function zo(i){return"script[async]"+i}function Jx(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+Rn(l.href)+'"]');if(u)return r.instance=u,Wt(u),u;var m=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Wt(u),pn(u,"style",m),Ru(u,l.precedence,i),r.instance=u;case"stylesheet":m=el(l.href);var y=i.querySelector(Io(m));if(y)return r.state.loading|=4,r.instance=y,Wt(y),y;u=Zx(l),(m=xi.get(m))&&Zh(u,m),y=(i.ownerDocument||i).createElement("link"),Wt(y);var k=y;return k._p=new Promise(function(N,L){k.onload=N,k.onerror=L}),pn(y,"link",u),r.state.loading|=4,Ru(y,l.precedence,i),r.instance=y;case"script":return y=tl(l.src),(m=i.querySelector(zo(y)))?(r.instance=m,Wt(m),m):(u=l,(m=xi.get(y))&&(u=g({},l),Jh(u,m)),i=i.ownerDocument||i,m=i.createElement("script"),Wt(m),pn(m,"link",u),i.head.appendChild(m),r.instance=m);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]'),m=u.length?u[u.length-1]:null,y=m,k=0;k<u.length;k++){var N=u[k];if(N.dataset.precedence===r)y=N;else if(y!==m)break}y?y.parentNode.insertBefore(i,y.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function Zh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Jh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Lu=null;function ev(i,r,l){if(Lu===null){var u=new Map,m=Lu=new Map;m.set(l,u)}else m=Lu,u=m.get(l),u||(u=new Map,m.set(l,u));if(u.has(i))return u;for(u.set(i,null),l=l.getElementsByTagName(i),m=0;m<l.length;m++){var y=l[m];if(!(y[Or]||y[Gt]||i==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var k=y.getAttribute(r)||"";k=i+k;var N=u.get(k);N?N.push(y):u.set(k,[y])}}return u}function tv(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function U_(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 nv(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function P_(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 m=el(u.href),y=r.querySelector(Io(m));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Iu.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=y,Wt(y);return}y=r.ownerDocument||r,u=Zx(u),(m=xi.get(m))&&Zh(u,m),y=y.createElement("link"),Wt(y);var k=y;k._p=new Promise(function(N,L){k.onload=N,k.onerror=L}),pn(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=Iu.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var ep=0;function F_(i,r){return i.stylesheets&&i.count===0&&Bu(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var u=setTimeout(function(){if(i.stylesheets&&Bu(i,i.stylesheets),i.unsuspend){var y=i.unsuspend;i.unsuspend=null,y()}},6e4+r);0<i.imgBytes&&ep===0&&(ep=62500*w_());var m=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Bu(i,i.stylesheets),i.unsuspend)){var y=i.unsuspend;i.unsuspend=null,y()}},(i.imgBytes>ep?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(m)}}:null}function Iu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Bu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zu=null;function Bu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zu=new Map,r.forEach(q_,i),zu=null,Iu.call(i))}function q_(i,r){if(!(r.state.loading&4)){var l=zu.get(i);if(l)var u=l.get(null);else{l=new Map,zu.set(i,l);for(var m=i.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<m.length;y++){var k=m[y];(k.nodeName==="LINK"||k.getAttribute("media")!=="not all")&&(l.set(k.dataset.precedence,k),u=k)}u&&l.set(null,u)}m=r.instance,k=m.getAttribute("data-precedence"),y=l.get(k)||u,y===u&&l.set(null,m),l.set(k,m),this.count++,u=Iu.bind(this),m.addEventListener("load",u),m.addEventListener("error",u),y?y.parentNode.insertBefore(m,y.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(m,i.firstChild)),r.state.loading|=4}}var Bo={$$typeof:T,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function $_(i,r,l,u,m,y,k,N,L){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=Ct(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ct(0),this.hiddenUpdates=Ct(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=k,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=L,this.incompleteTransitions=new Map}function iv(i,r,l,u,m,y,k,N,L,G,ie,oe){return i=new $_(i,r,l,k,L,G,ie,oe,N),r=1,y===!0&&(r|=24),y=Zn(3,null,null,r),i.current=y,y.stateNode=i,r=Mf(),r.refCount++,i.pooledCache=r,r.refCount++,y.memoizedState={element:u,isDehydrated:l,cache:r},zf(y),i}function av(i){return i?(i=Ds,i):Ds}function rv(i,r,l,u,m,y){m=av(m),u.context===null?u.context=m:u.pendingContext=m,u=Ha(r),u.payload={element:l},y=y===void 0?null:y,y!==null&&(u.callback=y),l=Ka(i,u,r),l!==null&&(Pn(l,i,r),go(l,i,r))}function sv(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function tp(i,r){sv(i,r),(i=i.alternate)&&sv(i,r)}function lv(i){if(i.tag===13||i.tag===31){var r=zr(i,67108864);r!==null&&Pn(r,i,67108864),tp(i,67108864)}}function ov(i){if(i.tag===13||i.tag===31){var r=ii();r=Ot(r);var l=zr(i,r);l!==null&&Pn(l,i,r),tp(i,r)}}var Uu=!0;function H_(i,r,l,u){var m=$.T;$.T=null;var y=ce.p;try{ce.p=2,np(i,r,l,u)}finally{ce.p=y,$.T=m}}function K_(i,r,l,u){var m=$.T;$.T=null;var y=ce.p;try{ce.p=8,np(i,r,l,u)}finally{ce.p=y,$.T=m}}function np(i,r,l,u){if(Uu){var m=ip(u);if(m===null)qh(i,r,u,Pu,l),uv(i,u);else if(Q_(m,i,r,l,u))u.stopPropagation();else if(uv(i,u),r&4&&-1<G_.indexOf(i)){for(;m!==null;){var y=aa(m);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var k=Dn(y.pendingLanes);if(k!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;k;){var L=1<<31-dt(k);N.entanglements[1]|=L,k&=~L}Qi(y),(ot&6)===0&&(ku=Lt()+500,Do(0))}}break;case 31:case 13:N=zr(y,2),N!==null&&Pn(N,y,2),Su(),tp(y,2)}if(y=ip(u),y===null&&qh(i,r,u,Pu,l),y===m)break;m=y}m!==null&&u.stopPropagation()}else qh(i,r,u,null,l)}}function ip(i){return i=qe(i),ap(i)}var Pu=null;function ap(i){if(Pu=null,i=_n(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=d(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 Pu=i,null}function cv(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(xs()){case ne:return 2;case me:return 8;case Me:case Qe:return 32;case rt:return 268435456;default:return 32}default:return 32}}var rp=!1,nr=null,ir=null,ar=null,Uo=new Map,Po=new Map,rr=[],G_="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 uv(i,r){switch(i){case"focusin":case"focusout":nr=null;break;case"dragenter":case"dragleave":ir=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":Uo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Po.delete(r.pointerId)}}function Fo(i,r,l,u,m,y){return i===null||i.nativeEvent!==y?(i={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:y,targetContainers:[m]},r!==null&&(r=aa(r),r!==null&&lv(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,m!==null&&r.indexOf(m)===-1&&r.push(m),i)}function Q_(i,r,l,u,m){switch(r){case"focusin":return nr=Fo(nr,i,r,l,u,m),!0;case"dragenter":return ir=Fo(ir,i,r,l,u,m),!0;case"mouseover":return ar=Fo(ar,i,r,l,u,m),!0;case"pointerover":var y=m.pointerId;return Uo.set(y,Fo(Uo.get(y)||null,i,r,l,u,m)),!0;case"gotpointercapture":return y=m.pointerId,Po.set(y,Fo(Po.get(y)||null,i,r,l,u,m)),!0}return!1}function dv(i){var r=_n(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,ks(i.priority,function(){ov(l)});return}}else if(r===31){if(r=d(l),r!==null){i.blockedOn=r,ks(i.priority,function(){ov(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 Fu(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=ip(i.nativeEvent);if(l===null){l=i.nativeEvent;var u=new l.constructor(l.type,l);Ne=u,l.target.dispatchEvent(u),Ne=null}else return r=aa(l),r!==null&&lv(r),i.blockedOn=l,!1;r.shift()}return!0}function fv(i,r,l){Fu(i)&&l.delete(r)}function Y_(){rp=!1,nr!==null&&Fu(nr)&&(nr=null),ir!==null&&Fu(ir)&&(ir=null),ar!==null&&Fu(ar)&&(ar=null),Uo.forEach(fv),Po.forEach(fv)}function qu(i,r){i.blockedOn===r&&(i.blockedOn=null,rp||(rp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Y_)))}var $u=null;function hv(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],m=i[r+2];if(typeof u!="function"){if(ap(u||l)===null)continue;break}var y=aa(l);y!==null&&(i.splice(r,3),r-=3,ih(y,{pending:!0,data:m,method:l.method,action:u},u,m))}}))}function nl(i){function r(L){return qu(L,i)}nr!==null&&qu(nr,i),ir!==null&&qu(ir,i),ar!==null&&qu(ar,i),Uo.forEach(r),Po.forEach(r);for(var l=0;l<rr.length;l++){var u=rr[l];u.blockedOn===i&&(u.blockedOn=null)}for(;0<rr.length&&(l=rr[0],l.blockedOn===null);)dv(l),l.blockedOn===null&&rr.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var m=l[u],y=l[u+1],k=m[gn]||null;if(typeof y=="function")k||hv(l);else if(k){var N=null;if(y&&y.hasAttribute("formAction")){if(m=y,k=y[gn]||null)N=k.formAction;else if(ap(m)!==null)continue}else N=k.action;typeof N=="function"?l[u+1]=N:(l.splice(u,3),u-=3),hv(l)}}}function pv(){function i(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(k){return m=k})},focusReset:"manual",scroll:"manual"})}function r(){m!==null&&(m(),m=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,m=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),m!==null&&(m(),m=null)}}}function sp(i){this._internalRoot=i}Hu.prototype.render=sp.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ii();rv(l,u,i,r,null,null)},Hu.prototype.unmount=sp.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;rv(i.current,2,null,i,null,null),Su(),r[Ma]=null}};function Hu(i){this._internalRoot=i}Hu.prototype.unstable_scheduleHydration=function(i){if(i){var r=ws();i={blockedOn:null,target:i,priority:r};for(var l=0;l<rr.length&&r!==0&&r<rr[l].priority;l++);rr.splice(l,0,i),l===0&&dv(i)}};var mv=t.version;if(mv!=="19.2.5")throw Error(a(527,mv,"19.2.5"));ce.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=p(r),i=i!==null?b(i):null,i=i===null?null:i.stateNode,i};var V_={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:$,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{cn=Ku.inject(V_),Pt=Ku}catch{}}return $o.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",m=ky,y=Ey,k=Sy;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(m=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(k=r.onRecoverableError)),r=iv(i,1,!1,null,null,l,u,null,m,y,k,pv),i[Ma]=r.current,Fh(i),new sp(r)},$o.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,m="",y=ky,k=Ey,N=Sy,L=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(m=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(k=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(L=l.formState)),r=iv(i,1,!0,r,l??null,u,m,L,y,k,N,pv),r.context=av(null),l=r.current,u=ii(),u=Ot(u),m=Ha(u),m.callback=null,Ka(l,m,u),l=u,r.current.lanes=l,vt(r,l),Qi(r),i[Ma]=r.current,Fh(i),new Hu(r)},$o.version="19.2.5",$o}var Cv;function lN(){if(Cv)return up.exports;Cv=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(),up.exports=sN(),up.exports}var oN=lN(),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(){}},ts,fr,bl,f0,cN=(f0=class extends Ml{constructor(){super();je(this,ts);je(this,fr);je(this,bl);we(this,bl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){I(this,fr)||this.setEventListener(I(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,fr))==null||t.call(this),we(this,fr,void 0))}setEventListener(t){var n;we(this,bl,t),(n=I(this,fr))==null||n.call(this),we(this,fr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){I(this,ts)!==t&&(we(this,ts,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof I(this,ts)=="boolean"?I(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,fr=new WeakMap,bl=new WeakMap,f0),zm=new cN,uN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},hr,Rm,h0,dN=(h0=class{constructor(){je(this,hr,uN);je(this,Rm,!1)}setTimeoutProvider(e){we(this,hr,e)}setTimeout(e,t){return I(this,hr).setTimeout(e,t)}clearTimeout(e){I(this,hr).clearTimeout(e)}setInterval(e,t){return I(this,hr).setInterval(e,t)}clearInterval(e){I(this,hr).clearInterval(e)}},hr=new WeakMap,Rm=new WeakMap,h0),Xr=new dN;function fN(e){setTimeout(e,0)}var hN=typeof window>"u"||"Deno"in globalThis;function An(){}function pN(e,t){return typeof e=="function"?e(t):e}function Vp(e){return typeof e=="number"&&e>=0&&e!==1/0}function E0(e,t){return Math.max(e+(t||0)-Date.now(),0)}function wr(e,t){return typeof e=="function"?e(t):e}function wi(e,t){return typeof e=="function"?e(t):e}function Tv(e,t){const{type:n="all",exact:a,fetchStatus:s,predicate:o,queryKey:c,stale:d}=e;if(c){if(a){if(t.queryHash!==Bm(c,t.options))return!1}else if(!ic(t.queryKey,c))return!1}if(n!=="all"){const f=t.isActive();if(n==="active"&&!f||n==="inactive"&&f)return!1}return!(typeof d=="boolean"&&t.isStale()!==d||s&&s!==t.state.fetchStatus||o&&!o(t))}function Av(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(us(t.options.mutationKey)!==us(o))return!1}else if(!ic(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Bm(e,t){return((t==null?void 0:t.queryKeyHashFn)||us)(e)}function us(e){return JSON.stringify(e,(t,n)=>Wp(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function ic(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>ic(e[n],t[n])):!1}var mN=Object.prototype.hasOwnProperty;function S0(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=jv(e)&&jv(t);if(!a&&!(Wp(e)&&Wp(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),d=c.length,f=a?new Array(d):{};let p=0;for(let b=0;b<d;b++){const g=a?b:c[b],v=e[g],x=t[g];if(v===x){f[g]=v,(a?b<o:mN.call(e,g))&&p++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){f[g]=x;continue}const E=S0(v,x,n+1);f[g]=E,E===v&&p++}return o===d&&p===o?e:f}function yd(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 jv(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Wp(e){if(!Ov(e))return!1;const t=e.constructor;if(t===void 0)return!0;const n=t.prototype;return!(!Ov(n)||!n.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function Ov(e){return Object.prototype.toString.call(e)==="[object Object]"}function gN(e){return new Promise(t=>{Xr.setTimeout(t,e)})}function Xp(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?S0(e,t):t}function bN(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function yN(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Um=Symbol();function _0(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Um?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Pm(e,t){return typeof e=="function"?e(...t):!!e}function xN(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 ac=(()=>{let e=()=>hN;return{isServer(){return e()},setIsServer(t){e=t}}})();function Zp(){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 vN=fN;function wN(){let e=[],t=0,n=d=>{d()},a=d=>{d()},s=vN;const o=d=>{t?e.push(d):s(()=>{n(d)})},c=()=>{const d=e;e=[],d.length&&s(()=>{a(()=>{d.forEach(f=>{n(f)})})})};return{batch:d=>{let f;t++;try{f=d()}finally{t--,t||c()}return f},batchCalls:d=>(...f)=>{o(()=>{d(...f)})},schedule:o,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{s=d}}}var rn=wN(),yl,pr,xl,p0,kN=(p0=class extends Ml{constructor(){super();je(this,yl,!0);je(this,pr);je(this,xl);we(this,xl,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(){I(this,pr)||this.setEventListener(I(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,pr))==null||t.call(this),we(this,pr,void 0))}setEventListener(t){var n;we(this,xl,t),(n=I(this,pr))==null||n.call(this),we(this,pr,t(this.setOnline.bind(this)))}setOnline(t){I(this,yl)!==t&&(we(this,yl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return I(this,yl)}},yl=new WeakMap,pr=new WeakMap,xl=new WeakMap,p0),xd=new kN;function EN(e){return Math.min(1e3*2**e,3e4)}function N0(e){return(e??"online")==="online"?xd.isOnline():!0}var Jp=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function C0(e){let t=!1,n=0,a;const s=Zp(),o=()=>s.status!=="pending",c=w=>{var S;if(!o()){const _=new Jp(w);v(_),(S=e.onCancel)==null||S.call(e,_)}},d=()=>{t=!0},f=()=>{t=!1},p=()=>zm.isFocused()&&(e.networkMode==="always"||xd.isOnline())&&e.canRun(),b=()=>N0(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 S;a=_=>{(o()||p())&&w(_)},(S=e.onPause)==null||S.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(o())return;let w;const S=n===0?e.initialPromise:void 0;try{w=S??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const C=e.retry??(ac.isServer()?0:3),T=e.retryDelay??EN,D=typeof T=="function"?T(n,_):T,B=C===!0||typeof C=="number"&&n<C||typeof C=="function"&&C(n,_);if(t||!B){v(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),gN(D).then(()=>p()?void 0:x()).then(()=>{t?v(_):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:d,continueRetry:f,canStart:b,start:()=>(b()?E():x().then(E),s)}}var ns,m0,T0=(m0=class{constructor(){je(this,ns)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Vp(this.gcTime)&&we(this,ns,Xr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ac.isServer()?1/0:300*1e3))}clearGcTimeout(){I(this,ns)!==void 0&&(Xr.clearTimeout(I(this,ns)),we(this,ns,void 0))}},ns=new WeakMap,m0),is,vl,vi,as,ln,pc,rs,ri,A0,Ea,g0,SN=(g0=class extends T0{constructor(t){super();je(this,ri);je(this,is);je(this,vl);je(this,vi);je(this,as);je(this,ln);je(this,pc);je(this,rs);we(this,rs,!1),we(this,pc,t.defaultOptions),this.setOptions(t.options),this.observers=[],we(this,as,t.client),we(this,vi,I(this,as).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,we(this,is,Mv(this.options)),this.state=t.state??I(this,is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=I(this,ln))==null?void 0:t.promise}setOptions(t){if(this.options={...I(this,pc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Mv(this.options);n.data!==void 0&&(this.setState(Dv(n.data,n.dataUpdatedAt)),we(this,is,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,vi).remove(this)}setData(t,n){const a=Xp(this.state.data,t,this.options);return Ke(this,ri,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){Ke(this,ri,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=I(this,ln))==null?void 0:a.promise;return(s=I(this,ln))==null||s.cancel(t),n?n.then(An).catch(An):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return I(this,is)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>wi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Um||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>wr(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:!E0(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,ln))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,ln))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),I(this,vi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(I(this,ln)&&(I(this,rs)||Ke(this,ri,A0).call(this)?I(this,ln).cancel({revert:!0}):I(this,ln).cancelRetry()),this.scheduleGc()),I(this,vi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Ke(this,ri,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var f,p,b,g,v,x,E,w,S,_,C,T;if(this.state.fetchStatus!=="idle"&&((f=I(this,ln))==null?void 0:f.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(I(this,ln))return I(this,ln).continueRetry(),I(this,ln).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(B=>B.options.queryFn);D&&this.setOptions(D.options)}const a=new AbortController,s=D=>{Object.defineProperty(D,"signal",{enumerable:!0,get:()=>(we(this,rs,!0),a.signal)})},o=()=>{const D=_0(this.options,n),M=(()=>{const q={client:I(this,as),queryKey:this.queryKey,meta:this.meta};return s(q),q})();return we(this,rs,!1),this.options.persister?this.options.persister(D,M,this):D(M)},d=(()=>{const D={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:I(this,as),state:this.state,fetchFn:o};return s(D),D})();(p=this.options.behavior)==null||p.onFetch(d,this),we(this,vl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=d.fetchOptions)==null?void 0:b.meta))&&Ke(this,ri,Ea).call(this,{type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta}),we(this,ln,C0({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:D=>{D instanceof Jp&&D.revert&&this.setState({...I(this,vl),fetchStatus:"idle"}),a.abort()},onFail:(D,B)=>{Ke(this,ri,Ea).call(this,{type:"failed",failureCount:D,error:B})},onPause:()=>{Ke(this,ri,Ea).call(this,{type:"pause"})},onContinue:()=>{Ke(this,ri,Ea).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const D=await I(this,ln).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(x=(v=I(this,vi).config).onSuccess)==null||x.call(v,D,this),(w=(E=I(this,vi).config).onSettled)==null||w.call(E,D,this.state.error,this),D}catch(D){if(D instanceof Jp){if(D.silent)return I(this,ln).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw Ke(this,ri,Ea).call(this,{type:"error",error:D}),(_=(S=I(this,vi).config).onError)==null||_.call(S,D,this),(T=(C=I(this,vi).config).onSettled)==null||T.call(C,this.state.data,D,this),D}finally{this.scheduleGc()}}},is=new WeakMap,vl=new WeakMap,vi=new WeakMap,as=new WeakMap,ln=new WeakMap,pc=new WeakMap,rs=new WeakMap,ri=new WeakSet,A0=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,...j0(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Dv(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return we(this,vl,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),rn.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),I(this,vi).notify({query:this,type:"updated",action:t})})},g0);function j0(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:N0(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Dv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Mv(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 $n,it,mc,Cn,ss,wl,Sa,mr,gc,kl,El,ls,os,gr,Sl,ut,Xo,em,tm,nm,im,am,rm,sm,O0,b0,_N=(b0=class extends Ml{constructor(t,n){super();je(this,ut);je(this,$n);je(this,it);je(this,mc);je(this,Cn);je(this,ss);je(this,wl);je(this,Sa);je(this,mr);je(this,gc);je(this,kl);je(this,El);je(this,ls);je(this,os);je(this,gr);je(this,Sl,new Set);this.options=n,we(this,$n,t),we(this,mr,null),we(this,Sa,Zp()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,it).addObserver(this),Rv(I(this,it),this.options)?Ke(this,ut,Xo).call(this):this.updateResult(),Ke(this,ut,im).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lm(I(this,it),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lm(I(this,it),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Ke(this,ut,am).call(this),Ke(this,ut,rm).call(this),I(this,it).removeObserver(this)}setOptions(t){const n=this.options,a=I(this,it);if(this.options=I(this,$n).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wi(this.options.enabled,I(this,it))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Ke(this,ut,sm).call(this),I(this,it).setOptions(this.options),n._defaulted&&!yd(this.options,n)&&I(this,$n).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,it),observer:this});const s=this.hasListeners();s&&Lv(I(this,it),a,this.options,n)&&Ke(this,ut,Xo).call(this),this.updateResult(),s&&(I(this,it)!==a||wi(this.options.enabled,I(this,it))!==wi(n.enabled,I(this,it))||wr(this.options.staleTime,I(this,it))!==wr(n.staleTime,I(this,it)))&&Ke(this,ut,em).call(this);const o=Ke(this,ut,tm).call(this);s&&(I(this,it)!==a||wi(this.options.enabled,I(this,it))!==wi(n.enabled,I(this,it))||o!==I(this,gr))&&Ke(this,ut,nm).call(this,o)}getOptimisticResult(t){const n=I(this,$n).getQueryCache().build(I(this,$n),t),a=this.createResult(n,t);return CN(this,a)&&(we(this,Cn,a),we(this,wl,this.options),we(this,ss,I(this,it).state)),a}getCurrentResult(){return I(this,Cn)}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&&I(this,Sa).status==="pending"&&I(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){I(this,Sl).add(t)}getCurrentQuery(){return I(this,it)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=I(this,$n).defaultQueryOptions(t),a=I(this,$n).getQueryCache().build(I(this,$n),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Ke(this,ut,Xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,Cn)))}createResult(t,n){var ee;const a=I(this,it),s=this.options,o=I(this,Cn),c=I(this,ss),d=I(this,wl),p=t!==a?t.state:I(this,mc),{state:b}=t;let g={...b},v=!1,x;if(n._optimisticResults){const U=this.hasListeners(),X=!U&&Rv(t,n),J=U&&Lv(t,a,n,s);(X||J)&&(g={...g,...j0(b.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:S}=g;x=g.data;let _=!1;if(n.placeholderData!==void 0&&x===void 0&&S==="pending"){let U;o!=null&&o.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(U=o.data,_=!0):U=typeof n.placeholderData=="function"?n.placeholderData((ee=I(this,El))==null?void 0:ee.state.data,I(this,El)):n.placeholderData,U!==void 0&&(S="success",x=Xp(o==null?void 0:o.data,U,n),v=!0)}if(n.select&&x!==void 0&&!_)if(o&&x===(c==null?void 0:c.data)&&n.select===I(this,gc))x=I(this,kl);else try{we(this,gc,n.select),x=n.select(x),x=Xp(o==null?void 0:o.data,x,n),we(this,kl,x),we(this,mr,null)}catch(U){we(this,mr,U)}I(this,mr)&&(E=I(this,mr),x=I(this,kl),w=Date.now(),S="error");const C=g.fetchStatus==="fetching",T=S==="pending",D=S==="error",B=T&&C,M=x!==void 0,F={status:S,fetchStatus:g.fetchStatus,isPending:T,isSuccess:S==="success",isError:D,isInitialLoading:B,isLoading:B,data:x,dataUpdatedAt:g.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>p.dataUpdateCount||g.errorUpdateCount>p.errorUpdateCount,isFetching:C,isRefetching:C&&!T,isLoadingError:D&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:D&&M,isStale:Fm(t,n),refetch:this.refetch,promise:I(this,Sa),isEnabled:wi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const U=F.data!==void 0,X=F.status==="error"&&!U,J=te=>{X?te.reject(F.error):U&&te.resolve(F.data)},pe=()=>{const te=we(this,Sa,F.promise=Zp());J(te)},ue=I(this,Sa);switch(ue.status){case"pending":t.queryHash===a.queryHash&&J(ue);break;case"fulfilled":(X||F.data!==ue.value)&&pe();break;case"rejected":(!X||F.error!==ue.reason)&&pe();break}}return F}updateResult(){const t=I(this,Cn),n=this.createResult(I(this,it),this.options);if(we(this,ss,I(this,it).state),we(this,wl,this.options),I(this,ss).data!==void 0&&we(this,El,I(this,it)),yd(n,t))return;we(this,Cn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!I(this,Sl).size)return!0;const c=new Set(o??I(this,Sl));return this.options.throwOnError&&c.add("error"),Object.keys(I(this,Cn)).some(d=>{const f=d;return I(this,Cn)[f]!==t[f]&&c.has(f)})};Ke(this,ut,O0).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Ke(this,ut,im).call(this)}},$n=new WeakMap,it=new WeakMap,mc=new WeakMap,Cn=new WeakMap,ss=new WeakMap,wl=new WeakMap,Sa=new WeakMap,mr=new WeakMap,gc=new WeakMap,kl=new WeakMap,El=new WeakMap,ls=new WeakMap,os=new WeakMap,gr=new WeakMap,Sl=new WeakMap,ut=new WeakSet,Xo=function(t){Ke(this,ut,sm).call(this);let n=I(this,it).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(An)),n},em=function(){Ke(this,ut,am).call(this);const t=wr(this.options.staleTime,I(this,it));if(ac.isServer()||I(this,Cn).isStale||!Vp(t))return;const a=E0(I(this,Cn).dataUpdatedAt,t)+1;we(this,ls,Xr.setTimeout(()=>{I(this,Cn).isStale||this.updateResult()},a))},tm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,it)):this.options.refetchInterval)??!1},nm=function(t){Ke(this,ut,rm).call(this),we(this,gr,t),!(ac.isServer()||wi(this.options.enabled,I(this,it))===!1||!Vp(I(this,gr))||I(this,gr)===0)&&we(this,os,Xr.setInterval(()=>{(this.options.refetchIntervalInBackground||zm.isFocused())&&Ke(this,ut,Xo).call(this)},I(this,gr)))},im=function(){Ke(this,ut,em).call(this),Ke(this,ut,nm).call(this,Ke(this,ut,tm).call(this))},am=function(){I(this,ls)!==void 0&&(Xr.clearTimeout(I(this,ls)),we(this,ls,void 0))},rm=function(){I(this,os)!==void 0&&(Xr.clearInterval(I(this,os)),we(this,os,void 0))},sm=function(){const t=I(this,$n).getQueryCache().build(I(this,$n),this.options);if(t===I(this,it))return;const n=I(this,it);we(this,it,t),we(this,mc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},O0=function(t){rn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(I(this,Cn))}),I(this,$n).getQueryCache().notify({query:I(this,it),type:"observerResultsUpdated"})})},b0);function NN(e,t){return wi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Rv(e,t){return NN(e,t)||e.state.data!==void 0&&lm(e,t,t.refetchOnMount)}function lm(e,t,n){if(wi(t.enabled,e)!==!1&&wr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&Fm(e,t)}return!1}function Lv(e,t,n,a){return(e!==t||wi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&Fm(e,n)}function Fm(e,t){return wi(t.enabled,e)!==!1&&e.isStaleByTime(wr(t.staleTime,e))}function CN(e,t){return!yd(e.getCurrentResult(),t)}function Iv(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 d={pages:[],pageParams:[]},f=0;const p=async()=>{let w=!1;const S=T=>{xN(T,()=>t.signal,()=>w=!0)},_=_0(t.options,t.fetchOptions),C=async(T,D,B)=>{if(w)return Promise.reject();if(D==null&&T.pages.length)return Promise.resolve(T);const q=(()=>{const X={client:t.client,queryKey:t.queryKey,pageParam:D,direction:B?"backward":"forward",meta:t.options.meta};return S(X),X})(),F=await _(q),{maxPages:ee}=t.options,U=B?yN:bN;return{pages:U(T.pages,F,ee),pageParams:U(T.pageParams,D,ee)}};if(s&&o.length){const T=s==="backward",D=T?TN:zv,B={pages:o,pageParams:c},M=D(a,B);d=await C(B,M,T)}else{const T=e??o.length;do{const D=f===0?c[0]??a.initialPageParam:zv(a,d);if(f>0&&D==null)break;d=await C(d,D),f++}while(f<T)}return d};t.options.persister?t.fetchFn=()=>{var w,S;return(S=(w=t.options).persister)==null?void 0:S.call(w,p,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=p}}}function zv(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 TN(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 bc,Wi,xn,cs,Xi,ur,y0,AN=(y0=class extends T0{constructor(t){super();je(this,Xi);je(this,bc);je(this,Wi);je(this,xn);je(this,cs);we(this,bc,t.client),this.mutationId=t.mutationId,we(this,xn,t.mutationCache),we(this,Wi,[]),this.state=t.state||D0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){I(this,Wi).includes(t)||(I(this,Wi).push(t),this.clearGcTimeout(),I(this,xn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){we(this,Wi,I(this,Wi).filter(n=>n!==t)),this.scheduleGc(),I(this,xn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){I(this,Wi).length||(this.state.status==="pending"?this.scheduleGc():I(this,xn).remove(this))}continue(){var t;return((t=I(this,cs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,d,f,p,b,g,v,x,E,w,S,_,C,T,D,B,M,q;const n=()=>{Ke(this,Xi,ur).call(this,{type:"continue"})},a={client:I(this,bc),meta:this.options.meta,mutationKey:this.options.mutationKey};we(this,cs,C0({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(F,ee)=>{Ke(this,Xi,ur).call(this,{type:"failed",failureCount:F,error:ee})},onPause:()=>{Ke(this,Xi,ur).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,xn).canRun(this)}));const s=this.state.status==="pending",o=!I(this,cs).canStart();try{if(s)n();else{Ke(this,Xi,ur).call(this,{type:"pending",variables:t,isPaused:o}),I(this,xn).config.onMutate&&await I(this,xn).config.onMutate(t,this,a);const ee=await((d=(c=this.options).onMutate)==null?void 0:d.call(c,t,a));ee!==this.state.context&&Ke(this,Xi,ur).call(this,{type:"pending",context:ee,variables:t,isPaused:o})}const F=await I(this,cs).start();return await((p=(f=I(this,xn).config).onSuccess)==null?void 0:p.call(f,F,t,this.state.context,this,a)),await((g=(b=this.options).onSuccess)==null?void 0:g.call(b,F,t,this.state.context,a)),await((x=(v=I(this,xn).config).onSettled)==null?void 0:x.call(v,F,null,this.state.variables,this.state.context,this,a)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,F,null,t,this.state.context,a)),Ke(this,Xi,ur).call(this,{type:"success",data:F}),F}catch(F){try{await((_=(S=I(this,xn).config).onError)==null?void 0:_.call(S,F,t,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((T=(C=this.options).onError)==null?void 0:T.call(C,F,t,this.state.context,a))}catch(ee){Promise.reject(ee)}try{await((B=(D=I(this,xn).config).onSettled)==null?void 0:B.call(D,void 0,F,this.state.variables,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((q=(M=this.options).onSettled)==null?void 0:q.call(M,void 0,F,t,this.state.context,a))}catch(ee){Promise.reject(ee)}throw Ke(this,Xi,ur).call(this,{type:"error",error:F}),F}finally{I(this,xn).runNext(this)}}},bc=new WeakMap,Wi=new WeakMap,xn=new WeakMap,cs=new WeakMap,Xi=new WeakSet,ur=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),rn.batch(()=>{I(this,Wi).forEach(a=>{a.onMutationUpdate(t)}),I(this,xn).notify({mutation:this,type:"updated",action:t})})},y0);function D0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _a,Ri,yc,x0,jN=(x0=class extends Ml{constructor(t={}){super();je(this,_a);je(this,Ri);je(this,yc);this.config=t,we(this,_a,new Set),we(this,Ri,new Map),we(this,yc,0)}build(t,n,a){const s=new AN({client:t,mutationCache:this,mutationId:++Gu(this,yc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){I(this,_a).add(t);const n=Qu(t);if(typeof n=="string"){const a=I(this,Ri).get(n);a?a.push(t):I(this,Ri).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(I(this,_a).delete(t)){const n=Qu(t);if(typeof n=="string"){const a=I(this,Ri).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&I(this,Ri).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Qu(t);if(typeof n=="string"){const a=I(this,Ri).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=Qu(t);if(typeof n=="string"){const s=(a=I(this,Ri).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(){rn.batch(()=>{I(this,_a).forEach(t=>{this.notify({type:"removed",mutation:t})}),I(this,_a).clear(),I(this,Ri).clear()})}getAll(){return Array.from(I(this,_a))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Av(n,a))}findAll(t={}){return this.getAll().filter(n=>Av(t,n))}notify(t){rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return rn.batch(()=>Promise.all(t.map(n=>n.continue().catch(An))))}},_a=new WeakMap,Ri=new WeakMap,yc=new WeakMap,x0);function Qu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Na,br,Hn,Ca,ja,ud,om,v0,ON=(v0=class extends Ml{constructor(n,a){super();je(this,ja);je(this,Na);je(this,br);je(this,Hn);je(this,Ca);we(this,Na,n),this.setOptions(a),this.bindMethods(),Ke(this,ja,ud).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=I(this,Na).defaultMutationOptions(n),yd(this.options,a)||I(this,Na).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,Hn),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&us(a.mutationKey)!==us(this.options.mutationKey)?this.reset():((s=I(this,Hn))==null?void 0:s.state.status)==="pending"&&I(this,Hn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=I(this,Hn))==null||n.removeObserver(this)}onMutationUpdate(n){Ke(this,ja,ud).call(this),Ke(this,ja,om).call(this,n)}getCurrentResult(){return I(this,br)}reset(){var n;(n=I(this,Hn))==null||n.removeObserver(this),we(this,Hn,void 0),Ke(this,ja,ud).call(this),Ke(this,ja,om).call(this)}mutate(n,a){var s;return we(this,Ca,a),(s=I(this,Hn))==null||s.removeObserver(this),we(this,Hn,I(this,Na).getMutationCache().build(I(this,Na),this.options)),I(this,Hn).addObserver(this),I(this,Hn).execute(n)}},Na=new WeakMap,br=new WeakMap,Hn=new WeakMap,Ca=new WeakMap,ja=new WeakSet,ud=function(){var a;const n=((a=I(this,Hn))==null?void 0:a.state)??D0();we(this,br,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},om=function(n){rn.batch(()=>{var a,s,o,c,d,f,p,b;if(I(this,Ca)&&this.hasListeners()){const g=I(this,br).variables,v=I(this,br).context,x={client:I(this,Na),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=I(this,Ca)).onSuccess)==null||s.call(a,n.data,g,v,x)}catch(E){Promise.reject(E)}try{(c=(o=I(this,Ca)).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{(f=(d=I(this,Ca)).onError)==null||f.call(d,n.error,g,v,x)}catch(E){Promise.reject(E)}try{(b=(p=I(this,Ca)).onSettled)==null||b.call(p,void 0,n.error,g,v,x)}catch(E){Promise.reject(E)}}}this.listeners.forEach(g=>{g(I(this,br))})})},v0),Zi,w0,DN=(w0=class extends Ml{constructor(t={}){super();je(this,Zi);this.config=t,we(this,Zi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Bm(s,n);let c=this.get(o);return c||(c=new SN({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){I(this,Zi).has(t.queryHash)||(I(this,Zi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=I(this,Zi).get(t.queryHash);n&&(t.destroy(),n===t&&I(this,Zi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){rn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return I(this,Zi).get(t)}getAll(){return[...I(this,Zi).values()]}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Tv(n,a))}findAll(t={}){const n=this.getAll();return Object.keys(t).length>0?n.filter(a=>Tv(t,a)):n}notify(t){rn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){rn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){rn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zi=new WeakMap,w0),$t,yr,xr,_l,Nl,vr,Cl,Tl,k0,MN=(k0=class{constructor(e={}){je(this,$t);je(this,yr);je(this,xr);je(this,_l);je(this,Nl);je(this,vr);je(this,Cl);je(this,Tl);we(this,$t,e.queryCache||new DN),we(this,yr,e.mutationCache||new jN),we(this,xr,e.defaultOptions||{}),we(this,_l,new Map),we(this,Nl,new Map),we(this,vr,0)}mount(){Gu(this,vr)._++,I(this,vr)===1&&(we(this,Cl,zm.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,$t).onFocus())})),we(this,Tl,xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,$t).onOnline())})))}unmount(){var e,t;Gu(this,vr)._--,I(this,vr)===0&&((e=I(this,Cl))==null||e.call(this),we(this,Cl,void 0),(t=I(this,Tl))==null||t.call(this),we(this,Tl,void 0))}isFetching(e){return I(this,$t).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return I(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,$t).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=I(this,$t).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(wr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return I(this,$t).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=I(this,$t).get(a.queryHash),o=s==null?void 0:s.state.data,c=pN(t,o);if(c!==void 0)return I(this,$t).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return rn.batch(()=>I(this,$t).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,$t).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=I(this,$t);rn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=I(this,$t);return rn.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=rn.batch(()=>I(this,$t).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(An).catch(An)}invalidateQueries(e,t={}){return rn.batch(()=>(I(this,$t).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=rn.batch(()=>I(this,$t).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(An)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(An)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=I(this,$t).build(this,t);return n.isStaleByTime(wr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(An).catch(An)}fetchInfiniteQuery(e){return e.behavior=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(An).catch(An)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xd.isOnline()?I(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,$t)}getMutationCache(){return I(this,yr)}getDefaultOptions(){return I(this,xr)}setDefaultOptions(e){we(this,xr,e)}setQueryDefaults(e,t){I(this,_l).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...I(this,_l).values()],n={};return t.forEach(a=>{ic(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){I(this,Nl).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...I(this,Nl).values()],n={};return t.forEach(a=>{ic(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...I(this,xr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Bm(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===Um&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...I(this,xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(this,$t).clear(),I(this,yr).clear()}},$t=new WeakMap,yr=new WeakMap,xr=new WeakMap,_l=new WeakMap,Nl=new WeakMap,vr=new WeakMap,Cl=new WeakMap,Tl=new WeakMap,k0),M0=A.createContext(void 0),Qn=e=>{const t=A.useContext(M0);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},RN=({client:e,children:t})=>(A.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),h.jsx(M0.Provider,{value:e,children:t})),R0=A.createContext(!1),LN=()=>A.useContext(R0);R0.Provider;function IN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zN=A.createContext(IN()),BN=()=>A.useContext(zN),UN=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Pm(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},PN=e=>{A.useEffect(()=>{e.clearReset()},[e])},FN=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Pm(n,[e.error,a])),qN=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))}},$N=(e,t)=>e.isLoading&&e.isFetching&&!t,HN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Bv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function KN(e,t,n){var v,x,E,w;const a=LN(),s=BN(),o=Qn(),c=o.defaultQueryOptions(e);(x=(v=o.getDefaultOptions().queries)==null?void 0:v._experimental_beforeQuery)==null||x.call(v,c);const d=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",qN(c),UN(c,s,d),PN(s);const f=!o.getQueryCache().get(c.queryHash),[p]=A.useState(()=>new t(o,c)),b=p.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(A.useSyncExternalStore(A.useCallback(S=>{const _=g?p.subscribe(rn.batchCalls(S)):An;return p.updateResult(),_},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),A.useEffect(()=>{p.setOptions(c)},[c,p]),HN(c,b))throw Bv(c,p,s);if(FN({result:b,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,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&&!ac.isServer()&&$N(b,a)){const S=f?Bv(c,p,s):d==null?void 0:d.promise;S==null||S.catch(An).finally(()=>{p.updateResult()})}return c.notifyOnChangeProps?b:p.trackResult(b)}function ct(e,t){return KN(e,_N)}function Gn(e,t){const n=Qn(),[a]=A.useState(()=>new ON(n,e));A.useEffect(()=>{a.setOptions(e)},[a,e]);const s=A.useSyncExternalStore(A.useCallback(c=>a.subscribe(rn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=A.useCallback((c,d)=>{a.mutate(c,d).catch(An)},[a]);if(s.error&&Pm(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 Uv="popstate";function Pv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function GN(e={}){function t(a,s){var p;let o=(p=s.state)==null?void 0:p.masked,{pathname:c,search:d,hash:f}=o||a.location;return cm("",{pathname:c,search:d,hash:f},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:rc(s)}return YN(t,n,null,e)}function Mt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function Si(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function QN(){return Math.random().toString(36).substring(2,10)}function Fv(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 cm(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?Rl(t):t,state:n,key:t&&t.key||a||QN(),unstable_mask:s}}function rc({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 Rl(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 YN(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,d="POP",f=null,p=b();p==null&&(p=0,c.replaceState({...c.state,idx:p},""));function b(){return(c.state||{idx:null}).idx}function g(){d="POP";let S=b(),_=S==null?null:S-p;p=S,f&&f({action:d,location:w.location,delta:_})}function v(S,_){d="PUSH";let C=Pv(S)?S:cm(w.location,S,_);p=b()+1;let T=Fv(C,p),D=w.createHref(C.unstable_mask||C);try{c.pushState(T,"",D)}catch(B){if(B instanceof DOMException&&B.name==="DataCloneError")throw B;s.location.assign(D)}o&&f&&f({action:d,location:w.location,delta:1})}function x(S,_){d="REPLACE";let C=Pv(S)?S:cm(w.location,S,_);p=b();let T=Fv(C,p),D=w.createHref(C.unstable_mask||C);c.replaceState(T,"",D),o&&f&&f({action:d,location:w.location,delta:0})}function E(S){return VN(S)}let w={get action(){return d},get location(){return e(s,c)},listen(S){if(f)throw new Error("A history only accepts one active listener");return s.addEventListener(Uv,g),f=S,()=>{s.removeEventListener(Uv,g),f=null}},createHref(S){return t(s,S)},createURL:E,encodeLocation(S){let _=E(S);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:v,replace:x,go(S){return c.go(S)}};return w}function VN(e,t=!1){let n="http://localhost";typeof window<"u"&&(n=window.location.origin!=="null"?window.location.origin:window.location.href),Mt(n,"No window.location.(origin|href) available to create URL");let a=typeof e=="string"?e:rc(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function L0(e,t,n="/"){return WN(e,t,n,!1)}function WN(e,t,n,a){let s=typeof t=="string"?Rl(t):t,o=Oa(s.pathname||"/",n);if(o==null)return null;let c=I0(e);XN(c);let d=null;for(let f=0;d==null&&f<c.length;++f){let p=oC(o);d=sC(c[f],p,a)}return d}function I0(e,t=[],n=[],a="",s=!1){let o=(c,d,f=s,p)=>{let b={relativePath:p===void 0?c.path||"":p,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&f)return;Mt(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=Li([a,b.relativePath]),v=n.concat(b);c.children&&c.children.length>0&&(Mt(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),I0(c.children,t,v,g,f)),!(c.path==null&&!c.index)&&t.push({path:g,score:aC(g,c.index),routesMeta:v})};return e.forEach((c,d)=>{var f;if(c.path===""||!((f=c.path)!=null&&f.includes("?")))o(c,d);else for(let p of z0(c.path))o(c,d,!0,p)}),t}function z0(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=z0(a.join("/")),d=[];return d.push(...c.map(f=>f===""?o:[o,f].join("/"))),s&&d.push(...c),d.map(f=>e.startsWith("/")&&f===""?"/":f)}function XN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:rC(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var ZN=/^:[\w-]+$/,JN=3,eC=2,tC=1,nC=10,iC=-2,qv=e=>e==="*";function aC(e,t){let n=e.split("/"),a=n.length;return n.some(qv)&&(a+=iC),t&&(a+=eC),n.filter(s=>!qv(s)).reduce((s,o)=>s+(ZN.test(o)?JN:o===""?tC:nC),a)}function rC(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 sC(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let d=0;d<a.length;++d){let f=a[d],p=d===a.length-1,b=o==="/"?t:t.slice(o.length)||"/",g=vd({path:f.relativePath,caseSensitive:f.caseSensitive,end:p},b),v=f.route;if(!g&&p&&n&&!a[a.length-1].route.index&&(g=vd({path:f.relativePath,caseSensitive:f.caseSensitive,end:!1},b)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:Li([o,g.pathname]),pathnameBase:fC(Li([o,g.pathnameBase])),route:v}),g.pathnameBase!=="/"&&(o=Li([o,g.pathnameBase]))}return c}function vd(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=lC(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),d=s.slice(1);return{params:a.reduce((p,{paramName:b,isOptional:g},v)=>{if(b==="*"){let E=d[v]||"";c=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const x=d[v];return g&&!x?p[b]=void 0:p[b]=(x||"").replace(/%2F/g,"/"),p},{}),pathname:o,pathnameBase:c,pattern:e}}function lC(e,t=!1,n=!0){Si(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,d,f,p,b)=>{if(a.push({paramName:d,isOptional:f!=null}),f){let g=b.charAt(p+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 oC(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return Si(!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 Oa(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 cC=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function uC(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?Rl(e):e,o;return n?(n=B0(n),n.startsWith("/")?o=$v(n.substring(1),"/"):o=$v(n,t)):o=t,{pathname:o,search:hC(a),hash:pC(s)}}function $v(e,t){let n=wd(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function pp(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 dC(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function qm(e){let t=dC(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Rd(e,t,n,a=!1){let s;typeof e=="string"?s=Rl(e):(s={...e},Mt(!s.pathname||!s.pathname.includes("?"),pp("?","pathname","search",s)),Mt(!s.pathname||!s.pathname.includes("#"),pp("#","pathname","hash",s)),Mt(!s.search||!s.search.includes("#"),pp("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,d;if(c==null)d=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("/")}d=g>=0?t[g]:"/"}let f=uC(s,d),p=c&&c!=="/"&&c.endsWith("/"),b=(o||c===".")&&n.endsWith("/");return!f.pathname.endsWith("/")&&(p||b)&&(f.pathname+="/"),f}var B0=e=>e.replace(/\/\/+/g,"/"),Li=e=>B0(e.join("/")),wd=e=>e.replace(/\/+$/,""),fC=e=>wd(e).replace(/^\/*/,"/"),hC=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,pC=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,mC=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 gC(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function bC(e){let t=e.map(n=>n.route.path).filter(Boolean);return Li(t)||"/"}var U0=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function P0(e,t){let n=e;if(typeof n!="string"||!cC.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(U0)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),d=Oa(c.pathname,t);c.origin===o.origin&&d!=null?n=d+c.search+c.hash:s=!0}catch{Si(!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 F0=["POST","PUT","PATCH","DELETE"];new Set(F0);var yC=["GET",...F0];new Set(yC);var Ll=A.createContext(null);Ll.displayName="DataRouter";var Ld=A.createContext(null);Ld.displayName="DataRouterState";var q0=A.createContext(!1);function xC(){return A.useContext(q0)}var $0=A.createContext({isTransitioning:!1});$0.displayName="ViewTransition";var vC=A.createContext(new Map);vC.displayName="Fetchers";var wC=A.createContext(null);wC.displayName="Await";var oi=A.createContext(null);oi.displayName="Navigation";var xc=A.createContext(null);xc.displayName="Location";var Ci=A.createContext({outlet:null,matches:[],isDataRoute:!1});Ci.displayName="Route";var $m=A.createContext(null);$m.displayName="RouteError";var H0="REACT_ROUTER_ERROR",kC="REDIRECT",EC="ROUTE_ERROR_RESPONSE";function SC(e){if(e.startsWith(`${H0}:${kC}:{`))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 _C(e){if(e.startsWith(`${H0}:${EC}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new mC(t.status,t.statusText,t.data)}catch{}}function NC(e,{relative:t}={}){Mt(Il(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=A.useContext(oi),{hash:s,pathname:o,search:c}=vc(e,{relative:t}),d=o;return n!=="/"&&(d=o==="/"?n:Li([n,o])),a.createHref({pathname:d,search:c,hash:s})}function Il(){return A.useContext(xc)!=null}function zi(){return Mt(Il(),"useLocation() may be used only in the context of a <Router> component."),A.useContext(xc).location}var K0="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function G0(e){A.useContext(oi).static||A.useLayoutEffect(e)}function Sr(){let{isDataRoute:e}=A.useContext(Ci);return e?FC():CC()}function CC(){Mt(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=A.useContext(Ll),{basename:t,navigator:n}=A.useContext(oi),{matches:a}=A.useContext(Ci),{pathname:s}=zi(),o=JSON.stringify(qm(a)),c=A.useRef(!1);return G0(()=>{c.current=!0}),A.useCallback((f,p={})=>{if(Si(c.current,K0),!c.current)return;if(typeof f=="number"){n.go(f);return}let b=Rd(f,JSON.parse(o),s,p.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Li([t,b.pathname])),(p.replace?n.replace:n.push)(b,p.state,p)},[t,n,o,s,e])}var TC=A.createContext(null);function AC(e){let t=A.useContext(Ci).outlet;return A.useMemo(()=>t&&A.createElement(TC.Provider,{value:e},t),[t,e])}function Q0(){let{matches:e}=A.useContext(Ci),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function vc(e,{relative:t}={}){let{matches:n}=A.useContext(Ci),{pathname:a}=zi(),s=JSON.stringify(qm(n));return A.useMemo(()=>Rd(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function jC(e,t){return Y0(e,t)}function Y0(e,t,n){var S;Mt(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=A.useContext(oi),{matches:s}=A.useContext(Ci),o=s[s.length-1],c=o?o.params:{},d=o?o.pathname:"/",f=o?o.pathnameBase:"/",p=o&&o.route;{let _=p&&p.path||"";W0(d,!p||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (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=zi(),g;if(t){let _=typeof t=="string"?Rl(t):t;Mt(f==="/"||((S=_.pathname)==null?void 0:S.startsWith(f)),`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 "${f}" but pathname "${_.pathname}" was given in the \`location\` prop.`),g=_}else g=b;let v=g.pathname||"/",x=v;if(f!=="/"){let _=f.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=L0(e,{pathname:x});Si(p||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Si(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=LC(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:Li([f,a.encodeLocation?a.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?f:Li([f,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n);return t&&w?A.createElement(xc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function OC(){let e=PC(),t=gC(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=A.createElement(A.Fragment,null,A.createElement("p",null,"💿 Hey developer 👋"),A.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",A.createElement("code",{style:o},"ErrorBoundary")," or"," ",A.createElement("code",{style:o},"errorElement")," prop on your route.")),A.createElement(A.Fragment,null,A.createElement("h2",null,"Unexpected Application Error!"),A.createElement("h3",{style:{fontStyle:"italic"}},t),n?A.createElement("pre",{style:s},n):null,c)}var DC=A.createElement(OC,null),V0=class extends A.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=_C(e.digest);n&&(e=n)}let t=e!==void 0?A.createElement(Ci.Provider,{value:this.props.routeContext},A.createElement($m.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?A.createElement(MC,{error:e},t):t}};V0.contextType=q0;var mp=new WeakMap;function MC({children:e,error:t}){let{basename:n}=A.useContext(oi);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=SC(t.digest);if(a){let s=mp.get(t);if(s)throw s;let o=P0(a.location,n);if(U0&&!mp.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 mp.set(t,c),c}return A.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function RC({routeContext:e,match:t,children:n}){let a=A.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),A.createElement(Ci.Provider,{value:e},n)}function LC(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);Mt(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,d=-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)&&(d=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),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let f=n==null?void 0:n.onError,p=a&&f?(b,g)=>{var v,x;f(b,{location:a.location,params:((x=(v=a.matches)==null?void 0:v[0])==null?void 0:x.params)??{},unstable_pattern:bC(a.matches),errorInfo:g})}:void 0;return s.reduceRight((b,g,v)=>{let x,E=!1,w=null,S=null;a&&(x=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||DC,c&&(d<0&&v===0?(W0("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,S=null):d===v&&(E=!0,S=g.route.hydrateFallbackElement||null)));let _=t.concat(s.slice(0,v+1)),C=()=>{let T;return x?T=w:E?T=S:g.route.Component?T=A.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=b,A.createElement(RC,{match:g,routeContext:{outlet:b,matches:_,isDataRoute:a!=null},children:T})};return a&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?A.createElement(V0,{location:a.location,revalidation:a.revalidation,component:w,error:x,children:C(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:p}):C()},null)}function Hm(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function IC(e){let t=A.useContext(Ll);return Mt(t,Hm(e)),t}function zC(e){let t=A.useContext(Ld);return Mt(t,Hm(e)),t}function BC(e){let t=A.useContext(Ci);return Mt(t,Hm(e)),t}function Km(e){let t=BC(e),n=t.matches[t.matches.length-1];return Mt(n.route.id,`${e} can only be used on routes that contain a unique "id"`),n.route.id}function UC(){return Km("useRouteId")}function PC(){var a;let e=A.useContext($m),t=zC("useRouteError"),n=Km("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function FC(){let{router:e}=IC("useNavigate"),t=Km("useNavigate"),n=A.useRef(!1);return G0(()=>{n.current=!0}),A.useCallback(async(s,o={})=>{Si(n.current,K0),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Hv={};function W0(e,t,n){!t&&!Hv[e]&&(Hv[e]=!0,Si(!1,n))}A.memo(qC);function qC({routes:e,future:t,state:n,isStatic:a,onError:s}){return Y0(e,void 0,{state:n,isStatic:a,onError:s})}function $C({to:e,replace:t,state:n,relative:a}){Mt(Il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=A.useContext(oi);Si(!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}=A.useContext(Ci),{pathname:c}=zi(),d=Sr(),f=Rd(e,qm(o),c,a==="path"),p=JSON.stringify(f);return A.useEffect(()=>{d(JSON.parse(p),{replace:t,state:n,relative:a})},[d,p,a,t,n]),null}function HC(e){return AC(e.context)}function Fn(e){Mt(!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 KC({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Mt(!Il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),f=A.useMemo(()=>({basename:d,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[d,s,o,c]);typeof n=="string"&&(n=Rl(n));let{pathname:p="/",search:b="",hash:g="",state:v=null,key:x="default",unstable_mask:E}=n,w=A.useMemo(()=>{let S=Oa(p,d);return S==null?null:{location:{pathname:S,search:b,hash:g,state:v,key:x,unstable_mask:E},navigationType:a}},[d,p,b,g,v,x,a,E]);return Si(w!=null,`<Router basename="${d}"> is not able to match the URL "${p}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:A.createElement(oi.Provider,{value:f},A.createElement(xc.Provider,{children:t,value:w}))}function GC({children:e,location:t}){return jC(um(e),t)}function um(e,t=[]){let n=[];return A.Children.forEach(e,(a,s)=>{if(!A.isValidElement(a))return;let o=[...t,s];if(a.type===A.Fragment){n.push.apply(n,um(a.props.children,o));return}Mt(a.type===Fn,`[${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>`),Mt(!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=um(a.props.children,o)),n.push(c)}),n}var dd="get",fd="application/x-www-form-urlencoded";function Id(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function QC(e){return Id(e)&&e.tagName.toLowerCase()==="button"}function YC(e){return Id(e)&&e.tagName.toLowerCase()==="form"}function VC(e){return Id(e)&&e.tagName.toLowerCase()==="input"}function WC(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function XC(e,t){return e.button===0&&(!t||t==="_self")&&!WC(e)}function dm(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 ZC(e,t){let n=dm(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Yu=null;function JC(){if(Yu===null)try{new FormData(document.createElement("form"),0),Yu=!1}catch{Yu=!0}return Yu}var eT=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function gp(e){return e!=null&&!eT.has(e)?(Si(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${fd}"`),null):e}function tT(e,t){let n,a,s,o,c;if(YC(e)){let d=e.getAttribute("action");a=d?Oa(d,t):null,n=e.getAttribute("method")||dd,s=gp(e.getAttribute("enctype"))||fd,o=new FormData(e)}else if(QC(e)||VC(e)&&(e.type==="submit"||e.type==="image")){let d=e.form;if(d==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let f=e.getAttribute("formaction")||d.getAttribute("action");if(a=f?Oa(f,t):null,n=e.getAttribute("formmethod")||d.getAttribute("method")||dd,s=gp(e.getAttribute("formenctype"))||gp(d.getAttribute("enctype"))||fd,o=new FormData(d,e),!JC()){let{name:p,type:b,value:g}=e;if(b==="image"){let v=p?`${p}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else p&&o.append(p,g)}}else{if(Id(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=dd,a=null,s=fd,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 Gm(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function X0(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&&Oa(s.pathname,t)==="/"?s.pathname=`${wd(t)}/_root.${a}`:s.pathname=`${wd(s.pathname)}.${a}`,s}async function nT(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 iT(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 aT(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await nT(o,n);return c.links?c.links():[]}return[]}));return oT(a.flat(1).filter(iT).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Kv(e,t,n,a,s,o){let c=(f,p)=>n[p]?f.route.id!==n[p].route.id:!0,d=(f,p)=>{var b;return n[p].pathname!==f.pathname||((b=n[p].route.path)==null?void 0:b.endsWith("*"))&&n[p].params["*"]!==f.params["*"]};return o==="assets"?t.filter((f,p)=>c(f,p)||d(f,p)):o==="data"?t.filter((f,p)=>{var g;let b=a.routes[f.route.id];if(!b||!b.hasLoader)return!1;if(c(f,p)||d(f,p))return!0;if(f.route.shouldRevalidate){let v=f.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:f.params,defaultShouldRevalidate:!0});if(typeof v=="boolean")return v}return!0}):[]}function rT(e,t,{includeHydrateFallback:n}={}){return sT(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 sT(e){return[...new Set(e)]}function lT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function oT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(lT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Qm(){let e=A.useContext(Ll);return Gm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function cT(){let e=A.useContext(Ld);return Gm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Ym=A.createContext(void 0);Ym.displayName="FrameworkContext";function Vm(){let e=A.useContext(Ym);return Gm(e,"You must render this element inside a <HydratedRouter> element"),e}function uT(e,t){let n=A.useContext(Ym),[a,s]=A.useState(!1),[o,c]=A.useState(!1),{onFocus:d,onBlur:f,onMouseEnter:p,onMouseLeave:b,onTouchStart:g}=t,v=A.useRef(null);A.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=_=>{_.forEach(C=>{c(C.isIntersecting)})},S=new IntersectionObserver(w,{threshold:.5});return v.current&&S.observe(v.current),()=>{S.disconnect()}}},[e]),A.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:Ho(d,x),onBlur:Ho(f,E),onMouseEnter:Ho(p,x),onMouseLeave:Ho(b,E),onTouchStart:Ho(g,x)}]:[!1,v,{}]}function Ho(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function dT({page:e,...t}){let n=xC(),{router:a}=Qm(),s=A.useMemo(()=>L0(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?A.createElement(hT,{page:e,matches:s,...t}):A.createElement(pT,{page:e,matches:s,...t}):null}function fT(e){let{manifest:t,routeModules:n}=Vm(),[a,s]=A.useState([]);return A.useEffect(()=>{let o=!1;return aT(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function hT({page:e,matches:t,...n}){let a=zi(),{future:s}=Vm(),{basename:o}=Qm(),c=A.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let d=X0(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),f=!1,p=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?f=!0:p.push(b.route.id);return f&&p.length>0&&d.searchParams.set("_routes",p.join(",")),[d.pathname+d.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return A.createElement(A.Fragment,null,c.map(d=>A.createElement("link",{key:d,rel:"prefetch",as:"fetch",href:d,...n})))}function pT({page:e,matches:t,...n}){let a=zi(),{future:s,manifest:o,routeModules:c}=Vm(),{basename:d}=Qm(),{loaderData:f,matches:p}=cT(),b=A.useMemo(()=>Kv(e,t,p,o,a,"data"),[e,t,p,o,a]),g=A.useMemo(()=>Kv(e,t,p,o,a,"assets"),[e,t,p,o,a]),v=A.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,S=!1;if(t.forEach(C=>{var D;let T=o.routes[C.route.id];!T||!T.hasLoader||(!b.some(B=>B.route.id===C.route.id)&&C.route.id in f&&((D=c[C.route.id])!=null&&D.shouldRevalidate)||T.hasClientLoader?S=!0:w.add(C.route.id))}),w.size===0)return[];let _=X0(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return S&&w.size>0&&_.searchParams.set("_routes",t.filter(C=>w.has(C.route.id)).map(C=>C.route.id).join(",")),[_.pathname+_.search]},[d,s.unstable_trailingSlashAwareDataRequests,f,a,o,b,t,e,c]),x=A.useMemo(()=>rT(g,o),[g,o]),E=fT(g);return A.createElement(A.Fragment,null,v.map(w=>A.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>A.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:S})=>A.createElement("link",{key:w,nonce:n.nonce,...S,crossOrigin:S.crossOrigin??n.crossOrigin})))}function mT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var gT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{gT&&(window.__reactRouterVersion="7.14.2")}catch{}function bT({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=A.useRef();s.current==null&&(s.current=GN({window:a,v5Compat:!0}));let o=s.current,[c,d]=A.useState({action:o.action,location:o.location}),f=A.useCallback(p=>{n===!1?d(p):A.startTransition(()=>d(p))},[n]);return A.useLayoutEffect(()=>o.listen(f),[o,f]),A.createElement(KC,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var Z0=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hs=A.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:d,state:f,target:p,to:b,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...E},w){let{basename:S,navigator:_,unstable_useTransitions:C}=A.useContext(oi),T=typeof b=="string"&&Z0.test(b),D=P0(b,S);b=D.to;let B=NC(b,{relative:s}),M=zi(),q=null;if(d){let te=Rd(d,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);S!=="/"&&(te.pathname=te.pathname==="/"?S:Li([S,te.pathname])),q=_.createHref(te)}let[F,ee,U]=uT(a,E),X=vT(b,{replace:c,unstable_mask:d,state:f,target:p,preventScrollReset:g,relative:s,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:C});function J(te){t&&t(te),te.defaultPrevented||X(te)}let pe=!(D.isExternal||o),ue=A.createElement("a",{...E,...U,href:(pe?q:void 0)||D.absoluteURL||B,onClick:pe?J:t,ref:mT(w,ee),target:p,"data-discover":!T&&n==="render"?"true":void 0});return F&&!T?A.createElement(A.Fragment,null,ue,A.createElement(dT,{page:B})):ue});hs.displayName="Link";var J0=A.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:d,children:f,...p},b){let g=vc(c,{relative:p.relative}),v=zi(),x=A.useContext(Ld),{navigator:E,basename:w}=A.useContext(oi),S=x!=null&&_T(g)&&d===!0,_=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,C=v.pathname,T=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(C=C.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&w&&(T=Oa(T,w)||T);const D=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let B=C===_||!s&&C.startsWith(_)&&C.charAt(D)==="/",M=T!=null&&(T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/"),q={isActive:B,isPending:M,isTransitioning:S},F=B?t:void 0,ee;typeof a=="function"?ee=a(q):ee=[a,B?"active":null,M?"pending":null,S?"transitioning":null].filter(Boolean).join(" ");let U=typeof o=="function"?o(q):o;return A.createElement(hs,{...p,"aria-current":F,className:ee,ref:b,style:U,to:c,viewTransition:d},typeof f=="function"?f(q):f)});J0.displayName="NavLink";var yT=A.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=dd,action:d,onSubmit:f,relative:p,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v,...x},E)=>{let{unstable_useTransitions:w}=A.useContext(oi),S=ET(),_=ST(d,{relative:p}),C=c.toLowerCase()==="get"?"get":"post",T=typeof d=="string"&&Z0.test(d),D=B=>{if(f&&f(B),B.defaultPrevented)return;B.preventDefault();let M=B.nativeEvent.submitter,q=(M==null?void 0:M.getAttribute("formmethod"))||c,F=()=>S(M||B.currentTarget,{fetcherKey:t,method:q,navigate:n,replace:s,state:o,relative:p,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v});w&&n!==!1?A.startTransition(()=>F()):F()};return A.createElement("form",{ref:E,method:C,action:_,onSubmit:a?f:D,...x,"data-discover":!T&&e==="render"?"true":void 0})});yT.displayName="Form";function xT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function ek(e){let t=A.useContext(Ll);return Mt(t,xT(e)),t}function vT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f,unstable_useTransitions:p}={}){let b=Sr(),g=zi(),v=vc(e,{relative:c});return A.useCallback(x=>{if(XC(x,t)){x.preventDefault();let E=n!==void 0?n:rc(g)===rc(v),w=()=>b(e,{replace:E,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:f});p?A.startTransition(()=>w()):w()}},[g,b,v,n,a,s,t,e,o,c,d,f,p])}function tk(e){Si(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=A.useRef(dm(e)),n=A.useRef(!1),a=zi(),s=A.useMemo(()=>ZC(a.search,n.current?null:t.current),[a.search]),o=Sr(),c=A.useCallback((d,f)=>{const p=dm(typeof d=="function"?d(new URLSearchParams(s)):d);n.current=!0,o("?"+p,f)},[o,s]);return[s,c]}var wT=0,kT=()=>`__${String(++wT)}__`;function ET(){let{router:e}=ek("useSubmit"),{basename:t}=A.useContext(oi),n=UC(),a=e.fetch,s=e.navigate;return A.useCallback(async(o,c={})=>{let{action:d,method:f,encType:p,formData:b,body:g}=tT(o,t);if(c.navigate===!1){let v=c.fetcherKey||kT();await a(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||f,formEncType:c.encType||p,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||f,formEncType:c.encType||p,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function ST(e,{relative:t}={}){let{basename:n}=A.useContext(oi),a=A.useContext(Ci);Mt(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...vc(e||".",{relative:t})},c=zi();if(e==null){o.search=c.search;let d=new URLSearchParams(o.search),f=d.getAll("index");if(f.some(b=>b==="")){d.delete("index"),f.filter(g=>g).forEach(g=>d.append("index",g));let b=d.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:Li([n,o.pathname])),rc(o)}function _T(e,{relative:t}={}){let n=A.useContext($0);Mt(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=ek("useViewTransitionState"),s=vc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Oa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Oa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return vd(s.pathname,c)!=null||vd(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 NT=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),CT=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),Gv=e=>{const t=CT(e);return t.charAt(0).toUpperCase()+t.slice(1)},nk=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),TT=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 AT={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 jT=A.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...d},f)=>A.createElement("svg",{ref:f,...AT,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:nk("lucide",s),...!o&&!TT(d)&&{"aria-hidden":"true"},...d},[...c.map(([p,b])=>A.createElement(p,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 Te=(e,t)=>{const n=A.forwardRef(({className:a,...s},o)=>A.createElement(jT,{ref:o,iconNode:t,className:nk(`lucide-${NT(Gv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Gv(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 OT=[["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"}]],zd=Te("activity",OT);/**
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 DT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],ik=Te("arrow-left",DT);/**
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 MT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],RT=Te("arrow-up",MT);/**
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 LT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],IT=Te("check",LT);/**
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 zT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],wc=Te("chevron-down",zT);/**
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 BT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bd=Te("chevron-right",BT);/**
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 UT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],PT=Te("chevron-up",UT);/**
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 FT=[["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"}]],sc=Te("circle-alert",FT);/**
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 qT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],fm=Te("circle-check-big",qT);/**
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 $T=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],lc=Te("circle-check",$T);/**
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 HT=[["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"}]],KT=Te("circle-x",HT);/**
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 GT=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],QT=Te("clock",GT);/**
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 YT=[["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"}]],VT=Te("copy",YT);/**
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 WT=[["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"}]],ak=Te("download",WT);/**
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 XT=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],ZT=Te("eye",XT);/**
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 JT=[["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"}]],Qv=Te("file-code",JT);/**
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 eA=[["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"}]],kc=Te("file-text",eA);/**
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 tA=[["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"}]],nA=Te("flame",tA);/**
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 iA=[["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"}]],aA=Te("folder-git-2",iA);/**
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 rA=[["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"}]],rk=Te("folder-open",rA);/**
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 sA=[["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"}]],oc=Te("folder",sA);/**
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 lA=[["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"}]],oA=Te("funnel",lA);/**
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 cA=[["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"}]],uA=Te("git-branch",cA);/**
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 dA=[["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"}]],fA=Te("globe",dA);/**
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 hA=[["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"}]],pA=Te("history",hA);/**
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 mA=[["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"}]],gA=Te("house",mA);/**
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 bA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}]],yA=Te("image",bA);/**
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 xA=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],vA=Te("kanban",xA);/**
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 wA=[["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"}]],kA=Te("layout-grid",wA);/**
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 EA=[["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"}]],SA=Te("link",EA);/**
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 _A=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Bt=Te("loader-circle",_A);/**
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 NA=[["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"}]],Yv=Te("message-circle",NA);/**
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 CA=[["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"}]],TA=Te("message-square",CA);/**
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 AA=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],jA=Te("paperclip",AA);/**
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 OA=[["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"}]],DA=Te("pause",OA);/**
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 MA=[["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"}]],Wm=Te("pen-line",MA);/**
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 RA=[["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"}]],Xm=Te("play",RA);/**
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 LA=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bi=Te("plus",LA);/**
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 IA=[["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"}]],sk=Te("radio",IA);/**
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 zA=[["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"}]],Al=Te("refresh-cw",zA);/**
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 BA=[["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"}]],lk=Te("rotate-ccw",BA);/**
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 UA=[["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"}]],Ud=Te("save",UA);/**
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 PA=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],kd=Te("search",PA);/**
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 FA=[["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"}]],qA=Te("send",FA);/**
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 $A=[["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"}]],ok=Te("settings",$A);/**
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 HA=[["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"}]],KA=Te("skull",HA);/**
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 GA=[["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"}]],QA=Te("snowflake",GA);/**
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 YA=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],ck=Te("square",YA);/**
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 VA=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],uk=Te("terminal",VA);/**
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 WA=[["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"}]],XA=Te("timer-reset",WA);/**
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 ZA=[["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"}]],zl=Te("trash-2",ZA);/**
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 JA=[["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"}]],e2=Te("triangle-alert",JA);/**
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 t2=[["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"}]],dk=Te("users",t2);/**
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 n2=[["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"}]],fk=Te("workflow",n2);/**
351
+ * @license lucide-react v0.544.0 - ISC
352
+ *
353
+ * This source code is licensed under the ISC license.
354
+ * See the LICENSE file in the root directory of this source tree.
355
+ */const i2=[["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"}]],hk=Te("wrench",i2);/**
356
+ * @license lucide-react v0.544.0 - ISC
357
+ *
358
+ * This source code is licensed under the ISC license.
359
+ * See the LICENSE file in the root directory of this source tree.
360
+ */const a2=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_i=Te("x",a2);/**
361
+ * @license lucide-react v0.544.0 - ISC
362
+ *
363
+ * This source code is licensed under the ISC license.
364
+ * See the LICENSE file in the root directory of this source tree.
365
+ */const r2=[["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"}]],s2=Te("zap",r2),l2={"app.title":"SPS Console","nav.chat":"Chat","nav.projects":"Projects","nav.board":"Board","nav.workers":"Workers","nav.logs":"Logs","nav.skills":"Skills","nav.system":"System","nav.aria":"Main navigation","lang.toggle.aria":"Switch interface language","lang.en":"EN","lang.zh":"中","status.server":"server","status.offline":"offline","status.sse.open":"SSE","status.sse.connecting":"SSE·connect","status.sse.down":"SSE·down","status.pipelines.tooltip":"Active pipelines","status.workers.tooltip":"Active workers","status.pipeline.unit":"pipeline","status.worker.unit":"worker","common.save":"Save","common.cancel":"Cancel","common.delete":"Delete","common.confirm":"Confirm","common.create":"Create","common.edit":"Edit","common.close":"Close","common.loading":"Loading…","common.error":"Error","common.retry":"Retry","common.empty":"Nothing here yet","common.search":"Search","common.refresh":"Refresh","common.copy":"Copy","common.copied":"Copied","common.yes":"Yes","common.no":"No","common.required":"Required","common.optional":"Optional","common.ok":"OK","projects.title":"Projects 🎯","projects.count":"{count} local project(s)","projects.refresh.hint":"Click refresh to retry","projects.new":"New project","projects.load.failed":"Failed to load","projects.empty.title":"No projects yet ✨","projects.empty.hint":"Run {cmd} to create your first project.","newProject.title":"New project","newProject.subtitle":"Set up a project; the worker will run automatically","newProject.field.name":"Project name","newProject.field.name.help":"Lowercase letters, digits, _ and - only","newProject.field.dir":"Project directory","newProject.field.dir.help":"Absolute path; will be created if missing","newProject.field.branch":"Merge target branch","newProject.field.branch.help":"Default: main","newProject.field.maxWorkers":"Max concurrent workers","newProject.field.maxWorkers.help":"Per-project worker count (1 recommended)","newProject.field.ackTimeout":"ACK timeout (seconds)","newProject.field.ackTimeout.help":"How long to wait for the worker to ACK (default 300)","newProject.field.gitlabProject":"GitLab/GitHub remote","newProject.field.gitlabProject.help":"Format: user/repo (optional)","newProject.field.matrixRoom":"Matrix room ID","newProject.field.matrixRoom.help":"Optional, falls back to global default","newProject.field.git":"Enable git","newProject.field.git.help":"Off → non-code project, no commit/push/MR steps","newProject.field.wiki":"Enable Wiki knowledge base","newProject.field.wiki.help":"v0.51+: scaffold wiki/ in the project, inject 5-layer retrieval into worker prompts","newProject.submit":"Create project","newProject.creating":"Creating…","newProject.created":"Project created","newProject.error.dirRequired":"Project directory is required","newProject.dir.browse":"Browse","newProject.dir.browseAria":"Pick directory","newProject.back":"Back","newProject.back.aria":"Back to projects","newProject.field.name.placeholder":"e.g. acme-web","newProject.field.name.example":"Letters, digits, underscore, hyphen. e.g. acme-web","newProject.field.name.invalid":"Name only allows a-z A-Z 0-9 _ -","newProject.field.dir.long":"Absolute path on this machine (code or docs). Independent of git toggle.","newProject.field.dir.placeholder":"/home/you/code/acme","newProject.field.dir.createIfMissing":"Auto-create if missing (recommended — otherwise .claude/ and wiki/ install gets skipped)","newProject.field.dir.pickerTitle":"Pick project directory","newProject.field.maxWorkers.short":"Max workers","newProject.field.ackTimeout.minutes":"ACK timeout (min)","newProject.field.ackTimeout.minutes.help":"How long after dispatch before the worker is considered failed if no ACK","newProject.field.git.label":"Enable Git (worker auto commit + push)","newProject.field.git.detail":"When off, the worker only does the task, no version control — fits docs / data-processing non-code projects.","newProject.field.git.branch":"Merge branch","newProject.field.gitlabProject.label":"Git remote project path","newProject.field.gitlabProject.help2":"Like user/repo. Empty = skip remote API (commit/push local only)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab project ID","newProject.field.gitlabProjectId.help":"Number; leave blank for GitHub","newProject.field.gitlabProjectId.placeholder":"42","newProject.field.wiki.label":"Enable Wiki knowledge base (per-project, doc-28)","newProject.field.wiki.detail":"Scaffolds {wikiCode} and injects 5-layer retrieval + wiki-update hints into the worker prompt. You can also run {wikiInit} later.","newProject.section.notifications":"Notifications","newProject.field.matrixRoom.label":"Matrix room ID","newProject.field.matrixRoom.help2":"Empty = use global config; blank = no notifications","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"Create failed","projectDetail.tab.pipeline":"Pipeline","projectDetail.tab.conf":"Conf","projectDetail.tab.delete":"Delete project","projectDetail.delete.title":"Delete this project","projectDetail.delete.warn":"This will remove the project conf, runtime, and worktrees. The repository under {repoDir} is untouched.","projectDetail.delete.confirmLabel":"Type the project name to confirm","projectDetail.delete.button":"Delete project","projectDetail.delete.deleting":"Deleting…","projectDetail.lastActivity":"Last activity","projectDetail.notFound":"Project not found","projectDetail.notFoundHint":"It may have been deleted or renamed.","projectDetail.backToList":"Back to projects","pipeline.editor.title":"Pipeline YAML","pipeline.editor.savedAt":"Saved {time}","pipeline.editor.unsaved":"Unsaved changes","pipeline.editor.save":"Save","pipeline.editor.saving":"Saving…","pipeline.editor.reload":"Reload from disk","pipeline.editor.discard.title":"Discard unsaved changes?","pipeline.editor.discard.body":"Your edits will be lost.","pipeline.editor.errors":"YAML parse errors","pipeline.editor.list":"Pipelines","pipeline.editor.list.add":"New pipeline","pipeline.editor.list.delete":"Delete pipeline","pipeline.editor.list.use":"Use as active","pipeline.editor.list.activeBadge":"active","pipeline.editor.list.sample":"sample","pipeline.editor.delete.confirm.title":"Delete pipeline {name}?","pipeline.editor.delete.confirm.body":"This action cannot be undone.","pipeline.newDialog.title":"New pipeline","pipeline.newDialog.field.filename":"Filename","pipeline.newDialog.field.filename.help":"Letters, digits, _ and - only; .yaml will be appended","pipeline.newDialog.field.copyFrom":"Copy from","pipeline.newDialog.copyFrom.sample":"sample template","pipeline.newDialog.copyFrom.active":"current active","pipeline.newDialog.create":"Create","projectDetail.tab.overview":"Overview","projectDetail.tab.config":"Config","projectDetail.tab.pipelines":"Pipelines","projectDetail.tab.danger":"Danger zone","projectDetail.openBoard":"Board","projectDetail.overview.repoDir":"Repo path","projectDetail.overview.pmBackend":"PM backend","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"Cards","projectDetail.overview.cards.value":"{total} total · {inprogress} in progress · {done} done","projectDetail.overview.workers":"Workers","projectDetail.overview.workers.value":"{total} total ({active} active)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"Last activity","projectDetail.overview.notFound":"Project {name} not found or unreadable.","projectDetail.config.confDirty":"● Unsaved changes","projectDetail.config.reload":"Reload","projectDetail.config.save":"Save","projectDetail.config.saveAria":"Save config","projectDetail.config.editorAria":"conf file editor","projectDetail.config.error.conflict.title":"Config was modified elsewhere","projectDetail.config.error.conflict.body":"The conf file was changed while you were editing. Click Reload, then re-edit.","projectDetail.config.error.save.title":"Save failed","projectDetail.config.error.load":"Load failed: {detail}","projectDetail.pipelines.title":"Pipelines","projectDetail.pipelines.add":"New pipeline","projectDetail.pipelines.empty":'No pipeline files yet. Click "New pipeline" to start.',"projectDetail.pipelines.activeBadge":"active","projectDetail.pipelines.edit":"Edit","projectDetail.pipelines.editAria":"Edit {name}","projectDetail.pipelines.switch":"Switch","projectDetail.pipelines.switchAria":"Switch to {name}","projectDetail.pipelines.switch.confirm.title":"Switch to {name}","projectDetail.pipelines.switch.confirm.body":"The current project.yaml will be overwritten with the contents of {name}. Continue?","projectDetail.pipelines.switch.confirm.button":"Switch","projectDetail.pipelines.switch.error":"Switch failed","projectDetail.pipelines.delete.confirm.title":"Delete {name}","projectDetail.pipelines.delete.confirm.body":"This pipeline file will be permanently deleted.","projectDetail.pipelines.delete.error":"Delete failed","projectDetail.pipelines.deleteAria":"Delete {name}","projectDetail.pipelines.create.error":"Create failed","projectDetail.danger.title":"Delete project","projectDetail.danger.body":"This clears {path} (all cards, runtime, logs).","projectDetail.danger.includeClaude.label":"Also clear repo's .claude/","projectDetail.danger.includeClaude.note":"The repo itself is untouched; only this directory is cleaned.","projectDetail.danger.confirmPrompt":"Type the project name {name} to confirm:","projectDetail.danger.deleteAria":"Permanently delete project","projectDetail.danger.deleteButton":"Permanently delete","projectDetail.danger.deleted.title":"Deleted","projectDetail.danger.deleted.bodyWithList":`Project deleted. Also cleaned up:
366
+ {paths}`,"projectDetail.danger.deleted.body":"Project deleted.","projectDetail.danger.error":"Delete failed","pipelineEditor.close":"Close","pipelineEditor.error.conflict.title":"File was modified elsewhere","pipelineEditor.error.yaml.title":"YAML syntax error","pipelineEditor.error.save.title":"Save failed","pipelineEditor.error.serialize.title":"YAML serialize failed","pipelineEditor.error.load":"Load failed: {detail}","pipelineEditor.mode.structured":"Structured","pipelineEditor.mode.yaml":"Raw YAML","pipelineEditor.parseError.prefix":"YAML parse: {detail}","pipelineEditor.activeWarning":"⚠ This is the active pipeline — saving will take effect on the next tick","pipelineEditor.yamlAria":"pipeline YAML editor","pipelineEditor.status.unsaved":"● Unsaved","pipelineEditor.status.saved":"Saved","pipelineEditor.status.noChanges":"No changes","pipelineEditor.reload":"Reload","pipelineEditor.save":"Save","pipelineEditor.saveAria":"Save pipeline","pipelineEditor.activeBadge":"active","pipelineEditor.modeHint":"project = event-driven pipeline (default) · steps = sequential script","pipelineEditor.stages.heading":"Stages ({count})","pipelineEditor.stages.add":"Add stage","pipelineEditor.stages.empty":'No stages yet. Click "Add stage" to start.',"pipelineEditor.stage.name.hint":"Unique stage name","pipelineEditor.stage.profile.hint":"skill profile, may be empty","pipelineEditor.stage.cardState.hint":"Card state during this stage","pipelineEditor.stage.timeout.hint":"Optional, e.g. 30m 2h","pipelineEditor.stage.trigger.hint":"Trigger condition, blank uses default","pipelineEditor.stage.onComplete.hint":"Action on success","pipelineEditor.stage.onFail.action.hint":"Action on failure, e.g. label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"Comment written on the card","pipelineEditor.stage.halt.note":"(stops pipeline on failure; uncheck to continue with next card)","pipelineEditor.stage.moveUp":"Move up","pipelineEditor.stage.moveDown":"Move down","pipelineEditor.stage.remove":"Remove stage","newPipelineDialog.title":"New pipeline","newPipelineDialog.field.filename.label":"Filename","newPipelineDialog.field.filename.placeholder":"e.g. ci","newPipelineDialog.field.filename.help":"Will be saved as {filename}. Only a-z A-Z 0-9 _ - allowed; an existing file errors 409.","newPipelineDialog.section.template":"Initial content","newPipelineDialog.template.blank.label":"Blank template","newPipelineDialog.template.blank.desc":"Minimal 1-stage pipeline (develop → Done)","newPipelineDialog.template.sample.label":"Tutorial template","newPipelineDialog.template.sample.desc":"Copied from sample.yaml.example (annotated, every field explained)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example does not exist","newPipelineDialog.template.active.label":"Copy current active","newPipelineDialog.template.active.desc":"Copied from project.yaml (build on the current config)","newPipelineDialog.template.active.unavailable":"project.yaml does not exist","newPipelineDialog.create.aria":"Create pipeline","newPipelineDialog.cancel":"Cancel","board.title":"Board ✨","board.title.bare":"Board","board.subtitle":"{name} · {cards} cards · {workers} workers active","board.pickPrompt.title":"Pick a project 🎯","board.pickPrompt.body":"The board is per-project. Pick one to start:","board.action.start":"Start","board.action.stop":"Stop","board.action.startAria":"Start pipeline","board.action.stopAria":"Stop pipeline","board.action.startError":"Failed to start pipeline","board.action.stopError":"Failed to stop pipeline","board.action.reset":"Reset","board.action.resetError":"Reset failed","board.action.reset.confirm.title":"Reset the entire pipeline","board.action.reset.confirm.body":"This clears all cards’ run state, worker markers, and branches. Cannot be undone.","board.action.reset.confirm.button":"Reset all","board.action.newCard":"New card","board.action.newCard.error":"Failed to create card","board.action.moveCard.error":"Failed to move card","board.search.placeholder":"Search title / skill / label…","board.search.aria":"Search cards","board.filter.clear":"Clear","board.filter.clearAria":"Clear filters","board.filter.aria":"Filter by {label}","board.filter.clearSelection":"Clear selection","board.error.loadCards":"Failed to load cards","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"Checklist {done}/{total}","kanban.checklist.more":"… {count} more","kanban.column.empty":"— empty —","kanban.time.justNow":"just now","kanban.time.minutes":"{n}m ago","kanban.time.hours":"{n}h ago","kanban.time.days":"{n}d ago","newCard.title":"New card","newCard.field.title":"Title *","newCard.field.title.placeholder":"e.g. Add GitHub OAuth login","newCard.field.title.help":"Short, clear goal (<200 chars)","newCard.field.description":"Description","newCard.field.description.placeholder":"User story, requirements, acceptance criteria, references… Claude reads this when starting","newCard.field.description.help":"Markdown supported. If empty, Claude only sees the title.","newCard.field.skills":"Skills","newCard.field.skills.help":"Pick which skills get loaded (via frontmatter `skills:`). Optional — worker falls back to project-level skills.","newCard.field.skills.loading":"Loading skills…","newCard.field.skills.error":"Failed to load skills (creation still works): {detail}","newCard.field.skills.selected":"{count} selected: {names}","newCard.field.dispatch":"Dispatch","newCard.field.dispatch.label":"Dispatch immediately (go straight to Backlog)","newCard.field.dispatch.help":"Default off: card lands in Planning to wait; drag to Backlog when ready. On: skip Planning, the next tick assigns a worker.","newCard.create.aria":"Create card","cardDetail.loading":"Loading…","cardDetail.error.load":"Failed to load card","cardDetail.tabs.overview":"Overview","cardDetail.tabs.body":"Description","cardDetail.tabs.checklist":"Checklist","cardDetail.tabs.history":"History","cardDetail.tabs.actions":"Actions","cardDetail.field.state":"State","cardDetail.field.skills":"Skills","cardDetail.field.labels":"Labels","cardDetail.field.branch":"Branch","cardDetail.field.assignee":"Assignee","cardDetail.field.created":"Created","cardDetail.field.updated":"Updated","cardDetail.field.empty":"—","cardDetail.actions.delete":"Delete card","cardDetail.actions.delete.confirm.title":"Delete card #{seq}","cardDetail.actions.delete.confirm.body":"This card will be permanently deleted.","cardDetail.actions.delete.error":"Delete failed","cardDetail.actions.update.error":"Update failed","cardDetail.body.empty":"No description","cardDetail.checklist.empty":"No checklist","cardDetail.checklist.progress":"Progress {done}/{total}","cardDetail.history.empty":"No history","cardDetail.notFound":"Card #{seq} not found","cardDetail.copy.aria":"Copy seq","cardDetail.close.aria":"Close","cardDetail.save":"Save","cardDetail.saving":"Saving…","workers.title":"Workers 👷","workers.summary":"Across {projects} projects · {running} running · {starting} starting · {stuck} stuck · {crashed} crashed · {idle} idle","workers.summary.stuck":"{n} stuck","workers.summary.crashed":"{n} crashed","workers.refresh.aria":"Refresh","workers.refresh":"Refresh","workers.error.load":"Load failed: {detail}","workers.empty.hint":"Click a project / worker to see details","logs.title":"Logs 📜","logs.subtitle.allProjects":"All projects","logs.subtitle.project":"{name} live tail","logs.filter.errors":"Errors only","logs.filter.errors.aria":"Show errors only","logs.filter.search.placeholder":"Filter messages…","logs.empty":"No logs yet — waiting for events","logs.error.load":"Failed to load logs","logs.refresh":"Refresh","logs.refresh.aria":"Refresh logs","logs.scroll.bottom.aria":"Scroll to bottom","logs.scroll.pause":"Paused (autoscroll off)","logs.scroll.resume":"Resume autoscroll","logs.subtitle.allProjectsCount":"All projects ({count})","logs.poll.5s":"5s polling","logs.paused":"⏸ PAUSED","logs.mode.live":"Live","logs.mode.history":"History","logs.history.startAria":"Query start time","logs.history.queryAria":"Query","logs.history.query":"Query","logs.filter.project.aria":"Filter project","logs.filter.project.all":"All projects","logs.filter.keyword.placeholder":"Filter keyword…","logs.filter.keyword.aria":"Filter logs","logs.empty.match":"No matching logs","skills.title":"Skills 🧠","skills.subtitle":"Skills shared across projects (managed via `sps skill ...`)","skills.empty.title":"No skills yet","skills.empty.hint":"Run {cmd} to sync the bundled skills.","skills.linked.tooltip":"linked into this project","skills.frozen.tooltip":"frozen (per-project copy)","skills.category.all":"All","skills.category.language":"language","skills.category.end":"end","skills.category.persona":"persona","skills.category.workflow":"workflow","skills.category.other":"other","skills.subtitleCount":"{count} user-level skill(s)","skills.search.placeholder":"Search skill…","skills.search.aria":"Search skill","skillDetail.actionFailed":"{label} failed","skillDetail.unfreezeAction":"Unfreeze","skillDetail.freezeAction":"Freeze","skillDetail.removeAction":"Remove","skillDetail.removeConfirm.title":"Remove {name} from {project}","skillDetail.removeConfirm.body":"The skill link will be removed; the project will not see this skill on next run.","skillDetail.removeConfirm.button":"Remove","skillDetail.unfreezeConfirm.title":"Unfreeze {name} @ {project}","skillDetail.unfreezeConfirm.body":"Local changes to this skill will be overwritten with the latest shared version.","skillDetail.unfreezeConfirm.button":"Unfreeze","skillDetail.close.aria":"Close","skillDetail.loading":"Loading…","skillDetail.error.load":"Load failed: {detail}","skillDetail.section.projects":"Per-project link status","skillDetail.section.empty":"No projects yet. Create one first.","skillDetail.section.preview":"SKILL.md preview","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"Expand","skillDetail.collapse":"Collapse","system.title":"System 🛠","system.subtitle":"Global config + diagnostics + upgrades","system.section.env":"Global env","system.section.env.help":"Stored in ~/.coral/env (mode 600). Used by all projects.","system.section.env.save":"Save env","system.section.env.error.conflict":"env was modified elsewhere","system.section.env.error.save":"Failed to save env","system.section.env.error.load":"Failed to load env","system.section.env.dirtyDot":"● Unsaved","system.section.env.aria":"env editor","system.section.env.reload":"Reload","system.section.upgrade":"Upgrade","system.section.upgrade.current":"Current: v{version}","system.section.upgrade.latest":"Latest on npm: v{version}","system.section.upgrade.uptodate":"Up to date","system.section.upgrade.update":"Upgrade now","system.section.upgrade.upgrading":"Upgrading…","system.section.upgrade.checking":"Checking npm…","system.section.upgrade.checkError":"Check failed: {detail}","system.section.upgrade.upgradeError":"Upgrade failed: {detail}","system.section.upgrade.upgradeError.title":"Upgrade failed","system.section.upgrade.command":"Or run in terminal: {cmd}","system.section.upgrade.runningPipelines":"Pipelines running — stop them first: {projects}","system.section.diagnostics":"Diagnostics","system.section.diagnostics.help":"Run sps doctor across all projects, see failures at a glance","system.section.diagnostics.run":"Run diagnostics","system.section.diagnostics.running":"Running…","system.section.diagnostics.empty":"No projects","system.section.diagnostics.checkAria":"Check {project}","system.section.diagnostics.statusOk":"OK","system.section.diagnostics.statusFail":"Issues","system.section.diagnostics.error":"Diagnostic failed: {detail}","system.h1":"System ⚙️","system.runtime":"Runtime","system.env.title.code":"~/.coral/env","system.env.title.prefix":"Global config ","system.env.edit.aria":"Edit env file","system.env.edit.button":"Edit","system.env.editing.label":"⚠ Editing","system.env.empty.before":'env file does not exist. Click "Edit" or run ',"system.env.empty.after":" in the terminal.","system.env.warning":"⚠ This file contains plaintext credentials. Keep mode 0600 on save.","system.env.aria":"env editor","system.env.dirtyMark":" · ● Unsaved","system.env.cancel":"Cancel","system.env.save":"Save","system.env.save.aria":"Save env","system.env.error.conflict.title":"env was modified elsewhere","system.env.error.save.title":"Save failed","system.env.error.conflict.body":"Cancel and reopen the editor.","system.upgrade.title":"Version","system.upgrade.checkLatest.aria":"Check latest version","system.upgrade.checkUpdate":"Check update","system.upgrade.label.current":"sps-cli (current)","system.upgrade.label.latest":"npm (latest)","system.upgrade.latestPill":"latest","system.upgrade.button.upgradeAria":"Upgrade to latest","system.upgrade.button.upgrade":"Upgrade","system.upgrade.button.copyAria":"Copy upgrade command","system.upgrade.button.copyTitle":"Copy command (run manually if auto upgrade fails)","system.upgrade.button.copy":"Copy command","system.upgrade.label.installed":"Installed","system.upgrade.installed.ok":"Active (restart console to see)","system.upgrade.installed.fail":"Upgrade not effective","system.upgrade.label.check":"Check","system.upgrade.confirm.title":"Upgrade sps-cli","system.upgrade.confirm.body":"Current {current}, upgrade to {latest}. Requires all pipelines stopped. Restart sps console after upgrade.","system.upgrade.confirm.button":"Upgrade","system.upgrade.success.title":"Upgrade complete","system.upgrade.success.body":'Installed v{version}. Run `pkill -f "sps console"` and restart to see it.',"system.upgrade.notEffective.title":"Upgrade not effective","system.upgrade.notEffective.same":"npm finished but the version did not change (still {version}) — likely a permissions or registry issue. Copy the command below to run manually.","system.upgrade.notEffective.notInstalled":"npm did not install a new version. Copy the command to run manually, or check the log below.","system.upgrade.error.title":"Upgrade failed","system.upgrade.copy.success.title":"Command copied","system.upgrade.copy.success.body":`Paste it into a terminal:
367
+ {cmd}`,"system.upgrade.copy.fail.title":"Copy failed","system.upgrade.copy.fail.body":`Copy manually:
368
+ {cmd}`,"system.diagnostics.title":"Project health check","system.diagnostics.checkAll":"Check all","system.diagnostics.empty":"No projects yet.","system.diagnostics.expandAria":"Expand","system.diagnostics.collapseAria":"Collapse","system.diagnostics.never":'Click "Check" to run sps doctor',"system.diagnostics.checkAria":"Check","system.diagnostics.check":"Check","system.diagnostics.noFixesNeeded":"Nothing to fix","system.diagnostics.fix.tip":"Run sps doctor <proj> --fix: auto-create .claude/hooks/stop.sh, state.json, etc.","system.diagnostics.fixAria":"Auto fix","system.diagnostics.fix":"Fix","system.diagnostics.fixed":"Fixed","system.diagnostics.error.fix":"doctor fix failed","system.diagnostics.error.check":"doctor check failed","chat.title":"Chat 💬","chat.empty.title":"Chat 💬","chat.empty.hint":'Click "New chat" on the left to start a session, or just type below — a session will be auto-created.',"chat.empty.shortcuts":"Enter to send · Shift+Enter for newline · streamed reply","chat.list.heading":"History {count}","chat.list.new":"New chat","chat.list.empty":"No chats yet. Click above to start.","chat.list.delete.aria":"Delete chat","chat.list.deleteCli.aria":"Remove this CLI session from the Console (does not affect Claude jsonl history)","chat.list.openAria":"Open chat {title}{cwd}","chat.list.cwdSuffix":" (cwd: {cwd})","chat.list.msgs":"{count} msg · {time}","chat.delete.confirm.title":"Delete chat","chat.delete.confirm.body.cli":"Will be removed from the Console list (the daemon session is stopped). The Claude CLI history under ~/.claude/projects is preserved — to continue, run `sps agent --chat --name <name>` in a terminal.","chat.delete.confirm.body.console":"Chat history will be permanently deleted.","chat.delete.confirm.button":"Delete","chat.cli.banner.bold":"CLI session","chat.cli.banner":"This session was created by sps agent. The Console only shows history. To continue, run in a terminal:","chat.input.placeholder":"Say something… (Enter to send, Shift+Enter for newline, drag files / paste images)","chat.input.dragOver":"Drop to attach…","chat.input.aria":"Message input","chat.input.attach.aria":"Attach a local file","chat.input.attach.title":"Attach a local file (also drag / paste images)","chat.input.send":"Send","chat.input.send.aria":"Send","chat.input.interrupt":"Stop","chat.input.interrupt.aria":"Stop generation","chat.input.uploading":"Uploading…","chat.input.removeAttachment":"Remove {name}","chat.error.interrupt.title":"Interrupt failed","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"Created by sps agent CLI; history is read live from Claude jsonl (read-only).","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"Type a question below to start · Enter to send · Shift+Enter for newline","notFound.title":"404","notFound.body":"This page does not exist.","notFound.home":"Back to home","workers.active.empty":"No workers running.","workers.alerts.allHealthy":"All workers healthy","workers.alerts.pidDead":"PID dead.","workers.alerts.markerStale":"marker stale {ago}.","workers.capacity.col.project":"Project","workers.capacity.col.usage":"Usage","workers.capacity.col.other":"Other","workers.capacity.detailHint":"details →","workers.panel.boardLink":"Board →","workers.panel.loading":"Loading workers…","workers.panel.empty.slots":"This project has no worker slots.","workers.panel.empty.noWorker":"No workers","workers.panel.empty.pickOne":"Pick a worker","workers.panel.idle.short":"idle","workers.panel.section.currentCard":"Current card","workers.panel.idle.full":"Slot idle, no current card.","workers.panel.section.claudeOutput":"Claude output · last {n} lines","workers.panel.output.loading":"Loading…","workers.panel.output.empty":"No session output yet. The worker needs a few seconds to start.","workers.panel.section.heartbeat":"Supervisor heartbeat · last {n} lines","workers.panel.heartbeat.fullLog":"View full log →","workers.panel.action.restart":"Restart","workers.panel.action.restart.confirm.title":"Restart worker-{slot}","workers.panel.action.restart.confirm.body":"Kill the process, then re-launch onto #{seq}","workers.panel.action.restart.confirm.button":"Restart","workers.panel.action.restart.error":"Restart failed","workers.panel.action.kill":"Kill","workers.panel.action.kill.confirm.title":"Kill worker-{slot}","workers.panel.action.kill.confirm.body":"The current task will be force-aborted.","workers.panel.action.kill.confirm.button":"Kill","workers.panel.action.kill.error":"Kill failed","dialog.confirm.default":"OK","dialog.alert.default":"Got it","dialog.cancel.default":"Cancel","dirPicker.title.default":"Pick a directory","dirPicker.close.aria":"Close","dirPicker.up.aria":"Parent directory","dirPicker.up.title":"Parent directory","dirPicker.home.aria":"Back to home","dirPicker.home.title":"Back to home","dirPicker.loading":"Loading…","dirPicker.error.title":"Read failed","dirPicker.empty":"— empty —","dirPicker.enter.aria":"Enter {name}/","dirPicker.pickFile.aria":"Pick {name} (double-click to confirm)","dirPicker.fileLocked":"File not selectable","dirPicker.cancel":"Cancel","dirPicker.useFile":"Use this file","dirPicker.useFile.tooltip.empty":"Click a file first","dirPicker.useDir":"Use this directory","errorBoundary.title":"💥 UI crashed","errorBoundary.refresh":"Refresh page","chat.error.create.title":"Failed to create chat","chat.error.send.title":"Send failed","chat.error.fileTooBig.title":"File too large","chat.error.fileTooBig.body":"Per-file limit is 50 MB; this is {size} MB ({name})","chat.error.uploadAttachment.title":"Attachment upload failed","chat.placeholder.attachment":"(attachment)","chat.placeholder.viewAttachment":"(see attachment)","chat.placeholder.attachmentTitle":"Attachment","chat.attachment.previewTooltip":`{name}
369
+ {path}
370
+ Click to preview`,"chat.attachment.previewSimpleTooltip":`{name}
371
+ Click to zoom`,"chat.attachment.preview.aria":"Preview {name}","chat.attachment.close.aria":"Close","chat.attachment.readErr":"Read failed: {detail}","chat.attachment.loading":"Loading…","chat.attachment.unsupported":"This file type cannot be previewed inline.","chat.attachment.download":"Download","chat.message.role.you":"You","chat.message.role.error":"Error","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ Output exceeded 10MB and was truncated","chat.filePicker.title":"Pick attachment file","chat.newSession.title":"New chat","chat.newSession.title.aria":"New chat","chat.newSession.close.aria":"Close","chat.newSession.field.title":"Title (optional)","chat.newSession.field.title.placeholder":"Empty = auto-generate from first message","chat.newSession.field.cwd":"Working directory (optional)","chat.newSession.field.cwd.browse":"Browse","chat.newSession.field.cwd.browseAria":"Pick directory","chat.newSession.field.cwd.title":"Pick directory","chat.newSession.field.cwd.help1":"The agent reads/writes files here. Absolute path; must exist.","chat.newSession.field.cwd.help2":"Empty = use the daemon’s startup cwd.","chat.newSession.cancel":"Cancel","chat.newSession.create":"Create","cardModal.editing":"⚠ Editing","cardModal.title.aria":"Card title","cardModal.editAria":"Edit card","cardModal.edit":"Edit","cardModal.close.aria":"Close","cardModal.error.save.title":"Save failed","cardModal.error.load":"Load failed: {detail}","cardModal.skills.loading":"Loading skill list…","cardModal.label.removeAria":"Remove {label}","cardModal.label.addPlaceholder":"+ Add label","cardModal.label.addAria":"Add label","cardModal.label.note":"Note: AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX are managed by the pipeline; manual changes may be overwritten","cardModal.section.description":"Description","cardModal.section.empty":"(empty)","cardModal.section.checklist":"Checklist","cardModal.checklist.empty":"No checklist items. Add `- [ ] item` syntax in the description.","cardModal.section.log":"Log","cardModal.body.aria":"Card description","cardModal.body.replaceNote":'Only replaces the "## Description" section; checklist and log sections are untouched.',"cardModal.action.launch":"Launch worker","cardModal.action.launch.disabledDone":"Card is done; drag back to Todo to launch","cardModal.action.launch.disabledRunning":"Pipeline is running — supervisor dispatches automatically, no manual launch needed","cardModal.action.launch.error":"Launch worker failed","cardModal.action.reset":"Reset card","cardModal.action.reset.confirm.title":"Reset card #{seq}","cardModal.action.reset.confirm.body":"Card state goes back to initial; checklist progress is cleared.","cardModal.action.reset.confirm.button":"Reset","cardModal.action.reset.error":"Reset failed","cardModal.action.delete":"Delete card","cardModal.action.delete.confirm1.title":"Delete card #{seq}","cardModal.action.delete.confirm1.body":'About to delete "{title}". This cannot be undone (the md file is physically removed). Continue?',"cardModal.action.delete.confirm1.button":"Continue","cardModal.action.delete.confirm2.title":"Final confirmation","cardModal.action.delete.confirm2.body":"Please re-confirm deleting card #{seq}."},o2={"app.title":"SPS 控制台","nav.chat":"对话","nav.projects":"项目","nav.board":"看板","nav.workers":"Workers","nav.logs":"日志","nav.skills":"技能","nav.system":"系统","nav.aria":"主导航","lang.toggle.aria":"切换界面语言","lang.en":"EN","lang.zh":"中","status.server":"服务","status.offline":"离线","status.sse.open":"SSE","status.sse.connecting":"SSE·连接中","status.sse.down":"SSE·断开","status.pipelines.tooltip":"活跃流水线数","status.workers.tooltip":"活跃 Worker 数","status.pipeline.unit":"流水线","status.worker.unit":"Worker","common.save":"保存","common.cancel":"取消","common.delete":"删除","common.confirm":"确认","common.create":"创建","common.edit":"编辑","common.close":"关闭","common.loading":"加载中…","common.error":"出错","common.retry":"重试","common.empty":"暂无内容","common.search":"搜索","common.refresh":"刷新","common.copy":"复制","common.copied":"已复制","common.yes":"是","common.no":"否","common.required":"必填","common.optional":"可选","common.ok":"好","projects.title":"项目 🎯","projects.count":"本机有 {count} 个项目","projects.refresh.hint":"点击刷新重试","projects.new":"新建项目","projects.load.failed":"加载失败","projects.empty.title":"还没有项目 ✨","projects.empty.hint":"运行 {cmd} 创建第一个项目。","newProject.title":"新建项目","newProject.subtitle":"配置一个项目,worker 自动开跑","newProject.field.name":"项目名","newProject.field.name.help":"只允许小写字母、数字、_ 和 -","newProject.field.dir":"项目目录","newProject.field.dir.help":"绝对路径;不存在会自动创建","newProject.field.branch":"合并目标分支","newProject.field.branch.help":"默认 main","newProject.field.maxWorkers":"最大并发 Worker 数","newProject.field.maxWorkers.help":"单项目并发数(推荐 1)","newProject.field.ackTimeout":"ACK 超时(秒)","newProject.field.ackTimeout.help":"Worker 响应等待秒数(默认 300)","newProject.field.gitlabProject":"GitLab/GitHub 远程","newProject.field.gitlabProject.help":"格式:用户名/仓库(可选)","newProject.field.matrixRoom":"Matrix 房间 ID","newProject.field.matrixRoom.help":"可选;不填则用全局默认","newProject.field.git":"启用 git","newProject.field.git.help":"关闭 → 非代码项目,跳过 commit/push/MR","newProject.field.wiki":"启用 Wiki 知识库","newProject.field.wiki.help":"v0.51+:在项目下生成 wiki/ 骨架,Worker prompt 自动注入 5 层检索","newProject.submit":"创建项目","newProject.creating":"创建中…","newProject.created":"项目已创建","newProject.error.dirRequired":"项目目录必填","newProject.dir.browse":"浏览","newProject.dir.browseAria":"选择目录","newProject.back":"返回","newProject.back.aria":"返回项目列表","newProject.field.name.placeholder":"例如:acme-web","newProject.field.name.example":"只能用字母、数字、下划线、连字符。例如 acme-web","newProject.field.name.invalid":"名称只能包含 a-z A-Z 0-9 _ -","newProject.field.dir.long":"本机绝对路径(代码或文档都可)。和是否启用 git 无关。","newProject.field.dir.placeholder":"/home/you/code/acme","newProject.field.dir.createIfMissing":"目录不存在时自动创建(推荐 —— 否则 .claude/ 和 wiki/ 安装会被跳过)","newProject.field.dir.pickerTitle":"选择项目目录","newProject.field.maxWorkers.short":"最大 Worker 数","newProject.field.ackTimeout.minutes":"ACK 超时(分钟)","newProject.field.ackTimeout.minutes.help":"Worker 启动后多久没 ACK 视为失败","newProject.field.git.label":"启用 Git(Worker 自动 commit + push)","newProject.field.git.detail":"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。","newProject.field.git.branch":"合并分支","newProject.field.gitlabProject.label":"Git 远程项目路径","newProject.field.gitlabProject.help2":"如 user/repo,空则跳过远程 API(只本地 commit/push)","newProject.field.gitlabProject.placeholder":"user/repo","newProject.field.gitlabProjectId":"GitLab 项目 ID","newProject.field.gitlabProjectId.help":"数字;GitHub 用户留空","newProject.field.gitlabProjectId.placeholder":"42","newProject.field.wiki.label":"启用 Wiki 知识库(per-project,doc-28)","newProject.field.wiki.detail":"开启后自动 scaffold {wikiCode} 目录,并向 Worker prompt 注入 5 层检索上下文与 wiki-update 提示。可后续 {wikiInit} 补办。","newProject.section.notifications":"通知","newProject.field.matrixRoom.label":"Matrix 房间 ID","newProject.field.matrixRoom.help2":"空则使用全局配置;不填 = 不通知","newProject.field.matrixRoom.placeholder":"!abc:matrix.example.com","newProject.error.create.title":"创建失败","projectDetail.tab.pipeline":"流水线","projectDetail.tab.conf":"配置","projectDetail.tab.delete":"删除项目","projectDetail.delete.title":"删除该项目","projectDetail.delete.warn":"会删除项目配置、运行时和 worktree。{repoDir} 下的代码仓库不动。","projectDetail.delete.confirmLabel":"输入项目名以确认","projectDetail.delete.button":"删除项目","projectDetail.delete.deleting":"删除中…","projectDetail.lastActivity":"最后活跃","projectDetail.notFound":"项目不存在","projectDetail.notFoundHint":"可能已被删除或重命名。","projectDetail.backToList":"返回项目列表","pipeline.editor.title":"流水线 YAML","pipeline.editor.savedAt":"{time} 已保存","pipeline.editor.unsaved":"有未保存的修改","pipeline.editor.save":"保存","pipeline.editor.saving":"保存中…","pipeline.editor.reload":"从磁盘重新加载","pipeline.editor.discard.title":"放弃未保存的修改?","pipeline.editor.discard.body":"你的编辑会丢失。","pipeline.editor.errors":"YAML 解析错误","pipeline.editor.list":"流水线","pipeline.editor.list.add":"新建流水线","pipeline.editor.list.delete":"删除流水线","pipeline.editor.list.use":"设为当前","pipeline.editor.list.activeBadge":"当前","pipeline.editor.list.sample":"示例","pipeline.editor.delete.confirm.title":"删除流水线 {name}?","pipeline.editor.delete.confirm.body":"此操作不可撤销。","pipeline.newDialog.title":"新建流水线","pipeline.newDialog.field.filename":"文件名","pipeline.newDialog.field.filename.help":"只允许字母、数字、_ 和 -;自动追加 .yaml","pipeline.newDialog.field.copyFrom":"复制自","pipeline.newDialog.copyFrom.sample":"示例模板","pipeline.newDialog.copyFrom.active":"当前活动","pipeline.newDialog.create":"创建","projectDetail.tab.overview":"概览","projectDetail.tab.config":"配置","projectDetail.tab.pipelines":"流水线","projectDetail.tab.danger":"危险操作","projectDetail.openBoard":"看板","projectDetail.overview.repoDir":"仓库路径","projectDetail.overview.pmBackend":"PM 后端","projectDetail.overview.agent":"Agent","projectDetail.overview.cards":"卡片","projectDetail.overview.cards.value":"共 {total} 张 · {inprogress} 进行中 · {done} 完成","projectDetail.overview.workers":"Worker","projectDetail.overview.workers.value":"共 {total} 个({active} 活跃)","projectDetail.overview.pipeline":"Pipeline","projectDetail.overview.lastActivity":"最近活动","projectDetail.overview.notFound":"项目 {name} 不存在或无法读取。","projectDetail.config.confDirty":"● 未保存的修改","projectDetail.config.reload":"重新加载","projectDetail.config.save":"保存","projectDetail.config.saveAria":"保存配置","projectDetail.config.editorAria":"conf 文件编辑器","projectDetail.config.error.conflict.title":"配置已被其他地方修改","projectDetail.config.error.conflict.body":'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。',"projectDetail.config.error.save.title":"保存失败","projectDetail.config.error.load":"加载失败:{detail}","projectDetail.pipelines.title":"流水线","projectDetail.pipelines.add":"新建流水线","projectDetail.pipelines.empty":'还没有流水线文件。点"新建流水线"开始。',"projectDetail.pipelines.activeBadge":"当前","projectDetail.pipelines.edit":"编辑","projectDetail.pipelines.editAria":"编辑 {name}","projectDetail.pipelines.switch":"切换","projectDetail.pipelines.switchAria":"切换到 {name}","projectDetail.pipelines.switch.confirm.title":"切换到 {name}","projectDetail.pipelines.switch.confirm.body":"当前 project.yaml 会被 {name} 的内容覆盖。继续?","projectDetail.pipelines.switch.confirm.button":"切换","projectDetail.pipelines.switch.error":"切换失败","projectDetail.pipelines.delete.confirm.title":"删除 {name}","projectDetail.pipelines.delete.confirm.body":"这个流水线文件会被永久删除。","projectDetail.pipelines.delete.error":"删除失败","projectDetail.pipelines.deleteAria":"删除 {name}","projectDetail.pipelines.create.error":"创建失败","projectDetail.danger.title":"删除项目","projectDetail.danger.body":"这会清理 {path}(包括所有卡片、runtime、logs)。","projectDetail.danger.includeClaude.label":"同时清理 repo 的 .claude/","projectDetail.danger.includeClaude.note":"repo 本身不动,只清这个目录。","projectDetail.danger.confirmPrompt":"输入项目名 {name} 确认:","projectDetail.danger.deleteAria":"永久删除项目","projectDetail.danger.deleteButton":"永久删除","projectDetail.danger.deleted.title":"已删除","projectDetail.danger.deleted.bodyWithList":`项目已删除。同时清理了:
372
+ {paths}`,"projectDetail.danger.deleted.body":"项目已删除。","projectDetail.danger.error":"删除失败","pipelineEditor.close":"关闭","pipelineEditor.error.conflict.title":"文件已被其他地方修改","pipelineEditor.error.yaml.title":"YAML 语法错误","pipelineEditor.error.save.title":"保存失败","pipelineEditor.error.serialize.title":"YAML 序列化失败","pipelineEditor.error.load":"加载失败:{detail}","pipelineEditor.mode.structured":"结构化","pipelineEditor.mode.yaml":"原始 YAML","pipelineEditor.parseError.prefix":"YAML 解析:{detail}","pipelineEditor.activeWarning":"⚠ 这是当前激活的流水线,保存后下一轮 tick 生效","pipelineEditor.yamlAria":"pipeline YAML 编辑器","pipelineEditor.status.unsaved":"● 未保存","pipelineEditor.status.saved":"已保存","pipelineEditor.status.noChanges":"无变化","pipelineEditor.reload":"重新加载","pipelineEditor.save":"保存","pipelineEditor.saveAria":"保存 pipeline","pipelineEditor.activeBadge":"当前","pipelineEditor.modeHint":"project = 事件驱动流水线(默认) · steps = 顺序脚本","pipelineEditor.stages.heading":"Stages({count})","pipelineEditor.stages.add":"添加 stage","pipelineEditor.stages.empty":'还没 stage。点"添加 stage"开始。',"pipelineEditor.stage.name.hint":"stage 唯一名","pipelineEditor.stage.profile.hint":"skill 画像,可空","pipelineEditor.stage.cardState.hint":"本 stage 期间卡片状态","pipelineEditor.stage.timeout.hint":"可选,如 30m 2h","pipelineEditor.stage.trigger.hint":"触发条件,可空走默认","pipelineEditor.stage.onComplete.hint":"成功后动作","pipelineEditor.stage.onFail.action.hint":"失败时动作,如 label NEEDS-FIX","pipelineEditor.stage.onFail.comment.hint":"写进卡片的注释","pipelineEditor.stage.halt.note":"(失败后停流水线;去掉则继续下一张卡)","pipelineEditor.stage.moveUp":"上移","pipelineEditor.stage.moveDown":"下移","pipelineEditor.stage.remove":"删除 stage","newPipelineDialog.title":"新建流水线","newPipelineDialog.field.filename.label":"文件名","newPipelineDialog.field.filename.placeholder":"例如 ci","newPipelineDialog.field.filename.help":"实际会保存为 {filename}。只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。","newPipelineDialog.section.template":"初始内容","newPipelineDialog.template.blank.label":"空白模板","newPipelineDialog.template.blank.desc":"最简 1 stage(develop → Done)","newPipelineDialog.template.sample.label":"教学模板","newPipelineDialog.template.sample.desc":"从 sample.yaml.example 复制(带注释,讲解所有字段)","newPipelineDialog.template.sample.unavailable":"sample.yaml.example 不存在","newPipelineDialog.template.active.label":"复制当前活动的","newPipelineDialog.template.active.desc":"从 project.yaml 复制(基于目前的配置改)","newPipelineDialog.template.active.unavailable":"project.yaml 不存在","newPipelineDialog.create.aria":"创建 pipeline","newPipelineDialog.cancel":"取消","board.title":"看板 ✨","board.title.bare":"看板","board.subtitle":"{name} · {cards} 张卡片 · {workers} workers 活跃","board.pickPrompt.title":"选择一个项目 🎯","board.pickPrompt.body":"看板按项目分。挑一个开始:","board.action.start":"启动","board.action.stop":"停止","board.action.startAria":"启动 pipeline","board.action.stopAria":"停止 pipeline","board.action.startError":"启动 pipeline 失败","board.action.stopError":"停止 pipeline 失败","board.action.reset":"重置","board.action.resetError":"重置失败","board.action.reset.confirm.title":"重置整个流水线","board.action.reset.confirm.body":"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。","board.action.reset.confirm.button":"重置全部","board.action.newCard":"新卡片","board.action.newCard.error":"新建卡片失败","board.action.moveCard.error":"移动卡片失败","board.search.placeholder":"搜索标题 / skill / label…","board.search.aria":"搜索卡片","board.filter.clear":"清空","board.filter.clearAria":"清空筛选","board.filter.aria":"按 {label} 筛选","board.filter.clearSelection":"清空选择","board.error.loadCards":"加载卡片失败","board.col.planning":"Planning","board.col.backlog":"Backlog","board.col.todo":"Todo","board.col.inprogress":"Inprogress","board.col.qa":"QA / Review","board.col.done":"Done","kanban.checklist.label":"检查清单 {done}/{total}","kanban.checklist.more":"… 还有 {count} 条","kanban.column.empty":"— 空 —","kanban.time.justNow":"刚才","kanban.time.minutes":"{n} 分钟前","kanban.time.hours":"{n} 小时前","kanban.time.days":"{n} 天前","newCard.title":"新建卡片","newCard.field.title":"标题 *","newCard.field.title.placeholder":"例如:接入 GitHub OAuth 登录","newCard.field.title.help":"写简短明了的目标(<200 字符)","newCard.field.description":"描述","newCard.field.description.placeholder":"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容","newCard.field.description.help":"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。","newCard.field.skills":"技能","newCard.field.skills.help":"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。","newCard.field.skills.loading":"加载 skill 列表…","newCard.field.skills.error":"skill 列表加载失败,不影响创建:{detail}","newCard.field.skills.selected":"已选 {count} 个:{names}","newCard.field.dispatch":"派发","newCard.field.dispatch.label":"立即派发执行(直接进 Backlog)","newCard.field.dispatch.help":"默认不勾:卡进 Planning 暂存,等你看板上拖到 Backlog 再开工。勾上:跳过暂存,下次 tick 直接派 worker 跑。","newCard.create.aria":"创建卡片","cardDetail.loading":"加载中…","cardDetail.error.load":"卡片加载失败","cardDetail.tabs.overview":"概览","cardDetail.tabs.body":"描述","cardDetail.tabs.checklist":"检查清单","cardDetail.tabs.history":"历史","cardDetail.tabs.actions":"操作","cardDetail.field.state":"状态","cardDetail.field.skills":"技能","cardDetail.field.labels":"标签","cardDetail.field.branch":"分支","cardDetail.field.assignee":"处理人","cardDetail.field.created":"创建时间","cardDetail.field.updated":"更新时间","cardDetail.field.empty":"—","cardDetail.actions.delete":"删除卡片","cardDetail.actions.delete.confirm.title":"删除卡片 #{seq}","cardDetail.actions.delete.confirm.body":"该卡片会被永久删除。","cardDetail.actions.delete.error":"删除失败","cardDetail.actions.update.error":"更新失败","cardDetail.body.empty":"没有描述","cardDetail.checklist.empty":"没有检查清单","cardDetail.checklist.progress":"进度 {done}/{total}","cardDetail.history.empty":"没有历史记录","cardDetail.notFound":"卡片 #{seq} 不存在","cardDetail.copy.aria":"复制 seq","cardDetail.close.aria":"关闭","cardDetail.save":"保存","cardDetail.saving":"保存中…","workers.title":"Workers 👷","workers.summary":"跨 {projects} 项目 · {running} 跑 · {starting} 启动 · {stuck} 卡 · {crashed} 崩 · {idle} 闲","workers.summary.stuck":"{n} 卡","workers.summary.crashed":"{n} 崩","workers.refresh.aria":"刷新","workers.refresh":"刷新","workers.error.load":"加载失败:{detail}","workers.empty.hint":"点击项目 / worker 查看详情","logs.title":"日志 📜","logs.subtitle.allProjects":"全部项目","logs.subtitle.project":"{name} 实时日志","logs.filter.errors":"只看错误","logs.filter.errors.aria":"只显示错误","logs.filter.search.placeholder":"过滤消息…","logs.empty":"还没有日志 —— 等待事件中","logs.error.load":"日志加载失败","logs.refresh":"刷新","logs.refresh.aria":"刷新日志","logs.scroll.bottom.aria":"滚动到底部","logs.scroll.pause":"已暂停(自动滚动关闭)","logs.scroll.resume":"恢复自动滚动","logs.subtitle.allProjectsCount":"全部项目({count})","logs.poll.5s":"5s 轮询","logs.paused":"⏸ 已暂停","logs.mode.live":"实时","logs.mode.history":"历史","logs.history.startAria":"查询起始时间","logs.history.queryAria":"查询","logs.history.query":"查询","logs.filter.project.aria":"筛选项目","logs.filter.project.all":"全部项目","logs.filter.keyword.placeholder":"过滤关键字…","logs.filter.keyword.aria":"过滤日志","logs.empty.match":"没有匹配的日志","skills.title":"技能 🧠","skills.subtitle":"跨项目共用的 skill(用 `sps skill ...` 管理)","skills.empty.title":"还没有 skill","skills.empty.hint":"运行 {cmd} 同步 bundled skills。","skills.linked.tooltip":"已链接到该项目","skills.frozen.tooltip":"已冻结(项目独立副本)","skills.category.all":"全部","skills.category.language":"语言","skills.category.end":"终端","skills.category.persona":"角色","skills.category.workflow":"流程","skills.category.other":"其它","skills.subtitleCount":"{count} 个 user-level skill","skills.search.placeholder":"搜索 skill…","skills.search.aria":"搜索 skill","skillDetail.actionFailed":"{label}失败","skillDetail.unfreezeAction":"解冻","skillDetail.freezeAction":"冻结","skillDetail.removeAction":"移除","skillDetail.removeConfirm.title":"从 {project} 移除 {name}","skillDetail.removeConfirm.body":"skill 链接会被解除,项目后续运行时将无法使用该 skill。","skillDetail.removeConfirm.button":"移除","skillDetail.unfreezeConfirm.title":"解冻 {name} @ {project}","skillDetail.unfreezeConfirm.body":"本地对这个 skill 的改动会被覆盖,回到最新共享版本。","skillDetail.unfreezeConfirm.button":"解冻","skillDetail.close.aria":"关闭","skillDetail.loading":"加载中…","skillDetail.error.load":"加载失败:{detail}","skillDetail.section.projects":"项目链接状态","skillDetail.section.empty":"还没有任何项目。先去创建一个项目。","skillDetail.section.preview":"SKILL.md 预览","skillDetail.toggleSection.aria":"{action} {file}","skillDetail.expand":"展开","skillDetail.collapse":"收起","system.title":"系统 🛠","system.subtitle":"全局配置 + 诊断 + 升级","system.section.env":"全局 env","system.section.env.help":"存储在 ~/.coral/env(mode 600)。所有项目共用。","system.section.env.save":"保存 env","system.section.env.error.conflict":"env 已被其它地方修改","system.section.env.error.save":"保存 env 失败","system.section.env.error.load":"加载 env 失败","system.section.env.dirtyDot":"● 未保存","system.section.env.aria":"env 编辑器","system.section.env.reload":"重新加载","system.section.upgrade":"升级","system.section.upgrade.current":"当前:v{version}","system.section.upgrade.latest":"npm 最新:v{version}","system.section.upgrade.uptodate":"已是最新","system.section.upgrade.update":"立即升级","system.section.upgrade.upgrading":"升级中…","system.section.upgrade.checking":"正在查询 npm…","system.section.upgrade.checkError":"查询失败:{detail}","system.section.upgrade.upgradeError":"升级失败:{detail}","system.section.upgrade.upgradeError.title":"升级失败","system.section.upgrade.command":"或在终端执行:{cmd}","system.section.upgrade.runningPipelines":"有 pipeline 在跑,先停止:{projects}","system.section.diagnostics":"诊断","system.section.diagnostics.help":"一次性跑所有项目的 sps doctor,看哪些项目出问题","system.section.diagnostics.run":"运行诊断","system.section.diagnostics.running":"运行中…","system.section.diagnostics.empty":"没有项目","system.section.diagnostics.checkAria":"检查 {project}","system.section.diagnostics.statusOk":"正常","system.section.diagnostics.statusFail":"有问题","system.section.diagnostics.error":"诊断失败:{detail}","system.h1":"系统 ⚙️","system.runtime":"运行时","system.env.title.code":"~/.coral/env","system.env.title.prefix":"全局配置 ","system.env.edit.aria":"编辑 env 文件","system.env.edit.button":"编辑","system.env.editing.label":"⚠ 编辑模式","system.env.empty.before":'env 文件不存在。点"编辑"或者终端运行 ',"system.env.empty.after":"。","system.env.warning":"⚠ 文件包含凭证明文。保存时保持 0600 权限。","system.env.aria":"env 文件编辑器","system.env.dirtyMark":" · ● 未保存","system.env.cancel":"取消","system.env.save":"保存","system.env.save.aria":"保存 env","system.env.error.conflict.title":"env 被其他地方修改了","system.env.error.save.title":"保存失败","system.env.error.conflict.body":"请点取消后重开编辑。","system.upgrade.title":"版本","system.upgrade.checkLatest.aria":"检查最新版本","system.upgrade.checkUpdate":"检查更新","system.upgrade.label.current":"sps-cli(当前)","system.upgrade.label.latest":"npm(最新)","system.upgrade.latestPill":"最新","system.upgrade.button.upgradeAria":"升级到最新版本","system.upgrade.button.upgrade":"升级","system.upgrade.button.copyAria":"复制升级命令","system.upgrade.button.copyTitle":"自动升级失败时手动跑","system.upgrade.button.copy":"复制命令","system.upgrade.label.installed":"已安装","system.upgrade.installed.ok":"已生效(重启 console 后可见)","system.upgrade.installed.fail":"未升级成功","system.upgrade.label.check":"检查","system.upgrade.confirm.title":"升级 sps-cli","system.upgrade.confirm.body":"当前 {current},升级到 {latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。","system.upgrade.confirm.button":"升级","system.upgrade.success.title":"升级完成","system.upgrade.success.body":'装上了 v{version}。请 `pkill -f "sps console"` 再重启以生效。',"system.upgrade.notEffective.title":"升级未生效","system.upgrade.notEffective.same":"npm 执行完毕但版本没变(仍 {version})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。","system.upgrade.notEffective.notInstalled":"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。","system.upgrade.error.title":"升级失败","system.upgrade.copy.success.title":"命令已复制","system.upgrade.copy.success.body":`粘贴到终端运行即可:
373
+ {cmd}`,"system.upgrade.copy.fail.title":"复制失败","system.upgrade.copy.fail.body":`请手动复制:
374
+ {cmd}`,"system.diagnostics.title":"项目健康检查","system.diagnostics.checkAll":"检查全部","system.diagnostics.empty":"还没有项目。","system.diagnostics.expandAria":"展开","system.diagnostics.collapseAria":"折叠","system.diagnostics.never":'点 "检查" 运行 sps doctor',"system.diagnostics.checkAria":"检查","system.diagnostics.check":"检查","system.diagnostics.noFixesNeeded":"已无可修问题","system.diagnostics.fix.tip":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等","system.diagnostics.fixAria":"自动修复","system.diagnostics.fix":"修复","system.diagnostics.fixed":"已修复","system.diagnostics.error.fix":"doctor 修复失败","system.diagnostics.error.check":"doctor 检查失败","chat.title":"对话 💬","chat.empty.title":"对话 💬","chat.empty.hint":'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。',"chat.empty.shortcuts":"Enter 发送 · Shift+Enter 换行 · 内容流式返回","chat.list.heading":"历史 {count}","chat.list.new":"新建对话","chat.list.empty":"还没对话。点上面新建。","chat.list.delete.aria":"删除对话","chat.list.deleteCli.aria":"从 Console 移除该 CLI 会话(不影响 Claude jsonl 存档)","chat.list.openAria":"打开对话 {title}{cwd}","chat.list.cwdSuffix":"(工作目录 {cwd})","chat.list.msgs":"{count} 条 · {time}","chat.delete.confirm.title":"删除对话","chat.delete.confirm.body.cli":"会从 Console 列表移除(停 daemon 会话)。Claude CLI 在 ~/.claude/projects 下的对话存档会保留 —— 想恢复到终端继续聊就重新跑 sps agent --chat --name <名>。","chat.delete.confirm.body.console":"对话记录会永久删除,不可恢复。","chat.delete.confirm.button":"删除","chat.cli.banner.bold":"CLI 会话","chat.cli.banner":"这是 CLI 会话(由 sps agent 创建),Console 仅展示历史。续聊请在终端运行:","chat.input.placeholder":"说点什么… (Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)","chat.input.dragOver":"松开鼠标以附加文件…","chat.input.aria":"消息输入","chat.input.attach.aria":"附加本地文件","chat.input.attach.title":"附加本地文件(也可拖拽 / 粘贴图片)","chat.input.send":"发送","chat.input.send.aria":"发送","chat.input.interrupt":"中断","chat.input.interrupt.aria":"中断生成","chat.input.uploading":"上传中…","chat.input.removeAttachment":"移除 {name}","chat.error.interrupt.title":"中断失败","chat.cliBadge":"CLI","chat.cliBadge.tooltip":"该会话由 sps agent CLI 创建,从 Claude jsonl 实时读取(只读)","chat.session.title":"{title}","chat.session.id":"{id}","chat.session.empty":"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行","notFound.title":"404","notFound.body":"这个页面不存在。","notFound.home":"回到首页","workers.active.empty":"没有 worker 在运行。","workers.alerts.allHealthy":"全部 worker 健康","workers.alerts.pidDead":"PID 已死。","workers.alerts.markerStale":"marker 停 {ago}。","workers.capacity.col.project":"项目","workers.capacity.col.usage":"占用","workers.capacity.col.other":"其它","workers.capacity.detailHint":"详情 →","workers.panel.boardLink":"看板 →","workers.panel.loading":"加载 workers…","workers.panel.empty.slots":"该项目没有 worker slot。","workers.panel.empty.noWorker":"无 worker","workers.panel.empty.pickOne":"请选择一个 worker","workers.panel.idle.short":"空闲","workers.panel.section.currentCard":"当前卡片","workers.panel.idle.full":"slot 空闲,没有当前卡片。","workers.panel.section.claudeOutput":"Claude 输出 · 最近 {n} 行","workers.panel.output.loading":"加载中…","workers.panel.output.empty":"还没收到 session 输出。Worker 刚启动时需要几秒。","workers.panel.section.heartbeat":"Supervisor 心跳 · 最近 {n} 行","workers.panel.heartbeat.fullLog":"查看完整 log →","workers.panel.action.restart":"重启","workers.panel.action.restart.confirm.title":"重启 worker-{slot}","workers.panel.action.restart.confirm.body":"先杀进程,再重新 launch 到 #{seq}","workers.panel.action.restart.confirm.button":"重启","workers.panel.action.restart.error":"重启失败","workers.panel.action.kill":"终止","workers.panel.action.kill.confirm.title":"终止 worker-{slot}","workers.panel.action.kill.confirm.body":"当前任务强制中断。","workers.panel.action.kill.confirm.button":"终止","workers.panel.action.kill.error":"终止失败","dialog.confirm.default":"确定","dialog.alert.default":"知道了","dialog.cancel.default":"取消","dirPicker.title.default":"选择目录","dirPicker.close.aria":"关闭","dirPicker.up.aria":"上级目录","dirPicker.up.title":"上级目录","dirPicker.home.aria":"回到 Home","dirPicker.home.title":"回到 Home","dirPicker.loading":"加载中...","dirPicker.error.title":"读取失败","dirPicker.empty":"— 空目录 —","dirPicker.enter.aria":"进入 {name}/","dirPicker.pickFile.aria":"选择 {name}(双击直接确认)","dirPicker.fileLocked":"文件不可选","dirPicker.cancel":"取消","dirPicker.useFile":"使用此文件","dirPicker.useFile.tooltip.empty":"请先点选一个文件","dirPicker.useDir":"选此目录","errorBoundary.title":"💥 UI 崩了","errorBoundary.refresh":"刷新页面","chat.error.create.title":"新建对话失败","chat.error.send.title":"发送失败","chat.error.fileTooBig.title":"文件超过上限","chat.error.fileTooBig.body":"单文件上限 50 MB;当前 {size} MB({name})","chat.error.uploadAttachment.title":"附件上传失败","chat.placeholder.attachment":"(附件)","chat.placeholder.viewAttachment":"(请查看附件)","chat.placeholder.attachmentTitle":"附件","chat.attachment.previewTooltip":`{name}
375
+ {path}
376
+ 点击预览`,"chat.attachment.previewSimpleTooltip":`{name}
377
+ 点击放大`,"chat.attachment.preview.aria":"预览 {name}","chat.attachment.close.aria":"关闭","chat.attachment.readErr":"读取失败:{detail}","chat.attachment.loading":"加载中...","chat.attachment.unsupported":"此文件类型不支持内联预览。","chat.attachment.download":"下载","chat.message.role.you":"你","chat.message.role.error":"错误","chat.message.role.assistant":"assistant","chat.message.truncated":"⚠ 输出超过 10MB,已截断","chat.filePicker.title":"选择附件文件","chat.newSession.title":"新建对话","chat.newSession.title.aria":"新建对话","chat.newSession.close.aria":"关闭","chat.newSession.field.title":"标题(可选)","chat.newSession.field.title.placeholder":"留空 = 自动用首条消息生成","chat.newSession.field.cwd":"工作目录(可选)","chat.newSession.field.cwd.browse":"浏览","chat.newSession.field.cwd.browseAria":"浏览选择目录","chat.newSession.field.cwd.title":"选择目录","chat.newSession.field.cwd.help1":"Agent 在该目录下读写文件。绝对路径,必须存在。","chat.newSession.field.cwd.help2":"留空则用 daemon 启动时的目录。","chat.newSession.cancel":"取消","chat.newSession.create":"创建","cardModal.editing":"⚠ 编辑中","cardModal.title.aria":"卡片标题","cardModal.editAria":"编辑卡片","cardModal.edit":"编辑","cardModal.close.aria":"关闭","cardModal.error.save.title":"保存失败","cardModal.error.load":"加载失败:{detail}","cardModal.skills.loading":"加载 skill 列表…","cardModal.label.removeAria":"删除 {label}","cardModal.label.addPlaceholder":"+ 添加 label","cardModal.label.addAria":"添加 label","cardModal.label.note":"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖","cardModal.section.description":"描述","cardModal.section.empty":"(空)","cardModal.section.checklist":"检查清单","cardModal.checklist.empty":"暂无清单项。在描述里用 `- [ ] 项` 语法添加。","cardModal.section.log":"日志","cardModal.body.aria":"卡片描述","cardModal.body.replaceNote":'只替换 "## 描述" 段的内容;检查清单和日志段不动。',"cardModal.action.launch":"启动 worker","cardModal.action.launch.disabledDone":"卡片已完成;先拖回 Todo 再启动","cardModal.action.launch.disabledRunning":"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动","cardModal.action.launch.error":"启动 worker 失败","cardModal.action.reset":"重置卡片","cardModal.action.reset.confirm.title":"重置卡片 #{seq}","cardModal.action.reset.confirm.body":"卡片状态会回到初始,已做的 checklist 会清空。","cardModal.action.reset.confirm.button":"重置","cardModal.action.reset.error":"重置失败","cardModal.action.delete":"删除卡片","cardModal.action.delete.confirm1.title":"删除卡片 #{seq}","cardModal.action.delete.confirm1.body":'即将删除 "{title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?',"cardModal.action.delete.confirm1.button":"继续","cardModal.action.delete.confirm2.title":"最终确认","cardModal.action.delete.confirm2.body":"请再次确认删除卡片 #{seq}。"},pk=A.createContext(null),mk="sps-console-lang";function c2(){if(typeof window>"u")return"en";try{const e=window.localStorage.getItem(mk);if(e==="en"||e==="zh")return e}catch{}return"en"}function u2(e){try{window.localStorage.setItem(mk,e)}catch{}}function d2({children:e}){const[t,n]=A.useState(()=>c2());A.useEffect(()=>{typeof document<"u"&&(document.documentElement.lang=t==="zh"?"zh-CN":"en")},[t]);const a=A.useCallback(c=>{n(c),u2(c)},[]),s=A.useMemo(()=>{const c=t==="zh"?o2:l2;return(d,f)=>{let p=c[d]??d;if(f)for(const[b,g]of Object.entries(f))g!==void 0&&(p=p.replace(`{${b}}`,String(g)));return p}},[t]),o=A.useMemo(()=>({lang:t,setLang:a,t:s}),[t,a,s]);return h.jsx(pk.Provider,{value:o,children:e})}function gk(){const e=A.useContext(pk);if(!e)throw new Error("useLang must be used inside I18nProvider");return e}function Ue(){return gk().t}function f2(){const{lang:e,setLang:t,t:n}=gk();return h.jsxs("div",{role:"group","aria-label":n("lang.toggle.aria"),className:"flex border-2 border-[var(--color-text)] rounded-lg overflow-hidden shadow-[2px_2px_0_var(--color-text)]",children:[h.jsx(Vv,{active:e==="en",onClick:()=>t("en"),label:n("lang.en"),ariaLabel:"English"}),h.jsx(Vv,{active:e==="zh",onClick:()=>t("zh"),label:n("lang.zh"),ariaLabel:"中文"})]})}function Vv({active:e,onClick:t,label:n,ariaLabel:a}){return h.jsx("button",{type:"button",onClick:t,"aria-label":a,"aria-pressed":e,className:["flex-1 py-1.5 text-xs font-bold font-[family-name:var(--font-mono)] cursor-pointer transition-colors",e?"bg-[var(--color-accent-mint)] text-[var(--color-text)]":"bg-[var(--color-bg)] text-[var(--color-text-muted)] hover:bg-[var(--color-bg-cream)]"].join(" "),children:n})}const h2=[{to:"/chat",labelKey:"nav.chat",icon:TA},{to:"/projects",labelKey:"nav.projects",icon:kA},{to:"/board",labelKey:"nav.board",icon:vA},{to:"/workers",labelKey:"nav.workers",icon:dk},{to:"/logs",labelKey:"nav.logs",icon:kc},{to:"/skills",labelKey:"nav.skills",icon:fA},{to:"/system",labelKey:"nav.system",icon:ok}];function p2(){const e=Ue();return h.jsxs(h.Fragment,{children:[h.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:[h.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)]"}),e("app.title")]}),h.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":e("nav.aria"),children:h2.map(t=>{const n=t.icon;return h.jsxs(J0,{to:t.to,className:({isActive:a})=>["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",a?"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:[h.jsx(n,{size:18,strokeWidth:2.5}),e(t.labelKey)]},t.to)})}),h.jsx("div",{className:"mt-auto pt-3",children:h.jsx(f2,{})})]})}class m2 extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function Ht(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 m2(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function bk(){return Ht("/api/system/info")}function g2(){return Ht("/api/system/env")}function b2(){return Ht("/api/system/env/raw")}async function y2(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 x2(){return Ht("/api/system/latest-version")}async function v2(){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 w2(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 Ht("/api/projects")}function k2(e){return Ht(`/api/projects/${encodeURIComponent(e)}`)}async function E2(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 S2(e){return Ht(`/api/projects/${encodeURIComponent(e)}/conf`)}async function _2(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 N2(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 C2(e){return Ht(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function T2(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 A2(e,t){return Ht(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function j2(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 O2(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 D2(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 M2(){var f;const e=Ue(),t=ct({queryKey:["system-info"],queryFn:bk,refetchInterval:3e4}),n=ct({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}),a=L2(),s=!t.isError,o=((f=n.data)==null?void 0:f.data)??[],c=o.filter(p=>p.pipelineStatus==="running").length,d=o.reduce((p,b)=>p+b.workers.active,0);return h.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:[h.jsx("span",{className:"nb-status",style:{background:s?"var(--color-running-bg)":"var(--color-crashed-bg)",color:s?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:e(s?"status.server":"status.offline")}),h.jsx(R2,{state:a}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{className:"flex items-center gap-1",title:e("status.pipelines.tooltip"),children:[h.jsx(zd,{size:10,strokeWidth:2.5}),h.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," ",e("status.pipeline.unit")]}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{className:"flex items-center gap-1",title:e("status.workers.tooltip"),children:[h.jsx(sk,{size:10,strokeWidth:2.5}),h.jsx("span",{className:"font-bold text-[var(--color-text)]",children:d})," ",e("status.worker.unit")]}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{children:["localhost:",window.location.port]}),t.data&&h.jsxs(h.Fragment,{children:[h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{children:["v",t.data.version]}),h.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),h.jsxs("span",{children:["node ",t.data.nodeVersion]})]})]})}function R2({state:e}){const t=Ue();return e==="open"?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:t("status.sse.open")}):e==="connecting"?h.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:t("status.sse.connecting")}):h.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[h.jsx(sc,{size:9,strokeWidth:2.5}),t("status.sse.down")]})}function L2(){const[e,t]=A.useState("connecting");return A.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 I2(){return h.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[h.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:h.jsx(p2,{})}),h.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:h.jsx(HC,{})}),h.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:h.jsx(M2,{})})]})}function hm(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 z2(){typeof window>"u"||(window.addEventListener("error",e=>{hm(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;hm(t instanceof Error?t:String(t),"unhandledrejection")}))}class B2 extends A.Component{constructor(){super(...arguments);bv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;hm(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){if(this.state.error){const n=(()=>{try{return window.localStorage.getItem("sps-console-lang")==="zh"?"zh":"en"}catch{return"en"}})(),a=n==="zh"?"💥 UI 崩了":"💥 UI crashed",s=n==="zh"?"刷新页面":"Refresh page";return h.jsx("div",{className:"p-6",children:h.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:a}),h.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),h.jsxs("details",{className:"text-xs mb-4",children:[h.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),h.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)"})]}),h.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:s})]})})}return this.props.children}}function U2(){const e=Ue(),t=Sr(),{data:n,isLoading:a,isError:s,error:o,refetch:c}=ct({queryKey:["projects"],queryFn:_r});return h.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[h.jsxs("header",{className:"flex items-center justify-between",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("projects.title")}),h.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:n?e("projects.count",{count:n.data.length}):e(a?"common.loading":"projects.refresh.hint")})]}),h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>c(),type:"button",children:[h.jsx(zd,{size:16,strokeWidth:2.5}),e("common.refresh")]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>t("/projects/new"),"aria-label":e("projects.new"),children:[h.jsx(Bi,{size:16,strokeWidth:3}),e("projects.new")]})]})]}),a&&h.jsx(q2,{}),s&&h.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e("projects.load.failed")}),h.jsx("p",{className:"text-sm text-[var(--color-text)]",children:o instanceof Error?o.message:String(o)}),h.jsx("button",{className:"nb-btn mt-4",onClick:()=>c(),type:"button",children:e("common.retry")})]}),n&&n.data.length===0&&h.jsx($2,{}),n&&n.data.length>0&&h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.data.map(d=>h.jsx(P2,{project:d},d.name))})]})}function P2({project:e}){const t=e.pipelineStatus==="running";return h.jsxs(hs,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),h.jsx(F2,{status:e.pipelineStatus})]}),e.repoDir&&h.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),h.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:[h.jsx(bp,{label:"cards",value:e.cards.total,accent:"purple"}),h.jsx(bp,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),h.jsx(bp,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function bp({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 h.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:[h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),h.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function F2({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 h.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function q2(){return h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>h.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[h.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),h.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),h.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function $2(){const e=Ue(),t=e("projects.empty.hint",{cmd:"__CMD__"}),[n,a]=t.split("__CMD__");return h.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[h.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:h.jsx(dk,{size:32,strokeWidth:2.5})}),h.jsxs("div",{className:"flex-1",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("projects.empty.title")}),h.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:[n,h.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>"}),a]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[h.jsx(Bi,{size:16,strokeWidth:3}),e("projects.new")]})]})]})}function H2(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Ht(`/api/fs/browse${t}`)}const yk=50*1024*1024;async function K2(e,t){if(t.size>yk)throw new Error(`文件超过 50 MB 上限(当前 ${(t.size/1024/1024).toFixed(2)} MB)`);const n=new FormData;n.append("sessionId",e),n.append("file",t,t.name);const a=await fetch("/api/fs/upload",{method:"POST",body:n});if(!a.ok){const s=await a.text();throw new Error(`${a.status}: ${s}`)}return await a.json()}function pm(e,t){return`/api/fs/file?${new URLSearchParams({path:t,sessionId:e}).toString()}`}function Zm({initialPath:e,onCancel:t,onSelect:n,title:a,mode:s="directory"}){var w,S,_;const o=Ue(),c=a??o("dirPicker.title.default"),[d,f]=A.useState(e??null),[p,b]=A.useState(null),g=ct({queryKey:["fs-browse",d],queryFn:()=>H2(d??void 0),staleTime:0,gcTime:0}),v=((w=g.data)==null?void 0:w.path)??d??"",x=((S=g.data)==null?void 0:S.parent)??null,E=((_=g.data)==null?void 0:_.home)??null;return A.useEffect(()=>{const C=T=>{T.key==="Escape"&&(T.preventDefault(),t())};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[t]),h.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:h.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":c,children:[h.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:c}),h.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":o("dirPicker.close.aria"),children:h.jsx(_i,{size:14,strokeWidth:3})})]}),h.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[h.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>x&&f(x),disabled:!x||g.isLoading,"aria-label":o("dirPicker.up.aria"),title:o("dirPicker.up.title"),children:h.jsx(RT,{size:12,strokeWidth:3})}),h.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>E&&f(E),disabled:!E||g.isLoading,"aria-label":o("dirPicker.home.aria"),title:o("dirPicker.home.title"),children:h.jsx(gA,{size:12,strokeWidth:3})}),h.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:v,dir:"rtl",children:v||"..."})]}),h.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:[g.isLoading&&h.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[h.jsx(Bt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),o("dirPicker.loading")]}),g.isError&&h.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[h.jsx("p",{className:"font-bold mb-1",children:o("dirPicker.error.title")}),h.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:g.error instanceof Error?g.error.message:String(g.error)})]}),g.data&&h.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[g.data.entries.length===0&&h.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:o("dirPicker.empty")}),g.data.entries.map(C=>{const T=(()=>{const M=v.endsWith("/")||v.endsWith("\\")?"":"/";return`${v}${M}${C.name}`})(),D=s==="file"&&p===T,B=C.isDirectory||s==="file";return h.jsx("li",{children:h.jsxs("button",{type:"button",className:["w-full flex items-center gap-2 px-3 py-2 text-left text-sm font-[family-name:var(--font-mono)]","disabled:opacity-50 disabled:cursor-not-allowed",D?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!B,onClick:()=>{C.isDirectory?(b(null),f(T)):s==="file"&&b(T)},onDoubleClick:()=>{s==="file"&&!C.isDirectory&&n(T)},title:C.isDirectory?o("dirPicker.enter.aria",{name:C.name}):s==="file"?o("dirPicker.pickFile.aria",{name:C.name}):o("dirPicker.fileLocked"),children:[C.isDirectory?h.jsx(oc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):h.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),h.jsx("span",{className:"truncate",children:C.name}),C.isDirectory&&h.jsx(Bd,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},C.name)})]})]}),h.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[h.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:o("dirPicker.cancel")}),s==="file"?h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>p&&n(p),disabled:!p||g.isLoading||g.isError,title:p??o("dirPicker.useFile.tooltip.empty"),children:[h.jsx(lc,{size:14,strokeWidth:3}),o("dirPicker.useFile")]}):h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(v),disabled:!v||g.isLoading||g.isError,children:[h.jsx(lc,{size:14,strokeWidth:3}),o("dirPicker.useDir")]})]})]})})}function G2({title:e,body:t,confirm:n,cancel:a,onConfirm:s,onCancel:o,danger:c}){const d=Ue();return A.useEffect(()=>{const f=p=>{p.key==="Escape"&&o()};return window.addEventListener("keydown",f),()=>window.removeEventListener("keydown",f)},[o]),h.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:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx("button",{className:"nb-btn",onClick:o,type:"button",children:a??d("dialog.cancel.default")}),h.jsx("button",{className:c?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await s()},type:"button",children:n})]})]})})}const xk=A.createContext(null);function Q2({children:e}){const t=Ue(),[n,a]=A.useState(null),s=A.useCallback(d=>new Promise(f=>{a({kind:"confirm",opts:d,resolve:p=>{a(null),f(p)}})}),[]),o=A.useCallback(d=>new Promise(f=>{a({kind:"alert",opts:d,resolve:()=>{a(null),f()}})}),[]),c=A.useCallback(d=>new Promise(f=>{a({kind:"prompt",opts:d,resolve:p=>{a(null),f(p)}})}),[]);return h.jsxs(xk.Provider,{value:{confirm:s,alert:o,prompt:c},children:[e,(n==null?void 0:n.kind)==="confirm"&&h.jsx(G2,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel,danger:n.opts.danger,onConfirm:()=>n.resolve(!0),onCancel:()=>n.resolve(!1)}),(n==null?void 0:n.kind)==="alert"&&h.jsx(Y2,{title:n.opts.title,body:n.opts.body,confirm:n.opts.confirm??t("dialog.alert.default"),onClose:()=>n.resolve()}),(n==null?void 0:n.kind)==="prompt"&&h.jsx(V2,{title:n.opts.title,body:n.opts.body,placeholder:n.opts.placeholder,defaultValue:n.opts.defaultValue,confirm:n.opts.confirm??t("dialog.confirm.default"),cancel:n.opts.cancel??t("dialog.cancel.default"),onConfirm:d=>n.resolve(d),onCancel:()=>n.resolve(null)})]})}function ci(){const e=A.useContext(xk);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function Y2({title:e,body:t,confirm:n,onClose:a}){return A.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),h.jsx("div",{className:"flex gap-3 justify-end",children:h.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function V2({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:d}){const[f,p]=A.useState(a??""),b=A.useRef(null);A.useEffect(()=>{var x,E;(x=b.current)==null||x.focus(),(E=b.current)==null||E.select();const v=w=>{w.key==="Escape"&&d()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[d]);const g=()=>{const v=f.trim();v&&c(v)};return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),h.jsx("input",{ref:b,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:f,onChange:v=>p(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),g())}}),h.jsxs("div",{className:"flex gap-3 justify-end",children:[h.jsx("button",{className:"nb-btn",onClick:d,type:"button",children:o}),h.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!f.trim(),children:s})]})]})})}function W2(){const e=Ue(),t=Sr(),n=Qn(),{alert:a}=ci(),[s,o]=A.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[c,d]=A.useState(!1),f=Gn({mutationFn:x=>E2(x),onSuccess:x=>{n.invalidateQueries({queryKey:["projects"]}),t(`/projects/${encodeURIComponent(x.name)}`)},onError:x=>{a({title:e("newProject.error.create.title"),body:x instanceof Error?x.message:String(x)})}}),p=/^[a-zA-Z0-9_-]+$/.test(s.name),b=p&&s.projectDir.trim()!==""&&!f.isPending,v=e("newProject.field.wiki.detail",{wikiCode:"__WIKI_CODE__",wikiInit:"__WIKI_INIT__"}).split(/__WIKI_(?:CODE|INIT)__/);return h.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[h.jsxs("header",{className:"flex items-center gap-3",children:[h.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[h.jsx(ik,{size:14,strokeWidth:3}),e("newProject.back")]}),h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("newProject.title")})]}),h.jsx("div",{className:"nb-card",children:h.jsxs("form",{onSubmit:x=>{x.preventDefault(),b&&f.mutate(s)},className:"flex flex-col gap-5",children:[h.jsxs(lr,{label:e("newProject.field.name"),hint:e("newProject.field.name.example"),children:[h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.name.placeholder"),value:s.name,onChange:x=>o({...s,name:x.target.value}),autoFocus:!0,required:!0}),s.name&&!p&&h.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:e("newProject.field.name.invalid")})]}),h.jsxs(lr,{label:e("newProject.field.dir"),hint:e("newProject.field.dir.long"),children:[h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.dir.placeholder"),value:s.projectDir,onChange:x=>o({...s,projectDir:x.target.value}),required:!0}),h.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>d(!0),"aria-label":e("newProject.dir.browseAria"),title:e("newProject.dir.browseAria"),children:[h.jsx(rk,{size:14,strokeWidth:2.5}),e("newProject.dir.browse")]})]}),h.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[h.jsx("input",{type:"checkbox",checked:s.createIfMissing!==!1,onChange:x=>o({...s,createIfMissing:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("newProject.field.dir.createIfMissing")})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[h.jsx(lr,{label:e("newProject.field.maxWorkers.short"),children:h.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.maxWorkers,onChange:x=>o({...s,maxWorkers:x.target.value})})}),h.jsx(lr,{label:e("newProject.field.ackTimeout.minutes"),hint:e("newProject.field.ackTimeout.minutes.help"),children:h.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.ackTimeoutMin??"5",onChange:x=>o({...s,ackTimeoutMin:x.target.value})})})]}),h.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[h.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[h.jsx("input",{type:"checkbox",checked:s.enableGit??!0,onChange:x=>o({...s,enableGit:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),h.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.git.label")})]}),h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("newProject.field.git.detail")}),s.enableGit!==!1&&h.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[h.jsx(lr,{label:e("newProject.field.git.branch"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:s.mergeBranch??"main",onChange:x=>o({...s,mergeBranch:x.target.value})})}),h.jsx(lr,{label:e("newProject.field.gitlabProject.label"),hint:e("newProject.field.gitlabProject.help2"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProject.placeholder"),value:s.gitlabProject??"",onChange:x=>o({...s,gitlabProject:x.target.value})})}),s.gitlabProject&&h.jsx(lr,{label:e("newProject.field.gitlabProjectId"),hint:e("newProject.field.gitlabProjectId.help"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.gitlabProjectId.placeholder"),value:s.gitlabProjectId??"",onChange:x=>o({...s,gitlabProjectId:x.target.value})})})]})]}),h.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[h.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[h.jsx("input",{type:"checkbox",checked:s.enableWiki===!0,onChange:x=>o({...s,enableWiki:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),h.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.wiki.label")})]}),h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[v[0],h.jsx("code",{className:"font-mono",children:"wiki/"}),v[1],h.jsx("code",{className:"font-mono",children:"sps wiki init"}),v[2]]})]}),h.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:e("newProject.section.notifications")}),h.jsx(lr,{label:e("newProject.field.matrixRoom.label"),hint:e("newProject.field.matrixRoom.help2"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:e("newProject.field.matrixRoom.placeholder"),value:s.matrixRoomId??"",onChange:x=>o({...s,matrixRoomId:x.target.value})})})]}),h.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[h.jsx("button",{type:"button",className:"nb-btn",onClick:()=>t("/projects"),disabled:f.isPending,children:e("common.cancel")}),h.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!b,"aria-label":e("newProject.submit"),children:f.isPending?h.jsxs(h.Fragment,{children:[h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}),e("newProject.creating")]}):h.jsxs(h.Fragment,{children:[h.jsx(Bi,{size:14,strokeWidth:3}),e("common.create")]})})]})]})}),c&&h.jsx(Zm,{title:e("newProject.field.dir.pickerTitle"),initialPath:s.projectDir.trim()||void 0,onCancel:()=>d(!1),onSelect:x=>{o({...s,projectDir:x}),d(!1)}})]})}function lr({label:e,hint:t,children:n}){return h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Jm=Symbol.for("yaml.alias"),mm=Symbol.for("yaml.document"),kr=Symbol.for("yaml.map"),vk=Symbol.for("yaml.pair"),ea=Symbol.for("yaml.scalar"),Bl=Symbol.for("yaml.seq"),Ni=Symbol.for("yaml.node.type"),Nr=e=>!!e&&typeof e=="object"&&e[Ni]===Jm,ps=e=>!!e&&typeof e=="object"&&e[Ni]===mm,Ul=e=>!!e&&typeof e=="object"&&e[Ni]===kr,Rt=e=>!!e&&typeof e=="object"&&e[Ni]===vk,Et=e=>!!e&&typeof e=="object"&&e[Ni]===ea,Pl=e=>!!e&&typeof e=="object"&&e[Ni]===Bl;function zt(e){if(e&&typeof e=="object")switch(e[Ni]){case kr:case Bl:return!0}return!1}function Ut(e){if(e&&typeof e=="object")switch(e[Ni]){case Jm:case kr:case ea:case Bl:return!0}return!1}const wk=e=>(Et(e)||zt(e))&&!!e.anchor,Kn=Symbol("break visit"),kk=Symbol("skip children"),Ji=Symbol("remove node");function ms(e,t){const n=Ek(t);ps(e)?ul(null,e.contents,n,Object.freeze([e]))===Ji&&(e.contents=null):ul(null,e,n,Object.freeze([]))}ms.BREAK=Kn;ms.SKIP=kk;ms.REMOVE=Ji;function ul(e,t,n,a){const s=Sk(e,t,n,a);if(Ut(s)||Rt(s))return _k(e,a,s),ul(e,s,n,a);if(typeof s!="symbol"){if(zt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=ul(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Kn)return Kn;c===Ji&&(t.items.splice(o,1),o-=1)}}}else if(Rt(t)){a=Object.freeze(a.concat(t));const o=ul("key",t.key,n,a);if(o===Kn)return Kn;o===Ji&&(t.key=null);const c=ul("value",t.value,n,a);if(c===Kn)return Kn;c===Ji&&(t.value=null)}}return s}async function Pd(e,t){const n=Ek(t);ps(e)?await dl(null,e.contents,n,Object.freeze([e]))===Ji&&(e.contents=null):await dl(null,e,n,Object.freeze([]))}Pd.BREAK=Kn;Pd.SKIP=kk;Pd.REMOVE=Ji;async function dl(e,t,n,a){const s=await Sk(e,t,n,a);if(Ut(s)||Rt(s))return _k(e,a,s),dl(e,s,n,a);if(typeof s!="symbol"){if(zt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=await dl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Kn)return Kn;c===Ji&&(t.items.splice(o,1),o-=1)}}}else if(Rt(t)){a=Object.freeze(a.concat(t));const o=await dl("key",t.key,n,a);if(o===Kn)return Kn;o===Ji&&(t.key=null);const c=await dl("value",t.value,n,a);if(c===Kn)return Kn;c===Ji&&(t.value=null)}}return s}function Ek(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 Sk(e,t,n,a){var s,o,c,d,f;if(typeof n=="function")return n(e,t,a);if(Ul(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Pl(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,a);if(Rt(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(Et(t))return(d=n.Scalar)==null?void 0:d.call(n,e,t,a);if(Nr(t))return(f=n.Alias)==null?void 0:f.call(n,e,t,a)}function _k(e,t,n){const a=t[t.length-1];if(zt(a))a.items[e]=n;else if(Rt(a))e==="key"?a.key=n:a.value=n;else if(ps(a))a.contents=n;else{const s=Nr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const X2={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},Z2=e=>e.replace(/[!,[\]{}]/g,t=>X2[t]);class jn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},jn.defaultYaml,t),this.tags=Object.assign({},jn.defaultTags,n)}clone(){const t=new jn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new jn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:jn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},jn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:jn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},jn.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+Z2(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&&Ut(t.contents)){const o={};ms(t.contents,(c,d)=>{Ut(d)&&d.tag&&(o[d.tag]=!0)}),s=Object.keys(o)}else s=[];for(const[o,c]of a)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(d=>d.startsWith(c)))&&n.push(`%TAG ${o} ${c}`);return n.join(`
378
+ `)}}jn.defaultYaml={explicit:!1,version:"1.2"};jn.defaultTags={"!!":"tag:yaml.org,2002:"};function Nk(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 Ck(e){const t=new Set;return ms(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function Tk(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function J2(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=Ck(e));const c=Tk(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(Et(c.node)||zt(c.node)))c.node.anchor=c.anchor;else{const d=new Error("Failed to resolve repeated object (this should not happen)");throw d.source=o,d}}},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],d=fl(e,a,String(s),c);d===void 0?delete a[s]:d!==c&&(a[s]=d)}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 Ei(e,t,n){if(Array.isArray(e))return e.map((a,s)=>Ei(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!wk(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 eg{constructor(t){Object.defineProperty(this,Ni,{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(!ps(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},d=Ei(this,"",c);if(typeof s=="function")for(const{count:f,res:p}of c.anchors.values())s(p,f);return typeof o=="function"?fl(o,{"":d},"",d):d}}class Fd extends eg{constructor(t){super(Jm),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)=>{(Nr(c)||wk(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 f=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(f)}let d=a.get(c);if(d||(Ei(c,null,n),d=a.get(c)),(d==null?void 0:d.res)===void 0){const f="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(f)}if(o>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=hd(s,c,a)),d.count*d.aliasCount>o)){const f="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(f)}return d.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(Nk(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 hd(e,t,n){if(Nr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(zt(t)){let a=0;for(const s of t.items){const o=hd(e,s,n);o>a&&(a=o)}return a}else if(Rt(t)){const a=hd(e,t.key,n),s=hd(e,t.value,n);return Math.max(a,s)}return 1}const Ak=e=>!e||typeof e!="function"&&typeof e!="object";class Fe extends eg{constructor(t){super(ea),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Ei(this.value,t,n)}toString(){return String(this.value)}}Fe.BLOCK_FOLDED="BLOCK_FOLDED";Fe.BLOCK_LITERAL="BLOCK_LITERAL";Fe.PLAIN="PLAIN";Fe.QUOTE_DOUBLE="QUOTE_DOUBLE";Fe.QUOTE_SINGLE="QUOTE_SINGLE";const ej="tag:yaml.org,2002:";function tj(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 cc(e,t,n){var g,v,x;if(ps(e)&&(e=e.contents),Ut(e))return e;if(Rt(e)){const E=(v=(g=n.schema[kr]).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:d}=n;let f;if(a&&e&&typeof e=="object"){if(f=d.get(e),f)return f.anchor??(f.anchor=s(e)),new Fd(f.anchor);f={anchor:null,node:null},d.set(e,f)}t!=null&&t.startsWith("!!")&&(t=ej+t.slice(2));let p=tj(e,t,c.tags);if(!p){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new Fe(e);return f&&(f.node=E),E}p=e instanceof Map?c[kr]:Symbol.iterator in Object(e)?c[Bl]:c[kr]}o&&(o(p),delete n.onTagObj);const b=p!=null&&p.createNode?p.createNode(n.schema,e,n):typeof((x=p==null?void 0:p.nodeClass)==null?void 0:x.from)=="function"?p.nodeClass.from(n.schema,e,n):new Fe(e);return t?b.tag=t:p.default||(b.tag=p.tag),f&&(f.node=b),b}function Ed(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 cc(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 Zo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class jk extends eg{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=>Ut(a)||Rt(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Zo(t))this.add(n);else{const[a,...s]=t,o=this.get(a,!0);if(zt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ed(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(zt(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&&Et(o)?o.value:o:zt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Rt(n))return!1;const a=n.value;return a==null||t&&Et(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 zt(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(zt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,Ed(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const nj=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Ta(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Zr=(e,t,n)=>e.endsWith(`
379
+ `)?Ta(n,t):n.includes(`
380
+ `)?`
381
+ `+Ta(n,t):(e.endsWith(" ")?"":" ")+n,Ok="flow",gm="block",pd="quoted";function qd(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:d}={}){if(!s||s<0)return e;s<o&&(o=0);const f=Math.max(1+o,1+s-t.length);if(e.length<=f)return e;const p=[],b={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?p.push(0):g=s-a);let v,x,E=!1,w=-1,S=-1,_=-1;n===gm&&(w=Wv(e,w,t.length),w!==-1&&(g=w+f));for(let T;T=e[w+=1];){if(n===pd&&T==="\\"){switch(S=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===`
382
+ `)n===gm&&(w=Wv(e,w,t.length)),g=w+t.length+f,v=void 0;else{if(T===" "&&x&&x!==" "&&x!==`
383
+ `&&x!==" "){const D=e[w+1];D&&D!==" "&&D!==`
384
+ `&&D!==" "&&(v=w)}if(w>=g)if(v)p.push(v),g=v+f,v=void 0;else if(n===pd){for(;x===" "||x===" ";)x=T,T=e[w+=1],E=!0;const D=w>_+1?w-2:S-1;if(b[D])return e;p.push(D),b[D]=!0,g=D+f,v=void 0}else E=!0}x=T}if(E&&d&&d(),p.length===0)return e;c&&c();let C=e.slice(0,p[0]);for(let T=0;T<p.length;++T){const D=p[T],B=p[T+1]||e.length;D===0?C=`
385
+ ${t}${e.slice(0,B)}`:(n===pd&&b[D]&&(C+=`${e[D]}\\`),C+=`
386
+ ${t}${e.slice(D+1,B)}`)}return C}function Wv(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!==`
387
+ `);a=t,s=t+1,o=e[s]}return a}const $d=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Hd=e=>/^(%|---|\.\.\.)/m.test(e);function ij(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]===`
388
+ `){if(o-c>a)return!0;if(c=o+1,s-c<=a)return!1}return!0}function Jo(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Hd(e)?" ":"");let c="",d=0;for(let f=0,p=n[f];p;p=n[++f])if(p===" "&&n[f+1]==="\\"&&n[f+2]==="n"&&(c+=n.slice(d,f)+"\\ ",f+=1,d=f,p="\\"),p==="\\")switch(n[f+1]){case"u":{c+=n.slice(d,f);const b=n.substr(f+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(f,6)}f+=5,d=f+1}break;case"n":if(a||n[f+2]==='"'||n.length<s)f+=1;else{for(c+=n.slice(d,f)+`
389
+
390
+ `;n[f+2]==="\\"&&n[f+3]==="n"&&n[f+4]!=='"';)c+=`
391
+ `,f+=2;c+=o,n[f+2]===" "&&(c+="\\"),f+=1,d=f+1}break;default:f+=1}return c=d?c+n.slice(d):n,a?c:qd(c,o,pd,$d(t,!1))}function bm(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
392
+ `)||/[ \t]\n|\n[ \t]/.test(e))return Jo(e,t);const n=t.indent||(Hd(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
393
+ ${n}`)+"'";return t.implicitKey?a:qd(a,n,Ok,$d(t,!1))}function hl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Jo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=bm:o&&!s?a=Jo:a=n?bm:Jo}return a(e,t)}let ym;try{ym=new RegExp(`(^|(?<!
394
+ ))
395
+ +(?!
396
+ |$)`,"g")}catch{ym=/\n+(?!\n|$)/g}function md({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:d,lineWidth:f}=a.options;if(!c||/\n[\t ]+$/.test(n))return hl(n,a);const p=a.indent||(a.forceBlockIndent||Hd(n)?" ":""),b=c==="literal"?!0:c==="folded"||t===Fe.BLOCK_FOLDED?!1:t===Fe.BLOCK_LITERAL?!0:!ij(n,f,p.length);if(!n)return b?`|
397
+ `:`>
398
+ `;let g,v;for(v=n.length;v>0;--v){const B=n[v-1];if(B!==`
399
+ `&&B!==" "&&B!==" ")break}let x=n.substring(v);const E=x.indexOf(`
400
+ `);E===-1?g="-":n===x||E!==x.length-1?(g="+",o&&o()):g="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
401
+ `&&(x=x.slice(0,-1)),x=x.replace(ym,`$&${p}`));let w=!1,S,_=-1;for(S=0;S<n.length;++S){const B=n[S];if(B===" ")w=!0;else if(B===`
402
+ `)_=S;else break}let C=n.substring(0,_<S?_+1:S);C&&(n=n.substring(C.length),C=C.replace(/\n+/g,`$&${p}`));let D=(w?p?"2":"1":"")+g;if(e&&(D+=" "+d(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!b){const B=n.replace(/\n+/g,`
403
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let M=!1;const q=$d(a,!0);c!=="folded"&&t!==Fe.BLOCK_FOLDED&&(q.onOverflow=()=>{M=!0});const F=qd(`${C}${B}${x}`,p,gm,q);if(!M)return`>${D}
404
+ ${p}${F}`}return n=n.replace(/\n+/g,`$&${p}`),`|${D}
405
+ ${p}${C}${n}${x}`}function aj(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:d,indent:f,indentStep:p,inFlow:b}=t;if(d&&o.includes(`
406
+ `)||b&&/[[\]{},]/.test(o))return hl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return d||b||!o.includes(`
407
+ `)?hl(o,t):md(e,t,n,a);if(!d&&!b&&s!==Fe.PLAIN&&o.includes(`
408
+ `))return md(e,t,n,a);if(Hd(o)){if(f==="")return t.forceBlockIndent=!0,md(e,t,n,a);if(d&&f===p)return hl(o,t)}const g=o.replace(/\n+/g,`$&
409
+ ${f}`);if(c){const v=w=>{var S;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((S=w.test)==null?void 0:S.test(g))},{compat:x,tags:E}=t.doc.schema;if(E.some(v)||x!=null&&x.some(v))return hl(o,t)}return d?g:qd(g,f,Ok,$d(t,!1))}function Ec(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:d}=e;d!==Fe.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(d=Fe.QUOTE_DOUBLE);const f=b=>{switch(b){case Fe.BLOCK_FOLDED:case Fe.BLOCK_LITERAL:return s||o?hl(c.value,t):md(c,t,n,a);case Fe.QUOTE_DOUBLE:return Jo(c.value,t);case Fe.QUOTE_SINGLE:return bm(c.value,t);case Fe.PLAIN:return aj(c,t,n,a);default:return null}};let p=f(d);if(p===null){const{defaultKeyType:b,defaultStringType:g}=t.options,v=s&&b||g;if(p=f(v),p===null)throw new Error(`Unsupported default string type ${v}`)}return p}function Dk(e,t){const n=Object.assign({blockQuote:!0,commentString:nj,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 rj(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(Et(t)){a=t.value;let o=e.filter(c=>{var d;return(d=c.identify)==null?void 0:d.call(c,a)});if(o.length>1){const c=o.filter(d=>d.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 sj(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(Et(e)||zt(e))&&e.anchor;o&&Nk(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 jl(e,t,n,a){var f;if(Rt(e))return e.toString(t,n,a);if(Nr(e)){if(t.doc.directives)return e.toString(t);if((f=t.resolvedAliases)!=null&&f.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=Ut(e)?e:t.doc.createNode(e,{onTagObj:p=>s=p});s??(s=rj(t.doc.schema.tags,o));const c=sj(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const d=typeof s.stringify=="function"?s.stringify(o,t,n,a):Et(o)?Ec(o,t,n,a):o.toString(t,n,a);return c?Et(o)||d[0]==="{"||d[0]==="["?`${c} ${d}`:`${c}
410
+ ${t.indent}${d}`:d}function lj({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:d,indentStep:f,options:{commentString:p,indentSeq:b,simpleKeys:g}}=n;let v=Ut(e)&&e.comment||null;if(g){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(zt(e)||!Ut(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||zt(e)||(Et(e)?e.type===Fe.BLOCK_FOLDED||e.type===Fe.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(g||!o),indent:d+f});let E=!1,w=!1,S=jl(e,n,()=>E=!0,()=>w=!0);if(!x&&!n.inFlow&&S.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(),S===""?"?":x?`? ${S}`:S}else if(o&&!g||t==null&&x)return S=`? ${S}`,v&&!E?S+=Zr(S,n.indent,p(v)):w&&s&&s(),S;E&&(v=null),x?(v&&(S+=Zr(S,n.indent,p(v))),S=`? ${S}
411
+ ${d}:`):(S=`${S}:`,v&&(S+=Zr(S,n.indent,p(v))));let _,C,T;Ut(t)?(_=!!t.spaceBefore,C=t.commentBefore,T=t.comment):(_=!1,C=null,T=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!x&&!v&&Et(t)&&(n.indentAtStart=S.length+1),w=!1,!b&&f.length>=2&&!n.inFlow&&!x&&Pl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let D=!1;const B=jl(t,n,()=>D=!0,()=>w=!0);let M=" ";if(v||_||C){if(M=_?`
412
+ `:"",C){const q=p(C);M+=`
413
+ ${Ta(q,n.indent)}`}B===""&&!n.inFlow?M===`
414
+ `&&T&&(M=`
415
+
416
+ `):M+=`
417
+ ${n.indent}`}else if(!x&&zt(t)){const q=B[0],F=B.indexOf(`
418
+ `),ee=F!==-1,U=n.inFlow??t.flow??t.items.length===0;if(ee||!U){let X=!1;if(ee&&(q==="&"||q==="!")){let J=B.indexOf(" ");q==="&"&&J!==-1&&J<F&&B[J+1]==="!"&&(J=B.indexOf(" ",J+1)),(J===-1||F<J)&&(X=!0)}X||(M=`
419
+ ${n.indent}`)}}else(B===""||B[0]===`
420
+ `)&&(M="");return S+=M+B,n.inFlow?D&&a&&a():T&&!D?S+=Zr(S,n.indent,p(T)):w&&s&&s(),S}function Mk(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Vu="<<",Aa={identify:e=>e===Vu||typeof e=="symbol"&&e.description===Vu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Fe(Symbol(Vu)),{addToJSMap:Rk}),stringify:()=>Vu},oj=(e,t)=>(Aa.identify(t)||Et(t)&&(!t.type||t.type===Fe.PLAIN)&&Aa.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Aa.tag&&n.default));function Rk(e,t,n){if(n=e&&Nr(n)?n.resolve(e.doc):n,Pl(n))for(const a of n.items)yp(e,t,a);else if(Array.isArray(n))for(const a of n)yp(e,t,a);else yp(e,t,n)}function yp(e,t,n){const a=e&&Nr(n)?n.resolve(e.doc):n;if(!Ul(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 Lk(e,t,{key:n,value:a}){if(Ut(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(oj(e,n))Rk(e,t,a);else{const s=Ei(n,"",e);if(t instanceof Map)t.set(s,Ei(a,s,e));else if(t instanceof Set)t.add(s);else{const o=cj(n,s,e),c=Ei(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function cj(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(Ut(e)&&(n!=null&&n.doc)){const a=Dk(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)+'..."'),Mk(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 tg(e,t,n){const a=cc(e,void 0,n),s=cc(t,void 0,n);return new wn(a,s)}class wn{constructor(t,n=null){Object.defineProperty(this,Ni,{value:vk}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return Ut(n)&&(n=n.clone(t)),Ut(a)&&(a=a.clone(t)),new wn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return Lk(n,a,this)}toString(t,n,a){return t!=null&&t.doc?lj(this,t,n,a):JSON.stringify(this)}}function Ik(e,t,n){return(t.inFlow??e.flow?dj:uj)(e,t,n)}function uj({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:d}){const{indent:f,options:{commentString:p}}=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 S=null;if(Ut(w))!g&&w.spaceBefore&&v.push(""),Sd(n,v,w.commentBefore,g),w.comment&&(S=w.comment);else if(Rt(w)){const C=Ut(w.key)?w.key:null;C&&(!g&&C.spaceBefore&&v.push(""),Sd(n,v,C.commentBefore,g))}g=!1;let _=jl(w,b,()=>S=null,()=>g=!0);S&&(_+=Zr(_,o,p(S))),g&&S&&(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?`
421
+ ${f}${w}`:`
422
+ `}}return e?(x+=`
423
+ `+Ta(p(e),f),d&&d()):g&&c&&c(),x}function dj({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:d}}=t;a+=o;const f=Object.assign({},t,{indent:a,inFlow:!0,type:null});let p=!1,b=0;const g=[];for(let E=0;E<e.length;++E){const w=e[E];let S=null;if(Ut(w))w.spaceBefore&&g.push(""),Sd(t,g,w.commentBefore,!1),w.comment&&(S=w.comment);else if(Rt(w)){const C=Ut(w.key)?w.key:null;C&&(C.spaceBefore&&g.push(""),Sd(t,g,C.commentBefore,!1),C.comment&&(p=!0));const T=Ut(w.value)?w.value:null;T?(T.comment&&(S=T.comment),T.commentBefore&&(p=!0)):w.value==null&&(C!=null&&C.comment)&&(S=C.comment)}S&&(p=!0);let _=jl(w,f,()=>S=null);p||(p=g.length>b||_.includes(`
424
+ `)),E<e.length-1?_+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(p||(p=g.reduce((C,T)=>C+T.length+2,2)+(_.length+2)>t.options.lineWidth)),p&&(_+=",")),S&&(_+=Zr(_,a,d(S))),g.push(_),b=g.length}const{start:v,end:x}=n;if(g.length===0)return v+x;if(!p){const E=g.reduce((w,S)=>w+S.length+2,2);p=t.options.lineWidth>0&&E>t.options.lineWidth}if(p){let E=v;for(const w of g)E+=w?`
425
+ ${o}${s}${w}`:`
426
+ `;return`${E}
427
+ ${s}${x}`}else return`${v}${c}${g.join(" ")}${c}${x}`}function Sd({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=Ta(t(a),e);n.push(o.trimStart())}}function Jr(e,t){const n=Et(t)?t.value:t;for(const a of e)if(Rt(a)&&(a.key===t||a.key===n||Et(a.key)&&a.key.value===n))return a}class si extends jk{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(kr,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),d=(f,p)=>{if(typeof o=="function")p=o.call(n,f,p);else if(Array.isArray(o)&&!o.includes(f))return;(p!==void 0||s)&&c.items.push(tg(f,p,a))};if(n instanceof Map)for(const[f,p]of n)d(f,p);else if(n&&typeof n=="object")for(const f of Object.keys(n))d(f,n[f]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;Rt(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new wn(t,t==null?void 0:t.value):a=new wn(t.key,t.value);const s=Jr(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`);Et(s.value)&&Ak(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const d=this.items.findIndex(f=>o(a,f)<0);d===-1?this.items.push(a):this.items.splice(d,0,a)}else this.items.push(a)}delete(t){const n=Jr(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=Jr(this.items,t),s=a==null?void 0:a.value;return(!n&&Et(s)?s.value:s)??void 0}has(t){return!!Jr(this.items,t)}set(t,n){this.add(new wn(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)Lk(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Rt(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})),Ik(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Fl={collection:"map",default:!0,nodeClass:si,tag:"tag:yaml.org,2002:map",resolve(e,t){return Ul(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>si.from(e,t,n)};class Er extends jk{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Bl,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Wu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Wu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&Et(s)?s.value:s}has(t){const n=Wu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Wu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];Et(s)&&Ak(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(Ei(o,String(s++),n));return a}toString(t,n,a){return t?Ik(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 d of n){if(typeof s=="function"){const f=n instanceof Set?d:String(c++);d=s.call(n,f,d)}o.items.push(cc(d,void 0,a))}}return o}}function Wu(e){let t=Et(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const ql={collection:"seq",default:!0,nodeClass:Er,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Pl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Er.from(e,t,n)},Kd={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),Ec(e,t,n,a)}},Gd={identify:e=>e==null,createNode:()=>new Fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Fe(null),stringify:({source:e},t)=>typeof e=="string"&&Gd.test.test(e)?e:t.options.nullStr},ng={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Fe(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&ng.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 Ui({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 d=t-(o.length-c-1);for(;d-- >0;)o+="0"}return o}const zk={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:Ui},Bk={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():Ui(e)}},Uk={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 Fe(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Ui},Qd=e=>typeof e=="bigint"||Number.isInteger(e),ig=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function Pk(e,t,n){const{value:a}=e;return Qd(a)&&a>=0?n+a.toString(t):Ui(e)}const Fk={identify:e=>Qd(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>ig(e,2,8,n),stringify:e=>Pk(e,8,"0o")},qk={identify:Qd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ig(e,0,10,n),stringify:Ui},$k={identify:e=>Qd(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ig(e,2,16,n),stringify:e=>Pk(e,16,"0x")},fj=[Fl,ql,Kd,Gd,ng,Fk,qk,$k,zk,Bk,Uk];function Xv(e){return typeof e=="bigint"||Number.isInteger(e)}const Xu=({value:e})=>JSON.stringify(e),hj=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Xu},{identify:e=>e==null,createNode:()=>new Fe(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Xu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Xu},{identify:Xv,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})=>Xv(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:Xu}],pj={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},mj=[Fl,ql].concat(hj,pj),ag={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 d;if(typeof btoa=="function"){let f="";for(let p=0;p<c.length;++p)f+=String.fromCharCode(c[p]);d=btoa(f)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Fe.BLOCK_LITERAL),t!==Fe.QUOTE_DOUBLE){const f=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),p=Math.ceil(d.length/f),b=new Array(p);for(let g=0,v=0;g<p;++g,v+=f)b[g]=d.substr(v,f);d=b.join(t===Fe.BLOCK_LITERAL?`
428
+ `:" ")}return Ec({comment:e,type:t,value:d},a,s,o)}};function Hk(e,t){if(Pl(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!Rt(a)){if(Ul(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new wn(new Fe(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
429
+ ${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
430
+ ${o.comment}`:a.comment}a=s}e.items[n]=Rt(a)?a:new wn(a)}}else t("Expected a sequence for this tag");return e}function Kk(e,t,n){const{replacer:a}=n,s=new Er(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 d,f;if(Array.isArray(c))if(c.length===2)d=c[0],f=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const p=Object.keys(c);if(p.length===1)d=p[0],f=c[d];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else d=c;s.items.push(tg(d,f,n))}return s}const rg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Hk,createNode:Kk};class pl extends Er{constructor(){super(),this.add=si.prototype.add.bind(this),this.delete=si.prototype.delete.bind(this),this.get=si.prototype.get.bind(this),this.has=si.prototype.has.bind(this),this.set=si.prototype.set.bind(this),this.tag=pl.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(Rt(s)?(o=Ei(s.key,"",n),c=Ei(s.value,o,n)):o=Ei(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=Kk(t,n,a),o=new this;return o.items=s.items,o}}pl.tag="tag:yaml.org,2002:omap";const sg={collection:"seq",identify:e=>e instanceof Map,nodeClass:pl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=Hk(e,t),a=[];for(const{key:s}of n.items)Et(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new pl,n)},createNode:(e,t,n)=>pl.from(e,t,n)};function Gk({value:e,source:t},n){return t&&(e?Qk:Yk).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const Qk={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 Fe(!0),stringify:Gk},Yk={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 Fe(!1),stringify:Gk},gj={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:Ui},bj={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():Ui(e)}},yj={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 Fe(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:Ui},Sc=e=>typeof e=="bigint"||Number.isInteger(e);function Yd(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 lg(e,t,n){const{value:a}=e;if(Sc(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Ui(e)}const xj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Yd(e,2,2,n),stringify:e=>lg(e,2,"0b")},vj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Yd(e,1,8,n),stringify:e=>lg(e,8,"0")},wj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Yd(e,0,10,n),stringify:Ui},kj={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Yd(e,2,16,n),stringify:e=>lg(e,16,"0x")};class ml extends si{constructor(t){super(t),this.tag=ml.tag}add(t){let n;Rt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new wn(t.key,null):n=new wn(t,null),Jr(this.items,n.key)||this.items.push(n)}get(t,n){const a=Jr(this.items,t);return!n&&Rt(a)?Et(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=Jr(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new wn(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(tg(c,null,a));return o}}ml.tag="tag:yaml.org,2002:set";const og={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(Ul(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 cg(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,d)=>c*s(60)+s(d),s(0));return n==="-"?s(-1)*o:o}function Vk(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Ui(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 Wk={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})=>cg(e,n),stringify:Vk},Xk={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=>cg(e,!1),stringify:Vk},Vd={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(Vd.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,o,c,d]=t.map(Number),f=t[7]?Number((t[7]+"00").substr(1,3)):0;let p=Date.UTC(n,a-1,s,o||0,c||0,d||0,f);const b=t[8];if(b&&b!=="Z"){let g=cg(b,!1);Math.abs(g)<30&&(g*=60),p-=6e4*g}return new Date(p)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Zv=[Fl,ql,Kd,Gd,Qk,Yk,xj,vj,wj,kj,gj,bj,yj,ag,Aa,sg,rg,og,Wk,Xk,Vd],Jv=new Map([["core",fj],["failsafe",[Fl,ql,Kd]],["json",mj],["yaml11",Zv],["yaml-1.1",Zv]]),ew={binary:ag,bool:ng,float:Uk,floatExp:Bk,floatNaN:zk,floatTime:Xk,int:qk,intHex:$k,intOct:Fk,intTime:Wk,map:Fl,merge:Aa,null:Gd,omap:sg,pairs:rg,seq:ql,set:og,timestamp:Vd},Ej={"tag:yaml.org,2002:binary":ag,"tag:yaml.org,2002:merge":Aa,"tag:yaml.org,2002:omap":sg,"tag:yaml.org,2002:pairs":rg,"tag:yaml.org,2002:set":og,"tag:yaml.org,2002:timestamp":Vd};function xp(e,t,n){const a=Jv.get(t);if(a&&!e)return n&&!a.includes(Aa)?a.concat(Aa):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const o=Array.from(Jv.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(Aa)),s.reduce((o,c)=>{const d=typeof c=="string"?ew[c]:c;if(!d){const f=JSON.stringify(c),p=Object.keys(ew).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${f}; use one of ${p}`)}return o.includes(d)||o.push(d),o},[])}const Sj=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let Zk=class Jk{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:o,sortMapEntries:c,toStringDefaults:d}){this.compat=Array.isArray(t)?xp(t,"compat"):t?xp(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?Ej:{},this.tags=xp(n,this.name,a),this.toStringOptions=d??null,Object.defineProperty(this,kr,{value:Fl}),Object.defineProperty(this,ea,{value:Kd}),Object.defineProperty(this,Bl,{value:ql}),this.sortMapEntries=typeof c=="function"?c:c===!0?Sj:null}clone(){const t=Object.create(Jk.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function _j(e,t){var f;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const p=e.directives.toString(e);p?(n.push(p),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=Dk(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const p=o(e.commentBefore);n.unshift(Ta(p,""))}let c=!1,d=null;if(e.contents){if(Ut(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);n.push(Ta(g,""))}s.forceBlockIndent=!!e.comment,d=e.contents.comment}const p=d?void 0:()=>c=!0;let b=jl(e.contents,s,()=>d=null,p);d&&(b+=Zr(b,"",o(d))),(b[0]==="|"||b[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${b}`:n.push(b)}else n.push(jl(e.contents,s));if((f=e.directives)!=null&&f.docEnd)if(e.comment){const p=o(e.comment);p.includes(`
431
+ `)?(n.push("..."),n.push(Ta(p,""))):n.push(`... ${p}`)}else n.push("...");else{let p=e.comment;p&&c&&(p=p.replace(/^\n+/,"")),p&&((!c||d)&&n[n.length-1]!==""&&n.push(""),n.push(Ta(o(p),"")))}return n.join(`
432
+ `)+`
433
+ `}class $l{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,Ni,{value:mm});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 jn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create($l.prototype,{[Ni]:{value:mm}});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=Ut(this.contents)?this.contents.clone(t.schema):this.contents,this.range&&(t.range=this.range.slice()),t}add(t){il(this.contents)&&this.contents.add(t)}addIn(t,n){il(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=Ck(this);t.anchor=!n||a.has(n)?Tk(n||"a",a):n}return new Fd(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 S=C=>typeof C=="number"||C instanceof String||C instanceof Number,_=n.filter(S).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:d,keepUndefined:f,onTagObj:p,tag:b}=a??{},{onAnchor:g,setAnchors:v,sourceObjects:x}=J2(this,c||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:f??!1,onAnchor:g,onTagObj:p,replacer:s,schema:this.schema,sourceObjects:x},w=cc(t,b,E);return d&&zt(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 wn(s,o)}delete(t){return il(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Zo(t)?this.contents==null?!1:(this.contents=null,!0):il(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return zt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Zo(t)?!n&&Et(this.contents)?this.contents.value:this.contents:zt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return zt(this.contents)?this.contents.has(t):!1}hasIn(t){return Zo(t)?this.contents!==void 0:zt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=Ed(this.schema,[t],n):il(this.contents)&&this.contents.set(t,n)}setIn(t,n){Zo(t)?this.contents=n:this.contents==null?this.contents=Ed(this.schema,Array.from(t),n):il(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 jn({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 jn({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 Zk(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 d={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},f=Ei(this.contents,n??"",d);if(typeof o=="function")for(const{count:p,res:b}of d.anchors.values())o(b,p);return typeof c=="function"?fl(c,{"":f},"",f):f}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 _j(this,t)}}function il(e){if(zt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class ug extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class es extends ug{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class eE extends ug{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const _d=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(d=>t.linePos(d));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 d=Math.min(o-39,c.length-79);c="…"+c.substring(d),o-=d-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,o))){let d=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);d.length>80&&(d=d.substring(0,79)+`…
434
+ `),c=d+c}if(/[^ ]/.test(c)){let d=1;const f=n.linePos[1];(f==null?void 0:f.line)===a&&f.col>s&&(d=Math.max(1,Math.min(f.col-s,80-o)));const p=" ".repeat(o)+"^".repeat(d);n.message+=`:
435
+
436
+ ${c}
437
+ ${p}
438
+ `}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:d}){let f=!1,p=d,b=d,g="",v="",x=!1,E=!1,w=null,S=null,_=null,C=null,T=null,D=null,B=null;for(const F of e)switch(E&&(F.type!=="space"&&F.type!=="newline"&&F.type!=="comma"&&o(F.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(p&&F.type!=="comment"&&F.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),F.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&F.source.includes(" ")&&(w=F),b=!0;break;case"comment":{b||o(F,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ee=F.source.substring(1)||" ";g?g+=v+ee:g=ee,v="",p=!1;break}case"newline":p?g?g+=F.source:(!D||n!=="seq-item-ind")&&(f=!0):v+=F.source,p=!0,x=!0,(S||_)&&(C=F),b=!0;break;case"anchor":S&&o(F,"MULTIPLE_ANCHORS","A node can have at most one anchor"),F.source.endsWith(":")&&o(F.offset+F.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),S=F,B??(B=F.offset),p=!1,b=!1,E=!0;break;case"tag":{_&&o(F,"MULTIPLE_TAGS","A node can have at most one tag"),_=F,B??(B=F.offset),p=!1,b=!1,E=!0;break}case n:(S||_)&&o(F,"BAD_PROP_ORDER",`Anchors and tags must be after the ${F.source} indicator`),D&&o(F,"UNEXPECTED_TOKEN",`Unexpected ${F.source} in ${t??"collection"}`),D=F,p=n==="seq-item-ind"||n==="explicit-key-ind",b=!1;break;case"comma":if(t){T&&o(F,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=F,p=!1,b=!1;break}default:o(F,"UNEXPECTED_TOKEN",`Unexpected ${F.type} token`),p=!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&&(p&&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:D,spaceBefore:f,comment:g,hasNewline:x,anchor:S,tag:_,newlineAfterProp:C,end:q,start:B??q}}function uc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
439
+ `))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(uc(t.key)||uc(t.value))return!0}return!1;default:return!0}}function xm(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&uc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function tE(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||Et(o)&&Et(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const tw="All mapping items must start at the same column";function Nj({composeNode:e,composeEmptyNode:t},n,a,s,o){var b;const c=(o==null?void 0:o.nodeClass)??si,d=new c(n.schema);n.atRoot&&(n.atRoot=!1);let f=a.offset,p=null;for(const g of a.items){const{start:v,key:x,sep:E,value:w}=g,S=Ol(v,{indicator:"explicit-key-ind",next:x??(E==null?void 0:E[0]),offset:f,onError:s,parentIndent:a.indent,startOnNewline:!0}),_=!S.found;if(_){if(x&&(x.type==="block-seq"?s(f,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==a.indent&&s(f,"BAD_INDENT",tw)),!S.anchor&&!S.tag&&!E){p=S.end,S.comment&&(d.comment?d.comment+=`
440
+ `+S.comment:d.comment=S.comment);continue}(S.newlineAfterProp||uc(x))&&s(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=S.found)==null?void 0:b.indent)!==a.indent&&s(f,"BAD_INDENT",tw);n.atKey=!0;const C=S.end,T=x?e(n,x,S,s):t(n,C,v,null,S,s);n.schema.compat&&xm(a.indent,x,s),n.atKey=!1,tE(n,d.items,T)&&s(C,"DUPLICATE_KEY","Map keys must be unique");const D=Ol(E??[],{indicator:"map-value-ind",next:w,offset:T.range[2],onError:s,parentIndent:a.indent,startOnNewline:!x||x.type==="block-scalar"});if(f=D.end,D.found){_&&((w==null?void 0:w.type)==="block-map"&&!D.hasNewline&&s(f,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&S.start<D.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 B=w?e(n,w,D,s):t(n,f,E,null,D,s);n.schema.compat&&xm(a.indent,w,s),f=B.range[2];const M=new wn(T,B);n.options.keepSourceTokens&&(M.srcToken=g),d.items.push(M)}else{_&&s(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),D.comment&&(T.comment?T.comment+=`
441
+ `+D.comment:T.comment=D.comment);const B=new wn(T);n.options.keepSourceTokens&&(B.srcToken=g),d.items.push(B)}}return p&&p<f&&s(p,"IMPOSSIBLE","Map comment with trailing content"),d.range=[a.offset,f,p??f],d}function Cj({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Er,d=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let f=a.offset,p=null;for(const{start:b,value:g}of a.items){const v=Ol(b,{indicator:"seq-item-ind",next:g,offset:f,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(f,"MISSING_CHAR","Sequence item without - indicator");else{p=v.end,v.comment&&(d.comment=v.comment);continue}const x=g?e(n,g,v,s):t(n,v.end,b,null,v,s);n.schema.compat&&xm(a.indent,g,s),f=x.range[2],d.items.push(x)}return d.range=[a.offset,f,p??f],d}function _c(e,t,n,a){let s="";if(e){let o=!1,c="";for(const d of e){const{source:f,type:p}=d;switch(p){case"space":o=!0;break;case"comment":{n&&!o&&a(d,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=f.substring(1)||" ";s?s+=c+b:s=b,c="";break}case"newline":s&&(c+=f),o=!0;break;default:a(d,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}t+=f.length}}return{comment:s,offset:t}}const vp="Block collections are not allowed within flow collections",wp=e=>e&&(e.type==="block-map"||e.type==="block-seq");function Tj({composeNode:e,composeEmptyNode:t},n,a,s,o){var S;const c=a.start.source==="{",d=c?"flow map":"flow sequence",f=(o==null?void 0:o.nodeClass)??(c?si:Er),p=new f(n.schema);p.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 C=a.items[_],{start:T,key:D,sep:B,value:M}=C,q=Ol(T,{flow:d,indicator:"explicit-key-ind",next:D??(B==null?void 0:B[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!q.found){if(!q.anchor&&!q.tag&&!B&&!M){_===0&&q.comma?s(q.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`):_<a.items.length-1&&s(q.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${d}`),q.comment&&(p.comment?p.comment+=`
442
+ `+q.comment:p.comment=q.comment),g=q.end;continue}!c&&n.options.strict&&uc(D)&&s(D,"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 ${d}`);else if(q.comma||s(q.start,"MISSING_CHAR",`Missing , between ${d} items`),q.comment){let F="";e:for(const ee of T)switch(ee.type){case"comma":case"space":break;case"comment":F=ee.source.substring(1);break e;default:break e}if(F){let ee=p.items[p.items.length-1];Rt(ee)&&(ee=ee.value??ee.key),ee.comment?ee.comment+=`
443
+ `+F:ee.comment=F,q.comment=q.comment.substring(F.length+1)}}if(!c&&!B&&!q.found){const F=M?e(n,M,q,s):t(n,q.end,B,null,q,s);p.items.push(F),g=F.range[2],wp(M)&&s(F.range,"BLOCK_IN_FLOW",vp)}else{n.atKey=!0;const F=q.end,ee=D?e(n,D,q,s):t(n,F,T,null,q,s);wp(D)&&s(ee.range,"BLOCK_IN_FLOW",vp),n.atKey=!1;const U=Ol(B??[],{flow:d,indicator:"map-value-ind",next:M,offset:ee.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(U.found){if(!c&&!q.found&&n.options.strict){if(B)for(const pe of B){if(pe===U.found)break;if(pe.type==="newline"){s(pe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}q.start<U.found.offset-1024&&s(U.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&&((S=M.source)==null?void 0:S[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${d}`):s(U.start,"MISSING_CHAR",`Missing , or : between ${d} items`));const X=M?e(n,M,U,s):U.found?t(n,U.end,B,null,U,s):null;X?wp(M)&&s(X.range,"BLOCK_IN_FLOW",vp):U.comment&&(ee.comment?ee.comment+=`
444
+ `+U.comment:ee.comment=U.comment);const J=new wn(ee,X);if(n.options.keepSourceTokens&&(J.srcToken=C),c){const pe=p;tE(n,pe.items,ee)&&s(F,"DUPLICATE_KEY","Map keys must be unique"),pe.items.push(J)}else{const pe=new si(n.schema);pe.flow=!0,pe.items.push(J);const ue=(X??ee).range;pe.range=[ee.range[0],ue[1],ue[2]],p.items.push(pe)}g=X?X.range[2]:U.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 _=d[0].toUpperCase()+d.substring(1),C=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",C),x&&x.source.length!==1&&E.unshift(x)}if(E.length>0){const _=_c(E,w,n.options.strict,s);_.comment&&(p.comment?p.comment+=`
445
+ `+_.comment:p.comment=_.comment),p.range=[a.offset,w,_.offset]}else p.range=[a.offset,w,w];return p}function kp(e,t,n,a,s,o){const c=n.type==="block-map"?Nj(e,t,n,a,o):n.type==="block-seq"?Cj(e,t,n,a,o):Tj(e,t,n,a,o),d=c.constructor;return s==="!"||s===d.tagName?(c.tag=d.tagName,c):(s&&(c.tag=s),c)}function Aj(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 d=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===si.tagName&&d==="map"||c===Er.tagName&&d==="seq")return kp(e,t,n,s,c);let f=t.schema.tags.find(x=>x.tag===c&&x.collection===d);if(!f){const x=t.schema.knownTags[c];if((x==null?void 0:x.collection)===d)t.schema.tags.push(Object.assign({},x,{default:!1})),f=x;else return x?s(o,"BAD_COLLECTION_TYPE",`${x.tag} used for ${d} collection, but expects ${x.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),kp(e,t,n,s,c)}const p=kp(e,t,n,s,c,f),b=((v=f.resolve)==null?void 0:v.call(f,p,x=>s(o,"TAG_RESOLVE_FAILED",x),t.options))??p,g=Ut(b)?b:new Fe(b);return g.range=p.range,g.tag=c,f!=null&&f.format&&(g.format=f.format),g}function nE(e,t,n){const a=t.offset,s=jj(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?Fe.BLOCK_FOLDED:Fe.BLOCK_LITERAL,c=t.source?Oj(t.source):[];let d=c.length;for(let w=c.length-1;w>=0;--w){const S=c[w][1];if(S===""||S==="\r")d=w;else break}if(d===0){const w=s.chomp==="+"&&c.length>0?`
446
+ `.repeat(Math.max(1,c.length-1)):"";let S=a+s.length;return t.source&&(S+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,S,S]}}let f=t.indent+s.indent,p=t.offset+s.length,b=0;for(let w=0;w<d;++w){const[S,_]=c[w];if(_===""||_==="\r")s.indent===0&&S.length>f&&(f=S.length);else{S.length<f&&n(p+S.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(f=S.length),b=w,f===0&&!e.atRoot&&n(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=S.length+_.length+1}for(let w=c.length-1;w>=d;--w)c[w][0].length>f&&(d=w+1);let g="",v="",x=!1;for(let w=0;w<b;++w)g+=c[w][0].slice(f)+`
447
+ `;for(let w=b;w<d;++w){let[S,_]=c[w];p+=S.length+_.length+1;const C=_[_.length-1]==="\r";if(C&&(_=_.slice(0,-1)),_&&S.length<f){const D=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(p-_.length-(C?2:1),"BAD_INDENT",D),S=""}o===Fe.BLOCK_LITERAL?(g+=v+S.slice(f)+_,v=`
448
+ `):S.length>f||_[0]===" "?(v===" "?v=`
449
+ `:!x&&v===`
450
+ `&&(v=`
451
+
452
+ `),g+=v+S.slice(f)+_,v=`
453
+ `,x=!0):_===""?v===`
454
+ `?g+=`
455
+ `:v=`
456
+ `:(g+=v+_,v=" ",x=!1)}switch(s.chomp){case"-":break;case"+":for(let w=d;w<c.length;++w)g+=`
457
+ `+c[w][0].slice(f);g[g.length-1]!==`
458
+ `&&(g+=`
459
+ `);break;default:g+=`
460
+ `}const E=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,E,E]}}function jj({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,d="",f=-1;for(let v=1;v<s.length;++v){const x=s[v];if(!d&&(x==="-"||x==="+"))d=x;else{const E=Number(x);!c&&E?c=E:f===-1&&(f=e+v)}}f!==-1&&a(f,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let p=!1,b="",g=s.length;for(let v=1;v<t.length;++v){const x=t[v];switch(x.type){case"space":p=!0;case"newline":g+=x.source.length;break;case"comment":n&&!p&&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:d,comment:b,length:g}}function Oj(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 iE(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let d,f;const p=(v,x,E)=>n(a+v,x,E);switch(s){case"scalar":d=Fe.PLAIN,f=Dj(o,p);break;case"single-quoted-scalar":d=Fe.QUOTE_SINGLE,f=Mj(o,p);break;case"double-quoted-scalar":d=Fe.QUOTE_DOUBLE,f=Rj(o,p);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=_c(c,b,t,n);return{value:f,type:d,comment:g.comment,range:[a,b,g.offset]}}function Dj(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}`),aE(e)}function Mj(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),aE(e.slice(1,-1)).replace(/''/g,"'")}function aE(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
461
+ `,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
462
+ `,"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===`
463
+ `?s+=o:o=`
464
+ `:(s+=o+a[1],o=" "),c=n.lastIndex;const d=/[ \t]*(.*)/sy;return d.lastIndex=c,a=d.exec(e),s+o+((a==null?void 0:a[1])??"")}function Rj(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
465
+ `))if(s===`
466
+ `){const{fold:o,offset:c}=Lj(e,a);n+=o,a=c}else if(s==="\\"){let o=e[++a];const c=Ij[o];if(c)n+=c;else if(o===`
467
+ `)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
468
+ `)for(o=e[++a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="x"||o==="u"||o==="U"){const d={x:2,u:4,U:8}[o];n+=zj(e,a+1,d,t),a+=d}else{const d=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),n+=d}}else if(s===" "||s===" "){const o=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
469
+ `&&!(c==="\r"&&e[a+2]===`
470
+ `)&&(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 Lj(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
471
+ `||a==="\r")&&!(a==="\r"&&e[t+2]!==`
472
+ `);)a===`
473
+ `&&(n+=`
474
+ `),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const Ij={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
475
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function zj(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 d=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${d}`),d}return String.fromCodePoint(c)}function rE(e,t,n,a){const{value:s,type:o,comment:c,range:d}=t.type==="block-scalar"?nE(e,t,a):iE(t,e.options.strict,a),f=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let p;e.options.stringKeys&&e.atKey?p=e.schema[ea]:f?p=Bj(e.schema,s,f,n,a):t.type==="scalar"?p=Uj(e,s,t,a):p=e.schema[ea];let b;try{const g=p.resolve(s,v=>a(n??t,"TAG_RESOLVE_FAILED",v),e.options);b=Et(g)?g:new Fe(g)}catch(g){const v=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",v),b=new Fe(s)}return b.range=d,b.source=s,o&&(b.type=o),f&&(b.tag=f),p.format&&(b.format=p.format),c&&(b.comment=c),b}function Bj(e,t,n,a,s){var d;if(n==="!")return e[ea];const o=[];for(const f of e.tags)if(!f.collection&&f.tag===n)if(f.default&&f.test)o.push(f);else return f;for(const f of o)if((d=f.test)!=null&&d.test(t))return f;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[ea])}function Uj({atKey:e,directives:t,schema:n},a,s,o){const c=n.tags.find(d=>{var f;return(d.default===!0||e&&d.default==="key")&&((f=d.test)==null?void 0:f.test(a))})||n[ea];if(n.compat){const d=n.compat.find(f=>{var p;return f.default&&((p=f.test)==null?void 0:p.test(a))})??n[ea];if(c.tag!==d.tag){const f=t.tagString(c.tag),p=t.tagString(d.tag),b=`Value may be parsed as either ${f} or ${p}`;o(s,"TAG_RESOLVE_FAILED",b,!0)}}return c}function Pj(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 Fj={composeNode:sE,composeEmptyNode:dg};function sE(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:d,tag:f}=n;let p,b=!0;switch(t.type){case"alias":p=qj(e,t,a),(d||f)&&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":p=rE(e,t,f,a),d&&(p.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{p=Aj(Fj,e,t,n,a),d&&(p.anchor=d.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 p??(p=dg(e,t.offset,void 0,null,n,a)),d&&p.anchor===""&&a(d,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!Et(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&a(f??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(p.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?p.comment=c:p.commentBefore=c),e.options.keepSourceTokens&&b&&(p.srcToken=t),p}function dg(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:d,end:f},p){const b={type:"scalar",offset:Pj(t,n,a),indent:-1,source:""},g=rE(e,b,d,p);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&p(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=f),g}function qj({options:e},{offset:t,source:n,end:a},s){const o=new Fd(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,d=_c(a,c,e.strict,s);return o.range=[t,c,d.offset],d.comment&&(o.comment=d.comment),o}function $j(e,t,{offset:n,start:a,value:s,end:o},c){const d=Object.assign({_directives:t},e),f=new $l(void 0,d),p={atKey:!1,atRoot:!0,directives:f.directives,options:f.options,schema:f.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&&(f.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")),f.contents=s?sE(p,s,b,c):dg(p,b.end,a,null,b,c);const g=f.contents.range[2],v=_c(o,g,!1,c);return v.comment&&(f.comment=v.comment),f.range=[n,g,v.offset],f}function Ko(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 nw(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?`
476
+
477
+ `:`
478
+ `)+(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 fg{constructor(t={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(n,a,s,o)=>{const c=Ko(n);o?this.warnings.push(new eE(c,a,s)):this.errors.push(new es(c,a,s))},this.directives=new jn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=nw(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
479
+ ${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(zt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];Rt(c)&&(c=c.key);const d=c.commentBefore;c.commentBefore=d?`${a}
480
+ ${d}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
481
+ ${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:nw(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=Ko(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=$j(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 es(Ko(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 es(Ko(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=_c(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}
482
+ ${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new es(Ko(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 $l(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 Hj(e,t=!0,n){if(e){const a=(s,o,c)=>{const d=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(d,o,c);else throw new es([d,d+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return iE(e,t,a);case"block-scalar":return nE({options:{strict:t}},e,a)}}return null}function Kj(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:o=-1,type:c="PLAIN"}=t,d=Ec({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),f=t.end??[{type:"newline",offset:-1,indent:a,source:`
483
+ `}];switch(d[0]){case"|":case">":{const p=d.indexOf(`
484
+ `),b=d.substring(0,p),g=d.substring(p+1)+`
485
+ `,v=[{type:"block-scalar-header",offset:o,indent:a,source:b}];return lE(v,f)||v.push({type:"newline",offset:-1,indent:a,source:`
486
+ `}),{type:"block-scalar",offset:o,indent:a,props:v,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:d,end:f};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:d,end:f};default:return{type:"scalar",offset:o,indent:a,source:d,end:f}}}function Gj(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:o=!1,type:c}=n,d="indent"in e?e.indent:null;if(a&&typeof d=="number"&&(d+=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 p=e.props[0];if(p.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=p.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const f=Ec({type:c,value:t},{implicitKey:s||d===null,indent:d!==null&&d>0?" ".repeat(d):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(f[0]){case"|":case">":Qj(e,f);break;case'"':Ep(e,f,"double-quoted-scalar");break;case"'":Ep(e,f,"single-quoted-scalar");break;default:Ep(e,f,"scalar")}}function Qj(e,t){const n=t.indexOf(`
487
+ `),a=t.substring(0,n),s=t.substring(n+1)+`
488
+ `;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,d=[{type:"block-scalar-header",offset:o,indent:c,source:a}];lE(d,"end"in e?e.end:void 0)||d.push({type:"newline",offset:-1,indent:c,source:`
489
+ `});for(const f of Object.keys(e))f!=="type"&&f!=="offset"&&delete e[f];Object.assign(e,{type:"block-scalar",indent:c,props:d,source:s})}}function lE(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 Ep(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:`
490
+ `};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 Yj=e=>"type"in e?Nd(e):gd(e);function Nd(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=Nd(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=gd(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=gd(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=gd(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 gd({start:e,key:t,sep:n,value:a}){let s="";for(const o of e)s+=o.source;if(t&&(s+=Nd(t)),n)for(const o of n)s+=o.source;return a&&(s+=Nd(a)),s}const vm=Symbol("break visit"),Vj=Symbol("skip children"),oE=Symbol("remove item");function ds(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),cE(Object.freeze([]),e,t)}ds.BREAK=vm;ds.SKIP=Vj;ds.REMOVE=oE;ds.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};ds.parentCollection=(e,t)=>{const n=ds.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 cE(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 d=cE(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof d=="number")c=d-1;else{if(d===vm)return vm;d===oE&&(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 Wd="\uFEFF",Xd="",Zd="",dc="",Wj=e=>!!e&&"items"in e,Xj=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function Zj(e){switch(e){case Wd:return"<BOM>";case Xd:return"<DOC>";case Zd:return"<FLOW_END>";case dc:return"<SCALAR>";default:return JSON.stringify(e)}}function uE(e){switch(e){case Wd:return"byte-order-mark";case Xd:return"doc-mode";case Zd:return"flow-error-end";case dc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
491
+ `:case`\r
492
+ `: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 Jj=Object.freeze(Object.defineProperty({__proto__:null,BOM:Wd,DOCUMENT:Xd,FLOW_END:Zd,SCALAR:dc,createScalarToken:Kj,isCollection:Wj,isScalar:Xj,prettyToken:Zj,resolveAsScalar:Hj,setScalarValue:Gj,stringify:Yj,tokenType:uE,visit:ds},Symbol.toStringTag,{value:"Module"}));function Mi(e){switch(e){case void 0:case" ":case`
493
+ `:case"\r":case" ":return!0;default:return!1}}const iw=new Set("0123456789ABCDEFabcdef"),eO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zu=new Set(",[]{}"),tO=new Set(` ,[]{}
494
+ \r `),Sp=e=>!e||tO.has(e);class dE{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===`
495
+ `?!0:n==="\r"?this.buffer[t+1]===`
496
+ `:!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===`
497
+ `||!s&&!this.atEnd)return t+a+1}return n===`
498
+ `||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Mi(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(`
499
+ `,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]===Wd&&(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 Xd,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==="...")&&Mi(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&&!Mi(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===":")&&Mi(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(Sp),"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("..."))&&Mi(s[3]))&&!(a===this.indentNext-1&&this.flowLevel===1&&(s[0]==="]"||s[0]==="}")))return this.flowLevel=0,yield Zd,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(Sp),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const c=this.charAt(1);if(this.flowKey||Mi(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(`
500
+ `,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
501
+ `,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=>Mi(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`
502
+ `:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
503
+ `)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(`
504
+ `,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===`
505
+ `;)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 d=o;for(;c===" ";)c=this.buffer[--o];if(c===`
506
+ `&&o>=this.pos&&o+1+n>d)t=o;else break}while(!0);return yield dc,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(Mi(o)||t&&Zu.has(o))break;n=a}else if(Mi(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
507
+ `?(a+=1,s=`
508
+ `,o=this.buffer[a+1]):n=a),o==="#"||t&&Zu.has(o))break;if(s===`
509
+ `){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&Zu.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield dc,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(Sp))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Mi(n)||t&&Zu.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(;!Mi(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(eO.has(n))n=this.buffer[++t];else if(n==="%"&&iw.has(this.buffer[t+1])&&iw.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===`
510
+ `?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
511
+ `?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 fE{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 dr(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function aw(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 hE(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 Ju(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 al(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 rw(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!dr(t.start,"explicit-key-ind")&&!dr(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,hE(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 hg{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 dE,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=uE(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"&&rw(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&&aw(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":{aw(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=Ju(this.peek(2)),a=al(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(`
512
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
513
+ `,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 d=[];for(let f=0;f<n.sep.length;++f){const p=n.sep[f];switch(p.type){case"newline":d.push(f);break;case"space":break;case"comment":p.indent>t.indent&&(d.length=0);break;default:d.length=0}}d.length>=2&&(c=n.sep.splice(d[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(dr(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(hE(n.key)&&!dr(n.sep,"newline")){const d=al(n.start),f=n.key,p=n.sep;p.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:f,sep:p}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(dr(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const d=al(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:d,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):dr(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 d=this.flowScalar(this.type);o||n.value?(t.items.push({start:c,key:d,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(d):(Object.assign(n,{key:d,sep:[]}),this.onKeyLine=!0);return}default:{const d=this.startBlockValue(t);if(d){if(d.type==="block-seq"){if(!n.explicitKey&&n.sep&&!dr(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(d);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||dr(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=Ju(a),o=al(s);rw(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const d={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]=d}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
514
+ `)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
515
+ `,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=Ju(t),a=al(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=Ju(t),a=al(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 pE(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new fE||null,prettyErrors:t}}function nO(e,t={}){const{lineCounter:n,prettyErrors:a}=pE(t),s=new hg(n==null?void 0:n.addNewLine),o=new fg(t),c=Array.from(o.compose(s.parse(e)));if(a&&n)for(const d of c)d.errors.forEach(_d(e,n)),d.warnings.forEach(_d(e,n));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function mE(e,t={}){const{lineCounter:n,prettyErrors:a}=pE(t),s=new hg(n==null?void 0:n.addNewLine),o=new fg(t);let c=null;for(const d of o.compose(s.parse(e),!0,e.length))if(!c)c=d;else if(c.options.logLevel!=="silent"){c.errors.push(new es(d.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(_d(e,n)),c.warnings.forEach(_d(e,n))),c}function iO(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=mE(e,n);if(!s)return null;if(s.warnings.forEach(o=>Mk(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 aO(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 ps(e)&&!a?e.toString(n):new $l(e,a,n).toString(n)}const sw=Object.freeze(Object.defineProperty({__proto__:null,Alias:Fd,CST:Jj,Composer:fg,Document:$l,Lexer:dE,LineCounter:fE,Pair:wn,Parser:hg,Scalar:Fe,Schema:Zk,YAMLError:ug,YAMLMap:si,YAMLParseError:es,YAMLSeq:Er,YAMLWarning:eE,isAlias:Nr,isCollection:zt,isDocument:ps,isMap:Ul,isNode:Ut,isPair:Rt,isScalar:Et,isSeq:Pl,parse:iO,parseAllDocuments:nO,parseDocument:mE,stringify:aO,visit:ms,visitAsync:Pd},Symbol.toStringTag,{value:"Module"}));function rO({projectName:e,file:t,onClose:n,onSaved:a}){const s=Ue(),o=Qn(),{alert:c}=ci(),{data:d,isLoading:f,isError:p,error:b,refetch:g}=ct({queryKey:["pipeline-file",e,t],queryFn:()=>A2(e,t)}),[v,x]=A.useState("structured"),[E,w]=A.useState(null),[S,_]=A.useState(null);A.useEffect(()=>{d&&E===null&&(w(d.content),_(d.etag),d.parseError&&x("yaml"))},[d,E]),A.useEffect(()=>{const q=F=>{F.key==="Escape"&&n()};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[n]);const C=Gn({mutationFn:()=>{if(E===null||S===null)throw new Error("no draft");return j2(e,t,E,S)},onSuccess:q=>{_(q.etag),o.invalidateQueries({queryKey:["pipeline-file",e,t]}),o.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:q=>{const F=q.status;c({title:s(F===409?"pipelineEditor.error.conflict.title":F===422?"pipelineEditor.error.yaml.title":"pipelineEditor.error.save.title"),body:q instanceof Error?q.message:String(q)})}}),T=E!==null&&d&&E!==d.content,{parsed:D,parseError:B}=A.useMemo(()=>{if(E===null)return{parsed:null,parseError:null};try{return{parsed:sw.parse(E)??{},parseError:null}}catch(q){return{parsed:null,parseError:q instanceof Error?q.message:String(q)}}},[E]),M=q=>{try{const F=sw.stringify(q,{lineWidth:0});w(F)}catch(F){c({title:s("pipelineEditor.error.serialize.title"),body:F instanceof Error?F.message:String(F)})}};return h.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:h.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[h.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[h.jsxs("div",{children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[h.jsx(Qv,{size:20,strokeWidth:2.5}),h.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(d==null?void 0:d.isActive)&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:s("pipelineEditor.activeBadge")})]}),h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,S&&` · etag ${S}`]})]}),h.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("pipelineEditor.close"),children:h.jsx(_i,{size:14,strokeWidth:3})})]}),f&&h.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("common.loading")}),p&&h.jsx("p",{className:"text-[var(--color-crashed)]",children:s("pipelineEditor.error.load",{detail:b instanceof Error?b.message:String(b)})}),d&&E!==null&&h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[h.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:[h.jsxs("button",{type:"button",onClick:()=>x("structured"),"aria-pressed":v==="structured",disabled:!!B,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",v==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",B?"opacity-50 cursor-not-allowed":""].join(" "),title:B??void 0,children:[h.jsx(kc,{size:11,strokeWidth:2.5}),s("pipelineEditor.mode.structured")]}),h.jsxs("button",{type:"button",onClick:()=>x("yaml"),"aria-pressed":v==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",v==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[h.jsx(Qv,{size:11,strokeWidth:2.5}),s("pipelineEditor.mode.yaml")]})]}),B&&h.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[h.jsx(sc,{size:12,strokeWidth:2.5}),s("pipelineEditor.parseError.prefix",{detail:B})]}),(d==null?void 0:d.isActive)&&h.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:s("pipelineEditor.activeWarning")})]}),h.jsxs("div",{className:"flex-1 overflow-auto",children:[v==="structured"&&D&&h.jsx(sO,{parsed:D,onChange:M}),v==="yaml"&&h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:E,onChange:q=>w(q.target.value),spellCheck:!1,"aria-label":s("pipelineEditor.yamlAria")})]}),h.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:[h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:T?h.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:s("pipelineEditor.status.unsaved")}):C.isSuccess?h.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[h.jsx(lc,{size:12,strokeWidth:2.5})," ",s("pipelineEditor.status.saved")]}):s("pipelineEditor.status.noChanges")}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{w(null),g()},disabled:C.isPending,type:"button",children:s("pipelineEditor.reload")}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>C.mutate(),disabled:!T||C.isPending,type:"button","aria-label":s("pipelineEditor.saveAria"),children:[C.isPending?h.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):h.jsx(Ud,{size:13,strokeWidth:3}),s("pipelineEditor.save")]})]})]})]})]})})}function sO({parsed:e,onChange:t}){const n=Ue(),a=e.stages??[],s=p=>{t({...e,stages:p})},o=()=>{s([...a,{name:`stage-${a.length+1}`,on_complete:"move_card Done"}])},c=p=>{s(a.filter((b,g)=>g!==p))},d=(p,b)=>{const g=[...a],v=p+b;v<0||v>=g.length||([g[p],g[v]]=[g[v],g[p]],s(g))},f=(p,b)=>{s(a.map((g,v)=>v===p?{...g,...b}:g))};return h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[h.jsx("span",{className:"font-bold",children:"mode:"}),h.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:p=>t({...e,mode:p.target.value}),children:[h.jsx("option",{value:"project",children:"project"}),h.jsx("option",{value:"steps",children:"steps"})]})]}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n("pipelineEditor.modeHint")})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:n("pipelineEditor.stages.heading",{count:a.length})}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:o,"aria-label":n("pipelineEditor.stages.add"),children:[h.jsx(Bi,{size:11,strokeWidth:3})," ",n("pipelineEditor.stages.add")]})]}),a.length===0?h.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:n("pipelineEditor.stages.empty")}):h.jsx("div",{className:"flex flex-col gap-3",children:a.map((p,b)=>h.jsx(lO,{stage:p,index:b,total:a.length,onChange:g=>f(b,g),onRemove:()=>c(b),onMoveUp:()=>d(b,-1),onMoveDown:()=>d(b,1)},b))})]})]})}function lO({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:o,onMoveDown:c}){const d=Ue(),f=e.on_fail??{};return h.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&h.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})]}),h.jsxs("div",{className:"flex gap-1",children:[h.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":d("pipelineEditor.stage.moveUp"),children:h.jsx(PT,{size:12,strokeWidth:3})}),h.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":d("pipelineEditor.stage.moveDown"),children:h.jsx(wc,{size:12,strokeWidth:3})}),h.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":d("pipelineEditor.stage.remove"),children:h.jsx(zl,{size:12,strokeWidth:3})})]})]}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[h.jsx(or,{label:"name",hint:d("pipelineEditor.stage.name.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:p=>a({name:p.target.value}),placeholder:"develop"})}),h.jsx(or,{label:"profile",hint:d("pipelineEditor.stage.profile.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:p=>a({profile:p.target.value||void 0}),placeholder:"fullstack"})}),h.jsx(or,{label:"card_state",hint:d("pipelineEditor.stage.cardState.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:p=>a({card_state:p.target.value||void 0}),placeholder:"Inprogress"})}),h.jsx(or,{label:"timeout",hint:d("pipelineEditor.stage.timeout.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:p=>a({timeout:p.target.value||void 0}),placeholder:"2h"})}),h.jsx(or,{label:"trigger",hint:d("pipelineEditor.stage.trigger.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:p=>a({trigger:p.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),h.jsx(or,{label:"on_complete",hint:d("pipelineEditor.stage.onComplete.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:p=>a({on_complete:p.target.value}),placeholder:"move_card Done"})})]}),h.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[h.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),h.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[h.jsx(or,{label:"action",hint:d("pipelineEditor.stage.onFail.action.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:p=>a({on_fail:{...f,action:p.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),h.jsx(or,{label:"comment",hint:d("pipelineEditor.stage.onFail.comment.hint"),children:h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:p=>a({on_fail:{...f,comment:p.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),h.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[h.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:p=>a({on_fail:{...f,halt:p.target.checked}})}),h.jsx("span",{className:"font-bold",children:"halt"}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:d("pipelineEditor.stage.halt.note")})]})]})]})}function or({label:e,hint:t,children:n}){return h.jsxs("label",{className:"flex flex-col gap-1",children:[h.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&h.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function oO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const o=Ue(),[c,d]=A.useState(""),[f,p]=A.useState("blank");A.useEffect(()=>{const S=_=>{_.key==="Escape"&&e()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[e]);const b=c.trim(),g=b.endsWith(".yaml")?b:b?`${b}.yaml`:"",v=g&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(g),x=()=>{!v||s||t(g,f)},w=o("newPipelineDialog.field.filename.help",{filename:"__FN__"}).split("__FN__");return h.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:h.jsxs("div",{className:"nb-card max-w-md w-full",children:[h.jsxs("header",{className:"flex items-start justify-between mb-4",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:o("newPipelineDialog.title")}),h.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":o("common.close"),children:h.jsx(_i,{size:14,strokeWidth:3})})]}),h.jsxs("form",{onSubmit:S=>{S.preventDefault(),x()},className:"flex flex-col gap-4",children:[h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:o("newPipelineDialog.field.filename.label")}),h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:o("newPipelineDialog.field.filename.placeholder"),value:c,onChange:S=>d(S.target.value),autoFocus:!0}),h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[w[0],h.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:g||"xxx.yaml"}),w[1]]})]}),h.jsxs("fieldset",{className:"flex flex-col gap-2",children:[h.jsx("legend",{className:"text-sm font-bold mb-1",children:o("newPipelineDialog.section.template")}),h.jsx(_p,{value:"blank",current:f,label:o("newPipelineDialog.template.blank.label"),desc:o("newPipelineDialog.template.blank.desc"),onSelect:p}),h.jsx(_p,{value:"sample",current:f,label:o("newPipelineDialog.template.sample.label"),desc:o("newPipelineDialog.template.sample.desc"),onSelect:p,disabled:!a,disabledReason:o("newPipelineDialog.template.sample.unavailable")}),h.jsx(_p,{value:"active",current:f,label:o("newPipelineDialog.template.active.label"),desc:o("newPipelineDialog.template.active.desc"),onSelect:p,disabled:!n,disabledReason:o("newPipelineDialog.template.active.unavailable")})]}),h.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[h.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:o("common.cancel")}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!v||s,"aria-label":o("newPipelineDialog.create.aria"),children:[s?h.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):h.jsx(Bi,{size:13,strokeWidth:3}),o("common.create")]})]})]})]})})}function _p({value:e,current:t,label:n,desc:a,onSelect:s,disabled:o,disabledReason:c}){const d=t===e;return h.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":d?"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:[h.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:d,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm font-bold",children:n}),h.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function cO(){var c;const e=Ue(),{name:t=""}=Q0(),n=Sr(),[a,s]=A.useState("overview"),o=ct({queryKey:["project",t],queryFn:()=>k2(t),enabled:!!t});return h.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[h.jsxs("header",{className:"flex items-center gap-3",children:[h.jsxs("button",{type:"button",onClick:()=>n("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[h.jsx(ik,{size:14,strokeWidth:3}),e("newProject.back")]}),h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:t}),h.jsx(hs,{to:`/board?project=${encodeURIComponent(t)}`,className:"nb-btn nb-btn-mint",children:e("projectDetail.openBoard")})]}),h.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[h.jsx(ed,{current:a,value:"overview",onSelect:s,icon:aA,children:e("projectDetail.tab.overview")}),h.jsx(ed,{current:a,value:"config",onSelect:s,icon:ok,children:e("projectDetail.tab.config")}),h.jsx(ed,{current:a,value:"pipelines",onSelect:s,icon:fk,children:e("projectDetail.tab.pipelines")}),h.jsx(ed,{current:a,value:"danger",onSelect:s,icon:zl,children:e("projectDetail.tab.danger")})]}),a==="overview"&&h.jsx(uO,{name:t,data:o.data,loading:o.isLoading}),a==="config"&&h.jsx(dO,{name:t}),a==="pipelines"&&h.jsx(fO,{name:t}),a==="danger"&&h.jsx(hO,{name:t,repoDir:((c=o.data)==null?void 0:c.repoDir)??null})]})}function ed({current:e,value:t,onSelect:n,icon:a,children:s}){const o=e===t;return h.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:[h.jsx(a,{size:13,strokeWidth:2.5}),s]})}function uO({name:e,data:t,loading:n}){const a=Ue();return n?h.jsx("div",{className:"nb-card",children:h.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")})}):t?h.jsx("div",{className:"nb-card",children:h.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.repoDir")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.pmBackend")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.agent")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.cards")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("projectDetail.overview.cards.value",{total:t.cards.total,inprogress:t.cards.inprogress,done:t.cards.done})}),h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.workers")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("projectDetail.overview.workers.value",{total:t.workers.total,active:t.workers.active})}),h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.pipeline")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),h.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.lastActivity")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):h.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:h.jsx("p",{children:a("projectDetail.overview.notFound",{name:e})})})}function dO({name:e}){const t=Ue(),n=Qn(),{alert:a}=ci(),{data:s,isLoading:o,isError:c,error:d,refetch:f}=ct({queryKey:["project-conf",e],queryFn:()=>S2(e)}),[p,b]=A.useState(null),[g,v]=A.useState(null);A.useEffect(()=>{s&&p===null&&(b(s.content),v(s.etag))},[s,p]);const x=p!==null&&s!==void 0&&p!==s.content,E=Gn({mutationFn:()=>{if(p===null||g===null)throw new Error("no draft");return _2(e,p,g)},onSuccess:w=>{v(w.etag),n.invalidateQueries({queryKey:["project-conf",e]}),n.invalidateQueries({queryKey:["project",e]})},onError:w=>{const S=w.status;a({title:t(S===409?"projectDetail.config.error.conflict.title":"projectDetail.config.error.save.title"),body:S===409?t("projectDetail.config.error.conflict.body"):w instanceof Error?w.message:String(w)})}});return o?h.jsx("div",{className:"nb-card",children:h.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})}):c?h.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:h.jsx("p",{children:t("projectDetail.config.error.load",{detail:d instanceof Error?d.message:String(d)})})}):h.jsxs("div",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:h.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"]})}),g&&h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",g]})]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{b(null),f()},disabled:E.isPending,"aria-label":t("projectDetail.config.reload"),children:[h.jsx(Al,{size:13,strokeWidth:2.5}),t("projectDetail.config.reload")]}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>E.mutate(),disabled:!x||E.isPending,"aria-label":t("projectDetail.config.saveAria"),children:[E.isPending?h.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):E.isSuccess&&!x?h.jsx(IT,{size:13,strokeWidth:3}):h.jsx(Ud,{size:13,strokeWidth:3}),t("projectDetail.config.save")]})]})]}),h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:p??"",onChange:w=>b(w.target.value),spellCheck:!1,"aria-label":t("projectDetail.config.editorAria")}),x&&h.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:t("projectDetail.config.confDirty")})]})}function fO({name:e}){const t=Ue(),n=Qn(),{confirm:a,alert:s}=ci(),{data:o,isLoading:c}=ct({queryKey:["project-pipelines",e],queryFn:()=>C2(e)}),[d,f]=A.useState(null),[p,b]=A.useState(!1),g=Gn({mutationFn:w=>T2(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{s({title:t("projectDetail.pipelines.switch.error"),body:w instanceof Error?w.message:String(w)})}}),v=Gn({mutationFn:w=>D2(e,w),onSuccess:()=>n.invalidateQueries({queryKey:["project-pipelines",e]}),onError:w=>{s({title:t("projectDetail.pipelines.delete.error"),body:w instanceof Error?w.message:String(w)})}}),x=Gn({mutationFn:w=>O2(e,w.name,w.template),onSuccess:w=>{n.invalidateQueries({queryKey:["project-pipelines",e]}),b(!1),f(w.name)},onError:w=>{s({title:t("projectDetail.pipelines.create.error"),body:w instanceof Error?w.message:String(w)})}});if(c)return h.jsx("div",{className:"nb-card",children:h.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})});const E=[];o!=null&&o.active&&E.push({name:o.active,isActive:!0});for(const w of(o==null?void 0:o.available)??[])E.push({name:w.name,isActive:!1});return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:t("projectDetail.pipelines.title")}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>b(!0),disabled:x.isPending,"aria-label":t("projectDetail.pipelines.add"),children:[h.jsx(Bi,{size:12,strokeWidth:3}),t("projectDetail.pipelines.add")]})]}),E.length===0?h.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:t("projectDetail.pipelines.empty")}):h.jsx("ul",{className:"flex flex-col gap-2",children:E.map(w=>h.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsx(fk,{size:16,strokeWidth:2.5}),h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:w.name}),w.isActive&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("projectDetail.pipelines.activeBadge")}),h.jsxs("div",{className:"flex gap-1",children:[h.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(w.name),"aria-label":t("projectDetail.pipelines.editAria",{name:w.name}),children:[h.jsx(Wm,{size:11,strokeWidth:2.5}),t("projectDetail.pipelines.edit")]}),!w.isActive&&h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await a({title:t("projectDetail.pipelines.switch.confirm.title",{name:w.name}),body:t("projectDetail.pipelines.switch.confirm.body",{name:w.name}),confirm:t("projectDetail.pipelines.switch.confirm.button")})&&g.mutate(w.name)},disabled:g.isPending,"aria-label":t("projectDetail.pipelines.switchAria",{name:w.name}),children:t("projectDetail.pipelines.switch")}),h.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await a({title:t("projectDetail.pipelines.delete.confirm.title",{name:w.name}),body:t("projectDetail.pipelines.delete.confirm.body"),confirm:t("common.delete"),danger:!0})&&v.mutate(w.name)},disabled:v.isPending,"aria-label":t("projectDetail.pipelines.deleteAria",{name:w.name}),children:h.jsx(zl,{size:11,strokeWidth:2.5})})]})]})]},w.name))})]}),d&&h.jsx(rO,{projectName:e,file:d,onClose:()=>f(null),onSaved:()=>{n.invalidateQueries({queryKey:["project-pipelines",e]})}}),p&&h.jsx(oO,{hasActive:!!(o!=null&&o.active),hasSample:!0,isPending:x.isPending,onCancel:()=>b(!1),onCreate:(w,S)=>x.mutate({name:w,template:S})})]})}function hO({name:e,repoDir:t}){const n=Ue(),a=Sr(),s=Qn(),{alert:o}=ci(),[c,d]=A.useState(""),[f,p]=A.useState(!0),b=Gn({mutationFn:()=>N2(e,{includeClaudeDir:f}),onSuccess:w=>{s.invalidateQueries({queryKey:["projects"]});const S=w.claudeRemoved.filter(_=>_.ok).map(_=>_.path);o({title:n("projectDetail.danger.deleted.title"),body:S.length>0?n("projectDetail.danger.deleted.bodyWithList",{paths:S.join(`
516
+ `)}):n("projectDetail.danger.deleted.body")}).then(()=>a("/projects"))},onError:w=>{o({title:n("projectDetail.danger.error"),body:w instanceof Error?w.message:String(w)})}}),v=n("projectDetail.danger.body",{path:"__PATH__"}).split("__PATH__"),E=n("projectDetail.danger.confirmPrompt",{name:"__NAME__"}).split("__NAME__");return h.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:n("projectDetail.danger.title")}),h.jsxs("p",{className:"text-sm mb-4",children:[v[0],h.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,"/"]}),v[1]]}),t&&h.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:[h.jsx("input",{type:"checkbox",checked:f,onChange:w=>p(w.target.checked),className:"mt-0.5"}),h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm font-bold",children:n("projectDetail.danger.includeClaude.label")}),h.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:n("projectDetail.danger.includeClaude.note")})]})]}),h.jsx("div",{className:"mb-4",children:h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsxs("span",{className:"text-sm font-bold",children:[E[0],h.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e}),E[1]]}),h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:c,onChange:w=>d(w.target.value),placeholder:e})]})}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:c!==e||b.isPending,onClick:()=>b.mutate(),"aria-label":n("projectDetail.danger.deleteAria"),children:[b.isPending?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(zl,{size:14,strokeWidth:3}),n("projectDetail.danger.deleteButton")]})]})}function pg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return Ht(`/api/skills${t}`)}function pO(e){return Ht(`/api/skills/${encodeURIComponent(e)}`)}function mO(e,t){return Ht(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Jd(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 gO(e,t){return Jd(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function bO(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 yO(e,t){return Jd(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function xO(e,t){return Jd(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function vO(){return Jd("/api/skills/sync")}function wO({project:e,isPending:t,onCancel:n,onCreate:a}){var T;const s=Ue(),[o,c]=A.useState(""),[d,f]=A.useState(""),[p,b]=A.useState(new Set),[g,v]=A.useState(!1),x=ct({queryKey:["skills-all",e],queryFn:()=>pg(e)});A.useEffect(()=>{const D=B=>{B.key==="Escape"&&n()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[n]);const w=o.trim().length>0&&o.trim().length<=200&&!t,S=D=>{const B=new Set(p);B.has(D)?B.delete(D):B.add(D),b(B)},_=()=>{w&&a({title:o.trim(),description:d.trim(),skills:[...p],labels:["AI-PIPELINE"],initialState:g?"Backlog":"Planning"})},C=((T=x.data)==null?void 0:T.data)??[];return h.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:h.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[h.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:s("newCard.title")}),h.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("common.close"),children:h.jsx(_i,{size:14,strokeWidth:3})})]}),h.jsxs("form",{onSubmit:D=>{D.preventDefault(),_()},className:"flex flex-col gap-4 overflow-auto",children:[h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.title")}),h.jsx("input",{type:"text",className:"nb-input w-full",placeholder:s("newCard.field.title.placeholder"),value:o,onChange:D=>c(D.target.value),maxLength:200,autoFocus:!0,required:!0}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.title.help")})]}),h.jsxs("label",{className:"flex flex-col gap-1.5",children:[h.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.description")}),h.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:s("newCard.field.description.placeholder"),value:d,onChange:D=>f(D.target.value)}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.description.help")})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.skills")}),h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.skills.help")}),x.isLoading&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("newCard.field.skills.loading")}),x.isError&&h.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:s("newCard.field.skills.error",{detail:x.error instanceof Error?x.error.message:String(x.error)})}),C.length>0&&h.jsx("div",{className:"flex flex-wrap gap-2",children:C.map(D=>{const B=p.has(D.name);return h.jsx("button",{type:"button",onClick:()=>S(D.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",B?"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":B,children:D.name},D.name)})}),p.size>0&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.skills.selected",{count:p.size,names:[...p].join(", ")})})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[h.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.dispatch")}),h.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:[h.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:g,onChange:D=>v(D.target.checked)}),h.jsxs("div",{className:"flex-1",children:[h.jsx("div",{className:"text-sm font-bold",children:s("newCard.field.dispatch.label")}),h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:s("newCard.field.dispatch.help")})]})]})]})]}),h.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:[h.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:s("common.cancel")}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:_,disabled:!w,type:"button","aria-label":s("newCard.create.aria"),children:[t?h.jsx(Bt,{size:13,strokeWidth:3,className:"animate-spin"}):h.jsx(Bi,{size:13,strokeWidth:3}),s("common.create")]})]})]})})}function kO(e){return Ht(`/api/projects/${encodeURIComponent(e)}/cards`)}function EO(e,t){return Ht(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function Hl(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 SO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function _O(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 NO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function CO(e,t){const n=typeof t=="string"?{title:t}:t;return Hl(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function TO(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 AO(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 jO(e){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function OO(e){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function DO(e,t){return Hl(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function MO(e){const t=Qn();A.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=d=>{try{const f=JSON.parse(d.data);t.invalidateQueries({queryKey:["cards",f.project]}),t.invalidateQueries({queryKey:["card",f.project,f.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=d=>{try{const f=JSON.parse(d.data);t.invalidateQueries({queryKey:["workers",f.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=d=>{try{const f=JSON.parse(d.data);t.invalidateQueries({queryKey:["pipeline-status",f.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 RO=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),LO=new Set(["frontend","backend","mobile","database","devops"]),IO=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),zO=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function BO(e){return RO.has(e)?"lang":LO.has(e)?"end":IO.has(e)?"persona":zO.has(e)?"workflow":"other"}const UO={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function gE({name:e}){const t=UO[BO(e)];return h.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function bE({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return h.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function PO({card:e,onClick:t,done:n,draggable:a}){const s=Ue(),o=e.labels.some(c=>c.startsWith("STARTED-"))&&!n;return h.jsxs("article",{onClick:t,onKeyDown:c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),t())},draggable:a,onDragStart:c=>{c.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),c.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:[h.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[h.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]}),o&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),h.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)&&h.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(c=>h.jsx(gE,{name:c},c)),e.labels.filter(c=>c==="NEEDS-FIX").map(c=>h.jsx(bE,{label:c,kind:"warn"},c))]}),e.checklist&&e.checklist.total>0&&h.jsx(FO,{stats:e.checklist}),h.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:[h.jsx("span",{children:qO(e.updatedAt??e.createdAt,s)}),e.branch&&h.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function FO({stats:e}){const t=Ue();return h.jsxs("div",{className:"mb-2",children:[h.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[h.jsx("span",{className:"font-bold",children:t("kanban.checklist.label",{done:e.done,total:e.total})}),h.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),h.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:h.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),h.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((n,a)=>h.jsxs("li",{className:`flex items-start gap-1 ${n.done?"opacity-60 line-through":""}`,children:[h.jsx("span",{className:"flex-shrink-0 mt-0.5",children:n.done?"✓":"○"}),h.jsx("span",{className:"line-clamp-1",children:n.text})]},a)),e.items.length>3&&h.jsx("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:t("kanban.checklist.more",{count:e.items.length-3})})]})]})}function qO(e,t){if(!e)return"—";const n=new Date(e),a=Date.now()-n.getTime();return a<6e4?t("kanban.time.justNow"):a<36e5?t("kanban.time.minutes",{n:Math.floor(a/6e4)}):a<864e5?t("kanban.time.hours",{n:Math.floor(a/36e5)}):n.toLocaleDateString()}function $O({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const o=Ue(),[c,d]=A.useState(!1);return h.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",c?"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",c||d(!0))},onDragLeave:()=>d(!1),onDrop:f=>{if(d(!1),!s)return;const p=f.dataTransfer.getData("application/x-sps-card-seq"),b=Number.parseInt(p,10);Number.isFinite(b)&&(f.preventDefault(),s(b))},children:[h.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[h.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),h.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})]}),h.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&&h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:o("kanban.column.empty")}),n.map(f=>h.jsx(PO,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function wm(e,t){if(!e)return"";const n=e.split(`
517
+ `),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(`
518
+ `).trim()}function Np(e){return wm(e,"描述")}function HO({project:e,seq:t,onClose:n,onChanged:a}){var ce,de,re,O,R,Q,j,ge,_e,Y,xe;const s=Ue(),o=Qn(),{confirm:c,alert:d}=ci(),{data:f,isLoading:p,isError:b,error:g,refetch:v}=ct({queryKey:["card",e,t],queryFn:()=>EO(e,t)}),[x,E]=A.useState(!1),[w,S]=A.useState(""),[_,C]=A.useState(""),[T,D]=A.useState(new Set),[B,M]=A.useState([]),[q,F]=A.useState(""),ee=ct({queryKey:["skills-all",e],queryFn:()=>pg(e),enabled:x}),X=((de=(ce=ct({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}).data)==null?void 0:ce.data.find(V=>V.name===e))==null?void 0:de.pipelineStatus)==="running";A.useEffect(()=>{x&&f&&(S(f.title),C(Np(f.body)),D(new Set(f.skills)),M([...f.labels]))},[x,f]),A.useEffect(()=>{const V=ae=>{ae.key==="Escape"&&(x?E(!1):n())};return window.addEventListener("keydown",V),()=>window.removeEventListener("keydown",V)},[n,x]);const J=Gn({mutationFn:()=>{if(!f)throw new Error("no data");const V={},ae=w.trim();ae&&ae!==f.title&&(V.title=ae);const ye=Np(f.body);_!==ye&&(V.description=_);const Be=[...T].sort(),jt=[...f.skills].sort();return JSON.stringify(Be)!==JSON.stringify(jt)&&(V.skills=Be),JSON.stringify(B)!==JSON.stringify(f.labels)&&(V.labels=B),Object.keys(V).length===0?Promise.resolve({ok:!0,noop:!0}):AO(e,t,V)},onSuccess:()=>{o.invalidateQueries({queryKey:["card",e,t]}),o.invalidateQueries({queryKey:["cards",e]}),E(!1),a()},onError:V=>{d({title:s("cardModal.error.save.title"),body:V instanceof Error?V.message:String(V)})}}),pe=A.useMemo(()=>{if(!x||!f)return!1;if(w.trim()!==f.title||_!==Np(f.body))return!0;const V=[...T].sort(),ae=[...f.skills].sort();return JSON.stringify(V)!==JSON.stringify(ae)||JSON.stringify(B)!==JSON.stringify(f.labels)},[x,f,w,_,T,B]),ue=V=>{const ae=new Set(T);ae.has(V)?ae.delete(V):ae.add(V),D(ae)},te=()=>{const V=q.trim();if(V){if(B.includes(V)){F("");return}M([...B,V]),F("")}},$=V=>{M(B.filter(ae=>ae!==V))};return h.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:h.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[h.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[h.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)&&h.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}),x&&h.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:s("cardModal.editing")})]}),x?h.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:w,onChange:V=>S(V.target.value),maxLength:200,"aria-label":s("cardModal.title.aria")}):h.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)??s("common.loading")})]}),h.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!x&&f&&h.jsxs("button",{onClick:()=>E(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":s("cardModal.editAria"),children:[h.jsx(Wm,{size:12,strokeWidth:2.5})," ",s("cardModal.edit")]}),h.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":s("cardModal.close.aria"),type:"button",children:h.jsx(_i,{size:14,strokeWidth:3})})]})]}),p&&h.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("common.loading")}),b&&h.jsx("p",{className:"text-[var(--color-crashed)]",children:s("cardModal.error.load",{detail:g instanceof Error?g.message:String(g)})}),f&&h.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!x&&h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(uA,{size:14}),h.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),ee.isLoading&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("cardModal.skills.loading")}),ee.data&&ee.data.data.length>0&&h.jsx("div",{className:"flex flex-wrap gap-1.5",children:ee.data.data.map(V=>{const ae=T.has(V.name);return h.jsx("button",{type:"button",onClick:()=>ue(V.name),"aria-pressed":ae,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ae?"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:V.name},V.name)})})]}),h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),h.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[B.map(V=>h.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:[V,h.jsx("button",{type:"button",onClick:()=>$(V),className:"hover:text-[var(--color-crashed)]","aria-label":s("cardModal.label.removeAria",{label:V}),children:h.jsx(_i,{size:10,strokeWidth:3})})]},V)),h.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:s("cardModal.label.addPlaceholder"),value:q,onChange:V=>F(V.target.value),onKeyDown:V=>{V.key==="Enter"&&!V.nativeEvent.isComposing&&(V.preventDefault(),te())}}),q&&h.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:te,"aria-label":s("cardModal.label.addAria"),children:h.jsx(Bi,{size:10,strokeWidth:3})})]}),h.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:s("cardModal.label.note")})]})]}):h.jsxs(h.Fragment,{children:[f.skills.length>0&&h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),h.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(V=>h.jsx(gE,{name:V},V))})]}),f.labels.length>0&&h.jsxs("div",{children:[h.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),h.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(V=>h.jsx(bE,{label:V,kind:V==="NEEDS-FIX"?"warn":"default"},V))})]})]}),x?h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.section.description")}),h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:_,onChange:V=>C(V.target.value),"aria-label":s("cardModal.body.aria")}),h.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:s("cardModal.body.replaceNote")})]}),(((ge=f.checklist)==null?void 0:ge.total)??0)>0&&h.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[h.jsx("div",{className:"flex items-center justify-between mb-2",children:h.jsxs("span",{className:"font-bold text-sm",children:[s("cardModal.section.checklist")," ",((_e=f.checklist)==null?void 0:_e.done)??0,"/",((Y=f.checklist)==null?void 0:Y.total)??0]})}),h.jsx("ul",{className:"text-sm space-y-1",children:(((xe=f.checklist)==null?void 0:xe.items)??[]).map((V,ae)=>h.jsxs("li",{className:`flex items-start gap-2 ${V.done?"opacity-60 line-through":""}`,children:[h.jsx("span",{children:V.done?"✓":"○"}),h.jsx("span",{children:V.text})]},ae))})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.section.description")}),h.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:wm(f.body,"描述")||s("cardModal.section.empty")})]}),h.jsxs("div",{children:[h.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:[s("cardModal.section.checklist")," ",h.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((re=f.checklist)==null?void 0:re.done)??0,"/",((O=f.checklist)==null?void 0:O.total)??0]})]}),h.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((R=f.checklist)==null?void 0:R.total)??0)>0?h.jsxs(h.Fragment,{children:[h.jsx("div",{className:"flex items-center justify-end mb-2",children:h.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:h.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((Q=f.checklist)==null?void 0:Q.percent)??0}%`}})})}),h.jsx("ul",{className:"text-sm space-y-1",children:(((j=f.checklist)==null?void 0:j.items)??[]).map((V,ae)=>h.jsxs("li",{className:`flex items-start gap-2 ${V.done?"opacity-60 line-through":""}`,children:[h.jsx("span",{children:V.done?"✓":"○"}),h.jsx("span",{children:V.text})]},ae))})]}):h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("cardModal.checklist.empty")})})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("cardModal.section.log")}),h.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:wm(f.body,"日志")||s("cardModal.section.empty")})]})]}),h.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?h.jsxs(h.Fragment,{children:[h.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{E(!1),v()},disabled:J.isPending,children:s("common.cancel")}),h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!pe||!w.trim()||J.isPending,"aria-label":s("cardDetail.save"),children:[J.isPending?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(Ud,{size:14,strokeWidth:3}),s("common.save")]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||X,title:f.state==="Done"?s("cardModal.action.launch.disabledDone"):X?s("cardModal.action.launch.disabledRunning"):void 0,onClick:async()=>{try{await NO(e,t),a()}catch(V){d({title:s("cardModal.action.launch.error"),body:V instanceof Error?V.message:String(V)})}},children:[h.jsx(Xm,{size:14,strokeWidth:3}),s("cardModal.action.launch")]}),h.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await c({title:s("cardModal.action.reset.confirm.title",{seq:t}),body:s("cardModal.action.reset.confirm.body"),confirm:s("cardModal.action.reset.confirm.button"),danger:!0}))try{await SO(e,t),a(),n()}catch(ae){d({title:s("cardModal.action.reset.error"),body:ae instanceof Error?ae.message:String(ae)})}},children:[h.jsx(lk,{size:14,strokeWidth:2.5}),s("cardModal.action.reset")]}),h.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await c({title:s("cardModal.action.delete.confirm1.title",{seq:t}),body:s("cardModal.action.delete.confirm1.body",{title:f.title}),confirm:s("cardModal.action.delete.confirm1.button"),danger:!0})||!await c({title:s("cardModal.action.delete.confirm2.title"),body:s("cardModal.action.delete.confirm2.body",{seq:t}),confirm:s("cardModal.action.delete"),danger:!0})))try{await _O(e,t),a(),n()}catch(ye){d({title:s("projectDetail.pipelines.delete.error"),body:ye instanceof Error?ye.message:String(ye)})}},"aria-label":s("cardModal.action.delete"),children:[h.jsx(zl,{size:14,strokeWidth:2.5}),s("cardModal.action.delete")]})]})})]})]})})}function KO({current:e,onChange:t}){const[n,a]=A.useState(!1),s=A.useRef(null),{data:o}=ct({queryKey:["projects"],queryFn:_r});return A.useEffect(()=>{const c=d=>{var f;(f=s.current)!=null&&f.contains(d.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),h.jsxs("div",{className:"relative",ref:s,children:[h.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,h.jsx(wc,{size:14,strokeWidth:2.5})]}),n&&o&&h.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=>h.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:[h.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),h.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const GO=[{state:"Planning",labelKey:"board.col.planning",bg:"var(--color-accent-purple)"},{state:"Backlog",labelKey:"board.col.backlog",bg:"var(--color-bg-cream)"},{state:"Todo",labelKey:"board.col.todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",labelKey:"board.col.inprogress",bg:"var(--color-secondary)"},{state:"QA",labelKey:"board.col.qa",bg:"var(--color-accent-pink)"},{state:"Done",labelKey:"board.col.done",bg:"var(--color-accent-mint)"}],yE="sps-console:last-board-project";function QO(){if(typeof window>"u")return null;try{return localStorage.getItem(yE)}catch{return null}}function YO(e){if(!(typeof window>"u"))try{localStorage.setItem(yE,e)}catch{}}function VO(){var $,ce,de;const e=Ue(),[t,n]=tk(),a=t.get("project"),[s,o]=A.useState(null),[c,d]=A.useState(""),[f,p]=A.useState(()=>new Set),[b,g]=A.useState(()=>new Set),{confirm:v,alert:x}=ci();MO(a);const E=ct({queryKey:["projects"],queryFn:_r}),w=ct({queryKey:["cards",a],queryFn:()=>kO(a??""),enabled:!!a}),S=Qn(),_=()=>{S.invalidateQueries({queryKey:["cards",a]}),S.invalidateQueries({queryKey:["projects"]}),S.invalidateQueries({queryKey:["pipeline-status",a]})},C=re=>{n({project:re})};A.useEffect(()=>{var O;if(a){YO(a);return}const re=QO();re&&((O=E.data)!=null&&O.data.some(R=>R.name===re))&&n({project:re},{replace:!0})},[a,E.data,n]);const T=Gn({mutationFn:()=>jO(a),onSuccess:()=>{_()},onError:re=>{x({title:e("board.action.startError"),body:re instanceof Error?re.message:String(re)})}}),D=Gn({mutationFn:()=>OO(a),onSuccess:()=>_(),onError:re=>{x({title:e("board.action.stopError"),body:re instanceof Error?re.message:String(re)})}}),B=Gn({mutationFn:()=>DO(a,{all:!0}),onSuccess:()=>_(),onError:re=>{x({title:e("board.action.resetError"),body:re instanceof Error?re.message:String(re)})}}),[M,q]=A.useState(!1),F=Gn({mutationFn:re=>CO(a,re),onSuccess:()=>{_(),q(!1)},onError:re=>{x({title:e("board.action.newCard.error"),body:re instanceof Error?re.message:String(re)})}}),ee=Gn({mutationFn:({seq:re,state:O})=>TO(a,re,O),onMutate:async({seq:re,state:O})=>{await S.cancelQueries({queryKey:["cards",a]});const R=S.getQueryData(["cards",a]);return R&&S.setQueryData(["cards",a],{...R,data:R.data.map(Q=>Q.seq===re?{...Q,state:O}:Q)}),{prev:R}},onError:(re,O,R)=>{R!=null&&R.prev&&S.setQueryData(["cards",a],R.prev),x({title:e("board.action.moveCard.error"),body:re instanceof Error?re.message:String(re)})},onSettled:()=>{S.invalidateQueries({queryKey:["cards",a]})}}),U=(($=w.data)==null?void 0:$.data)??[],{allSkills:X,allLabels:J}=A.useMemo(()=>{const re=new Set,O=new Set;for(const R of U){for(const Q of R.skills)re.add(Q);for(const Q of R.labels)O.add(Q)}return{allSkills:[...re].sort(),allLabels:[...O].sort()}},[U]);if(!a)return h.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("board.title.bare")}),h.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("board.pickPrompt.title")}),h.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:e("board.pickPrompt.body")}),h.jsx("div",{className:"flex flex-wrap gap-2",children:(ce=E.data)==null?void 0:ce.data.map(re=>h.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>C(re.name),type:"button",children:re.name},re.name))})]})]});const pe=U.filter(re=>{if(c){const O=c.toLowerCase();if(!(re.title.toLowerCase().includes(O)||re.skills.some(Q=>Q.toLowerCase().includes(O))||re.labels.some(Q=>Q.toLowerCase().includes(O))))return!1}return!(f.size>0&&!re.skills.some(R=>f.has(R))||b.size>0&&!re.labels.some(R=>b.has(R)))}),ue=(de=E.data)==null?void 0:de.data.find(re=>re.name===a),te=(ue==null?void 0:ue.pipelineStatus)==="running";return h.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[h.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("board.title")}),h.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:ue?e("board.subtitle",{name:ue.name,cards:ue.cards.total,workers:ue.workers.active}):e("common.loading")})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[h.jsx(KO,{current:a,onChange:C}),h.jsxs("button",{className:te?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>te?D.mutate():T.mutate(),disabled:T.isPending||D.isPending,type:"button","aria-label":e(te?"board.action.stopAria":"board.action.startAria"),title:e(te?"board.action.stopAria":"board.action.startAria"),children:[T.isPending||D.isPending?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):te?h.jsx(ck,{size:14,strokeWidth:3}):h.jsx(Xm,{size:14,strokeWidth:3}),e(te?"board.action.stop":"board.action.start")]}),h.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await v({title:e("board.action.reset.confirm.title"),body:e("board.action.reset.confirm.body"),confirm:e("board.action.reset.confirm.button"),danger:!0})&&B.mutate()},disabled:B.isPending,children:[B.isPending?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(lk,{size:14,strokeWidth:2.5}),e("board.action.reset")]}),h.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>q(!0),disabled:F.isPending,children:[F.isPending?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(Bi,{size:14,strokeWidth:3}),e("board.action.newCard")]})]})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[h.jsxs("div",{className:"relative flex-1 max-w-md",children:[h.jsx(kd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),h.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("board.search.placeholder"),value:c,onChange:re=>d(re.target.value),"aria-label":e("board.search.aria")})]}),h.jsx(lw,{label:"skill",options:X,selected:f,onChange:p}),h.jsx(lw,{label:"label",options:J,selected:b,onChange:g}),(c||f.size>0||b.size>0)&&h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{d(""),p(new Set),g(new Set)},type:"button","aria-label":e("board.filter.clearAria"),children:[h.jsx(_i,{size:11,strokeWidth:3}),e("board.filter.clear")]}),h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[h.jsx(oA,{size:12}),pe.length," / ",U.length]})]}),w.isError&&h.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[h.jsx("p",{className:"font-semibold",children:e("board.error.loadCards")}),h.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:w.error instanceof Error?w.error.message:String(w.error)})]}),!w.isError&&h.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:GO.map(re=>h.jsx($O,{label:e(re.labelKey),bg:re.bg,cards:pe.filter(WO(re.state)),onCardClick:O=>o(O.seq),onDropCard:O=>ee.mutate({seq:O,state:re.state})},re.state))}),s!==null&&h.jsx(HO,{project:a,seq:s,onClose:()=>o(null),onChanged:_}),M&&h.jsx(wO,{project:a,isPending:F.isPending,onCancel:()=>q(!1),onCreate:re=>F.mutate(re)})]})}function WO(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function lw({label:e,options:t,selected:n,onChange:a}){const s=Ue(),[o,c]=A.useState(!1),d=A.useRef(null);A.useEffect(()=>{if(!o)return;const g=x=>{var E;(E=d.current)!=null&&E.contains(x.target)||c(!1)},v=x=>{x.key==="Escape"&&c(!1)};return window.addEventListener("click",g),window.addEventListener("keydown",v),()=>{window.removeEventListener("click",g),window.removeEventListener("keydown",v)}},[o]);const f=g=>{const v=new Set(n);v.has(g)?v.delete(g):v.add(g),a(v)},p=t.length===0,b=n.size;return h.jsxs("div",{ref:d,className:"relative",children:[h.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!p&&c(g=>!g),disabled:p,"aria-haspopup":"listbox","aria-expanded":o,"aria-label":s("board.filter.aria",{label:e}),children:[e,b>0&&h.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:b}),h.jsx(wc,{size:11,strokeWidth:3,className:["transition-transform",o?"rotate-180":""].join(" ")})]}),o&&h.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(g=>{const v=n.has(g);return h.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",v?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[h.jsx("input",{type:"checkbox",checked:v,onChange:()=>f(g),className:"flex-shrink-0"}),h.jsx("span",{className:"truncate",children:g})]},g)}),b>0&&h.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:s("board.filter.clearSelection")})]})]})}function XO(){return Ht("/api/workers/all")}function ZO(e){return Ht(`/api/projects/${encodeURIComponent(e)}/workers`)}function JO(e,t){return Ht(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function xE(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 ow(e,t){return xE(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function eD(e,t,n){return xE(`/api/projects/${encodeURIComponent(e)}/workers/${t}/launch`,n?{seq:n}:void 0)}function mg({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:h.jsx(Bt,{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:h.jsx(KA,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return h.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function gg(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 tD(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 bg(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 nD({alerts:e,selected:t,onSelect:n}){const a=Ue();return e.length===0?h.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[h.jsx(lc,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),h.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:a("workers.alerts.allHealthy")})]}):h.jsxs("section",{children:[h.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:[h.jsx(e2,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),h.jsx("div",{className:"flex flex-col gap-2",children:e.map(s=>{const o=(t==null?void 0:t.project)===s.project&&(t==null?void 0:t.slot)===s.slot;return h.jsxs("button",{type:"button",onClick:()=>n(s.project,s.slot),className:["nb-card p-3 text-left",s.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[h.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[h.jsx(mg,{state:s.state}),h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[s.project,"/worker-",s.slot]}),s.card&&h.jsxs("span",{className:"truncate",children:["#",s.card.seq," ",s.card.title]}),h.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[h.jsx(QT,{size:10,strokeWidth:2.5}),gg(s.runtimeMs)]})]}),s.markerUpdatedAt&&h.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:s.state==="crashed"?a("workers.alerts.pidDead"):a("workers.alerts.markerStale",{ago:bg(s.markerUpdatedAt)})})]},`${s.project}-${s.slot}`)})})]})}function iD({active:e,selected:t,onSelect:n}){const a=Ue();return e.length===0?h.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:a("workers.active.empty")})}):h.jsxs("section",{children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[h.jsx(zd,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),h.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(s=>{const o=(t==null?void 0:t.project)===s.project&&(t==null?void 0:t.slot)===s.slot;return h.jsxs("button",{type:"button",onClick:()=>n(s.project,s.slot),className:["nb-card p-3 text-left",s.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",o?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx(mg,{state:s.state}),h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[s.project,"/worker-",s.slot]}),h.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${tD(s.runtimeMs)}`,children:gg(s.runtimeMs)})]}),s.card&&h.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",s.card.seq," · ",s.card.title]}),h.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[s.stage&&h.jsxs("span",{children:["stage: ",s.stage]}),s.markerUpdatedAt&&h.jsxs("span",{className:"ml-auto",children:["marker ",bg(s.markerUpdatedAt)]})]}),s.lastLogLine&&h.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:[h.jsx(uk,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),s.lastLogLine.msg]})]},`${s.project}-${s.slot}`)})})]})}function aD({capacity:e,selected:t,onSelect:n}){const a=Ue();return e.length===0?null:h.jsxs("section",{children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),h.jsx("div",{className:"nb-card p-0 overflow-hidden",children:h.jsxs("table",{className:"w-full text-sm",children:[h.jsx("thead",{children:h.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[h.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:a("workers.capacity.col.project")}),h.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:a("workers.capacity.col.usage")}),h.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),h.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:a("workers.capacity.col.other")}),h.jsx("th",{className:"px-3 py-2"})]})}),h.jsx("tbody",{children:e.map(s=>{const o=s.running+s.starting+s.stuck+s.crashed,c=(t==null?void 0:t.project)===s.project;return h.jsxs("tr",{onClick:()=>n(s.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",c?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[h.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:s.project}),h.jsx("td",{className:"px-3 py-2",children:h.jsx(rD,{total:s.total,cap:s})}),h.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[h.jsx("span",{className:"text-[var(--color-running)] font-bold",children:s.running}),h.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",s.total]})]}),h.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[s.starting>0&&h.jsxs("span",{className:"mr-2",children:["starting ",s.starting]}),s.stuck>0&&h.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",s.stuck]}),s.crashed>0&&h.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",s.crashed]}),o===0&&h.jsx("span",{children:"idle"})]}),h.jsx("td",{className:"px-3 py-2 text-right",children:h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:a("workers.capacity.detailHint")})})]},s.project)})})]})})]})}function rD({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 h.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>h.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:sD(a)},title:a},s)),h.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 sD(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 lD({project:e,initialSlot:t,onChange:n}){var p;const a=Ue(),s=ct({queryKey:["workers",e],queryFn:()=>ZO(e),refetchInterval:3e3}),o=((p=s.data)==null?void 0:p.data)??[],[c,d]=A.useState(null);A.useEffect(()=>{if(o.length===0){d(null);return}const b=o[0].slot;d(g=>g!=null&&o.some(v=>v.slot===g)?g:t!=null&&o.some(v=>v.slot===t)?t:b)},[e,t,o.length]);const f=o.find(b=>b.slot===c)??null;return h.jsxs("div",{className:"flex flex-col h-full",children:[h.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[h.jsxs("div",{className:"flex items-center justify-between mb-2",children:[h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),h.jsx(hs,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:a("workers.panel.boardLink")})]}),s.isLoading&&o.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.loading")}):o.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.empty.slots")}):h.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(b=>h.jsx(oD,{worker:b,active:b.slot===c,onClick:()=>d(b.slot)},b.slot))})]}),f?h.jsx(cD,{project:e,worker:f,onChange:n}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:h.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:o.length===0?a("workers.panel.empty.noWorker"):a("workers.panel.empty.pickOne")})})]})}function oD({worker:e,active:t,onClick:n}){const a=Ue();return h.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:[h.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[h.jsx(mg,{state:e.state}),h.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?h.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):h.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:a("workers.panel.idle.short")})]})}function cD({project:e,worker:t,onChange:n}){var b,g;const a=Ue(),{confirm:s,alert:o}=ci(),c=t.state==="crashed"||t.state==="stuck",d=ct({queryKey:["worker-detail",e,t.slot],queryFn:()=>JO(e,t.slot),refetchInterval:3e3}),f=((b=d.data)==null?void 0:b.recentOutput)??[],p=((g=d.data)==null?void 0:g.recentLogs)??[];return h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:a("workers.panel.section.currentCard")}),h.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):h.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:a("workers.panel.idle.full")}),h.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[h.jsx("dt",{className:"font-bold",children:"Stage"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),h.jsx("dt",{className:"font-bold",children:"PID"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),h.jsx("dt",{className:"font-bold",children:"Runtime"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:gg(t.runtimeMs)}),h.jsx("dt",{className:"font-bold",children:"Started"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),h.jsx("dt",{className:"font-bold",children:"Marker"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?bg(t.markerUpdatedAt):"—"})]}),h.jsxs("div",{children:[h.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[h.jsx(uk,{size:10,strokeWidth:2.5}),a("workers.panel.section.claudeOutput",{n:f.length})]}),d.isLoading&&f.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.output.loading")}):f.length===0?h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:a("workers.panel.output.empty")}):h.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(v=>`${v.ts?`${v.ts} [${v.kind}] `:`[${v.kind}] `}${v.text}`).join(`
519
+ `)})]}),p.length>0&&h.jsxs("div",{children:[h.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:a("workers.panel.section.heartbeat",{n:p.length})}),h.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:p.map(v=>`${v.ts??""} [${v.level}] ${v.msg}`).join(`
520
+ `)}),h.jsx(hs,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:a("workers.panel.heartbeat.fullLog")})]})]}),h.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:[c&&t.card&&h.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:a("workers.panel.action.restart.confirm.title",{slot:t.slot}),body:a("workers.panel.action.restart.confirm.body",{seq:t.card.seq}),confirm:a("workers.panel.action.restart.confirm.button")})){try{await ow(e,t.slot)}catch{}try{await eD(e,t.slot,t.card.seq),n()}catch(x){o({title:a("workers.panel.action.restart.error"),body:x instanceof Error?x.message:String(x)})}}},children:[h.jsx(XA,{size:11,strokeWidth:2.5})," ",a("workers.panel.action.restart")]}),t.state!=="idle"&&h.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await s({title:a("workers.panel.action.kill.confirm.title",{slot:t.slot}),body:a("workers.panel.action.kill.confirm.body"),confirm:a("workers.panel.action.kill.confirm.button"),danger:!0}))try{await ow(e,t.slot),n()}catch(x){o({title:a("workers.panel.action.kill.error"),body:x instanceof Error?x.message:String(x)})}},children:[h.jsx(s2,{size:11,strokeWidth:2.5})," ",a("workers.panel.action.kill")]})]})]})}function uD(){var c;const e=Ue(),t=Qn(),[n,a]=A.useState(null),s=ct({queryKey:["workers-agg"],queryFn:XO,refetchInterval:5e3});A.useEffect(()=>{if(!s.data)return;const d=s.data.capacity.map(p=>p.project),f=[];for(const p of d){const b=new EventSource(`/stream/projects/${encodeURIComponent(p)}`),g=()=>{t.invalidateQueries({queryKey:["workers-agg"]})};b.addEventListener("worker.updated",g),b.addEventListener("worker.added",g),b.addEventListener("worker.deleted",g),b.addEventListener("card.updated",g),f.push(b)}return()=>{for(const p of f)p.close()}},[(c=s.data)==null?void 0:c.capacity.map(d=>d.project).join(","),t]);const o=A.useMemo(()=>{if(!s.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const d={projects:s.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of s.data.capacity)d.running+=f.running,d.starting+=f.starting,d.stuck+=f.stuck,d.crashed+=f.crashed,d.idle+=f.idle;return d},[s.data]);return h.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[h.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("workers.title")}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:e("workers.summary",{projects:o.projects,running:o.running,starting:o.starting,stuck:o.stuck,crashed:o.crashed,idle:o.idle})})]}),h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s.refetch(),disabled:s.isFetching,type:"button","aria-label":e("workers.refresh.aria"),children:[s.isFetching?h.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin"}):h.jsx(Al,{size:12,strokeWidth:2.5}),e("workers.refresh")]})]}),h.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[h.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[s.isLoading&&h.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:e("common.loading")}),s.isError&&h.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:h.jsx("p",{children:e("workers.error.load",{detail:s.error instanceof Error?s.error.message:String(s.error)})})}),s.data&&h.jsxs(h.Fragment,{children:[h.jsx(nD,{alerts:s.data.alerts,selected:n,onSelect:(d,f)=>a({project:d,slot:f})}),h.jsx(iD,{active:s.data.active,selected:n,onSelect:(d,f)=>a({project:d,slot:f})}),h.jsx(aD,{capacity:s.data.capacity,selected:n,onSelect:d=>a({project:d})})]})]}),h.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:n?h.jsx(lD,{project:n.project,initialSlot:n.slot,onChange:()=>t.invalidateQueries({queryKey:["workers-agg"]})}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:h.jsxs("div",{children:[h.jsx(zd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:e("workers.empty.hint")})]})})})]})]})}function dD(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),Ht(`/api/logs?${t}`)}function fD(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const hD=["error","warn","info","debug"],pD=["error","warn","info"];function mD(){var ee,U;const e=Ue(),[t,n]=tk(),a=t.get("project"),s=t.get("worker")??"",[o,c]=A.useState([]),[d,f]=A.useState(!1),[p,b]=A.useState(!0),[g,v]=A.useState(()=>new Set(pD)),[x,E]=A.useState(""),[w,S]=A.useState("live"),[_,C]=A.useState(()=>{const X=new Date(Date.now()-36e5),J=pe=>String(pe).padStart(2,"0");return`${X.getFullYear()}-${J(X.getMonth()+1)}-${J(X.getDate())}T${J(X.getHours())}:${J(X.getMinutes())}`}),T=A.useRef(null),D=!a,B=ct({queryKey:["projects"],queryFn:_r}),{data:M,refetch:q}=ct({queryKey:["logs",a??"agg",s,w,w==="history"?_:"live"],queryFn:()=>dD({project:a||void 0,worker:s||void 0,limit:w==="history"?2e3:500,since:w==="history"?new Date(_).toISOString():void 0}),refetchInterval:D&&w==="live"?5e3:!1});A.useEffect(()=>{M!=null&&M.data&&c(M.data)},[M]),A.useEffect(()=>{if(!a||w!=="live")return;const X=fD({project:a,worker:s||void 0}),J=new EventSource(X);return J.addEventListener("log.line",pe=>{if(!d)try{const ue=JSON.parse(pe.data);c(te=>{const $=[...te,ue];return $.length>5e3&&$.splice(0,$.length-5e3),$})}catch{}}),()=>J.close()},[a,s,d,w]),A.useEffect(()=>{if(!p)return;const X=T.current;X&&(X.scrollTop=X.scrollHeight)},[o,p]);const F=A.useMemo(()=>{const X=x.toLowerCase();return o.filter(J=>!(!g.has(J.level)||X&&!J.msg.toLowerCase().includes(X)))},[o,g,x]);return h.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[h.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("logs.title")}),h.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[D?e("logs.subtitle.allProjectsCount",{count:((ee=B.data)==null?void 0:ee.data.length)??0}):a,s&&` · worker-${s}`," · ",D&&w==="live"?e("logs.poll.5s"):"tail -f"," · ",o.length," lines",d&&h.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:e("logs.paused")})]})]})}),h.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[h.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:[h.jsxs("button",{type:"button",onClick:()=>S("live"),"aria-pressed":w==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[h.jsx(sk,{size:11,strokeWidth:2.5}),e("logs.mode.live")]}),h.jsxs("button",{type:"button",onClick:()=>S("history"),"aria-pressed":w==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",w==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[h.jsx(pA,{size:11,strokeWidth:2.5}),e("logs.mode.history")]})]}),w==="history"&&h.jsxs(h.Fragment,{children:[h.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:_,onChange:X=>C(X.target.value),"aria-label":e("logs.history.startAria")}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>q(),type:"button","aria-label":e("logs.history.queryAria"),children:[h.jsx(kd,{size:11,strokeWidth:3}),e("logs.history.query")]})]}),h.jsxs("div",{className:"relative",children:[h.jsx(oc,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),h.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:a??"",onChange:X=>{const J=X.target.value;n(J?{project:J}:{})},"aria-label":e("logs.filter.project.aria"),children:[h.jsx("option",{value:"",children:e("logs.filter.project.all")}),(U=B.data)==null?void 0:U.data.map(X=>h.jsx("option",{value:X.name,children:X.name},X.name))]}),h.jsx(wc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),h.jsxs("div",{className:"relative flex-1 max-w-md",children:[h.jsx(kd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),h.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("logs.filter.keyword.placeholder"),value:x,onChange:X=>E(X.target.value),"aria-label":e("logs.filter.keyword.aria")})]}),h.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:hD.map(X=>h.jsx(gD,{level:X,enabled:g.has(X),onToggle:()=>{v(J=>{const pe=new Set(J);return pe.has(X)?pe.delete(X):pe.add(X),pe})}},X))}),h.jsxs("div",{className:"ml-auto flex gap-2",children:[w==="live"&&h.jsxs(h.Fragment,{children:[h.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>b(X=>!X),type:"button",children:p?"✓ Auto-scroll":"Auto-scroll"}),h.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(X=>!X),type:"button",children:d?h.jsxs(h.Fragment,{children:[h.jsx(Xm,{size:12,strokeWidth:3})," Resume"]}):h.jsxs(h.Fragment,{children:[h.jsx(DA,{size:12,strokeWidth:3})," Pause"]})})]}),h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const X=new Blob([F.map(ue=>ue.raw).join(`
521
+ `)],{type:"text/plain"}),J=URL.createObjectURL(X),pe=document.createElement("a");pe.href=J,pe.download=`${a}-log-${Date.now()}.log`,pe.click(),URL.revokeObjectURL(J)},type:"button",children:[h.jsx(ak,{size:12,strokeWidth:2.5})," Export"]})]})]}),h.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[h.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:[h.jsx("span",{className:"text-[var(--color-text-muted)]",children:(M==null?void 0:M.file)??"~/.coral/projects/.../logs/*.log"}),w==="live"?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):h.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),h.jsxs("div",{ref:T,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:X=>{const J=X.currentTarget;!(J.scrollHeight-J.scrollTop-J.clientHeight<40)&&p&&b(!1)},children:[F.map((X,J)=>h.jsx(bD,{line:X},J)),F.length===0&&h.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:e("logs.empty.match")})]})]})]})}function gD({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 h.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 bD({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 h.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:[h.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&&h.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),h.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),h.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function yD(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const xD=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,vD=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,wD={};function cw(e,t){return(wD.jsx?vD:xD).test(e)}const kD=/[ \t\n\f\r]/g;function ED(e){return typeof e=="object"?e.type==="text"?uw(e.value):!1:uw(e)}function uw(e){return e.replace(kD,"")===""}class Nc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}Nc.prototype.normal={};Nc.prototype.property={};Nc.prototype.space=void 0;function vE(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new Nc(n,a,t)}function km(e){return e.toLowerCase()}class Yn{constructor(t,n){this.attribute=n,this.property=t}}Yn.prototype.attribute="";Yn.prototype.booleanish=!1;Yn.prototype.boolean=!1;Yn.prototype.commaOrSpaceSeparated=!1;Yn.prototype.commaSeparated=!1;Yn.prototype.defined=!1;Yn.prototype.mustUseProperty=!1;Yn.prototype.number=!1;Yn.prototype.overloadedBoolean=!1;Yn.prototype.property="";Yn.prototype.spaceSeparated=!1;Yn.prototype.space=void 0;let SD=0;const Ge=gs(),nn=gs(),Em=gs(),he=gs(),Nt=gs(),gl=gs(),ai=gs();function gs(){return 2**++SD}const Sm=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:nn,commaOrSpaceSeparated:ai,commaSeparated:gl,number:he,overloadedBoolean:Em,spaceSeparated:Nt},Symbol.toStringTag,{value:"Module"})),Cp=Object.keys(Sm);class yg extends Yn{constructor(t,n,a,s){let o=-1;if(super(t,n),dw(this,"space",s),typeof a=="number")for(;++o<Cp.length;){const c=Cp[o];dw(this,Cp[o],(a&Sm[c])===Sm[c])}}}yg.prototype.defined=!0;function dw(e,t,n){n&&(e[t]=n)}function Kl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new yg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[km(a)]=a,n[km(o.attribute)]=a}return new Nc(t,n,e.space)}const wE=Kl({properties:{ariaActiveDescendant:null,ariaAtomic:nn,ariaAutoComplete:null,ariaBusy:nn,ariaChecked:nn,ariaColCount:he,ariaColIndex:he,ariaColSpan:he,ariaControls:Nt,ariaCurrent:null,ariaDescribedBy:Nt,ariaDetails:null,ariaDisabled:nn,ariaDropEffect:Nt,ariaErrorMessage:null,ariaExpanded:nn,ariaFlowTo:Nt,ariaGrabbed:nn,ariaHasPopup:null,ariaHidden:nn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Nt,ariaLevel:he,ariaLive:null,ariaModal:nn,ariaMultiLine:nn,ariaMultiSelectable:nn,ariaOrientation:null,ariaOwns:Nt,ariaPlaceholder:null,ariaPosInSet:he,ariaPressed:nn,ariaReadOnly:nn,ariaRelevant:null,ariaRequired:nn,ariaRoleDescription:Nt,ariaRowCount:he,ariaRowIndex:he,ariaRowSpan:he,ariaSelected:nn,ariaSetSize:he,ariaSort:null,ariaValueMax:he,ariaValueMin:he,ariaValueNow:he,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function kE(e,t){return t in e?e[t]:t}function EE(e,t){return kE(e,t.toLowerCase())}const _D=Kl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:gl,acceptCharset:Nt,accessKey:Nt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:Nt,autoFocus:Ge,autoPlay:Ge,blocking:Nt,capture:null,charSet:null,checked:Ge,cite:null,className:Nt,cols:he,colSpan:null,content:null,contentEditable:nn,controls:Ge,controlsList:Nt,coords:he|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Em,draggable:nn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:Nt,height:he,hidden:Em,high:he,href:null,hrefLang:null,htmlFor:Nt,httpEquiv:Nt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:Nt,itemRef:Nt,itemScope:Ge,itemType:Nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:he,manifest:null,max:null,maxLength:he,media:null,method:null,min:null,minLength:he,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:he,pattern:null,ping:Nt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:Nt,required:Ge,reversed:Ge,rows:he,rowSpan:he,sandbox:Nt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shape:null,size:he,sizes:null,slot:null,span:he,spellCheck:nn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:he,step:null,style:null,tabIndex:he,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:nn,width:he,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Nt,axis:null,background:null,bgColor:null,border:he,borderColor:null,bottomMargin:he,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:he,leftMargin:he,link:null,longDesc:null,lowSrc:null,marginHeight:he,marginWidth:he,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:he,rules:null,scheme:null,scrolling:nn,standby:null,summary:null,text:null,topMargin:he,valueType:null,version:null,vAlign:null,vLink:null,vSpace:he,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ge,disableRemotePlayback:Ge,prefix:null,property:null,results:he,security:null,unselectable:null},space:"html",transform:EE}),ND=Kl({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:ai,accentHeight:he,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:he,amplitude:he,arabicForm:null,ascent:he,attributeName:null,attributeType:null,azimuth:he,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:he,by:null,calcMode:null,capHeight:he,className:Nt,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:he,diffuseConstant:he,direction:null,display:null,dur:null,divisor:he,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:he,enableBackground:null,end:null,event:null,exponent:he,externalResourcesRequired:null,fill:null,fillOpacity:he,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:gl,g2:gl,glyphName:gl,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:he,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:he,horizOriginX:he,horizOriginY:he,id:null,ideographic:he,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:he,k:he,k1:he,k2:he,k3:he,k4:he,kernelMatrix:ai,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:he,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:he,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:he,overlineThickness:he,paintOrder:null,panose1:null,path:null,pathLength:he,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:he,pointsAtY:he,pointsAtZ:he,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ai,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ai,rev:ai,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ai,requiredFeatures:ai,requiredFonts:ai,requiredFormats:ai,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:he,specularExponent:he,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:he,strikethroughThickness:he,string:null,stroke:null,strokeDashArray:ai,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:he,strokeOpacity:he,strokeWidth:null,style:null,surfaceScale:he,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ai,tabIndex:he,tableValues:null,target:null,targetX:he,targetY:he,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ai,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:he,underlineThickness:he,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:he,values:null,vAlphabetic:he,vMathematical:he,vectorEffect:null,vHanging:he,vIdeographic:he,version:null,vertAdvY:he,vertOriginX:he,vertOriginY:he,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:he,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kE}),SE=Kl({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()}}),_E=Kl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:EE}),NE=Kl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),CD={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"},TD=/[A-Z]/g,fw=/-[a-z]/g,AD=/^data[-\w.:]+$/i;function jD(e,t){const n=km(t);let a=t,s=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&AD.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(fw,DD);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!fw.test(o)){let c=o.replace(TD,OD);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=yg}return new s(a,t)}function OD(e){return"-"+e.toLowerCase()}function DD(e){return e.charAt(1).toUpperCase()}const MD=vE([wE,_D,SE,_E,NE],"html"),xg=vE([wE,ND,SE,_E,NE],"svg");function RD(e){return e.join(" ").trim()}var rl={},Tp,hw;function LD(){if(hw)return Tp;hw=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
522
+ `,p="/",b="*",g="",v="comment",x="declaration";function E(S,_){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];_=_||{};var C=1,T=1;function D(ue){var te=ue.match(t);te&&(C+=te.length);var $=ue.lastIndexOf(f);T=~$?ue.length-$:T+ue.length}function B(){var ue={line:C,column:T};return function(te){return te.position=new M(ue),ee(),te}}function M(ue){this.start=ue,this.end={line:C,column:T},this.source=_.source}M.prototype.content=S;function q(ue){var te=new Error(_.source+":"+C+":"+T+": "+ue);if(te.reason=ue,te.filename=_.source,te.line=C,te.column=T,te.source=S,!_.silent)throw te}function F(ue){var te=ue.exec(S);if(te){var $=te[0];return D($),S=S.slice($.length),te}}function ee(){F(n)}function U(ue){var te;for(ue=ue||[];te=X();)te!==!1&&ue.push(te);return ue}function X(){var ue=B();if(!(p!=S.charAt(0)||b!=S.charAt(1))){for(var te=2;g!=S.charAt(te)&&(b!=S.charAt(te)||p!=S.charAt(te+1));)++te;if(te+=2,g===S.charAt(te-1))return q("End of comment missing");var $=S.slice(2,te-2);return T+=2,D($),S=S.slice(te),T+=2,ue({type:v,comment:$})}}function J(){var ue=B(),te=F(a);if(te){if(X(),!F(s))return q("property missing ':'");var $=F(o),ce=ue({type:x,property:w(te[0].replace(e,g)),value:$?w($[0].replace(e,g)):g});return F(c),ce}}function pe(){var ue=[];U(ue);for(var te;te=J();)te!==!1&&(ue.push(te),U(ue));return ue}return ee(),pe()}function w(S){return S?S.replace(d,g):g}return Tp=E,Tp}var pw;function ID(){if(pw)return rl;pw=1;var e=rl&&rl.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(rl,"__esModule",{value:!0}),rl.default=n;const t=e(LD());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),d=typeof s=="function";return c.forEach(f=>{if(f.type!=="declaration")return;const{property:p,value:b}=f;d?s(p,b,f):b&&(o=o||{},o[p]=b)}),o}return rl}var Go={},mw;function zD(){if(mw)return Go;mw=1,Object.defineProperty(Go,"__esModule",{value:!0}),Go.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(p){return!p||n.test(p)||e.test(p)},c=function(p,b){return b.toUpperCase()},d=function(p,b){return"".concat(b,"-")},f=function(p,b){return b===void 0&&(b={}),o(p)?p:(p=p.toLowerCase(),b.reactCompat?p=p.replace(s,d):p=p.replace(a,d),p.replace(t,c))};return Go.camelCase=f,Go}var Qo,gw;function BD(){if(gw)return Qo;gw=1;var e=Qo&&Qo.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(ID()),n=zD();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(d,f){d&&f&&(c[(0,n.camelCase)(d,o)]=f)}),c}return a.default=a,Qo=a,Qo}var UD=BD();const PD=Lm(UD),CE=TE("end"),vg=TE("start");function TE(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 FD(e){const t=vg(e),n=CE(e);if(t&&n)return{start:t,end:n}}function ec(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?bw(e.position):"start"in e||"end"in e?bw(e):"line"in e||"column"in e?_m(e):""}function _m(e){return yw(e&&e.line)+":"+yw(e&&e.column)}function bw(e){return _m(e&&e.start)+"-"+_m(e&&e.end)}function yw(e){return e&&typeof e=="number"?e:1}class kn 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 f=a.indexOf(":");f===-1?o.ruleId=a:(o.source=a.slice(0,f),o.ruleId=a.slice(f+1))}if(!o.place&&o.ancestors&&o.ancestors){const f=o.ancestors[o.ancestors.length-1];f&&(o.place=f.position)}const d=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=d?d.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=d?d.line:void 0,this.name=ec(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}}kn.prototype.file="";kn.prototype.name="";kn.prototype.reason="";kn.prototype.message="";kn.prototype.stack="";kn.prototype.column=void 0;kn.prototype.line=void 0;kn.prototype.ancestors=void 0;kn.prototype.cause=void 0;kn.prototype.fatal=void 0;kn.prototype.place=void 0;kn.prototype.ruleId=void 0;kn.prototype.source=void 0;const wg={}.hasOwnProperty,qD=new Map,$D=/[A-Z]/g,HD=new Set(["table","tbody","thead","tfoot","tr"]),KD=new Set(["td","th"]),AE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function GD(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=eM(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=JD(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"?xg:MD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=jE(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function jE(e,t,n){if(t.type==="element")return QD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return YD(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return WD(e,t,n);if(t.type==="mdxjsEsm")return VD(e,t);if(t.type==="root")return XD(e,t,n);if(t.type==="text")return ZD(e,t)}function QD(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=xg,e.schema=s),e.ancestors.push(t);const o=DE(e,t.tagName,!1),c=tM(e,t);let d=Eg(e,t);return HD.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!ED(f):!0})),OE(e,c,o,t),kg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function YD(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)}fc(e,t.position)}function VD(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fc(e,t.position)}function WD(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=xg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:DE(e,t.name,!0),c=nM(e,t),d=Eg(e,t);return OE(e,c,o,t),kg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function XD(e,t,n){const a={};return kg(a,Eg(e,t)),e.create(t,e.Fragment,a,n)}function ZD(e,t){return t.value}function OE(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function kg(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function JD(e,t,n){return a;function a(s,o,c,d){const p=Array.isArray(c.children)?n:t;return d?p(o,c,d):p(o,c)}}function eM(e,t){return n;function n(a,s,o,c){const d=Array.isArray(o.children),f=vg(a);return t(s,o,c,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function tM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&wg.call(t.properties,s)){const o=iM(e,s,t.properties[s]);if(o){const[c,d]=o;e.tableCellAlignToStyle&&c==="align"&&typeof d=="string"&&KD.has(t.tagName)?a=d:n[c]=d}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function nM(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 d=c.properties[0];d.type,Object.assign(n,e.evaluater.evaluateExpression(d.argument))}else fc(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 d=a.value.data.estree.body[0];d.type,o=e.evaluater.evaluateExpression(d.expression)}else fc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function Eg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:qD;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const f=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(f){const p=s.get(f)||0;c=f+"-"+p,s.set(f,p+1)}}const d=jE(e,o,c);d!==void 0&&n.push(d)}return n}function iM(e,t,n){const a=jD(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?yD(n):RD(n)),a.property==="style"){let s=typeof n=="object"?n:aM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=rM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?CD[a.property]||a.property:a.attribute,n]}}function aM(e,t){try{return PD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new kn("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=AE+"#cannot-parse-style-attribute",s}}function DE(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 d=cw(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:d,computed:!!(o&&d.type==="Literal"),optional:!1}:d}a=c}else a=cw(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return wg.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(a);fc(e)}function fc(e,t){const n=new kn("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=AE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rM(e){const t={};let n;for(n in e)wg.call(e,n)&&(t[sM(n)]=e[n]);return t}function sM(e){let t=e.replace($D,lM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lM(e){return"-"+e.toLowerCase()}const Ap={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"]},oM={};function Sg(e,t){const n=oM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return ME(e,a,s)}function ME(e,t,n){if(cM(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 xw(e.children,t,n)}return Array.isArray(e)?xw(e,t,n):""}function xw(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=ME(e[s],t,n);return a.join("")}function cM(e){return!!(e&&typeof e=="object")}const vw=document.createElement("i");function _g(e){const t="&"+e+";";vw.innerHTML=t;const n=vw.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function li(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 ki(e,t){return e.length>0?(li(e,e.length,0,t),e):t}const ww={}.hasOwnProperty;function RE(e){const t={};let n=-1;for(;++n<e.length;)uM(t,e[n]);return t}function uM(e,t){let n;for(n in t){const s=(ww.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){ww.call(s,c)||(s[c]=[]);const d=o[c];dM(s[c],Array.isArray(d)?d:d?[d]:[])}}}function dM(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);li(e,0,0,a)}function LE(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 Ii(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const On=Cr(/[A-Za-z]/),vn=Cr(/[\dA-Za-z]/),fM=Cr(/[#-'*+\--9=?A-Z^-~]/);function Cd(e){return e!==null&&(e<32||e===127)}const Nm=Cr(/\d/),hM=Cr(/[\dA-Fa-f]/),pM=Cr(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function kt(e){return e!==null&&(e<0||e===32)}function Xe(e){return e===-2||e===-1||e===32}const ef=Cr(new RegExp("\\p{P}|\\p{S}","u")),fs=Cr(/\s/);function Cr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Gl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&vn(e.charCodeAt(n+1))&&vn(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 d=e.charCodeAt(n+1);o<56320&&d>56319&&d<57344?(c=String.fromCharCode(o,d),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 at(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(f){return Xe(f)?(e.enter(n),d(f)):t(f)}function d(f){return Xe(f)&&o++<s?(e.consume(f),d):(e.exit(n),t(f))}}const mM={tokenize:gM};function gM(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),at(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const f=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=f),n=f,c(d)}function c(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return De(d)?(e.consume(d),e.exit("chunkText"),o):(e.consume(d),c)}}const bM={tokenize:yM},kw={tokenize:xM};function yM(e){const t=this,n=[];let a=0,s,o,c;return d;function d(T){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,f,p)(T)}return p(T)}function f(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&C();const D=t.events.length;let B=D,M;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){M=t.events[B][1].end;break}_(a);let q=D;for(;q<t.events.length;)t.events[q][1].end={...M},q++;return li(t.events,B+1,0,t.events.slice(D)),t.events.length=q,p(T)}return d(T)}function p(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(kw,b,g)(T)}function b(T){return s&&C(),_(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(kw,x,E)(T)}function x(T){return a++,n.push([t.currentConstruct,t.containerState]),v(T)}function E(T){if(T===null){s&&C(),_(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){S(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return De(T)?(e.consume(T),S(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(T),w)}function S(T,D){const B=t.sliceStream(T);if(D&&B.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write(B),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 F=q,ee,U;for(;F--;)if(t.events[F][0]==="exit"&&t.events[F][1].type==="chunkFlow"){if(ee){U=t.events[F][1].end;break}ee=!0}for(_(a),M=q;M<t.events.length;)t.events[M][1].end={...U},M++;li(t.events,F+1,0,t.events.slice(q)),t.events.length=M}}function _(T){let D=n.length;for(;D-- >T;){const B=n[D];t.containerState=B[1],B[0].exit.call(t,e)}n.length=T}function C(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function xM(e,t,n){return at(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Dl(e){if(e===null||kt(e)||fs(e))return 1;if(ef(e))return 2}function tf(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 Cm={name:"attention",resolveAll:vM,tokenize:wM};function vM(e,t){let n=-1,a,s,o,c,d,f,p,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;f=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};Ew(g,-f),Ew(v,f),c={type:f>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:f>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:f>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.end},p=[],e[a][1].end.offset-e[a][1].start.offset&&(p=ki(p,[["enter",e[a][1],t],["exit",e[a][1],t]])),p=ki(p,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),p=ki(p,tf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),p=ki(p,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,p=ki(p,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,li(e,a-1,n-a+3,p),n=a+p.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wM(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Dl(a);let o;return c;function c(f){return o=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===o)return e.consume(f),d;const p=e.exit("attentionSequence"),b=Dl(f),g=!b||b===2&&s||n.includes(f),v=!s||s===2&&b||n.includes(a);return p._open=!!(o===42?g:g&&(s||!v)),p._close=!!(o===42?v:v&&(b||!g)),t(f)}}function Ew(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const kM={name:"autolink",tokenize:EM};function EM(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 On(x)?(e.consume(x),c):x===64?n(x):p(x)}function c(x){return x===43||x===45||x===46||vn(x)?(a=1,d(x)):p(x)}function d(x){return x===58?(e.consume(x),a=0,f):(x===43||x===45||x===46||vn(x))&&a++<32?(e.consume(x),d):(a=0,p(x))}function f(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||Cd(x)?n(x):(e.consume(x),f)}function p(x){return x===64?(e.consume(x),b):fM(x)?(e.consume(x),p):n(x)}function b(x){return vn(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||vn(x))&&a++<63){const E=x===45?v:g;return e.consume(x),E}return n(x)}}const Cc={partial:!0,tokenize:SM};function SM(e,t,n){return a;function a(o){return Xe(o)?at(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||De(o)?t(o):n(o)}}const IE={continuation:{tokenize:NM},exit:CM,name:"blockQuote",tokenize:_M};function _M(e,t,n){const a=this;return s;function s(c){if(c===62){const d=a.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Xe(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function NM(e,t,n){const a=this;return s;function s(c){return Xe(c)?at(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(IE,t,n)(c)}}function CM(e){e.exit("blockQuote")}const zE={name:"characterEscape",tokenize:TM};function TM(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 pM(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const BE={name:"characterReference",tokenize:AM};function AM(e,t,n){const a=this;let s=0,o,c;return d;function d(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),f}function f(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),o=31,c=vn,b(g))}function p(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=Nm,b(g))}function b(g){if(g===59&&s){const v=e.exit("characterReferenceValue");return c===vn&&!_g(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 Sw={partial:!0,tokenize:OM},_w={concrete:!0,name:"codeFenced",tokenize:jM};function jM(e,t,n){const a=this,s={partial:!0,tokenize:B};let o=0,c=0,d;return f;function f(M){return p(M)}function p(M){const q=a.events[a.events.length-1];return o=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,d=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===d?(c++,e.consume(M),b):c<3?n(M):(e.exit("codeFencedFenceSequence"),Xe(M)?at(e,g,"whitespace")(M):g(M))}function g(M){return M===null||De(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(Sw,w,D)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(M))}function v(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Xe(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),at(e,x,"whitespace")(M)):M===96&&M===d?n(M):(e.consume(M),v)}function x(M){return M===null||De(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===d?n(M):(e.consume(M),E)}function w(M){return e.attempt(s,D,S)(M)}function S(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Xe(M)?at(e,C,"linePrefix",o+1)(M):C(M)}function C(M){return M===null||De(M)?e.check(Sw,w,D)(M):(e.enter("codeFlowValue"),T(M))}function T(M){return M===null||De(M)?(e.exit("codeFlowValue"),C(M)):(e.consume(M),T)}function D(M){return e.exit("codeFenced"),t(M)}function B(M,q,F){let ee=0;return U;function U(te){return M.enter("lineEnding"),M.consume(te),M.exit("lineEnding"),X}function X(te){return M.enter("codeFencedFence"),Xe(te)?at(M,J,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):J(te)}function J(te){return te===d?(M.enter("codeFencedFenceSequence"),pe(te)):F(te)}function pe(te){return te===d?(ee++,M.consume(te),pe):ee>=c?(M.exit("codeFencedFenceSequence"),Xe(te)?at(M,ue,"whitespace")(te):ue(te)):F(te)}function ue(te){return te===null||De(te)?(M.exit("codeFencedFence"),q(te)):F(te)}}}function OM(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 jp={name:"codeIndented",tokenize:MM},DM={partial:!0,tokenize:RM};function MM(e,t,n){const a=this;return s;function s(p){return e.enter("codeIndented"),at(e,o,"linePrefix",5)(p)}function o(p){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(p):n(p)}function c(p){return p===null?f(p):De(p)?e.attempt(DM,c,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||De(p)?(e.exit("codeFlowValue"),c(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function RM(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):De(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):at(e,o,"linePrefix",5)(c)}function o(c){const d=a.events[a.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):De(c)?s(c):n(c)}}const LM={name:"codeText",previous:zM,resolve:IM,tokenize:BM};function IM(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 zM(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BM(e,t,n){let a=0,s,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),d(g)}function d(g){return g===96?(e.consume(g),a++,d):(e.exit("codeTextSequence"),f(g))}function f(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),f):g===96?(o=e.enter("codeTextSequence"),s=0,b(g)):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(g))}function p(g){return g===null||g===32||g===96||De(g)?(e.exit("codeTextData"),f(g)):(e.consume(g),p)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",p(g))}}class UM{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&&Yo(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),Yo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Yo(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);Yo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Yo(this.left,n.reverse())}}}function Yo(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 UE(e){const t={};let n=-1,a,s,o,c,d,f,p;const b=new UM(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"&&(f=a[1]._tokenizer.events,o=0,o<f.length&&f[o][1].type==="lineEndingBlank"&&(o+=2),o<f.length&&f[o][1].type==="content"))for(;++o<f.length&&f[o][1].type!=="content";)f[o][1].type==="chunkText"&&(f[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,PM(b,n)),n=t[n],p=!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},d=b.slice(s,n),d.unshift(a),b.splice(s,n-s+1,d))}}return li(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!p}function PM(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 d=c.events,f=[],p={};let b,g,v=-1,x=n,E=0,w=0;const S=[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<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(w=v+1,S.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):S.pop(),v=S.length;v--;){const _=d.slice(S[v],S[v+1]),C=o.pop();f.push([C,C+_.length-1]),e.splice(C,2,_)}for(f.reverse(),v=-1;++v<f.length;)p[E+f[v][0]]=E+f[v][1],E+=f[v][1]-f[v][0]-1;return p}const FM={resolve:$M,tokenize:HM},qM={partial:!0,tokenize:KM};function $M(e){return UE(e),e}function HM(e,t){let n;return a;function a(d){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(d)}function s(d){return d===null?o(d):De(d)?e.check(qM,c,o)(d):(e.consume(d),s)}function o(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function c(d){return e.consume(d),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function KM(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),at(e,o,"linePrefix")}function o(c){if(c===null||De(c))return n(c);const d=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function PE(e,t,n,a,s,o,c,d,f){const p=f||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||Cd(_)?n(_):(e.enter(a),e.enter(c),e.enter(d),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(d),e.enter("chunkString",{contentType:"string"}),x(_))}function x(_){return _===62?(e.exit("chunkString"),e.exit(d),v(_)):_===null||_===60||De(_)?n(_):(e.consume(_),_===92?E:x)}function E(_){return _===60||_===62||_===92?(e.consume(_),x):x(_)}function w(_){return!b&&(_===null||_===41||kt(_))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(_)):b<p&&_===40?(e.consume(_),b++,w):_===41?(e.consume(_),b--,w):_===null||_===32||_===40||Cd(_)?n(_):(e.consume(_),_===92?S:w)}function S(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function FE(e,t,n,a,s,o){const c=this;let d=0,f;return p;function p(x){return e.enter(a),e.enter(s),e.consume(x),e.exit(s),e.enter(o),b}function b(x){return d>999||x===null||x===91||x===93&&!f||x===94&&!d&&"_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):De(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||De(x)||d++>999?(e.exit("chunkString"),b(x)):(e.consume(x),f||(f=!Xe(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),d++,g):g(x)}}function qE(e,t,n,a,s,o){let c;return d;function d(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,f):n(v)}function f(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):(e.enter(o),p(v))}function p(v){return v===c?(e.exit(o),f(c)):v===null?n(v):De(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),at(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===c||v===null||De(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?g:b)}function g(v){return v===c||v===92?(e.consume(v),b):b(v)}}function tc(e,t){let n;return a;function a(s){return De(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Xe(s)?at(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const GM={name:"definition",tokenize:YM},QM={partial:!0,tokenize:VM};function YM(e,t,n){const a=this;let s;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return FE.call(a,e,d,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(x)}function d(x){return s=Ii(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),x===58?(e.enter("definitionMarker"),e.consume(x),e.exit("definitionMarker"),f):n(x)}function f(x){return kt(x)?tc(e,p)(x):p(x)}function p(x){return PE(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(QM,g,g)(x)}function g(x){return Xe(x)?at(e,v,"whitespace")(x):v(x)}function v(x){return x===null||De(x)?(e.exit("definition"),a.parser.defined.push(s),t(x)):n(x)}}function VM(e,t,n){return a;function a(d){return kt(d)?tc(e,s)(d):n(d)}function s(d){return qE(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Xe(d)?at(e,c,"whitespace")(d):c(d)}function c(d){return d===null||De(d)?t(d):n(d)}}const WM={name:"hardBreakEscape",tokenize:XM};function XM(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return De(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const ZM={name:"headingAtx",resolve:JM,tokenize:eR};function JM(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"},li(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function eR(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||kt(b)?(e.exit("atxHeadingSequence"),d(b)):n(b)}function d(b){return b===35?(e.enter("atxHeadingSequence"),f(b)):b===null||De(b)?(e.exit("atxHeading"),t(b)):Xe(b)?at(e,d,"whitespace")(b):(e.enter("atxHeadingText"),p(b))}function f(b){return b===35?(e.consume(b),f):(e.exit("atxHeadingSequence"),d(b))}function p(b){return b===null||b===35||kt(b)?(e.exit("atxHeadingText"),d(b)):(e.consume(b),p)}}const tR=["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"],Nw=["pre","script","style","textarea"],nR={concrete:!0,name:"htmlFlow",resolveTo:rR,tokenize:sR},iR={partial:!0,tokenize:oR},aR={partial:!0,tokenize:lR};function rR(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 sR(e,t,n){const a=this;let s,o,c,d,f;return p;function p(j){return b(j)}function b(j){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(j),g}function g(j){return j===33?(e.consume(j),v):j===47?(e.consume(j),o=!0,w):j===63?(e.consume(j),s=3,a.interrupt?t:O):On(j)?(e.consume(j),c=String.fromCharCode(j),S):n(j)}function v(j){return j===45?(e.consume(j),s=2,x):j===91?(e.consume(j),s=5,d=0,E):On(j)?(e.consume(j),s=4,a.interrupt?t:O):n(j)}function x(j){return j===45?(e.consume(j),a.interrupt?t:O):n(j)}function E(j){const ge="CDATA[";return j===ge.charCodeAt(d++)?(e.consume(j),d===ge.length?a.interrupt?t:J:E):n(j)}function w(j){return On(j)?(e.consume(j),c=String.fromCharCode(j),S):n(j)}function S(j){if(j===null||j===47||j===62||kt(j)){const ge=j===47,_e=c.toLowerCase();return!ge&&!o&&Nw.includes(_e)?(s=1,a.interrupt?t(j):J(j)):tR.includes(c.toLowerCase())?(s=6,ge?(e.consume(j),_):a.interrupt?t(j):J(j)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(j):o?C(j):T(j))}return j===45||vn(j)?(e.consume(j),c+=String.fromCharCode(j),S):n(j)}function _(j){return j===62?(e.consume(j),a.interrupt?t:J):n(j)}function C(j){return Xe(j)?(e.consume(j),C):U(j)}function T(j){return j===47?(e.consume(j),U):j===58||j===95||On(j)?(e.consume(j),D):Xe(j)?(e.consume(j),T):U(j)}function D(j){return j===45||j===46||j===58||j===95||vn(j)?(e.consume(j),D):B(j)}function B(j){return j===61?(e.consume(j),M):Xe(j)?(e.consume(j),B):T(j)}function M(j){return j===null||j===60||j===61||j===62||j===96?n(j):j===34||j===39?(e.consume(j),f=j,q):Xe(j)?(e.consume(j),M):F(j)}function q(j){return j===f?(e.consume(j),f=null,ee):j===null||De(j)?n(j):(e.consume(j),q)}function F(j){return j===null||j===34||j===39||j===47||j===60||j===61||j===62||j===96||kt(j)?B(j):(e.consume(j),F)}function ee(j){return j===47||j===62||Xe(j)?T(j):n(j)}function U(j){return j===62?(e.consume(j),X):n(j)}function X(j){return j===null||De(j)?J(j):Xe(j)?(e.consume(j),X):n(j)}function J(j){return j===45&&s===2?(e.consume(j),$):j===60&&s===1?(e.consume(j),ce):j===62&&s===4?(e.consume(j),R):j===63&&s===3?(e.consume(j),O):j===93&&s===5?(e.consume(j),re):De(j)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(iR,Q,pe)(j)):j===null||De(j)?(e.exit("htmlFlowData"),pe(j)):(e.consume(j),J)}function pe(j){return e.check(aR,ue,Q)(j)}function ue(j){return e.enter("lineEnding"),e.consume(j),e.exit("lineEnding"),te}function te(j){return j===null||De(j)?pe(j):(e.enter("htmlFlowData"),J(j))}function $(j){return j===45?(e.consume(j),O):J(j)}function ce(j){return j===47?(e.consume(j),c="",de):J(j)}function de(j){if(j===62){const ge=c.toLowerCase();return Nw.includes(ge)?(e.consume(j),R):J(j)}return On(j)&&c.length<8?(e.consume(j),c+=String.fromCharCode(j),de):J(j)}function re(j){return j===93?(e.consume(j),O):J(j)}function O(j){return j===62?(e.consume(j),R):j===45&&s===2?(e.consume(j),O):J(j)}function R(j){return j===null||De(j)?(e.exit("htmlFlowData"),Q(j)):(e.consume(j),R)}function Q(j){return e.exit("htmlFlow"),t(j)}}function lR(e,t,n){const a=this;return s;function s(c){return De(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 oR(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Cc,t,n)}}const cR={name:"htmlText",tokenize:uR};function uR(e,t,n){const a=this;let s,o,c;return d;function d(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),f}function f(O){return O===33?(e.consume(O),p):O===47?(e.consume(O),B):O===63?(e.consume(O),T):On(O)?(e.consume(O),F):n(O)}function p(O){return O===45?(e.consume(O),b):O===91?(e.consume(O),o=0,E):On(O)?(e.consume(O),C):n(O)}function b(O){return O===45?(e.consume(O),x):n(O)}function g(O){return O===null?n(O):O===45?(e.consume(O),v):De(O)?(c=g,ce(O)):(e.consume(O),g)}function v(O){return O===45?(e.consume(O),x):g(O)}function x(O){return O===62?$(O):O===45?v(O):g(O)}function E(O){const R="CDATA[";return O===R.charCodeAt(o++)?(e.consume(O),o===R.length?w:E):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),S):De(O)?(c=w,ce(O)):(e.consume(O),w)}function S(O){return O===93?(e.consume(O),_):w(O)}function _(O){return O===62?$(O):O===93?(e.consume(O),_):w(O)}function C(O){return O===null||O===62?$(O):De(O)?(c=C,ce(O)):(e.consume(O),C)}function T(O){return O===null?n(O):O===63?(e.consume(O),D):De(O)?(c=T,ce(O)):(e.consume(O),T)}function D(O){return O===62?$(O):T(O)}function B(O){return On(O)?(e.consume(O),M):n(O)}function M(O){return O===45||vn(O)?(e.consume(O),M):q(O)}function q(O){return De(O)?(c=q,ce(O)):Xe(O)?(e.consume(O),q):$(O)}function F(O){return O===45||vn(O)?(e.consume(O),F):O===47||O===62||kt(O)?ee(O):n(O)}function ee(O){return O===47?(e.consume(O),$):O===58||O===95||On(O)?(e.consume(O),U):De(O)?(c=ee,ce(O)):Xe(O)?(e.consume(O),ee):$(O)}function U(O){return O===45||O===46||O===58||O===95||vn(O)?(e.consume(O),U):X(O)}function X(O){return O===61?(e.consume(O),J):De(O)?(c=X,ce(O)):Xe(O)?(e.consume(O),X):ee(O)}function J(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,pe):De(O)?(c=J,ce(O)):Xe(O)?(e.consume(O),J):(e.consume(O),ue)}function pe(O){return O===s?(e.consume(O),s=void 0,te):O===null?n(O):De(O)?(c=pe,ce(O)):(e.consume(O),pe)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||kt(O)?ee(O):(e.consume(O),ue)}function te(O){return O===47||O===62||kt(O)?ee(O):n(O)}function $(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ce(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),de}function de(O){return Xe(O)?at(e,re,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):re(O)}function re(O){return e.enter("htmlTextData"),c(O)}}const Ng={name:"labelEnd",resolveAll:pR,resolveTo:mR,tokenize:gR},dR={tokenize:bR},fR={tokenize:yR},hR={tokenize:xR};function pR(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&&li(e,0,e.length,n),e}function mR(e,t){let n=e.length,a=0,s,o,c,d;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 f={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},p={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 d=[["enter",f,t],["enter",p,t]],d=ki(d,e.slice(o+1,o+a+3)),d=ki(d,[["enter",b,t]]),d=ki(d,tf(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),d=ki(d,[["exit",b,t],e[c-2],e[c-1],["exit",p,t]]),d=ki(d,e.slice(c+1)),d=ki(d,[["exit",f,t]]),li(e,o,e.length,d),e}function gR(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 d;function d(v){return o?o._inactive?g(v):(c=a.parser.defined.includes(Ii(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):n(v)}function f(v){return v===40?e.attempt(dR,b,c?b:g)(v):v===91?e.attempt(fR,b,c?p:g)(v):c?b(v):g(v)}function p(v){return e.attempt(hR,b,g)(v)}function b(v){return t(v)}function g(v){return o._balanced=!0,n(v)}}function bR(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 kt(g)?tc(e,o)(g):o(g)}function o(g){return g===41?b(g):PE(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return kt(g)?tc(e,f)(g):b(g)}function d(g){return n(g)}function f(g){return g===34||g===39||g===40?qE(e,p,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function p(g){return kt(g)?tc(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 yR(e,t,n){const a=this;return s;function s(d){return FE.call(a,e,o,c,"reference","referenceMarker","referenceString")(d)}function o(d){return a.parser.defined.includes(Ii(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(d):n(d)}function c(d){return n(d)}}function xR(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 vR={name:"labelStartImage",resolveAll:Ng.resolveAll,tokenize:wR};function wR(e,t,n){const a=this;return s;function s(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),o}function o(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),c):n(d)}function c(d){return d===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(d):t(d)}}const kR={name:"labelStartLink",resolveAll:Ng.resolveAll,tokenize:ER};function ER(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 Op={name:"lineEnding",tokenize:SR};function SR(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),at(e,t,"linePrefix")}}const bd={name:"thematicBreak",tokenize:_R};function _R(e,t,n){let a=0,s;return o;function o(p){return e.enter("thematicBreak"),c(p)}function c(p){return s=p,d(p)}function d(p){return p===s?(e.enter("thematicBreakSequence"),f(p)):a>=3&&(p===null||De(p))?(e.exit("thematicBreak"),t(p)):n(p)}function f(p){return p===s?(e.consume(p),a++,f):(e.exit("thematicBreakSequence"),Xe(p)?at(e,d,"whitespace")(p):d(p))}}const qn={continuation:{tokenize:AR},exit:OR,name:"list",tokenize:TR},NR={partial:!0,tokenize:DR},CR={partial:!0,tokenize:jR};function TR(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 d;function d(x){const E=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Nm(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(bd,n,p)(x):p(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(x)}return n(x)}function f(x){return Nm(x)&&++c<10?(e.consume(x),f):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),p(x)):n(x)}function p(x){return e.enter("listItemMarker"),e.consume(x),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||x,e.check(Cc,a.interrupt?n:b,e.attempt(NR,v,g))}function b(x){return a.containerState.initialBlankLine=!0,o++,v(x)}function g(x){return Xe(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 AR(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Cc,s,o);function s(d){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,at(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!Xe(d)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(d)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(CR,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,at(e,e.attempt(qn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function jR(e,t,n){const a=this;return at(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 OR(e){e.exit(this.containerState.type)}function DR(e,t,n){const a=this;return at(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!Xe(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const Cw={name:"setextUnderline",resolveTo:MR,tokenize:RR};function MR(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 RR(e,t,n){const a=this;let s;return o;function o(p){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=p,c(p)):n(p)}function c(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===s?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),Xe(p)?at(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||De(p)?(e.exit("setextHeadingLine"),t(p)):n(p)}}const LR={tokenize:IR};function IR(e){const t=this,n=e.attempt(Cc,a,e.attempt(this.parser.constructs.flowInitial,s,at(e,e.attempt(this.parser.constructs.flow,s,e.attempt(FM,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 zR={resolveAll:HE()},BR=$E("string"),UR=$E("text");function $E(e){return{resolveAll:HE(e==="text"?PR:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,d);return c;function c(b){return p(b)?o(b):d(b)}function d(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),f}function f(b){return p(b)?(n.exit("data"),o(b)):(n.consume(b),f)}function p(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 HE(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 PR(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,d=0,f;for(;o--;){const p=s[o];if(typeof p=="string"){for(c=p.length;p.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(p===-2)f=!0,d++;else if(p!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const p={type:n===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-d,offset:a.end.offset-d},end:{...a.end}};a.end={...p.start},a.start.offset===a.end.offset?Object.assign(a,p):(e.splice(n,0,["enter",p,t],["exit",p,t]),n+=2)}n++}return e}const FR={42:qn,43:qn,45:qn,48:qn,49:qn,50:qn,51:qn,52:qn,53:qn,54:qn,55:qn,56:qn,57:qn,62:IE},qR={91:GM},$R={[-2]:jp,[-1]:jp,32:jp},HR={35:ZM,42:bd,45:[Cw,bd],60:nR,61:Cw,95:bd,96:_w,126:_w},KR={38:BE,92:zE},GR={[-5]:Op,[-4]:Op,[-3]:Op,33:vR,38:BE,42:Cm,60:[kM,cR],91:kR,92:[WM,zE],93:Ng,95:Cm,96:LM},QR={null:[Cm,zR]},YR={null:[42,95]},VR={null:[]},WR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:YR,contentInitial:qR,disable:VR,document:FR,flow:HR,flowInitial:$R,insideSpan:QR,string:KR,text:GR},Symbol.toStringTag,{value:"Module"}));function XR(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=[],d=[];const f={attempt:q(B),check:q(M),consume:C,enter:T,exit:D,interrupt:q(M,{interrupt:!0})},p={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let b=t.tokenize.call(p,f);return t.resolveAll&&o.push(t),p;function g(X){return c=ki(c,X),S(),c[c.length-1]!==null?[]:(F(t,0),p.events=tf(o,p.events,p),p.events)}function v(X,J){return JR(x(X),J)}function x(X){return ZR(c,X)}function E(){const{_bufferIndex:X,_index:J,line:pe,column:ue,offset:te}=a;return{_bufferIndex:X,_index:J,line:pe,column:ue,offset:te}}function w(X){s[X.line]=X.column,U()}function S(){let X;for(;a._index<c.length;){const J=c[a._index];if(typeof J=="string")for(X=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===X&&a._bufferIndex<J.length;)_(J.charCodeAt(a._bufferIndex));else _(J)}}function _(X){b=b(X)}function C(X){De(X)?(a.line++,a.column=1,a.offset+=X===-3?2:1,U()):X!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),p.previous=X}function T(X,J){const pe=J||{};return pe.type=X,pe.start=E(),p.events.push(["enter",pe,p]),d.push(pe),pe}function D(X){const J=d.pop();return J.end=E(),p.events.push(["exit",J,p]),J}function B(X,J){F(X,J.from)}function M(X,J){J.restore()}function q(X,J){return pe;function pe(ue,te,$){let ce,de,re,O;return Array.isArray(ue)?Q(ue):"tokenize"in ue?Q([ue]):R(ue);function R(Y){return xe;function xe(V){const ae=V!==null&&Y[V],ye=V!==null&&Y.null,Be=[...Array.isArray(ae)?ae:ae?[ae]:[],...Array.isArray(ye)?ye:ye?[ye]:[]];return Q(Be)(V)}}function Q(Y){return ce=Y,de=0,Y.length===0?$:j(Y[de])}function j(Y){return xe;function xe(V){return O=ee(),re=Y,Y.partial||(p.currentConstruct=Y),Y.name&&p.parser.constructs.disable.null.includes(Y.name)?_e():Y.tokenize.call(J?Object.assign(Object.create(p),J):p,f,ge,_e)(V)}}function ge(Y){return X(re,O),te}function _e(Y){return O.restore(),++de<ce.length?j(ce[de]):$}}}function F(X,J){X.resolveAll&&!o.includes(X)&&o.push(X),X.resolve&&li(p.events,J,p.events.length-J,X.resolve(p.events.slice(J),p)),X.resolveTo&&(p.events=X.resolveTo(p.events,p))}function ee(){const X=E(),J=p.previous,pe=p.currentConstruct,ue=p.events.length,te=Array.from(d);return{from:ue,restore:$};function $(){a=X,p.previous=J,p.currentConstruct=pe,p.events.length=ue,d=te,U()}}function U(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function ZR(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 d=c[0];typeof d=="string"?c[0]=d.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function JR(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=`
523
+ `;break}case-3:{c=`\r
524
+ `;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 eL(e){const a={constructs:RE([WR,...(e||{}).extensions||[]]),content:s(mM),defined:[],document:s(bM),flow:s(LR),lazy:{},string:s(BR),text:s(UR)};return a;function s(o){return c;function c(d){return XR(a,o,d)}}}function tL(e){for(;!UE(e););return e}const Tw=/[\0\t\n\r]/g;function nL(){let e=1,t="",n=!0,a;return s;function s(o,c,d){const f=[];let p,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(Tw.lastIndex=g,p=Tw.exec(o),v=p&&p.index!==void 0?p.index:o.length,x=o.charCodeAt(v),!p){t=o.slice(g);break}if(x===10&&g===v&&a)f.push(-3),a=void 0;else switch(a&&(f.push(-5),a=void 0),g<v&&(f.push(o.slice(g,v)),e+=v-g),x){case 0:{f.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,f.push(-2);e++<b;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:a=!0,e=1}g=v+1}return d&&(a&&f.push(-5),t&&f.push(t),f.push(null)),f}}const iL=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function aL(e){return e.replace(iL,rL)}function rL(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return LE(n.slice(o?2:1),o?16:10)}return _g(n)||e}const KE={}.hasOwnProperty;function sL(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),lL(n)(tL(eL(n).document().write(nL()(e,t,!0))))}function lL(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Fi),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:o(Pi),blockQuote:o(ye),characterEscape:ee,characterReference:ee,codeFenced:o(Be),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(Be,c),codeText:o(jt,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:o(St),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(on),hardBreakEscape:o(tt),hardBreakTrailing:o(tt),htmlFlow:o(Ti,c),htmlFlowData:ee,htmlText:o(Ti,c),htmlTextData:ee,image:o(ui),label:c,link:o(Fi),listItem:o(Tr),listItemValue:v,listOrdered:o(na,g),listUnordered:o(na),paragraph:o(Ql),reference:j,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Pi),strong:o(ys),thematicBreak:o(xs)},exit:{atxHeading:f(),atxHeadingSequence:B,autolink:f(),autolinkEmail:ae,autolinkProtocol:V,blockQuote:f(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:_e,characterReferenceMarkerNumeric:_e,characterReferenceValue:Y,characterReference:xe,codeFenced:f(S),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:E,codeFlowValue:U,codeIndented:f(_),codeText:f(te),codeTextData:U,data:U,definition:f(),definitionDestinationString:D,definitionLabelString:C,definitionTitleString:T,emphasis:f(),hardBreakEscape:f(J),hardBreakTrailing:f(J),htmlFlow:f(pe),htmlFlowData:U,htmlText:f(ue),htmlTextData:U,image:f(ce),label:re,labelText:de,lineEnding:X,link:f($),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ge,resourceDestinationString:O,resourceTitleString:R,resource:Q,setextHeading:f(F),setextHeadingLineSequence:q,setextHeadingText:M,strong:f(),thematicBreak:f()}};GE(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let me={type:"root",children:[]};const Me={stack:[me],tokenStack:[],config:t,enter:d,exit:p,buffer:c,resume:b,data:n},Qe=[];let rt=-1;for(;++rt<ne.length;)if(ne[rt][1].type==="listOrdered"||ne[rt][1].type==="listUnordered")if(ne[rt][0]==="enter")Qe.push(rt);else{const En=Qe.pop();rt=s(ne,En,rt)}for(rt=-1;++rt<ne.length;){const En=t[ne[rt][0]];KE.call(En,ne[rt][1].type)&&En[ne[rt][1].type].call(Object.assign({sliceSerialize:ne[rt][2].sliceSerialize},Me),ne[rt][1])}if(Me.tokenStack.length>0){const En=Me.tokenStack[Me.tokenStack.length-1];(En[1]||Aw).call(Me,void 0,En[0])}for(me.position={start:cr(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:cr(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},rt=-1;++rt<t.transforms.length;)me=t.transforms[rt](me)||me;return me}function s(ne,me,Me){let Qe=me-1,rt=-1,En=!1,Ai,cn,Pt,mn;for(;++Qe<=Me;){const dt=ne[Qe];switch(dt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{dt[0]==="enter"?rt++:rt--,mn=void 0;break}case"lineEndingBlank":{dt[0]==="enter"&&(Ai&&!mn&&!rt&&!Pt&&(Pt=Qe),mn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:mn=void 0}if(!rt&&dt[0]==="enter"&&dt[1].type==="listItemPrefix"||rt===-1&&dt[0]==="exit"&&(dt[1].type==="listUnordered"||dt[1].type==="listOrdered")){if(Ai){let qi=Qe;for(cn=void 0;qi--;){const Sn=ne[qi];if(Sn[1].type==="lineEnding"||Sn[1].type==="lineEndingBlank"){if(Sn[0]==="exit")continue;cn&&(ne[cn][1].type="lineEndingBlank",En=!0),Sn[1].type="lineEnding",cn=qi}else if(!(Sn[1].type==="linePrefix"||Sn[1].type==="blockQuotePrefix"||Sn[1].type==="blockQuotePrefixWhitespace"||Sn[1].type==="blockQuoteMarker"||Sn[1].type==="listItemIndent"))break}Pt&&(!cn||Pt<cn)&&(Ai._spread=!0),Ai.end=Object.assign({},cn?ne[cn][1].start:dt[1].end),ne.splice(cn||Qe,0,["exit",Ai,dt[2]]),Qe++,Me++}if(dt[1].type==="listItemPrefix"){const qi={type:"listItem",_spread:!1,start:Object.assign({},dt[1].start),end:void 0};Ai=qi,ne.splice(Qe,0,["enter",qi,dt[2]]),Qe++,Me++,Pt=void 0,mn=!0}}}return ne[me][1]._spread=En,Me}function o(ne,me){return Me;function Me(Qe){d.call(this,ne(Qe),Qe),me&&me.call(this,Qe)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(ne,me,Me){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([me,Me||void 0]),ne.position={start:cr(me.start),end:void 0}}function f(ne){return me;function me(Me){ne&&ne.call(this,Me),p.call(this,Me)}}function p(ne,me){const Me=this.stack.pop(),Qe=this.tokenStack.pop();if(Qe)Qe[0].type!==ne.type&&(me?me.call(this,ne,Qe[0]):(Qe[1]||Aw).call(this,ne,Qe[0]));else throw new Error("Cannot close `"+ne.type+"` ("+ec({start:ne.start,end:ne.end})+"): it’s not open");Me.position.end=cr(ne.end)}function b(){return Sg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(ne){if(this.data.expectingFirstListItemValue){const me=this.stack[this.stack.length-2];me.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function x(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.lang=ne}function E(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.meta=ne}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne.replace(/(\r?\n|\r)$/g,"")}function C(ne){const me=this.resume(),Me=this.stack[this.stack.length-1];Me.label=me,Me.identifier=Ii(this.sliceSerialize(ne)).toLowerCase()}function T(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.title=ne}function D(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.url=ne}function B(ne){const me=this.stack[this.stack.length-1];if(!me.depth){const Me=this.sliceSerialize(ne).length;me.depth=Me}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function q(ne){const me=this.stack[this.stack.length-1];me.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function F(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(ne){const Me=this.stack[this.stack.length-1].children;let Qe=Me[Me.length-1];(!Qe||Qe.type!=="text")&&(Qe=Lt(),Qe.position={start:cr(ne.start),end:void 0},Me.push(Qe)),this.stack.push(Qe)}function U(ne){const me=this.stack.pop();me.value+=this.sliceSerialize(ne),me.position.end=cr(ne.end)}function X(ne){const me=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=me.children[me.children.length-1];Me.position.end=cr(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(me.type)&&(ee.call(this,ne),U.call(this,ne))}function J(){this.data.atHardBreak=!0}function pe(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function ue(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function te(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.value=ne}function $(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=me,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function ce(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const me=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=me,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function de(ne){const me=this.sliceSerialize(ne),Me=this.stack[this.stack.length-2];Me.label=aL(me),Me.identifier=Ii(me).toLowerCase()}function re(){const ne=this.stack[this.stack.length-1],me=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const Qe=ne.children;Me.children=Qe}else Me.alt=me}function O(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.url=ne}function R(){const ne=this.resume(),me=this.stack[this.stack.length-1];me.title=ne}function Q(){this.data.inReference=void 0}function j(){this.data.referenceType="collapsed"}function ge(ne){const me=this.resume(),Me=this.stack[this.stack.length-1];Me.label=me,Me.identifier=Ii(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function _e(ne){this.data.characterReferenceType=ne.type}function Y(ne){const me=this.sliceSerialize(ne),Me=this.data.characterReferenceType;let Qe;Me?(Qe=LE(me,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Qe=_g(me);const rt=this.stack[this.stack.length-1];rt.value+=Qe}function xe(ne){const me=this.stack.pop();me.position.end=cr(ne.end)}function V(ne){U.call(this,ne);const me=this.stack[this.stack.length-1];me.url=this.sliceSerialize(ne)}function ae(ne){U.call(this,ne);const me=this.stack[this.stack.length-1];me.url="mailto:"+this.sliceSerialize(ne)}function ye(){return{type:"blockquote",children:[]}}function Be(){return{type:"code",lang:null,meta:null,value:""}}function jt(){return{type:"inlineCode",value:""}}function St(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function on(){return{type:"emphasis",children:[]}}function Pi(){return{type:"heading",depth:0,children:[]}}function tt(){return{type:"break"}}function Ti(){return{type:"html",value:""}}function ui(){return{type:"image",title:null,url:"",alt:null}}function Fi(){return{type:"link",title:null,url:"",children:[]}}function na(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 Ql(){return{type:"paragraph",children:[]}}function ys(){return{type:"strong",children:[]}}function Lt(){return{type:"text",value:""}}function xs(){return{type:"thematicBreak"}}}function cr(e){return{line:e.line,column:e.column,offset:e.offset}}function GE(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?GE(e,a):oL(e,a)}}function oL(e,t){let n;for(n in t)if(KE.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 Aw(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ec({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ec({start:t.start,end:t.end})+") is still open")}function cL(e){const t=this;t.parser=n;function n(a){return sL(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function uL(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 dL(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
525
+ `}]}function fL(e,t){const n=t.value?t.value+`
526
+ `:"",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 hL(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function pL(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function mL(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Gl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,d=e.footnoteCounts.get(a);d===void 0?(d=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,d+=1,e.footnoteCounts.set(a,d);const f={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function gL(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 bL(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function QE(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 yL(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return QE(e,t);const s={src:Gl(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 xL(e,t){const n={src:Gl(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 vL(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 wL(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return QE(e,t);const s={href:Gl(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 kL(e,t){const n={href:Gl(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?SL(n):YE(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 d=-1;for(;++d<a.length;){const b=a[d];(s||d!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
527
+ `}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const f=a[a.length-1];f&&(s||f.type!=="element"||f.tagName!=="p")&&c.push({type:"text",value:`
528
+ `});const p={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,p),e.applyData(t,p)}function SL(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=YE(n[a])}return t}function YE(e){const t=e.spread;return t??e.children.length>1}function _L(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 NL(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function CL(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function TL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AL(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)},d=vg(t.children[1]),f=CE(t.children[t.children.length-1]);d&&f&&(c.position={start:d,end:f}),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 jL(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,d=c?c.length:t.children.length;let f=-1;const p=[];for(;++f<d;){const g=t.children[f],v={},x=c?c[f]: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)),p.push(E)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!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 jw=9,Ow=32;function DL(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(Dw(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(Dw(t.slice(s),s>0,!1)),o.join("")}function Dw(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===jw||o===Ow;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===jw||o===Ow;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function ML(e,t){const n={type:"text",value:DL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function RL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const LL={blockquote:uL,break:dL,code:fL,delete:hL,emphasis:pL,footnoteReference:mL,heading:gL,html:bL,imageReference:yL,image:xL,inlineCode:vL,linkReference:wL,link:kL,listItem:EL,list:_L,paragraph:NL,root:CL,strong:TL,table:AL,tableCell:OL,tableRow:jL,text:ML,thematicBreak:RL,toml:td,yaml:td,definition:td,footnoteDefinition:td};function td(){}const VE=-1,nf=0,nc=1,Td=2,Cg=3,Tg=4,Ag=5,jg=6,WE=7,XE=8,Mw=typeof self=="object"?self:globalThis,IL=(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 nf:case VE:return n(c,s);case nc:{const d=n([],s);for(const f of c)d.push(a(f));return d}case Td:{const d=n({},s);for(const[f,p]of c)d[a(f)]=a(p);return d}case Cg:return n(new Date(c),s);case Tg:{const{source:d,flags:f}=c;return n(new RegExp(d,f),s)}case Ag:{const d=n(new Map,s);for(const[f,p]of c)d.set(a(f),a(p));return d}case jg:{const d=n(new Set,s);for(const f of c)d.add(a(f));return d}case WE:{const{name:d,message:f}=c;return n(new Mw[d](f),s)}case XE: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:d}=new Uint8Array(c);return n(new DataView(d),c)}}return n(new Mw[o](c),s)};return a},Rw=e=>IL(new Map,e)(0),sl="",{toString:zL}={},{keys:BL}=Object,Vo=e=>{const t=typeof e;if(t!=="object"||!e)return[nf,t];const n=zL.call(e).slice(8,-1);switch(n){case"Array":return[nc,sl];case"Object":return[Td,sl];case"Date":return[Cg,sl];case"RegExp":return[Tg,sl];case"Map":return[Ag,sl];case"Set":return[jg,sl];case"DataView":return[nc,n]}return n.includes("Array")?[nc,n]:n.includes("Error")?[WE,n]:[Td,n]},nd=([e,t])=>e===nf&&(t==="function"||t==="symbol"),UL=(e,t,n,a)=>{const s=(c,d)=>{const f=a.push(c)-1;return n.set(d,f),f},o=c=>{if(n.has(c))return n.get(c);let[d,f]=Vo(c);switch(d){case nf:{let b=c;switch(f){case"bigint":d=XE,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);b=null;break;case"undefined":return s([VE],c)}return s([d,b],c)}case nc:{if(f){let v=c;return f==="DataView"?v=new Uint8Array(c.buffer):f==="ArrayBuffer"&&(v=new Uint8Array(c)),s([f,[...v]],c)}const b=[],g=s([d,b],c);for(const v of c)b.push(o(v));return g}case Td:{if(f)switch(f){case"BigInt":return s([f,c.toString()],c);case"Boolean":case"Number":case"String":return s([f,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const b=[],g=s([d,b],c);for(const v of BL(c))(e||!nd(Vo(c[v])))&&b.push([o(v),o(c[v])]);return g}case Cg:return s([d,c.toISOString()],c);case Tg:{const{source:b,flags:g}=c;return s([d,{source:b,flags:g}],c)}case Ag:{const b=[],g=s([d,b],c);for(const[v,x]of c)(e||!(nd(Vo(v))||nd(Vo(x))))&&b.push([o(v),o(x)]);return g}case jg:{const b=[],g=s([d,b],c);for(const v of c)(e||!nd(Vo(v)))&&b.push(o(v));return g}}const{message:p}=c;return s([d,{name:f,message:p}],c)};return o},Lw=(e,{json:t,lossy:n}={})=>{const a=[];return UL(!(t||n),!!t,new Map,a)(e),a},Ad=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Rw(Lw(e,t)):structuredClone(e):(e,t)=>Rw(Lw(e,t));function PL(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 FL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function qL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||PL,a=e.options.footnoteBackLabel||FL,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const b=e.all(p),g=String(p.identifier).toUpperCase(),v=Gl(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 C=typeof n=="string"?n:n(f,x);typeof C=="string"&&(C={type:"text",value:C}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(f,x),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const S=b[b.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const C=S.children[S.children.length-1];C&&C.type==="text"?C.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...E)}else b.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(b,!0)};e.patch(p,_),d.push(_)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Ad(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
529
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
530
+ `}]}}const Tc=(function(e){if(e==null)return GL;if(typeof e=="function")return af(e);if(typeof e=="object")return Array.isArray(e)?$L(e):HL(e);if(typeof e=="string")return KL(e);throw new Error("Expected function, string, or object as test")});function $L(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tc(e[n]);return af(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function HL(e){const t=e;return af(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function KL(e){return af(t);function t(n){return n&&n.type===e}}function af(e){return t;function t(n,a,s){return!!(QL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function GL(){return!0}function QL(e){return e!==null&&typeof e=="object"&&"type"in e}const ZE=[],YL=!0,Tm=!1,VL="skip";function JE(e,t,n,a){let s;typeof t=="function"&&typeof n!="function"?(a=n,n=t):s=t;const o=Tc(s),c=a?-1:1;d(e,void 0,[])();function d(f,p,b){const g=f&&typeof f=="object"?f:{};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 ("+(f.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=ZE,E,w,S;if((!t||o(f,p,b[b.length-1]||void 0))&&(x=WL(n(f,b)),x[0]===Tm))return x;if("children"in f&&f.children){const _=f;if(_.children&&x[0]!==VL)for(w=(a?_.children.length:-1)+c,S=b.concat(_);w>-1&&w<_.children.length;){const C=_.children[w];if(E=d(C,w,S)(),E[0]===Tm)return E;w=typeof E[1]=="number"?E[1]:w+c}}return x}}}function WL(e){return Array.isArray(e)?e:typeof e=="number"?[YL,e]:e==null?ZE:[e]}function rf(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),JE(e,o,d,s);function d(f,p){const b=p[p.length-1],g=b?b.children.indexOf(f):void 0;return c(f,g,b)}}const Am={}.hasOwnProperty,XL={};function ZL(e,t){const n=t||XL,a=new Map,s=new Map,o=new Map,c={...LL,...n.handlers},d={all:p,applyData:e3,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:f,options:n,patch:JL,wrap:n3};return rf(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)}}),d;function f(b,g){const v=b.type,x=d.handlers[v];if(Am.call(d.handlers,v)&&x)return x(d,b,g);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in b){const{children:w,...S}=b,_=Ad(S);return _.children=d.all(b),_}return Ad(b)}return(d.options.unknownHandler||t3)(d,b,g)}function p(b){const g=[];if("children"in b){const v=b.children;let x=-1;for(;++x<v.length;){const E=d.one(v[x],b);if(E){if(x&&v[x-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=Iw(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=Iw(w.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function JL(e,t){e.position&&(t.position=FD(e))}function e3(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,Ad(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function t3(e,t){const n=t.data||{},a="value"in t&&!(Am.call(n,"hProperties")||Am.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 n3(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
531
+ `});++a<e.length;)a&&n.push({type:"text",value:`
532
+ `}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
533
+ `}),n}function Iw(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function zw(e,t){const n=ZL(e,t),a=n.one(e,void 0),s=qL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
534
+ `},s),o}function i3(e,t){return e&&"run"in e?async function(n,a){const s=zw(n,{file:a,...t});await e.run(s,a)}:function(n,a){return zw(n,{file:a,...e||t})}}function Bw(e){if(e)throw e}var Dp,Uw;function a3(){if(Uw)return Dp;Uw=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},o=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var b=e.call(p,"constructor"),g=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!b&&!g)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},c=function(p,b){n&&b.name==="__proto__"?n(p,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):p[b.name]=b.newValue},d=function(p,b){if(b==="__proto__")if(e.call(p,b)){if(a)return a(p,b).value}else return;return p[b]};return Dp=function f(){var p,b,g,v,x,E,w=arguments[0],S=1,_=arguments.length,C=!1;for(typeof w=="boolean"&&(C=w,w=arguments[1]||{},S=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});S<_;++S)if(p=arguments[S],p!=null)for(b in p)g=d(w,b),v=d(p,b),w!==v&&(C&&v&&(o(v)||(x=s(v)))?(x?(x=!1,E=g&&s(g)?g:[]):E=g&&o(g)?g:{},c(w,{name:b,newValue:f(C,E,v)})):typeof v<"u"&&c(w,{name:b,newValue:v}));return w},Dp}var r3=a3();const Mp=Lm(r3);function jm(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 s3(){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);d(null,...s);function d(f,...p){const b=e[++o];let g=-1;if(f){c(f);return}for(;++g<s.length;)(p[g]===null||p[g]===void 0)&&(p[g]=s[g]);s=p,b?l3(b,d)(...p):c(null,...p)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function l3(e,t){let n;return a;function a(...c){const d=e.length>c.length;let f;d&&c.push(s);try{f=e.apply(this,c)}catch(p){const b=p;if(d&&n)throw b;return s(b)}d||(f&&f.then&&typeof f.then=="function"?f.then(o,s):f instanceof Error?s(f):o(f))}function s(c,...d){n||(n=!0,t(c,...d))}function o(c){s(null,c)}}const Vi={basename:o3,dirname:c3,extname:u3,join:d3,sep:"/"};function o3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Ac(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,d=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),d>-1&&(e.codePointAt(s)===t.codePointAt(d--)?d<0&&(a=s):(d=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function c3(e){if(Ac(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 u3(e){Ac(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const d=e.codePointAt(t);if(d===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),d===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 d3(...e){let t=-1,n;for(;++t<e.length;)Ac(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":f3(n)}function f3(e){Ac(e);const t=e.codePointAt(0)===47;let n=h3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function h3(e,t){let n="",a=0,s=-1,o=0,c=-1,d,f;for(;++c<=e.length;){if(c<e.length)d=e.codePointAt(c);else{if(d===47)break;d=47}if(d===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(f=n.lastIndexOf("/"),f!==n.length-1){f<0?(n="",a=0):(n=n.slice(0,f),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 d===46&&o>-1?o++:o=-1}return n}function Ac(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const p3={cwd:m3};function m3(){return"/"}function Om(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function g3(e){if(typeof e=="string")e=new URL(e);else if(!Om(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 b3(e)}function b3(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 Rp=["history","path","basename","stem","extname","dirname"];class e1{constructor(t){let n;t?Om(t)?n={path:t}:typeof t=="string"||y3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":p3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<Rp.length;){const o=Rp[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)Rp.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Vi.basename(this.path):void 0}set basename(t){Ip(t,"basename"),Lp(t,"basename"),this.path=Vi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Vi.dirname(this.path):void 0}set dirname(t){Pw(this.basename,"dirname"),this.path=Vi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Vi.extname(this.path):void 0}set extname(t){if(Lp(t,"extname"),Pw(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=Vi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Om(t)&&(t=g3(t)),Ip(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Vi.basename(this.path,this.extname):void 0}set stem(t){Ip(t,"stem"),Lp(t,"stem"),this.path=Vi.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 kn(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 Lp(e,t){if(e&&e.includes(Vi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Vi.sep+"`")}function Ip(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Pw(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function y3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const x3=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),v3={}.hasOwnProperty;class Og extends x3{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=s3()}copy(){const t=new Og;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Mp(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Up("data",this.frozen),this.namespace[t]=n,this):v3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Up("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=id(t),a=this.parser||this.Parser;return zp("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),zp("process",this.parser||this.Parser),Bp("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const d=id(t),f=a.parse(d);a.run(f,d,function(b,g,v){if(b||!g||!v)return p(b);const x=g,E=a.stringify(x,v);E3(E)?v.value=E:v.result=E,p(b,v)});function p(b,g){b||!g?c(b):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),zp("processSync",this.parser||this.Parser),Bp("processSync",this.compiler||this.Compiler),this.process(t,s),qw("processSync","process",n),a;function s(o,c){n=!0,Bw(o),a=c}}run(t,n,a){Fw(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,d){const f=id(n);s.run(t,f,p);function p(b,g,v){const x=g||t;b?d(b):c?c(x):a(void 0,x,v)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),qw("runSync","run",a),s;function o(c,d){Bw(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=id(n),s=this.compiler||this.Compiler;return Bp("stringify",s),Fw(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Up("use",this.frozen),t!=null)if(typeof t=="function")f(t,n);else if(typeof t=="object")Array.isArray(t)?d(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[b,...g]=p;f(b,g)}else c(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function c(p){if(!("plugins"in p)&&!("settings"in p))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");d(p.plugins),p.settings&&(s.settings=Mp(!0,s.settings,p.settings))}function d(p){let b=-1;if(p!=null)if(Array.isArray(p))for(;++b<p.length;){const g=p[b];o(g)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,b){let g=-1,v=-1;for(;++g<a.length;)if(a[g][0]===p){v=g;break}if(v===-1)a.push([p,...b]);else if(b.length>0){let[x,...E]=b;const w=a[v][1];jm(w)&&jm(x)&&(x=Mp(!0,w,x)),a[v]=[p,x,...E]}}}}const w3=new Og().freeze();function zp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Bp(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Up(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 Fw(e){if(!jm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function qw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function id(e){return k3(e)?e:new e1(e)}function k3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function E3(e){return typeof e=="string"||S3(e)}function S3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",$w=[],Hw={allowDangerousHtml:!0},N3=/^(https?|ircs?|mailto|xmpp)$/i,C3=[{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 Dg(e){const t=T3(e),n=A3(e);return j3(t.runSync(t.parse(n),n),e)}function T3(e){const t=e.rehypePlugins||$w,n=e.remarkPlugins||$w,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Hw}:Hw;return w3().use(cL).use(n).use(i3,a).use(t)}function A3(e){const t=e.children||"",n=new e1;return typeof t=="string"&&(n.value=t),n}function j3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||O3;for(const b of C3)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+_3+b.id,void 0);return rf(e,p),GD(e,{Fragment:h.Fragment,components:s,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(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 Ap)if(Object.hasOwn(Ap,x)&&Object.hasOwn(b.properties,x)){const E=b.properties[x],w=Ap[x];(w===null||w.includes(b.tagName))&&(b.properties[x]=f(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 d&&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||N3.test(e.slice(0,t))?e:""}function Kw(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 D3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function M3(e,t,n){const s=Tc((n||{}).ignore||[]),o=R3(t);let c=-1;for(;++c<o.length;)JE(e,"text",d);function d(p,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 f(p,b)}function f(p,b){const g=b[b.length-1],v=o[c][0],x=o[c][1];let E=0;const S=g.children.indexOf(p);let _=!1,C=[];v.lastIndex=0;let T=v.exec(p.value);for(;T;){const D=T.index,B={index:T.index,input:T.input,stack:[...b,p]};let M=x(...T,B);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=D+1:(E!==D&&C.push({type:"text",value:p.value.slice(E,D)}),Array.isArray(M)?C.push(...M):M&&C.push(M),E=D+T[0].length,_=!0),!v.global)break;T=v.exec(p.value)}return _?(E<p.value.length&&C.push({type:"text",value:p.value.slice(E)}),g.children.splice(S,1,...C)):C=[p],S+C.length}}function R3(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([L3(s[0]),I3(s[1])])}return t}function L3(e){return typeof e=="string"?new RegExp(D3(e),"g"):e}function I3(e){return typeof e=="function"?e:function(){return e}}const Pp="phrasing",Fp=["autolink","link","image","label"];function z3(){return{transforms:[H3],enter:{literalAutolink:U3,literalAutolinkEmail:qp,literalAutolinkHttp:qp,literalAutolinkWww:qp},exit:{literalAutolink:$3,literalAutolinkEmail:q3,literalAutolinkHttp:P3,literalAutolinkWww:F3}}}function B3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Pp,notInConstruct:Fp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Pp,notInConstruct:Fp},{character:":",before:"[ps]",after:"\\/",inConstruct:Pp,notInConstruct:Fp}]}}function U3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function qp(e){this.config.enter.autolinkProtocol.call(this,e)}function P3(e){this.config.exit.autolinkProtocol.call(this,e)}function F3(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 q3(e){this.config.exit.autolinkEmail.call(this,e)}function $3(e){this.exit(e)}function H3(e){M3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,K3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),G3]],{ignore:["link","linkReference"]})}function K3(e,t,n,a,s){let o="";if(!t1(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Q3(n)))return!1;const c=Y3(n+a);if(!c[0])return!1;const d={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[d,{type:"text",value:c[1]}]:d}function G3(e,t,n,a){return!t1(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Q3(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 Y3(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=Kw(e,"(");let o=Kw(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 t1(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fs(n)||ef(n))&&(!t||n!==47)}n1.peek=iI;function V3(){this.buffer()}function W3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function X3(){this.buffer()}function Z3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function J3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ii(this.sliceSerialize(e)).toLowerCase(),n.label=t}function eI(e){this.exit(e)}function tI(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ii(this.sliceSerialize(e)).toLowerCase(),n.label=t}function nI(e){this.exit(e)}function iI(){return"["}function n1(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),d=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),d(),c(),o+=s.move("]"),o}function aI(){return{enter:{gfmFootnoteCallString:V3,gfmFootnoteCall:W3,gfmFootnoteDefinitionLabelString:X3,gfmFootnoteDefinition:Z3},exit:{gfmFootnoteCallString:J3,gfmFootnoteCall:eI,gfmFootnoteDefinitionLabelString:tI,gfmFootnoteDefinition:nI}}}function rI(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:n1},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const d=o.createTracker(c);let f=d.move("[^");const p=o.enter("footnoteDefinition"),b=o.enter("label");return f+=d.move(o.safe(o.associationId(a),{before:f,after:"]"})),b(),f+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),f+=d.move((t?`
535
+ `:" ")+o.indentLines(o.containerFlow(a,d.current()),t?i1:sI))),p(),f}}function sI(e,t,n){return t===0?e:i1(e,t,n)}function i1(e,t,n){return(n?"":" ")+e}const lI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];a1.peek=fI;function oI(){return{canContainEols:["delete"],enter:{strikethrough:uI},exit:{strikethrough:dI}}}function cI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lI}],handlers:{delete:a1}}}function uI(e){this.enter({type:"delete",children:[]},e)}function dI(e){this.exit(e)}function a1(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 fI(){return"~"}function hI(e){return e.length}function pI(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||hI,o=[],c=[],d=[],f=[];let p=0,b=-1;for(;++b<e.length;){const w=[],S=[];let _=-1;for(e[b].length>p&&(p=e[b].length);++_<e[b].length;){const C=mI(e[b][_]);if(n.alignDelimiters!==!1){const T=s(C);S[_]=T,(f[_]===void 0||T>f[_])&&(f[_]=T)}w.push(C)}c[b]=w,d[b]=S}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<p;)o[g]=Gw(a[g]);else{const w=Gw(a);for(;++g<p;)o[g]=w}g=-1;const v=[],x=[];for(;++g<p;){const w=o[g];let S="",_="";w===99?(S=":",_=":"):w===108?S=":":w===114&&(_=":");let C=n.alignDelimiters===!1?1:Math.max(1,f[g]-S.length-_.length);const T=S+"-".repeat(C)+_;n.alignDelimiters!==!1&&(C=S.length+C+_.length,C>f[g]&&(f[g]=C),x[g]=C),v[g]=T}c.splice(1,0,v),d.splice(1,0,x),b=-1;const E=[];for(;++b<c.length;){const w=c[b],S=d[b];g=-1;const _=[];for(;++g<p;){const C=w[g]||"";let T="",D="";if(n.alignDelimiters!==!1){const B=f[g]-(S[g]||0),M=o[g];M===114?T=" ".repeat(B):M===99?B%2?(T=" ".repeat(B/2+.5),D=" ".repeat(B/2-.5)):(T=" ".repeat(B/2),D=T):D=" ".repeat(B)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(T),_.push(C),n.alignDelimiters!==!1&&_.push(D),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==p-1)&&_.push("|")}E.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return E.join(`
536
+ `)}function mI(e){return e==null?"":String(e)}function Gw(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 gI(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()),bI);return s(),c}function bI(e,t,n){return">"+(n?"":" ")+e}function yI(e,t){return Qw(e,t.inConstruct,!0)&&!Qw(e,t.notInConstruct,!1)}function Qw(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 Yw(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
537
+ `&&yI(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
538
+ `}function xI(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 vI(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 wI(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 kI(e,t,n,a){const s=wI(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(vI(e,n)){const g=n.enter("codeIndented"),v=n.indentLines(o,EI);return g(),v}const d=n.createTracker(a),f=s.repeat(Math.max(xI(o,s)+1,3)),p=n.enter("codeFenced");let b=d.move(f);if(e.lang){const g=n.enter(`codeFencedLang${c}`);b+=d.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...d.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);b+=d.move(" "),b+=d.move(n.safe(e.meta,{before:b,after:`
539
+ `,encode:["`"],...d.current()})),g()}return b+=d.move(`
540
+ `),o&&(b+=d.move(o+`
541
+ `)),b+=d.move(f),p(),b}function EI(e,t,n){return(n?"":" ")+e}function Mg(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 SI(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let d=n.enter("label");const f=n.createTracker(a);let p=f.move("[");return p+=f.move(n.safe(n.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":`
542
+ `,...f.current()}))),d(),e.title&&(d=n.enter(`title${o}`),p+=f.move(" "+s),p+=f.move(n.safe(e.title,{before:p,after:s,...f.current()})),p+=f.move(s),d()),c(),p}function _I(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 hc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function jd(e,t,n){const a=Dl(e),s=Dl(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}}r1.peek=NI;function r1(e,t,n,a){const s=_I(n),o=n.enter("emphasis"),c=n.createTracker(a),d=c.move(s);let f=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const p=f.charCodeAt(0),b=jd(a.before.charCodeAt(a.before.length-1),p,s);b.inside&&(f=hc(p)+f.slice(1));const g=f.charCodeAt(f.length-1),v=jd(a.after.charCodeAt(0),g,s);v.inside&&(f=f.slice(0,-1)+hc(g));const x=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},d+f+x}function NI(e,t,n){return n.options.emphasis||"*"}function CI(e,t){let n=!1;return rf(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Tm}),!!((!e.depth||e.depth<3)&&Sg(e)&&(t.options.setext||n))}function TI(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(CI(e,n)){const b=n.enter("headingSetext"),g=n.enter("phrasing"),v=n.containerPhrasing(e,{...o.current(),before:`
543
+ `,after:`
544
+ `});return g(),b(),v+`
545
+ `+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
546
+ `))+1))}const c="#".repeat(s),d=n.enter("headingAtx"),f=n.enter("phrasing");o.move(c+" ");let p=n.containerPhrasing(e,{before:"# ",after:`
547
+ `,...o.current()});return/^[\t ]/.test(p)&&(p=hc(p.charCodeAt(0))+p.slice(1)),p=p?c+" "+p:c,n.options.closeAtx&&(p+=" "+c),f(),d(),p}s1.peek=AI;function s1(e){return e.value||""}function AI(){return"<"}l1.peek=jI;function l1(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let d=n.enter("label");const f=n.createTracker(a);let p=f.move("![");return p+=f.move(n.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(n.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=n.enter("destinationRaw"),p+=f.move(n.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=n.enter(`title${o}`),p+=f.move(" "+s),p+=f.move(n.safe(e.title,{before:p,after:s,...f.current()})),p+=f.move(s),d()),p+=f.move(")"),c(),p}function jI(){return"!"}o1.peek=OI;function o1(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const d=n.createTracker(a);let f=d.move("![");const p=n.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return c(),n.stack=b,o(),s==="full"||!p||p!==g?f+=d.move(g+"]"):s==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function OI(){return"!"}c1.peek=DI;function c1(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],d=n.compilePattern(c);let f;if(c.atBreak)for(;f=d.exec(a);){let p=f.index;a.charCodeAt(p)===10&&a.charCodeAt(p-1)===13&&p--,a=a.slice(0,p)+" "+a.slice(f.index+1)}}return s+a+s}function DI(){return"`"}function u1(e,t){const n=Sg(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))}d1.peek=MI;function d1(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let d,f;if(u1(e,n)){const b=n.stack;n.stack=[],d=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),d(),n.stack=b,g}d=n.enter("link"),f=n.enter("label");let p=c.move("[");return p+=c.move(n.containerPhrasing(e,{before:p,after:"](",...c.current()})),p+=c.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),p+=c.move("<"),p+=c.move(n.safe(e.url,{before:p,after:">",...c.current()})),p+=c.move(">")):(f=n.enter("destinationRaw"),p+=c.move(n.safe(e.url,{before:p,after:e.title?" ":")",...c.current()}))),f(),e.title&&(f=n.enter(`title${o}`),p+=c.move(" "+s),p+=c.move(n.safe(e.title,{before:p,after:s,...c.current()})),p+=c.move(s),f()),p+=c.move(")"),d(),p}function MI(e,t,n){return u1(e,n)?"<":"["}f1.peek=RI;function f1(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const d=n.createTracker(a);let f=d.move("[");const p=n.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:f,after:"]",...d.current()});return c(),n.stack=b,o(),s==="full"||!p||p!==g?f+=d.move(g+"]"):s==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function RI(){return"["}function Rg(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 LI(e){const t=Rg(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 II(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 h1(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 zI(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?II(n):Rg(n);const d=e.ordered?c==="."?")":".":LI(n);let f=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&&(f=!0),h1(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"){f=!0;break}}}}f&&(c=d),n.bulletCurrent=c;const p=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),p}function BI(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 UI(e,t,n,a){const s=BI(n);let o=n.bulletCurrent||Rg(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 d=n.createTracker(a);d.move(o+" ".repeat(c-o.length)),d.shift(c);const f=n.enter("listItem"),p=n.indentLines(n.containerFlow(e,d.current()),b);return f(),p;function b(g,v,x){return v?(x?"":" ".repeat(c))+g:(x?o:o+" ".repeat(c-o.length))+g}}function PI(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const FI=Tc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function qI(e,t,n,a){return(e.children.some(function(c){return FI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function $I(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}p1.peek=HI;function p1(e,t,n,a){const s=$I(n),o=n.enter("strong"),c=n.createTracker(a),d=c.move(s+s);let f=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const p=f.charCodeAt(0),b=jd(a.before.charCodeAt(a.before.length-1),p,s);b.inside&&(f=hc(p)+f.slice(1));const g=f.charCodeAt(f.length-1),v=jd(a.after.charCodeAt(0),g,s);v.inside&&(f=f.slice(0,-1)+hc(g));const x=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},d+f+x}function HI(e,t,n){return n.options.strong||"*"}function KI(e,t,n,a){return n.safe(e.value,a)}function GI(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 QI(e,t,n){const a=(h1(n)+(n.options.ruleSpaces?" ":"")).repeat(GI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const m1={blockquote:gI,break:Yw,code:kI,definition:SI,emphasis:r1,hardBreak:Yw,heading:TI,html:s1,image:l1,imageReference:o1,inlineCode:c1,link:d1,linkReference:f1,list:zI,listItem:UI,paragraph:PI,root:qI,strong:p1,text:KI,thematicBreak:QI};function YI(){return{enter:{table:VI,tableData:Vw,tableHeader:Vw,tableRow:XI},exit:{codeText:ZI,table:WI,tableData:$p,tableHeader:$p,tableRow:$p}}}function VI(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 WI(e){this.exit(e),this.data.inTable=void 0}function XI(e){this.enter({type:"tableRow",children:[]},e)}function $p(e){this.exit(e)}function Vw(e){this.enter({type:"tableCell",children:[]},e)}function ZI(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,JI));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function JI(e,t){return t==="|"?t:e}function ez(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
548
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:f,tableRow:d}};function c(x,E,w,S){return p(b(x,w,S),x.align)}function d(x,E,w,S){const _=g(x,w,S),C=p([_]);return C.slice(0,C.indexOf(`
549
+ `))}function f(x,E,w,S){const _=w.enter("tableCell"),C=w.enter("phrasing"),T=w.containerPhrasing(x,{...S,before:o,after:o});return C(),_(),T}function p(x,E){return pI(x,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function b(x,E,w){const S=x.children;let _=-1;const C=[],T=E.enter("table");for(;++_<S.length;)C[_]=g(S[_],E,w);return T(),C}function g(x,E,w){const S=x.children;let _=-1;const C=[],T=E.enter("tableRow");for(;++_<S.length;)C[_]=f(S[_],x,E,w);return T(),C}function v(x,E,w){let S=m1.inlineCode(x,E,w);return w.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function tz(){return{exit:{taskListCheckValueChecked:Ww,taskListCheckValueUnchecked:Ww,paragraph:iz}}}function nz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:az}}}function Ww(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function iz(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 d=s[o];if(d.type==="paragraph"){c=d;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 az(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",d=n.createTracker(a);o&&d.move(c);let f=m1.listItem(e,t,n,{...a,...d.current()});return o&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(b){return b+c}}function rz(){return[z3(),aI(),oI(),YI(),tz()]}function sz(e){return{extensions:[B3(),rI(e),cI(),ez(e),nz()]}}const lz={tokenize:hz,partial:!0},g1={tokenize:pz,partial:!0},b1={tokenize:mz,partial:!0},y1={tokenize:gz,partial:!0},oz={tokenize:bz,partial:!0},x1={name:"wwwAutolink",tokenize:dz,previous:w1},v1={name:"protocolAutolink",tokenize:fz,previous:k1},Da={name:"emailAutolink",tokenize:uz,previous:E1},ta={};function cz(){return{text:ta}}let Wr=48;for(;Wr<123;)ta[Wr]=Da,Wr++,Wr===58?Wr=65:Wr===91&&(Wr=97);ta[43]=Da;ta[45]=Da;ta[46]=Da;ta[95]=Da;ta[72]=[Da,v1];ta[104]=[Da,v1];ta[87]=[Da,x1];ta[119]=[Da,x1];function uz(e,t,n){const a=this;let s,o;return c;function c(g){return!Dm(g)||!E1.call(a,a.previous)||Lg(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(g))}function d(g){return Dm(g)?(e.consume(g),d):g===64?(e.consume(g),f):n(g)}function f(g){return g===46?e.check(oz,b,p)(g):g===45||g===95||vn(g)?(o=!0,e.consume(g),f):b(g)}function p(g){return e.consume(g),s=!0,f}function b(g){return o&&s&&On(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function dz(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!w1.call(a,a.previous)||Lg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lz,e.attempt(g1,e.attempt(b1,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function fz(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&k1.call(a,a.previous)&&!Lg(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),d):n(g)}function d(g){if(On(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),d;if(g===58){const v=s.toLowerCase();if(v==="http"||v==="https")return e.consume(g),f}return n(g)}function f(g){return g===47?(e.consume(g),o?p:(o=!0,f)):n(g)}function p(g){return g===null||Cd(g)||kt(g)||fs(g)||ef(g)?n(g):e.attempt(g1,e.attempt(b1,b),n)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function hz(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 pz(e,t,n){let a,s,o;return c;function c(p){return p===46||p===95?e.check(y1,f,d)(p):p===null||kt(p)||fs(p)||p!==45&&ef(p)?f(p):(o=!0,e.consume(p),c)}function d(p){return p===95?a=!0:(s=a,a=void 0),e.consume(p),c}function f(p){return s||a||!o?n(p):t(p)}}function mz(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(y1,t,o)(c):c===null||kt(c)||fs(c)?t(c):(e.consume(c),s)}function o(c){return c===41&&a++,e.consume(c),s}}function gz(e,t,n){return a;function a(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),a):d===38?(e.consume(d),o):d===93?(e.consume(d),s):d===60||d===null||kt(d)||fs(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||kt(d)||fs(d)?t(d):a(d)}function o(d){return On(d)?c(d):n(d)}function c(d){return d===59?(e.consume(d),a):On(d)?(e.consume(d),c):n(d)}}function bz(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return vn(o)?n(o):t(o)}}function w1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||kt(e)}function k1(e){return!On(e)}function E1(e){return!(e===47||Dm(e))}function Dm(e){return e===43||e===45||e===46||e===95||vn(e)}function Lg(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 yz={tokenize:Nz,partial:!0};function xz(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Ez,continuation:{tokenize:Sz},exit:_z}},text:{91:{name:"gfmFootnoteCall",tokenize:kz},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:vz,resolveTo:wz}}}}function vz(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const f=a.events[s][1];if(f.type==="labelImage"){c=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!c||!c._balanced)return n(f);const p=Ii(a.sliceSerialize({start:c.end,end:a.now()}));return p.codePointAt(0)!==94||!o.includes(p.slice(1))?n(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function wz(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)},d=[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,...d),e}function kz(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return d;function d(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),f}function f(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(g){if(o>999||g===93&&!c||g===null||g===91||kt(g))return n(g);if(g===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return s.includes(Ii(a.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(g)}return kt(g)||(c=!0),o++,e.consume(g),g===92?b:p}function b(g){return g===91||g===92||g===93?(e.consume(g),o++,p):p(g)}}function Ez(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,d;return f;function f(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(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&&!d||E===null||E===91||kt(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Ii(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return kt(E)||(d=!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),at(e,x,"gfmFootnoteDefinitionWhitespace")):n(E)}function x(E){return t(E)}}function Sz(e,t,n){return e.check(Cc,t,e.attempt(yz,t,n))}function _z(e){e.exit("gfmFootnoteDefinition")}function Nz(e,t,n){const a=this;return at(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 Cz(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,d){let f=-1;for(;++f<c.length;)if(c[f][0]==="enter"&&c[f][1].type==="strikethroughSequenceTemporary"&&c[f][1]._close){let p=f;for(;p--;)if(c[p][0]==="exit"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._open&&c[f][1].end.offset-c[f][1].start.offset===c[p][1].end.offset-c[p][1].start.offset){c[f][1].type="strikethroughSequence",c[p][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[p][1].start),end:Object.assign({},c[f][1].end)},g={type:"strikethroughText",start:Object.assign({},c[p][1].end),end:Object.assign({},c[f][1].start)},v=[["enter",b,d],["enter",c[p][1],d],["exit",c[p][1],d],["enter",g,d]],x=d.parser.constructs.insideSpan.null;x&&li(v,v.length,0,tf(x,c.slice(p+1,f),d)),li(v,v.length,0,[["exit",g,d],["enter",c[f][1],d],["exit",c[f][1],d],["exit",b,d]]),li(c,p-1,f-p+3,v),f=p+v.length-2;break}}for(f=-1;++f<c.length;)c[f][1].type==="strikethroughSequenceTemporary"&&(c[f][1].type="data");return c}function o(c,d,f){const p=this.previous,b=this.events;let g=0;return v;function v(E){return p===126&&b[b.length-1][1].type!=="characterEscape"?f(E):(c.enter("strikethroughSequenceTemporary"),x(E))}function x(E){const w=Dl(p);if(E===126)return g>1?f(E):(c.consume(E),g++,x);if(g<2&&!n)return f(E);const S=c.exit("strikethroughSequenceTemporary"),_=Dl(E);return S._open=!_||_===2&&!!w,S._close=!w||w===2&&!!_,d(E)}}}class Tz{constructor(){this.map=[]}add(t,n,a){Az(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 Az(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 jz(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:Dz,resolveAll:Mz}}}}function Dz(e,t,n){const a=this;let s=0,o=0,c;return d;function d(U){let X=a.events.length-1;for(;X>-1;){const ue=a.events[X][1].type;if(ue==="lineEnding"||ue==="linePrefix")X--;else break}const J=X>-1?a.events[X][1].type:null,pe=J==="tableHead"||J==="tableRow"?M:f;return pe===M&&a.parser.lazy[a.now().line]?n(U):pe(U)}function f(U){return e.enter("tableHead"),e.enter("tableRow"),p(U)}function p(U){return U===124||(c=!0,o+=1),b(U)}function b(U){return U===null?n(U):De(U)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(U),e.exit("lineEnding"),x):n(U):Xe(U)?at(e,b,"whitespace")(U):(o+=1,c&&(c=!1,s+=1),U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(U)))}function g(U){return U===null||U===124||kt(U)?(e.exit("data"),b(U)):(e.consume(U),U===92?v:g)}function v(U){return U===92||U===124?(e.consume(U),g):g(U)}function x(U){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(U):(e.enter("tableDelimiterRow"),c=!1,Xe(U)?at(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):E(U))}function E(U){return U===45||U===58?S(U):U===124?(c=!0,e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),w):B(U)}function w(U){return Xe(U)?at(e,S,"whitespace")(U):S(U)}function S(U){return U===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),_):U===45?(o+=1,_(U)):U===null||De(U)?D(U):B(U)}function _(U){return U===45?(e.enter("tableDelimiterFiller"),C(U)):B(U)}function C(U){return U===45?(e.consume(U),C):U===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(U),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(U))}function T(U){return Xe(U)?at(e,D,"whitespace")(U):D(U)}function D(U){return U===124?E(U):U===null||De(U)?!c||s!==o?B(U):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(U)):B(U)}function B(U){return n(U)}function M(U){return e.enter("tableRow"),q(U)}function q(U){return U===124?(e.enter("tableCellDivider"),e.consume(U),e.exit("tableCellDivider"),q):U===null||De(U)?(e.exit("tableRow"),t(U)):Xe(U)?at(e,q,"whitespace")(U):(e.enter("data"),F(U))}function F(U){return U===null||U===124||kt(U)?(e.exit("data"),q(U)):(e.consume(U),U===92?ee:F)}function ee(U){return U===92||U===124?(e.consume(U),F):F(U)}}function Mz(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,f=0,p,b,g;const v=new Tz;for(;++n<e.length;){const x=e[n],E=x[1];x[0]==="enter"?E.type==="tableHead"?(d=!1,f!==0&&(Xw(v,t,f,p,b),b=void 0,f=0),p={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},v.add(n,0,[["enter",p,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,g=void 0,o=[0,0,0,0],c=[0,n+1,0,0],d&&(d=!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=ad(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=ad(v,t,o,s,void 0,g)),o=c,c=[o[1],n,0,0])):E.type==="tableHead"?(d=!0,f=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(f=n,o[1]!==0?(c[0]=c[1],g=ad(v,t,o,s,n,g)):c[1]!==0&&(g=ad(v,t,c,s,n,g)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(f!==0&&Xw(v,t,f,p,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=jz(t.events,n))}return e}function ad(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",d="tableContent";n[0]!==0&&(o.end=Object.assign({},ll(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const f=ll(t.events,n[1]);if(o={type:c,start:Object.assign({},f),end:Object.assign({},f)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const p=ll(t.events,n[2]),b=ll(t.events,n[3]),g={type:d,start:Object.assign({},p),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({},ll(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function Xw(e,t,n,a,s){const o=[],c=ll(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 ll(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const Rz={name:"tasklistCheck",tokenize:Iz};function Lz(){return{text:{91:Rz}}}function Iz(e,t,n){const a=this;return s;function s(f){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),o)}function o(f){return kt(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),c):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),c):n(f)}function c(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(f)}function d(f){return De(f)?t(f):Xe(f)?e.check({tokenize:zz},t,n)(f):n(f)}}function zz(e,t,n){return at(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function Bz(e){return RE([cz(),xz(),Cz(e),Oz(),Lz()])}const Uz={};function Ig(e){const t=this,n=e||Uz,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(Bz(n)),o.push(rz()),c.push(sz(n))}const Zw=(function(e,t,n){const a=Tc(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]}),bs=(function(e){if(e==null)return qz;if(typeof e=="string")return Fz(e);if(typeof e=="object")return Pz(e);if(typeof e=="function")return zg(e);throw new Error("Expected function, string, or array as `test`")});function Pz(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=bs(e[n]);return zg(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function Fz(e){return zg(t);function t(n){return n.tagName===e}}function zg(e){return t;function t(n,a,s){return!!($z(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function qz(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function $z(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const Jw=/\n/g,e0=/[\t ]+/g,Mm=bs("br"),t0=bs(Xz),Hz=bs("p"),n0=bs("tr"),Kz=bs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Wz,Zz]),S1=bs(["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 Gz(e,t){const n=t||{},a="children"in e?e.children:[],s=S1(e),o=C1(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...N1(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(..._1(a[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<a.length-1?Mm(a[d+1]):s}));const f=[];let p;for(d=-1;++d<c.length;){const b=c[d];typeof b=="number"?p!==void 0&&b>p&&(p=b):b&&(p!==void 0&&p>-1&&f.push(`
550
+ `.repeat(p)||" "),p=-1,f.push(b))}return f.join("")}function _1(e,t,n){return e.type==="element"?Qz(e,t,n):e.type==="text"?n.whitespace==="normal"?N1(e,n):Yz(e):[]}function Qz(e,t,n){const a=C1(e,n),s=e.children||[];let o=-1,c=[];if(Kz(e))return c;let d,f;for(Mm(e)||n0(e)&&Zw(t,e,n0)?f=`
551
+ `:Hz(e)?(d=2,f=2):S1(e)&&(d=1,f=1);++o<s.length;)c=c.concat(_1(s[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<s.length-1?Mm(s[o+1]):f}));return t0(e)&&Zw(t,e,t0)&&c.push(" "),d&&c.unshift(d),f&&c.push(f),c}function N1(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){Jw.lastIndex=o;const f=Jw.exec(n),p=f&&"index"in f?f.index:n.length;a.push(Vz(n.slice(o,p).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,p===n.length?t.breakAfter:!0)),o=p+1}let c=-1,d;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]),d=void 0):a[c]?(typeof d=="number"&&s.push(d),s.push(a[c]),d=0):(c===0||c===a.length-1)&&s.push(0);return s}function Yz(e){return[String(e.value)]}function Vz(e,t,n){const a=[];let s=0,o;for(;s<e.length;){e0.lastIndex=s;const c=e0.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 C1(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 Wz(e){return!!(e.properties||{}).hidden}function Xz(e){return e.tagName==="td"||e.tagName==="th"}function Zz(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function Jz(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("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={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(p,{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"],S=["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"],D={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},B={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[B,g,d,n,e.C_BLOCK_COMMENT_MODE,b,p],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,b,d,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,F,B,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:D,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function e4(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=Jz(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 t4(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"})]}},d={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(d);const f={match:/\\"/},p={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"],S=["true","false"],_={match:/(\/[a-z._-]+)+/},C=["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"],D=["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"],B=["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:S,built_in:[...C,...T,"set","shopt",...D,...B]},contains:[x,e.SHEBANG(),E,g,o,c,_,d,f,p,b,n]}}function n4(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("<[^<>]+>")+")",d={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},p={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(p,{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*\\(",S={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,d,n,e.C_BLOCK_COMMENT_MODE,b,p],C={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:S,contains:_.concat([{begin:/\(/,end:/\)/,keywords:S,contains:_.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:S,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:S,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(v,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,b,d,{begin:/\(/,end:/\)/,keywords:S,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:S,disableAutodetect:!0,illegal:"</",contains:[].concat(C,T,_,[g,{begin:e.IDENT_RE+"::",keywords:S},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:p,keywords:S}}}function i4(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("<[^<>]+>")+")",d={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},p={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(p,{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"],S=["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"],D={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:S},B={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[B,g,d,n,e.C_BLOCK_COMMENT_MODE,b,p],q={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:D,contains:M.concat([{begin:/\(/,end:/\)/,keywords:D,contains:M.concat(["self"]),relevance:0}]),relevance:0},F={className:"function",begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:D,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:D,relevance:0},{begin:x,returnBegin:!0,contains:[v],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[p,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,p,b,d,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,p,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:D,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(q,F,B,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:D,contains:["self",d]},{begin:e.IDENT_RE+"::",keywords:D},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function a4(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},d=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),f={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},p={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]},S=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});v.contains=[w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.C_BLOCK_COMMENT_MODE],x.contains=[S,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,f,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[p,w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},C={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",D={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"}},_,f,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},d,C,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[d,C,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,C],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[_,f,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},D]}}const r4=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_-]*/}}),s4=["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"],l4=["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"],o4=[...s4,...l4],c4=["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(),u4=["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(),d4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),f4=["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 h4(e){const t=e.regex,n=r4(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_-]*",d=[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:":("+u4.join("|")+")"},{begin:":(:)?("+d4.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+f4.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...d,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...d,{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:c4.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...d,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+o4.join("|")+")\\b"}]}}function p4(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 m4(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 g4(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 b4(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:"'"}]},d={begin:/\[/,end:/\]/,contains:[a,o,s,c,n,"self"],relevance:0},f=/[A-Za-z0-9_-]+/,p=/"(\\"|[^"])*"/,b=/'[^']*'/,g=t.either(f,p,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,d,o,s,c,n]}}]}}var ol="[0-9](_*[0-9])*",rd=`\\.(${ol})`,sd="[0-9a-fA-F](_*[0-9a-fA-F])*",i0={className:"number",variants:[{begin:`(\\b(${ol})((${rd})|\\.)?|(${rd}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${rd})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${rd})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${sd})\\.?|(${sd})?\\.(${sd}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sd})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function T1(e,t,n){return n===-1?"":e.replace(t,a=>T1(e,t,n-1))}function y4(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+T1("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),f={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"]},p={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:f,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:f,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:f,relevance:0,contains:[p,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,i0,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},i0,p]}}const a0="[A-Za-z$_][0-9A-Za-z$_]*",x4=["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"],v4=["true","false","null","undefined","NaN","Infinity"],A1=["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"],j1=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],O1=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],w4=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],k4=[].concat(O1,A1,j1);function E4(e){const t=e.regex,n=(de,{after:re})=>{const O="</"+de[0].slice(1);return de.input.indexOf(O,re)!==-1},a=a0,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(de,re)=>{const O=de[0].length+de.index,R=de.input[O];if(R==="<"||R===","){re.ignoreMatch();return}R===">"&&(n(de,{after:O})||re.ignoreMatch());let Q;const j=de.input.substring(O);if(Q=j.match(/^\s*=/)){re.ignoreMatch();return}if((Q=j.match(/^\s+extends\s+/))&&Q.index===0){re.ignoreMatch();return}}},d={$pattern:a0,keyword:x4,literal:v4,built_in:k4,"variable.language":w4},f="[0-9](_?[0-9])*",p=`\\.(${f})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${f})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\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:d,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"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},C={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,S,{match:/\$\d+/},g];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(T)});const D=[].concat(C,v.contains),B=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:B},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"}}]},F={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:{_:[...A1,...j1]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},X={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(de){return t.concat("(?!",de.join("|"),")")}const pe={match:t.concat(/\b/,J([...O1,"super","import"].map(de=>`${de}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,S,C,{match:/\$\d+/},g,F,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ce,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:$,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:d,contains:B}]}]},{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"]}]}]},U,{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},ue,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},pe,X,q,te,{match:/\$[(.]/}]}}function S4(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 cl="[0-9](_*[0-9])*",ld=`\\.(${cl})`,od="[0-9a-fA-F](_*[0-9a-fA-F])*",_4={className:"number",variants:[{begin:`(\\b(${cl})((${ld})|\\.)?|(${ld}))[eE][+-]?(${cl})[fFdD]?\\b`},{begin:`\\b(${cl})((${ld})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${ld})[fFdD]?\\b`},{begin:`\\b(${cl})[fFdD]\\b`},{begin:`\\b0[xX]((${od})\\.?|(${od})?\\.(${od}))[pP][+-]?(${cl})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${od})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function N4(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 d={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},f={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},p=_4,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,d,f,{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,d,f,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},d,f]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
552
+ `},p]}}const C4=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_-]*/}}),T4=["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"],A4=["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"],j4=[...T4,...A4],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(),D1=["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(),M1=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),D4=["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(),M4=D1.concat(M1).sort().reverse();function R4(e){const t=C4(e),n=M4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],d=[],f=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},p=function(T,D,B){return{className:T,begin:D,relevance:B}},b={$pattern:/[a-z-]+/,keyword:a,attribute:O4.join(" ")},g={begin:"\\(",end:"\\)",contains:d,keywords:b,relevance:0};d.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,f("'"),f('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,p("variable","@@?"+s,10),p("variable","@\\{"+s+"\\}"),p("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const v=d.concat({begin:/\{/,end:/\}/,contains:c}),x={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(d)},E={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+D4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:d}}]},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:d,relevance:0}},S={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,p("keyword","all\\b"),p("variable","@\\{"+s+"\\}"),{begin:"\\b("+j4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,p("selector-tag",o,0),p("selector-id","#"+o),p("selector-class","\\."+o,0),p("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+D1.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+M1.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:v},{begin:"!important"},t.FUNCTION_DISPATCH]},C={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,S,C,E,_,x,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function L4(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 I4(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 z4(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}]},d=/[A-Za-z][A-Za-z0-9+.-]*/,f={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,d,/:\/\/.*?\)/),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}]},p={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(p,{contains:[]}),v=e.inherit(b,{contains:[]});p.contains.push(v),b.contains.push(g);let x=[n,f];return[p,b,g,v].forEach(_=>{_.contains=_.contains.concat(x)}),x=x.concat(p,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,p,b,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},s,a,f,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function B4(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_]*/,d={"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"]},f={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:d,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:"("+f.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:f,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function U4(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:/\}/},d={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},f={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[d]},p={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,f],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],v=(w,S,_="\\1")=>{const C=_==="\\1"?_:t.concat(_,S);return t.concat(t.concat("(?:",w,")"),S,/(?:\\.|[^\\\/])*?/,C,/(?:\\.|[^\\\/])*?/,_,a)},x=(w,S,_)=>t.concat(t.concat("(?:",w,")"),S,/(?:\\.|[^\\\/])*?/,_,a),E=[f,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}]},p,{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,d]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,d,p]},{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 P4(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},d={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},f={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},p=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(f)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(f),"on:begin":(ue,te)=>{te.data._beginMatch=ue[1]||ue[2]},"on:end":(ue,te)=>{te.data._beginMatch!==ue[1]&&te.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
553
+ ]`,E={scope:"string",variants:[b,p,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},S=["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"],C=["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"],D={keyword:_,literal:(ue=>{const te=[];return ue.forEach($=>{te.push($),$.toLowerCase()===$?te.push($.toUpperCase()):te.push($.toLowerCase())}),te})(S),built_in:C},B=ue=>ue.map(te=>te.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",B(C).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},q=t.concat(a,"\\b(?!\\()"),F={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"}}]},ee={scope:"attr",match:t.concat(a,t.lookahead(":"),t.lookahead(/(?!::)/))},U={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[ee,c,F,e.C_BLOCK_COMMENT_MODE,E,w,M]},X={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",B(_).join("\\b|"),"|",B(C).join("\\b|"),"\\b)"),a,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[U]};U.contains.push(X);const J=[ee,F,e.C_BLOCK_COMMENT_MODE,E,w,M],pe={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:S,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:S,keyword:["new","array"]},contains:["self",...J]},...J,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[pe,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}]}},d,{scope:"variable.language",match:/\$this\b/},c,X,F,{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:D,contains:["self",pe,c,F,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 F4(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 q4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function $4(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"],d={$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"]},f={className:"meta",begin:/^(>>>|\.\.\.) /},p={className:"subst",begin:/\{/,end:/\}/,keywords:d,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,f],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,f,b,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,f,b,p]},{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,p]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,p]},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})`}]},S={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",f,w,g,e.HASH_COMMENT_MODE]}]};return p.contains=[g,w,f],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[f,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,S,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 H4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function K4(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 G4(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"]},d={className:"doctag",begin:"@[A-Za-z]+"},f={begin:"#<",end:">"},p=[e.COMMENT("#","$",{contains:[d]}),e.COMMENT("^=begin","^=end",{contains:[d],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(f,p),relevance:0}].concat(f,p);b.contains=M,w.contains=M;const U=[{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 p.unshift(f),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(U).concat(p).concat(M)}}function Q4(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))?",d=["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"],f=["true","false","Some","None","Ok","Err"],p=["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:d,literal:f,built_in:p},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:p,type:b}},{className:"punctuation",begin:"->"},o]}}const Y4=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_-]*/}}),V4=["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"],W4=["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"],X4=[...V4,...W4],Z4=["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(),J4=["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(),eB=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),tB=["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 nB(e){const t=Y4(e),n=eB,a=J4,s="@[a-z-]+",o="and or not only",d={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("+X4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},d,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+tB.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,d,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:Z4.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},d,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function iB(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function aB(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"],d=["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"],f=["add","asc","collation","desc","final","first","last","view"],p=["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=[...p,...f].filter(B=>!b.includes(B)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},S={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function C(B){return t.concat(/\b/,t.either(...B.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:C(v),relevance:0};function D(B,{exceptions:M,when:q}={}){const F=q;return M=M||[],B.map(ee=>ee.match(/\|\d+$/)||M.includes(ee)?ee:F(ee)?`${ee}|0`:ee)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(E,{when:B=>B.length<3}),literal:o,type:d,built_in:g},contains:[{scope:"type",match:C(c)},T,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,S]}}function R1(e){return e?typeof e=="string"?e:e.source:null}function Wo(e){return xt("(?=",e,")")}function xt(...e){return e.map(n=>R1(n)).join("")}function rB(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function Tn(...e){return"("+(rB(e).capture?"":"?:")+e.map(a=>R1(a)).join("|")+")"}const Bg=e=>xt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),sB=["Protocol","Type"].map(Bg),r0=["init","self"].map(Bg),lB=["Any","Self"],Hp=["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"],s0=["false","nil","true"],oB=["assignment","associativity","higherThan","left","lowerThan","none","right"],cB=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],l0=["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"],L1=Tn(/[/=\-+!*%<>&|^~?]/,/[\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]/),I1=Tn(L1,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Kp=xt(L1,I1,"*"),z1=Tn(/[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]/),Od=Tn(z1,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Yi=xt(z1,Od,"*"),cd=xt(/[A-Z]/,Od,"*"),uB=["attached","autoclosure",xt(/convention\(/,Tn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",xt(/objc\(/,Yi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],dB=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function fB(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,Tn(...sB,...r0)],className:{2:"keyword"}},o={match:xt(/\./,Tn(...Hp)),relevance:0},c=Hp.filter(tt=>typeof tt=="string").concat(["_|0"]),d=Hp.filter(tt=>typeof tt!="string").concat(lB).map(Bg),f={variants:[{className:"keyword",match:Tn(...d,...r0)}]},p={$pattern:Tn(/\b\w+/,/#\w+/),keyword:c.concat(cB),literal:s0},b=[s,o,f],g={match:xt(/\./,Tn(...l0)),relevance:0},v={className:"built_in",match:xt(/\b/,Tn(...l0),/(?=\()/)},x=[g,v],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Kp},{match:`\\.(\\.|${I1})+`}]},S=[E,w],_="([0-9]_*)+",C="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${C})(\\.(${C}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(tt="")=>({className:"subst",variants:[{match:xt(/\\/,tt,/[0\\tnr"']/)},{match:xt(/\\/,tt,/u\{[0-9a-fA-F]{1,8}\}/)}]}),B=(tt="")=>({className:"subst",match:xt(/\\/,tt,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(tt="")=>({className:"subst",label:"interpol",begin:xt(/\\/,tt,/\(/),end:/\)/}),q=(tt="")=>({begin:xt(tt,/"""/),end:xt(/"""/,tt),contains:[D(tt),B(tt),M(tt)]}),F=(tt="")=>({begin:xt(tt,/"/),end:xt(/"/,tt),contains:[D(tt),M(tt)]}),ee={className:"string",variants:[q(),q("#"),q("##"),q("###"),F(),F("#"),F("##"),F("###")]},U=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],X={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:U},J=tt=>{const Ti=xt(tt,/\//),ui=xt(/\//,tt);return{begin:Ti,end:ui,contains:[...U,{scope:"comment",begin:`#(?!.*${ui})`,end:/$/}]}},pe={scope:"regexp",variants:[J("###"),J("##"),J("#"),X]},ue={match:xt(/`/,Yi,/`/)},te={className:"variable",match:/\$\d+/},$={className:"variable",match:`\\$${Od}+`},ce=[ue,te,$],de={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:dB,contains:[...S,T,ee]}]}},re={scope:"keyword",match:xt(/@/,Tn(...uB),Wo(Tn(/\(/,/\s+/)))},O={scope:"meta",match:xt(/@/,Yi)},R=[de,re,O],Q={match:Wo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:xt(/(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)/,Od,"+")},{className:"type",match:cd,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:xt(/\s+&\s+/,Wo(cd)),relevance:0}]},j={begin:/</,end:/>/,keywords:p,contains:[...a,...b,...R,E,Q]};Q.contains.push(j);const ge={match:xt(Yi,/\s*:/),keywords:"_|0",relevance:0},_e={begin:/\(/,end:/\)/,relevance:0,keywords:p,contains:["self",ge,...a,pe,...b,...x,...S,T,ee,...ce,...R,Q]},Y={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,Q]},xe={begin:Tn(Wo(xt(Yi,/\s*:/)),Wo(xt(Yi,/\s+/,Yi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Yi}]},V={begin:/\(/,end:/\)/,keywords:p,contains:[xe,...a,...b,...S,T,ee,...R,Q,_e],endsParent:!0,illegal:/["']/},ae={match:[/(func|macro)/,/\s+/,Tn(ue.match,Yi,Kp)],className:{1:"keyword",3:"title.function"},contains:[Y,V,t],illegal:[/\[/,/%/]},ye={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[Y,V,t],illegal:/\[|%/},Be={match:[/operator/,/\s+/,Kp],className:{1:"keyword",3:"title"}},jt={begin:[/precedencegroup/,/\s+/,cd],className:{1:"keyword",3:"title"},contains:[Q],keywords:[...oB,...s0],end:/}/},St={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},on={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Pi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Yi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:p,contains:[Y,...b,{begin:/:/,end:/\{/,keywords:p,contains:[{scope:"title.class.inherited",match:cd},...b],relevance:0}]};for(const tt of ee.variants){const Ti=tt.contains.find(Fi=>Fi.label==="interpol");Ti.keywords=p;const ui=[...b,...x,...S,T,ee,...ce];Ti.contains=[...ui,{begin:/\(/,end:/\)/,contains:["self",...ui]}]}return{name:"Swift",keywords:p,contains:[...a,ae,ye,St,on,Pi,Be,jt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},pe,...b,...x,...S,T,ee,...ce,...R,Q,_e]}}const Dd="[A-Za-z$_][0-9A-Za-z$_]*",B1=["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"],U1=["true","false","null","undefined","NaN","Infinity"],P1=["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"],F1=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],q1=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],$1=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],H1=[].concat(q1,P1,F1);function hB(e){const t=e.regex,n=(de,{after:re})=>{const O="</"+de[0].slice(1);return de.input.indexOf(O,re)!==-1},a=Dd,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(de,re)=>{const O=de[0].length+de.index,R=de.input[O];if(R==="<"||R===","){re.ignoreMatch();return}R===">"&&(n(de,{after:O})||re.ignoreMatch());let Q;const j=de.input.substring(O);if(Q=j.match(/^\s*=/)){re.ignoreMatch();return}if((Q=j.match(/^\s+extends\s+/))&&Q.index===0){re.ignoreMatch();return}}},d={$pattern:Dd,keyword:B1,literal:U1,built_in:H1,"variable.language":$1},f="[0-9](_?[0-9])*",p=`\\.(${f})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${p})|\\.)?|(${p}))[eE][+-]?(${f})\\b`},{begin:`\\b(${b})\\b((${p})\\b|\\.)?|(${p})\\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:d,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"}},S={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},C={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,S,{match:/\$\d+/},g];v.contains=T.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(T)});const D=[].concat(C,v.contains),B=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:B},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"}}]},F={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:{_:[...P1,...F1]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},U={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},X={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function J(de){return t.concat("(?!",de.join("|"),")")}const pe={match:t.concat(/\b/,J([...q1,"super","import"].map(de=>`${de}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},ue={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},$="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead($)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:B,CLASS_REFERENCE:F},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,E,w,S,C,{match:/\$\d+/},g,F,{scope:"attr",match:a+t.lookahead(":"),relevance:0},ce,{begin:"("+e.RE_STARTERS_RE+"|\\b(case|return|throw)\\b)\\s*",keywords:"return throw case",relevance:0,contains:[C,e.REGEXP_MODE,{className:"function",begin:$,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:d,contains:B}]}]},{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"]}]}]},U,{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},ue,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},pe,X,q,te,{match:/\$[(.]/}]}}function pB(e){const t=e.regex,n=hB(e),a=Dd,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]},d={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},f=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],p={$pattern:Dd,keyword:B1.concat(f),literal:U1,built_in:H1.concat(s),"variable.language":$1},b={className:"meta",begin:"@"+a},g=(w,S,_)=>{const C=w.contains.findIndex(T=>T.label===S);if(C===-1)throw new Error("can not find mode to replace");w.contains.splice(C,1,_)};Object.assign(n.keywords,p),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",d);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 mB(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)/,d=/\d{1,2}(:\d{1,2}){1,2}/,f={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,d,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,d),/ *#/)}]},p={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,f,p,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 gB(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},d={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/},f={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},p={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,f,p,d]}}function bB(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:/\)/}),d=e.inherit(e.APOS_STRING_MODE,{className:"string"}),f=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),p={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,f,d,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,f,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[f]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[p],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[p],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:p}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function yB(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]},d=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},S=[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],_=[...S];return _.pop(),_.push(d),x.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:S}}const xB={arduino:e4,bash:t4,c:n4,cpp:i4,csharp:a4,css:h4,diff:p4,go:m4,graphql:g4,ini:b4,java:y4,javascript:E4,json:S4,kotlin:N4,less:R4,lua:L4,makefile:I4,markdown:z4,objectivec:B4,perl:U4,php:P4,"php-template":F4,plaintext:q4,python:$4,"python-repl":H4,r:K4,ruby:G4,rust:Q4,scss:nB,shell:iB,sql:aB,swift:fB,typescript:pB,vbnet:mB,wasm:gB,xml:bB,yaml:yB};var Gp,o0;function vB(){if(o0)return Gp;o0=1;function e(z){return z instanceof Map?z.clear=z.delete=z.set=function(){throw new Error("map is read-only")}:z instanceof Set&&(z.add=z.clear=z.delete=function(){throw new Error("set is read-only")}),Object.freeze(z),Object.getOwnPropertyNames(z).forEach(se=>{const ve=z[se],ze=typeof ve;(ze==="object"||ze==="function")&&!Object.isFrozen(ve)&&e(ve)}),z}class t{constructor(se){se.data===void 0&&(se.data={}),this.data=se.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(z){return z.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;")}function a(z,...se){const ve=Object.create(null);for(const ze in z)ve[ze]=z[ze];return se.forEach(function(ze){for(const Ct in ze)ve[Ct]=ze[Ct]}),ve}const s="</span>",o=z=>!!z.scope,c=(z,{prefix:se})=>{if(z.startsWith("language:"))return z.replace("language:","language-");if(z.includes(".")){const ve=z.split(".");return[`${se}${ve.shift()}`,...ve.map((ze,Ct)=>`${ze}${"_".repeat(Ct+1)}`)].join(" ")}return`${se}${z}`};class d{constructor(se,ve){this.buffer="",this.classPrefix=ve.classPrefix,se.walk(this)}addText(se){this.buffer+=n(se)}openNode(se){if(!o(se))return;const ve=c(se.scope,{prefix:this.classPrefix});this.span(ve)}closeNode(se){o(se)&&(this.buffer+=s)}value(){return this.buffer}span(se){this.buffer+=`<span class="${se}">`}}const f=(z={})=>{const se={children:[]};return Object.assign(se,z),se};class p{constructor(){this.rootNode=f(),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 ve=f({scope:se});this.add(ve),this.stack.push(ve)}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,ve){return typeof ve=="string"?se.addText(ve):ve.children&&(se.openNode(ve),ve.children.forEach(ze=>this._walk(se,ze)),se.closeNode(ve)),se}static _collapse(se){typeof se!="string"&&se.children&&(se.children.every(ve=>typeof ve=="string")?se.children=[se.children.join("")]:se.children.forEach(ve=>{p._collapse(ve)}))}}class b extends p{constructor(se){super(),this.options=se}addText(se){se!==""&&this.add(se)}startScope(se){this.openNode(se)}endScope(){this.closeNode()}__addSublanguage(se,ve){const ze=se.root;ve&&(ze.scope=`language:${ve}`),this.add(ze)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(z){return z?typeof z=="string"?z:z.source:null}function v(z){return w("(?=",z,")")}function x(z){return w("(?:",z,")*")}function E(z){return w("(?:",z,")?")}function w(...z){return z.map(ve=>g(ve)).join("")}function S(z){const se=z[z.length-1];return typeof se=="object"&&se.constructor===Object?(z.splice(z.length-1,1),se):{}}function _(...z){return"("+(S(z).capture?"":"?:")+z.map(ze=>g(ze)).join("|")+")"}function C(z){return new RegExp(z.toString()+"|").exec("").length-1}function T(z,se){const ve=z&&z.exec(se);return ve&&ve.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function B(z,{joinWith:se}){let ve=0;return z.map(ze=>{ve+=1;const Ct=ve;let vt=g(ze),Se="";for(;vt.length>0;){const ke=D.exec(vt);if(!ke){Se+=vt;break}Se+=vt.substring(0,ke.index),vt=vt.substring(ke.index+ke[0].length),ke[0][0]==="\\"&&ke[1]?Se+="\\"+String(Number(ke[1])+Ct):(Se+=ke[0],ke[0]==="("&&ve++)}return Se}).map(ze=>`(${ze})`).join(se)}const M=/\b\B/,q="[a-zA-Z]\\w*",F="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",U="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",X="\\b(0b[01]+)",J="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",pe=(z={})=>{const se=/^#![ ]*\//;return z.binary&&(z.begin=w(se,/.*\b/,z.binary,/\b.*/)),a({scope:"meta",begin:se,end:/$/,relevance:0,"on:begin":(ve,ze)=>{ve.index!==0&&ze.ignoreMatch()}},z)},ue={begin:"\\\\[\\s\\S]",relevance:0},te={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ue]},$={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[ue]},ce={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/},de=function(z,se,ve={}){const ze=a({scope:"comment",begin:z,end:se,contains:[]},ve);ze.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 Ct=_("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 ze.contains.push({begin:w(/[ ]+/,"(",Ct,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ze},re=de("//","$"),O=de("/\\*","\\*/"),R=de("#","$"),Q={scope:"number",begin:ee,relevance:0},j={scope:"number",begin:U,relevance:0},ge={scope:"number",begin:X,relevance:0},_e={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ue,{begin:/\[/,end:/\]/,relevance:0,contains:[ue]}]},Y={scope:"title",begin:q,relevance:0},xe={scope:"title",begin:F,relevance:0},V={begin:"\\.\\s*"+F,relevance:0};var ye=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:ue,BINARY_NUMBER_MODE:ge,BINARY_NUMBER_RE:X,COMMENT:de,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:re,C_NUMBER_MODE:j,C_NUMBER_RE:U,END_SAME_AS_BEGIN:function(z){return Object.assign(z,{"on:begin":(se,ve)=>{ve.data._beginMatch=se[1]},"on:end":(se,ve)=>{ve.data._beginMatch!==se[1]&&ve.ignoreMatch()}})},HASH_COMMENT_MODE:R,IDENT_RE:q,MATCH_NOTHING_RE:M,METHOD_GUARD:V,NUMBER_MODE:Q,NUMBER_RE:ee,PHRASAL_WORDS_MODE:ce,QUOTE_STRING_MODE:$,REGEXP_MODE:_e,RE_STARTERS_RE:J,SHEBANG:pe,TITLE_MODE:Y,UNDERSCORE_IDENT_RE:F,UNDERSCORE_TITLE_MODE:xe});function Be(z,se){z.input[z.index-1]==="."&&se.ignoreMatch()}function jt(z,se){z.className!==void 0&&(z.scope=z.className,delete z.className)}function St(z,se){se&&z.beginKeywords&&(z.begin="\\b("+z.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",z.__beforeBegin=Be,z.keywords=z.keywords||z.beginKeywords,delete z.beginKeywords,z.relevance===void 0&&(z.relevance=0))}function on(z,se){Array.isArray(z.illegal)&&(z.illegal=_(...z.illegal))}function Pi(z,se){if(z.match){if(z.begin||z.end)throw new Error("begin & end are not supported with match");z.begin=z.match,delete z.match}}function tt(z,se){z.relevance===void 0&&(z.relevance=1)}const Ti=(z,se)=>{if(!z.beforeMatch)return;if(z.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},z);Object.keys(z).forEach(ze=>{delete z[ze]}),z.keywords=ve.keywords,z.begin=w(ve.beforeMatch,v(ve.begin)),z.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},z.relevance=0,delete ve.beforeMatch},ui=["of","and","for","in","not","or","if","then","parent","list","value"],Fi="keyword";function na(z,se,ve=Fi){const ze=Object.create(null);return typeof z=="string"?Ct(ve,z.split(" ")):Array.isArray(z)?Ct(ve,z):Object.keys(z).forEach(function(vt){Object.assign(ze,na(z[vt],se,vt))}),ze;function Ct(vt,Se){se&&(Se=Se.map(ke=>ke.toLowerCase())),Se.forEach(function(ke){const Ie=ke.split("|");ze[Ie[0]]=[vt,Tr(Ie[0],Ie[1])]})}}function Tr(z,se){return se?Number(se):Ql(z)?0:1}function Ql(z){return ui.includes(z.toLowerCase())}const ys={},Lt=z=>{console.error(z)},xs=(z,...se)=>{console.log(`WARN: ${z}`,...se)},ne=(z,se)=>{ys[`${z}/${se}`]||(console.log(`Deprecated as of ${z}. ${se}`),ys[`${z}/${se}`]=!0)},me=new Error;function Me(z,se,{key:ve}){let ze=0;const Ct=z[ve],vt={},Se={};for(let ke=1;ke<=se.length;ke++)Se[ke+ze]=Ct[ke],vt[ke+ze]=!0,ze+=C(se[ke-1]);z[ve]=Se,z[ve]._emit=vt,z[ve]._multi=!0}function Qe(z){if(Array.isArray(z.begin)){if(z.skip||z.excludeBegin||z.returnBegin)throw Lt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),me;if(typeof z.beginScope!="object"||z.beginScope===null)throw Lt("beginScope must be object"),me;Me(z,z.begin,{key:"beginScope"}),z.begin=B(z.begin,{joinWith:""})}}function rt(z){if(Array.isArray(z.end)){if(z.skip||z.excludeEnd||z.returnEnd)throw Lt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),me;if(typeof z.endScope!="object"||z.endScope===null)throw Lt("endScope must be object"),me;Me(z,z.end,{key:"endScope"}),z.end=B(z.end,{joinWith:""})}}function En(z){z.scope&&typeof z.scope=="object"&&z.scope!==null&&(z.beginScope=z.scope,delete z.scope)}function Ai(z){En(z),typeof z.beginScope=="string"&&(z.beginScope={_wrap:z.beginScope}),typeof z.endScope=="string"&&(z.endScope={_wrap:z.endScope}),Qe(z),rt(z)}function cn(z){function se(Se,ke){return new RegExp(g(Se),"m"+(z.case_insensitive?"i":"")+(z.unicodeRegex?"u":"")+(ke?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(ke,Ie){Ie.position=this.position++,this.matchIndexes[this.matchAt]=Ie,this.regexes.push([Ie,ke]),this.matchAt+=C(ke)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const ke=this.regexes.map(Ie=>Ie[1]);this.matcherRe=se(B(ke,{joinWith:"|"}),!0),this.lastIndex=0}exec(ke){this.matcherRe.lastIndex=this.lastIndex;const Ie=this.matcherRe.exec(ke);if(!Ie)return null;const Kt=Ie.findIndex((ia,ws)=>ws>0&&ia!==void 0),Ot=this.matchIndexes[Kt];return Ie.splice(0,Kt),Object.assign(Ie,Ot)}}class ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(ke){if(this.multiRegexes[ke])return this.multiRegexes[ke];const Ie=new ve;return this.rules.slice(ke).forEach(([Kt,Ot])=>Ie.addRule(Kt,Ot)),Ie.compile(),this.multiRegexes[ke]=Ie,Ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(ke,Ie){this.rules.push([ke,Ie]),Ie.type==="begin"&&this.count++}exec(ke){const Ie=this.getMatcher(this.regexIndex);Ie.lastIndex=this.lastIndex;let Kt=Ie.exec(ke);if(this.resumingScanAtSamePosition()&&!(Kt&&Kt.index===this.lastIndex)){const Ot=this.getMatcher(0);Ot.lastIndex=this.lastIndex+1,Kt=Ot.exec(ke)}return Kt&&(this.regexIndex+=Kt.position+1,this.regexIndex===this.count&&this.considerAll()),Kt}}function Ct(Se){const ke=new ze;return Se.contains.forEach(Ie=>ke.addRule(Ie.begin,{rule:Ie,type:"begin"})),Se.terminatorEnd&&ke.addRule(Se.terminatorEnd,{type:"end"}),Se.illegal&&ke.addRule(Se.illegal,{type:"illegal"}),ke}function vt(Se,ke){const Ie=Se;if(Se.isCompiled)return Ie;[jt,Pi,Ai,Ti].forEach(Ot=>Ot(Se,ke)),z.compilerExtensions.forEach(Ot=>Ot(Se,ke)),Se.__beforeBegin=null,[St,on,tt].forEach(Ot=>Ot(Se,ke)),Se.isCompiled=!0;let Kt=null;return typeof Se.keywords=="object"&&Se.keywords.$pattern&&(Se.keywords=Object.assign({},Se.keywords),Kt=Se.keywords.$pattern,delete Se.keywords.$pattern),Kt=Kt||/\w+/,Se.keywords&&(Se.keywords=na(Se.keywords,z.case_insensitive)),Ie.keywordPatternRe=se(Kt,!0),ke&&(Se.begin||(Se.begin=/\B|\b/),Ie.beginRe=se(Ie.begin),!Se.end&&!Se.endsWithParent&&(Se.end=/\B|\b/),Se.end&&(Ie.endRe=se(Ie.end)),Ie.terminatorEnd=g(Ie.end)||"",Se.endsWithParent&&ke.terminatorEnd&&(Ie.terminatorEnd+=(Se.end?"|":"")+ke.terminatorEnd)),Se.illegal&&(Ie.illegalRe=se(Se.illegal)),Se.contains||(Se.contains=[]),Se.contains=[].concat(...Se.contains.map(function(Ot){return mn(Ot==="self"?Se:Ot)})),Se.contains.forEach(function(Ot){vt(Ot,Ie)}),Se.starts&&vt(Se.starts,ke),Ie.matcher=Ct(Ie),Ie}if(z.compilerExtensions||(z.compilerExtensions=[]),z.contains&&z.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return z.classNameAliases=a(z.classNameAliases||{}),vt(z)}function Pt(z){return z?z.endsWithParent||Pt(z.starts):!1}function mn(z){return z.variants&&!z.cachedVariants&&(z.cachedVariants=z.variants.map(function(se){return a(z,{variants:null},se)})),z.cachedVariants?z.cachedVariants:Pt(z)?a(z,{starts:z.starts?a(z.starts):null}):Object.isFrozen(z)?a(z):z}var dt="11.11.1";class qi extends Error{constructor(se,ve){super(se),this.name="HTMLInjectionError",this.html=ve}}const Sn=n,jc=a,Ar=Symbol("nomatch"),vs=7,jr=function(z){const se=Object.create(null),ve=Object.create(null),ze=[];let Ct=!0;const vt="Could not find the language '{}', did you forget to load/include a language module?",Se={disableAutodetect:!0,name:"Plain text",contains:[]};let ke={ignoreUnescapedHTML:!1,throwUnescapedHTML:!1,noHighlightRe:/^(no-?highlight)$/i,languageDetectRe:/\blang(?:uage)?-([\w-]+)\b/i,classPrefix:"hljs-",cssSelector:"pre code",languages:null,__emitter:b};function Ie(fe){return ke.noHighlightRe.test(fe)}function Kt(fe){let Ae=fe.className+" ";Ae+=fe.parentNode?fe.parentNode.className:"";const Ye=ke.languageDetectRe.exec(Ae);if(Ye){const ft=_n(Ye[1]);return ft||(xs(vt.replace("{}",Ye[1])),xs("Falling back to no-highlight mode for this block.",fe)),ft?Ye[1]:"no-highlight"}return Ae.split(/\s+/).find(ft=>Ie(ft)||_n(ft))}function Ot(fe,Ae,Ye){let ft="",Qt="";typeof Ae=="object"?(ft=fe,Ye=Ae.ignoreIllegals,Qt=Ae.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
554
+ https://github.com/highlightjs/highlight.js/issues/2277`),Qt=fe,ft=Ae),Ye===void 0&&(Ye=!0);const bn={code:ft,language:Qt};Dr("before:highlight",bn);const Vn=bn.result?bn.result:ia(bn.language,bn.code,Ye);return Vn.code=bn.code,Dr("after:highlight",Vn),Vn}function ia(fe,Ae,Ye,ft){const Qt=Object.create(null);function bn(be,Ne){return be.keywords[Ne]}function Vn(){if(!Le.keywords){Xt.addText(ht);return}let be=0;Le.keywordPatternRe.lastIndex=0;let Ne=Le.keywordPatternRe.exec(ht),qe="";for(;Ne;){qe+=ht.substring(be,Ne.index);const Ze=un.case_insensitive?Ne[0].toLowerCase():Ne[0],It=bn(Le,Ze);if(It){const[di,Jl]=It;if(Xt.addText(qe),qe="",Qt[Ze]=(Qt[Ze]||0)+1,Qt[Ze]<=vs&&(Ia+=Jl),di.startsWith("_"))qe+=Ne[0];else{const zc=un.classNameAliases[di]||di;Wn(Ne[0],zc)}}else qe+=Ne[0];be=Le.keywordPatternRe.lastIndex,Ne=Le.keywordPatternRe.exec(ht)}qe+=ht.substring(be),Xt.addText(qe)}function Mn(){if(ht==="")return;let be=null;if(typeof Le.subLanguage=="string"){if(!se[Le.subLanguage]){Xt.addText(ht);return}be=ia(Le.subLanguage,ht,!0,Ic[Le.subLanguage]),Ic[Le.subLanguage]=be._top}else be=ks(ht,Le.subLanguage.length?Le.subLanguage:null);Le.relevance>0&&(Ia+=be.relevance),Xt.__addSublanguage(be._emitter,be.language)}function _t(){Le.subLanguage!=null?Mn():Vn(),ht=""}function Wn(be,Ne){be!==""&&(Xt.startScope(Ne),Xt.addText(be),Xt.endScope())}function Rc(be,Ne){let qe=1;const Ze=Ne.length-1;for(;qe<=Ze;){if(!be._emit[qe]){qe++;continue}const It=un.classNameAliases[be[qe]]||be[qe],di=Ne[qe];It?Wn(di,It):(ht=di,Vn(),ht=""),qe++}}function Ss(be,Ne){return be.scope&&typeof be.scope=="string"&&Xt.openNode(un.classNameAliases[be.scope]||be.scope),be.beginScope&&(be.beginScope._wrap?(Wn(ht,un.classNameAliases[be.beginScope._wrap]||be.beginScope._wrap),ht=""):be.beginScope._multi&&(Rc(be.beginScope,Ne),ht="")),Le=Object.create(be,{parent:{value:Le}}),Le}function Wl(be,Ne,qe){let Ze=T(be.endRe,qe);if(Ze){if(be["on:end"]){const It=new t(be);be["on:end"](Ne,It),It.isMatchIgnored&&(Ze=!1)}if(Ze){for(;be.endsParent&&be.parent;)be=be.parent;return be}}if(be.endsWithParent)return Wl(be.parent,Ne,qe)}function _s(be){return Le.matcher.regexIndex===0?(ht+=be[0],1):(za=!0,0)}function sf(be){const Ne=be[0],qe=be.rule,Ze=new t(qe),It=[qe.__beforeBegin,qe["on:begin"]];for(const di of It)if(di&&(di(be,Ze),Ze.isMatchIgnored))return _s(Ne);return qe.skip?ht+=Ne:(qe.excludeBegin&&(ht+=Ne),_t(),!qe.returnBegin&&!qe.excludeBegin&&(ht=Ne)),Ss(qe,be),qe.returnBegin?0:Ne.length}function Rn(be){const Ne=be[0],qe=Ae.substring(be.index),Ze=Wl(Le,be,qe);if(!Ze)return Ar;const It=Le;Le.endScope&&Le.endScope._wrap?(_t(),Wn(Ne,Le.endScope._wrap)):Le.endScope&&Le.endScope._multi?(_t(),Rc(Le.endScope,be)):It.skip?ht+=Ne:(It.returnEnd||It.excludeEnd||(ht+=Ne),_t(),It.excludeEnd&&(ht=Ne));do Le.scope&&Xt.closeNode(),!Le.skip&&!Le.subLanguage&&(Ia+=Le.relevance),Le=Le.parent;while(Le!==Ze.parent);return Ze.starts&&Ss(Ze.starts,be),It.returnEnd?0:Ne.length}function Xl(){const be=[];for(let Ne=Le;Ne!==un;Ne=Ne.parent)Ne.scope&&be.unshift(Ne.scope);be.forEach(Ne=>Xt.openNode(Ne))}let Mr={};function Ns(be,Ne){const qe=Ne&&Ne[0];if(ht+=be,qe==null)return _t(),0;if(Mr.type==="begin"&&Ne.type==="end"&&Mr.index===Ne.index&&qe===""){if(ht+=Ae.slice(Ne.index,Ne.index+1),!Ct){const Ze=new Error(`0 width match regex (${fe})`);throw Ze.languageName=fe,Ze.badRule=Mr.rule,Ze}return 1}if(Mr=Ne,Ne.type==="begin")return sf(Ne);if(Ne.type==="illegal"&&!Ye){const Ze=new Error('Illegal lexeme "'+qe+'" for mode "'+(Le.scope||"<unnamed>")+'"');throw Ze.mode=Le,Ze}else if(Ne.type==="end"){const Ze=Rn(Ne);if(Ze!==Ar)return Ze}if(Ne.type==="illegal"&&qe==="")return ht+=`
555
+ `,1;if(Zl>1e5&&Zl>Ne.index*3)throw new Error("potential infinite loop, way more iterations than matches");return ht+=qe,qe.length}const un=_n(fe);if(!un)throw Lt(vt.replace("{}",fe)),new Error('Unknown language: "'+fe+'"');const Lc=cn(un);let Cs="",Le=ft||Lc;const Ic={},Xt=new ke.__emitter(ke);Xl();let ht="",Ia=0,sa=0,Zl=0,za=!1;try{if(un.__emitTokens)un.__emitTokens(Ae,Xt);else{for(Le.matcher.considerAll();;){Zl++,za?za=!1:Le.matcher.considerAll(),Le.matcher.lastIndex=sa;const be=Le.matcher.exec(Ae);if(!be)break;const Ne=Ae.substring(sa,be.index),qe=Ns(Ne,be);sa=be.index+qe}Ns(Ae.substring(sa))}return Xt.finalize(),Cs=Xt.toHTML(),{language:fe,value:Cs,relevance:Ia,illegal:!1,_emitter:Xt,_top:Le}}catch(be){if(be.message&&be.message.includes("Illegal"))return{language:fe,value:Sn(Ae),illegal:!0,relevance:0,_illegalBy:{message:be.message,index:sa,context:Ae.slice(sa-100,sa+100),mode:be.mode,resultSoFar:Cs},_emitter:Xt};if(Ct)return{language:fe,value:Sn(Ae),illegal:!1,relevance:0,errorRaised:be,_emitter:Xt,_top:Le};throw be}}function ws(fe){const Ae={value:Sn(fe),illegal:!1,relevance:0,_top:Se,_emitter:new ke.__emitter(ke)};return Ae._emitter.addText(fe),Ae}function ks(fe,Ae){Ae=Ae||ke.languages||Object.keys(se);const Ye=ws(fe),ft=Ae.filter(_n).filter(Ra).map(_t=>ia(_t,fe,!1));ft.unshift(Ye);const Qt=ft.sort((_t,Wn)=>{if(_t.relevance!==Wn.relevance)return Wn.relevance-_t.relevance;if(_t.language&&Wn.language){if(_n(_t.language).supersetOf===Wn.language)return 1;if(_n(Wn.language).supersetOf===_t.language)return-1}return 0}),[bn,Vn]=Qt,Mn=bn;return Mn.secondBest=Vn,Mn}function $i(fe,Ae,Ye){const ft=Ae&&ve[Ae]||Ye;fe.classList.add("hljs"),fe.classList.add(`language-${ft}`)}function Gt(fe){let Ae=null;const Ye=Kt(fe);if(Ie(Ye))return;if(Dr("before:highlightElement",{el:fe,language:Ye}),fe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",fe);return}if(fe.children.length>0&&(ke.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(fe)),ke.throwUnescapedHTML))throw new qi("One of your code blocks includes unescaped HTML.",fe.innerHTML);Ae=fe;const ft=Ae.textContent,Qt=Ye?Ot(ft,{language:Ye,ignoreIllegals:!0}):ks(ft);fe.innerHTML=Qt.value,fe.dataset.highlighted="yes",$i(fe,Ye,Qt.language),fe.result={language:Qt.language,re:Qt.relevance,relevance:Qt.relevance},Qt.secondBest&&(fe.secondBest={language:Qt.secondBest.language,relevance:Qt.secondBest.relevance}),Dr("after:highlightElement",{el:fe,result:Qt,text:ft})}function gn(fe){ke=jc(ke,fe)}const Ma=()=>{Es(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Yl(){Es(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Oc=!1;function Es(){function fe(){Es()}if(document.readyState==="loading"){Oc||window.addEventListener("DOMContentLoaded",fe,!1),Oc=!0;return}document.querySelectorAll(ke.cssSelector).forEach(Gt)}function Dc(fe,Ae){let Ye=null;try{Ye=Ae(z)}catch(ft){if(Lt("Language definition for '{}' could not be registered.".replace("{}",fe)),Ct)Lt(ft);else throw ft;Ye=Se}Ye.name||(Ye.name=fe),se[fe]=Ye,Ye.rawDefinition=Ae.bind(null,z),Ye.aliases&&aa(Ye.aliases,{languageName:fe})}function Or(fe){delete se[fe];for(const Ae of Object.keys(ve))ve[Ae]===fe&&delete ve[Ae]}function Vl(){return Object.keys(se)}function _n(fe){return fe=(fe||"").toLowerCase(),se[fe]||se[ve[fe]]}function aa(fe,{languageName:Ae}){typeof fe=="string"&&(fe=[fe]),fe.forEach(Ye=>{ve[Ye.toLowerCase()]=Ae})}function Ra(fe){const Ae=_n(fe);return Ae&&!Ae.disableAutodetect}function La(fe){fe["before:highlightBlock"]&&!fe["before:highlightElement"]&&(fe["before:highlightElement"]=Ae=>{fe["before:highlightBlock"](Object.assign({block:Ae.el},Ae))}),fe["after:highlightBlock"]&&!fe["after:highlightElement"]&&(fe["after:highlightElement"]=Ae=>{fe["after:highlightBlock"](Object.assign({block:Ae.el},Ae))})}function Wt(fe){La(fe),ze.push(fe)}function Mc(fe){const Ae=ze.indexOf(fe);Ae!==-1&&ze.splice(Ae,1)}function Dr(fe,Ae){const Ye=fe;ze.forEach(function(ft){ft[Ye]&&ft[Ye](Ae)})}function ra(fe){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),Gt(fe)}Object.assign(z,{highlight:Ot,highlightAuto:ks,highlightAll:Es,highlightElement:Gt,highlightBlock:ra,configure:gn,initHighlighting:Ma,initHighlightingOnLoad:Yl,registerLanguage:Dc,unregisterLanguage:Or,listLanguages:Vl,getLanguage:_n,registerAliases:aa,autoDetection:Ra,inherit:jc,addPlugin:Wt,removePlugin:Mc}),z.debugMode=function(){Ct=!1},z.safeMode=function(){Ct=!0},z.versionString=dt,z.regex={concat:w,lookahead:v,either:_,optional:E,anyNumberOfTimes:x};for(const fe in ye)typeof ye[fe]=="object"&&e(ye[fe]);return Object.assign(z,ye),z},Dn=jr({});return Dn.newInstance=()=>jr({}),Gp=Dn,Dn.HighlightJS=Dn,Dn.default=Dn,Gp}var wB=vB();const kB=Lm(wB),c0={},EB="hljs-";function SB(e){const t=kB.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:d};function n(f,p,b){const g=b||c0,v=typeof g.prefix=="string"?g.prefix:EB;if(!t.getLanguage(f))throw new Error("Unknown language: `"+f+"` is not registered");t.configure({__emitter:_B,classPrefix:v});const x=t.highlight(p,{ignoreIllegals:!0,language:f});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(f,p){const g=(p||c0).subset||s();let v=-1,x=0,E;for(;++v<g.length;){const w=g[v];if(!t.getLanguage(w))continue;const S=n(w,f,p);S.data&&S.data.relevance!==void 0&&S.data.relevance>x&&(x=S.data.relevance,E=S)}return E||{type:"root",children:[],data:{language:void 0,relevance:x}}}function s(){return t.listLanguages()}function o(f,p){if(typeof f=="string")t.registerLanguage(f,p);else{let b;for(b in f)Object.hasOwn(f,b)&&t.registerLanguage(b,f[b])}}function c(f,p){if(typeof f=="string")t.registerAliases(typeof p=="string"?p:[...p],{languageName:f});else{let b;for(b in f)if(Object.hasOwn(f,b)){const g=f[b];t.registerAliases(typeof g=="string"?g:[...g],{languageName:b})}}}function d(f){return!!t.getLanguage(f)}}class _B{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,d){return d?c+"_".repeat(d):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 NB={};function Ug(e){const t=e||NB,n=t.aliases,a=t.detect||!1,s=t.languages||xB,o=t.plainText,c=t.prefix,d=t.subset;let f="hljs";const p=SB(s);if(n&&p.registerAlias(n),c){const b=c.indexOf("-");f=b===-1?c:c.slice(0,b)}return function(b,g){rf(b,"element",function(v,x,E){if(v.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=CB(v);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(v.properties.className)||(v.properties.className=[]),v.properties.className.includes(f)||v.properties.className.unshift(f);const S=Gz(v,{whitespace:"pre"});let _;try{_=w?p.highlight(w,S,{prefix:c}):p.highlightAuto(S,{prefix:c,subset:d})}catch(C){const T=C;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 CB(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 TB({name:e,projects:t,onClose:n,onChange:a}){const s=Ue(),{confirm:o,alert:c}=ci(),{data:d,isLoading:f,isError:p,error:b,refetch:g}=ct({queryKey:["skill",e],queryFn:()=>pO(e)});A.useEffect(()=>{const C=T=>{T.key==="Escape"&&n()};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[n]);const v=async(C,T)=>{try{await T(),await g(),a()}catch(D){c({title:s("skillDetail.actionFailed",{label:C}),body:D instanceof Error?D.message:String(D)})}},x=C=>v("link",()=>gO(e,C)),E=async C=>{await o({title:s("skillDetail.removeConfirm.title",{project:C,name:e}),body:s("skillDetail.removeConfirm.body"),confirm:s("skillDetail.removeConfirm.button"),danger:!0})&&await v("unlink",()=>bO(e,C))},w=C=>v("freeze",()=>yO(e,C)),S=async C=>{await o({title:s("skillDetail.unfreezeConfirm.title",{name:e,project:C}),body:s("skillDetail.unfreezeConfirm.body"),confirm:s("skillDetail.unfreezeConfirm.button"),danger:!0})&&await v("unfreeze",()=>xO(e,C))},_=new Map(((d==null?void 0:d.linkedProjects)??[]).map(C=>[C.project,C.state]));return h.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:h.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[h.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),d&&h.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[d.category," · ",d.origin||"local"]})]}),h.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":s("skillDetail.close.aria"),type:"button",children:h.jsx(_i,{size:16,strokeWidth:3})})]}),f&&h.jsx("p",{children:s("skillDetail.loading")}),p&&h.jsx("p",{className:"text-[var(--color-crashed)]",children:s("skillDetail.error.load",{detail:b instanceof Error?b.message:String(b)})}),d&&h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:s("skillDetail.section.projects")}),h.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(C=>{const T=_.get(C);return h.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:[h.jsxs("div",{className:"flex items-center gap-3",children:[h.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:C}),T==="linked"&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),T==="frozen"&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!T&&h.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),h.jsxs("div",{className:"flex gap-2",children:[!T&&h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(C),type:"button",children:[h.jsx(SA,{size:11})," link"]}),T==="linked"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(C),type:"button",children:[h.jsx(QA,{size:11})," freeze"]}),h.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(C),type:"button",children:"unlink"})]}),T==="frozen"&&h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>S(C),type:"button",children:[h.jsx(nA,{size:11})," unfreeze"]}),h.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(C),type:"button",children:"unlink"})]})]})]},C)}),t.length===0&&h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:s("skillDetail.section.empty")})]})]}),h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:s("skillDetail.section.preview")}),h.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:d.body?h.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Ug],children:d.body}):h.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),d.references.length>0&&h.jsxs("div",{children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),h.jsx("ul",{className:"flex flex-col gap-2",children:d.references.map(C=>h.jsx(AB,{skillName:e,file:C.name,lines:C.lines},C.name))})]})]})]})})}function AB({skillName:e,file:t,lines:n}){const a=Ue(),[s,o]=A.useState(!1),{data:c,isLoading:d,isError:f,error:p}=ct({queryKey:["skill-ref",e,t],queryFn:()=>mO(e,t),enabled:s,staleTime:1/0});return h.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[h.jsxs("button",{type:"button",onClick:()=>o(b=>!b),"aria-label":a("skillDetail.toggleSection.aria",{action:a(s?"skillDetail.collapse":"skillDetail.expand"),file:t}),"aria-expanded":s,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:[h.jsx(Bd,{size:12,strokeWidth:3,className:["transition-transform",s?"rotate-90":""].join(" ")}),h.jsx(kc,{size:12,strokeWidth:2.5}),h.jsx("span",{className:"flex-1 text-left font-bold",children:t}),h.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),s&&h.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[d&&h.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:a("skillDetail.loading")}),f&&h.jsx("p",{className:"text-xs text-[var(--color-crashed)]",children:a("skillDetail.error.load",{detail:p instanceof Error?p.message:String(p)})}),c&&h.jsx("div",{className:"prose-chat text-sm",children:h.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Ug],children:c.content})})]})]})}const jB=[{value:"all",labelKey:"skills.category.all"},{value:"language",labelKey:"skills.category.language"},{value:"end",labelKey:"skills.category.end"},{value:"persona",labelKey:"skills.category.persona"},{value:"workflow",labelKey:"skills.category.workflow"},{value:"other",labelKey:"skills.category.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 DB(){var x;const e=Ue(),[t,n]=A.useState("all"),[a,s]=A.useState(""),[o,c]=A.useState(null),d=Qn(),{data:f,isLoading:p}=ct({queryKey:["skills"],queryFn:()=>pg()}),b=ct({queryKey:["projects"],queryFn:_r}),g=A.useMemo(()=>((f==null?void 0:f.data)??[]).filter(w=>!(t!=="all"&&w.category!==t||a&&!w.name.toLowerCase().includes(a.toLowerCase()))),[f,t,a]),v=A.useMemo(()=>{const E=(f==null?void 0:f.data)??[],w={all:E.length};for(const S of E)w[S.category]=(w[S.category]??0)+1;return w},[f]);return h.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[h.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[h.jsxs("div",{children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:p?e("common.loading"):e("skills.subtitleCount",{count:(f==null?void 0:f.data.length)??0})})]}),h.jsx("div",{className:"flex gap-3 items-center",children:h.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await vO(),d.invalidateQueries({queryKey:["skills"]})},type:"button",children:[h.jsx(Al,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),h.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[h.jsxs("div",{className:"relative flex-1 max-w-md",children:[h.jsx(kd,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),h.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("skills.search.placeholder"),value:a,onChange:E=>s(E.target.value),"aria-label":e("skills.search.aria")})]}),h.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:jB.map(E=>h.jsxs("button",{type:"button",onClick:()=>n(E.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",t===E.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[e(E.labelKey)," ",v[E.value]]},E.value))})]}),h.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:g.map(E=>{var w;return h.jsx(MB,{skill:E,projectCount:((w=b.data)==null?void 0:w.data.length)??0,onOpen:()=>c(E.name)},E.name)})}),o&&h.jsx(TB,{name:o,projects:((x=b.data)==null?void 0:x.data.map(E=>E.name))??[],onClose:()=>c(null),onChange:()=>d.invalidateQueries({queryKey:["skills"]})})]})}function MB({skill:e,projectCount:t,onOpen:n}){const a=OB[e.category];return h.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:[h.jsxs("div",{className:"flex items-center justify-between",children:[h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),h.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),h.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:[h.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),h.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function RB(){var o;const e=Ue(),t=ct({queryKey:["system-info"],queryFn:bk}),n=ct({queryKey:["system-env"],queryFn:g2}),[a,s]=A.useState(!1);return h.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[h.jsx("header",{children:h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("system.h1")})}),h.jsx(LB,{current:(o=t.data)==null?void 0:o.version}),h.jsxs("section",{className:"nb-card",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("system.runtime")}),t.data?h.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[h.jsx("dt",{className:"font-bold",children:"Node"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.nodeVersion}),h.jsx("dt",{className:"font-bold",children:"Platform"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.platform}),h.jsx("dt",{className:"font-bold",children:"PID"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.data.pid??"—"}),h.jsx("dt",{className:"font-bold",children:"Uptime"}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:UB(t.data.uptimeMs)})]}):h.jsx("p",{className:"text-[var(--color-text-muted)]",children:e("common.loading")})]}),h.jsxs("section",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:[e("system.env.title.prefix"),h.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"})]}),a?h.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:e("system.env.editing.label")}):h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>s(!0),type:"button","aria-label":e("system.env.edit.aria"),children:[h.jsx(Wm,{size:12,strokeWidth:2.5})," ",e("system.env.edit.button")]})]}),a?h.jsx(IB,{onClose:()=>{s(!1),n.refetch()}}):n.data&&n.data.exists?h.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:n.data.entries.map(c=>h.jsxs("div",{className:"contents",children:[h.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[c.masked&&h.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),c.key]}),h.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:c.value})]},c.key))}):h.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:[e("system.env.empty.before"),h.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"}),e("system.env.empty.after")]})]}),h.jsx(zB,{})]})}function LB({current:e}){var w;const t=Ue(),{confirm:n,alert:a}=ci(),[s,o]=A.useState(!1),[c,d]=A.useState(null),f=ct({queryKey:["latest-version"],queryFn:x2,enabled:!1}),[p,b]=A.useState(null),[g,v]=A.useState("npm i -g @coralai/sps-cli@latest"),x=async()=>{var _;if(await n({title:t("system.upgrade.confirm.title"),body:t("system.upgrade.confirm.body",{current:e??"?",latest:((_=f.data)==null?void 0:_.latest)??"?"}),confirm:t("system.upgrade.confirm.button")})){o(!0),d(null),b(null);try{const C=await v2();if(d(C.output),b(C.installedVersion),v(C.command),C.ok)a({title:t("system.upgrade.success.title"),body:t("system.upgrade.success.body",{version:C.installedVersion??"?"})});else{const T=C.installedVersion&&C.installedVersion===e?t("system.upgrade.notEffective.same",{version:C.installedVersion}):t("system.upgrade.notEffective.notInstalled");a({title:t("system.upgrade.notEffective.title"),body:T})}}catch(C){d(C.message),a({title:t("system.upgrade.error.title"),body:C.message})}finally{o(!1)}}},E=async()=>{const S=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:g;try{await navigator.clipboard.writeText(S),a({title:t("system.upgrade.copy.success.title"),body:t("system.upgrade.copy.success.body",{cmd:S})})}catch{a({title:t("system.upgrade.copy.fail.title"),body:t("system.upgrade.copy.fail.body",{cmd:S})})}};return h.jsxs("section",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:t("system.upgrade.title")}),h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":t("system.upgrade.checkLatest.aria"),children:[f.isFetching?h.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin"}):h.jsx(Al,{size:12,strokeWidth:2.5}),t("system.upgrade.checkUpdate")]})]}),h.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[h.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.current")}),h.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&h.jsxs(h.Fragment,{children:[h.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.latest")}),h.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[f.data.latest,f.data.upToDate?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.latestPill")}):h.jsxs(h.Fragment,{children:[h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:x,disabled:s,type:"button","aria-label":t("system.upgrade.button.upgradeAria"),children:[s?h.jsx(Bt,{size:11,strokeWidth:3,className:"animate-spin"}):h.jsx(ak,{size:11,strokeWidth:2.5}),t("system.upgrade.button.upgrade")]}),h.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:E,type:"button","aria-label":t("system.upgrade.button.copyAria"),title:t("system.upgrade.button.copyTitle"),children:[h.jsx(VT,{size:11,strokeWidth:2.5})," ",t("system.upgrade.button.copy")]})]})]})]}),p&&h.jsxs(h.Fragment,{children:[h.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.installed")}),h.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[p,p===((w=f.data)==null?void 0:w.latest)?h.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("system.upgrade.installed.ok")}):p===e?h.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:t("system.upgrade.installed.fail")}):null]})]}),f.isError&&h.jsxs(h.Fragment,{children:[h.jsx("dt",{className:"font-bold",children:t("system.upgrade.label.check")}),h.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),c&&h.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:c})]})}function IB({onClose:e}){const t=Ue(),n=Qn(),{alert:a}=ci(),s=ct({queryKey:["system-env-raw"],queryFn:b2}),[o,c]=A.useState(null),[d,f]=A.useState(null);A.useEffect(()=>{s.data&&o===null&&(c(s.data.content),f(s.data.etag))},[s.data,o]);const p=o!==null&&s.data&&o!==s.data.content,b=Gn({mutationFn:()=>{if(o===null)throw new Error("no draft");return y2(o,d??"")},onSuccess:()=>{n.invalidateQueries({queryKey:["system-env"]}),n.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:g=>{const v=g.status;a({title:t(v===409?"system.env.error.conflict.title":"system.env.error.save.title"),body:v===409?t("system.env.error.conflict.body"):g instanceof Error?g.message:String(g)})}});return s.isLoading?h.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")}):h.jsxs("div",{children:[h.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:t("system.env.warning")}),h.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:o??"",onChange:g=>c(g.target.value),spellCheck:!1,"aria-label":t("system.env.aria")}),h.jsxs("div",{className:"flex items-center justify-between mt-3",children:[h.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[d?`etag: ${d}`:"",p?t("system.env.dirtyMark"):""]}),h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:b.isPending,type:"button",children:[h.jsx(_i,{size:12,strokeWidth:3})," ",t("system.env.cancel")]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>b.mutate(),disabled:!p||b.isPending,type:"button","aria-label":t("system.env.save.aria"),children:[b.isPending?h.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin"}):h.jsx(Ud,{size:12,strokeWidth:3}),t("system.env.save")]})]})]})]})}function zB(){var v;const e=Ue(),{alert:t}=ci(),n=ct({queryKey:["projects"],queryFn:_r}),[a,s]=A.useState({}),[o,c]=A.useState({}),[d,f]=A.useState({}),p=(((v=n.data)==null?void 0:v.data)??[]).map(x=>({project:x.name})),b=async(x,E)=>{c(w=>({...w,[x]:E?"fix":"check"}));try{const w=await w2(x,E);s(S=>({...S,[x]:w})),f(S=>({...S,[x]:!0}))}catch(w){t({title:e(E?"system.diagnostics.error.fix":"system.diagnostics.error.check"),body:w instanceof Error?w.message:String(w)})}finally{c(w=>({...w,[x]:null}))}},g=async()=>{for(const x of p)await b(x.project,!1)};return h.jsxs("section",{className:"nb-card",children:[h.jsxs("div",{className:"flex items-center justify-between mb-3",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:e("system.diagnostics.title")}),h.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{g()},disabled:p.length===0||Object.values(o).some(Boolean),type:"button",children:[h.jsx(Al,{size:12,strokeWidth:2.5}),e("system.diagnostics.checkAll")]})]}),p.length===0?h.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:e("system.diagnostics.empty")}):h.jsx("ul",{className:"flex flex-col gap-2",children:p.map(x=>{const E=a[x.project],w=o[x.project],S=E?E.checks.filter(D=>D.status==="fail").length:0,_=E?E.checks.filter(D=>D.status==="warn").length:0,C=d[x.project]??!1,T=E!=null;return h.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[h.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[h.jsxs("button",{type:"button",onClick:()=>f(D=>({...D,[x.project]:!C})),disabled:!T,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":e(C?"system.diagnostics.collapseAria":"system.diagnostics.expandAria"),children:[T&&E.ok?h.jsx(fm,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):T?h.jsx(sc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):h.jsx(fm,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),T&&(C?h.jsx(wc,{size:12}):h.jsx(Bd,{size:12})),h.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:x.project}),T?E.ok?h.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):h.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[S," fail · ",_," warn"]}):h.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("system.diagnostics.never")})]}),h.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{b(x.project,!1)},disabled:!!w,type:"button","aria-label":e("system.diagnostics.checkAria"),children:[w==="check"?h.jsx(Bt,{size:11,strokeWidth:3,className:"animate-spin"}):h.jsx(Al,{size:11,strokeWidth:2.5}),e("system.diagnostics.check")]}),h.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{b(x.project,!0)},disabled:!!w||T&&E.ok,type:"button","aria-label":e("system.diagnostics.fixAria"),title:T&&E.ok?e("system.diagnostics.noFixesNeeded"):e("system.diagnostics.fix.tip"),children:[w==="fix"?h.jsx(Bt,{size:11,strokeWidth:3,className:"animate-spin"}):h.jsx(hk,{size:11,strokeWidth:2.5}),e("system.diagnostics.fix")]})]}),C&&T&&h.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[h.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:E.checks.map((D,B)=>h.jsx(BB,{check:D},`${D.name}-${B}`))}),E.fixes.length>0&&h.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[h.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:e("system.diagnostics.fixed")}),h.jsx("ul",{className:"text-xs list-disc pl-4",children:E.fixes.map((D,B)=>h.jsx("li",{children:D},B))})]})]})]},x.project)})})]})}function BB({check:e}){const t=e.status==="pass"?h.jsx(fm,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?h.jsx(sc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?h.jsx(sc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):h.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return h.jsxs("li",{className:"flex items-start gap-2",children:[h.jsx("span",{className:"pt-0.5 shrink-0",children:t}),h.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),h.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function UB(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 PB(){return Ht("/api/chat/sessions")}function FB(e){return Ht(`/api/chat/sessions/${e}`)}async function Qp(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 qB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function $B(e,t,n){const a=await fetch(`/api/chat/sessions/${e}/messages`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({content:t,attachments:n})});if(!a.ok)throw new Error(`${a.status}: ${await a.text()}`);return await a.json()}async function HB(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 KB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return Ht(`/api/chat/sessions/${e}/messages${n}`)}function u0(){var ce,de,re,O,R,Q,j,ge,_e;const e=Ue(),{sessionId:t}=Q0(),n=Sr(),a=Qn(),{confirm:s,alert:o}=ci(),c=ct({queryKey:["chat-sessions"],queryFn:PB}),d=ct({queryKey:["chat-session",t],queryFn:()=>FB(t??""),enabled:!!t}),[f,p]=A.useState(null),[b,g]=A.useState(""),[v,x]=A.useState(!1),E=A.useRef(null),[w,S]=A.useState(!1),[_,C]=A.useState([]),[T,D]=A.useState(!1),[B,M]=A.useState(!1),[q,F]=A.useState(!1),[ee,U]=A.useState(null);A.useEffect(()=>{if(!t)return;const Y=new EventSource(`/stream/chat/${encodeURIComponent(t)}`);let xe=!0;return Y.addEventListener("open",()=>{if(xe){xe=!1;return}const V=a.getQueryData(["chat-session",t]),ae=V!=null&&V.messages.length?V.messages[V.messages.length-1].ts:void 0;KB(t,ae).then(ye=>{ye.data.length!==0&&a.setQueryData(["chat-session",t],Be=>{if(!Be)return Be;const jt=new Set(Be.messages.map(on=>on.id)),St=ye.data.filter(on=>!jt.has(on.id));return St.length===0?Be:{...Be,messages:[...Be.messages,...St],lastMessageAt:St[St.length-1].ts,messageCount:Be.messageCount+St.length}})}).catch(()=>{})}),Y.addEventListener("chat.message",V=>{try{const ae=JSON.parse(V.data);a.setQueryData(["chat-session",t],ye=>{if(!ye||ye.messages.some(St=>St.id===ae.message.id))return ye;const jt=ye.messages.findIndex(St=>St.role==="user"&&St.id.startsWith("optim-")&&St.content===ae.message.content);if(jt>=0){const St=[...ye.messages];return St[jt]=ae.message,{...ye,messages:St}}return{...ye,messages:[...ye.messages,ae.message]}})}catch{}}),Y.addEventListener("chat.message.pending",V=>{try{const ae=JSON.parse(V.data);p({id:ae.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),Y.addEventListener("chat.message.chunk.text",V=>{try{const ae=JSON.parse(V.data);p(ye=>{if(!ye||ye.id!==ae.assistantId)return ye;const Be=[...ye.blocks],jt=Be[Be.length-1];return jt&&jt.type==="text"?Be[Be.length-1]={...jt,target:jt.target+ae.text}:Be.push({type:"text",target:ae.text,displayed:""}),{...ye,blocks:Be}})}catch{}}),Y.addEventListener("chat.message.chunk.tool_use",V=>{try{const ae=JSON.parse(V.data);p(ye=>!ye||ye.id!==ae.assistantId?ye:{...ye,blocks:[...ye.blocks,{type:"tool_use",id:ae.id,title:ae.title,kind:ae.kind,status:ae.status}]})}catch{}}),Y.addEventListener("chat.message.chunk.tool_update",V=>{try{const ae=JSON.parse(V.data);p(ye=>!ye||ye.id!==ae.assistantId?ye:{...ye,blocks:ye.blocks.map(Be=>Be.type==="tool_use"&&Be.id===ae.id?{...Be,status:ae.status}:Be)})}catch{}}),Y.addEventListener("chat.message.complete",V=>{try{const ae=JSON.parse(V.data);p(ye=>ye&&ye.id===ae.assistantId?{...ye,done:!0,finalMessage:ae.message}:ye)}catch{}}),()=>Y.close()},[t,a]),A.useEffect(()=>{if(!f)return;const Y=f.blocks.reduce((V,ae)=>ae.type==="text"?V+(ae.target.length-ae.displayed.length):V,0);if(Y<=0){if(f.done&&f.finalMessage){const V=f.finalMessage;a.setQueryData(["chat-session",t],ae=>!ae||ae.messages.some(ye=>ye.id===V.id)?ae:{...ae,messages:[...ae.messages,V],lastMessageAt:V.ts,messageCount:ae.messageCount+1}),a.invalidateQueries({queryKey:["chat-sessions"]}),p(null),x(!1)}return}const xe=setTimeout(()=>{p(V=>{if(!V)return V;let ae=Math.max(1,Math.ceil(Y/40));const ye=V.blocks.map(Be=>{if(Be.type!=="text"||ae<=0)return Be;const jt=Be.target.length-Be.displayed.length;if(jt<=0)return Be;const St=Math.min(jt,ae);return ae-=St,{...Be,displayed:Be.target.slice(0,Be.displayed.length+St)}});return{...V,blocks:ye}})},25);return()=>clearTimeout(xe)},[f,a,t]),A.useEffect(()=>{const Y=E.current;Y&&(Y.scrollTop=Y.scrollHeight)},[d.data,f]);const X=A.useCallback(async(Y={})=>{var xe,V;try{const ae=await Qp({cwd:((xe=Y.cwd)==null?void 0:xe.trim())||void 0,title:((V=Y.title)==null?void 0:V.trim())||void 0});a.invalidateQueries({queryKey:["chat-sessions"]}),n(`/chat/${ae.id}`),S(!1)}catch(ae){o({title:e("chat.error.create.title"),body:ae instanceof Error?ae.message:String(ae)})}},[a,n,o,e]),J=A.useCallback(async()=>{const Y=b.trim();if(!Y&&_.length===0||v)return;let xe=t;if(!xe){const ye=await Qp();a.invalidateQueries({queryKey:["chat-sessions"]}),xe=ye.id,n(`/chat/${xe}`,{replace:!0})}const V=_.map(ye=>ye.path),ae={id:`optim-${Date.now()}`,role:"user",content:Y||e("chat.placeholder.attachment"),ts:new Date().toISOString(),status:"complete",attachments:V.length>0?V:void 0};a.setQueryData(["chat-session",xe],ye=>ye?{...ye,messages:[...ye.messages,ae],lastMessageAt:ae.ts,messageCount:ye.messageCount+1}:{id:xe,createdAt:ae.ts,lastMessageAt:ae.ts,title:Y.slice(0,60)||e("chat.placeholder.attachmentTitle"),project:null,messageCount:1,messages:[ae]}),g(""),C([]),x(!0);try{await $B(xe,Y||e("chat.placeholder.viewAttachment"),V.length>0?V:void 0)}catch(ye){x(!1),console.error("sendMessage failed",ye),o({title:e("chat.error.send.title"),body:ye instanceof Error?ye.message:String(ye)})}},[b,_,v,t,a,n,o,e]),pe=A.useCallback(async Y=>{if(Y.size>yk){o({title:e("chat.error.fileTooBig.title"),body:e("chat.error.fileTooBig.body",{size:(Y.size/1024/1024).toFixed(2),name:Y.name})});return}let xe=t;if(!xe){const V=await Qp();a.invalidateQueries({queryKey:["chat-sessions"]}),xe=V.id,n(`/chat/${xe}`,{replace:!0})}D(!0);try{const V=await K2(xe,Y);C(ae=>[...ae,{path:V.path,name:V.name}])}catch(V){o({title:e("chat.error.uploadAttachment.title"),body:V instanceof Error?V.message:String(V)})}finally{D(!1)}},[t,a,n,o,e]),ue=A.useCallback(Y=>{C(xe=>xe.filter(V=>V.path!==Y))},[]),te=A.useCallback(async(Y,xe)=>{await s({title:e("chat.delete.confirm.title"),body:e(xe==="cli"?"chat.delete.confirm.body.cli":"chat.delete.confirm.body.console"),confirm:e("chat.delete.confirm.button"),danger:!0})&&(await qB(Y),a.invalidateQueries({queryKey:["chat-sessions"]}),t===Y&&n("/chat"))},[a,t,n,s,e]),$=A.useCallback(async()=>{if(t)try{await HB(t)}catch(Y){o({title:e("chat.error.interrupt.title"),body:Y instanceof Error?Y.message:String(Y)})}},[t,o,e]);return h.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[h.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[h.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>S(!0),type:"button",children:[h.jsx(Bi,{size:14,strokeWidth:3}),e("chat.list.new")]}),h.jsx("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:e("chat.list.heading",{count:((ce=c.data)==null?void 0:ce.data.length)??0})}),h.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((de=c.data)==null?void 0:de.data)??[]).map(Y=>h.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",t===Y.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:[h.jsxs("button",{type:"button","aria-label":e("chat.list.openAria",{title:Y.title,cwd:Y.cwd?e("chat.list.cwdSuffix",{cwd:Y.cwd}):""}),onClick:()=>n(`/chat/${Y.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[h.jsx(Yv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),h.jsxs("div",{className:"flex-1 min-w-0",children:[h.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[h.jsx("p",{className:"text-sm font-semibold truncate flex-1",children:Y.title}),Y.source==="cli"&&h.jsx("span",{className:"flex-shrink-0 px-1.5 py-0 rounded-md bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] text-[9px] font-[family-name:var(--font-mono)] uppercase tracking-wider leading-tight",title:e("chat.cliBadge.tooltip"),children:e("chat.cliBadge")})]}),h.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:e("chat.list.msgs",{count:Y.messageCount,time:Q1(Y.lastMessageAt??Y.createdAt,e)})}),Y.cwd&&h.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:Y.cwd,children:[h.jsx(oc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("span",{className:"truncate",dir:"rtl",children:Y.cwd})]})]})]}),h.jsx("button",{type:"button","aria-label":Y.source==="cli"?e("chat.list.deleteCli.aria"):e("chat.list.delete.aria"),className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:xe=>{xe.stopPropagation(),te(Y.id,Y.source)},children:h.jsx(zl,{size:12})})]},Y.id)),(((re=c.data)==null?void 0:re.data)??[]).length===0&&h.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:e("chat.list.empty")})]})]}),h.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:t?h.jsxs(h.Fragment,{children:[h.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((O=d.data)==null?void 0:O.title)??e("common.loading")}),h.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:t}),((R=d.data)==null?void 0:R.cwd)&&h.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:d.data.cwd,children:[h.jsx(oc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("span",{className:"truncate",children:d.data.cwd})]})]}),h.jsxs("div",{ref:E,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((Q=d.data)==null?void 0:Q.messages)??[]).map(Y=>h.jsx(YB,{msg:Y,sessionId:t??null,onPreviewAttachment:xe=>U(xe)},Y.id)),f&&h.jsx(WB,{pending:f}),!d.isLoading&&(((j=d.data)==null?void 0:j.messages)??[]).length===0&&!f&&!v&&h.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:e("chat.session.empty")})]}),((ge=d.data)==null?void 0:ge.source)==="cli"?h.jsxs("div",{className:"border-t-2 border-[var(--color-text)] p-4 bg-[var(--color-accent-purple)]",children:[h.jsxs("p",{className:"text-sm font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] text-center",children:[h.jsx("strong",{children:e("chat.cli.banner.bold")})," — ",e("chat.cli.banner")]}),h.jsxs("pre",{className:"mt-2 px-3 py-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md text-xs font-[family-name:var(--font-mono)] overflow-x-auto",children:["sps agent --chat --name ",(t??"").replace(/^session-/,"")]})]}):h.jsxs("div",{className:["border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)] transition-colors",q?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:Y=>{Y.dataTransfer.types.includes("Files")&&(Y.preventDefault(),Y.dataTransfer.dropEffect="copy",q||F(!0))},onDragLeave:()=>F(!1),onDrop:Y=>{if(!Y.dataTransfer.types.includes("Files"))return;Y.preventDefault(),F(!1);const xe=Array.from(Y.dataTransfer.files??[]);for(const V of xe)pe(V)},children:[(_.length>0||T)&&h.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[_.map(Y=>h.jsxs("button",{type:"button",className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)] group",onClick:()=>U(Y.path),title:e("chat.attachment.previewTooltip",{name:Y.name,path:Y.path}),children:[Md(Y.path)?h.jsx(yA,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):h.jsx(kc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("span",{className:"truncate max-w-[180px]",children:Y.name}),h.jsx("span",{role:"button","aria-label":e("chat.input.removeAttachment",{name:Y.name}),className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:xe=>{xe.stopPropagation(),ue(Y.path)},children:h.jsx(_i,{size:11,strokeWidth:3})})]},Y.path)),T&&h.jsxs("span",{className:"flex items-center gap-1.5 px-2 py-1 text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[h.jsx(Bt,{size:11,strokeWidth:2.5,className:"animate-spin"}),e("chat.input.uploading")]})]}),h.jsxs("div",{className:"flex gap-2 items-end",children:[h.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>M(!0),disabled:v,"aria-label":e("chat.input.attach.aria"),title:e("chat.input.attach.title"),children:h.jsx(jA,{size:14,strokeWidth:2.5})}),h.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:e(q?"chat.input.dragOver":"chat.input.placeholder"),rows:2,value:b,onChange:Y=>g(Y.target.value),onKeyDown:Y=>{Y.key==="Enter"&&!Y.shiftKey&&!Y.nativeEvent.isComposing&&(Y.preventDefault(),J())},onPaste:Y=>{const V=Array.from(Y.clipboardData.items??[]).filter(ae=>ae.kind==="file"&&ae.type.startsWith("image/"));if(V.length!==0){Y.preventDefault();for(const ae of V){const ye=ae.getAsFile();ye&&pe(ye)}}},"aria-label":e("chat.input.aria")}),f?h.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:$,type:"button","aria-label":e("chat.input.interrupt.aria"),children:[h.jsx(ck,{size:14,strokeWidth:3}),e("chat.input.interrupt")]}):h.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:J,disabled:!b.trim()&&_.length===0||v,type:"button","aria-label":e("chat.input.send.aria"),children:[v?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(qA,{size:14,strokeWidth:3}),e("chat.input.send")]})]})]})]}):h.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:h.jsxs("div",{className:"text-center max-w-md",children:[h.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:h.jsx(Yv,{size:32,strokeWidth:2.5})}),h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("chat.empty.title")}),h.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:e("chat.empty.hint")}),h.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:e("chat.empty.shortcuts")})]})})}),w&&h.jsx(QB,{onCancel:()=>S(!1),onCreate:Y=>X(Y)}),B&&h.jsx(Zm,{mode:"file",title:e("chat.filePicker.title"),initialPath:((_e=d.data)==null?void 0:_e.cwd)??void 0,onCancel:()=>M(!1),onSelect:Y=>{C(xe=>{if(xe.some(ae=>ae.path===Y))return xe;const V=Y.split(/[\\/]/).pop()||Y;return[...xe,{path:Y,name:V}]}),M(!1)}}),ee&&t&&h.jsx(GB,{sessionId:t,path:ee,onClose:()=>U(null)})]})}function Md(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function d0(e){return/\.pdf$/i.test(e)}function Yp(e){return/\.(txt|md|log|json|yaml|yml|csv|html|xml|tsx?|jsx?|css|sh|ya?ml|conf|toml|ini|env|gitignore|sql|py|rb|go|rs|java|kt|swift|c|cc|cpp|h|hpp)$/i.test(e)}function GB({sessionId:e,path:t,onClose:n}){const a=Ue(),[s,o]=A.useState(null),[c,d]=A.useState(null);A.useEffect(()=>{const b=g=>{g.key==="Escape"&&(g.preventDefault(),n())};return window.addEventListener("keydown",b),()=>window.removeEventListener("keydown",b)},[n]),A.useEffect(()=>{if(!Yp(t))return;let b=!1;return fetch(pm(e,t)).then(async g=>{if(!g.ok)throw new Error(`${g.status}`);return g.text()}).then(g=>{b||o(g.length>2e5?g.slice(0,2e5)+`
556
+
557
+ …(truncated)`:g)}).catch(g=>{b||d(g instanceof Error?g.message:String(g))}),()=>{b=!0}},[e,t]);const f=pm(e,t),p=t.split(/[\\/]/).pop()??t;return h.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.6)] p-4",role:"presentation",children:h.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-3xl w-full p-5 flex flex-col",style:{maxHeight:"85vh"},role:"dialog","aria-modal":"true","aria-label":a("chat.attachment.preview.aria",{name:p}),children:[h.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[h.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[h.jsx(ZT,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:p})]}),h.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":a("chat.attachment.close.aria"),children:h.jsx(_i,{size:16,strokeWidth:3})})]}),h.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate mb-2 shrink-0",title:t,dir:"rtl",children:t}),h.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[Md(t)&&h.jsx("div",{className:"flex items-center justify-center p-4",children:h.jsx("img",{src:f,alt:`Preview: ${p}`,className:"max-w-full max-h-[60vh] object-contain"})}),d0(t)&&h.jsx("iframe",{src:f,title:`PDF: ${p}`,className:"w-full",style:{height:"60vh",border:0}}),Yp(t)&&h.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:c?h.jsx("span",{className:"text-[var(--color-crashed)]",children:a("chat.attachment.readErr",{detail:c})}):s===null?h.jsx("span",{className:"text-[var(--color-text-muted)]",children:a("chat.attachment.loading")}):s}),!Md(t)&&!d0(t)&&!Yp(t)&&h.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[h.jsx("p",{className:"mb-3",children:a("chat.attachment.unsupported")}),h.jsx("a",{href:f,download:p,className:"nb-btn nb-btn-primary inline-flex",children:a("chat.attachment.download")})]})]})]})})}function QB({onCancel:e,onCreate:t}){const n=Ue(),[a,s]=A.useState(""),[o,c]=A.useState(""),[d,f]=A.useState(!1),[p,b]=A.useState(!1);A.useEffect(()=>{if(p)return;const v=x=>{x.key==="Escape"&&(x.preventDefault(),e())};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e,p]);const g=async()=>{if(!d){f(!0);try{t({title:a.trim()||void 0,cwd:o.trim()||void 0})}finally{f(!1)}}};return h.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:[h.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":n("chat.newSession.title.aria"),children:[h.jsxs("header",{className:"flex items-center justify-between mb-4",children:[h.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:n("chat.newSession.title")}),h.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":n("chat.newSession.close.aria"),children:h.jsx(_i,{size:16,strokeWidth:3})})]}),h.jsxs("div",{className:"flex flex-col gap-4",children:[h.jsxs("div",{children:[h.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.title")}),h.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:n("chat.newSession.field.title.placeholder"),value:a,onChange:v=>s(v.target.value),autoFocus:!0})]}),h.jsxs("div",{children:[h.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:n("chat.newSession.field.cwd")}),h.jsxs("div",{className:"flex gap-2",children:[h.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:o,onChange:v=>c(v.target.value)}),h.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>b(!0),"aria-label":n("chat.newSession.field.cwd.browseAria"),title:n("chat.newSession.field.cwd.browseAria"),children:[h.jsx(rk,{size:14,strokeWidth:2.5}),n("chat.newSession.field.cwd.browse")]})]}),h.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[h.jsx(oc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),n("chat.newSession.field.cwd.help1")," ",n("chat.newSession.field.cwd.help2")]})]}),h.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[h.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:n("chat.newSession.cancel")}),h.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:g,disabled:d,children:[d?h.jsx(Bt,{size:14,strokeWidth:3,className:"animate-spin"}):h.jsx(Bi,{size:14,strokeWidth:3}),n("chat.newSession.create")]})]})]})]}),p&&h.jsx(Zm,{initialPath:o.trim()||void 0,onCancel:()=>b(!1),onSelect:v=>{c(v),b(!1)}})]})}function YB({msg:e,sessionId:t,onPreviewAttachment:n}){const a=Ue(),s=e.role==="user",o=e.role==="error",c=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],d=e.attachments??[];return h.jsx("div",{className:s?"self-end max-w-3xl":"self-start max-w-3xl",children:h.jsxs("div",{className:["nb-card",s?"bg-[var(--color-secondary)]":o?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[h.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[a(s?"chat.message.role.you":o?"chat.message.role.error":"chat.message.role.assistant"),h.jsx("span",{className:"font-normal",children:"·"}),h.jsx("span",{className:"font-normal",children:Q1(e.ts,a)})]}),h.jsx("div",{className:"flex flex-col gap-2",children:c.map((f,p)=>h.jsx(XB,{block:f},p))}),d.length>0&&t&&h.jsx("div",{className:"mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)]/30 flex flex-wrap gap-2",children:d.map(f=>h.jsx(VB,{sessionId:t,path:f,onPreview:()=>n(f)},f))}),e.truncated&&h.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:a("chat.message.truncated")})]})})}function VB({sessionId:e,path:t,onPreview:n}){const a=Ue(),s=t.split(/[\\/]/).pop()??t;return Md(t)?h.jsx("button",{type:"button",onClick:n,className:"block rounded-md overflow-hidden border-2 border-[var(--color-text)] hover:shadow-[2px_2px_0_var(--color-text)] transition-shadow",title:a("chat.attachment.previewSimpleTooltip",{name:s}),children:h.jsx("img",{src:pm(e,t),alt:s,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):h.jsxs("button",{type:"button",onClick:n,className:"flex items-center gap-1.5 px-2 py-1 rounded-md bg-[var(--color-bg)] border-2 border-[var(--color-text)] text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-mint)]",title:a("chat.attachment.previewTooltip",{name:s,path:t}),children:[h.jsx(kc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),h.jsx("span",{className:"truncate max-w-[200px]",children:s})]})}function WB({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 h.jsx("div",{className:"self-start max-w-3xl",children:h.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[h.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",h.jsx("span",{className:"font-normal",children:"·"}),h.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[h.jsx(Bt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),h.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&h.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 h.jsxs("div",{className:"relative",children:[h.jsx(K1,{text:n.displayed}),s&&h.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return h.jsx(G1,{tool:n},a)})]})]})})}function XB({block:e}){return e.type==="text"?h.jsx(K1,{text:e.text}):h.jsx(G1,{tool:e})}function K1({text:e}){return e?h.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:h.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Ug],children:e})}):null}function G1({tool:e}){const[t,n]=A.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return h.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[h.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:[h.jsx(Bd,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),h.jsx(hk,{size:12,strokeWidth:2.5}),h.jsx("span",{className:"font-bold",children:e.kind}),h.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&h.jsx(Bt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&h.jsx(lc,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&h.jsx(KT,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&h.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:[h.jsxs("div",{children:["id: ",h.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),h.jsxs("div",{children:["status: ",h.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function Q1(e,t){if(!e)return"";const n=new Date(e),a=Date.now()-n.getTime();return a<6e4?t("kanban.time.justNow"):a<36e5?t("kanban.time.minutes",{n:Math.floor(a/6e4)}):a<864e5?t("kanban.time.hours",{n:Math.floor(a/36e5)}):n.toLocaleDateString()}function ZB(){const e=Ue();return h.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[h.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:e("notFound.title")}),h.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:e("notFound.body")}),h.jsx(hs,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:e("notFound.home")})]})}function JB(){return h.jsx(B2,{children:h.jsx(GC,{children:h.jsxs(Fn,{element:h.jsx(I2,{}),children:[h.jsx(Fn,{index:!0,element:h.jsx($C,{to:"/projects",replace:!0})}),h.jsx(Fn,{path:"/projects",element:h.jsx(U2,{})}),h.jsx(Fn,{path:"/projects/new",element:h.jsx(W2,{})}),h.jsx(Fn,{path:"/projects/:name",element:h.jsx(cO,{})}),h.jsx(Fn,{path:"/board",element:h.jsx(VO,{})}),h.jsx(Fn,{path:"/workers",element:h.jsx(uD,{})}),h.jsx(Fn,{path:"/logs",element:h.jsx(mD,{})}),h.jsx(Fn,{path:"/skills",element:h.jsx(DB,{})}),h.jsx(Fn,{path:"/system",element:h.jsx(RB,{})}),h.jsx(Fn,{path:"/chat",element:h.jsx(u0,{})}),h.jsx(Fn,{path:"/chat/:sessionId",element:h.jsx(u0,{})}),h.jsx(Fn,{path:"*",element:h.jsx(ZB,{})})]})})})}z2();const eU=new MN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Y1=document.getElementById("root");if(!Y1)throw new Error("#root not found");oN.createRoot(Y1).render(h.jsx(A.StrictMode,{children:h.jsx(d2,{children:h.jsx(RN,{client:eU,children:h.jsx(bT,{children:h.jsx(Q2,{children:h.jsx(JB,{})})})})})}));