@coralai/sps-cli 0.51.15 → 0.51.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/console-assets/assets/index-CoAkaUkW.css +10 -0
- package/dist/console-assets/assets/index-p6b8pcpR.js +557 -0
- package/dist/console-assets/index.html +2 -2
- package/package.json +2 -2
- package/dist/console-assets/assets/index-CuP-RB0g.css +0 -10
- package/dist/console-assets/assets/index-WPJy-RtU.js +0 -554
|
@@ -1,554 +0,0 @@
|
|
|
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 z=(e,t,n)=>(lp(e,t,"read from private field"),n?n.call(e):t.get(e)),Ae=(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),qe=(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 z(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Lm(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var op={exports:{}},$o={};/**
|
|
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 $o;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 $o.Fragment=t,$o.jsx=n,$o.jsxs=n,$o}var xv;function eN(){return xv||(xv=1,op.exports=J_()),op.exports}var f=eN(),cp={exports:{}},Be={};/**
|
|
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 Be;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"),p=Symbol.for("react.suspense"),h=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 k={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function S(R,Q,T){this.props=R,this.context=Q,this.refs=_,this.updater=T||k}S.prototype.isReactComponent={},S.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")},S.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function j(){}j.prototype=S.prototype;function A(R,Q,T){this.props=R,this.context=Q,this.refs=_,this.updater=T||k}var D=A.prototype=new j;D.constructor=A,w(D,S.prototype),D.isPureReactComponent=!0;var U=Array.isArray;function M(){}var F={H:null,A:null,T:null,S:null},$=Object.prototype.hasOwnProperty;function ee(R,Q,T){var be=T.ref;return{$$typeof:e,type:R,key:Q,ref:be!==void 0?be:null,props:T}}function L(R,Q){return ee(R.type,Q,R.props)}function Z(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function ie(R){var Q={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(T){return Q[T]})}var xe=/\/+/g;function ue(R,Q){return typeof R=="object"&&R!==null&&R.key!=null?ie(""+R.key):Q.toString(36)}function J(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 H(R,Q,T,be,W){var fe=typeof R;(fe==="undefined"||fe==="boolean")&&(R=null);var K=!1;if(R===null)K=!0;else switch(fe){case"bigint":case"string":case"number":K=!0;break;case"object":switch(R.$$typeof){case e:case t:K=!0;break;case b:return K=R._init,H(K(R._payload),Q,T,be,W)}}if(K)return W=W(R),K=be===""?"."+ue(R,0):be,U(W)?(T="",K!=null&&(T=K.replace(xe,"$&/")+"/"),H(W,Q,T,"",function(Oe){return Oe})):W!=null&&(Z(W)&&(W=L(W,T+(W.key==null||R&&R.key===W.key?"":(""+W.key).replace(xe,"$&/")+"/")+K)),Q.push(W)),1;K=0;var se=be===""?".":be+":";if(U(R))for(var he=0;he<R.length;he++)be=R[he],fe=se+ue(be,he),K+=H(be,Q,T,fe,W);else if(he=x(R),typeof he=="function")for(R=he.call(R),he=0;!(be=R.next()).done;)be=be.value,fe=se+ue(be,he++),K+=H(be,Q,T,fe,W);else if(fe==="object"){if(typeof R.then=="function")return H(J(R),Q,T,be,W);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 K}function ce(R,Q,T){if(R==null)return R;var be=[],W=0;return H(R,be,"","",function(fe){return Q.call(T,fe,W++)}),be}function de(R){if(R._status===-1){var Q=R._result;Q=Q(),Q.then(function(T){(R._status===0||R._status===-1)&&(R._status=1,R._result=T)},function(T){(R._status===0||R._status===-1)&&(R._status=2,R._result=T)}),R._status===-1&&(R._status=0,R._result=Q)}if(R._status===1)return R._result.default;throw R._result}var ae=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,T){ce(R,function(){Q.apply(this,arguments)},T)},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(!Z(R))throw Error("React.Children.only expected to receive a single React element child.");return R}};return Be.Activity=g,Be.Children=O,Be.Component=S,Be.Fragment=n,Be.Profiler=s,Be.PureComponent=A,Be.StrictMode=a,Be.Suspense=p,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,Be.__COMPILER_RUNTIME={__proto__:null,c:function(R){return F.H.useMemoCache(R)}},Be.cache=function(R){return function(){return R.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(R,Q,T){if(R==null)throw Error("The argument must be a React element, but you passed "+R+".");var be=w({},R.props),W=R.key;if(Q!=null)for(fe in Q.key!==void 0&&(W=""+Q.key),Q)!$.call(Q,fe)||fe==="key"||fe==="__self"||fe==="__source"||fe==="ref"&&Q.ref===void 0||(be[fe]=Q[fe]);var fe=arguments.length-2;if(fe===1)be.children=T;else if(1<fe){for(var K=Array(fe),se=0;se<fe;se++)K[se]=arguments[se+2];be.children=K}return ee(R.type,W,be)},Be.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},Be.createElement=function(R,Q,T){var be,W={},fe=null;if(Q!=null)for(be in Q.key!==void 0&&(fe=""+Q.key),Q)$.call(Q,be)&&be!=="key"&&be!=="__self"&&be!=="__source"&&(W[be]=Q[be]);var K=arguments.length-2;if(K===1)W.children=T;else if(1<K){for(var se=Array(K),he=0;he<K;he++)se[he]=arguments[he+2];W.children=se}if(R&&R.defaultProps)for(be in K=R.defaultProps,K)W[be]===void 0&&(W[be]=K[be]);return ee(R,fe,W)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(R){return{$$typeof:d,render:R}},Be.isValidElement=Z,Be.lazy=function(R){return{$$typeof:b,_payload:{_status:-1,_result:R},_init:de}},Be.memo=function(R,Q){return{$$typeof:h,type:R,compare:Q===void 0?null:Q}},Be.startTransition=function(R){var Q=F.T,T={};F.T=T;try{var be=R(),W=F.S;W!==null&&W(T,be),typeof be=="object"&&be!==null&&typeof be.then=="function"&&be.then(M,ae)}catch(fe){ae(fe)}finally{Q!==null&&T.types!==null&&(Q.types=T.types),F.T=Q}},Be.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},Be.use=function(R){return F.H.use(R)},Be.useActionState=function(R,Q,T){return F.H.useActionState(R,Q,T)},Be.useCallback=function(R,Q){return F.H.useCallback(R,Q)},Be.useContext=function(R){return F.H.useContext(R)},Be.useDebugValue=function(){},Be.useDeferredValue=function(R,Q){return F.H.useDeferredValue(R,Q)},Be.useEffect=function(R,Q){return F.H.useEffect(R,Q)},Be.useEffectEvent=function(R){return F.H.useEffectEvent(R)},Be.useId=function(){return F.H.useId()},Be.useImperativeHandle=function(R,Q,T){return F.H.useImperativeHandle(R,Q,T)},Be.useInsertionEffect=function(R,Q){return F.H.useInsertionEffect(R,Q)},Be.useLayoutEffect=function(R,Q){return F.H.useLayoutEffect(R,Q)},Be.useMemo=function(R,Q){return F.H.useMemo(R,Q)},Be.useOptimistic=function(R,Q){return F.H.useOptimistic(R,Q)},Be.useReducer=function(R,Q,T){return F.H.useReducer(R,Q,T)},Be.useRef=function(R){return F.H.useRef(R)},Be.useState=function(R){return F.H.useState(R)},Be.useSyncExternalStore=function(R,Q,T){return F.H.useSyncExternalStore(R,Q,T)},Be.useTransition=function(){return F.H.useTransition()},Be.version="19.2.5",Be}var wv;function Im(){return wv||(wv=1,cp.exports=tN()),cp.exports}var C=Im(),up={exports:{}},qo={},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 Ev;function nN(){return Ev||(Ev=1,(function(e){function t(H,ce){var de=H.length;H.push(ce);e:for(;0<de;){var ae=de-1>>>1,O=H[ae];if(0<s(O,ce))H[ae]=ce,H[de]=O,de=ae;else break e}}function n(H){return H.length===0?null:H[0]}function a(H){if(H.length===0)return null;var ce=H[0],de=H.pop();if(de!==ce){H[0]=de;e:for(var ae=0,O=H.length,R=O>>>1;ae<R;){var Q=2*(ae+1)-1,T=H[Q],be=Q+1,W=H[be];if(0>s(T,de))be<O&&0>s(W,T)?(H[ae]=W,H[be]=de,ae=be):(H[ae]=T,H[Q]=de,ae=Q);else if(be<O&&0>s(W,de))H[ae]=W,H[be]=de,ae=be;else break e}}return ce}function s(H,ce){var de=H.sortIndex-ce.sortIndex;return de!==0?de:H.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 p=[],h=[],b=1,g=null,v=3,x=!1,k=!1,w=!1,_=!1,S=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;function D(H){for(var ce=n(h);ce!==null;){if(ce.callback===null)a(h);else if(ce.startTime<=H)a(h),ce.sortIndex=ce.expirationTime,t(p,ce);else break;ce=n(h)}}function U(H){if(w=!1,D(H),!k)if(n(p)!==null)k=!0,M||(M=!0,ie());else{var ce=n(h);ce!==null&&J(U,ce.startTime-H)}}var M=!1,F=-1,$=5,ee=-1;function L(){return _?!0:!(e.unstable_now()-ee<$)}function Z(){if(_=!1,M){var H=e.unstable_now();ee=H;var ce=!0;try{e:{k=!1,w&&(w=!1,j(F),F=-1),x=!0;var de=v;try{t:{for(D(H),g=n(p);g!==null&&!(g.expirationTime>H&&L());){var ae=g.callback;if(typeof ae=="function"){g.callback=null,v=g.priorityLevel;var O=ae(g.expirationTime<=H);if(H=e.unstable_now(),typeof O=="function"){g.callback=O,D(H),ce=!0;break t}g===n(p)&&a(p),D(H)}else a(p);g=n(p)}if(g!==null)ce=!0;else{var R=n(h);R!==null&&J(U,R.startTime-H),ce=!1}}break e}finally{g=null,v=de,x=!1}ce=void 0}}finally{ce?ie():M=!1}}}var ie;if(typeof A=="function")ie=function(){A(Z)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,ue=xe.port2;xe.port1.onmessage=Z,ie=function(){ue.postMessage(null)}}else ie=function(){S(Z,0)};function J(H,ce){F=S(function(){H(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(H){H.callback=null},e.unstable_forceFrameRate=function(H){0>H||125<H?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):$=0<H?Math.floor(1e3/H):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_next=function(H){switch(v){case 1:case 2:case 3:var ce=3;break;default:ce=v}var de=v;v=ce;try{return H()}finally{v=de}},e.unstable_requestPaint=function(){_=!0},e.unstable_runWithPriority=function(H,ce){switch(H){case 1:case 2:case 3:case 4:case 5:break;default:H=3}var de=v;v=H;try{return ce()}finally{v=de}},e.unstable_scheduleCallback=function(H,ce,de){var ae=e.unstable_now();switch(typeof de=="object"&&de!==null?(de=de.delay,de=typeof de=="number"&&0<de?ae+de:ae):de=ae,H){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,H={id:b++,callback:ce,priorityLevel:H,startTime:de,expirationTime:O,sortIndex:-1},de>ae?(H.sortIndex=de,t(h,H),n(p)===null&&H===n(h)&&(w?(j(F),F=-1):w=!0,J(U,de-ae))):(H.sortIndex=O,t(p,H),k||x||(k=!0,M||(M=!0,ie()))),H},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(H){var ce=v;return function(){var de=v;v=ce;try{return H.apply(this,arguments)}finally{v=de}}}})(fp)),fp}var kv;function iN(){return kv||(kv=1,dp.exports=nN()),dp.exports}var hp={exports:{}},gn={};/**
|
|
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 gn;Sv=1;var e=Im();function t(p){var h="https://react.dev/errors/"+p;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)h+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+p+"; visit "+h+" 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(p,h,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:p,containerInfo:h,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function d(p,h){if(p==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,gn.createPortal=function(p,h){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(t(299));return o(p,h,null,b)},gn.flushSync=function(p){var h=c.T,b=a.p;try{if(c.T=null,a.p=2,p)return p()}finally{c.T=h,a.p=b,a.d.f()}},gn.preconnect=function(p,h){typeof p=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,a.d.C(p,h))},gn.prefetchDNS=function(p){typeof p=="string"&&a.d.D(p)},gn.preinit=function(p,h){if(typeof p=="string"&&h&&typeof h.as=="string"){var b=h.as,g=d(b,h.crossOrigin),v=typeof h.integrity=="string"?h.integrity:void 0,x=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;b==="style"?a.d.S(p,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:g,integrity:v,fetchPriority:x}):b==="script"&&a.d.X(p,{crossOrigin:g,integrity:v,fetchPriority:x,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},gn.preinitModule=function(p,h){if(typeof p=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var b=d(h.as,h.crossOrigin);a.d.M(p,{crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&a.d.M(p)},gn.preload=function(p,h){if(typeof p=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var b=h.as,g=d(b,h.crossOrigin);a.d.L(p,b,{crossOrigin:g,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},gn.preloadModule=function(p,h){if(typeof p=="string")if(h){var b=d(h.as,h.crossOrigin);a.d.m(p,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:b,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else a.d.m(p)},gn.requestFormReset=function(p){a.d.r(p)},gn.unstable_batchedUpdates=function(p,h){return p(h)},gn.useFormState=function(p,h,b){return c.H.useFormState(p,h,b)},gn.useFormStatus=function(){return c.H.useHostTransitionStatus()},gn.version="19.2.5",gn}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 qo;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 p(i){if(o(i)!==i)throw Error(a(188))}function h(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 p(m),i;if(y===u)return p(m),r;y=y.sibling}throw Error(a(188))}if(l.return!==u.return)l=m,u=y;else{for(var E=!1,N=m.child;N;){if(N===l){E=!0,l=m,u=y;break}if(N===u){E=!0,u=m,l=y;break}N=N.sibling}if(!E){for(N=y.child;N;){if(N===l){E=!0,l=y,u=m;break}if(N===u){E=!0,u=y,l=m;break}N=N.sibling}if(!E)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"),k=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),S=Symbol.for("react.profiler"),j=Symbol.for("react.consumer"),A=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),U=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),$=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),Z=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Z&&i[Z]||i["@@iterator"],typeof i=="function"?i:null)}var xe=Symbol.for("react.client.reference");function ue(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===xe?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case S:return"Profiler";case _:return"StrictMode";case U:return"Suspense";case M:return"SuspenseList";case ee:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case k:return"Portal";case A:return i.displayName||"Context";case j: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 F:return r=i.displayName||null,r!==null?r:ue(i.type)||"Memo";case $:r=i._payload,i=i._init;try{return ue(i(r))}catch{}}return null}var J=Array.isArray,H=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},ae=[],O=-1;function R(i){return{current:i}}function Q(i){0>O||(i.current=ae[O],ae[O]=null,O--)}function T(i,r){O++,ae[O]=i.current,i.current=r}var be=R(null),W=R(null),fe=R(null),K=R(null);function se(i,r){switch(T(fe,r),T(W,i),T(be,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(be),T(be,i)}function he(){Q(be),Q(W),Q(fe)}function Oe(i){i.memoizedState!==null&&T(K,i);var r=be.current,l=Px(r,i.type);r!==l&&(T(W,i),T(be,l))}function pt(i){W.current===i&&(Q(be),Q(W)),K.current===i&&(Q(K),Bo._currentValue=de)}var xt,ci;function Yn(i){if(xt===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);xt=r&&r[1]||"",ci=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+xt+i+ci}var Pi=!1;function Je(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(X){var V=X}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(X){V=X}i.call(oe.prototype)}}else{try{throw Error()}catch(X){V=X}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(X){if(X&&V&&typeof X.stack=="string")return[X.stack,V.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(),E=y[0],N=y[1];if(E&&N){var I=E.split(`
|
|
44
|
-
`),Y=N.split(`
|
|
45
|
-
`);for(m=u=0;u<I.length&&!I[u].includes("DetermineComponentFrameRoot");)u++;for(;m<Y.length&&!Y[m].includes("DetermineComponentFrameRoot");)m++;if(u===I.length||m===Y.length)for(u=I.length-1,m=Y.length-1;1<=u&&0<=m&&I[u]!==Y[m];)m--;for(;1<=u&&0<=m;u--,m--)if(I[u]!==Y[m]){if(u!==1||m!==1)do if(u--,m--,0>m||I[u]!==Y[m]){var ne=`
|
|
46
|
-
`+I[u].replace(" at new "," at ");return i.displayName&&ne.includes("<anonymous>")&&(ne=ne.replace("<anonymous>",i.displayName)),ne}while(1<=u&&0<=m);break}}}finally{Pi=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Yn(l):""}function Ti(i,r){switch(i.tag){case 26:case 27:case 5:return Yn(i.type);case 16:return Yn("Lazy");case 13:return i.child!==r&&r!==null?Yn("Suspense Fallback"):Yn("Suspense");case 19:return Yn("SuspenseList");case 0:case 15:return Je(i.type,!1);case 11:return Je(i.type.render,!1);case 1:return Je(i.type,!0);case 31:return Yn("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,Yl=e.unstable_shouldYield,ys=e.unstable_requestPaint,Rt=e.unstable_now,xs=e.unstable_getCurrentPriorityLevel,te=e.unstable_ImmediatePriority,ge=e.unstable_UserBlockingPriority,Re=e.unstable_NormalPriority,Ke=e.unstable_LowPriority,it=e.unstable_IdlePriority,wn=e.log,Ai=e.unstable_setDisableYieldValue,ln=null,Ut=null;function hn(i){if(typeof wn=="function"&&Ai(i),Ut&&typeof Ut.setStrictMode=="function")try{Ut.setStrictMode(ln,i)}catch{}}var ct=Math.clz32?Math.clz32:jc,$i=Math.log,En=Math.LN2;function jc(i){return i>>>=0,i===0?32:31-($i(i)/En|0)|0}var Ar=256,vs=262144,jr=4194304;function jn(i){var r=i&42;if(r!==0)return r;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var m=0,y=i.suspendedLanes,E=i.pingedLanes;i=i.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?m=jn(u):(E&=N,E!==0?m=jn(E):l||(l=N&~i,l!==0&&(m=jn(l))))):(N=u&~y,N!==0?m=jn(N):E!==0?m=jn(E):l||(l=u&~i,l!==0&&(m=jn(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 re(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 Nt(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 E=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var N=i.entanglements,I=i.expirationTimes,Y=i.hiddenUpdates;for(l=E&~l;0<l;){var ne=31-ct(l),oe=1<<ne;N[ne]=0,I[ne]=-1;var V=Y[ne];if(V!==null)for(Y[ne]=null,ne=0;ne<V.length;ne++){var X=V[ne];X!==null&&(X.lane&=-536870913)}l&=~oe}u!==0&&Ee(i,u,0),y!==0&&m===0&&i.tag!==0&&(i.suspendedLanes|=y&~(E&~r))}function Ee(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-ct(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-ct(l),m=1<<u;m&r|i[u]&r&&(i[u]|=r),l&=~m}}function Ht(i,r){var l=r&-r;return l=(l&42)!==0?1:At(l),(l&(i.suspendedLanes|r))!==0?0:l}function At(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 Es(i,r){var l=ce.p;try{return ce.p=i,r()}finally{ce.p=l}}var qi=Math.random().toString(36).slice(2),Kt="__reactFiber$"+qi,pn="__reactProps$"+qi,Ra="__reactContainer$"+qi,Ql="__reactEvents$"+qi,Oc="__reactListeners$"+qi,ks="__reactHandles$"+qi,Dc="__reactResources$"+qi,Or="__reactMarker$"+qi;function Vl(i){delete i[Kt],delete i[pn],delete i[Ql],delete i[Oc],delete i[ks]}function kn(i){var r=i[Kt];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ra]||l[Kt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Yx(i);i!==null;){if(l=i[Kt])return l;i=Yx(i)}return r}i=l,l=i.parentNode}return null}function aa(i){if(i=i[Kt]||i[Ra]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function Ma(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 Vt(i){i[Or]=!0}var Rc=new Set,Dr={};function ra(i,r){pe(i,r),pe(i+"Capture",r)}function pe(i,r){for(Dr[i]=r,i=0;i<r.length;i++)Rc.add(r[i])}var Te=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]*$"),Ge={},ut={};function Gt(i){return Fi.call(ut,i)?!0:Fi.call(Ge,i)?!1:Te.test(i)?ut[i]=!0:(Ge[i]=!0,!1)}function mn(i,r,l){if(Gt(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 Qn(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 On(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 St(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Vn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function Mc(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(E){l=""+E,y.call(this,E)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(E){l=""+E},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function Ss(i){if(!i._valueTracker){var r=Vn(i)?"checked":"value";i._valueTracker=Mc(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=Vn(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 Dn(i){return i.replace(sf,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Xl(i,r,l,u,m,y,E,N){i.name="",E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"?i.type=E:i.removeAttribute("type"),r!=null?E==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+St(r)):i.value!==""+St(r)&&(i.value=""+St(r)):E!=="submit"&&E!=="reset"||i.removeAttribute("value"),r!=null?Ns(i,E,St(r)):l!=null?Ns(i,E,St(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=""+St(N):i.removeAttribute("name")}function Rr(i,r,l,u,m,y,E,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?""+St(l):"",r=r!=null?""+St(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,E!=null&&typeof E!="function"&&typeof E!="symbol"&&typeof E!="boolean"&&(i.name=E),Ss(i)}function Ns(i,r,l){r==="number"&&_s(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function on(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=""+St(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=""+St(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+St(l):""}function Cs(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(J(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=St(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 Wt(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 dt(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&&Wt(i,m,u)}else for(var y in r)r.hasOwnProperty(y)&&Wt(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 ye(){}var _e=null;function Pe(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var We=null,Mt=null;function di(i){var r=aa(i);if(r&&(i=r.stateNode)){var l=i[pn]||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="'+Dn(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var m=u[pn]||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&&on(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,(We!==null||Mt!==null)&&(Su(),We&&(r=We,i=Mt,Mt=We=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[pn]||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 E=l-i;for(u=1;u<=E&&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 Rn(i){function r(l,u,m,y,E){this._reactName=l,this._targetInst=m,this.type=u,this.nativeEvent=y,this.target=E,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 Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Fc=Rn(Mr),no=g({},Mr,{view:0,detail:0}),Vk=Rn(no),cf,uf,io,$c=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}}),$g=Rn($c),Wk=g({},$c,{dataTransfer:0}),Xk=Rn(Wk),Zk=g({},no,{relatedTarget:0}),df=Rn(Zk),Jk=g({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),eS=Rn(Jk),tS=g({},Mr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),nS=Rn(tS),iS=g({},Mr,{data:0}),qg=Rn(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=Rn(oS),uS=g({},$c,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Hg=Rn(uS),dS=g({},no,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:ff}),fS=Rn(dS),hS=g({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),pS=Rn(hS),mS=g({},$c,{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=Rn(mS),bS=g({},Mr,{newState:0,oldState:0}),yS=Rn(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=" ",Yg=!1;function Qg(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:(Yg=!0,Gg);case"textInput":return i=r.data,i===Gg&&Yg?null:i;default:return null}}function ES(i,r){if(Ts)return i==="compositionend"||!hf&&Qg(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 kS={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"?!!kS[i.type]:r==="textarea"}function Xg(i,r,l,u){We?Mt?Mt.push(u):Mt=[u]:We=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){Rx(i,0)}function qc(i){var r=Ma(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"&&qc(so)){var r=[];Xg(r,so,i,Pe(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 qc(so)}function CS(i,r){if(i==="click")return qc(r)}function TS(i,r){if(i==="input"||i==="change")return qc(r)}function AS(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Wn=typeof Object.is=="function"?Object.is:AS;function lo(i,r){if(Wn(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)||!Wn(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"),RS=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 E=u.pending;E===null?m.next=m:(m.next=E.next,E.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 Ef(i,r,l,u){return Gc(i,r,l,u),Yc(i)}function zr(i,r){return Gc(i,null,null,r),Yc(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-ct(l),i=y.hiddenUpdates,u=i[m],u===null?i[m]=[r]:u.push(r),r.lane=l|536870912),y):null}function Yc(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 MS(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 Xn(i,r,l,u){return new MS(i,r,l,u)}function kf(i){return i=i.prototype,!(!i||!i.isReactComponent)}function oa(i,r){var l=i.alternate;return l===null?(l=Xn(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 Qc(i,r,l,u,m,y){var E=0;if(u=i,typeof i=="function")kf(i)&&(E=1);else if(typeof i=="string")E=U_(i,l,be.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case ee:return i=Xn(31,l,r,m),i.elementType=ee,i.lanes=y,i;case w:return Br(l.children,m,y,r);case _:E=8,m|=24;break;case S:return i=Xn(12,l,r,m|2),i.elementType=S,i.lanes=y,i;case U:return i=Xn(13,l,r,m),i.elementType=U,i.lanes=y,i;case M:return i=Xn(19,l,r,m),i.elementType=M,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case A:E=10;break e;case j:E=9;break e;case D:E=11;break e;case F:E=14;break e;case $:E=16,u=null;break e}E=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Xn(E,l,r,m),r.elementType=i,r.type=u,r.lanes=y,r}function Br(i,r,l,u){return i=Xn(7,i,u,r),i.lanes=l,i}function Sf(i,r,l){return i=Xn(6,i,null,r),i.lanes=l,i}function gb(i){var r=Xn(18,null,null,0);return r.stateNode=i,r}function _f(i,r,l){return r=Xn(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 Rs=[],Ms=0,Vc=null,co=0,pi=[],mi=0,Ua=null,Hi=1,Ki="";function ca(i,r){Rs[Ms++]=co,Rs[Ms++]=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-ct(u)-1;u&=~(1<<m),l+=1;var y=32-ct(r)+m;if(30<y){var E=m-m%5;y=(u&(1<<E)-1).toString(32),u>>=E,m-=E,Hi=1<<32-ct(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=Rs[--Ms],Rs[Ms]=null,co=Rs[--Ms],Rs[Ms]=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 cn=null,Ct=null,et=!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[Kt]=i,r[pn]=u,l){case"dialog":Qe("cancel",r),Qe("close",r);break;case"iframe":case"object":case"embed":Qe("load",r);break;case"video":case"audio":for(l=0;l<Ro.length;l++)Qe(Ro[l],r);break;case"source":Qe("error",r);break;case"img":case"image":case"link":Qe("error",r),Qe("load",r);break;case"details":Qe("toggle",r);break;case"input":Qe("invalid",r),Rr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Qe("invalid",r);break;case"textarea":Qe("invalid",r),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&&(Qe("beforetoggle",r),Qe("toggle",r)),u.onScroll!=null&&Qe("scroll",r),u.onScrollEnd!=null&&Qe("scrollend",r),u.onClick!=null&&(r.onclick=ye),r=!0):r=!1,r||Fa(i,!0)}function wb(i){for(cn=i.return;cn;)switch(cn.tag){case 5:case 31:case 13:gi=!1;return;case 27:case 3:gi=!0;return;default:cn=cn.return}}function Ls(i){if(i!==cn)return!1;if(!et)return wb(i),et=!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&&Ct&&Fa(i),wb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Ct=Gx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Ct=Gx(i)}else r===27?(r=Ct,tr(i.type)?(i=Xh,Xh=null,Ct=i):Ct=r):Ct=cn?yi(i.stateNode.nextSibling):null;return!0}function Ur(){Ct=cn=null,et=!1}function Af(){var i=Pa;return i!==null&&(zn===null?zn=i:zn.push.apply(zn,i),Pa=null),i}function uo(i){Pa===null?Pa=[i]:Pa.push(i)}var jf=R(null),Pr=null,ua=null;function $a(i,r,l){T(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 E=m.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=m;for(var I=0;I<r.length;I++)if(N.context===r[I]){y.lanes|=l,N=y.alternate,N!==null&&(N.lanes|=l),Of(y.return,l,i),u||(E=null);break e}y=N.next}}else if(m.tag===18){if(E=m.return,E===null)throw Error(a(341));E.lanes|=l,y=E.alternate,y!==null&&(y.lanes|=l),Of(E,l,i),E=null}else E=m.child;if(E!==null)E.return=m;else for(E=m;E!==null;){if(E===i){E=null;break}if(m=E.sibling,m!==null){m.return=E.return,E=m;break}E=E.return}m=E}}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 E=m.alternate;if(E===null)throw Error(a(387));if(E=E.memoizedProps,E!==null){var N=m.type;Wn(m.pendingProps.value,E.value)||(i!==null?i.push(N):i=[N])}}else if(m===K.current){if(E=m.alternate,E===null)throw Error(a(387));E.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(!Wn(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 un(i){return Eb(Pr,i)}function Xc(i,r){return Pr===null&&Fr(i),Eb(i,r)}function Eb(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,Xt={$$typeof:A,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Rf(){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,Mf=0,zs=0,Bs=null;function BS(i,r){if(ho===null){var l=ho=[];Mf=0,zs=zh(),Bs={status:"pending",value:void 0,then:function(u){l.push(u)}}}return Mf++,r.then(kb,kb),r}function kb(){if(--Mf===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=H.S;H.S=function(i,r){lx=Rt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&BS(i,r),Sb!==null&&Sb(i,r)};var $r=R(null);function Lf(){var i=$r.current;return i!==null?i:wt.pooledCache}function Zc(i,r){r===null?T($r,$r.current):T($r,r.pool)}function _b(){var i=Lf();return i===null?null:{parent:Xt._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(ye,ye),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(ye,ye);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 qr(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(q,P){if(i){var G=q.deletions;G===null?(q.deletions=[P],q.flags|=16):G.push(P)}}function l(q,P){if(!i)return null;for(;P!==null;)r(q,P),P=P.sibling;return null}function u(q){for(var P=new Map;q!==null;)q.key!==null?P.set(q.key,q):P.set(q.index,q),q=q.sibling;return P}function m(q,P){return q=oa(q,P),q.index=0,q.sibling=null,q}function y(q,P,G){return q.index=G,i?(G=q.alternate,G!==null?(G=G.index,G<P?(q.flags|=67108866,P):G):(q.flags|=67108866,P)):(q.flags|=1048576,P)}function E(q){return i&&q.alternate===null&&(q.flags|=67108866),q}function N(q,P,G,le){return P===null||P.tag!==6?(P=Sf(G,q.mode,le),P.return=q,P):(P=m(P,G),P.return=q,P)}function I(q,P,G,le){var je=G.type;return je===w?ne(q,P,G.props.children,le,G.key):P!==null&&(P.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===$&&qr(je)===P.type)?(P=m(P,G.props),mo(P,G),P.return=q,P):(P=Qc(G.type,G.key,G.props,null,q.mode,le),mo(P,G),P.return=q,P)}function Y(q,P,G,le){return P===null||P.tag!==4||P.stateNode.containerInfo!==G.containerInfo||P.stateNode.implementation!==G.implementation?(P=_f(G,q.mode,le),P.return=q,P):(P=m(P,G.children||[]),P.return=q,P)}function ne(q,P,G,le,je){return P===null||P.tag!==7?(P=Br(G,q.mode,le,je),P.return=q,P):(P=m(P,G),P.return=q,P)}function oe(q,P,G){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return P=Sf(""+P,q.mode,G),P.return=q,P;if(typeof P=="object"&&P!==null){switch(P.$$typeof){case x:return G=Qc(P.type,P.key,P.props,null,q.mode,G),mo(G,P),G.return=q,G;case k:return P=_f(P,q.mode,G),P.return=q,P;case $:return P=qr(P),oe(q,P,G)}if(J(P)||ie(P))return P=Br(P,q.mode,G,null),P.return=q,P;if(typeof P.then=="function")return oe(q,tu(P),G);if(P.$$typeof===A)return oe(q,Xc(q,P),G);nu(q,P)}return null}function V(q,P,G,le){var je=P!==null?P.key:null;if(typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint")return je!==null?null:N(q,P,""+G,le);if(typeof G=="object"&&G!==null){switch(G.$$typeof){case x:return G.key===je?I(q,P,G,le):null;case k:return G.key===je?Y(q,P,G,le):null;case $:return G=qr(G),V(q,P,G,le)}if(J(G)||ie(G))return je!==null?null:ne(q,P,G,le,null);if(typeof G.then=="function")return V(q,P,tu(G),le);if(G.$$typeof===A)return V(q,P,Xc(q,G),le);nu(q,G)}return null}function X(q,P,G,le,je){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return q=q.get(G)||null,N(P,q,""+le,je);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case x:return q=q.get(le.key===null?G:le.key)||null,I(P,q,le,je);case k:return q=q.get(le.key===null?G:le.key)||null,Y(P,q,le,je);case $:return le=qr(le),X(q,P,G,le,je)}if(J(le)||ie(le))return q=q.get(G)||null,ne(P,q,le,je,null);if(typeof le.then=="function")return X(q,P,G,tu(le),je);if(le.$$typeof===A)return X(q,P,G,Xc(P,le),je);nu(P,le)}return null}function ke(q,P,G,le){for(var je=null,at=null,Ne=P,$e=P=0,Ze=null;Ne!==null&&$e<G.length;$e++){Ne.index>$e?(Ze=Ne,Ne=null):Ze=Ne.sibling;var rt=V(q,Ne,G[$e],le);if(rt===null){Ne===null&&(Ne=Ze);break}i&&Ne&&rt.alternate===null&&r(q,Ne),P=y(rt,P,$e),at===null?je=rt:at.sibling=rt,at=rt,Ne=Ze}if($e===G.length)return l(q,Ne),et&&ca(q,$e),je;if(Ne===null){for(;$e<G.length;$e++)Ne=oe(q,G[$e],le),Ne!==null&&(P=y(Ne,P,$e),at===null?je=Ne:at.sibling=Ne,at=Ne);return et&&ca(q,$e),je}for(Ne=u(Ne);$e<G.length;$e++)Ze=X(Ne,q,$e,G[$e],le),Ze!==null&&(i&&Ze.alternate!==null&&Ne.delete(Ze.key===null?$e:Ze.key),P=y(Ze,P,$e),at===null?je=Ze:at.sibling=Ze,at=Ze);return i&&Ne.forEach(function(sr){return r(q,sr)}),et&&ca(q,$e),je}function Me(q,P,G,le){if(G==null)throw Error(a(151));for(var je=null,at=null,Ne=P,$e=P=0,Ze=null,rt=G.next();Ne!==null&&!rt.done;$e++,rt=G.next()){Ne.index>$e?(Ze=Ne,Ne=null):Ze=Ne.sibling;var sr=V(q,Ne,rt.value,le);if(sr===null){Ne===null&&(Ne=Ze);break}i&&Ne&&sr.alternate===null&&r(q,Ne),P=y(sr,P,$e),at===null?je=sr:at.sibling=sr,at=sr,Ne=Ze}if(rt.done)return l(q,Ne),et&&ca(q,$e),je;if(Ne===null){for(;!rt.done;$e++,rt=G.next())rt=oe(q,rt.value,le),rt!==null&&(P=y(rt,P,$e),at===null?je=rt:at.sibling=rt,at=rt);return et&&ca(q,$e),je}for(Ne=u(Ne);!rt.done;$e++,rt=G.next())rt=X(Ne,q,$e,rt.value,le),rt!==null&&(i&&rt.alternate!==null&&Ne.delete(rt.key===null?$e:rt.key),P=y(rt,P,$e),at===null?je=rt:at.sibling=rt,at=rt);return i&&Ne.forEach(function(W_){return r(q,W_)}),et&&ca(q,$e),je}function bt(q,P,G,le){if(typeof G=="object"&&G!==null&&G.type===w&&G.key===null&&(G=G.props.children),typeof G=="object"&&G!==null){switch(G.$$typeof){case x:e:{for(var je=G.key;P!==null;){if(P.key===je){if(je=G.type,je===w){if(P.tag===7){l(q,P.sibling),le=m(P,G.props.children),le.return=q,q=le;break e}}else if(P.elementType===je||typeof je=="object"&&je!==null&&je.$$typeof===$&&qr(je)===P.type){l(q,P.sibling),le=m(P,G.props),mo(le,G),le.return=q,q=le;break e}l(q,P);break}else r(q,P);P=P.sibling}G.type===w?(le=Br(G.props.children,q.mode,le,G.key),le.return=q,q=le):(le=Qc(G.type,G.key,G.props,null,q.mode,le),mo(le,G),le.return=q,q=le)}return E(q);case k:e:{for(je=G.key;P!==null;){if(P.key===je)if(P.tag===4&&P.stateNode.containerInfo===G.containerInfo&&P.stateNode.implementation===G.implementation){l(q,P.sibling),le=m(P,G.children||[]),le.return=q,q=le;break e}else{l(q,P);break}else r(q,P);P=P.sibling}le=_f(G,q.mode,le),le.return=q,q=le}return E(q);case $:return G=qr(G),bt(q,P,G,le)}if(J(G))return ke(q,P,G,le);if(ie(G)){if(je=ie(G),typeof je!="function")throw Error(a(150));return G=je.call(G),Me(q,P,G,le)}if(typeof G.then=="function")return bt(q,P,tu(G),le);if(G.$$typeof===A)return bt(q,P,Xc(q,G),le);nu(q,G)}return typeof G=="string"&&G!==""||typeof G=="number"||typeof G=="bigint"?(G=""+G,P!==null&&P.tag===6?(l(q,P.sibling),le=m(P,G),le.return=q,q=le):(l(q,P),le=Sf(G,q.mode,le),le.return=q,q=le),E(q)):l(q,P)}return function(q,P,G,le){try{po=0;var je=bt(q,P,G,le);return Ps=null,je}catch(Ne){if(Ne===Us||Ne===Jc)throw Ne;var at=Xn(29,Ne,null,q.mode);return at.lanes=le,at.return=q,at}finally{}}}var Kr=jb(!0),Ob=jb(!1),qa=!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,(st&2)!==0){var m=u.pending;return m===null?r.next=r:(r.next=m.next,m.next=r),u.pending=r,r=Yc(i),pb(i,null,l),r}return Gc(i,u,r,l),Yc(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 E={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};y===null?m=y=E:y=y.next=E,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;qa=!1;var y=m.firstBaseUpdate,E=m.lastBaseUpdate,N=m.shared.pending;if(N!==null){m.shared.pending=null;var I=N,Y=I.next;I.next=null,E===null?y=Y:E.next=Y,E=I;var ne=i.alternate;ne!==null&&(ne=ne.updateQueue,N=ne.lastBaseUpdate,N!==E&&(N===null?ne.firstBaseUpdate=Y:N.next=Y,ne.lastBaseUpdate=I))}if(y!==null){var oe=m.baseState;E=0,ne=Y=I=null,N=y;do{var V=N.lane&-536870913,X=V!==N.lane;if(X?(Xe&V)===V:(u&V)===V){V!==0&&V===zs&&(Pf=!0),ne!==null&&(ne=ne.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var ke=i,Me=N;V=r;var bt=l;switch(Me.tag){case 1:if(ke=Me.payload,typeof ke=="function"){oe=ke.call(bt,oe,V);break e}oe=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Me.payload,V=typeof ke=="function"?ke.call(bt,oe,V):ke,V==null)break e;oe=g({},oe,V);break e;case 2:qa=!0}}V=N.callback,V!==null&&(i.flags|=64,X&&(i.flags|=8192),X=m.callbacks,X===null?m.callbacks=[V]:X.push(V))}else X={lane:V,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ne===null?(Y=ne=X,I=oe):ne=ne.next=X,E|=V;if(N=N.next,N===null){if(N=m.shared.pending,N===null)break;X=N,N=X.next,X.next=null,m.lastBaseUpdate=X,m.shared.pending=null}}while(!0);ne===null&&(I=oe),m.baseState=I,m.firstBaseUpdate=Y,m.lastBaseUpdate=ne,y===null&&(m.shared.lanes=0),Wa|=E,i.lanes=E,i.memoizedState=oe}}function Db(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Rb(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 Mb(i,r){i=va,T(iu,i),T(Fs,r),va=i|r.baseLanes}function Ff(){T(iu,va),T(Fs,Fs.current)}function $f(){va=iu.current,Q(Fs),Q(iu)}var Zn=R(null),bi=null;function Ga(i){var r=i.alternate;T(Yt,Yt.current&1),T(Zn,i),bi===null&&(r===null||Fs.current!==null||r.memoizedState!==null)&&(bi=i)}function qf(i){T(Yt,Yt.current),T(Zn,i),bi===null&&(bi=i)}function Lb(i){i.tag===22?(T(Yt,Yt.current),T(Zn,i),bi===null&&(bi=i)):Ya()}function Ya(){T(Yt,Yt.current),T(Zn,Zn.current)}function Jn(i){Q(Zn),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,Fe=null,mt=null,Zt=null,ru=!1,$s=!1,Gr=!1,su=0,xo=0,qs=null,PS=0;function Pt(){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(!Wn(i[l],r[l]))return!1;return!0}function Kf(i,r,l,u,m,y){return fa=y,Fe=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,H.H=i===null||i.memoizedState===null?yy:sh,Gr=!1,y=l(u,m),Gr=!1,$s&&(y=zb(r,l,u,m)),Ib(i),y}function Ib(i){H.H=Eo;var r=mt!==null&&mt.next!==null;if(fa=0,Zt=mt=Fe=null,ru=!1,xo=0,qs=null,r)throw Error(a(300));i===null||Jt||(i=i.dependencies,i!==null&&Wc(i)&&(Jt=!0))}function zb(i,r,l,u){Fe=i;var m=0;do{if($s&&(qs=null),xo=0,$s=!1,25<=m)throw Error(a(301));if(m+=1,Zt=mt=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.H=xy,y=r(l,u)}while($s);return y}function FS(){var i=H.H,r=i.useState()[0];return r=typeof r.then=="function"?vo(r):r,i=i.useState()[0],(mt!==null?mt.memoizedState:null)!==i&&(Fe.flags|=1024),r}function Gf(){var i=su!==0;return su=0,i}function Yf(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Qf(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,Zt=mt=Fe=null,$s=!1,xo=su=0,qs=null}function Sn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Zt===null?Fe.memoizedState=Zt=i:Zt=Zt.next=i,Zt}function Qt(){if(mt===null){var i=Fe.alternate;i=i!==null?i.memoizedState:null}else i=mt.next;var r=Zt===null?Fe.memoizedState:Zt.next;if(r!==null)Zt=r,mt=i;else{if(i===null)throw Fe.alternate===null?Error(a(467)):Error(a(310));mt=i,i={memoizedState:mt.memoizedState,baseState:mt.baseState,baseQueue:mt.baseQueue,queue:mt.queue,next:null},Zt===null?Fe.memoizedState=Zt=i:Zt=Zt.next=i}return Zt}function lu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function vo(i){var r=xo;return xo+=1,qs===null&&(qs=[]),i=Cb(qs,i,r),r=Fe,(Zt===null?r.memoizedState:Zt.next)===null&&(r=r.alternate,H.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===A)return un(i)}throw Error(a(438,String(i)))}function Vf(i){var r=null,l=Fe.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=Fe.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(),Fe.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]=L;return r.index++,l}function ha(i,r){return typeof r=="function"?r(i):r}function cu(i){var r=Qt();return Wf(r,mt,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 E=m.next;m.next=y.next,y.next=E}r.baseQueue=m=y,u.pending=null}if(y=i.baseState,m===null)i.memoizedState=y;else{r=m.next;var N=E=null,I=null,Y=r,ne=!1;do{var oe=Y.lane&-536870913;if(oe!==Y.lane?(Xe&oe)===oe:(fa&oe)===oe){var V=Y.revertLane;if(V===0)I!==null&&(I=I.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),oe===zs&&(ne=!0);else if((fa&V)===V){Y=Y.next,V===zs&&(ne=!0);continue}else oe={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},I===null?(N=I=oe,E=y):I=I.next=oe,Fe.lanes|=V,Wa|=V;oe=Y.action,Gr&&l(y,oe),y=Y.hasEagerState?Y.eagerState:l(y,oe)}else V={lane:oe,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},I===null?(N=I=V,E=y):I=I.next=V,Fe.lanes|=oe,Wa|=oe;Y=Y.next}while(Y!==null&&Y!==r);if(I===null?E=y:I.next=N,!Wn(y,i.memoizedState)&&(Jt=!0,ne&&(l=Bs,l!==null)))throw l;i.memoizedState=y,i.baseState=E,i.baseQueue=I,u.lastRenderedState=y}return m===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Xf(i){var r=Qt(),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 E=m=m.next;do y=i(y,E.action),E=E.next;while(E!==m);Wn(y,r.memoizedState)||(Jt=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),l.lastRenderedState=y}return[y,u]}function Bb(i,r,l){var u=Fe,m=Qt(),y=et;if(y){if(l===void 0)throw Error(a(407));l=l()}else l=r();var E=!Wn((mt||m).memoizedState,l);if(E&&(m.memoizedState=l,Jt=!0),m=m.queue,eh(Fb.bind(null,u,m,i),[i]),m.getSnapshot!==r||E||Zt!==null&&Zt.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=Fe.updateQueue,r===null?(r=lu(),Fe.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,$b(r)&&qb(i)}function Fb(i,r,l){return l(function(){$b(r)&&qb(i)})}function $b(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Wn(i,l)}catch{return!0}}function qb(i){var r=zr(i,2);r!==null&&Bn(r,i,2)}function Zf(i){var r=Sn();if(typeof i=="function"){var l=i;if(i=l(),Gr){hn(!0);try{l()}finally{hn(!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,mt,typeof u=="function"?u:ha)}function $S(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(E){y.listeners.push(E)}};H.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=H.T,E={};H.T=E;try{var N=l(m,u),I=H.S;I!==null&&I(E,N),Gb(i,r,N)}catch(Y){Jf(i,r,Y)}finally{y!==null&&E.types!==null&&(y.types=E.types),H.T=y}}else try{y=l(m,u),Gb(i,r,y)}catch(Y){Jf(i,r,Y)}}function Gb(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Yb(i,r,u)},function(u){return Jf(i,r,u)}):Yb(i,r,l)}function Yb(i,r,l){r.status="fulfilled",r.value=l,Qb(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,Qb(r),r=r.next;while(r!==u)}i.action=null}function Qb(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(et){var l=wt.formState;if(l!==null){e:{var u=Fe;if(et){if(Ct){t:{for(var m=Ct,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){Ct=yi(m.nextSibling),u=m.data==="F!";break e}}Fa(u)}u=!1}u&&(r=l[0])}}return l=Sn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Vb,lastRenderedState:r},l.queue=u,l=my.bind(null,Fe,u),u.dispatch=l,u=Zf(!1),y=rh.bind(null,Fe,!1,u.queue),u=Sn(),m={state:r,dispatch:null,action:i,pending:null},u.queue=m,l=$S.bind(null,Fe,m,y,l),m.dispatch=l,u.memoizedState=i,[r,l,!1]}function Xb(i){var r=Qt();return Zb(r,mt,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(E){throw E===Us?Jc:E}else u=r;r=Qt();var m=r.queue,y=m.dispatch;return l!==r.memoizedState&&(Fe.flags|=2048,Hs(9,{destroy:void 0},qS.bind(null,m,l),null)),[u,y,i]}function qS(i,r){i.action=r}function Jb(i){var r=Qt(),l=mt;if(l!==null)return Zb(r,l,i);Qt(),r=r.memoizedState,l=Qt();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=Fe.updateQueue,r===null&&(r=lu(),Fe.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 Qt().memoizedState}function uu(i,r,l,u){var m=Sn();Fe.flags|=i,m.memoizedState=Hs(1|r,{destroy:void 0},l,u===void 0?null:u)}function du(i,r,l,u){var m=Qt();u=u===void 0?null:u;var y=m.memoizedState.inst;mt!==null&&u!==null&&Hf(u,mt.memoizedState.deps)?m.memoizedState=Hs(r,y,l,u):(Fe.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){Fe.flags|=4;var r=Fe.updateQueue;if(r===null)r=lu(),Fe.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function ny(i){var r=Qt().memoizedState;return HS({ref:r,nextImpl:i}),function(){if((st&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=Qt();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=Qt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&Hf(r,u[1]))return u[0];if(u=i(),Gr){hn(!0);try{i()}finally{hn(!1)}}return l.memoizedState=[u,r],u}function nh(i,r,l){return l===void 0||(fa&1073741824)!==0&&(Xe&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=cx(),Fe.lanes|=i,Wa|=i,l)}function cy(i,r,l,u){return Wn(l,r)?l:Fs.current!==null?(i=nh(i,l,u),Wn(i,r)||(Jt=!0),i):(fa&42)===0||(fa&1073741824)!==0&&(Xe&261930)===0?(Jt=!0,i.memoizedState=l):(i=cx(),Fe.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 E=H.T,N={};H.T=N,rh(i,!1,r,l);try{var I=m(),Y=H.S;if(Y!==null&&Y(N,I),I!==null&&typeof I=="object"&&typeof I.then=="function"){var ne=US(I,u);wo(i,r,ne,ni(i))}else wo(i,r,u,ni(i))}catch(oe){wo(i,r,{then:function(){},status:"rejected",reason:oe},ni())}finally{ce.p=y,E!==null&&N.types!==null&&(E.types=N.types),H.T=E}}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,{},ni())}function ah(){return un(Bo)}function hy(){return Qt().memoizedState}function py(){return Qt().memoizedState}function GS(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ni();i=Ha(l);var u=Ka(r,i,l);u!==null&&(Bn(u,r,l),go(u,r,l)),r={cache:Rf()},i.payload=r;return}r=r.return}}function YS(i,r,l){var u=ni();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fu(i)?gy(r,l):(l=Ef(i,r,l,u),l!==null&&(Bn(l,i,u),by(l,r,u)))}function my(i,r,l){var u=ni();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 E=r.lastRenderedState,N=y(E,l);if(m.hasEagerState=!0,m.eagerState=N,Wn(N,E))return Gc(i,r,m,0),wt===null&&Kc(),!1}catch{}finally{}if(l=Ef(i,r,m,u),l!==null)return Bn(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=Ef(i,l,u,2),r!==null&&Bn(r,i,2)}function fu(i){var r=i.alternate;return i===Fe||r!==null&&r===Fe}function gy(i,r){$s=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 Eo={readContext:un,use:ou,useCallback:Pt,useContext:Pt,useEffect:Pt,useImperativeHandle:Pt,useLayoutEffect:Pt,useInsertionEffect:Pt,useMemo:Pt,useReducer:Pt,useRef:Pt,useState:Pt,useDebugValue:Pt,useDeferredValue:Pt,useTransition:Pt,useSyncExternalStore:Pt,useId:Pt,useHostTransitionStatus:Pt,useFormState:Pt,useActionState:Pt,useOptimistic:Pt,useMemoCache:Pt,useCacheRefresh:Pt};Eo.useEffectEvent=Pt;var yy={readContext:un,use:ou,useCallback:function(i,r){return Sn().memoizedState=[i,r===void 0?null:r],i},useContext:un,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=Sn();r=r===void 0?null:r;var u=i();if(Gr){hn(!0);try{i()}finally{hn(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=Sn();if(l!==void 0){var m=l(r);if(Gr){hn(!0);try{l(r)}finally{hn(!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=YS.bind(null,Fe,i),[u.memoizedState,i]},useRef:function(i){var r=Sn();return i={current:i},r.memoizedState=i},useState:function(i){i=Zf(i);var r=i.queue,l=my.bind(null,Fe,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:th,useDeferredValue:function(i,r){var l=Sn();return nh(l,i,r)},useTransition:function(){var i=Zf(!1);return i=uy.bind(null,Fe,i.queue,!0,!1),Sn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=Fe,m=Sn();if(et){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),wt===null)throw Error(a(349));(Xe&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=Sn(),r=wt.identifierPrefix;if(et){var l=Ki,u=Hi;l=(u&~(1<<32-ct(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=Sn();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,Fe,!0,l),l.dispatch=r,[i,r]},useMemoCache:Vf,useCacheRefresh:function(){return Sn().memoizedState=GS.bind(null,Fe)},useEffectEvent:function(i){var r=Sn(),l={impl:i};return r.memoizedState=l,function(){if((st&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},sh={readContext:un,use:ou,useCallback:ly,useContext:un,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=Qt();return cy(l,mt.memoizedState,i,r)},useTransition:function(){var i=cu(ha)[0],r=Qt().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=Qt();return Hb(l,mt,i,r)},useMemoCache:Vf,useCacheRefresh:py};sh.useEffectEvent=ny;var xy={readContext:un,use:ou,useCallback:ly,useContext:un,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=Qt();return mt===null?nh(l,i,r):cy(l,mt.memoizedState,i,r)},useTransition:function(){var i=Xf(ha)[0],r=Qt().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=Qt();return mt!==null?Hb(l,mt,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=ni(),m=Ha(u);m.payload=r,l!=null&&(m.callback=l),r=Ka(i,m,u),r!==null&&(Bn(r,i,u),go(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ni(),m=Ha(u);m.tag=1,m.payload=r,l!=null&&(m.callback=l),r=Ka(i,m,u),r!==null&&(Bn(r,i,u),go(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ni(),u=Ha(l);u.tag=2,r!=null&&(u.callback=r),r=Ka(i,u,l),r!==null&&(Bn(r,i,l),go(r,i,l))}};function vy(i,r,l,u,m,y,E){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,E):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 Yr(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 Ey(i){Hc(i)}function ky(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 E=l.stateNode;E!==null&&typeof E.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 QS(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=Zn.current,l!==null){switch(l.tag){case 31:case 13:return bi===null?_u():l.alternate===null&&Ft===0&&(Ft=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),Mh(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)),Mh(i,u,m)),!1}throw Error(a(435,l.tag))}return Mh(i,u,m),_u(),!1}if(et)return r=Zn.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),Ft!==4&&(Ft=2)),!1;var y=Error(a(520),{cause:u});if(y=hi(y,l),jo===null?jo=[y]:jo.push(y),Ft!==4&&(Ft=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)),Jt=!1;function dn(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 E={};for(var N in u)N!=="ref"&&(E[N]=u[N])}else E=u;return Fr(r),u=Kf(i,r,l,E,y,m),N=Gf(),i!==null&&!Jt?(Yf(i,r,m),pa(i,r,m)):(et&&N&&Nf(r),r.flags|=1,dn(i,r,u,m),r.child)}function Ay(i,r,l,u,m){if(i===null){var y=l.type;return typeof y=="function"&&!kf(y)&&y.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=y,jy(i,r,y,u,m)):(i=Qc(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 E=y.memoizedProps;if(l=l.compare,l=l!==null?l:lo,l(E,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(Jt=!1,r.pendingProps=u=y,yh(i,m))(i.flags&131072)!==0&&(Jt=!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?Mb(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),Mb(r,y),Ya(),r.memoizedState=null):(i!==null&&Zc(r,null),Ff(),Ya());return dn(i,r,m,l),r.child}function ko(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:Xt._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 Ry(i,r,l){return Kr(r,i.child,null,l),i=pu(r,r.pendingProps),i.flags|=2,Jn(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(et){if(u.mode==="hidden")return i=pu(r,u),r.lanes=536870912,ko(null,i);if(qf(r),(i=Ct)?(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,cn=r,Ct=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 E=y.dehydrated;if(qf(r),m)if(r.flags&256)r.flags&=-257,r=Ry(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(Jt||Is(i,r,l,!1),m=(l&i.childLanes)!==0,Jt||m){if(u=wt,u!==null&&(E=Ht(u,l),E!==0&&E!==y.retryLane))throw y.retryLane=E,zr(i,E),Bn(u,i,E),uh;_u(),r=Ry(i,r,l)}else i=y.treeContext,Ct=yi(E.nextSibling),cn=r,et=!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&&!Jt?(Yf(i,r,m),pa(i,r,m)):(et&&u&&Nf(r),r.flags|=1,dn(i,r,l,m),r.child)}function My(i,r,l,u,m,y){return Fr(r),r.updateQueue=null,l=zb(r,u,l,m),Ib(i),u=Gf(),i!==null&&!Jt?(Yf(i,r,y),pa(i,r,y)):(et&&u&&Nf(r),r.flags|=1,dn(i,r,l,y),r.child)}function Ly(i,r,l,u,m){if(Fr(r),r.stateNode===null){var y=Ds,E=l.contextType;typeof E=="object"&&E!==null&&(y=un(E)),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),E=l.contextType,y.context=typeof E=="object"&&E!==null?un(E):Ds,y.state=r.memoizedState,E=l.getDerivedStateFromProps,typeof E=="function"&&(lh(r,l,E,u),y.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(E=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),E!==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,I=Yr(l,N);y.props=I;var Y=y.context,ne=l.contextType;E=Ds,typeof ne=="object"&&ne!==null&&(E=un(ne));var oe=l.getDerivedStateFromProps;ne=typeof oe=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=r.pendingProps!==N,ne||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||Y!==E)&&wy(r,y,u,E),qa=!1;var V=r.memoizedState;y.state=V,yo(r,u,y,m),bo(),Y=r.memoizedState,N||V!==Y||qa?(typeof oe=="function"&&(lh(r,l,oe,u),Y=r.memoizedState),(I=qa||vy(r,l,I,u,V,Y,E))?(ne||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=Y),y.props=u,y.state=Y,y.context=E,u=I):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,Bf(i,r),E=r.memoizedProps,ne=Yr(l,E),y.props=ne,oe=r.pendingProps,V=y.context,Y=l.contextType,I=Ds,typeof Y=="object"&&Y!==null&&(I=un(Y)),N=l.getDerivedStateFromProps,(Y=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(E!==oe||V!==I)&&wy(r,y,u,I),qa=!1,V=r.memoizedState,y.state=V,yo(r,u,y,m),bo();var X=r.memoizedState;E!==oe||V!==X||qa||i!==null&&i.dependencies!==null&&Wc(i.dependencies)?(typeof N=="function"&&(lh(r,l,N,u),X=r.memoizedState),(ne=qa||vy(r,l,ne,u,V,X,I)||i!==null&&i.dependencies!==null&&Wc(i.dependencies))?(Y||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,X,I),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,X,I)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||E===i.memoizedProps&&V===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&V===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=X),y.props=u,y.state=X,y.context=I,u=ne):(typeof y.componentDidUpdate!="function"||E===i.memoizedProps&&V===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||E===i.memoizedProps&&V===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)):dn(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,dn(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|=ti),i}function zy(i,r,l){var u=r.pendingProps,m=!1,y=(r.flags&128)!==0,E;if((E=y)||(E=i!==null&&i.memoizedState===null?!1:(Yt.current&2)!==0),E&&(m=!0,r.flags&=-129),E=(r.flags&32)!==0,r.flags&=-33,i===null){if(et){if(m?Ga(r):Ya(),(i=Ct)?(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,cn=r,Ct=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?(Ya(),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,E,l),r.memoizedState=fh,ko(null,u)):(Ga(r),mh(r,N))}var I=i.memoizedState;if(I!==null&&(N=I.dehydrated,N!==null)){if(y)r.flags&256?(Ga(r),r.flags&=-257,r=gh(i,r,l)):r.memoizedState!==null?(Ya(),r.child=i.child,r.flags|=128,r=null):(Ya(),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,E,l),r.memoizedState=fh,r=ko(null,u));else if(Ga(r),Wh(N)){if(E=N.nextSibling&&N.nextSibling.dataset,E)var Y=E.dgst;E=Y,u=Error(a(419)),u.stack="",u.digest=E,uo({value:u,source:null,stack:null}),r=gh(i,r,l)}else if(Jt||Is(i,r,l,!1),E=(l&i.childLanes)!==0,Jt||E){if(E=wt,E!==null&&(u=Ht(E,l),u!==0&&u!==I.retryLane))throw I.retryLane=u,zr(i,u),Bn(E,i,u),uh;Vh(N)||_u(),r=gh(i,r,l)}else Vh(N)?(r.flags|=192,r.child=i.child,r=null):(i=I.treeContext,Ct=yi(N.nextSibling),cn=r,et=!0,Pa=null,gi=!1,i!==null&&xb(r,i),r=mh(r,u.children),r.flags|=4096);return r}return m?(Ya(),N=u.fallback,m=r.mode,I=i.child,Y=I.sibling,u=oa(I,{mode:"hidden",children:u.children}),u.subtreeFlags=I.subtreeFlags&65011712,Y!==null?N=oa(Y,N):(N=Br(N,m,l,null),N.flags|=2),N.return=r,u.return=r,u.sibling=N,r.child=u,ko(null,u),u=r.child,N=i.child.memoizedState,N===null?N=hh(l):(m=N.cachePool,m!==null?(I=Xt._currentValue,m=m.parent!==I?{parent:I,pool:I}:m):m=_b(),N={baseLanes:N.baseLanes|l,cachePool:m}),u.memoizedState=N,u.childLanes=ph(i,E,l),r.memoizedState=fh,ko(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&&(E=r.deletions,E===null?(r.deletions=[i],r.flags|=16):E.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=Xn(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 E=i.memoizedState;E===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:m,treeForkCount:y}:(E.isBackwards=r,E.rendering=null,E.renderingStartTime=0,E.last=u,E.tail=l,E.tailMode=m,E.treeForkCount=y)}function Uy(i,r,l){var u=r.pendingProps,m=u.revealOrder,y=u.tail;u=u.children;var E=Yt.current,N=(E&2)!==0;if(N?(E=E&1|2,r.flags|=128):E&=1,T(Yt,E),dn(i,r,u,l),u=et?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:se(r,r.stateNode.containerInfo),$a(r,Xt,i.memoizedState.cache),Ur();break;case 27:case 5:Oe(r);break;case 4:se(r,r.stateNode.containerInfo);break;case 10:$a(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,qf(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),T(Yt,Yt.current),u)break;return null;case 22:return r.lanes=0,Oy(i,r,l,r.pendingProps);case 24:$a(r,Xt,i.memoizedState.cache)}return pa(i,r,l)}function Py(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)Jt=!0;else{if(!yh(i,l)&&(r.flags&128)===0)return Jt=!1,WS(i,r,l);Jt=(i.flags&131072)!==0}else Jt=!1,et&&(r.flags&1048576)!==0&&yb(r,co,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=qr(r.elementType),r.type=i,typeof i=="function")kf(i)?(u=Yr(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===F){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=Yr(u,r.pendingProps),Ly(i,r,u,m,l);case 3:e:{if(se(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 E=r.memoizedState;if(u=E.cache,$a(r,Xt,u),u!==y.cache&&Df(r,[Xt],l,!0),bo(),u=E.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:E.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(Ct=yi(i.firstChild),cn=r,et=!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}dn(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:et||(l=r.type,i=r.pendingProps,u=Du(fe.current).createElement(l),u[Kt]=r,u[pn]=i,fn(u,l,i),Vt(u),r.stateNode=u):r.memoizedState=Xx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Oe(r),i===null&&et&&(u=r.stateNode=Qx(r.type,r.pendingProps,fe.current),cn=r,gi=!0,m=Ct,tr(r.type)?(Xh=m,Ct=yi(u.firstChild)):Ct=m),dn(i,r,r.pendingProps.children,l),mu(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&et&&((m=u=Ct)&&(u=N_(u,r.type,r.pendingProps,gi),u!==null?(r.stateNode=u,cn=r,Ct=yi(u.firstChild),gi=!1,m=!0):m=!1),m||Fa(r)),Oe(r),m=r.type,y=r.pendingProps,E=i!==null?i.memoizedProps:null,u=y.children,Gh(m,y)?u=null:E!==null&&Gh(m,E)&&(r.flags|=32),r.memoizedState!==null&&(m=Kf(i,r,FS,null,null,l),Bo._currentValue=m),mu(i,r),dn(i,r,u,l),r.child;case 6:return i===null&&et&&((i=l=Ct)&&(l=C_(l,r.pendingProps,gi),l!==null?(r.stateNode=l,cn=r,Ct=null,i=!0):i=!1),i||Fa(r)),null;case 13:return zy(i,r,l);case 4:return se(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Kr(r,null,u,l):dn(i,r,u,l),r.child;case 11:return Ty(i,r,r.type,r.pendingProps,l);case 7:return dn(i,r,r.pendingProps,l),r.child;case 8:return dn(i,r,r.pendingProps.children,l),r.child;case 12:return dn(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,$a(r,r.type,u.value),dn(i,r,u.children,l),r.child;case 9:return m=r.type._context,u=r.pendingProps.children,Fr(r),m=un(m),u=u(m),r.flags|=1,dn(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=un(Xt),i===null?(m=Lf(),m===null&&(m=wt,y=Rf(),m.pooledCache=y,y.refCount++,y!==null&&(m.pooledCacheLanes|=l),m=y),r.memoizedState={parent:u,cache:m},zf(r),$a(r,Xt,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),$a(r,Xt,u)):(u=y.cache,$a(r,Xt,u),u!==m.cache&&Df(r,[Xt],l,!0))),dn(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,Qs|=r)}function So(i,r){if(!et)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 Tt(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 Tt(r),null;case 1:return Tt(r),null;case 3:return l=r.stateNode,u=null,i!==null&&(u=i.memoizedState.cache),r.memoizedState.cache!==u&&(r.flags|=2048),da(Xt),he(),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())),Tt(r),null;case 26:var m=r.type,y=r.memoizedState;return i===null?(ma(r),y!==null?(Tt(r),Fy(r,y)):(Tt(r),xh(r,m,null,u,l))):y?y!==i.memoizedState?(ma(r),Tt(r),Fy(r,y)):(Tt(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ma(r),Tt(r),xh(r,m,i,u,l)),null;case 27:if(pt(r),l=fe.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 Tt(r),null}i=be.current,Ls(r)?vb(r):(i=Qx(m,u,l),r.stateNode=i,ma(r))}return Tt(r),null;case 5:if(pt(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 Tt(r),null}if(y=be.current,Ls(r))vb(r);else{var E=Du(fe.current);switch(y){case 1:y=E.createElementNS("http://www.w3.org/2000/svg",m);break;case 2:y=E.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;default:switch(m){case"svg":y=E.createElementNS("http://www.w3.org/2000/svg",m);break;case"math":y=E.createElementNS("http://www.w3.org/1998/Math/MathML",m);break;case"script":y=E.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?E.createElement("select",{is:u.is}):E.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?E.createElement(m,{is:u.is}):E.createElement(m)}}y[Kt]=r,y[pn]=u;e:for(E=r.child;E!==null;){if(E.tag===5||E.tag===6)y.appendChild(E.stateNode);else if(E.tag!==4&&E.tag!==27&&E.child!==null){E.child.return=E,E=E.child;continue}if(E===r)break e;for(;E.sibling===null;){if(E.return===null||E.return===r)break e;E=E.return}E.sibling.return=E.return,E=E.sibling}r.stateNode=y;e:switch(fn(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 Tt(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=fe.current,Ls(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,m=cn,m!==null)switch(m.tag){case 27:case 5:u=m.memoizedProps}i[Kt]=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[Kt]=r,r.stateNode=i}return Tt(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[Kt]=r}else Ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Tt(r),i=!1}else l=Af(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(Jn(r),r):(Jn(r),null);if((r.flags&128)!==0)throw Error(a(558))}return Tt(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[Kt]=r}else Ur(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Tt(r),m=!1}else m=Af(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=m),m=!0;if(!m)return r.flags&256?(Jn(r),r):(Jn(r),null)}return Jn(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),Tt(r),null);case 4:return he(),i===null&&Fh(r.stateNode.containerInfo),Tt(r),null;case 10:return da(r.type),Tt(r),null;case 19:if(Q(Yt),u=r.memoizedState,u===null)return Tt(r),null;if(m=(r.flags&128)!==0,y=u.rendering,y===null)if(m)So(u,!1);else{if(Ft!==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 T(Yt,Yt.current&1|2),et&&ca(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Rt()>Eu&&(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&&!et)return Tt(r),null}else 2*Rt()-u.renderingStartTime>Eu&&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=Rt(),i.sibling=null,l=Yt.current,T(Yt,m?l&1|2:l&1),et&&ca(r,u.treeForkCount),i):(Tt(r),null);case 22:case 23:return Jn(r),$f(),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&&(Tt(r),r.subtreeFlags&6&&(r.flags|=8192)):Tt(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($r),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),da(Xt),Tt(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(Xt),he(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return pt(r),null;case 31:if(r.memoizedState!==null){if(Jn(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(Jn(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 he(),null;case 10:return da(r.type),null;case 22:case 23:return Jn(r),$f(),i!==null&&Q($r),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return da(Xt),null;case 25:return null;default:return null}}function $y(i,r){switch(Cf(r),r.tag){case 3:da(Xt),he();break;case 26:case 27:case 5:pt(r);break;case 4:he();break;case 31:r.memoizedState!==null&&Jn(r);break;case 13:Jn(r);break;case 19:Q(Yt);break;case 10:da(r.type);break;case 22:case 23:Jn(r),$f(),i!==null&&Q($r);break;case 24:da(Xt)}}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,E=l.inst;u=y(),E.destroy=u}l=l.next}while(l!==m)}}catch(N){ht(r,r.return,N)}}function Qa(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 E=u.inst,N=E.destroy;if(N!==void 0){E.destroy=void 0,m=r;var I=l,Y=N;try{Y()}catch(ne){ht(m,I,ne)}}}u=u.next}while(u!==y)}}catch(ne){ht(r,r.return,ne)}}function qy(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Rb(r,l)}catch(u){ht(i,i.return,u)}}}function Hy(i,r,l){l.props=Yr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){ht(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){ht(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){ht(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){ht(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){ht(i,i.return,m)}}function vh(i,r,l){try{var u=i.stateNode;v_(u,i.type,l,r),u[pn]=r}catch(m){ht(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 Eh(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=ye));else if(u!==4&&(u===27&&tr(i.type)&&(l=i.stateNode,r=null),i=i.child,i!==null))for(Eh(i,r,l),i=i.sibling;i!==null;)Eh(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 Yy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,m=r.attributes;m.length;)r.removeAttributeNode(m[0]);fn(r,u,l),r[Kt]=i,r[pn]=l}catch(y){ht(i,i.return,y)}}var ga=!1,en=!1,kh=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,rn=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 E=0,N=-1,I=-1,Y=0,ne=0,oe=i,V=null;t:for(;;){for(var X;oe!==l||m!==0&&oe.nodeType!==3||(N=E+m),oe!==y||u!==0&&oe.nodeType!==3||(I=E+u),oe.nodeType===3&&(E+=oe.nodeValue.length),(X=oe.firstChild)!==null;)V=oe,oe=X;for(;;){if(oe===i)break t;if(V===l&&++Y===m&&(N=E),V===y&&++ne===u&&(I=E),(X=oe.nextSibling)!==null)break;oe=V,V=oe.parentNode}oe=X}l=N===-1||I===-1?null:{start:N,end:I}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kh={focusedElem:i,selectionRange:l},Uu=!1,rn=r;rn!==null;)if(r=rn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,rn=i;else for(;rn!==null;){switch(r=rn,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 ke=Yr(l.type,m);i=u.getSnapshotBeforeUpdate(ke,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(Me){ht(l,l.return,Me)}}break;case 3:if((i&1024)!==0){if(i=r.stateNode.containerInfo,l=i.nodeType,l===9)Qh(i);else if(l===1)switch(i.nodeName){case"HEAD":case"HTML":case"BODY":Qh(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,rn=i;break}rn=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(E){ht(l,l.return,E)}else{var m=Yr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(m,r,i.__reactInternalSnapshotBeforeUpdate)}catch(E){ht(l,l.return,E)}}u&64&&qy(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{Rb(i,r)}catch(E){ht(l,l.return,E)}}break;case 27:r===null&&u&4&&Yy(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||en,m=ga;var y=en;ga=u,(en=r)&&!y?xa(i,l,(l.subtreeFlags&8772)!==0):ya(i,l),ga=m,en=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 jt=null,Mn=!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(Ut&&typeof Ut.onCommitFiberUnmount=="function")try{Ut.onCommitFiberUnmount(ln,l)}catch{}switch(l.tag){case 26:en||Gi(l,r),ba(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:en||Gi(l,r);var u=jt,m=Mn;tr(l.type)&&(jt=l.stateNode,Mn=!1),ba(i,r,l),Lo(l.stateNode),jt=u,Mn=m;break;case 5:en||Gi(l,r);case 6:if(u=jt,m=Mn,jt=null,ba(i,r,l),jt=u,Mn=m,jt!==null)if(Mn)try{(jt.nodeType===9?jt.body:jt.nodeName==="HTML"?jt.ownerDocument.body:jt).removeChild(l.stateNode)}catch(y){ht(l,r,y)}else try{jt.removeChild(l.stateNode)}catch(y){ht(l,r,y)}break;case 18:jt!==null&&(Mn?(i=jt,qx(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),nl(i)):qx(jt,l.stateNode));break;case 4:u=jt,m=Mn,jt=l.stateNode.containerInfo,Mn=!0,ba(i,r,l),jt=u,Mn=m;break;case 0:case 11:case 14:case 15:Qa(2,l,r),en||Qa(4,l,r),ba(i,r,l);break;case 1:en||(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:en=(u=en)||l.memoizedState!==null,ba(i,r,l),en=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){ht(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){ht(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 Qy),r;case 22:return i=i.stateNode,r=i._retryCache,r===null&&(r=i._retryCache=new Qy),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 Ln(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var m=l[u],y=i,E=r,N=E;e:for(;N!==null;){switch(N.tag){case 27:if(tr(N.type)){jt=N.stateNode,Mn=!1;break e}break;case 5:jt=N.stateNode,Mn=!1;break e;case 3:case 4:jt=N.stateNode.containerInfo,Mn=!0;break e}N=N.return}if(jt===null)throw Error(a(160));Xy(y,E,m),jt=null,Mn=!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:Ln(r,i),In(i),u&4&&(Qa(3,i,i.return),_o(3,i),Qa(5,i,i.return));break;case 1:Ln(r,i),In(i),u&512&&(en||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(Ln(r,i),In(i),u&512&&(en||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[Kt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=m.createElement(u),m.head.insertBefore(y,m.querySelector("head > title"))),fn(y,u,l),y[Kt]=i,Vt(y),u=y;break e;case"link":var E=ev("link","href",m).get(u+(l.href||""));if(E){for(var N=0;N<E.length;N++)if(y=E[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)){E.splice(N,1);break t}}y=m.createElement(u),fn(y,u,l),m.head.appendChild(y);break;case"meta":if(E=ev("meta","content",m).get(u+(l.content||""))){for(N=0;N<E.length;N++)if(y=E[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)){E.splice(N,1);break t}}y=m.createElement(u),fn(y,u,l),m.head.appendChild(y);break;default:throw Error(a(468,u))}y[Kt]=i,Vt(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:Ln(r,i),In(i),u&512&&(en||l===null||Gi(l,l.return)),l!==null&&u&4&&vh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(Ln(r,i),In(i),u&512&&(en||l===null||Gi(l,l.return)),i.flags&32){m=i.stateNode;try{Le(m,"")}catch(ke){ht(i,i.return,ke)}}u&4&&i.stateNode!=null&&(m=i.memoizedProps,vh(i,m,l!==null?l.memoizedProps:m)),u&1024&&(kh=!0);break;case 6:if(Ln(r,i),In(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(ke){ht(i,i.return,ke)}}break;case 3:if(Lu=null,m=Oi,Oi=Ru(r.containerInfo),Ln(r,i),Oi=m,In(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{nl(r.containerInfo)}catch(ke){ht(i,i.return,ke)}kh&&(kh=!1,tx(i));break;case 4:u=Oi,Oi=Ru(i.stateNode.containerInfo),Ln(r,i),In(i),Oi=u;break;case 12:Ln(r,i),In(i);break;case 31:Ln(r,i),In(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 13:Ln(r,i),In(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(wu=Rt()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 22:m=i.memoizedState!==null;var I=l!==null&&l.memoizedState!==null,Y=ga,ne=en;if(ga=Y||m,en=ne||I,Ln(r,i),en=ne,ga=Y,In(i),u&8192)e:for(r=i.stateNode,r._visibility=m?r._visibility&-2:r._visibility|1,m&&(l===null||I||ga||en||Qr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){I=l=r;try{if(y=I.stateNode,m)E=y.style,typeof E.setProperty=="function"?E.setProperty("display","none","important"):E.display="none";else{N=I.stateNode;var oe=I.memoizedProps.style,V=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=V==null||typeof V=="boolean"?"":(""+V).trim()}}catch(ke){ht(I,I.return,ke)}}}else if(r.tag===6){if(l===null){I=r;try{I.stateNode.nodeValue=m?"":I.memoizedProps}catch(ke){ht(I,I.return,ke)}}}else if(r.tag===18){if(l===null){I=r;try{var X=I.stateNode;m?Hx(X,!0):Hx(I.stateNode,!1)}catch(ke){ht(I,I.return,ke)}}}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:Ln(r,i),In(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,xu(i,u)));break;case 30:break;case 21:break;default:Ln(r,i),In(i)}}function In(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 E=l.stateNode;l.flags&32&&(Le(E,""),l.flags&=-33);var N=wh(i);yu(i,N,E);break;case 3:case 4:var I=l.stateNode.containerInfo,Y=wh(i);Eh(i,Y,I);break;default:throw Error(a(161))}}catch(ne){ht(i,i.return,ne)}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 Qr(i){for(i=i.child;i!==null;){var r=i;switch(r.tag){case 0:case 11:case 14:case 15:Qa(4,r,r.return),Qr(r);break;case 1:Gi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&Hy(r,r.return,l),Qr(r);break;case 27:Lo(r.stateNode);case 26:case 5:Gi(r,r.return),Qr(r);break;case 22:r.memoizedState===null&&Qr(r);break;case 30:Qr(r);break;default:Qr(r)}i=i.sibling}}function xa(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,m=i,y=r,E=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(Y){ht(u,u.return,Y)}if(u=y,m=u.updateQueue,m!==null){var N=u.stateNode;try{var I=m.shared.hiddenCallbacks;if(I!==null)for(m.shared.hiddenCallbacks=null,m=0;m<I.length;m++)Db(I[m],N)}catch(Y){ht(u,u.return,Y)}}l&&E&64&&qy(y),No(y,y.return);break;case 27:Yy(y);case 26:case 5:xa(m,y,l),l&&u===null&&E&4&&Ky(y),No(y,y.return);break;case 12:xa(m,y,l);break;case 31:xa(m,y,l),l&&E&4&&Zy(m,y);break;case 13:xa(m,y,l),l&&E&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,E=y.id,N=y.onPostCommit;typeof N=="function"&&N(E,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(I){ht(r,r.return,I)}}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,E=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(E,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,E=r,N=l,I=u,Y=E.flags;switch(E.tag){case 0:case 11:case 15:Ks(y,E,N,I,m),_o(8,E);break;case 23:break;case 22:var ne=E.stateNode;E.memoizedState!==null?ne._visibility&2?Ks(y,E,N,I,m):Co(y,E):(ne._visibility|=2,Ks(y,E,N,I,m)),m&&Y&2048&&Sh(E.alternate,E);break;case 24:Ks(y,E,N,I,m),m&&Y&2048&&_h(E.alternate,E);break;default:Ks(y,E,N,I,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=Ru(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];rn=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&&Qa(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];rn=u,sx(u,i)}ax(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Qa(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(;rn!==null;){var l=rn;switch(l.tag){case 0:case 11:case 15:Qa(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:fo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,rn=u;else e:for(l=i;rn!==null;){u=rn;var m=u.sibling,y=u.return;if(Wy(u),u===l){rn=null;break e}if(m!==null){m.return=y,rn=m;break e}rn=y}}}var t_={getCacheForType:function(i){var r=un(Xt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return un(Xt).controller.signal}},n_=typeof WeakMap=="function"?WeakMap:Map,st=0,wt=null,Ye=null,Xe=0,ft=0,ei=null,Va=!1,Ys=!1,Nh=!1,va=0,Ft=0,Wa=0,Vr=0,Ch=0,ti=0,Qs=0,jo=null,zn=null,Th=!1,wu=0,lx=0,Eu=1/0,ku=null,Xa=null,nn=0,Za=null,Vs=null,wa=0,Ah=0,jh=null,ox=null,Oo=0,Oh=null;function ni(){return(st&2)!==0&&Xe!==0?Xe&-Xe:H.T!==null?zh():ws()}function cx(){if(ti===0)if((Xe&536870912)===0||et){var i=vs;vs<<=1,(vs&3932160)===0&&(vs=262144),ti=i}else ti=536870912;return i=Zn.current,i!==null&&(i.flags|=32),ti}function Bn(i,r,l){(i===wt&&(ft===2||ft===9)||i.cancelPendingCommit!==null)&&(Ws(i,0),Ja(i,Xe,ti,!1)),vt(i,l),((st&2)===0||i!==wt)&&(i===wt&&((st&2)===0&&(Vr|=l),Ft===4&&Ja(i,Xe,ti,!1)),Yi(i))}function ux(i,r,l){if((st&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||re(i,r),m=u?r_(i,r):Rh(i,r,!0),y=u;do{if(m===0){Ys&&!u&&Ja(i,r,0,!1);break}else{if(l=i.current.alternate,y&&!i_(l)){m=Rh(i,r,!1),y=!1;continue}if(m===2){if(y=r,i.errorRecoveryDisabledLanes&y)var E=0;else E=i.pendingLanes&-536870913,E=E!==0?E:E&536870912?536870912:0;if(E!==0){r=E;e:{var N=i;m=jo;var I=N.current.memoizedState.isDehydrated;if(I&&(Ws(N,E).flags|=256),E=Rh(N,E,!1),E!==2){if(Nh&&!I){N.errorRecoveryDisabledLanes|=y,Vr|=y,m=4;break e}y=zn,zn=m,y!==null&&(zn===null?zn=y:zn.push.apply(zn,y))}m=E}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,ti,!Va);break e;case 2:zn=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(m=wu+300-Rt(),10<m)){if(Ja(u,r,ti,!Va),B(u,0,!0)!==0)break e;wa=r,u.timeoutHandle=Fx(dx.bind(null,u,l,zn,ku,Th,r,ti,Vr,Qs,Va,y,"Throttled",-0,0),m);break e}dx(u,l,zn,ku,Th,r,ti,Vr,Qs,Va,y,null,-0,0)}}break}while(!0);Yi(i)}function dx(i,r,l,u,m,y,E,N,I,Y,ne,oe,V,X){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:ye},ix(r,y,oe);var ke=(y&62914560)===y?wu-Rt():(y&4194048)===y?lx-Rt():0;if(ke=F_(oe,ke),ke!==null){wa=y,i.cancelPendingCommit=ke(xx.bind(null,i,r,y,l,u,m,E,N,I,ne,oe,null,V,X)),Ja(i,y,E,!Y);return}}xx(i,r,y,l,u,m,E,N,I)}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(!Wn(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-ct(m),E=1<<y;u[y]=-1,m&=~E}l!==0&&Ee(i,l,r)}function Su(){return(st&6)===0?(Do(0),!1):!0}function Dh(){if(Ye!==null){if(ft===0)var i=Ye.return;else i=Ye,ua=Pr=null,Qf(i),Ps=null,po=0,i=Ye;for(;i!==null;)$y(i.alternate,i),i=i.return;Ye=null}}function Ws(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,k_(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),wa=0,Dh(),wt=i,Ye=l=oa(i.current,null),Xe=r,ft=0,ei=null,Va=!1,Ys=re(i,r),Nh=!1,Qs=ti=Ch=Vr=Wa=Ft=0,zn=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-ct(u),y=1<<m;r|=i[m],u&=~y}return va=r,Kc(),l}function fx(i,r){Fe=null,H.H=Eo,r===Us||r===Jc?(r=Tb(),ft=3):r===If?(r=Tb(),ft=4):ft=r===uh?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,ei=r,Ye===null&&(Ft=1,hu(i,hi(r,i.current)))}function hx(){var i=Zn.current;return i===null?!0:(Xe&4194048)===Xe?bi===null:(Xe&62914560)===Xe||(Xe&536870912)!==0?i===bi:!1}function px(){var i=H.H;return H.H=Eo,i===null?Eo:i}function mx(){var i=H.A;return H.A=t_,i}function _u(){Ft=4,Va||(Xe&4194048)!==Xe&&Zn.current!==null||(Ys=!0),(Wa&134217727)===0&&(Vr&134217727)===0||wt===null||Ja(wt,Xe,ti,!1)}function Rh(i,r,l){var u=st;st|=2;var m=px(),y=mx();(wt!==i||Xe!==r)&&(ku=null,Ws(i,r)),r=!1;var E=Ft;e:do try{if(ft!==0&&Ye!==null){var N=Ye,I=ei;switch(ft){case 8:Dh(),E=6;break e;case 3:case 2:case 9:case 6:Zn.current===null&&(r=!0);var Y=ft;if(ft=0,ei=null,Xs(i,N,I,Y),l&&Ys){E=0;break e}break;default:Y=ft,ft=0,ei=null,Xs(i,N,I,Y)}}a_(),E=Ft;break}catch(ne){fx(i,ne)}while(!0);return r&&i.shellSuspendCounter++,ua=Pr=null,st=u,H.H=m,H.A=y,Ye===null&&(wt=null,Xe=0,Kc()),E}function a_(){for(;Ye!==null;)gx(Ye)}function r_(i,r){var l=st;st|=2;var u=px(),m=mx();wt!==i||Xe!==r?(ku=null,Eu=Rt()+500,Ws(i,r)):Ys=re(i,r);e:do try{if(ft!==0&&Ye!==null){r=Ye;var y=ei;t:switch(ft){case 1:ft=0,ei=null,Xs(i,r,y,1);break;case 2:case 9:if(Nb(y)){ft=0,ei=null,bx(r);break}r=function(){ft!==2&&ft!==9||wt!==i||(ft=7),Yi(i)},y.then(r,r);break e;case 3:ft=7;break e;case 4:ft=5;break e;case 7:Nb(y)?(ft=0,ei=null,bx(r)):(ft=0,ei=null,Xs(i,r,y,7));break;case 5:var E=null;switch(Ye.tag){case 26:E=Ye.memoizedState;case 5:case 27:var N=Ye;if(E?nv(E):N.stateNode.complete){ft=0,ei=null;var I=N.sibling;if(I!==null)Ye=I;else{var Y=N.return;Y!==null?(Ye=Y,Nu(Y)):Ye=null}break t}}ft=0,ei=null,Xs(i,r,y,5);break;case 6:ft=0,ei=null,Xs(i,r,y,6);break;case 8:Dh(),Ft=6;break e;default:throw Error(a(462))}}s_();break}catch(ne){fx(i,ne)}while(!0);return ua=Pr=null,H.H=u,H.A=m,st=l,Ye!==null?0:(wt=null,Xe=0,Kc(),Ft)}function s_(){for(;Ye!==null&&!Yl();)gx(Ye)}function gx(i){var r=Py(i.alternate,i,va);i.memoizedProps=i.pendingProps,r===null?Nu(i):Ye=r}function bx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=My(l,r,r.pendingProps,r.type,void 0,Xe);break;case 11:r=My(l,r,r.pendingProps,r.type.render,r.ref,Xe);break;case 5:Qf(r);default:$y(l,r),r=Ye=mb(r,va),r=Py(l,r,va)}i.memoizedProps=i.pendingProps,r===null?Nu(i):Ye=r}function Xs(i,r,l,u){ua=Pr=null,Qf(r),Ps=null,po=0;var m=r.return;try{if(QS(i,m,r,l,Xe)){Ft=1,hu(i,hi(l,i.current)),Ye=null;return}}catch(y){if(m!==null)throw Ye=m,y;Ft=1,hu(i,hi(l,i.current)),Ye=null;return}r.flags&32768?(et||u===1?i=!0:Ys||(Xe&536870912)!==0?i=!1:(Va=i=!0,(u===2||u===9||u===3||u===6)&&(u=Zn.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){Ye=l;return}if(r=r.sibling,r!==null){Ye=r;return}Ye=r=i}while(r!==null);Ft===0&&(Ft=5)}function yx(i,r){do{var l=ZS(i.alternate,i);if(l!==null){l.flags&=32767,Ye=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Ye=i;return}Ye=i=l}while(i!==null);Ft=6,Ye=null}function xx(i,r,l,u,m,y,E,N,I){i.cancelPendingCommit=null;do Cu();while(nn!==0);if((st&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,E,N,I),i===wt&&(Ye=wt=null,Xe=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_(Re,function(){return Sx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=H.T,H.T=null,m=ce.p,ce.p=2,E=st,st|=4;try{JS(i,r,l)}finally{st=E,ce.p=m,H.T=u}}nn=1,vx(),wx(),Ex()}}function vx(){if(nn===1){nn=0;var i=Za,r=Vs,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=H.T,H.T=null;var u=ce.p;ce.p=2;var m=st;st|=4;try{ex(r,i);var y=Kh,E=sb(i.containerInfo),N=y.focusedElem,I=y.selectionRange;if(E!==N&&N&&N.ownerDocument&&rb(N.ownerDocument.documentElement,N)){if(I!==null&&gf(N)){var Y=I.start,ne=I.end;if(ne===void 0&&(ne=Y),"selectionStart"in N)N.selectionStart=Y,N.selectionEnd=Math.min(ne,N.value.length);else{var oe=N.ownerDocument||document,V=oe&&oe.defaultView||window;if(V.getSelection){var X=V.getSelection(),ke=N.textContent.length,Me=Math.min(I.start,ke),bt=I.end===void 0?Me:Math.min(I.end,ke);!X.extend&&Me>bt&&(E=bt,bt=Me,Me=E);var q=ab(N,Me),P=ab(N,bt);if(q&&P&&(X.rangeCount!==1||X.anchorNode!==q.node||X.anchorOffset!==q.offset||X.focusNode!==P.node||X.focusOffset!==P.offset)){var G=oe.createRange();G.setStart(q.node,q.offset),X.removeAllRanges(),Me>bt?(X.addRange(G),X.extend(P.node,P.offset)):(G.setEnd(P.node,P.offset),X.addRange(G))}}}}for(oe=[],X=N;X=X.parentNode;)X.nodeType===1&&oe.push({element:X,left:X.scrollLeft,top:X.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{st=m,ce.p=u,H.T=l}}i.current=r,nn=2}}function wx(){if(nn===2){nn=0;var i=Za,r=Vs,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=H.T,H.T=null;var u=ce.p;ce.p=2;var m=st;st|=4;try{Vy(i,r.alternate,r)}finally{st=m,ce.p=u,H.T=l}}nn=3}}function Ex(){if(nn===4||nn===3){nn=0,ys();var i=Za,r=Vs,l=wa,u=ox;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?nn=5:(nn=0,Vs=Za=null,kx(i,i.pendingLanes));var m=i.pendingLanes;if(m===0&&(Xa=null),ia(l),r=r.stateNode,Ut&&typeof Ut.onCommitFiberRoot=="function")try{Ut.onCommitFiberRoot(ln,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=H.T,m=ce.p,ce.p=2,H.T=null;try{for(var y=i.onRecoverableError,E=0;E<u.length;E++){var N=u[E];y(N.value,{componentStack:N.stack})}}finally{H.T=r,ce.p=m}}(wa&3)!==0&&Cu(),Yi(i),m=i.pendingLanes,(l&261930)!==0&&(m&42)!==0?i===Oh?Oo++:(Oo=0,Oh=i):Oo=0,Do(0)}}function kx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,fo(r)))}function Cu(){return vx(),wx(),Ex(),Sx()}function Sx(){if(nn!==5)return!1;var i=Za,r=Ah;Ah=0;var l=ia(wa),u=H.T,m=ce.p;try{ce.p=32>l?32:l,H.T=null,l=jh,jh=null;var y=Za,E=wa;if(nn=0,Vs=Za=null,wa=0,(st&6)!==0)throw Error(a(331));var N=st;if(st|=4,rx(y.current),nx(y,y.current,E,l),st=N,Do(0,!1),Ut&&typeof Ut.onPostCommitFiberRoot=="function")try{Ut.onPostCommitFiberRoot(ln,y)}catch{}return!0}finally{ce.p=m,H.T=u,kx(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),Yi(i))}function ht(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),Yi(u));break}}r=r.return}}function Mh(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&&(Xe&l)===l&&(Ft===4||Ft===3&&(Xe&62914560)===Xe&&300>Rt()-wu?(st&2)===0&&Ws(i,0):Ch|=l,Qs===Xe&&(Qs=0)),Yi(i)}function Nx(i,r){r===0&&(r=ze()),i=zr(i,r),i!==null&&(vt(i,r),Yi(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 Yi(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 E=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-ct(42|i)+1)-1,y&=m&~(E&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(l=!0,jx(u,y))}else y=Xe,y=B(u,u===wt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||re(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&&E_()&&(i=er);for(var r=Rt(),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}nn!==0&&nn!==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 E=31-ct(y),N=1<<E,I=m[E];I===-1?((N&l)===0||(N&u)!==0)&&(m[E]=ve(N,r)):I<=r&&(i.expiredLanes|=N),y&=~N}if(r=wt,l=Xe,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ft===2||ft===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Tr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||re(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&Tr(u),ia(l)){case 2:case 8:l=ge;break;case 32:l=Re;break;case 268435456:l=it;break;default:l=Re}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(nn!==0&&nn!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Cu()&&i.callbackNode!==l)return null;var u=Xe;return u=B(i,i===wt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(ux(i,u,r),Tx(i,Rt()),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(){(st&6)!==0?na(te,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[pn]||null).action),E=u.submitter;E&&(r=(r=E[pn]||null)?Ox(r.formAction):E.getAttribute("formAction"),r!==null&&(y=r,E=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 I=E?Dx(m,E):new FormData(m);ih(l,{pending:!0,data:I,method:m.method,action:y},null,I)}}else typeof y=="function"&&(N.preventDefault(),I=E?Dx(m,E):new FormData(m),ih(l,{pending:!0,data:I,method:m.method,action:y},y,I))},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(RS,"onTransitionCancel"),ji(fb,"onTransitionEnd"),pe("onMouseEnter",["mouseout","mouseover"]),pe("onMouseLeave",["mouseout","mouseover"]),pe("onPointerEnter",["pointerout","pointerover"]),pe("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 Ro="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(Ro));function Rx(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 E=u.length-1;0<=E;E--){var N=u[E],I=N.instance,Y=N.currentTarget;if(N=N.listener,I!==y&&m.isPropagationStopped())break e;y=N,m.currentTarget=Y;try{y(m)}catch(ne){Hc(ne)}m.currentTarget=null,y=I}else for(E=0;E<u.length;E++){if(N=u[E],I=N.instance,Y=N.currentTarget,N=N.listener,I!==y&&m.isPropagationStopped())break e;y=N,m.currentTarget=Y;try{y(m)}catch(ne){Hc(ne)}m.currentTarget=null,y=I}}}}function Qe(i,r){var l=r[Ql];l===void 0&&(l=r[Ql]=new Set);var u=i+"__bubble";l.has(u)||(Mx(r,i,2,!1),l.add(u))}function Ph(i,r,l){var u=0;r&&(u|=4),Mx(l,i,u,r)}var ju="_reactListening"+Math.random().toString(36).slice(2);function Fh(i){if(!i[ju]){i[ju]=!0,Rc.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 Mx(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 $h(i,r,l,u,m){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var E=u.tag;if(E===3||E===4){var N=u.stateNode.containerInfo;if(N===m)break;if(E===4)for(E=u.return;E!==null;){var I=E.tag;if((I===3||I===4)&&E.stateNode.containerInfo===m)return;E=E.return}for(;N!==null;){if(E=kn(N),E===null)return;if(I=E.tag,I===5||I===6||I===26||I===27){u=y=E;continue e}N=N.parentNode}}u=u.return}zc(function(){var Y=y,ne=Pe(l),oe=[];e:{var V=hb.get(i);if(V!==void 0){var X=Fc,ke=i;switch(i){case"keypress":if(Uc(l)===0)break e;case"keydown":case"keyup":X=cS;break;case"focusin":ke="focus",X=df;break;case"focusout":ke="blur",X=df;break;case"beforeblur":case"afterblur":X=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":X=$g;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":X=Xk;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":X=fS;break;case cb:case ub:case db:X=eS;break;case fb:X=pS;break;case"scroll":case"scrollend":X=Vk;break;case"wheel":X=gS;break;case"copy":case"cut":case"paste":X=nS;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":X=Hg;break;case"toggle":case"beforetoggle":X=yS}var Me=(r&4)!==0,bt=!Me&&(i==="scroll"||i==="scrollend"),q=Me?V!==null?V+"Capture":null:V;Me=[];for(var P=Y,G;P!==null;){var le=P;if(G=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||G===null||q===null||(le=eo(P,q),le!=null&&Me.push(Mo(P,le,G))),bt)break;P=P.return}0<Me.length&&(V=new X(V,ke,null,l,ne),oe.push({event:V,listeners:Me}))}}if((r&7)===0){e:{if(V=i==="mouseover"||i==="pointerover",X=i==="mouseout"||i==="pointerout",V&&l!==_e&&(ke=l.relatedTarget||l.fromElement)&&(kn(ke)||ke[Ra]))break e;if((X||V)&&(V=ne.window===ne?ne:(V=ne.ownerDocument)?V.defaultView||V.parentWindow:window,X?(ke=l.relatedTarget||l.toElement,X=Y,ke=ke?kn(ke):null,ke!==null&&(bt=o(ke),Me=ke.tag,ke!==bt||Me!==5&&Me!==27&&Me!==6)&&(ke=null)):(X=null,ke=Y),X!==ke)){if(Me=$g,le="onMouseLeave",q="onMouseEnter",P="mouse",(i==="pointerout"||i==="pointerover")&&(Me=Hg,le="onPointerLeave",q="onPointerEnter",P="pointer"),bt=X==null?V:Ma(X),G=ke==null?V:Ma(ke),V=new Me(le,P+"leave",X,l,ne),V.target=bt,V.relatedTarget=G,le=null,kn(ne)===Y&&(Me=new Me(q,P+"enter",ke,l,ne),Me.target=G,Me.relatedTarget=bt,le=Me),bt=le,X&&ke)t:{for(Me=b_,q=X,P=ke,G=0,le=q;le;le=Me(le))G++;le=0;for(var je=P;je;je=Me(je))le++;for(;0<G-le;)q=Me(q),G--;for(;0<le-G;)P=Me(P),le--;for(;G--;){if(q===P||P!==null&&q===P.alternate){Me=q;break t}q=Me(q),P=Me(P)}Me=null}else Me=null;X!==null&&Lx(oe,V,X,Me,!1),ke!==null&&bt!==null&&Lx(oe,bt,ke,Me,!0)}}e:{if(V=Y?Ma(Y):window,X=V.nodeName&&V.nodeName.toLowerCase(),X==="select"||X==="input"&&V.type==="file")var at=Zg;else if(Wg(V))if(Jg)at=TS;else{at=NS;var Ne=_S}else X=V.nodeName,!X||X.toLowerCase()!=="input"||V.type!=="checkbox"&&V.type!=="radio"?Y&&Ia(Y.elementType)&&(at=Zg):at=CS;if(at&&(at=at(i,Y))){Xg(oe,at,l,ne);break e}Ne&&Ne(i,V,Y),i==="focusout"&&Y&&V.type==="number"&&Y.memoizedProps.value!=null&&Ns(V,"number",V.value)}switch(Ne=Y?Ma(Y):window,i){case"focusin":(Wg(Ne)||Ne.contentEditable==="true")&&(As=Ne,bf=Y,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,ne);break;case"selectionchange":if(jS)break;case"keydown":case"keyup":lb(oe,l,ne)}var $e;if(hf)e:{switch(i){case"compositionstart":var Ze="onCompositionStart";break e;case"compositionend":Ze="onCompositionEnd";break e;case"compositionupdate":Ze="onCompositionUpdate";break e}Ze=void 0}else Ts?Qg(i,l)&&(Ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ze="onCompositionStart");Ze&&(Kg&&l.locale!=="ko"&&(Ts||Ze!=="onCompositionStart"?Ze==="onCompositionEnd"&&Ts&&($e=Pg()):(Ba=ne,of="value"in Ba?Ba.value:Ba.textContent,Ts=!0)),Ne=Ou(Y,Ze),0<Ne.length&&(Ze=new qg(Ze,i,null,l,ne),oe.push({event:Ze,listeners:Ne}),$e?Ze.data=$e:($e=Vg(l),$e!==null&&(Ze.data=$e)))),($e=vS?wS(i,l):ES(i,l))&&(Ze=Ou(Y,"onBeforeInput"),0<Ze.length&&(Ne=new qg("onBeforeInput","beforeinput",null,l,ne),oe.push({event:Ne,listeners:Ze}),Ne.data=$e)),h_(oe,i,Y,l,ne)}Rx(oe,r)})}function Mo(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(Mo(i,m,y)),m=eo(i,r),m!=null&&u.push(Mo(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,E=[];l!==null&&l!==u;){var N=l,I=N.alternate,Y=N.stateNode;if(N=N.tag,I!==null&&I===u)break;N!==5&&N!==26&&N!==27||Y===null||(I=Y,m?(Y=eo(l,y),Y!=null&&E.unshift(Mo(l,Y,I))):m||(Y=eo(l,y),Y!=null&&E.push(Mo(l,Y,I)))),l=l.return}E.length!==0&&i.push({event:r,listeners:E})}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 gt(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":Qn(i,"class",u);break;case"tabIndex":Qn(i,"tabindex",u);break;case"dir":case"role":case"viewBox":case"width":case"height":Qn(i,l,u);break;case"style":dt(i,u,y);break;case"data":if(r!=="object"){Qn(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"&>(i,r,"name",m.name,m,null),gt(i,r,"formEncType",m.formEncType,m,null),gt(i,r,"formMethod",m.formMethod,m,null),gt(i,r,"formTarget",m.formTarget,m,null)):(gt(i,r,"encType",m.encType,m,null),gt(i,r,"method",m.method,m,null),gt(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=ye);break;case"onScroll":u!=null&&Qe("scroll",i);break;case"onScrollEnd":u!=null&&Qe("scrollend",i);break;case"dangerouslySetInnerHTML":if(u!=null){if(typeof u!="object"||!("__html"in u))throw Error(a(61));if(l=u.__html,l!=null){if(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":Qe("beforetoggle",i),Qe("toggle",i),mn(i,"popover",u);break;case"xlinkActuate":On(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":On(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":On(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":On(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":On(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":On(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":On(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":On(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":On(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":mn(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,mn(i,l,u))}}function qh(i,r,l,u,m,y){switch(l){case"style":dt(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&&Qe("scroll",i);break;case"onScrollEnd":u!=null&&Qe("scrollend",i);break;case"onClick":u!=null&&(i.onclick=ye);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[pn]||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,""):mn(i,l,u)}}}function fn(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",i),Qe("load",i);var u=!1,m=!1,y;for(y in l)if(l.hasOwnProperty(y)){var E=l[y];if(E!=null)switch(y){case"src":u=!0;break;case"srcSet":m=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:gt(i,r,y,E,l,null)}}m&>(i,r,"srcSet",l.srcSet,l,null),u&>(i,r,"src",l.src,l,null);return;case"input":Qe("invalid",i);var N=y=E=m=null,I=null,Y=null;for(u in l)if(l.hasOwnProperty(u)){var ne=l[u];if(ne!=null)switch(u){case"name":m=ne;break;case"type":E=ne;break;case"checked":I=ne;break;case"defaultChecked":Y=ne;break;case"value":y=ne;break;case"defaultValue":N=ne;break;case"children":case"dangerouslySetInnerHTML":if(ne!=null)throw Error(a(137,r));break;default:gt(i,r,u,ne,l,null)}}Rr(i,y,N,I,Y,E,m,!1);return;case"select":Qe("invalid",i),u=E=y=null;for(m in l)if(l.hasOwnProperty(m)&&(N=l[m],N!=null))switch(m){case"value":y=N;break;case"defaultValue":E=N;break;case"multiple":u=N;default:gt(i,r,m,N,l,null)}r=y,l=E,i.multiple=!!u,r!=null?on(i,!!u,r,!1):l!=null&&on(i,!!u,l,!0);return;case"textarea":Qe("invalid",i),y=m=u=null;for(E in l)if(l.hasOwnProperty(E)&&(N=l[E],N!=null))switch(E){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:gt(i,r,E,N,l,null)}Cs(i,u,m,y);return;case"option":for(I in l)if(l.hasOwnProperty(I)&&(u=l[I],u!=null))switch(I){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:gt(i,r,I,u,l,null)}return;case"dialog":Qe("beforetoggle",i),Qe("toggle",i),Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":Qe("load",i);break;case"video":case"audio":for(u=0;u<Ro.length;u++)Qe(Ro[u],i);break;case"image":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"embed":case"source":case"link":Qe("error",i),Qe("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(Y in l)if(l.hasOwnProperty(Y)&&(u=l[Y],u!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:gt(i,r,Y,u,l,null)}return;default:if(Ia(r)){for(ne in l)l.hasOwnProperty(ne)&&(u=l[ne],u!==void 0&&qh(i,r,ne,u,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null&>(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,E=null,N=null,I=null,Y=null,ne=null;for(X in l){var oe=l[X];if(l.hasOwnProperty(X)&&oe!=null)switch(X){case"checked":break;case"value":break;case"defaultValue":I=oe;default:u.hasOwnProperty(X)||gt(i,r,X,null,u,oe)}}for(var V in u){var X=u[V];if(oe=l[V],u.hasOwnProperty(V)&&(X!=null||oe!=null))switch(V){case"type":y=X;break;case"name":m=X;break;case"checked":Y=X;break;case"defaultChecked":ne=X;break;case"value":E=X;break;case"defaultValue":N=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(a(137,r));break;default:X!==oe&>(i,r,V,X,u,oe)}}Xl(i,E,N,I,Y,ne,y,m);return;case"select":X=E=N=V=null;for(y in l)if(I=l[y],l.hasOwnProperty(y)&&I!=null)switch(y){case"value":break;case"multiple":X=I;default:u.hasOwnProperty(y)||gt(i,r,y,null,u,I)}for(m in u)if(y=u[m],I=l[m],u.hasOwnProperty(m)&&(y!=null||I!=null))switch(m){case"value":V=y;break;case"defaultValue":N=y;break;case"multiple":E=y;default:y!==I&>(i,r,m,y,u,I)}r=N,l=E,u=X,V!=null?on(i,!!l,V,!1):!!u!=!!l&&(r!=null?on(i,!!l,r,!0):on(i,!!l,l?[]:"",!1));return;case"textarea":X=V=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:gt(i,r,N,null,u,m)}for(E in u)if(m=u[E],y=l[E],u.hasOwnProperty(E)&&(m!=null||y!=null))switch(E){case"value":V=m;break;case"defaultValue":X=m;break;case"children":break;case"dangerouslySetInnerHTML":if(m!=null)throw Error(a(91));break;default:m!==y&>(i,r,E,m,u,y)}Lc(i,V,X);return;case"option":for(var ke in l)if(V=l[ke],l.hasOwnProperty(ke)&&V!=null&&!u.hasOwnProperty(ke))switch(ke){case"selected":i.selected=!1;break;default:gt(i,r,ke,null,u,V)}for(I in u)if(V=u[I],X=l[I],u.hasOwnProperty(I)&&V!==X&&(V!=null||X!=null))switch(I){case"selected":i.selected=V&&typeof V!="function"&&typeof V!="symbol";break;default:gt(i,r,I,V,u,X)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var Me in l)V=l[Me],l.hasOwnProperty(Me)&&V!=null&&!u.hasOwnProperty(Me)&>(i,r,Me,null,u,V);for(Y in u)if(V=u[Y],X=l[Y],u.hasOwnProperty(Y)&&V!==X&&(V!=null||X!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(V!=null)throw Error(a(137,r));break;default:gt(i,r,Y,V,u,X)}return;default:if(Ia(r)){for(var bt in l)V=l[bt],l.hasOwnProperty(bt)&&V!==void 0&&!u.hasOwnProperty(bt)&&qh(i,r,bt,void 0,u,V);for(ne in u)V=u[ne],X=l[ne],!u.hasOwnProperty(ne)||V===X||V===void 0&&X===void 0||qh(i,r,ne,V,u,X);return}}for(var q in l)V=l[q],l.hasOwnProperty(q)&&V!=null&&!u.hasOwnProperty(q)&>(i,r,q,null,u,V);for(oe in u)V=u[oe],X=l[oe],!u.hasOwnProperty(oe)||V===X||V==null&&X==null||gt(i,r,oe,V,u,X)}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,E=m.initiatorType,N=m.duration;if(y&&N&&Bx(E)){for(E=0,N=m.responseEnd,u+=1;u<l.length;u++){var I=l[u],Y=I.startTime;if(Y>N)break;var ne=I.transferSize,oe=I.initiatorType;ne&&Bx(oe)&&(I=I.responseEnd,E+=ne*(I<N?1:(N-Y)/(I-Y)))}if(--u,r+=8*(y+E)/(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 Yh=null;function E_(){var i=window.event;return i&&i.type==="popstate"?i===Yh?!1:(Yh=i,!0):(Yh=null,!1)}var Fx=typeof setTimeout=="function"?setTimeout:void 0,k_=typeof clearTimeout=="function"?clearTimeout:void 0,$x=typeof Promise=="function"?Promise:void 0,S_=typeof queueMicrotask=="function"?queueMicrotask:typeof $x<"u"?function(i){return $x.resolve(null).then(i).catch(__)}:Fx;function __(i){setTimeout(function(){throw i})}function tr(i){return i==="head"}function qx(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 E=y.nextSibling,N=y.nodeName;y[Or]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=E}}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 Qh(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":Qh(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 Yx(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 Qx(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 Ru(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var Ea=ce.d;ce.d={f:A_,r:j_,D:O_,C:D_,L:R_,m:M_,X:I_,S:L_,M:z_};function A_(){var i=Ea.f(),r=Su();return i||r}function j_(i){var r=aa(i);r!==null&&r.tag===5&&r.type==="form"?fy(r):Ea.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=Dn(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"),fn(r,"link",i),Vt(r),u.head.appendChild(r)))}}function O_(i){Ea.D(i),Wx("dns-prefetch",i,null)}function D_(i,r){Ea.C(i,r),Wx("preconnect",i,r)}function R_(i,r,l){Ea.L(i,r,l);var u=Js;if(u&&i&&r){var m='link[rel="preload"][as="'+Dn(r)+'"]';r==="image"&&l&&l.imageSrcSet?(m+='[imagesrcset="'+Dn(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(m+='[imagesizes="'+Dn(l.imageSizes)+'"]')):m+='[href="'+Dn(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"),fn(r,"link",i),Vt(r),u.head.appendChild(r)))}}function M_(i,r){Ea.m(i,r);var l=Js;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",m='link[rel="modulepreload"][as="'+Dn(u)+'"][href="'+Dn(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"),fn(u,"link",i),Vt(u),l.head.appendChild(u)}}}function L_(i,r,l){Ea.S(i,r,l);var u=Js;if(u&&i){var m=La(u).hoistableStyles,y=el(i);r=r||"default";var E=m.get(y);if(!E){var N={loading:0,preload:null};if(E=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 I=E=u.createElement("link");Vt(I),fn(I,"link",i),I._p=new Promise(function(Y,ne){I.onload=Y,I.onerror=ne}),I.addEventListener("load",function(){N.loading|=1}),I.addEventListener("error",function(){N.loading|=2}),N.loading|=4,Mu(E,r,u)}E={type:"stylesheet",instance:E,count:1,state:N},m.set(y,E)}}}function I_(i,r){Ea.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"),Vt(y),fn(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(m,y))}}function z_(i,r){Ea.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"),Vt(y),fn(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=fe.current)?Ru(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,E=y.get(i);if(E||(m=m.ownerDocument||m,E={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(i,E),(y=m.querySelector(Io(i)))&&!y._p&&(E.instance=y,E.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,E.state))),r&&u===null)throw Error(a(528,""));return E}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="'+Dn(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}),fn(r,"link",l),Vt(r),i.head.appendChild(r))}function tl(i){return'[src="'+Dn(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~="'+Dn(l.href)+'"]');if(u)return r.instance=u,Vt(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"),Vt(u),fn(u,"style",m),Mu(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,Vt(y),y;u=Zx(l),(m=xi.get(m))&&Zh(u,m),y=(i.ownerDocument||i).createElement("link"),Vt(y);var E=y;return E._p=new Promise(function(N,I){E.onload=N,E.onerror=I}),fn(y,"link",u),r.state.loading|=4,Mu(y,l.precedence,i),r.instance=y;case"script":return y=tl(l.src),(m=i.querySelector(zo(y)))?(r.instance=m,Vt(m),m):(u=l,(m=xi.get(y))&&(u=g({},l),Jh(u,m)),i=i.ownerDocument||i,m=i.createElement("script"),Vt(m),fn(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,Mu(u,l.precedence,i));return r.instance}function Mu(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,E=0;E<u.length;E++){var N=u[E];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[Kt]||i==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var E=y.getAttribute(r)||"";E=i+E;var N=u.get(E);N?N.push(y):u.set(E,[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,Vt(y);return}y=r.ownerDocument||r,u=Zx(u),(m=xi.get(m))&&Zh(u,m),y=y.createElement("link"),Vt(y);var E=y;E._p=new Promise(function(N,I){E.onload=N,E.onerror=I}),fn(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($_,i),zu=null,Iu.call(i))}function $_(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 E=m[y];(E.nodeName==="LINK"||E.getAttribute("media")!=="not all")&&(l.set(E.dataset.precedence,E),u=E)}u&&l.set(null,u)}m=r.instance,E=m.getAttribute("data-precedence"),y=l.get(E)||u,y===u&&l.set(null,m),l.set(E,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:A,Provider:null,Consumer:null,_currentValue:de,_currentValue2:de,_threadCount:0};function q_(i,r,l,u,m,y,E,N,I){this.tag=1,this.containerInfo=i,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Nt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Nt(0),this.hiddenUpdates=Nt(null),this.identifierPrefix=u,this.onUncaughtError=m,this.onCaughtError=y,this.onRecoverableError=E,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=I,this.incompleteTransitions=new Map}function iv(i,r,l,u,m,y,E,N,I,Y,ne,oe){return i=new q_(i,r,l,E,I,Y,ne,oe,N),r=1,y===!0&&(r|=24),y=Xn(3,null,null,r),i.current=y,y.stateNode=i,r=Rf(),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&&(Bn(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&&Bn(r,i,67108864),tp(i,67108864)}}function ov(i){if(i.tag===13||i.tag===31){var r=ni();r=At(r);var l=zr(i,r);l!==null&&Bn(l,i,r),tp(i,r)}}var Uu=!0;function H_(i,r,l,u){var m=H.T;H.T=null;var y=ce.p;try{ce.p=2,np(i,r,l,u)}finally{ce.p=y,H.T=m}}function K_(i,r,l,u){var m=H.T;H.T=null;var y=ce.p;try{ce.p=8,np(i,r,l,u)}finally{ce.p=y,H.T=m}}function np(i,r,l,u){if(Uu){var m=ip(u);if(m===null)$h(i,r,u,Pu,l),uv(i,u);else if(Y_(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 E=jn(y.pendingLanes);if(E!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;E;){var I=1<<31-ct(E);N.entanglements[1]|=I,E&=~I}Yi(y),(st&6)===0&&(Eu=Rt()+500,Do(0))}}break;case 31:case 13:N=zr(y,2),N!==null&&Bn(N,y,2),Su(),tp(y,2)}if(y=ip(u),y===null&&$h(i,r,u,Pu,l),y===m)break;m=y}m!==null&&u.stopPropagation()}else $h(i,r,u,null,l)}}function ip(i){return i=Pe(i),ap(i)}var Pu=null;function ap(i){if(Pu=null,i=kn(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 te:return 2;case ge:return 8;case Re:case Ke:return 32;case it: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 Y_(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=kn(i.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Es(i.priority,function(){ov(l)});return}}else if(r===31){if(r=d(l),r!==null){i.blockedOn=r,Es(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);_e=u,l.target.dispatchEvent(u),_e=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 Q_(){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 $u(i,r){i.blockedOn===r&&(i.blockedOn=null,rp||(rp=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,Q_)))}var qu=null;function hv(i){qu!==i&&(qu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){qu===i&&(qu=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(I){return $u(I,i)}nr!==null&&$u(nr,i),ir!==null&&$u(ir,i),ar!==null&&$u(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],E=m[pn]||null;if(typeof y=="function")E||hv(l);else if(E){var N=null;if(y&&y.hasAttribute("formAction")){if(m=y,E=y[pn]||null)N=E.formAction;else if(ap(m)!==null)continue}else N=E.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(E){return m=E})},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=ni();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[Ra]=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=h(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:H,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Ku=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Ku.isDisabled&&Ku.supportsFiber)try{ln=Ku.inject(V_),Ut=Ku}catch{}}return qo.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",m=Ey,y=ky,E=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&&(E=r.onRecoverableError)),r=iv(i,1,!1,null,null,l,u,null,m,y,E,pv),i[Ra]=r.current,Fh(i),new sp(r)},qo.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,m="",y=Ey,E=ky,N=Sy,I=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&&(E=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(I=l.formState)),r=iv(i,1,!0,r,l??null,u,m,I,y,E,N,pv),r.context=av(null),l=r.current,u=ni(),u=At(u),m=Ha(u),m.callback=null,Ka(l,m,u),l=u,r.current.lanes=l,vt(r,l),Yi(r),i[Ra]=r.current,Fh(i),new Hu(r)},qo.version="19.2.5",qo}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(),Rl=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,fw,cN=(fw=class extends Rl{constructor(){super();Ae(this,ts);Ae(this,fr);Ae(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(){z(this,fr)||this.setEventListener(z(this,bl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,fr))==null||t.call(this),we(this,fr,void 0))}setEventListener(t){var n;we(this,bl,t),(n=z(this,fr))==null||n.call(this),we(this,fr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){z(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 z(this,ts)=="boolean"?z(this,ts):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},ts=new WeakMap,fr=new WeakMap,bl=new WeakMap,fw),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,Mm,hw,dN=(hw=class{constructor(){Ae(this,hr,uN);Ae(this,Mm,!1)}setTimeoutProvider(e){we(this,hr,e)}setTimeout(e,t){return z(this,hr).setTimeout(e,t)}clearTimeout(e){z(this,hr).clearTimeout(e)}setInterval(e,t){return z(this,hr).setInterval(e,t)}clearInterval(e){z(this,hr).clearInterval(e)}},hr=new WeakMap,Mm=new WeakMap,hw),Xr=new dN;function fN(e){setTimeout(e,0)}var hN=typeof window>"u"||"Deno"in globalThis;function Cn(){}function pN(e,t){return typeof e=="function"?e(t):e}function Vp(e){return typeof e=="number"&&e>=0&&e!==1/0}function kw(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 p=t.isActive();if(n==="active"&&!p||n==="inactive"&&p)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 Sw(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,p=a?new Array(d):{};let h=0;for(let b=0;b<d;b++){const g=a?b:c[b],v=e[g],x=t[g];if(v===x){p[g]=v,(a?b<o:mN.call(e,g))&&h++;continue}if(v===null||x===null||typeof v!="object"||typeof x!="object"){p[g]=x;continue}const k=Sw(v,x,n+1);p[g]=k,k===v&&h++}return o===d&&h===o?e:p}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?Sw(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 _w(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(p=>{n(p)})})})};return{batch:d=>{let p;t++;try{p=d()}finally{t--,t||c()}return p},batchCalls:d=>(...p)=>{o(()=>{d(...p)})},schedule:o,setNotifyFunction:d=>{n=d},setBatchNotifyFunction:d=>{a=d},setScheduler:d=>{s=d}}}var an=wN(),yl,pr,xl,pw,EN=(pw=class extends Rl{constructor(){super();Ae(this,yl,!0);Ae(this,pr);Ae(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(){z(this,pr)||this.setEventListener(z(this,xl))}onUnsubscribe(){var t;this.hasListeners()||((t=z(this,pr))==null||t.call(this),we(this,pr,void 0))}setEventListener(t){var n;we(this,xl,t),(n=z(this,pr))==null||n.call(this),we(this,pr,t(this.setOnline.bind(this)))}setOnline(t){z(this,yl)!==t&&(we(this,yl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return z(this,yl)}},yl=new WeakMap,pr=new WeakMap,xl=new WeakMap,pw),xd=new EN;function kN(e){return Math.min(1e3*2**e,3e4)}function Nw(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 Cw(e){let t=!1,n=0,a;const s=Zp(),o=()=>s.status!=="pending",c=w=>{var _;if(!o()){const S=new Jp(w);v(S),(_=e.onCancel)==null||_.call(e,S)}},d=()=>{t=!0},p=()=>{t=!1},h=()=>zm.isFocused()&&(e.networkMode==="always"||xd.isOnline())&&e.canRun(),b=()=>Nw(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 _;a=S=>{(o()||h())&&w(S)},(_=e.onPause)==null||_.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),k=()=>{if(o())return;let w;const _=n===0?e.initialPromise:void 0;try{w=_??e.fn()}catch(S){w=Promise.reject(S)}Promise.resolve(w).then(g).catch(S=>{var M;if(o())return;const j=e.retry??(ac.isServer()?0:3),A=e.retryDelay??kN,D=typeof A=="function"?A(n,S):A,U=j===!0||typeof j=="number"&&n<j||typeof j=="function"&&j(n,S);if(t||!U){v(S);return}n++,(M=e.onFail)==null||M.call(e,n,S),gN(D).then(()=>h()?void 0:x()).then(()=>{t?v(S):k()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:d,continueRetry:p,canStart:b,start:()=>(b()?k():x().then(k),s)}}var ns,mw,Tw=(mw=class{constructor(){Ae(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(){z(this,ns)!==void 0&&(Xr.clearTimeout(z(this,ns)),we(this,ns,void 0))}},ns=new WeakMap,mw),is,vl,vi,as,sn,pc,rs,ai,Aw,ka,gw,SN=(gw=class extends Tw{constructor(t){super();Ae(this,ai);Ae(this,is);Ae(this,vl);Ae(this,vi);Ae(this,as);Ae(this,sn);Ae(this,pc);Ae(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,z(this,as).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,we(this,is,Rv(this.options)),this.state=t.state??z(this,is),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=z(this,sn))==null?void 0:t.promise}setOptions(t){if(this.options={...z(this,pc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Rv(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"&&z(this,vi).remove(this)}setData(t,n){const a=Xp(this.state.data,t,this.options);return qe(this,ai,ka).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){qe(this,ai,ka).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=z(this,sn))==null?void 0:a.promise;return(s=z(this,sn))==null||s.cancel(t),n?n.then(Cn).catch(Cn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return z(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:!kw(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,sn))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=z(this,sn))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),z(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||(z(this,sn)&&(z(this,rs)||qe(this,ai,Aw).call(this)?z(this,sn).cancel({revert:!0}):z(this,sn).cancelRetry()),this.scheduleGc()),z(this,vi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||qe(this,ai,ka).call(this,{type:"invalidate"})}async fetch(t,n){var p,h,b,g,v,x,k,w,_,S,j,A;if(this.state.fetchStatus!=="idle"&&((p=z(this,sn))==null?void 0:p.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(z(this,sn))return z(this,sn).continueRetry(),z(this,sn).promise}if(t&&this.setOptions(t),!this.options.queryFn){const D=this.observers.find(U=>U.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=_w(this.options,n),M=(()=>{const F={client:z(this,as),queryKey:this.queryKey,meta:this.meta};return s(F),F})();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:z(this,as),state:this.state,fetchFn:o};return s(D),D})();(h=this.options.behavior)==null||h.onFetch(d,this),we(this,vl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=d.fetchOptions)==null?void 0:b.meta))&&qe(this,ai,ka).call(this,{type:"fetch",meta:(g=d.fetchOptions)==null?void 0:g.meta}),we(this,sn,Cw({initialPromise:n==null?void 0:n.initialPromise,fn:d.fetchFn,onCancel:D=>{D instanceof Jp&&D.revert&&this.setState({...z(this,vl),fetchStatus:"idle"}),a.abort()},onFail:(D,U)=>{qe(this,ai,ka).call(this,{type:"failed",failureCount:D,error:U})},onPause:()=>{qe(this,ai,ka).call(this,{type:"pause"})},onContinue:()=>{qe(this,ai,ka).call(this,{type:"continue"})},retry:d.options.retry,retryDelay:d.options.retryDelay,networkMode:d.options.networkMode,canRun:()=>!0}));try{const D=await z(this,sn).start();if(D===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(D),(x=(v=z(this,vi).config).onSuccess)==null||x.call(v,D,this),(w=(k=z(this,vi).config).onSettled)==null||w.call(k,D,this.state.error,this),D}catch(D){if(D instanceof Jp){if(D.silent)return z(this,sn).promise;if(D.revert){if(this.state.data===void 0)throw D;return this.state.data}}throw qe(this,ai,ka).call(this,{type:"error",error:D}),(S=(_=z(this,vi).config).onError)==null||S.call(_,D,this),(A=(j=z(this,vi).config).onSettled)==null||A.call(j,this.state.data,D,this),D}finally{this.scheduleGc()}}},is=new WeakMap,vl=new WeakMap,vi=new WeakMap,as=new WeakMap,sn=new WeakMap,pc=new WeakMap,rs=new WeakMap,ai=new WeakSet,Aw=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},ka=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,...jw(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),an.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),z(this,vi).notify({query:this,type:"updated",action:t})})},gw);function jw(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:Nw(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 Rv(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 Fn,tt,mc,_n,ss,wl,Sa,mr,gc,El,kl,ls,os,gr,Sl,ot,Xo,em,tm,nm,im,am,rm,sm,Ow,bw,_N=(bw=class extends Rl{constructor(t,n){super();Ae(this,ot);Ae(this,Fn);Ae(this,tt);Ae(this,mc);Ae(this,_n);Ae(this,ss);Ae(this,wl);Ae(this,Sa);Ae(this,mr);Ae(this,gc);Ae(this,El);Ae(this,kl);Ae(this,ls);Ae(this,os);Ae(this,gr);Ae(this,Sl,new Set);this.options=n,we(this,Fn,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&&(z(this,tt).addObserver(this),Mv(z(this,tt),this.options)?qe(this,ot,Xo).call(this):this.updateResult(),qe(this,ot,im).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return lm(z(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return lm(z(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,qe(this,ot,am).call(this),qe(this,ot,rm).call(this),z(this,tt).removeObserver(this)}setOptions(t){const n=this.options,a=z(this,tt);if(this.options=z(this,Fn).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof wi(this.options.enabled,z(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");qe(this,ot,sm).call(this),z(this,tt).setOptions(this.options),n._defaulted&&!yd(this.options,n)&&z(this,Fn).getQueryCache().notify({type:"observerOptionsUpdated",query:z(this,tt),observer:this});const s=this.hasListeners();s&&Lv(z(this,tt),a,this.options,n)&&qe(this,ot,Xo).call(this),this.updateResult(),s&&(z(this,tt)!==a||wi(this.options.enabled,z(this,tt))!==wi(n.enabled,z(this,tt))||wr(this.options.staleTime,z(this,tt))!==wr(n.staleTime,z(this,tt)))&&qe(this,ot,em).call(this);const o=qe(this,ot,tm).call(this);s&&(z(this,tt)!==a||wi(this.options.enabled,z(this,tt))!==wi(n.enabled,z(this,tt))||o!==z(this,gr))&&qe(this,ot,nm).call(this,o)}getOptimisticResult(t){const n=z(this,Fn).getQueryCache().build(z(this,Fn),t),a=this.createResult(n,t);return CN(this,a)&&(we(this,_n,a),we(this,wl,this.options),we(this,ss,z(this,tt).state)),a}getCurrentResult(){return z(this,_n)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&z(this,Sa).status==="pending"&&z(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){z(this,Sl).add(t)}getCurrentQuery(){return z(this,tt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=z(this,Fn).defaultQueryOptions(t),a=z(this,Fn).getQueryCache().build(z(this,Fn),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return qe(this,ot,Xo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),z(this,_n)))}createResult(t,n){var ee;const a=z(this,tt),s=this.options,o=z(this,_n),c=z(this,ss),d=z(this,wl),h=t!==a?t.state:z(this,mc),{state:b}=t;let g={...b},v=!1,x;if(n._optimisticResults){const L=this.hasListeners(),Z=!L&&Mv(t,n),ie=L&&Lv(t,a,n,s);(Z||ie)&&(g={...g,...jw(b.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:k,errorUpdatedAt:w,status:_}=g;x=g.data;let S=!1;if(n.placeholderData!==void 0&&x===void 0&&_==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(d==null?void 0:d.placeholderData)?(L=o.data,S=!0):L=typeof n.placeholderData=="function"?n.placeholderData((ee=z(this,kl))==null?void 0:ee.state.data,z(this,kl)):n.placeholderData,L!==void 0&&(_="success",x=Xp(o==null?void 0:o.data,L,n),v=!0)}if(n.select&&x!==void 0&&!S)if(o&&x===(c==null?void 0:c.data)&&n.select===z(this,gc))x=z(this,El);else try{we(this,gc,n.select),x=n.select(x),x=Xp(o==null?void 0:o.data,x,n),we(this,El,x),we(this,mr,null)}catch(L){we(this,mr,L)}z(this,mr)&&(k=z(this,mr),x=z(this,El),w=Date.now(),_="error");const j=g.fetchStatus==="fetching",A=_==="pending",D=_==="error",U=A&&j,M=x!==void 0,$={status:_,fetchStatus:g.fetchStatus,isPending:A,isSuccess:_==="success",isError:D,isInitialLoading:U,isLoading:U,data:x,dataUpdatedAt:g.dataUpdatedAt,error:k,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>h.dataUpdateCount||g.errorUpdateCount>h.errorUpdateCount,isFetching:j,isRefetching:j&&!A,isLoadingError:D&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:v,isRefetchError:D&&M,isStale:Fm(t,n),refetch:this.refetch,promise:z(this,Sa),isEnabled:wi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=$.data!==void 0,Z=$.status==="error"&&!L,ie=J=>{Z?J.reject($.error):L&&J.resolve($.data)},xe=()=>{const J=we(this,Sa,$.promise=Zp());ie(J)},ue=z(this,Sa);switch(ue.status){case"pending":t.queryHash===a.queryHash&&ie(ue);break;case"fulfilled":(Z||$.data!==ue.value)&&xe();break;case"rejected":(!Z||$.error!==ue.reason)&&xe();break}}return $}updateResult(){const t=z(this,_n),n=this.createResult(z(this,tt),this.options);if(we(this,ss,z(this,tt).state),we(this,wl,this.options),z(this,ss).data!==void 0&&we(this,kl,z(this,tt)),yd(n,t))return;we(this,_n,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!z(this,Sl).size)return!0;const c=new Set(o??z(this,Sl));return this.options.throwOnError&&c.add("error"),Object.keys(z(this,_n)).some(d=>{const p=d;return z(this,_n)[p]!==t[p]&&c.has(p)})};qe(this,ot,Ow).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&qe(this,ot,im).call(this)}},Fn=new WeakMap,tt=new WeakMap,mc=new WeakMap,_n=new WeakMap,ss=new WeakMap,wl=new WeakMap,Sa=new WeakMap,mr=new WeakMap,gc=new WeakMap,El=new WeakMap,kl=new WeakMap,ls=new WeakMap,os=new WeakMap,gr=new WeakMap,Sl=new WeakMap,ot=new WeakSet,Xo=function(t){qe(this,ot,sm).call(this);let n=z(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(Cn)),n},em=function(){qe(this,ot,am).call(this);const t=wr(this.options.staleTime,z(this,tt));if(ac.isServer()||z(this,_n).isStale||!Vp(t))return;const a=kw(z(this,_n).dataUpdatedAt,t)+1;we(this,ls,Xr.setTimeout(()=>{z(this,_n).isStale||this.updateResult()},a))},tm=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(z(this,tt)):this.options.refetchInterval)??!1},nm=function(t){qe(this,ot,rm).call(this),we(this,gr,t),!(ac.isServer()||wi(this.options.enabled,z(this,tt))===!1||!Vp(z(this,gr))||z(this,gr)===0)&&we(this,os,Xr.setInterval(()=>{(this.options.refetchIntervalInBackground||zm.isFocused())&&qe(this,ot,Xo).call(this)},z(this,gr)))},im=function(){qe(this,ot,em).call(this),qe(this,ot,nm).call(this,qe(this,ot,tm).call(this))},am=function(){z(this,ls)!==void 0&&(Xr.clearTimeout(z(this,ls)),we(this,ls,void 0))},rm=function(){z(this,os)!==void 0&&(Xr.clearInterval(z(this,os)),we(this,os,void 0))},sm=function(){const t=z(this,Fn).getQueryCache().build(z(this,Fn),this.options);if(t===z(this,tt))return;const n=z(this,tt);we(this,tt,t),we(this,mc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},Ow=function(t){an.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(z(this,_n))}),z(this,Fn).getQueryCache().notify({query:z(this,tt),type:"observerResultsUpdated"})})},bw);function NN(e,t){return wi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Mv(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,k;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=((k=t.state.data)==null?void 0:k.pageParams)||[];let d={pages:[],pageParams:[]},p=0;const h=async()=>{let w=!1;const _=A=>{xN(A,()=>t.signal,()=>w=!0)},S=_w(t.options,t.fetchOptions),j=async(A,D,U)=>{if(w)return Promise.reject();if(D==null&&A.pages.length)return Promise.resolve(A);const F=(()=>{const Z={client:t.client,queryKey:t.queryKey,pageParam:D,direction:U?"backward":"forward",meta:t.options.meta};return _(Z),Z})(),$=await S(F),{maxPages:ee}=t.options,L=U?yN:bN;return{pages:L(A.pages,$,ee),pageParams:L(A.pageParams,D,ee)}};if(s&&o.length){const A=s==="backward",D=A?TN:zv,U={pages:o,pageParams:c},M=D(a,U);d=await j(U,M,A)}else{const A=e??o.length;do{const D=p===0?c[0]??a.initialPageParam:zv(a,d);if(p>0&&D==null)break;d=await j(d,D),p++}while(p<A)}return d};t.options.persister?t.fetchFn=()=>{var w,_;return(_=(w=t.options).persister)==null?void 0:_.call(w,h,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=h}}}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,bn,cs,Xi,ur,yw,AN=(yw=class extends Tw{constructor(t){super();Ae(this,Xi);Ae(this,bc);Ae(this,Wi);Ae(this,bn);Ae(this,cs);we(this,bc,t.client),this.mutationId=t.mutationId,we(this,bn,t.mutationCache),we(this,Wi,[]),this.state=t.state||Dw(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){z(this,Wi).includes(t)||(z(this,Wi).push(t),this.clearGcTimeout(),z(this,bn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){we(this,Wi,z(this,Wi).filter(n=>n!==t)),this.scheduleGc(),z(this,bn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){z(this,Wi).length||(this.state.status==="pending"?this.scheduleGc():z(this,bn).remove(this))}continue(){var t;return((t=z(this,cs))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,d,p,h,b,g,v,x,k,w,_,S,j,A,D,U,M,F;const n=()=>{qe(this,Xi,ur).call(this,{type:"continue"})},a={client:z(this,bc),meta:this.options.meta,mutationKey:this.options.mutationKey};we(this,cs,Cw({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:($,ee)=>{qe(this,Xi,ur).call(this,{type:"failed",failureCount:$,error:ee})},onPause:()=>{qe(this,Xi,ur).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>z(this,bn).canRun(this)}));const s=this.state.status==="pending",o=!z(this,cs).canStart();try{if(s)n();else{qe(this,Xi,ur).call(this,{type:"pending",variables:t,isPaused:o}),z(this,bn).config.onMutate&&await z(this,bn).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&&qe(this,Xi,ur).call(this,{type:"pending",context:ee,variables:t,isPaused:o})}const $=await z(this,cs).start();return await((h=(p=z(this,bn).config).onSuccess)==null?void 0:h.call(p,$,t,this.state.context,this,a)),await((g=(b=this.options).onSuccess)==null?void 0:g.call(b,$,t,this.state.context,a)),await((x=(v=z(this,bn).config).onSettled)==null?void 0:x.call(v,$,null,this.state.variables,this.state.context,this,a)),await((w=(k=this.options).onSettled)==null?void 0:w.call(k,$,null,t,this.state.context,a)),qe(this,Xi,ur).call(this,{type:"success",data:$}),$}catch($){try{await((S=(_=z(this,bn).config).onError)==null?void 0:S.call(_,$,t,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((A=(j=this.options).onError)==null?void 0:A.call(j,$,t,this.state.context,a))}catch(ee){Promise.reject(ee)}try{await((U=(D=z(this,bn).config).onSettled)==null?void 0:U.call(D,void 0,$,this.state.variables,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((F=(M=this.options).onSettled)==null?void 0:F.call(M,void 0,$,t,this.state.context,a))}catch(ee){Promise.reject(ee)}throw qe(this,Xi,ur).call(this,{type:"error",error:$}),$}finally{z(this,bn).runNext(this)}}},bc=new WeakMap,Wi=new WeakMap,bn=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),an.batch(()=>{z(this,Wi).forEach(a=>{a.onMutationUpdate(t)}),z(this,bn).notify({mutation:this,type:"updated",action:t})})},yw);function Dw(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var _a,Mi,yc,xw,jN=(xw=class extends Rl{constructor(t={}){super();Ae(this,_a);Ae(this,Mi);Ae(this,yc);this.config=t,we(this,_a,new Set),we(this,Mi,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){z(this,_a).add(t);const n=Yu(t);if(typeof n=="string"){const a=z(this,Mi).get(n);a?a.push(t):z(this,Mi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(z(this,_a).delete(t)){const n=Yu(t);if(typeof n=="string"){const a=z(this,Mi).get(n);if(a)if(a.length>1){const s=a.indexOf(t);s!==-1&&a.splice(s,1)}else a[0]===t&&z(this,Mi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Yu(t);if(typeof n=="string"){const a=z(this,Mi).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=Yu(t);if(typeof n=="string"){const s=(a=z(this,Mi).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(){an.batch(()=>{z(this,_a).forEach(t=>{this.notify({type:"removed",mutation:t})}),z(this,_a).clear(),z(this,Mi).clear()})}getAll(){return Array.from(z(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){an.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return an.batch(()=>Promise.all(t.map(n=>n.continue().catch(Cn))))}},_a=new WeakMap,Mi=new WeakMap,yc=new WeakMap,xw);function Yu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var Na,br,$n,Ca,ja,ud,om,vw,ON=(vw=class extends Rl{constructor(n,a){super();Ae(this,ja);Ae(this,Na);Ae(this,br);Ae(this,$n);Ae(this,Ca);we(this,Na,n),this.setOptions(a),this.bindMethods(),qe(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=z(this,Na).defaultMutationOptions(n),yd(this.options,a)||z(this,Na).getMutationCache().notify({type:"observerOptionsUpdated",mutation:z(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&us(a.mutationKey)!==us(this.options.mutationKey)?this.reset():((s=z(this,$n))==null?void 0:s.state.status)==="pending"&&z(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=z(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){qe(this,ja,ud).call(this),qe(this,ja,om).call(this,n)}getCurrentResult(){return z(this,br)}reset(){var n;(n=z(this,$n))==null||n.removeObserver(this),we(this,$n,void 0),qe(this,ja,ud).call(this),qe(this,ja,om).call(this)}mutate(n,a){var s;return we(this,Ca,a),(s=z(this,$n))==null||s.removeObserver(this),we(this,$n,z(this,Na).getMutationCache().build(z(this,Na),this.options)),z(this,$n).addObserver(this),z(this,$n).execute(n)}},Na=new WeakMap,br=new WeakMap,$n=new WeakMap,Ca=new WeakMap,ja=new WeakSet,ud=function(){var a;const n=((a=z(this,$n))==null?void 0:a.state)??Dw();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){an.batch(()=>{var a,s,o,c,d,p,h,b;if(z(this,Ca)&&this.hasListeners()){const g=z(this,br).variables,v=z(this,br).context,x={client:z(this,Na),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=z(this,Ca)).onSuccess)==null||s.call(a,n.data,g,v,x)}catch(k){Promise.reject(k)}try{(c=(o=z(this,Ca)).onSettled)==null||c.call(o,n.data,null,g,v,x)}catch(k){Promise.reject(k)}}else if((n==null?void 0:n.type)==="error"){try{(p=(d=z(this,Ca)).onError)==null||p.call(d,n.error,g,v,x)}catch(k){Promise.reject(k)}try{(b=(h=z(this,Ca)).onSettled)==null||b.call(h,void 0,n.error,g,v,x)}catch(k){Promise.reject(k)}}}this.listeners.forEach(g=>{g(z(this,br))})})},vw),Zi,ww,DN=(ww=class extends Rl{constructor(t={}){super();Ae(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){z(this,Zi).has(t.queryHash)||(z(this,Zi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=z(this,Zi).get(t.queryHash);n&&(t.destroy(),n===t&&z(this,Zi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){an.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return z(this,Zi).get(t)}getAll(){return[...z(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){an.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){an.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){an.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Zi=new WeakMap,ww),$t,yr,xr,_l,Nl,vr,Cl,Tl,Ew,RN=(Ew=class{constructor(e={}){Ae(this,$t);Ae(this,yr);Ae(this,xr);Ae(this,_l);Ae(this,Nl);Ae(this,vr);Ae(this,Cl);Ae(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)._++,z(this,vr)===1&&(we(this,Cl,zm.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,$t).onFocus())})),we(this,Tl,xd.subscribe(async e=>{e&&(await this.resumePausedMutations(),z(this,$t).onOnline())})))}unmount(){var e,t;Gu(this,vr)._--,z(this,vr)===0&&((e=z(this,Cl))==null||e.call(this),we(this,Cl,void 0),(t=z(this,Tl))==null||t.call(this),we(this,Tl,void 0))}isFetching(e){return z(this,$t).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return z(this,yr).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=z(this,$t).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=z(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 z(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=z(this,$t).get(a.queryHash),o=s==null?void 0:s.state.data,c=pN(t,o);if(c!==void 0)return z(this,$t).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return an.batch(()=>z(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=z(this,$t).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=z(this,$t);an.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=z(this,$t);return an.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=an.batch(()=>z(this,$t).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(Cn).catch(Cn)}invalidateQueries(e,t={}){return an.batch(()=>(z(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=an.batch(()=>z(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(Cn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(Cn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=z(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(Cn).catch(Cn)}fetchInfiniteQuery(e){return e.behavior=Iv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(Cn).catch(Cn)}ensureInfiniteQueryData(e){return e.behavior=Iv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xd.isOnline()?z(this,yr).resumePausedMutations():Promise.resolve()}getQueryCache(){return z(this,$t)}getMutationCache(){return z(this,yr)}getDefaultOptions(){return z(this,xr)}setDefaultOptions(e){we(this,xr,e)}setQueryDefaults(e,t){z(this,_l).set(us(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...z(this,_l).values()],n={};return t.forEach(a=>{ic(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){z(this,Nl).set(us(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...z(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={...z(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:{...z(this,xr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){z(this,$t).clear(),z(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,Ew),Rw=C.createContext(void 0),Kn=e=>{const t=C.useContext(Rw);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},MN=({client:e,children:t})=>(C.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),f.jsx(Rw.Provider,{value:e,children:t})),Mw=C.createContext(!1),LN=()=>C.useContext(Mw);Mw.Provider;function IN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var zN=C.createContext(IN()),BN=()=>C.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=>{C.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])),$N=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))}},qN=(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,k,w;const a=LN(),s=BN(),o=Kn(),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",$N(c),UN(c,s,d),PN(s);const p=!o.getQueryCache().get(c.queryHash),[h]=C.useState(()=>new t(o,c)),b=h.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(C.useSyncExternalStore(C.useCallback(_=>{const S=g?h.subscribe(an.batchCalls(_)):Cn;return h.updateResult(),S},[h,g]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),C.useEffect(()=>{h.setOptions(c)},[c,h]),HN(c,b))throw Bv(c,h,s);if(FN({result:b,errorResetBoundary:s,throwOnError:c.throwOnError,query:d,suspense:c.suspense}))throw b.error;if((w=(k=o.getDefaultOptions().queries)==null?void 0:k._experimental_afterQuery)==null||w.call(k,c,b),c.experimental_prefetchInRender&&!ac.isServer()&&qN(b,a)){const _=p?Bv(c,h,s):d==null?void 0:d.promise;_==null||_.catch(Cn).finally(()=>{h.updateResult()})}return c.notifyOnChangeProps?b:h.trackResult(b)}function lt(e,t){return KN(e,_N)}function Hn(e,t){const n=Kn(),[a]=C.useState(()=>new ON(n,e));C.useEffect(()=>{a.setOptions(e)},[a,e]);const s=C.useSyncExternalStore(C.useCallback(c=>a.subscribe(an.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=C.useCallback((c,d)=>{a.mutate(c,d).catch(Cn)},[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 h;let o=(h=s.state)==null?void 0:h.masked,{pathname:c,search:d,hash:p}=o||a.location;return cm("",{pathname:c,search:d,hash:p},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 QN(t,n,null,e)}function Ot(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 YN(){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"?Ml(t):t,state:n,key:t&&t.key||a||YN(),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 Ml(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 QN(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,d="POP",p=null,h=b();h==null&&(h=0,c.replaceState({...c.state,idx:h},""));function b(){return(c.state||{idx:null}).idx}function g(){d="POP";let _=b(),S=_==null?null:_-h;h=_,p&&p({action:d,location:w.location,delta:S})}function v(_,S){d="PUSH";let j=Pv(_)?_:cm(w.location,_,S);h=b()+1;let A=Fv(j,h),D=w.createHref(j.unstable_mask||j);try{c.pushState(A,"",D)}catch(U){if(U instanceof DOMException&&U.name==="DataCloneError")throw U;s.location.assign(D)}o&&p&&p({action:d,location:w.location,delta:1})}function x(_,S){d="REPLACE";let j=Pv(_)?_:cm(w.location,_,S);h=b();let A=Fv(j,h),D=w.createHref(j.unstable_mask||j);c.replaceState(A,"",D),o&&p&&p({action:d,location:w.location,delta:0})}function k(_){return VN(_)}let w={get action(){return d},get location(){return e(s,c)},listen(_){if(p)throw new Error("A history only accepts one active listener");return s.addEventListener(Uv,g),p=_,()=>{s.removeEventListener(Uv,g),p=null}},createHref(_){return t(s,_)},createURL:k,encodeLocation(_){let S=k(_);return{pathname:S.pathname,search:S.search,hash:S.hash}},push:v,replace:x,go(_){return c.go(_)}};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),Ot(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 Lw(e,t,n="/"){return WN(e,t,n,!1)}function WN(e,t,n,a){let s=typeof t=="string"?Ml(t):t,o=Oa(s.pathname||"/",n);if(o==null)return null;let c=Iw(e);XN(c);let d=null;for(let p=0;d==null&&p<c.length;++p){let h=oC(o);d=sC(c[p],h,a)}return d}function Iw(e,t=[],n=[],a="",s=!1){let o=(c,d,p=s,h)=>{let b={relativePath:h===void 0?c.path||"":h,caseSensitive:c.caseSensitive===!0,childrenIndex:d,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&p)return;Ot(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&&(Ot(c.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${g}".`),Iw(c.children,t,v,g,p)),!(c.path==null&&!c.index)&&t.push({path:g,score:aC(g,c.index),routesMeta:v})};return e.forEach((c,d)=>{var p;if(c.path===""||!((p=c.path)!=null&&p.includes("?")))o(c,d);else for(let h of zw(c.path))o(c,d,!0,h)}),t}function zw(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=zw(a.join("/")),d=[];return d.push(...c.map(p=>p===""?o:[o,p].join("/"))),s&&d.push(...c),d.map(p=>e.startsWith("/")&&p===""?"/":p)}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,$v=e=>e==="*";function aC(e,t){let n=e.split("/"),a=n.length;return n.some($v)&&(a+=iC),t&&(a+=eC),n.filter(s=>!$v(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 p=a[d],h=d===a.length-1,b=o==="/"?t:t.slice(o.length)||"/",g=vd({path:p.relativePath,caseSensitive:p.caseSensitive,end:h},b),v=p.route;if(!g&&h&&n&&!a[a.length-1].route.index&&(g=vd({path:p.relativePath,caseSensitive:p.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((h,{paramName:b,isOptional:g},v)=>{if(b==="*"){let k=d[v]||"";c=o.slice(0,o.length-k.length).replace(/(.)\/+$/,"$1")}const x=d[v];return g&&!x?h[b]=void 0:h[b]=(x||"").replace(/%2F/g,"/"),h},{}),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,p,h,b)=>{if(a.push({paramName:d,isOptional:p!=null}),p){let g=b.charAt(h+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"?Ml(e):e,o;return n?(n=Bw(n),n.startsWith("/")?o=qv(n.substring(1),"/"):o=qv(n,t)):o=t,{pathname:o,search:hC(a),hash:pC(s)}}function qv(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 $m(e){let t=dC(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Md(e,t,n,a=!1){let s;typeof e=="string"?s=Ml(e):(s={...e},Ot(!s.pathname||!s.pathname.includes("?"),pp("?","pathname","search",s)),Ot(!s.pathname||!s.pathname.includes("#"),pp("#","pathname","hash",s)),Ot(!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 p=uC(s,d),h=c&&c!=="/"&&c.endsWith("/"),b=(o||c===".")&&n.endsWith("/");return!p.pathname.endsWith("/")&&(h||b)&&(p.pathname+="/"),p}var Bw=e=>e.replace(/\/\/+/g,"/"),Li=e=>Bw(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 Uw=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Pw(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(Uw)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 Fw=["POST","PUT","PATCH","DELETE"];new Set(Fw);var yC=["GET",...Fw];new Set(yC);var Ll=C.createContext(null);Ll.displayName="DataRouter";var Ld=C.createContext(null);Ld.displayName="DataRouterState";var $w=C.createContext(!1);function xC(){return C.useContext($w)}var qw=C.createContext({isTransitioning:!1});qw.displayName="ViewTransition";var vC=C.createContext(new Map);vC.displayName="Fetchers";var wC=C.createContext(null);wC.displayName="Await";var li=C.createContext(null);li.displayName="Navigation";var xc=C.createContext(null);xc.displayName="Location";var Ci=C.createContext({outlet:null,matches:[],isDataRoute:!1});Ci.displayName="Route";var qm=C.createContext(null);qm.displayName="RouteError";var Hw="REACT_ROUTER_ERROR",EC="REDIRECT",kC="ROUTE_ERROR_RESPONSE";function SC(e){if(e.startsWith(`${Hw}:${EC}:{`))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(`${Hw}:${kC}:{`))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}={}){Ot(Il(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=C.useContext(li),{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 C.useContext(xc)!=null}function zi(){return Ot(Il(),"useLocation() may be used only in the context of a <Router> component."),C.useContext(xc).location}var Kw="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function Gw(e){C.useContext(li).static||C.useLayoutEffect(e)}function Sr(){let{isDataRoute:e}=C.useContext(Ci);return e?FC():CC()}function CC(){Ot(Il(),"useNavigate() may be used only in the context of a <Router> component.");let e=C.useContext(Ll),{basename:t,navigator:n}=C.useContext(li),{matches:a}=C.useContext(Ci),{pathname:s}=zi(),o=JSON.stringify($m(a)),c=C.useRef(!1);return Gw(()=>{c.current=!0}),C.useCallback((p,h={})=>{if(Si(c.current,Kw),!c.current)return;if(typeof p=="number"){n.go(p);return}let b=Md(p,JSON.parse(o),s,h.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:Li([t,b.pathname])),(h.replace?n.replace:n.push)(b,h.state,h)},[t,n,o,s,e])}var TC=C.createContext(null);function AC(e){let t=C.useContext(Ci).outlet;return C.useMemo(()=>t&&C.createElement(TC.Provider,{value:e},t),[t,e])}function Yw(){let{matches:e}=C.useContext(Ci),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function vc(e,{relative:t}={}){let{matches:n}=C.useContext(Ci),{pathname:a}=zi(),s=JSON.stringify($m(n));return C.useMemo(()=>Md(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function jC(e,t){return Qw(e,t)}function Qw(e,t,n){var _;Ot(Il(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=C.useContext(li),{matches:s}=C.useContext(Ci),o=s[s.length-1],c=o?o.params:{},d=o?o.pathname:"/",p=o?o.pathnameBase:"/",h=o&&o.route;{let S=h&&h.path||"";Ww(d,!h||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${d}" (under <Route path="${S}">) 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="${S}"> to <Route path="${S==="/"?"*":`${S}/*`}">.`)}let b=zi(),g;if(t){let S=typeof t=="string"?Ml(t):t;Ot(p==="/"||((_=S.pathname)==null?void 0:_.startsWith(p)),`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 "${p}" but pathname "${S.pathname}" was given in the \`location\` prop.`),g=S}else g=b;let v=g.pathname||"/",x=v;if(p!=="/"){let S=p.replace(/^\//,"").split("/");x="/"+v.replace(/^\//,"").split("/").slice(S.length).join("/")}let k=Lw(e,{pathname:x});Si(h||k!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Si(k==null||k[k.length-1].route.element!==void 0||k[k.length-1].route.Component!==void 0||k[k.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(k&&k.map(S=>Object.assign({},S,{params:Object.assign({},c,S.params),pathname:Li([p,a.encodeLocation?a.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?p:Li([p,a.encodeLocation?a.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),s,n);return t&&w?C.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=C.createElement(C.Fragment,null,C.createElement("p",null,"💿 Hey developer 👋"),C.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",C.createElement("code",{style:o},"ErrorBoundary")," or"," ",C.createElement("code",{style:o},"errorElement")," prop on your route.")),C.createElement(C.Fragment,null,C.createElement("h2",null,"Unexpected Application Error!"),C.createElement("h3",{style:{fontStyle:"italic"}},t),n?C.createElement("pre",{style:s},n):null,c)}var DC=C.createElement(OC,null),Vw=class extends C.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?C.createElement(Ci.Provider,{value:this.props.routeContext},C.createElement(qm.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?C.createElement(RC,{error:e},t):t}};Vw.contextType=$w;var mp=new WeakMap;function RC({children:e,error:t}){let{basename:n}=C.useContext(li);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=Pw(a.location,n);if(Uw&&!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 C.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function MC({routeContext:e,match:t,children:n}){let a=C.useContext(Ll);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),C.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);Ot(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,k=g.route.loader&&!v.hasOwnProperty(g.route.id)&&(!x||x[g.route.id]===void 0);if(g.route.lazy||k){n.isStatic&&(c=!0),d>=0?s=s.slice(0,d+1):s=[s[0]];break}}}}let p=n==null?void 0:n.onError,h=a&&p?(b,g)=>{var v,x;p(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,k=!1,w=null,_=null;a&&(x=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||DC,c&&(d<0&&v===0?(Ww("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),k=!0,_=null):d===v&&(k=!0,_=g.route.hydrateFallbackElement||null)));let S=t.concat(s.slice(0,v+1)),j=()=>{let A;return x?A=w:k?A=_:g.route.Component?A=C.createElement(g.route.Component,null):g.route.element?A=g.route.element:A=b,C.createElement(MC,{match:g,routeContext:{outlet:b,matches:S,isDataRoute:a!=null},children:A})};return a&&(g.route.ErrorBoundary||g.route.errorElement||v===0)?C.createElement(Vw,{location:a.location,revalidation:a.revalidation,component:w,error:x,children:j(),routeContext:{outlet:null,matches:S,isDataRoute:!0},onError:h}):j()},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=C.useContext(Ll);return Ot(t,Hm(e)),t}function zC(e){let t=C.useContext(Ld);return Ot(t,Hm(e)),t}function BC(e){let t=C.useContext(Ci);return Ot(t,Hm(e)),t}function Km(e){let t=BC(e),n=t.matches[t.matches.length-1];return Ot(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=C.useContext(qm),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=C.useRef(!1);return Gw(()=>{n.current=!0}),C.useCallback(async(s,o={})=>{Si(n.current,Kw),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var Hv={};function Ww(e,t,n){!t&&!Hv[e]&&(Hv[e]=!0,Si(!1,n))}C.memo($C);function $C({routes:e,future:t,state:n,isStatic:a,onError:s}){return Qw(e,void 0,{state:n,isStatic:a,onError:s})}function qC({to:e,replace:t,state:n,relative:a}){Ot(Il(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=C.useContext(li);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}=C.useContext(Ci),{pathname:c}=zi(),d=Sr(),p=Md(e,$m(o),c,a==="path"),h=JSON.stringify(p);return C.useEffect(()=>{d(JSON.parse(h),{replace:t,state:n,relative:a})},[d,h,a,t,n]),null}function HC(e){return AC(e.context)}function Un(e){Ot(!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}){Ot(!Il(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let d=e.replace(/^\/*/,"/"),p=C.useMemo(()=>({basename:d,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[d,s,o,c]);typeof n=="string"&&(n=Ml(n));let{pathname:h="/",search:b="",hash:g="",state:v=null,key:x="default",unstable_mask:k}=n,w=C.useMemo(()=>{let _=Oa(h,d);return _==null?null:{location:{pathname:_,search:b,hash:g,state:v,key:x,unstable_mask:k},navigationType:a}},[d,h,b,g,v,x,a,k]);return Si(w!=null,`<Router basename="${d}"> is not able to match the URL "${h}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:C.createElement(li.Provider,{value:p},C.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 C.Children.forEach(e,(a,s)=>{if(!C.isValidElement(a))return;let o=[...t,s];if(a.type===C.Fragment){n.push.apply(n,um(a.props.children,o));return}Ot(a.type===Un,`[${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>`),Ot(!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 YC(e){return Id(e)&&e.tagName.toLowerCase()==="button"}function QC(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 Qu=null;function JC(){if(Qu===null)try{new FormData(document.createElement("form"),0),Qu=!1}catch{Qu=!0}return Qu}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(QC(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(YC(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 p=e.getAttribute("formaction")||d.getAttribute("action");if(a=p?Oa(p,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:h,type:b,value:g}=e;if(b==="image"){let v=h?`${h}.`:"";o.append(`${v}x`,"0"),o.append(`${v}y`,"0")}else h&&o.append(h,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 Xw(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=(p,h)=>n[h]?p.route.id!==n[h].route.id:!0,d=(p,h)=>{var b;return n[h].pathname!==p.pathname||((b=n[h].route.path)==null?void 0:b.endsWith("*"))&&n[h].params["*"]!==p.params["*"]};return o==="assets"?t.filter((p,h)=>c(p,h)||d(p,h)):o==="data"?t.filter((p,h)=>{var g;let b=a.routes[p.route.id];if(!b||!b.hasLoader)return!1;if(c(p,h)||d(p,h))return!0;if(p.route.shouldRevalidate){let v=p.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:p.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 Ym(){let e=C.useContext(Ll);return Gm(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function cT(){let e=C.useContext(Ld);return Gm(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qm=C.createContext(void 0);Qm.displayName="FrameworkContext";function Vm(){let e=C.useContext(Qm);return Gm(e,"You must render this element inside a <HydratedRouter> element"),e}function uT(e,t){let n=C.useContext(Qm),[a,s]=C.useState(!1),[o,c]=C.useState(!1),{onFocus:d,onBlur:p,onMouseEnter:h,onMouseLeave:b,onTouchStart:g}=t,v=C.useRef(null);C.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=S=>{S.forEach(j=>{c(j.isIntersecting)})},_=new IntersectionObserver(w,{threshold:.5});return v.current&&_.observe(v.current),()=>{_.disconnect()}}},[e]),C.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let x=()=>{s(!0)},k=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,v,{}]:[o,v,{onFocus:Ho(d,x),onBlur:Ho(p,k),onMouseEnter:Ho(h,x),onMouseLeave:Ho(b,k),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}=Ym(),s=C.useMemo(()=>Lw(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?C.createElement(hT,{page:e,matches:s,...t}):C.createElement(pT,{page:e,matches:s,...t}):null}function fT(e){let{manifest:t,routeModules:n}=Vm(),[a,s]=C.useState([]);return C.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}=Ym(),c=C.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let d=Xw(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),p=!1,h=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?p=!0:h.push(b.route.id);return p&&h.length>0&&d.searchParams.set("_routes",h.join(",")),[d.pathname+d.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return C.createElement(C.Fragment,null,c.map(d=>C.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}=Ym(),{loaderData:p,matches:h}=cT(),b=C.useMemo(()=>Kv(e,t,h,o,a,"data"),[e,t,h,o,a]),g=C.useMemo(()=>Kv(e,t,h,o,a,"assets"),[e,t,h,o,a]),v=C.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,_=!1;if(t.forEach(j=>{var D;let A=o.routes[j.route.id];!A||!A.hasLoader||(!b.some(U=>U.route.id===j.route.id)&&j.route.id in p&&((D=c[j.route.id])!=null&&D.shouldRevalidate)||A.hasClientLoader?_=!0:w.add(j.route.id))}),w.size===0)return[];let S=Xw(e,d,s.unstable_trailingSlashAwareDataRequests,"data");return _&&w.size>0&&S.searchParams.set("_routes",t.filter(j=>w.has(j.route.id)).map(j=>j.route.id).join(",")),[S.pathname+S.search]},[d,s.unstable_trailingSlashAwareDataRequests,p,a,o,b,t,e,c]),x=C.useMemo(()=>rT(g,o),[g,o]),k=fT(g);return C.createElement(C.Fragment,null,v.map(w=>C.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),x.map(w=>C.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),k.map(({key:w,link:_})=>C.createElement("link",{key:w,nonce:n.nonce,..._,crossOrigin:_.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=C.useRef();s.current==null&&(s.current=GN({window:a,v5Compat:!0}));let o=s.current,[c,d]=C.useState({action:o.action,location:o.location}),p=C.useCallback(h=>{n===!1?d(h):C.startTransition(()=>d(h))},[n]);return C.useLayoutEffect(()=>o.listen(p),[o,p]),C.createElement(KC,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var Zw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,hs=C.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:d,state:p,target:h,to:b,preventScrollReset:g,viewTransition:v,unstable_defaultShouldRevalidate:x,...k},w){let{basename:_,navigator:S,unstable_useTransitions:j}=C.useContext(li),A=typeof b=="string"&&Zw.test(b),D=Pw(b,_);b=D.to;let U=NC(b,{relative:s}),M=zi(),F=null;if(d){let J=Md(d,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);_!=="/"&&(J.pathname=J.pathname==="/"?_:Li([_,J.pathname])),F=S.createHref(J)}let[$,ee,L]=uT(a,k),Z=vT(b,{replace:c,unstable_mask:d,state:p,target:h,preventScrollReset:g,relative:s,viewTransition:v,unstable_defaultShouldRevalidate:x,unstable_useTransitions:j});function ie(J){t&&t(J),J.defaultPrevented||Z(J)}let xe=!(D.isExternal||o),ue=C.createElement("a",{...k,...L,href:(xe?F:void 0)||D.absoluteURL||U,onClick:xe?ie:t,ref:mT(w,ee),target:h,"data-discover":!A&&n==="render"?"true":void 0});return $&&!A?C.createElement(C.Fragment,null,ue,C.createElement(dT,{page:U})):ue});hs.displayName="Link";var Jw=C.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:d,children:p,...h},b){let g=vc(c,{relative:h.relative}),v=zi(),x=C.useContext(Ld),{navigator:k,basename:w}=C.useContext(li),_=x!=null&&_T(g)&&d===!0,S=k.encodeLocation?k.encodeLocation(g).pathname:g.pathname,j=v.pathname,A=x&&x.navigation&&x.navigation.location?x.navigation.location.pathname:null;n||(j=j.toLowerCase(),A=A?A.toLowerCase():null,S=S.toLowerCase()),A&&w&&(A=Oa(A,w)||A);const D=S!=="/"&&S.endsWith("/")?S.length-1:S.length;let U=j===S||!s&&j.startsWith(S)&&j.charAt(D)==="/",M=A!=null&&(A===S||!s&&A.startsWith(S)&&A.charAt(S.length)==="/"),F={isActive:U,isPending:M,isTransitioning:_},$=U?t:void 0,ee;typeof a=="function"?ee=a(F):ee=[a,U?"active":null,M?"pending":null,_?"transitioning":null].filter(Boolean).join(" ");let L=typeof o=="function"?o(F):o;return C.createElement(hs,{...h,"aria-current":$,className:ee,ref:b,style:L,to:c,viewTransition:d},typeof p=="function"?p(F):p)});Jw.displayName="NavLink";var yT=C.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=dd,action:d,onSubmit:p,relative:h,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v,...x},k)=>{let{unstable_useTransitions:w}=C.useContext(li),_=kT(),S=ST(d,{relative:h}),j=c.toLowerCase()==="get"?"get":"post",A=typeof d=="string"&&Zw.test(d),D=U=>{if(p&&p(U),U.defaultPrevented)return;U.preventDefault();let M=U.nativeEvent.submitter,F=(M==null?void 0:M.getAttribute("formmethod"))||c,$=()=>_(M||U.currentTarget,{fetcherKey:t,method:F,navigate:n,replace:s,state:o,relative:h,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:v});w&&n!==!1?C.startTransition(()=>$()):$()};return C.createElement("form",{ref:k,method:j,action:S,onSubmit:a?p:D,...x,"data-discover":!A&&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 eE(e){let t=C.useContext(Ll);return Ot(t,xT(e)),t}function vT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p,unstable_useTransitions:h}={}){let b=Sr(),g=zi(),v=vc(e,{relative:c});return C.useCallback(x=>{if(XC(x,t)){x.preventDefault();let k=n!==void 0?n:rc(g)===rc(v),w=()=>b(e,{replace:k,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:d,unstable_defaultShouldRevalidate:p});h?C.startTransition(()=>w()):w()}},[g,b,v,n,a,s,t,e,o,c,d,p,h])}function tE(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=C.useRef(dm(e)),n=C.useRef(!1),a=zi(),s=C.useMemo(()=>ZC(a.search,n.current?null:t.current),[a.search]),o=Sr(),c=C.useCallback((d,p)=>{const h=dm(typeof d=="function"?d(new URLSearchParams(s)):d);n.current=!0,o("?"+h,p)},[o,s]);return[s,c]}var wT=0,ET=()=>`__${String(++wT)}__`;function kT(){let{router:e}=eE("useSubmit"),{basename:t}=C.useContext(li),n=UC(),a=e.fetch,s=e.navigate;return C.useCallback(async(o,c={})=>{let{action:d,method:p,encType:h,formData:b,body:g}=tT(o,t);if(c.navigate===!1){let v=c.fetcherKey||ET();await a(v,n,c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||p,formEncType:c.encType||h,flushSync:c.flushSync})}else await s(c.action||d,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||p,formEncType:c.encType||h,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}=C.useContext(li),a=C.useContext(Ci);Ot(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),p=d.getAll("index");if(p.some(b=>b==="")){d.delete("index"),p.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=C.useContext(qw);Ot(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=eE("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)},nE=(...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=C.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...d},p)=>C.createElement("svg",{ref:p,...AT,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:nE("lucide",s),...!o&&!TT(d)&&{"aria-hidden":"true"},...d},[...c.map(([h,b])=>C.createElement(h,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 Ce=(e,t)=>{const n=C.forwardRef(({className:a,...s},o)=>C.createElement(jT,{ref:o,iconNode:t,className:nE(`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=Ce("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"}]],iE=Ce("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 RT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],MT=Ce("arrow-up",RT);/**
|
|
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=Ce("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=Ce("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=Ce("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=Ce("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=Ce("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 $T=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],fm=Ce("circle-check-big",$T);/**
|
|
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 qT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],lc=Ce("circle-check",qT);/**
|
|
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=Ce("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"}]],YT=Ce("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 QT=[["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=Ce("copy",QT);/**
|
|
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"}]],aE=Ce("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=Ce("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"}]],Yv=Ce("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 e2=[["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"}]],Ec=Ce("file-text",e2);/**
|
|
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 t2=[["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"}]],n2=Ce("flame",t2);/**
|
|
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 i2=[["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"}]],a2=Ce("folder-git-2",i2);/**
|
|
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 r2=[["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"}]],rE=Ce("folder-open",r2);/**
|
|
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 s2=[["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=Ce("folder",s2);/**
|
|
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 l2=[["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"}]],o2=Ce("funnel",l2);/**
|
|
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 c2=[["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"}]],u2=Ce("git-branch",c2);/**
|
|
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 d2=[["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"}]],f2=Ce("globe",d2);/**
|
|
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 h2=[["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"}]],p2=Ce("history",h2);/**
|
|
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 m2=[["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"}]],g2=Ce("house",m2);/**
|
|
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 b2=[["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"}]],y2=Ce("image",b2);/**
|
|
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 x2=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],v2=Ce("kanban",x2);/**
|
|
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 w2=[["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"}]],E2=Ce("layout-grid",w2);/**
|
|
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 k2=[["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"}]],S2=Ce("link",k2);/**
|
|
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 _2=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],It=Ce("loader-circle",_2);/**
|
|
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 N2=[["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"}]],Qv=Ce("message-circle",N2);/**
|
|
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 C2=[["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"}]],T2=Ce("message-square",C2);/**
|
|
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 A2=[["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"}]],j2=Ce("paperclip",A2);/**
|
|
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 O2=[["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"}]],D2=Ce("pause",O2);/**
|
|
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 R2=[["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=Ce("pen-line",R2);/**
|
|
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 M2=[["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=Ce("play",M2);/**
|
|
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 L2=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Bi=Ce("plus",L2);/**
|
|
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 I2=[["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"}]],sE=Ce("radio",I2);/**
|
|
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 z2=[["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=Ce("refresh-cw",z2);/**
|
|
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 B2=[["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"}]],lE=Ce("rotate-ccw",B2);/**
|
|
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 U2=[["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=Ce("save",U2);/**
|
|
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 P2=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Ed=Ce("search",P2);/**
|
|
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 F2=[["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"}]],$2=Ce("send",F2);/**
|
|
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 q2=[["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"}]],oE=Ce("settings",q2);/**
|
|
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 H2=[["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"}]],K2=Ce("skull",H2);/**
|
|
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 G2=[["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"}]],Y2=Ce("snowflake",G2);/**
|
|
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 Q2=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],cE=Ce("square",Q2);/**
|
|
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 V2=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],uE=Ce("terminal",V2);/**
|
|
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 W2=[["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"}]],X2=Ce("timer-reset",W2);/**
|
|
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 Z2=[["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=Ce("trash-2",Z2);/**
|
|
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 J2=[["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"}]],eA=Ce("triangle-alert",J2);/**
|
|
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 tA=[["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"}]],dE=Ce("users",tA);/**
|
|
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 nA=[["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"}]],fE=Ce("workflow",nA);/**
|
|
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 iA=[["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"}]],hE=Ce("wrench",iA);/**
|
|
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 aA=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],_i=Ce("x",aA);/**
|
|
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 rA=[["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"}]],sA=Ce("zap",rA),lA={"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","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","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}","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"},oA={"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":`项目已删除。同时清理了:
|
|
367
|
-
{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":"恢复自动滚动","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":"其它","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}","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":"回到首页"},pE=C.createContext(null),mE="sps-console-lang";function cA(){if(typeof window>"u")return"en";try{const e=window.localStorage.getItem(mE);if(e==="en"||e==="zh")return e}catch{}return"en"}function uA(e){try{window.localStorage.setItem(mE,e)}catch{}}function dA({children:e}){const[t,n]=C.useState(()=>cA());C.useEffect(()=>{typeof document<"u"&&(document.documentElement.lang=t==="zh"?"zh-CN":"en")},[t]);const a=C.useCallback(c=>{n(c),uA(c)},[]),s=C.useMemo(()=>{const c=t==="zh"?oA:lA;return(d,p)=>{let h=c[d]??d;if(p)for(const[b,g]of Object.entries(p))g!==void 0&&(h=h.replace(`{${b}}`,String(g)));return h}},[t]),o=C.useMemo(()=>({lang:t,setLang:a,t:s}),[t,a,s]);return f.jsx(pE.Provider,{value:o,children:e})}function gE(){const e=C.useContext(pE);if(!e)throw new Error("useLang must be used inside I18nProvider");return e}function Bt(){return gE().t}function fA(){const{lang:e,setLang:t,t:n}=gE();return f.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:[f.jsx(Vv,{active:e==="en",onClick:()=>t("en"),label:n("lang.en"),ariaLabel:"English"}),f.jsx(Vv,{active:e==="zh",onClick:()=>t("zh"),label:n("lang.zh"),ariaLabel:"中文"})]})}function Vv({active:e,onClick:t,label:n,ariaLabel:a}){return f.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 hA=[{to:"/chat",labelKey:"nav.chat",icon:T2},{to:"/projects",labelKey:"nav.projects",icon:E2},{to:"/board",labelKey:"nav.board",icon:v2},{to:"/workers",labelKey:"nav.workers",icon:dE},{to:"/logs",labelKey:"nav.logs",icon:Ec},{to:"/skills",labelKey:"nav.skills",icon:f2},{to:"/system",labelKey:"nav.system",icon:oE}];function pA(){const e=Bt();return f.jsxs(f.Fragment,{children:[f.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:[f.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")]}),f.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":e("nav.aria"),children:hA.map(t=>{const n=t.icon;return f.jsxs(Jw,{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:[f.jsx(n,{size:18,strokeWidth:2.5}),e(t.labelKey)]},t.to)})}),f.jsx("div",{className:"mt-auto pt-3",children:f.jsx(fA,{})})]})}class mA extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function qt(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 mA(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function bE(){return qt("/api/system/info")}function gA(){return qt("/api/system/env")}function bA(){return qt("/api/system/env/raw")}async function yA(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 xA(){return qt("/api/system/latest-version")}async function vA(){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 wA(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 qt("/api/projects")}function EA(e){return qt(`/api/projects/${encodeURIComponent(e)}`)}async function kA(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 SA(e){return qt(`/api/projects/${encodeURIComponent(e)}/conf`)}async function _A(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 NA(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 CA(e){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function TA(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 AA(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function jA(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 OA(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 DA(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 RA(){var p;const e=Bt(),t=lt({queryKey:["system-info"],queryFn:bE,refetchInterval:3e4}),n=lt({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}),a=LA(),s=!t.isError,o=((p=n.data)==null?void 0:p.data)??[],c=o.filter(h=>h.pipelineStatus==="running").length,d=o.reduce((h,b)=>h+b.workers.active,0);return f.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:[f.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")}),f.jsx(MA,{state:a}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1",title:e("status.pipelines.tooltip"),children:[f.jsx(zd,{size:10,strokeWidth:2.5}),f.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," ",e("status.pipeline.unit")]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1",title:e("status.workers.tooltip"),children:[f.jsx(sE,{size:10,strokeWidth:2.5}),f.jsx("span",{className:"font-bold text-[var(--color-text)]",children:d})," ",e("status.worker.unit")]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["localhost:",window.location.port]}),t.data&&f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["v",t.data.version]}),f.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),f.jsxs("span",{children:["node ",t.data.nodeVersion]})]})]})}function MA({state:e}){const t=Bt();return e==="open"?f.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"?f.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")}):f.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[f.jsx(sc,{size:9,strokeWidth:2.5}),t("status.sse.down")]})}function LA(){const[e,t]=C.useState("connecting");return C.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 IA(){return f.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[f.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:f.jsx(pA,{})}),f.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:f.jsx(HC,{})}),f.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:f.jsx(RA,{})})]})}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 zA(){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 BA extends C.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(){return this.state.error?f.jsx("div",{className:"p-6",children:f.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),f.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),f.jsxs("details",{className:"text-xs mb-4",children:[f.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),f.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)"})]}),f.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function UA(){const e=Bt(),t=Sr(),{data:n,isLoading:a,isError:s,error:o,refetch:c}=lt({queryKey:["projects"],queryFn:_r});return f.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[f.jsxs("header",{className:"flex items-center justify-between",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("projects.title")}),f.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")})]}),f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>c(),type:"button",children:[f.jsx(zd,{size:16,strokeWidth:2.5}),e("common.refresh")]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>t("/projects/new"),"aria-label":e("projects.new"),children:[f.jsx(Bi,{size:16,strokeWidth:3}),e("projects.new")]})]})]}),a&&f.jsx($A,{}),s&&f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e("projects.load.failed")}),f.jsx("p",{className:"text-sm text-[var(--color-text)]",children:o instanceof Error?o.message:String(o)}),f.jsx("button",{className:"nb-btn mt-4",onClick:()=>c(),type:"button",children:e("common.retry")})]}),n&&n.data.length===0&&f.jsx(qA,{}),n&&n.data.length>0&&f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:n.data.map(d=>f.jsx(PA,{project:d},d.name))})]})}function PA({project:e}){const t=e.pipelineStatus==="running";return f.jsxs(hs,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),f.jsx(FA,{status:e.pipelineStatus})]}),e.repoDir&&f.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),f.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:[f.jsx(bp,{label:"cards",value:e.cards.total,accent:"purple"}),f.jsx(bp,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),f.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 f.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:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),f.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function FA({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 f.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function $A(){return f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>f.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[f.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),f.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),f.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function qA(){const e=Bt(),t=e("projects.empty.hint",{cmd:"__CMD__"}),[n,a]=t.split("__CMD__");return f.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[f.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:f.jsx(dE,{size:32,strokeWidth:2.5})}),f.jsxs("div",{className:"flex-1",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:e("projects.empty.title")}),f.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:[n,f.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]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[f.jsx(Bi,{size:16,strokeWidth:3}),e("projects.new")]})]})]})}function HA(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return qt(`/api/fs/browse${t}`)}const yE=50*1024*1024;async function KA(e,t){if(t.size>yE)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 x,k,w;const[o,c]=C.useState(e??null),[d,p]=C.useState(null),h=lt({queryKey:["fs-browse",o],queryFn:()=>HA(o??void 0),staleTime:0,gcTime:0}),b=((x=h.data)==null?void 0:x.path)??o??"",g=((k=h.data)==null?void 0:k.parent)??null,v=((w=h.data)==null?void 0:w.home)??null;return C.useEffect(()=>{const _=S=>{S.key==="Escape"&&(S.preventDefault(),t())};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[t]),f.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:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":a,children:[f.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:a}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":"关闭",children:f.jsx(_i,{size:14,strokeWidth:3})})]}),f.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>g&&c(g),disabled:!g||h.isLoading,"aria-label":"上级目录",title:"上级目录",children:f.jsx(MT,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>v&&c(v),disabled:!v||h.isLoading,"aria-label":"回到 Home",title:"回到 Home",children:f.jsx(g2,{size:12,strokeWidth:3})}),f.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:b,dir:"rtl",children:b||"..."})]}),f.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:[h.isLoading&&f.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[f.jsx(It,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),"加载中..."]}),h.isError&&f.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[f.jsx("p",{className:"font-bold mb-1",children:"读取失败"}),f.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:h.error instanceof Error?h.error.message:String(h.error)})]}),h.data&&f.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[h.data.entries.length===0&&f.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:"— 空目录 —"}),h.data.entries.map(_=>{const S=(()=>{const D=b.endsWith("/")||b.endsWith("\\")?"":"/";return`${b}${D}${_.name}`})(),j=s==="file"&&d===S,A=_.isDirectory||s==="file";return f.jsx("li",{children:f.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",j?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!A,onClick:()=>{_.isDirectory?(p(null),c(S)):s==="file"&&p(S)},onDoubleClick:()=>{s==="file"&&!_.isDirectory&&n(S)},title:_.isDirectory?`进入 ${_.name}/`:s==="file"?`选择 ${_.name}(双击直接确认)`:"文件不可选",children:[_.isDirectory?f.jsx(oc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):f.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),f.jsx("span",{className:"truncate",children:_.name}),_.isDirectory&&f.jsx(Bd,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},_.name)})]})]}),f.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:"取消"}),s==="file"?f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>d&&n(d),disabled:!d||h.isLoading||h.isError,title:d??"请先点选一个文件",children:[f.jsx(lc,{size:14,strokeWidth:3}),"使用此文件"]}):f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(b),disabled:!b||h.isLoading||h.isError,children:[f.jsx(lc,{size:14,strokeWidth:3}),"选此目录"]})]})]})})}function GA({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return C.useEffect(()=>{const c=d=>{d.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),f.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:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{className:"nb-btn",onClick:s,type:"button",children:"取消"}),f.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const xE=C.createContext(null);function YA({children:e}){const[t,n]=C.useState(null),a=C.useCallback(c=>new Promise(d=>{n({kind:"confirm",opts:c,resolve:p=>{n(null),d(p)}})}),[]),s=C.useCallback(c=>new Promise(d=>{n({kind:"alert",opts:c,resolve:()=>{n(null),d()}})}),[]),o=C.useCallback(c=>new Promise(d=>{n({kind:"prompt",opts:c,resolve:p=>{n(null),d(p)}})}),[]);return f.jsxs(xE.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&f.jsx(GA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"确定",danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&f.jsx(QA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&f.jsx(VA,{title:t.opts.title,body:t.opts.body,placeholder:t.opts.placeholder,defaultValue:t.opts.defaultValue,confirm:t.opts.confirm??"确定",cancel:t.opts.cancel??"取消",onConfirm:c=>t.resolve(c),onCancel:()=>t.resolve(null)})]})}function oi(){const e=C.useContext(xE);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function QA({title:e,body:t,confirm:n,onClose:a}){return C.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),f.jsx("div",{className:"flex gap-3 justify-end",children:f.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function VA({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:d}){const[p,h]=C.useState(a??""),b=C.useRef(null);C.useEffect(()=>{var x,k;(x=b.current)==null||x.focus(),(k=b.current)==null||k.select();const v=w=>{w.key==="Escape"&&d()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[d]);const g=()=>{const v=p.trim();v&&c(v)};return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),f.jsx("input",{ref:b,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:p,onChange:v=>h(v.target.value),onKeyDown:v=>{v.key==="Enter"&&!v.nativeEvent.isComposing&&(v.preventDefault(),g())}}),f.jsxs("div",{className:"flex gap-3 justify-end",children:[f.jsx("button",{className:"nb-btn",onClick:d,type:"button",children:o}),f.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!p.trim(),children:s})]})]})})}function WA(){const e=Bt(),t=Sr(),n=Kn(),{alert:a}=oi(),[s,o]=C.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[c,d]=C.useState(!1),p=Hn({mutationFn:x=>kA(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)})}}),h=/^[a-zA-Z0-9_-]+$/.test(s.name),b=h&&s.projectDir.trim()!==""&&!p.isPending,v=e("newProject.field.wiki.detail",{wikiCode:"__WIKI_CODE__",wikiInit:"__WIKI_INIT__"}).split(/__WIKI_(?:CODE|INIT)__/);return f.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[f.jsxs("header",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[f.jsx(iE,{size:14,strokeWidth:3}),e("newProject.back")]}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e("newProject.title")})]}),f.jsx("div",{className:"nb-card",children:f.jsxs("form",{onSubmit:x=>{x.preventDefault(),b&&p.mutate(s)},className:"flex flex-col gap-5",children:[f.jsxs(lr,{label:e("newProject.field.name"),hint:e("newProject.field.name.example"),children:[f.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&&!h&&f.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:e("newProject.field.name.invalid")})]}),f.jsxs(lr,{label:e("newProject.field.dir"),hint:e("newProject.field.dir.long"),children:[f.jsxs("div",{className:"flex gap-2",children:[f.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}),f.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:[f.jsx(rE,{size:14,strokeWidth:2.5}),e("newProject.dir.browse")]})]}),f.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:s.createIfMissing!==!1,onChange:x=>o({...s,createIfMissing:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:e("newProject.field.dir.createIfMissing")})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[f.jsx(lr,{label:e("newProject.field.maxWorkers.short"),children:f.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})})}),f.jsx(lr,{label:e("newProject.field.ackTimeout.minutes"),hint:e("newProject.field.ackTimeout.minutes.help"),children:f.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})})})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:s.enableGit??!0,onChange:x=>o({...s,enableGit:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.git.label")})]}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:e("newProject.field.git.detail")}),s.enableGit!==!1&&f.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[f.jsx(lr,{label:e("newProject.field.git.branch"),children:f.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})})}),f.jsx(lr,{label:e("newProject.field.gitlabProject.label"),hint:e("newProject.field.gitlabProject.help2"),children:f.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&&f.jsx(lr,{label:e("newProject.field.gitlabProjectId"),hint:e("newProject.field.gitlabProjectId.help"),children:f.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})})})]})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[f.jsx("input",{type:"checkbox",checked:s.enableWiki===!0,onChange:x=>o({...s,enableWiki:x.target.checked}),className:"w-4 h-4 cursor-pointer"}),f.jsx("span",{className:"text-sm font-bold",children:e("newProject.field.wiki.label")})]}),f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:[v[0],f.jsx("code",{className:"font-mono",children:"wiki/"}),v[1],f.jsx("code",{className:"font-mono",children:"sps wiki init"}),v[2]]})]}),f.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[f.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")}),f.jsx(lr,{label:e("newProject.field.matrixRoom.label"),hint:e("newProject.field.matrixRoom.help2"),children:f.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})})})]}),f.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:()=>t("/projects"),disabled:p.isPending,children:e("common.cancel")}),f.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!b,"aria-label":e("newProject.submit"),children:p.isPending?f.jsxs(f.Fragment,{children:[f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}),e("newProject.creating")]}):f.jsxs(f.Fragment,{children:[f.jsx(Bi,{size:14,strokeWidth:3}),e("common.create")]})})]})]})}),c&&f.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 f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Jm=Symbol.for("yaml.alias"),mm=Symbol.for("yaml.document"),Er=Symbol.for("yaml.map"),vE=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]===Er,Dt=e=>!!e&&typeof e=="object"&&e[Ni]===vE,kt=e=>!!e&&typeof e=="object"&&e[Ni]===ea,Pl=e=>!!e&&typeof e=="object"&&e[Ni]===Bl;function Lt(e){if(e&&typeof e=="object")switch(e[Ni]){case Er:case Bl:return!0}return!1}function zt(e){if(e&&typeof e=="object")switch(e[Ni]){case Jm:case Er:case ea:case Bl:return!0}return!1}const wE=e=>(kt(e)||Lt(e))&&!!e.anchor,qn=Symbol("break visit"),EE=Symbol("skip children"),Ji=Symbol("remove node");function ms(e,t){const n=kE(t);ps(e)?ul(null,e.contents,n,Object.freeze([e]))===Ji&&(e.contents=null):ul(null,e,n,Object.freeze([]))}ms.BREAK=qn;ms.SKIP=EE;ms.REMOVE=Ji;function ul(e,t,n,a){const s=SE(e,t,n,a);if(zt(s)||Dt(s))return _E(e,a,s),ul(e,s,n,a);if(typeof s!="symbol"){if(Lt(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===qn)return qn;c===Ji&&(t.items.splice(o,1),o-=1)}}}else if(Dt(t)){a=Object.freeze(a.concat(t));const o=ul("key",t.key,n,a);if(o===qn)return qn;o===Ji&&(t.key=null);const c=ul("value",t.value,n,a);if(c===qn)return qn;c===Ji&&(t.value=null)}}return s}async function Pd(e,t){const n=kE(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=qn;Pd.SKIP=EE;Pd.REMOVE=Ji;async function dl(e,t,n,a){const s=await SE(e,t,n,a);if(zt(s)||Dt(s))return _E(e,a,s),dl(e,s,n,a);if(typeof s!="symbol"){if(Lt(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===qn)return qn;c===Ji&&(t.items.splice(o,1),o-=1)}}}else if(Dt(t)){a=Object.freeze(a.concat(t));const o=await dl("key",t.key,n,a);if(o===qn)return qn;o===Ji&&(t.key=null);const c=await dl("value",t.value,n,a);if(c===qn)return qn;c===Ji&&(t.value=null)}}return s}function kE(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 SE(e,t,n,a){var s,o,c,d,p;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(Dt(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(kt(t))return(d=n.Scalar)==null?void 0:d.call(n,e,t,a);if(Nr(t))return(p=n.Alias)==null?void 0:p.call(n,e,t,a)}function _E(e,t,n){const a=t[t.length-1];if(Lt(a))a.items[e]=n;else if(Dt(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 XA={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},ZA=e=>e.replace(/[!,[\]{}]/g,t=>XA[t]);class Tn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Tn.defaultYaml,t),this.tags=Object.assign({},Tn.defaultTags,n)}clone(){const t=new Tn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Tn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Tn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Tn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Tn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Tn.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+ZA(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&&zt(t.contents)){const o={};ms(t.contents,(c,d)=>{zt(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(`
|
|
368
|
-
`)}}Tn.defaultYaml={explicit:!1,version:"1.2"};Tn.defaultTags={"!!":"tag:yaml.org,2002:"};function NE(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 CE(e){const t=new Set;return ms(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function TE(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function JA(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=CE(e));const c=TE(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(kt(c.node)||Lt(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 ki(e,t,n){if(Array.isArray(e))return e.map((a,s)=>ki(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!wE(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=ki(this,"",c);if(typeof s=="function")for(const{count:p,res:h}of c.anchors.values())s(h,p);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)||wE(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 p=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(p)}let d=a.get(c);if(d||(ki(c,null,n),d=a.get(c)),(d==null?void 0:d.res)===void 0){const p="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(p)}if(o>=0&&(d.count+=1,d.aliasCount===0&&(d.aliasCount=hd(s,c,a)),d.count*d.aliasCount>o)){const p="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(p)}return d.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(NE(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(Lt(t)){let a=0;for(const s of t.items){const o=hd(e,s,n);o>a&&(a=o)}return a}else if(Dt(t)){const a=hd(e,t.key,n),s=hd(e,t.value,n);return Math.max(a,s)}return 1}const AE=e=>!e||typeof e!="function"&&typeof e!="object";class Ue extends eg{constructor(t){super(ea),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:ki(this.value,t,n)}toString(){return String(this.value)}}Ue.BLOCK_FOLDED="BLOCK_FOLDED";Ue.BLOCK_LITERAL="BLOCK_LITERAL";Ue.PLAIN="PLAIN";Ue.QUOTE_DOUBLE="QUOTE_DOUBLE";Ue.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),zt(e))return e;if(Dt(e)){const k=(v=(g=n.schema[Er]).createNode)==null?void 0:v.call(g,n.schema,null,n);return k.items.push(e),k}(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 p;if(a&&e&&typeof e=="object"){if(p=d.get(e),p)return p.anchor??(p.anchor=s(e)),new Fd(p.anchor);p={anchor:null,node:null},d.set(e,p)}t!=null&&t.startsWith("!!")&&(t=ej+t.slice(2));let h=tj(e,t,c.tags);if(!h){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const k=new Ue(e);return p&&(p.node=k),k}h=e instanceof Map?c[Er]:Symbol.iterator in Object(e)?c[Bl]:c[Er]}o&&(o(h),delete n.onTagObj);const b=h!=null&&h.createNode?h.createNode(n.schema,e,n):typeof((x=h==null?void 0:h.nodeClass)==null?void 0:x.from)=="function"?h.nodeClass.from(n.schema,e,n):new Ue(e);return t?b.tag=t:h.default||(b.tag=h.tag),p&&(p.node=b),b}function kd(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 jE 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=>zt(a)||Dt(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(Lt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,kd(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(Lt(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&&kt(o)?o.value:o:Lt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Dt(n))return!1;const a=n.value;return a==null||t&&kt(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 Lt(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(Lt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,kd(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(`
|
|
369
|
-
`)?Ta(n,t):n.includes(`
|
|
370
|
-
`)?`
|
|
371
|
-
`+Ta(n,t):(e.endsWith(" ")?"":" ")+n,OE="flow",gm="block",pd="quoted";function $d(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 p=Math.max(1+o,1+s-t.length);if(e.length<=p)return e;const h=[],b={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?h.push(0):g=s-a);let v,x,k=!1,w=-1,_=-1,S=-1;n===gm&&(w=Wv(e,w,t.length),w!==-1&&(g=w+p));for(let A;A=e[w+=1];){if(n===pd&&A==="\\"){switch(_=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}S=w}if(A===`
|
|
372
|
-
`)n===gm&&(w=Wv(e,w,t.length)),g=w+t.length+p,v=void 0;else{if(A===" "&&x&&x!==" "&&x!==`
|
|
373
|
-
`&&x!==" "){const D=e[w+1];D&&D!==" "&&D!==`
|
|
374
|
-
`&&D!==" "&&(v=w)}if(w>=g)if(v)h.push(v),g=v+p,v=void 0;else if(n===pd){for(;x===" "||x===" ";)x=A,A=e[w+=1],k=!0;const D=w>S+1?w-2:_-1;if(b[D])return e;h.push(D),b[D]=!0,g=D+p,v=void 0}else k=!0}x=A}if(k&&d&&d(),h.length===0)return e;c&&c();let j=e.slice(0,h[0]);for(let A=0;A<h.length;++A){const D=h[A],U=h[A+1]||e.length;D===0?j=`
|
|
375
|
-
${t}${e.slice(0,U)}`:(n===pd&&b[D]&&(j+=`${e[D]}\\`),j+=`
|
|
376
|
-
${t}${e.slice(D+1,U)}`)}return j}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!==`
|
|
377
|
-
`);a=t,s=t+1,o=e[s]}return a}const qd=(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]===`
|
|
378
|
-
`){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 p=0,h=n[p];h;h=n[++p])if(h===" "&&n[p+1]==="\\"&&n[p+2]==="n"&&(c+=n.slice(d,p)+"\\ ",p+=1,d=p,h="\\"),h==="\\")switch(n[p+1]){case"u":{c+=n.slice(d,p);const b=n.substr(p+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(p,6)}p+=5,d=p+1}break;case"n":if(a||n[p+2]==='"'||n.length<s)p+=1;else{for(c+=n.slice(d,p)+`
|
|
379
|
-
|
|
380
|
-
`;n[p+2]==="\\"&&n[p+3]==="n"&&n[p+4]!=='"';)c+=`
|
|
381
|
-
`,p+=2;c+=o,n[p+2]===" "&&(c+="\\"),p+=1,d=p+1}break;default:p+=1}return c=d?c+n.slice(d):n,a?c:$d(c,o,pd,qd(t,!1))}function bm(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
382
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return Jo(e,t);const n=t.indent||(Hd(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
383
|
-
${n}`)+"'";return t.implicitKey?a:$d(a,n,OE,qd(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(`(^|(?<!
|
|
384
|
-
))
|
|
385
|
-
+(?!
|
|
386
|
-
|$)`,"g")}catch{ym=/\n+(?!\n|$)/g}function md({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:d,lineWidth:p}=a.options;if(!c||/\n[\t ]+$/.test(n))return hl(n,a);const h=a.indent||(a.forceBlockIndent||Hd(n)?" ":""),b=c==="literal"?!0:c==="folded"||t===Ue.BLOCK_FOLDED?!1:t===Ue.BLOCK_LITERAL?!0:!ij(n,p,h.length);if(!n)return b?`|
|
|
387
|
-
`:`>
|
|
388
|
-
`;let g,v;for(v=n.length;v>0;--v){const U=n[v-1];if(U!==`
|
|
389
|
-
`&&U!==" "&&U!==" ")break}let x=n.substring(v);const k=x.indexOf(`
|
|
390
|
-
`);k===-1?g="-":n===x||k!==x.length-1?(g="+",o&&o()):g="",x&&(n=n.slice(0,-x.length),x[x.length-1]===`
|
|
391
|
-
`&&(x=x.slice(0,-1)),x=x.replace(ym,`$&${h}`));let w=!1,_,S=-1;for(_=0;_<n.length;++_){const U=n[_];if(U===" ")w=!0;else if(U===`
|
|
392
|
-
`)S=_;else break}let j=n.substring(0,S<_?S+1:_);j&&(n=n.substring(j.length),j=j.replace(/\n+/g,`$&${h}`));let D=(w?h?"2":"1":"")+g;if(e&&(D+=" "+d(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!b){const U=n.replace(/\n+/g,`
|
|
393
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);let M=!1;const F=qd(a,!0);c!=="folded"&&t!==Ue.BLOCK_FOLDED&&(F.onOverflow=()=>{M=!0});const $=$d(`${j}${U}${x}`,h,gm,F);if(!M)return`>${D}
|
|
394
|
-
${h}${$}`}return n=n.replace(/\n+/g,`$&${h}`),`|${D}
|
|
395
|
-
${h}${j}${n}${x}`}function aj(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:d,indent:p,indentStep:h,inFlow:b}=t;if(d&&o.includes(`
|
|
396
|
-
`)||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(`
|
|
397
|
-
`)?hl(o,t):md(e,t,n,a);if(!d&&!b&&s!==Ue.PLAIN&&o.includes(`
|
|
398
|
-
`))return md(e,t,n,a);if(Hd(o)){if(p==="")return t.forceBlockIndent=!0,md(e,t,n,a);if(d&&p===h)return hl(o,t)}const g=o.replace(/\n+/g,`$&
|
|
399
|
-
${p}`);if(c){const v=w=>{var _;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((_=w.test)==null?void 0:_.test(g))},{compat:x,tags:k}=t.doc.schema;if(k.some(v)||x!=null&&x.some(v))return hl(o,t)}return d?g:$d(g,p,OE,qd(t,!1))}function kc(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!==Ue.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(d=Ue.QUOTE_DOUBLE);const p=b=>{switch(b){case Ue.BLOCK_FOLDED:case Ue.BLOCK_LITERAL:return s||o?hl(c.value,t):md(c,t,n,a);case Ue.QUOTE_DOUBLE:return Jo(c.value,t);case Ue.QUOTE_SINGLE:return bm(c.value,t);case Ue.PLAIN:return aj(c,t,n,a);default:return null}};let h=p(d);if(h===null){const{defaultKeyType:b,defaultStringType:g}=t.options,v=s&&b||g;if(h=p(v),h===null)throw new Error(`Unsupported default string type ${v}`)}return h}function DE(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(kt(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=(kt(e)||Lt(e))&&e.anchor;o&&NE(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 p;if(Dt(e))return e.toString(t,n,a);if(Nr(e)){if(t.doc.directives)return e.toString(t);if((p=t.resolvedAliases)!=null&&p.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=zt(e)?e:t.doc.createNode(e,{onTagObj:h=>s=h});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):kt(o)?kc(o,t,n,a):o.toString(t,n,a);return c?kt(o)||d[0]==="{"||d[0]==="["?`${c} ${d}`:`${c}
|
|
400
|
-
${t.indent}${d}`:d}function lj({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:d,indentStep:p,options:{commentString:h,indentSeq:b,simpleKeys:g}}=n;let v=zt(e)&&e.comment||null;if(g){if(v)throw new Error("With simple keys, key nodes cannot have comments");if(Lt(e)||!zt(e)&&typeof e=="object"){const F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}let x=!g&&(!e||v&&t==null&&!n.inFlow||Lt(e)||(kt(e)?e.type===Ue.BLOCK_FOLDED||e.type===Ue.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!x&&(g||!o),indent:d+p});let k=!1,w=!1,_=jl(e,n,()=>k=!0,()=>w=!0);if(!x&&!n.inFlow&&_.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 k&&a&&a(),_===""?"?":x?`? ${_}`:_}else if(o&&!g||t==null&&x)return _=`? ${_}`,v&&!k?_+=Zr(_,n.indent,h(v)):w&&s&&s(),_;k&&(v=null),x?(v&&(_+=Zr(_,n.indent,h(v))),_=`? ${_}
|
|
401
|
-
${d}:`):(_=`${_}:`,v&&(_+=Zr(_,n.indent,h(v))));let S,j,A;zt(t)?(S=!!t.spaceBefore,j=t.commentBefore,A=t.comment):(S=!1,j=null,A=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!x&&!v&&kt(t)&&(n.indentAtStart=_.length+1),w=!1,!b&&p.length>=2&&!n.inFlow&&!x&&Pl(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let D=!1;const U=jl(t,n,()=>D=!0,()=>w=!0);let M=" ";if(v||S||j){if(M=S?`
|
|
402
|
-
`:"",j){const F=h(j);M+=`
|
|
403
|
-
${Ta(F,n.indent)}`}U===""&&!n.inFlow?M===`
|
|
404
|
-
`&&A&&(M=`
|
|
405
|
-
|
|
406
|
-
`):M+=`
|
|
407
|
-
${n.indent}`}else if(!x&&Lt(t)){const F=U[0],$=U.indexOf(`
|
|
408
|
-
`),ee=$!==-1,L=n.inFlow??t.flow??t.items.length===0;if(ee||!L){let Z=!1;if(ee&&(F==="&"||F==="!")){let ie=U.indexOf(" ");F==="&"&&ie!==-1&&ie<$&&U[ie+1]==="!"&&(ie=U.indexOf(" ",ie+1)),(ie===-1||$<ie)&&(Z=!0)}Z||(M=`
|
|
409
|
-
${n.indent}`)}}else(U===""||U[0]===`
|
|
410
|
-
`)&&(M="");return _+=M+U,n.inFlow?D&&a&&a():A&&!D?_+=Zr(_,n.indent,h(A)):w&&s&&s(),_}function RE(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 Ue(Symbol(Vu)),{addToJSMap:ME}),stringify:()=>Vu},oj=(e,t)=>(Aa.identify(t)||kt(t)&&(!t.type||t.type===Ue.PLAIN)&&Aa.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Aa.tag&&n.default));function ME(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 LE(e,t,{key:n,value:a}){if(zt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(oj(e,n))ME(e,t,a);else{const s=ki(n,"",e);if(t instanceof Map)t.set(s,ki(a,s,e));else if(t instanceof Set)t.add(s);else{const o=cj(n,s,e),c=ki(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(zt(e)&&(n!=null&&n.doc)){const a=DE(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)+'..."'),RE(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 xn(a,s)}class xn{constructor(t,n=null){Object.defineProperty(this,Ni,{value:vE}),this.key=t,this.value=n}clone(t){let{key:n,value:a}=this;return zt(n)&&(n=n.clone(t)),zt(a)&&(a=a.clone(t)),new xn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return LE(n,a,this)}toString(t,n,a){return t!=null&&t.doc?lj(this,t,n,a):JSON.stringify(this)}}function IE(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:p,options:{commentString:h}}=n,b=Object.assign({},n,{indent:o,type:null});let g=!1;const v=[];for(let k=0;k<t.length;++k){const w=t[k];let _=null;if(zt(w))!g&&w.spaceBefore&&v.push(""),Sd(n,v,w.commentBefore,g),w.comment&&(_=w.comment);else if(Dt(w)){const j=zt(w.key)?w.key:null;j&&(!g&&j.spaceBefore&&v.push(""),Sd(n,v,j.commentBefore,g))}g=!1;let S=jl(w,b,()=>_=null,()=>g=!0);_&&(S+=Zr(S,o,h(_))),g&&_&&(g=!1),v.push(a+S)}let x;if(v.length===0)x=s.start+s.end;else{x=v[0];for(let k=1;k<v.length;++k){const w=v[k];x+=w?`
|
|
411
|
-
${p}${w}`:`
|
|
412
|
-
`}}return e?(x+=`
|
|
413
|
-
`+Ta(h(e),p),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 p=Object.assign({},t,{indent:a,inFlow:!0,type:null});let h=!1,b=0;const g=[];for(let k=0;k<e.length;++k){const w=e[k];let _=null;if(zt(w))w.spaceBefore&&g.push(""),Sd(t,g,w.commentBefore,!1),w.comment&&(_=w.comment);else if(Dt(w)){const j=zt(w.key)?w.key:null;j&&(j.spaceBefore&&g.push(""),Sd(t,g,j.commentBefore,!1),j.comment&&(h=!0));const A=zt(w.value)?w.value:null;A?(A.comment&&(_=A.comment),A.commentBefore&&(h=!0)):w.value==null&&(j!=null&&j.comment)&&(_=j.comment)}_&&(h=!0);let S=jl(w,p,()=>_=null);h||(h=g.length>b||S.includes(`
|
|
414
|
-
`)),k<e.length-1?S+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(h||(h=g.reduce((j,A)=>j+A.length+2,2)+(S.length+2)>t.options.lineWidth)),h&&(S+=",")),_&&(S+=Zr(S,a,d(_))),g.push(S),b=g.length}const{start:v,end:x}=n;if(g.length===0)return v+x;if(!h){const k=g.reduce((w,_)=>w+_.length+2,2);h=t.options.lineWidth>0&&k>t.options.lineWidth}if(h){let k=v;for(const w of g)k+=w?`
|
|
415
|
-
${o}${s}${w}`:`
|
|
416
|
-
`;return`${k}
|
|
417
|
-
${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=kt(t)?t.value:t;for(const a of e)if(Dt(a)&&(a.key===t||a.key===n||kt(a.key)&&a.key.value===n))return a}class ri extends jE{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Er,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),d=(p,h)=>{if(typeof o=="function")h=o.call(n,p,h);else if(Array.isArray(o)&&!o.includes(p))return;(h!==void 0||s)&&c.items.push(tg(p,h,a))};if(n instanceof Map)for(const[p,h]of n)d(p,h);else if(n&&typeof n=="object")for(const p of Object.keys(n))d(p,n[p]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;Dt(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new xn(t,t==null?void 0:t.value):a=new xn(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`);kt(s.value)&&AE(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const d=this.items.findIndex(p=>o(a,p)<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&&kt(s)?s.value:s)??void 0}has(t){return!!Jr(this.items,t)}set(t,n){this.add(new xn(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)LE(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Dt(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})),IE(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const Fl={collection:"map",default:!0,nodeClass:ri,tag:"tag:yaml.org,2002:map",resolve(e,t){return Ul(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ri.from(e,t,n)};class kr extends jE{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&&kt(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];kt(s)&&AE(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(ki(o,String(s++),n));return a}toString(t,n,a){return t?IE(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 p=n instanceof Set?d:String(c++);d=s.call(n,p,d)}o.items.push(cc(d,void 0,a))}}return o}}function Wu(e){let t=kt(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const $l={collection:"seq",default:!0,nodeClass:kr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Pl(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>kr.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),kc(e,t,n,a)}},Gd={identify:e=>e==null,createNode:()=>new Ue(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Ue(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 Ue(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 zE={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},BE={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)}},UE={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 Ue(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Ui},Yd=e=>typeof e=="bigint"||Number.isInteger(e),ig=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function PE(e,t,n){const{value:a}=e;return Yd(a)&&a>=0?n+a.toString(t):Ui(e)}const FE={identify:e=>Yd(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=>PE(e,8,"0o")},$E={identify:Yd,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ig(e,0,10,n),stringify:Ui},qE={identify:e=>Yd(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=>PE(e,16,"0x")},fj=[Fl,$l,Kd,Gd,ng,FE,$E,qE,zE,BE,UE];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 Ue(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,$l].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 p="";for(let h=0;h<c.length;++h)p+=String.fromCharCode(c[h]);d=btoa(p)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Ue.BLOCK_LITERAL),t!==Ue.QUOTE_DOUBLE){const p=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),h=Math.ceil(d.length/p),b=new Array(h);for(let g=0,v=0;g<h;++g,v+=p)b[g]=d.substr(v,p);d=b.join(t===Ue.BLOCK_LITERAL?`
|
|
418
|
-
`:" ")}return kc({comment:e,type:t,value:d},a,s,o)}};function HE(e,t){if(Pl(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!Dt(a)){if(Ul(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new xn(new Ue(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
|
|
419
|
-
${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
|
|
420
|
-
${o.comment}`:a.comment}a=s}e.items[n]=Dt(a)?a:new xn(a)}}else t("Expected a sequence for this tag");return e}function KE(e,t,n){const{replacer:a}=n,s=new kr(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,p;if(Array.isArray(c))if(c.length===2)d=c[0],p=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const h=Object.keys(c);if(h.length===1)d=h[0],p=c[d];else throw new TypeError(`Expected tuple with one key, not ${h.length} keys`)}else d=c;s.items.push(tg(d,p,n))}return s}const rg={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:HE,createNode:KE};class pl extends kr{constructor(){super(),this.add=ri.prototype.add.bind(this),this.delete=ri.prototype.delete.bind(this),this.get=ri.prototype.get.bind(this),this.has=ri.prototype.has.bind(this),this.set=ri.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(Dt(s)?(o=ki(s.key,"",n),c=ki(s.value,o,n)):o=ki(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=KE(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=HE(e,t),a=[];for(const{key:s}of n.items)kt(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 GE({value:e,source:t},n){return t&&(e?YE:QE).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const YE={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 Ue(!0),stringify:GE},QE={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 Ue(!1),stringify:GE},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 Ue(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 Qd(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)=>Qd(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)=>Qd(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)=>Qd(e,0,10,n),stringify:Ui},Ej={identify:Sc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Qd(e,2,16,n),stringify:e=>lg(e,16,"0x")};class ml extends ri{constructor(t){super(t),this.tag=ml.tag}add(t){let n;Dt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new xn(t.key,null):n=new xn(t,null),Jr(this.items,n.key)||this.items.push(n)}get(t,n){const a=Jr(this.items,t);return!n&&Dt(a)?kt(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 xn(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 VE(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 WE={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:VE},XE={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:VE},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),p=t[7]?Number((t[7]+"00").substr(1,3)):0;let h=Date.UTC(n,a-1,s,o||0,c||0,d||0,p);const b=t[8];if(b&&b!=="Z"){let g=cg(b,!1);Math.abs(g)<30&&(g*=60),h-=6e4*g}return new Date(h)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Zv=[Fl,$l,Kd,Gd,YE,QE,xj,vj,wj,Ej,gj,bj,yj,ag,Aa,sg,rg,og,WE,XE,Vd],Jv=new Map([["core",fj],["failsafe",[Fl,$l,Kd]],["json",mj],["yaml11",Zv],["yaml-1.1",Zv]]),e0={binary:ag,bool:ng,float:UE,floatExp:BE,floatNaN:zE,floatTime:XE,int:$E,intHex:qE,intOct:FE,intTime:WE,map:Fl,merge:Aa,null:Gd,omap:sg,pairs:rg,seq:$l,set:og,timestamp:Vd},kj={"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"?e0[c]:c;if(!d){const p=JSON.stringify(c),h=Object.keys(e0).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${p}; use one of ${h}`)}return o.includes(d)||o.push(d),o},[])}const Sj=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let ZE=class JE{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?kj:{},this.tags=xp(n,this.name,a),this.toStringOptions=d??null,Object.defineProperty(this,Er,{value:Fl}),Object.defineProperty(this,ea,{value:Kd}),Object.defineProperty(this,Bl,{value:$l}),this.sortMapEntries=typeof c=="function"?c:c===!0?Sj:null}clone(){const t=Object.create(JE.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function _j(e,t){var p;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const h=e.directives.toString(e);h?(n.push(h),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=DE(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const h=o(e.commentBefore);n.unshift(Ta(h,""))}let c=!1,d=null;if(e.contents){if(zt(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 h=d?void 0:()=>c=!0;let b=jl(e.contents,s,()=>d=null,h);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((p=e.directives)!=null&&p.docEnd)if(e.comment){const h=o(e.comment);h.includes(`
|
|
421
|
-
`)?(n.push("..."),n.push(Ta(h,""))):n.push(`... ${h}`)}else n.push("...");else{let h=e.comment;h&&c&&(h=h.replace(/^\n+/,"")),h&&((!c||d)&&n[n.length-1]!==""&&n.push(""),n.push(Ta(o(h),"")))}return n.join(`
|
|
422
|
-
`)+`
|
|
423
|
-
`}class ql{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 Tn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(ql.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=zt(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=CE(this);t.anchor=!n||a.has(n)?TE(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 _=j=>typeof j=="number"||j instanceof String||j instanceof Number,S=n.filter(_).map(String);S.length>0&&(n=n.concat(S)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:d,keepUndefined:p,onTagObj:h,tag:b}=a??{},{onAnchor:g,setAnchors:v,sourceObjects:x}=JA(this,c||"a"),k={aliasDuplicateObjects:o??!0,keepUndefined:p??!1,onAnchor:g,onTagObj:h,replacer:s,schema:this.schema,sourceObjects:x},w=cc(t,b,k);return d&&Lt(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 xn(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 Lt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Zo(t)?!n&&kt(this.contents)?this.contents.value:this.contents:Lt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Lt(this.contents)?this.contents.has(t):!1}hasIn(t){return Zo(t)?this.contents!==void 0:Lt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=kd(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=kd(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 Tn({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 Tn({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 ZE(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},p=ki(this.contents,n??"",d);if(typeof o=="function")for(const{count:h,res:b}of d.anchors.values())o(b,h);return typeof c=="function"?fl(c,{"":p},"",p):p}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(Lt(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 e1 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)+`…
|
|
424
|
-
`),c=d+c}if(/[^ ]/.test(c)){let d=1;const p=n.linePos[1];(p==null?void 0:p.line)===a&&p.col>s&&(d=Math.max(1,Math.min(p.col-s,80-o)));const h=" ".repeat(o)+"^".repeat(d);n.message+=`:
|
|
425
|
-
|
|
426
|
-
${c}
|
|
427
|
-
${h}
|
|
428
|
-
`}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:d}){let p=!1,h=d,b=d,g="",v="",x=!1,k=!1,w=null,_=null,S=null,j=null,A=null,D=null,U=null;for(const $ of e)switch(k&&($.type!=="space"&&$.type!=="newline"&&$.type!=="comma"&&o($.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),k=!1),w&&(h&&$.type!=="comment"&&$.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),$.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&$.source.includes(" ")&&(w=$),b=!0;break;case"comment":{b||o($,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ee=$.source.substring(1)||" ";g?g+=v+ee:g=ee,v="",h=!1;break}case"newline":h?g?g+=$.source:(!D||n!=="seq-item-ind")&&(p=!0):v+=$.source,h=!0,x=!0,(_||S)&&(j=$),b=!0;break;case"anchor":_&&o($,"MULTIPLE_ANCHORS","A node can have at most one anchor"),$.source.endsWith(":")&&o($.offset+$.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=$,U??(U=$.offset),h=!1,b=!1,k=!0;break;case"tag":{S&&o($,"MULTIPLE_TAGS","A node can have at most one tag"),S=$,U??(U=$.offset),h=!1,b=!1,k=!0;break}case n:(_||S)&&o($,"BAD_PROP_ORDER",`Anchors and tags must be after the ${$.source} indicator`),D&&o($,"UNEXPECTED_TOKEN",`Unexpected ${$.source} in ${t??"collection"}`),D=$,h=n==="seq-item-ind"||n==="explicit-key-ind",b=!1;break;case"comma":if(t){A&&o($,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),A=$,h=!1,b=!1;break}default:o($,"UNEXPECTED_TOKEN",`Unexpected ${$.type} token`),h=!1,b=!1}const M=e[e.length-1],F=M?M.offset+M.source.length:s;return k&&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&&(h&&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:A,found:D,spaceBefore:p,comment:g,hasNewline:x,anchor:_,tag:S,newlineAfterProp:j,end:F,start:U??F}}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(`
|
|
429
|
-
`))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 t1(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||kt(o)&&kt(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const t0="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)??ri,d=new c(n.schema);n.atRoot&&(n.atRoot=!1);let p=a.offset,h=null;for(const g of a.items){const{start:v,key:x,sep:k,value:w}=g,_=Ol(v,{indicator:"explicit-key-ind",next:x??(k==null?void 0:k[0]),offset:p,onError:s,parentIndent:a.indent,startOnNewline:!0}),S=!_.found;if(S){if(x&&(x.type==="block-seq"?s(p,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==a.indent&&s(p,"BAD_INDENT",t0)),!_.anchor&&!_.tag&&!k){h=_.end,_.comment&&(d.comment?d.comment+=`
|
|
430
|
-
`+_.comment:d.comment=_.comment);continue}(_.newlineAfterProp||uc(x))&&s(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=_.found)==null?void 0:b.indent)!==a.indent&&s(p,"BAD_INDENT",t0);n.atKey=!0;const j=_.end,A=x?e(n,x,_,s):t(n,j,v,null,_,s);n.schema.compat&&xm(a.indent,x,s),n.atKey=!1,t1(n,d.items,A)&&s(j,"DUPLICATE_KEY","Map keys must be unique");const D=Ol(k??[],{indicator:"map-value-ind",next:w,offset:A.range[2],onError:s,parentIndent:a.indent,startOnNewline:!x||x.type==="block-scalar"});if(p=D.end,D.found){S&&((w==null?void 0:w.type)==="block-map"&&!D.hasNewline&&s(p,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&_.start<D.found.offset-1024&&s(A.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const U=w?e(n,w,D,s):t(n,p,k,null,D,s);n.schema.compat&&xm(a.indent,w,s),p=U.range[2];const M=new xn(A,U);n.options.keepSourceTokens&&(M.srcToken=g),d.items.push(M)}else{S&&s(A.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),D.comment&&(A.comment?A.comment+=`
|
|
431
|
-
`+D.comment:A.comment=D.comment);const U=new xn(A);n.options.keepSourceTokens&&(U.srcToken=g),d.items.push(U)}}return h&&h<p&&s(h,"IMPOSSIBLE","Map comment with trailing content"),d.range=[a.offset,p,h??p],d}function Cj({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??kr,d=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let p=a.offset,h=null;for(const{start:b,value:g}of a.items){const v=Ol(b,{indicator:"seq-item-ind",next:g,offset:p,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(p,"MISSING_CHAR","Sequence item without - indicator");else{h=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),p=x.range[2],d.items.push(x)}return d.range=[a.offset,p,h??p],d}function _c(e,t,n,a){let s="";if(e){let o=!1,c="";for(const d of e){const{source:p,type:h}=d;switch(h){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=p.substring(1)||" ";s?s+=c+b:s=b,c="";break}case"newline":s&&(c+=p),o=!0;break;default:a(d,"UNEXPECTED_TOKEN",`Unexpected ${h} at node end`)}t+=p.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 _;const c=a.start.source==="{",d=c?"flow map":"flow sequence",p=(o==null?void 0:o.nodeClass)??(c?ri:kr),h=new p(n.schema);h.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 S=0;S<a.items.length;++S){const j=a.items[S],{start:A,key:D,sep:U,value:M}=j,F=Ol(A,{flow:d,indicator:"explicit-key-ind",next:D??(U==null?void 0:U[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!F.found){if(!F.anchor&&!F.tag&&!U&&!M){S===0&&F.comma?s(F.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`):S<a.items.length-1&&s(F.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${d}`),F.comment&&(h.comment?h.comment+=`
|
|
432
|
-
`+F.comment:h.comment=F.comment),g=F.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(S===0)F.comma&&s(F.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${d}`);else if(F.comma||s(F.start,"MISSING_CHAR",`Missing , between ${d} items`),F.comment){let $="";e:for(const ee of A)switch(ee.type){case"comma":case"space":break;case"comment":$=ee.source.substring(1);break e;default:break e}if($){let ee=h.items[h.items.length-1];Dt(ee)&&(ee=ee.value??ee.key),ee.comment?ee.comment+=`
|
|
433
|
-
`+$:ee.comment=$,F.comment=F.comment.substring($.length+1)}}if(!c&&!U&&!F.found){const $=M?e(n,M,F,s):t(n,F.end,U,null,F,s);h.items.push($),g=$.range[2],wp(M)&&s($.range,"BLOCK_IN_FLOW",vp)}else{n.atKey=!0;const $=F.end,ee=D?e(n,D,F,s):t(n,$,A,null,F,s);wp(D)&&s(ee.range,"BLOCK_IN_FLOW",vp),n.atKey=!1;const L=Ol(U??[],{flow:d,indicator:"map-value-ind",next:M,offset:ee.range[2],onError:s,parentIndent:a.indent,startOnNewline:!1});if(L.found){if(!c&&!F.found&&n.options.strict){if(U)for(const xe of U){if(xe===L.found)break;if(xe.type==="newline"){s(xe,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}F.start<L.found.offset-1024&&s(L.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&&((_=M.source)==null?void 0:_[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${d}`):s(L.start,"MISSING_CHAR",`Missing , or : between ${d} items`));const Z=M?e(n,M,L,s):L.found?t(n,L.end,U,null,L,s):null;Z?wp(M)&&s(Z.range,"BLOCK_IN_FLOW",vp):L.comment&&(ee.comment?ee.comment+=`
|
|
434
|
-
`+L.comment:ee.comment=L.comment);const ie=new xn(ee,Z);if(n.options.keepSourceTokens&&(ie.srcToken=j),c){const xe=h;t1(n,xe.items,ee)&&s($,"DUPLICATE_KEY","Map keys must be unique"),xe.items.push(ie)}else{const xe=new ri(n.schema);xe.flow=!0,xe.items.push(ie);const ue=(Z??ee).range;xe.range=[ee.range[0],ue[1],ue[2]],h.items.push(xe)}g=Z?Z.range[2]:L.end}}const v=c?"}":"]",[x,...k]=a.end;let w=g;if((x==null?void 0:x.source)===v)w=x.offset+x.source.length;else{const S=d[0].toUpperCase()+d.substring(1),j=b?`${S} must end with a ${v}`:`${S} in block collection must be sufficiently indented and end with a ${v}`;s(g,b?"MISSING_CHAR":"BAD_INDENT",j),x&&x.source.length!==1&&k.unshift(x)}if(k.length>0){const S=_c(k,w,n.options.strict,s);S.comment&&(h.comment?h.comment+=`
|
|
435
|
-
`+S.comment:h.comment=S.comment),h.range=[a.offset,w,S.offset]}else h.range=[a.offset,w,w];return h}function Ep(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:k}=a,w=x&&o?x.offset>o.offset?x:o:x??o;w&&(!k||k.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===ri.tagName&&d==="map"||c===kr.tagName&&d==="seq")return Ep(e,t,n,s,c);let p=t.schema.tags.find(x=>x.tag===c&&x.collection===d);if(!p){const x=t.schema.knownTags[c];if((x==null?void 0:x.collection)===d)t.schema.tags.push(Object.assign({},x,{default:!1})),p=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),Ep(e,t,n,s,c)}const h=Ep(e,t,n,s,c,p),b=((v=p.resolve)==null?void 0:v.call(p,h,x=>s(o,"TAG_RESOLVE_FAILED",x),t.options))??h,g=zt(b)?b:new Ue(b);return g.range=h.range,g.tag=c,p!=null&&p.format&&(g.format=p.format),g}function n1(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===">"?Ue.BLOCK_FOLDED:Ue.BLOCK_LITERAL,c=t.source?Oj(t.source):[];let d=c.length;for(let w=c.length-1;w>=0;--w){const _=c[w][1];if(_===""||_==="\r")d=w;else break}if(d===0){const w=s.chomp==="+"&&c.length>0?`
|
|
436
|
-
`.repeat(Math.max(1,c.length-1)):"";let _=a+s.length;return t.source&&(_+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,_,_]}}let p=t.indent+s.indent,h=t.offset+s.length,b=0;for(let w=0;w<d;++w){const[_,S]=c[w];if(S===""||S==="\r")s.indent===0&&_.length>p&&(p=_.length);else{_.length<p&&n(h+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(p=_.length),b=w,p===0&&!e.atRoot&&n(h,"BAD_INDENT","Block scalar values in collections must be indented");break}h+=_.length+S.length+1}for(let w=c.length-1;w>=d;--w)c[w][0].length>p&&(d=w+1);let g="",v="",x=!1;for(let w=0;w<b;++w)g+=c[w][0].slice(p)+`
|
|
437
|
-
`;for(let w=b;w<d;++w){let[_,S]=c[w];h+=_.length+S.length+1;const j=S[S.length-1]==="\r";if(j&&(S=S.slice(0,-1)),S&&_.length<p){const D=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(h-S.length-(j?2:1),"BAD_INDENT",D),_=""}o===Ue.BLOCK_LITERAL?(g+=v+_.slice(p)+S,v=`
|
|
438
|
-
`):_.length>p||S[0]===" "?(v===" "?v=`
|
|
439
|
-
`:!x&&v===`
|
|
440
|
-
`&&(v=`
|
|
441
|
-
|
|
442
|
-
`),g+=v+_.slice(p)+S,v=`
|
|
443
|
-
`,x=!0):S===""?v===`
|
|
444
|
-
`?g+=`
|
|
445
|
-
`:v=`
|
|
446
|
-
`:(g+=v+S,v=" ",x=!1)}switch(s.chomp){case"-":break;case"+":for(let w=d;w<c.length;++w)g+=`
|
|
447
|
-
`+c[w][0].slice(p);g[g.length-1]!==`
|
|
448
|
-
`&&(g+=`
|
|
449
|
-
`);break;default:g+=`
|
|
450
|
-
`}const k=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,k,k]}}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="",p=-1;for(let v=1;v<s.length;++v){const x=s[v];if(!d&&(x==="-"||x==="+"))d=x;else{const k=Number(x);!c&&k?c=k:p===-1&&(p=e+v)}}p!==-1&&a(p,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let h=!1,b="",g=s.length;for(let v=1;v<t.length;++v){const x=t[v];switch(x.type){case"space":h=!0;case"newline":g+=x.source.length;break;case"comment":n&&!h&&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 k=`Unexpected token in block scalar header: ${x.type}`;a(x,"UNEXPECTED_TOKEN",k);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 i1(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let d,p;const h=(v,x,k)=>n(a+v,x,k);switch(s){case"scalar":d=Ue.PLAIN,p=Dj(o,h);break;case"single-quoted-scalar":d=Ue.QUOTE_SINGLE,p=Rj(o,h);break;case"double-quoted-scalar":d=Ue.QUOTE_DOUBLE,p=Mj(o,h);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:p,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}`),a1(e)}function Rj(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),a1(e.slice(1,-1)).replace(/''/g,"'")}function a1(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
451
|
-
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
452
|
-
`,"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===`
|
|
453
|
-
`?s+=o:o=`
|
|
454
|
-
`:(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 Mj(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
|
|
455
|
-
`))if(s===`
|
|
456
|
-
`){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===`
|
|
457
|
-
`)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
|
|
458
|
-
`)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!==`
|
|
459
|
-
`&&!(c==="\r"&&e[a+2]===`
|
|
460
|
-
`)&&(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===`
|
|
461
|
-
`||a==="\r")&&!(a==="\r"&&e[t+2]!==`
|
|
462
|
-
`);)a===`
|
|
463
|
-
`&&(n+=`
|
|
464
|
-
`),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:`
|
|
465
|
-
`,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 r1(e,t,n,a){const{value:s,type:o,comment:c,range:d}=t.type==="block-scalar"?n1(e,t,a):i1(t,e.options.strict,a),p=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let h;e.options.stringKeys&&e.atKey?h=e.schema[ea]:p?h=Bj(e.schema,s,p,n,a):t.type==="scalar"?h=Uj(e,s,t,a):h=e.schema[ea];let b;try{const g=h.resolve(s,v=>a(n??t,"TAG_RESOLVE_FAILED",v),e.options);b=kt(g)?g:new Ue(g)}catch(g){const v=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",v),b=new Ue(s)}return b.range=d,b.source=s,o&&(b.type=o),p&&(b.tag=p),h.format&&(b.format=h.format),c&&(b.comment=c),b}function Bj(e,t,n,a,s){var d;if(n==="!")return e[ea];const o=[];for(const p of e.tags)if(!p.collection&&p.tag===n)if(p.default&&p.test)o.push(p);else return p;for(const p of o)if((d=p.test)!=null&&d.test(t))return p;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 p;return(d.default===!0||e&&d.default==="key")&&((p=d.test)==null?void 0:p.test(a))})||n[ea];if(n.compat){const d=n.compat.find(p=>{var h;return p.default&&((h=p.test)==null?void 0:h.test(a))})??n[ea];if(c.tag!==d.tag){const p=t.tagString(c.tag),h=t.tagString(d.tag),b=`Value may be parsed as either ${p} or ${h}`;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:s1,composeEmptyNode:dg};function s1(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:d,tag:p}=n;let h,b=!0;switch(t.type){case"alias":h=$j(e,t,a),(d||p)&&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":h=r1(e,t,p,a),d&&(h.anchor=d.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{h=Aj(Fj,e,t,n,a),d&&(h.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 h??(h=dg(e,t.offset,void 0,null,n,a)),d&&h.anchor===""&&a(d,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!kt(h)||typeof h.value!="string"||h.tag&&h.tag!=="tag:yaml.org,2002:str")&&a(p??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(h.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?h.comment=c:h.commentBefore=c),e.options.keepSourceTokens&&b&&(h.srcToken=t),h}function dg(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:d,end:p},h){const b={type:"scalar",offset:Pj(t,n,a),indent:-1,source:""},g=r1(e,b,d,h);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&h(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=p),g}function $j({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 qj(e,t,{offset:n,start:a,value:s,end:o},c){const d=Object.assign({_directives:t},e),p=new ql(void 0,d),h={atKey:!1,atRoot:!0,directives:p.directives,options:p.options,schema:p.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&&(p.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")),p.contents=s?s1(h,s,b,c):dg(h,b.end,a,null,b,c);const g=p.contents.range[2],v=_c(o,g,!1,c);return v.comment&&(p.comment=v.comment),p.range=[n,g,v.offset],p}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 n0(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?`
|
|
466
|
-
|
|
467
|
-
`:`
|
|
468
|
-
`)+(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 e1(c,a,s)):this.errors.push(new es(c,a,s))},this.directives=new Tn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=n0(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
469
|
-
${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(Lt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];Dt(c)&&(c=c.key);const d=c.commentBefore;c.commentBefore=d?`${a}
|
|
470
|
-
${d}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
|
|
471
|
-
${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:n0(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=qj(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}
|
|
472
|
-
${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 ql(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 i1(e,t,a);case"block-scalar":return n1({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=kc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),p=t.end??[{type:"newline",offset:-1,indent:a,source:`
|
|
473
|
-
`}];switch(d[0]){case"|":case">":{const h=d.indexOf(`
|
|
474
|
-
`),b=d.substring(0,h),g=d.substring(h+1)+`
|
|
475
|
-
`,v=[{type:"block-scalar-header",offset:o,indent:a,source:b}];return l1(v,p)||v.push({type:"newline",offset:-1,indent:a,source:`
|
|
476
|
-
`}),{type:"block-scalar",offset:o,indent:a,props:v,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:d,end:p};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:d,end:p};default:return{type:"scalar",offset:o,indent:a,source:d,end:p}}}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 h=e.props[0];if(h.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=h.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const p=kc({type:c,value:t},{implicitKey:s||d===null,indent:d!==null&&d>0?" ".repeat(d):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(p[0]){case"|":case">":Yj(e,p);break;case'"':kp(e,p,"double-quoted-scalar");break;case"'":kp(e,p,"single-quoted-scalar");break;default:kp(e,p,"scalar")}}function Yj(e,t){const n=t.indexOf(`
|
|
477
|
-
`),a=t.substring(0,n),s=t.substring(n+1)+`
|
|
478
|
-
`;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}];l1(d,"end"in e?e.end:void 0)||d.push({type:"newline",offset:-1,indent:c,source:`
|
|
479
|
-
`});for(const p of Object.keys(e))p!=="type"&&p!=="offset"&&delete e[p];Object.assign(e,{type:"block-scalar",indent:c,props:d,source:s})}}function l1(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 kp(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:`
|
|
480
|
-
`};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 Qj=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"),o1=Symbol("remove item");function ds(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),c1(Object.freeze([]),e,t)}ds.BREAK=vm;ds.SKIP=Vj;ds.REMOVE=o1;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 c1(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=c1(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof d=="number")c=d-1;else{if(d===vm)return vm;d===o1&&(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 u1(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`
|
|
481
|
-
`:case`\r
|
|
482
|
-
`: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:Qj,tokenType:u1,visit:ds},Symbol.toStringTag,{value:"Module"}));function Ri(e){switch(e){case void 0:case" ":case`
|
|
483
|
-
`:case"\r":case" ":return!0;default:return!1}}const i0=new Set("0123456789ABCDEFabcdef"),eO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Zu=new Set(",[]{}"),tO=new Set(` ,[]{}
|
|
484
|
-
\r `),Sp=e=>!e||tO.has(e);class d1{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===`
|
|
485
|
-
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
486
|
-
`:!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===`
|
|
487
|
-
`||!s&&!this.atEnd)return t+a+1}return n===`
|
|
488
|
-
`||a>=this.indentNext||!n&&!this.atEnd?t+a:-1}if(n==="-"||n==="."){const a=this.buffer.substr(t,3);if((a==="---"||a==="...")&&Ri(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(`
|
|
489
|
-
`,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==="...")&&Ri(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&&!Ri(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===":")&&Ri(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("..."))&&Ri(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||Ri(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(`
|
|
490
|
-
`,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
|
|
491
|
-
`,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=>Ri(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`
|
|
492
|
-
`:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
|
493
|
-
`)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(`
|
|
494
|
-
`,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===`
|
|
495
|
-
`;)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===`
|
|
496
|
-
`&&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(Ri(o)||t&&Zu.has(o))break;n=a}else if(Ri(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
|
|
497
|
-
`?(a+=1,s=`
|
|
498
|
-
`,o=this.buffer[a+1]):n=a),o==="#"||t&&Zu.has(o))break;if(s===`
|
|
499
|
-
`){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(Ri(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(;!Ri(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==="%"&&i0.has(this.buffer[t+1])&&i0.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===`
|
|
500
|
-
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
501
|
-
`?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 f1{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 a0(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 h1(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 r0(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,h1(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 d1,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=u1(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"&&r0(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&&a0(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":{a0(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(`
|
|
502
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
503
|
-
`,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 p=0;p<n.sep.length;++p){const h=n.sep[p];switch(h.type){case"newline":d.push(p);break;case"space":break;case"comment":h.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(h1(n.key)&&!dr(n.sep,"newline")){const d=al(n.start),p=n.key,h=n.sep;h.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:p,sep:h}]})}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);r0(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(`
|
|
504
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
505
|
-
`,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 p1(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new f1||null,prettyErrors:t}}function nO(e,t={}){const{lineCounter:n,prettyErrors:a}=p1(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 m1(e,t={}){const{lineCounter:n,prettyErrors:a}=p1(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=m1(e,n);if(!s)return null;if(s.warnings.forEach(o=>RE(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 ql(e,a,n).toString(n)}const s0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Fd,CST:Jj,Composer:fg,Document:ql,Lexer:d1,LineCounter:f1,Pair:xn,Parser:hg,Scalar:Ue,Schema:ZE,YAMLError:ug,YAMLMap:ri,YAMLParseError:es,YAMLSeq:kr,YAMLWarning:e1,isAlias:Nr,isCollection:Lt,isDocument:ps,isMap:Ul,isNode:zt,isPair:Dt,isScalar:kt,isSeq:Pl,parse:iO,parseAllDocuments:nO,parseDocument:m1,stringify:aO,visit:ms,visitAsync:Pd},Symbol.toStringTag,{value:"Module"}));function rO({projectName:e,file:t,onClose:n,onSaved:a}){const s=Bt(),o=Kn(),{alert:c}=oi(),{data:d,isLoading:p,isError:h,error:b,refetch:g}=lt({queryKey:["pipeline-file",e,t],queryFn:()=>AA(e,t)}),[v,x]=C.useState("structured"),[k,w]=C.useState(null),[_,S]=C.useState(null);C.useEffect(()=>{d&&k===null&&(w(d.content),S(d.etag),d.parseError&&x("yaml"))},[d,k]),C.useEffect(()=>{const F=$=>{$.key==="Escape"&&n()};return window.addEventListener("keydown",F),()=>window.removeEventListener("keydown",F)},[n]);const j=Hn({mutationFn:()=>{if(k===null||_===null)throw new Error("no draft");return jA(e,t,k,_)},onSuccess:F=>{S(F.etag),o.invalidateQueries({queryKey:["pipeline-file",e,t]}),o.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:F=>{const $=F.status;c({title:s($===409?"pipelineEditor.error.conflict.title":$===422?"pipelineEditor.error.yaml.title":"pipelineEditor.error.save.title"),body:F instanceof Error?F.message:String(F)})}}),A=k!==null&&d&&k!==d.content,{parsed:D,parseError:U}=C.useMemo(()=>{if(k===null)return{parsed:null,parseError:null};try{return{parsed:s0.parse(k)??{},parseError:null}}catch(F){return{parsed:null,parseError:F instanceof Error?F.message:String(F)}}},[k]),M=F=>{try{const $=s0.stringify(F,{lineWidth:0});w($)}catch($){c({title:s("pipelineEditor.error.serialize.title"),body:$ instanceof Error?$.message:String($)})}};return f.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:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[f.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[f.jsxs("div",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[f.jsx(Yv,{size:20,strokeWidth:2.5}),f.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(d==null?void 0:d.isActive)&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:s("pipelineEditor.activeBadge")})]}),f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,_&&` · etag ${_}`]})]}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("pipelineEditor.close"),children:f.jsx(_i,{size:14,strokeWidth:3})})]}),p&&f.jsx("p",{className:"text-[var(--color-text-muted)]",children:s("common.loading")}),h&&f.jsx("p",{className:"text-[var(--color-crashed)]",children:s("pipelineEditor.error.load",{detail:b instanceof Error?b.message:String(b)})}),d&&k!==null&&f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[f.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:[f.jsxs("button",{type:"button",onClick:()=>x("structured"),"aria-pressed":v==="structured",disabled:!!U,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)]",U?"opacity-50 cursor-not-allowed":""].join(" "),title:U??void 0,children:[f.jsx(Ec,{size:11,strokeWidth:2.5}),s("pipelineEditor.mode.structured")]}),f.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:[f.jsx(Yv,{size:11,strokeWidth:2.5}),s("pipelineEditor.mode.yaml")]})]}),U&&f.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[f.jsx(sc,{size:12,strokeWidth:2.5}),s("pipelineEditor.parseError.prefix",{detail:U})]}),(d==null?void 0:d.isActive)&&f.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:s("pipelineEditor.activeWarning")})]}),f.jsxs("div",{className:"flex-1 overflow-auto",children:[v==="structured"&&D&&f.jsx(sO,{parsed:D,onChange:M}),v==="yaml"&&f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:k,onChange:F=>w(F.target.value),spellCheck:!1,"aria-label":s("pipelineEditor.yamlAria")})]}),f.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:[f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:A?f.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:s("pipelineEditor.status.unsaved")}):j.isSuccess?f.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[f.jsx(lc,{size:12,strokeWidth:2.5})," ",s("pipelineEditor.status.saved")]}):s("pipelineEditor.status.noChanges")}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{w(null),g()},disabled:j.isPending,type:"button",children:s("pipelineEditor.reload")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>j.mutate(),disabled:!A||j.isPending,type:"button","aria-label":s("pipelineEditor.saveAria"),children:[j.isPending?f.jsx(It,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Ud,{size:13,strokeWidth:3}),s("pipelineEditor.save")]})]})]})]})]})})}function sO({parsed:e,onChange:t}){const n=Bt(),a=e.stages??[],s=h=>{t({...e,stages:h})},o=()=>{s([...a,{name:`stage-${a.length+1}`,on_complete:"move_card Done"}])},c=h=>{s(a.filter((b,g)=>g!==h))},d=(h,b)=>{const g=[...a],v=h+b;v<0||v>=g.length||([g[h],g[v]]=[g[v],g[h]],s(g))},p=(h,b)=>{s(a.map((g,v)=>v===h?{...g,...b}:g))};return f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[f.jsx("span",{className:"font-bold",children:"mode:"}),f.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:h=>t({...e,mode:h.target.value}),children:[f.jsx("option",{value:"project",children:"project"}),f.jsx("option",{value:"steps",children:"steps"})]})]}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:n("pipelineEditor.modeHint")})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:n("pipelineEditor.stages.heading",{count:a.length})}),f.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:[f.jsx(Bi,{size:11,strokeWidth:3})," ",n("pipelineEditor.stages.add")]})]}),a.length===0?f.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")}):f.jsx("div",{className:"flex flex-col gap-3",children:a.map((h,b)=>f.jsx(lO,{stage:h,index:b,total:a.length,onChange:g=>p(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=Bt(),p=e.on_fail??{};return f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&f.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})]}),f.jsxs("div",{className:"flex gap-1",children:[f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":d("pipelineEditor.stage.moveUp"),children:f.jsx(PT,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":d("pipelineEditor.stage.moveDown"),children:f.jsx(wc,{size:12,strokeWidth:3})}),f.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":d("pipelineEditor.stage.remove"),children:f.jsx(zl,{size:12,strokeWidth:3})})]})]}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[f.jsx(or,{label:"name",hint:d("pipelineEditor.stage.name.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:h=>a({name:h.target.value}),placeholder:"develop"})}),f.jsx(or,{label:"profile",hint:d("pipelineEditor.stage.profile.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:h=>a({profile:h.target.value||void 0}),placeholder:"fullstack"})}),f.jsx(or,{label:"card_state",hint:d("pipelineEditor.stage.cardState.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:h=>a({card_state:h.target.value||void 0}),placeholder:"Inprogress"})}),f.jsx(or,{label:"timeout",hint:d("pipelineEditor.stage.timeout.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:h=>a({timeout:h.target.value||void 0}),placeholder:"2h"})}),f.jsx(or,{label:"trigger",hint:d("pipelineEditor.stage.trigger.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:h=>a({trigger:h.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),f.jsx(or,{label:"on_complete",hint:d("pipelineEditor.stage.onComplete.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:h=>a({on_complete:h.target.value}),placeholder:"move_card Done"})})]}),f.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[f.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),f.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[f.jsx(or,{label:"action",hint:d("pipelineEditor.stage.onFail.action.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:p.action??"",onChange:h=>a({on_fail:{...p,action:h.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),f.jsx(or,{label:"comment",hint:d("pipelineEditor.stage.onFail.comment.hint"),children:f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:p.comment??"",onChange:h=>a({on_fail:{...p,comment:h.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),f.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[f.jsx("input",{type:"checkbox",checked:p.halt??!0,onChange:h=>a({on_fail:{...p,halt:h.target.checked}})}),f.jsx("span",{className:"font-bold",children:"halt"}),f.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 f.jsxs("label",{className:"flex flex-col gap-1",children:[f.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&f.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=Bt(),[c,d]=C.useState(""),[p,h]=C.useState("blank");C.useEffect(()=>{const _=S=>{S.key==="Escape"&&e()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[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,p)},w=o("newPipelineDialog.field.filename.help",{filename:"__FN__"}).split("__FN__");return f.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:f.jsxs("div",{className:"nb-card max-w-md w-full",children:[f.jsxs("header",{className:"flex items-start justify-between mb-4",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:o("newPipelineDialog.title")}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":o("common.close"),children:f.jsx(_i,{size:14,strokeWidth:3})})]}),f.jsxs("form",{onSubmit:_=>{_.preventDefault(),x()},className:"flex flex-col gap-4",children:[f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:o("newPipelineDialog.field.filename.label")}),f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:o("newPipelineDialog.field.filename.placeholder"),value:c,onChange:_=>d(_.target.value),autoFocus:!0}),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:[w[0],f.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:g||"xxx.yaml"}),w[1]]})]}),f.jsxs("fieldset",{className:"flex flex-col gap-2",children:[f.jsx("legend",{className:"text-sm font-bold mb-1",children:o("newPipelineDialog.section.template")}),f.jsx(_p,{value:"blank",current:p,label:o("newPipelineDialog.template.blank.label"),desc:o("newPipelineDialog.template.blank.desc"),onSelect:h}),f.jsx(_p,{value:"sample",current:p,label:o("newPipelineDialog.template.sample.label"),desc:o("newPipelineDialog.template.sample.desc"),onSelect:h,disabled:!a,disabledReason:o("newPipelineDialog.template.sample.unavailable")}),f.jsx(_p,{value:"active",current:p,label:o("newPipelineDialog.template.active.label"),desc:o("newPipelineDialog.template.active.desc"),onSelect:h,disabled:!n,disabledReason:o("newPipelineDialog.template.active.unavailable")})]}),f.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[f.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:o("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!v||s,"aria-label":o("newPipelineDialog.create.aria"),children:[s?f.jsx(It,{size:13,strokeWidth:3,className:"animate-spin"}):f.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 f.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:[f.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:d,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:n}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function cO(){var c;const e=Bt(),{name:t=""}=Yw(),n=Sr(),[a,s]=C.useState("overview"),o=lt({queryKey:["project",t],queryFn:()=>EA(t),enabled:!!t});return f.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[f.jsxs("header",{className:"flex items-center gap-3",children:[f.jsxs("button",{type:"button",onClick:()=>n("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":e("newProject.back.aria"),children:[f.jsx(iE,{size:14,strokeWidth:3}),e("newProject.back")]}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:t}),f.jsx(hs,{to:`/board?project=${encodeURIComponent(t)}`,className:"nb-btn nb-btn-mint",children:e("projectDetail.openBoard")})]}),f.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[f.jsx(ed,{current:a,value:"overview",onSelect:s,icon:a2,children:e("projectDetail.tab.overview")}),f.jsx(ed,{current:a,value:"config",onSelect:s,icon:oE,children:e("projectDetail.tab.config")}),f.jsx(ed,{current:a,value:"pipelines",onSelect:s,icon:fE,children:e("projectDetail.tab.pipelines")}),f.jsx(ed,{current:a,value:"danger",onSelect:s,icon:zl,children:e("projectDetail.tab.danger")})]}),a==="overview"&&f.jsx(uO,{name:t,data:o.data,loading:o.isLoading}),a==="config"&&f.jsx(dO,{name:t}),a==="pipelines"&&f.jsx(fO,{name:t}),a==="danger"&&f.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 f.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:[f.jsx(a,{size:13,strokeWidth:2.5}),s]})}function uO({name:e,data:t,loading:n}){const a=Bt();return n?f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:a("common.loading")})}):t?f.jsx("div",{className:"nb-card",children:f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.repoDir")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.pmBackend")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.agent")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.cards")}),f.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})}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.workers")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:a("projectDetail.overview.workers.value",{total:t.workers.total,active:t.workers.active})}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.pipeline")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),f.jsx("dt",{className:"font-bold",children:a("projectDetail.overview.lastActivity")}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:a("projectDetail.overview.notFound",{name:e})})})}function dO({name:e}){const t=Bt(),n=Kn(),{alert:a}=oi(),{data:s,isLoading:o,isError:c,error:d,refetch:p}=lt({queryKey:["project-conf",e],queryFn:()=>SA(e)}),[h,b]=C.useState(null),[g,v]=C.useState(null);C.useEffect(()=>{s&&h===null&&(b(s.content),v(s.etag))},[s,h]);const x=h!==null&&s!==void 0&&h!==s.content,k=Hn({mutationFn:()=>{if(h===null||g===null)throw new Error("no draft");return _A(e,h,g)},onSuccess:w=>{v(w.etag),n.invalidateQueries({queryKey:["project-conf",e]}),n.invalidateQueries({queryKey:["project",e]})},onError:w=>{const _=w.status;a({title:t(_===409?"projectDetail.config.error.conflict.title":"projectDetail.config.error.save.title"),body:_===409?t("projectDetail.config.error.conflict.body"):w instanceof Error?w.message:String(w)})}});return o?f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})}):c?f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:t("projectDetail.config.error.load",{detail:d instanceof Error?d.message:String(d)})})}):f.jsxs("div",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:f.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&&f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",g]})]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{b(null),p()},disabled:k.isPending,"aria-label":t("projectDetail.config.reload"),children:[f.jsx(Al,{size:13,strokeWidth:2.5}),t("projectDetail.config.reload")]}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>k.mutate(),disabled:!x||k.isPending,"aria-label":t("projectDetail.config.saveAria"),children:[k.isPending?f.jsx(It,{size:13,strokeWidth:3,className:"animate-spin"}):k.isSuccess&&!x?f.jsx(IT,{size:13,strokeWidth:3}):f.jsx(Ud,{size:13,strokeWidth:3}),t("projectDetail.config.save")]})]})]}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:h??"",onChange:w=>b(w.target.value),spellCheck:!1,"aria-label":t("projectDetail.config.editorAria")}),x&&f.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:t("projectDetail.config.confDirty")})]})}function fO({name:e}){const t=Bt(),n=Kn(),{confirm:a,alert:s}=oi(),{data:o,isLoading:c}=lt({queryKey:["project-pipelines",e],queryFn:()=>CA(e)}),[d,p]=C.useState(null),[h,b]=C.useState(!1),g=Hn({mutationFn:w=>TA(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=Hn({mutationFn:w=>DA(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=Hn({mutationFn:w=>OA(e,w.name,w.template),onSuccess:w=>{n.invalidateQueries({queryKey:["project-pipelines",e]}),b(!1),p(w.name)},onError:w=>{s({title:t("projectDetail.pipelines.create.error"),body:w instanceof Error?w.message:String(w)})}});if(c)return f.jsx("div",{className:"nb-card",children:f.jsx("p",{className:"text-[var(--color-text-muted)]",children:t("common.loading")})});const k=[];o!=null&&o.active&&k.push({name:o.active,isActive:!0});for(const w of(o==null?void 0:o.available)??[])k.push({name:w.name,isActive:!1});return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:t("projectDetail.pipelines.title")}),f.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:[f.jsx(Bi,{size:12,strokeWidth:3}),t("projectDetail.pipelines.add")]})]}),k.length===0?f.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")}):f.jsx("ul",{className:"flex flex-col gap-2",children:k.map(w=>f.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsx(fE,{size:16,strokeWidth:2.5}),f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:w.name}),w.isActive&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:t("projectDetail.pipelines.activeBadge")}),f.jsxs("div",{className:"flex gap-1",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>p(w.name),"aria-label":t("projectDetail.pipelines.editAria",{name:w.name}),children:[f.jsx(Wm,{size:11,strokeWidth:2.5}),t("projectDetail.pipelines.edit")]}),!w.isActive&&f.jsxs(f.Fragment,{children:[f.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")}),f.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:f.jsx(zl,{size:11,strokeWidth:2.5})})]})]})]},w.name))})]}),d&&f.jsx(rO,{projectName:e,file:d,onClose:()=>p(null),onSaved:()=>{n.invalidateQueries({queryKey:["project-pipelines",e]})}}),h&&f.jsx(oO,{hasActive:!!(o!=null&&o.active),hasSample:!0,isPending:x.isPending,onCancel:()=>b(!1),onCreate:(w,_)=>x.mutate({name:w,template:_})})]})}function hO({name:e,repoDir:t}){const n=Bt(),a=Sr(),s=Kn(),{alert:o}=oi(),[c,d]=C.useState(""),[p,h]=C.useState(!0),b=Hn({mutationFn:()=>NA(e,{includeClaudeDir:p}),onSuccess:w=>{s.invalidateQueries({queryKey:["projects"]});const _=w.claudeRemoved.filter(S=>S.ok).map(S=>S.path);o({title:n("projectDetail.danger.deleted.title"),body:_.length>0?n("projectDetail.danger.deleted.bodyWithList",{paths:_.join(`
|
|
506
|
-
`)}):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__"),k=n("projectDetail.danger.confirmPrompt",{name:"__NAME__"}).split("__NAME__");return f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:n("projectDetail.danger.title")}),f.jsxs("p",{className:"text-sm mb-4",children:[v[0],f.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&&f.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:[f.jsx("input",{type:"checkbox",checked:p,onChange:w=>h(w.target.checked),className:"mt-0.5"}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:n("projectDetail.danger.includeClaude.label")}),f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:n("projectDetail.danger.includeClaude.note")})]})]}),f.jsx("div",{className:"mb-4",children:f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsxs("span",{className:"text-sm font-bold",children:[k[0],f.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e}),k[1]]}),f.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})]})}),f.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?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(zl,{size:14,strokeWidth:3}),n("projectDetail.danger.deleteButton")]})]})}function pg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return qt(`/api/skills${t}`)}function pO(e){return qt(`/api/skills/${encodeURIComponent(e)}`)}function mO(e,t){return qt(`/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 A;const s=Bt(),[o,c]=C.useState(""),[d,p]=C.useState(""),[h,b]=C.useState(new Set),[g,v]=C.useState(!1),x=lt({queryKey:["skills-all",e],queryFn:()=>pg(e)});C.useEffect(()=>{const D=U=>{U.key==="Escape"&&n()};return window.addEventListener("keydown",D),()=>window.removeEventListener("keydown",D)},[n]);const w=o.trim().length>0&&o.trim().length<=200&&!t,_=D=>{const U=new Set(h);U.has(D)?U.delete(D):U.add(D),b(U)},S=()=>{w&&a({title:o.trim(),description:d.trim(),skills:[...h],labels:["AI-PIPELINE"],initialState:g?"Backlog":"Planning"})},j=((A=x.data)==null?void 0:A.data)??[];return f.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:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[f.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:s("newCard.title")}),f.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":s("common.close"),children:f.jsx(_i,{size:14,strokeWidth:3})})]}),f.jsxs("form",{onSubmit:D=>{D.preventDefault(),S()},className:"flex flex-col gap-4 overflow-auto",children:[f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.title")}),f.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}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.title.help")})]}),f.jsxs("label",{className:"flex flex-col gap-1.5",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.description")}),f.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:s("newCard.field.description.placeholder"),value:d,onChange:D=>p(D.target.value)}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.description.help")})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.skills")}),f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.skills.help")}),x.isLoading&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:s("newCard.field.skills.loading")}),x.isError&&f.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)})}),j.length>0&&f.jsx("div",{className:"flex flex-wrap gap-2",children:j.map(D=>{const U=h.has(D.name);return f.jsx("button",{type:"button",onClick:()=>_(D.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",U?"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":U,children:D.name},D.name)})}),h.size>0&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:s("newCard.field.skills.selected",{count:h.size,names:[...h].join(", ")})})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[f.jsx("span",{className:"text-sm font-bold",children:s("newCard.field.dispatch")}),f.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:[f.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:g,onChange:D=>v(D.target.checked)}),f.jsxs("div",{className:"flex-1",children:[f.jsx("div",{className:"text-sm font-bold",children:s("newCard.field.dispatch.label")}),f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:s("newCard.field.dispatch.help")})]})]})]})]}),f.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:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:s("common.cancel")}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:S,disabled:!w,type:"button","aria-label":s("newCard.create.aria"),children:[t?f.jsx(It,{size:13,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:13,strokeWidth:3}),s("common.create")]})]})]})})}function EO(e){return qt(`/api/projects/${encodeURIComponent(e)}/cards`)}function kO(e,t){return qt(`/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 RO(e){const t=Kn();C.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=d=>{try{const p=JSON.parse(d.data);t.invalidateQueries({queryKey:["cards",p.project]}),t.invalidateQueries({queryKey:["card",p.project,p.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=d=>{try{const p=JSON.parse(d.data);t.invalidateQueries({queryKey:["workers",p.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=d=>{try{const p=JSON.parse(d.data);t.invalidateQueries({queryKey:["pipeline-status",p.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 MO=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 MO.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 g1({name:e}){const t=UO[BO(e)];return f.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function b1({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return f.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function PO({card:e,onClick:t,done:n,draggable:a}){const s=Bt(),o=e.labels.some(c=>c.startsWith("STARTED-"))&&!n;return f.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:[f.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[f.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&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),f.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)&&f.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(c=>f.jsx(g1,{name:c},c)),e.labels.filter(c=>c==="NEEDS-FIX").map(c=>f.jsx(b1,{label:c,kind:"warn"},c))]}),e.checklist&&e.checklist.total>0&&f.jsx(FO,{stats:e.checklist}),f.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:[f.jsx("span",{children:$O(e.updatedAt??e.createdAt,s)}),e.branch&&f.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function FO({stats:e}){const t=Bt();return f.jsxs("div",{className:"mb-2",children:[f.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[f.jsx("span",{className:"font-bold",children:t("kanban.checklist.label",{done:e.done,total:e.total})}),f.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),f.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:f.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),f.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((n,a)=>f.jsxs("li",{className:`flex items-start gap-1 ${n.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{className:"flex-shrink-0 mt-0.5",children:n.done?"✓":"○"}),f.jsx("span",{className:"line-clamp-1",children:n.text})]},a)),e.items.length>3&&f.jsx("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:t("kanban.checklist.more",{count:e.items.length-3})})]})]})}function $O(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 qO({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const o=Bt(),[c,d]=C.useState(!1);return f.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:p=>{!s||!p.dataTransfer.types.includes("application/x-sps-card-seq")||(p.preventDefault(),p.dataTransfer.dropEffect="move",c||d(!0))},onDragLeave:()=>d(!1),onDrop:p=>{if(d(!1),!s)return;const h=p.dataTransfer.getData("application/x-sps-card-seq"),b=Number.parseInt(h,10);Number.isFinite(b)&&(p.preventDefault(),s(b))},children:[f.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[f.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),f.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})]}),f.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&&f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:o("kanban.column.empty")}),n.map(p=>f.jsx(PO,{card:p,onClick:()=>a(p),done:e==="Done",draggable:!!s},p.seq))]})]})}function wm(e,t){if(!e)return"";const n=e.split(`
|
|
507
|
-
`),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(`
|
|
508
|
-
`).trim()}function Np(e){return wm(e,"描述")}function HO({project:e,seq:t,onClose:n,onChanged:a}){var H,ce,de,ae,O,R,Q,T,be,W,fe;const s=Kn(),{confirm:o,alert:c}=oi(),{data:d,isLoading:p,isError:h,error:b,refetch:g}=lt({queryKey:["card",e,t],queryFn:()=>kO(e,t)}),[v,x]=C.useState(!1),[k,w]=C.useState(""),[_,S]=C.useState(""),[j,A]=C.useState(new Set),[D,U]=C.useState([]),[M,F]=C.useState(""),$=lt({queryKey:["skills-all",e],queryFn:()=>pg(e),enabled:v}),L=((ce=(H=lt({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}).data)==null?void 0:H.data.find(K=>K.name===e))==null?void 0:ce.pipelineStatus)==="running";C.useEffect(()=>{v&&d&&(w(d.title),S(Np(d.body)),A(new Set(d.skills)),U([...d.labels]))},[v,d]),C.useEffect(()=>{const K=se=>{se.key==="Escape"&&(v?x(!1):n())};return window.addEventListener("keydown",K),()=>window.removeEventListener("keydown",K)},[n,v]);const Z=Hn({mutationFn:()=>{if(!d)throw new Error("no data");const K={},se=k.trim();se&&se!==d.title&&(K.title=se);const he=Np(d.body);_!==he&&(K.description=_);const Oe=[...j].sort(),pt=[...d.skills].sort();return JSON.stringify(Oe)!==JSON.stringify(pt)&&(K.skills=Oe),JSON.stringify(D)!==JSON.stringify(d.labels)&&(K.labels=D),Object.keys(K).length===0?Promise.resolve({ok:!0,noop:!0}):AO(e,t,K)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),x(!1),a()},onError:K=>{c({title:"保存失败",body:K instanceof Error?K.message:String(K)})}}),ie=C.useMemo(()=>{if(!v||!d)return!1;if(k.trim()!==d.title||_!==Np(d.body))return!0;const K=[...j].sort(),se=[...d.skills].sort();return JSON.stringify(K)!==JSON.stringify(se)||JSON.stringify(D)!==JSON.stringify(d.labels)},[v,d,k,_,j,D]),xe=K=>{const se=new Set(j);se.has(K)?se.delete(K):se.add(K),A(se)},ue=()=>{const K=M.trim();if(K){if(D.includes(K)){F("");return}U([...D,K]),F("")}},J=K=>{U(D.filter(se=>se!==K))};return f.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:f.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[f.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]}),(d==null?void 0:d.state)&&f.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:d.state}),v&&f.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:"⚠ 编辑中"})]}),v?f.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:k,onChange:K=>w(K.target.value),maxLength:200,"aria-label":"卡片标题"}):f.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(d==null?void 0:d.title)??"加载中…"})]}),f.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!v&&d&&f.jsxs("button",{onClick:()=>x(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":"编辑卡片",children:[f.jsx(Wm,{size:12,strokeWidth:2.5})," 编辑"]}),f.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:f.jsx(_i,{size:14,strokeWidth:3})})]})]}),p&&f.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),h&&f.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",b instanceof Error?b.message:String(b)]}),d&&f.jsxs("div",{className:"flex flex-col gap-4",children:[d.branch&&!v&&f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(u2,{size:14}),f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:d.branch})]}),v?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),$.isLoading&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),$.data&&$.data.data.length>0&&f.jsx("div",{className:"flex flex-wrap gap-1.5",children:$.data.data.map(K=>{const se=j.has(K.name);return f.jsx("button",{type:"button",onClick:()=>xe(K.name),"aria-pressed":se,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",se?"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:K.name},K.name)})})]}),f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),f.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[D.map(K=>f.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:[K,f.jsx("button",{type:"button",onClick:()=>J(K),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${K}`,children:f.jsx(_i,{size:10,strokeWidth:3})})]},K)),f.jsx("input",{type:"text",className:"nb-input",style:{padding:"4px 8px",fontSize:12,width:140},placeholder:"+ 添加 label",value:M,onChange:K=>F(K.target.value),onKeyDown:K=>{K.key==="Enter"&&!K.nativeEvent.isComposing&&(K.preventDefault(),ue())}}),M&&f.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:ue,"aria-label":"添加 label",children:f.jsx(Bi,{size:10,strokeWidth:3})})]}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):f.jsxs(f.Fragment,{children:[d.skills.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:d.skills.map(K=>f.jsx(g1,{name:K},K))})]}),d.labels.length>0&&f.jsxs("div",{children:[f.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),f.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:d.labels.map(K=>f.jsx(b1,{label:K,kind:K==="NEEDS-FIX"?"warn":"default"},K))})]})]}),v?f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:_,onChange:K=>S(K.target.value),"aria-label":"卡片描述"}),f.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),(((T=d.checklist)==null?void 0:T.total)??0)>0&&f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[f.jsx("div",{className:"flex items-center justify-between mb-2",children:f.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",((be=d.checklist)==null?void 0:be.done)??0,"/",((W=d.checklist)==null?void 0:W.total)??0]})}),f.jsx("ul",{className:"text-sm space-y-1",children:(((fe=d.checklist)==null?void 0:fe.items)??[]).map((K,se)=>f.jsxs("li",{className:`flex items-start gap-2 ${K.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{children:K.done?"✓":"○"}),f.jsx("span",{children:K.text})]},se))})]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),f.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(d.body,"描述")||"(空)"})]}),f.jsxs("div",{children:[f.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["检查清单 ",f.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((de=d.checklist)==null?void 0:de.done)??0,"/",((ae=d.checklist)==null?void 0:ae.total)??0]})]}),f.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((O=d.checklist)==null?void 0:O.total)??0)>0?f.jsxs(f.Fragment,{children:[f.jsx("div",{className:"flex items-center justify-end mb-2",children:f.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:f.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((R=d.checklist)==null?void 0:R.percent)??0}%`}})})}),f.jsx("ul",{className:"text-sm space-y-1",children:(((Q=d.checklist)==null?void 0:Q.items)??[]).map((K,se)=>f.jsxs("li",{className:`flex items-start gap-2 ${K.done?"opacity-60 line-through":""}`,children:[f.jsx("span",{children:K.done?"✓":"○"}),f.jsx("span",{children:K.text})]},se))})]}):f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["暂无清单项。在描述里用 ",f.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:"- [ ] 项"})," 语法添加。"]})})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"日志"}),f.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(d.body,"日志")||"(空)"})]})]}),f.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:v?f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{x(!1),g()},disabled:Z.isPending,children:"取消"}),f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>Z.mutate(),disabled:!ie||!k.trim()||Z.isPending,"aria-label":"保存卡片修改",children:[Z.isPending?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Ud,{size:14,strokeWidth:3}),"保存"]})]}):f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:d.state==="Done"||L,title:d.state==="Done"?"卡片已完成;先拖回 Todo 再启动":L?"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动":void 0,onClick:async()=>{try{await NO(e,t),a()}catch(K){c({title:"启动 worker 失败",body:K instanceof Error?K.message:String(K)})}},children:[f.jsx(Xm,{size:14,strokeWidth:3}),"启动 worker"]}),f.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await o({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0}))try{await SO(e,t),a(),n()}catch(se){c({title:"重置失败",body:se instanceof Error?se.message:String(se)})}},children:[f.jsx(lE,{size:14,strokeWidth:2.5}),"重置卡片"]}),f.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await o({title:`删除卡片 #${t}`,body:`即将删除 "${d.title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?`,confirm:"继续",danger:!0})||!await o({title:"最终确认",body:`请再次确认删除卡片 #${t}。`,confirm:"确定删除",danger:!0})))try{await _O(e,t),a(),n()}catch(he){c({title:"删除失败",body:he instanceof Error?he.message:String(he)})}},"aria-label":"删除卡片",children:[f.jsx(zl,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function KO({current:e,onChange:t}){const[n,a]=C.useState(!1),s=C.useRef(null),{data:o}=lt({queryKey:["projects"],queryFn:_r});return C.useEffect(()=>{const c=d=>{var p;(p=s.current)!=null&&p.contains(d.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),f.jsxs("div",{className:"relative",ref:s,children:[f.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,f.jsx(wc,{size:14,strokeWidth:2.5})]}),n&&o&&f.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=>f.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:[f.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),f.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)"}],y1="sps-console:last-board-project";function YO(){if(typeof window>"u")return null;try{return localStorage.getItem(y1)}catch{return null}}function QO(e){if(!(typeof window>"u"))try{localStorage.setItem(y1,e)}catch{}}function VO(){var H,ce,de;const e=Bt(),[t,n]=tE(),a=t.get("project"),[s,o]=C.useState(null),[c,d]=C.useState(""),[p,h]=C.useState(()=>new Set),[b,g]=C.useState(()=>new Set),{confirm:v,alert:x}=oi();RO(a);const k=lt({queryKey:["projects"],queryFn:_r}),w=lt({queryKey:["cards",a],queryFn:()=>EO(a??""),enabled:!!a}),_=Kn(),S=()=>{_.invalidateQueries({queryKey:["cards",a]}),_.invalidateQueries({queryKey:["projects"]}),_.invalidateQueries({queryKey:["pipeline-status",a]})},j=ae=>{n({project:ae})};C.useEffect(()=>{var O;if(a){QO(a);return}const ae=YO();ae&&((O=k.data)!=null&&O.data.some(R=>R.name===ae))&&n({project:ae},{replace:!0})},[a,k.data,n]);const A=Hn({mutationFn:()=>jO(a),onSuccess:()=>{S()},onError:ae=>{x({title:e("board.action.startError"),body:ae instanceof Error?ae.message:String(ae)})}}),D=Hn({mutationFn:()=>OO(a),onSuccess:()=>S(),onError:ae=>{x({title:e("board.action.stopError"),body:ae instanceof Error?ae.message:String(ae)})}}),U=Hn({mutationFn:()=>DO(a,{all:!0}),onSuccess:()=>S(),onError:ae=>{x({title:e("board.action.resetError"),body:ae instanceof Error?ae.message:String(ae)})}}),[M,F]=C.useState(!1),$=Hn({mutationFn:ae=>CO(a,ae),onSuccess:()=>{S(),F(!1)},onError:ae=>{x({title:e("board.action.newCard.error"),body:ae instanceof Error?ae.message:String(ae)})}}),ee=Hn({mutationFn:({seq:ae,state:O})=>TO(a,ae,O),onMutate:async({seq:ae,state:O})=>{await _.cancelQueries({queryKey:["cards",a]});const R=_.getQueryData(["cards",a]);return R&&_.setQueryData(["cards",a],{...R,data:R.data.map(Q=>Q.seq===ae?{...Q,state:O}:Q)}),{prev:R}},onError:(ae,O,R)=>{R!=null&&R.prev&&_.setQueryData(["cards",a],R.prev),x({title:e("board.action.moveCard.error"),body:ae instanceof Error?ae.message:String(ae)})},onSettled:()=>{_.invalidateQueries({queryKey:["cards",a]})}}),L=((H=w.data)==null?void 0:H.data)??[],{allSkills:Z,allLabels:ie}=C.useMemo(()=>{const ae=new Set,O=new Set;for(const R of L){for(const Q of R.skills)ae.add(Q);for(const Q of R.labels)O.add(Q)}return{allSkills:[...ae].sort(),allLabels:[...O].sort()}},[L]);if(!a)return f.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:e("board.title.bare")}),f.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:e("board.pickPrompt.title")}),f.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:e("board.pickPrompt.body")}),f.jsx("div",{className:"flex flex-wrap gap-2",children:(ce=k.data)==null?void 0:ce.data.map(ae=>f.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>j(ae.name),type:"button",children:ae.name},ae.name))})]})]});const xe=L.filter(ae=>{if(c){const O=c.toLowerCase();if(!(ae.title.toLowerCase().includes(O)||ae.skills.some(Q=>Q.toLowerCase().includes(O))||ae.labels.some(Q=>Q.toLowerCase().includes(O))))return!1}return!(p.size>0&&!ae.skills.some(R=>p.has(R))||b.size>0&&!ae.labels.some(R=>b.has(R)))}),ue=(de=k.data)==null?void 0:de.data.find(ae=>ae.name===a),J=(ue==null?void 0:ue.pipelineStatus)==="running";return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("board.title")}),f.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")})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsx(KO,{current:a,onChange:j}),f.jsxs("button",{className:J?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>J?D.mutate():A.mutate(),disabled:A.isPending||D.isPending,type:"button","aria-label":e(J?"board.action.stopAria":"board.action.startAria"),title:e(J?"board.action.stopAria":"board.action.startAria"),children:[A.isPending||D.isPending?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):J?f.jsx(cE,{size:14,strokeWidth:3}):f.jsx(Xm,{size:14,strokeWidth:3}),e(J?"board.action.stop":"board.action.start")]}),f.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})&&U.mutate()},disabled:U.isPending,children:[U.isPending?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(lE,{size:14,strokeWidth:2.5}),e("board.action.reset")]}),f.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>F(!0),disabled:$.isPending,children:[$.isPending?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:14,strokeWidth:3}),e("board.action.newCard")]})]})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(Ed,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:e("board.search.placeholder"),value:c,onChange:ae=>d(ae.target.value),"aria-label":e("board.search.aria")})]}),f.jsx(l0,{label:"skill",options:Z,selected:p,onChange:h}),f.jsx(l0,{label:"label",options:ie,selected:b,onChange:g}),(c||p.size>0||b.size>0)&&f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{d(""),h(new Set),g(new Set)},type:"button","aria-label":e("board.filter.clearAria"),children:[f.jsx(_i,{size:11,strokeWidth:3}),e("board.filter.clear")]}),f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[f.jsx(o2,{size:12}),xe.length," / ",L.length]})]}),w.isError&&f.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[f.jsx("p",{className:"font-semibold",children:e("board.error.loadCards")}),f.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&&f.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(ae=>f.jsx(qO,{label:e(ae.labelKey),bg:ae.bg,cards:xe.filter(WO(ae.state)),onCardClick:O=>o(O.seq),onDropCard:O=>ee.mutate({seq:O,state:ae.state})},ae.state))}),s!==null&&f.jsx(HO,{project:a,seq:s,onClose:()=>o(null),onChanged:S}),M&&f.jsx(wO,{project:a,isPending:$.isPending,onCancel:()=>F(!1),onCreate:ae=>$.mutate(ae)})]})}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 l0({label:e,options:t,selected:n,onChange:a}){const s=Bt(),[o,c]=C.useState(!1),d=C.useRef(null);C.useEffect(()=>{if(!o)return;const g=x=>{var k;(k=d.current)!=null&&k.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 p=g=>{const v=new Set(n);v.has(g)?v.delete(g):v.add(g),a(v)},h=t.length===0,b=n.size;return f.jsxs("div",{ref:d,className:"relative",children:[f.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!h&&c(g=>!g),disabled:h,"aria-haspopup":"listbox","aria-expanded":o,"aria-label":s("board.filter.aria",{label:e}),children:[e,b>0&&f.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}),f.jsx(wc,{size:11,strokeWidth:3,className:["transition-transform",o?"rotate-180":""].join(" ")})]}),o&&f.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 f.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:[f.jsx("input",{type:"checkbox",checked:v,onChange:()=>p(g),className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:g})]},g)}),b>0&&f.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 qt("/api/workers/all")}function ZO(e){return qt(`/api/projects/${encodeURIComponent(e)}/workers`)}function JO(e,t){return qt(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function x1(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 o0(e,t){return x1(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function eD(e,t,n){return x1(`/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:f.jsx(It,{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:f.jsx(K2,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return f.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}){return e.length===0?f.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[f.jsx(lc,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),f.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:"全部 worker 健康"})]}):f.jsxs("section",{children:[f.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:[f.jsx(eA,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),f.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return f.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[f.jsx(mg,{state:a.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&f.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),f.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[f.jsx(YT,{size:10,strokeWidth:2.5}),gg(a.runtimeMs)]})]}),a.markerUpdatedAt&&f.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?"PID 已死。":`marker 停 ${bg(a.markerUpdatedAt)}。`})]},`${a.project}-${a.slot}`)})})]})}function iD({active:e,selected:t,onSelect:n}){return e.length===0?f.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"没有 worker 在运行。"})}):f.jsxs("section",{children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[f.jsx(zd,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),f.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return f.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(mg,{state:a.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),f.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${tD(a.runtimeMs)}`,children:gg(a.runtimeMs)})]}),a.card&&f.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),f.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&f.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&f.jsxs("span",{className:"ml-auto",children:["marker ",bg(a.markerUpdatedAt)]})]}),a.lastLogLine&&f.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:[f.jsx(uE,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function aD({capacity:e,selected:t,onSelect:n}){return e.length===0?null:f.jsxs("section",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),f.jsx("div",{className:"nb-card p-0 overflow-hidden",children:f.jsxs("table",{className:"w-full text-sm",children:[f.jsx("thead",{children:f.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[f.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"项目"}),f.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"占用"}),f.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),f.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"其它"}),f.jsx("th",{className:"px-3 py-2"})]})}),f.jsx("tbody",{children:e.map(a=>{const s=a.running+a.starting+a.stuck+a.crashed,o=(t==null?void 0:t.project)===a.project;return f.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",o?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[f.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),f.jsx("td",{className:"px-3 py-2",children:f.jsx(rD,{total:a.total,cap:a})}),f.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[f.jsx("span",{className:"text-[var(--color-running)] font-bold",children:a.running}),f.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.total]})]}),f.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[a.starting>0&&f.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&f.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&f.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),s===0&&f.jsx("span",{children:"idle"})]}),f.jsx("td",{className:"px-3 py-2 text-right",children:f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"详情 →"})})]},a.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 f.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>f.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:sD(a)},title:a},s)),f.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=lt({queryKey:["workers",e],queryFn:()=>ZO(e),refetchInterval:3e3}),s=((p=a.data)==null?void 0:p.data)??[],[o,c]=C.useState(null);C.useEffect(()=>{if(s.length===0){c(null);return}const h=s[0].slot;c(b=>b!=null&&s.some(g=>g.slot===b)?b:t!=null&&s.some(g=>g.slot===t)?t:h)},[e,t,s.length]);const d=s.find(h=>h.slot===o)??null;return f.jsxs("div",{className:"flex flex-col h-full",children:[f.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[f.jsxs("div",{className:"flex items-center justify-between mb-2",children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),f.jsx(hs,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"看板 →"})]}),a.isLoading&&s.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 workers…"}):s.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"该项目没有 worker slot。"}):f.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(h=>f.jsx(oD,{worker:h,active:h.slot===o,onClick:()=>c(h.slot)},h.slot))})]}),d?f.jsx(cD,{project:e,worker:d,onChange:n}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:f.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:s.length===0?"无 worker":"请选择一个 worker"})})]})}function oD({worker:e,active:t,onClick:n}){return f.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:[f.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[f.jsx(mg,{state:e.state}),f.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?f.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):f.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:"空闲"})]})}function cD({project:e,worker:t,onChange:n}){var h,b;const{confirm:a,alert:s}=oi(),o=t.state==="crashed"||t.state==="stuck",c=lt({queryKey:["worker-detail",e,t.slot],queryFn:()=>JO(e,t.slot),refetchInterval:3e3}),d=((h=c.data)==null?void 0:h.recentOutput)??[],p=((b=c.data)==null?void 0:b.recentLogs)??[];return f.jsxs(f.Fragment,{children:[f.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?f.jsxs("div",{children:[f.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:"当前卡片"}),f.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):f.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:"slot 空闲,没有当前卡片。"}),f.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"Stage"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),f.jsx("dt",{className:"font-bold",children:"PID"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),f.jsx("dt",{className:"font-bold",children:"Runtime"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:gg(t.runtimeMs)}),f.jsx("dt",{className:"font-bold",children:"Started"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),f.jsx("dt",{className:"font-bold",children:"Marker"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?bg(t.markerUpdatedAt):"—"})]}),f.jsxs("div",{children:[f.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[f.jsx(uE,{size:10,strokeWidth:2.5}),"Claude 输出 · 最近 ",d.length," 行"]}),c.isLoading&&d.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载中…"}):d.length===0?f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"还没收到 session 输出。Worker 刚启动时需要几秒。"}):f.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:d.map(g=>`${g.ts?`${g.ts} [${g.kind}] `:`[${g.kind}] `}${g.text}`).join(`
|
|
509
|
-
`)})]}),p.length>0&&f.jsxs("div",{children:[f.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:["Supervisor 心跳 · 最近 ",p.length," 行"]}),f.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(g=>`${g.ts??""} [${g.level}] ${g.msg}`).join(`
|
|
510
|
-
`)}),f.jsx(hs,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:"查看完整 log →"})]})]}),f.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[o&&t.card&&f.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`重启 worker-${t.slot}`,body:`先杀进程,再重新 launch 到 #${t.card.seq}`,confirm:"重启"})){try{await o0(e,t.slot)}catch{}try{await eD(e,t.slot,t.card.seq),n()}catch(v){s({title:"重启失败",body:v instanceof Error?v.message:String(v)})}}},children:[f.jsx(X2,{size:11,strokeWidth:2.5})," 重启"]}),t.state!=="idle"&&f.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`终止 worker-${t.slot}`,body:"当前任务强制中断。",confirm:"终止",danger:!0}))try{await o0(e,t.slot),n()}catch(v){s({title:"终止失败",body:v instanceof Error?v.message:String(v)})}},children:[f.jsx(sA,{size:11,strokeWidth:2.5})," 终止"]})]})]})}function uD(){var c;const e=Bt(),t=Kn(),[n,a]=C.useState(null),s=lt({queryKey:["workers-agg"],queryFn:XO,refetchInterval:5e3});C.useEffect(()=>{if(!s.data)return;const d=s.data.capacity.map(h=>h.project),p=[];for(const h of d){const b=new EventSource(`/stream/projects/${encodeURIComponent(h)}`),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),p.push(b)}return()=>{for(const h of p)h.close()}},[(c=s.data)==null?void 0:c.capacity.map(d=>d.project).join(","),t]);const o=C.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 p of s.data.capacity)d.running+=p.running,d.starting+=p.starting,d.stuck+=p.stuck,d.crashed+=p.crashed,d.idle+=p.idle;return d},[s.data]);return f.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:e("workers.title")}),f.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})})]}),f.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?f.jsx(It,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Al,{size:12,strokeWidth:2.5}),e("workers.refresh")]})]}),f.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[f.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[s.isLoading&&f.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:e("common.loading")}),s.isError&&f.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:f.jsx("p",{children:e("workers.error.load",{detail:s.error instanceof Error?s.error.message:String(s.error)})})}),s.data&&f.jsxs(f.Fragment,{children:[f.jsx(nD,{alerts:s.data.alerts,selected:n,onSelect:(d,p)=>a({project:d,slot:p})}),f.jsx(iD,{active:s.data.active,selected:n,onSelect:(d,p)=>a({project:d,slot:p})}),f.jsx(aD,{capacity:s.data.capacity,selected:n,onSelect:d=>a({project:d})})]})]}),f.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:n?f.jsx(lD,{project:n.project,initialSlot:n.slot,onChange:()=>t.invalidateQueries({queryKey:["workers-agg"]})}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:f.jsxs("div",{children:[f.jsx(zd,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),f.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),qt(`/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;const[e,t]=tE(),n=e.get("project"),a=e.get("worker")??"",[s,o]=C.useState([]),[c,d]=C.useState(!1),[p,h]=C.useState(!0),[b,g]=C.useState(()=>new Set(pD)),[v,x]=C.useState(""),[k,w]=C.useState("live"),[_,S]=C.useState(()=>{const L=new Date(Date.now()-36e5),Z=ie=>String(ie).padStart(2,"0");return`${L.getFullYear()}-${Z(L.getMonth()+1)}-${Z(L.getDate())}T${Z(L.getHours())}:${Z(L.getMinutes())}`}),j=C.useRef(null),A=!n,D=lt({queryKey:["projects"],queryFn:_r}),{data:U,refetch:M}=lt({queryKey:["logs",n??"agg",a,k,k==="history"?_:"live"],queryFn:()=>dD({project:n||void 0,worker:a||void 0,limit:k==="history"?2e3:500,since:k==="history"?new Date(_).toISOString():void 0}),refetchInterval:A&&k==="live"?5e3:!1});C.useEffect(()=>{U!=null&&U.data&&o(U.data)},[U]),C.useEffect(()=>{if(!n||k!=="live")return;const L=fD({project:n,worker:a||void 0}),Z=new EventSource(L);return Z.addEventListener("log.line",ie=>{if(!c)try{const xe=JSON.parse(ie.data);o(ue=>{const J=[...ue,xe];return J.length>5e3&&J.splice(0,J.length-5e3),J})}catch{}}),()=>Z.close()},[n,a,c,k]),C.useEffect(()=>{if(!p)return;const L=j.current;L&&(L.scrollTop=L.scrollHeight)},[s,p]);const F=C.useMemo(()=>{const L=v.toLowerCase();return s.filter(Z=>!(!b.has(Z.level)||L&&!Z.msg.toLowerCase().includes(L)))},[s,b,v]);return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[f.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),f.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[A?`全部项目(${(($=D.data)==null?void 0:$.data.length)??0})`:n,a&&` · worker-${a}`," · ",A&&k==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&f.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),f.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[f.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:[f.jsxs("button",{type:"button",onClick:()=>w("live"),"aria-pressed":k==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",k==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(sE,{size:11,strokeWidth:2.5}),"实时"]}),f.jsxs("button",{type:"button",onClick:()=>w("history"),"aria-pressed":k==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",k==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[f.jsx(p2,{size:11,strokeWidth:2.5}),"历史"]})]}),k==="history"&&f.jsxs(f.Fragment,{children:[f.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:_,onChange:L=>S(L.target.value),"aria-label":"查询起始时间"}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[f.jsx(Ed,{size:11,strokeWidth:3}),"查询"]})]}),f.jsxs("div",{className:"relative",children:[f.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)]"}),f.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:n??"",onChange:L=>{const Z=L.target.value;t(Z?{project:Z}:{})},"aria-label":"筛选项目",children:[f.jsx("option",{value:"",children:"全部项目"}),(ee=D.data)==null?void 0:ee.data.map(L=>f.jsx("option",{value:L.name,children:L.name},L.name))]}),f.jsx(wc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(Ed,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:v,onChange:L=>x(L.target.value),"aria-label":"过滤日志"})]}),f.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(L=>f.jsx(gD,{level:L,enabled:b.has(L),onToggle:()=>{g(Z=>{const ie=new Set(Z);return ie.has(L)?ie.delete(L):ie.add(L),ie})}},L))}),f.jsxs("div",{className:"ml-auto flex gap-2",children:[k==="live"&&f.jsxs(f.Fragment,{children:[f.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>h(L=>!L),type:"button",children:p?"✓ Auto-scroll":"Auto-scroll"}),f.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>d(L=>!L),type:"button",children:c?f.jsxs(f.Fragment,{children:[f.jsx(Xm,{size:12,strokeWidth:3})," Resume"]}):f.jsxs(f.Fragment,{children:[f.jsx(D2,{size:12,strokeWidth:3})," Pause"]})})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const L=new Blob([F.map(xe=>xe.raw).join(`
|
|
511
|
-
`)],{type:"text/plain"}),Z=URL.createObjectURL(L),ie=document.createElement("a");ie.href=Z,ie.download=`${n}-log-${Date.now()}.log`,ie.click(),URL.revokeObjectURL(Z)},type:"button",children:[f.jsx(aE,{size:12,strokeWidth:2.5})," Export"]})]})]}),f.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[f.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:[f.jsx("span",{className:"text-[var(--color-text-muted)]",children:(U==null?void 0:U.file)??"~/.coral/projects/.../logs/*.log"}),k==="live"?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):f.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),f.jsxs("div",{ref:j,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:L=>{const Z=L.currentTarget;!(Z.scrollHeight-Z.scrollTop-Z.clientHeight<40)&&p&&h(!1)},children:[F.map((L,Z)=>f.jsx(bD,{line:L},Z)),F.length===0&&f.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}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 f.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 f.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:[f.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&&f.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),f.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),f.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 c0(e,t){return(wD.jsx?vD:xD).test(e)}const ED=/[ \t\n\f\r]/g;function kD(e){return typeof e=="object"?e.type==="text"?u0(e.value):!1:u0(e)}function u0(e){return e.replace(ED,"")===""}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 v1(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 Em(e){return e.toLowerCase()}class Gn{constructor(t,n){this.attribute=n,this.property=t}}Gn.prototype.attribute="";Gn.prototype.booleanish=!1;Gn.prototype.boolean=!1;Gn.prototype.commaOrSpaceSeparated=!1;Gn.prototype.commaSeparated=!1;Gn.prototype.defined=!1;Gn.prototype.mustUseProperty=!1;Gn.prototype.number=!1;Gn.prototype.overloadedBoolean=!1;Gn.prototype.property="";Gn.prototype.spaceSeparated=!1;Gn.prototype.space=void 0;let SD=0;const He=gs(),tn=gs(),km=gs(),me=gs(),_t=gs(),gl=gs(),ii=gs();function gs(){return 2**++SD}const Sm=Object.freeze(Object.defineProperty({__proto__:null,boolean:He,booleanish:tn,commaOrSpaceSeparated:ii,commaSeparated:gl,number:me,overloadedBoolean:km,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),Cp=Object.keys(Sm);class yg extends Gn{constructor(t,n,a,s){let o=-1;if(super(t,n),d0(this,"space",s),typeof a=="number")for(;++o<Cp.length;){const c=Cp[o];d0(this,Cp[o],(a&Sm[c])===Sm[c])}}}yg.prototype.defined=!0;function d0(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[Em(a)]=a,n[Em(o.attribute)]=a}return new Nc(t,n,e.space)}const w1=Kl({properties:{ariaActiveDescendant:null,ariaAtomic:tn,ariaAutoComplete:null,ariaBusy:tn,ariaChecked:tn,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:tn,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:tn,ariaFlowTo:_t,ariaGrabbed:tn,ariaHasPopup:null,ariaHidden:tn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:me,ariaLive:null,ariaModal:tn,ariaMultiLine:tn,ariaMultiSelectable:tn,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:tn,ariaReadOnly:tn,ariaRelevant:null,ariaRequired:tn,ariaRoleDescription:_t,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:tn,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function E1(e,t){return t in e?e[t]:t}function k1(e,t){return E1(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:_t,accessKey:_t,action:null,allow:null,allowFullScreen:He,allowPaymentRequest:He,allowUserMedia:He,alt:null,as:null,async:He,autoCapitalize:null,autoComplete:_t,autoFocus:He,autoPlay:He,blocking:_t,capture:null,charSet:null,checked:He,cite:null,className:_t,cols:me,colSpan:null,content:null,contentEditable:tn,controls:He,controlsList:_t,coords:me|gl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:He,defer:He,dir:null,dirName:null,disabled:He,download:km,draggable:tn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:He,formTarget:null,headers:_t,height:me,hidden:km,high:me,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:He,inputMode:null,integrity:null,is:null,isMap:He,itemId:null,itemProp:_t,itemRef:_t,itemScope:He,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:He,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:He,muted:He,name:null,nonce:null,noModule:He,noValidate:He,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:He,optimum:me,pattern:null,ping:_t,placeholder:null,playsInline:He,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:He,referrerPolicy:null,rel:_t,required:He,reversed:He,rows:me,rowSpan:me,sandbox:_t,scope:null,scoped:He,seamless:He,selected:He,shadowRootClonable:He,shadowRootDelegatesFocus:He,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:tn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:He,useMap:null,value:tn,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:_t,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:He,declare:He,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:He,noHref:He,noShade:He,noWrap:He,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:tn,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:He,disableRemotePlayback:He,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:k1}),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:ii,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:_t,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:He,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:ii,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,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:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:_t,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ii,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ii,rev:ii,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ii,requiredFeatures:ii,requiredFonts:ii,requiredFormats:ii,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:ii,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ii,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ii,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:E1}),S1=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()}}),_1=Kl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:k1}),N1=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,f0=/-[a-z]/g,AD=/^data[-\w.:]+$/i;function jD(e,t){const n=Em(t);let a=t,s=Gn;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(f0,DD);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!f0.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 RD=v1([w1,_D,S1,_1,N1],"html"),xg=v1([w1,ND,S1,_1,N1],"svg");function MD(e){return e.join(" ").trim()}var rl={},Tp,h0;function LD(){if(h0)return Tp;h0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,d=/^\s+|\s+$/g,p=`
|
|
512
|
-
`,h="/",b="*",g="",v="comment",x="declaration";function k(_,S){if(typeof _!="string")throw new TypeError("First argument must be a string");if(!_)return[];S=S||{};var j=1,A=1;function D(ue){var J=ue.match(t);J&&(j+=J.length);var H=ue.lastIndexOf(p);A=~H?ue.length-H:A+ue.length}function U(){var ue={line:j,column:A};return function(J){return J.position=new M(ue),ee(),J}}function M(ue){this.start=ue,this.end={line:j,column:A},this.source=S.source}M.prototype.content=_;function F(ue){var J=new Error(S.source+":"+j+":"+A+": "+ue);if(J.reason=ue,J.filename=S.source,J.line=j,J.column=A,J.source=_,!S.silent)throw J}function $(ue){var J=ue.exec(_);if(J){var H=J[0];return D(H),_=_.slice(H.length),J}}function ee(){$(n)}function L(ue){var J;for(ue=ue||[];J=Z();)J!==!1&&ue.push(J);return ue}function Z(){var ue=U();if(!(h!=_.charAt(0)||b!=_.charAt(1))){for(var J=2;g!=_.charAt(J)&&(b!=_.charAt(J)||h!=_.charAt(J+1));)++J;if(J+=2,g===_.charAt(J-1))return F("End of comment missing");var H=_.slice(2,J-2);return A+=2,D(H),_=_.slice(J),A+=2,ue({type:v,comment:H})}}function ie(){var ue=U(),J=$(a);if(J){if(Z(),!$(s))return F("property missing ':'");var H=$(o),ce=ue({type:x,property:w(J[0].replace(e,g)),value:H?w(H[0].replace(e,g)):g});return $(c),ce}}function xe(){var ue=[];L(ue);for(var J;J=ie();)J!==!1&&(ue.push(J),L(ue));return ue}return ee(),xe()}function w(_){return _?_.replace(d,g):g}return Tp=k,Tp}var p0;function ID(){if(p0)return rl;p0=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(p=>{if(p.type!=="declaration")return;const{property:h,value:b}=p;d?s(h,b,p):b&&(o=o||{},o[h]=b)}),o}return rl}var Go={},m0;function zD(){if(m0)return Go;m0=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(h){return!h||n.test(h)||e.test(h)},c=function(h,b){return b.toUpperCase()},d=function(h,b){return"".concat(b,"-")},p=function(h,b){return b===void 0&&(b={}),o(h)?h:(h=h.toLowerCase(),b.reactCompat?h=h.replace(s,d):h=h.replace(a,d),h.replace(t,c))};return Go.camelCase=p,Go}var Yo,g0;function BD(){if(g0)return Yo;g0=1;var e=Yo&&Yo.__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,p){d&&p&&(c[(0,n.camelCase)(d,o)]=p)}),c}return a.default=a,Yo=a,Yo}var UD=BD();const PD=Lm(UD),C1=T1("end"),vg=T1("start");function T1(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=C1(e);if(t&&n)return{start:t,end:n}}function ec(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?b0(e.position):"start"in e||"end"in e?b0(e):"line"in e||"column"in e?_m(e):""}function _m(e){return y0(e&&e.line)+":"+y0(e&&e.column)}function b0(e){return _m(e&&e.start)+"-"+_m(e&&e.end)}function y0(e){return e&&typeof e=="number"?e:1}class vn 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 p=a.indexOf(":");p===-1?o.ruleId=a:(o.source=a.slice(0,p),o.ruleId=a.slice(p+1))}if(!o.place&&o.ancestors&&o.ancestors){const p=o.ancestors[o.ancestors.length-1];p&&(o.place=p.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}}vn.prototype.file="";vn.prototype.name="";vn.prototype.reason="";vn.prototype.message="";vn.prototype.stack="";vn.prototype.column=void 0;vn.prototype.line=void 0;vn.prototype.ancestors=void 0;vn.prototype.cause=void 0;vn.prototype.fatal=void 0;vn.prototype.place=void 0;vn.prototype.ruleId=void 0;vn.prototype.source=void 0;const wg={}.hasOwnProperty,$D=new Map,qD=/[A-Z]/g,HD=new Set(["table","tbody","thead","tfoot","tr"]),KD=new Set(["td","th"]),A1="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=eR(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:RD,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=j1(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function j1(e,t,n){if(t.type==="element")return YD(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return QD(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 YD(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=D1(e,t.tagName,!1),c=tR(e,t);let d=kg(e,t);return HD.has(t.tagName)&&(d=d.filter(function(p){return typeof p=="string"?!kD(p):!0})),O1(e,c,o,t),Eg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function QD(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:D1(e,t.name,!0),c=nR(e,t),d=kg(e,t);return O1(e,c,o,t),Eg(c,d),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function XD(e,t,n){const a={};return Eg(a,kg(e,t)),e.create(t,e.Fragment,a,n)}function ZD(e,t){return t.value}function O1(e,t,n,a){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=a)}function Eg(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 h=Array.isArray(c.children)?n:t;return d?h(o,c,d):h(o,c)}}function eR(e,t){return n;function n(a,s,o,c){const d=Array.isArray(o.children),p=vg(a);return t(s,o,c,d,{columnNumber:p?p.column-1:void 0,fileName:e,lineNumber:p?p.line:void 0},void 0)}}function tR(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&wg.call(t.properties,s)){const o=iR(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 nR(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 kg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:$D;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const p=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(p){const h=s.get(p)||0;c=p+"-"+h,s.set(p,h+1)}}const d=j1(e,o,c);d!==void 0&&n.push(d)}return n}function iR(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):MD(n)),a.property==="style"){let s=typeof n=="object"?n:aR(e,String(n));return e.stylePropertyNameCase==="css"&&(s=rR(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?CD[a.property]||a.property:a.attribute,n]}}function aR(e,t){try{return PD(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new vn("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=A1+"#cannot-parse-style-attribute",s}}function D1(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=c0(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=c0(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 vn("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=A1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function rR(e){const t={};let n;for(n in e)wg.call(e,n)&&(t[sR(n)]=e[n]);return t}function sR(e){let t=e.replace(qD,lR);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function lR(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"]},oR={};function Sg(e,t){const n=oR,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return R1(e,a,s)}function R1(e,t,n){if(cR(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 x0(e.children,t,n)}return Array.isArray(e)?x0(e,t,n):""}function x0(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=R1(e[s],t,n);return a.join("")}function cR(e){return!!(e&&typeof e=="object")}const v0=document.createElement("i");function _g(e){const t="&"+e+";";v0.innerHTML=t;const n=v0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function si(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 Ei(e,t){return e.length>0?(si(e,e.length,0,t),e):t}const w0={}.hasOwnProperty;function M1(e){const t={};let n=-1;for(;++n<e.length;)uR(t,e[n]);return t}function uR(e,t){let n;for(n in t){const s=(w0.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){w0.call(s,c)||(s[c]=[]);const d=o[c];dR(s[c],Array.isArray(d)?d:d?[d]:[])}}}function dR(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);si(e,0,0,a)}function L1(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 An=Cr(/[A-Za-z]/),yn=Cr(/[\dA-Za-z]/),fR=Cr(/[#-'*+\--9=?A-Z^-~]/);function Cd(e){return e!==null&&(e<32||e===127)}const Nm=Cr(/\d/),hR=Cr(/[\dA-Fa-f]/),pR=Cr(/[!-/:-@[-`{-~]/);function De(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function Ve(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&&yn(e.charCodeAt(n+1))&&yn(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 nt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(p){return Ve(p)?(e.enter(n),d(p)):t(p)}function d(p){return Ve(p)&&o++<s?(e.consume(p),d):(e.exit(n),t(p))}}const mR={tokenize:gR};function gR(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"),nt(e,t,"linePrefix")}function s(d){return e.enter("paragraph"),o(d)}function o(d){const p=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=p),n=p,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 bR={tokenize:yR},E0={tokenize:xR};function yR(e){const t=this,n=[];let a=0,s,o,c;return d;function d(A){if(a<n.length){const D=n[a];return t.containerState=D[1],e.attempt(D[0].continuation,p,h)(A)}return h(A)}function p(A){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&j();const D=t.events.length;let U=D,M;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){M=t.events[U][1].end;break}S(a);let F=D;for(;F<t.events.length;)t.events[F][1].end={...M},F++;return si(t.events,U+1,0,t.events.slice(D)),t.events.length=F,h(A)}return d(A)}function h(A){if(a===n.length){if(!s)return v(A);if(s.currentConstruct&&s.currentConstruct.concrete)return k(A);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(E0,b,g)(A)}function b(A){return s&&j(),S(a),v(A)}function g(A){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,k(A)}function v(A){return t.containerState={},e.attempt(E0,x,k)(A)}function x(A){return a++,n.push([t.currentConstruct,t.containerState]),v(A)}function k(A){if(A===null){s&&j(),S(0),e.consume(A);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(A)}function w(A){if(A===null){_(e.exit("chunkFlow"),!0),S(0),e.consume(A);return}return De(A)?(e.consume(A),_(e.exit("chunkFlow")),a=0,t.interrupt=void 0,d):(e.consume(A),w)}function _(A,D){const U=t.sliceStream(A);if(D&&U.push(null),A.previous=o,o&&(o.next=A),o=A,s.defineSkip(A.start),s.write(U),t.parser.lazy[A.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 F=t.events.length;let $=F,ee,L;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){if(ee){L=t.events[$][1].end;break}ee=!0}for(S(a),M=F;M<t.events.length;)t.events[M][1].end={...L},M++;si(t.events,$+1,0,t.events.slice(F)),t.events.length=M}}function S(A){let D=n.length;for(;D-- >A;){const U=n[D];t.containerState=U[1],U[0].exit.call(t,e)}n.length=A}function j(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function xR(e,t,n){return nt(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||Et(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:vR,tokenize:wR};function vR(e,t){let n=-1,a,s,o,c,d,p,h,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;p=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};k0(g,-p),k0(v,p),c={type:p>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},d={type:p>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:v},o={type:p>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:p>1?"strong":"emphasis",start:{...c.start},end:{...d.end}},e[a][1].end={...c.start},e[n][1].start={...d.end},h=[],e[a][1].end.offset-e[a][1].start.offset&&(h=Ei(h,[["enter",e[a][1],t],["exit",e[a][1],t]])),h=Ei(h,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),h=Ei(h,tf(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),h=Ei(h,[["exit",o,t],["enter",d,t],["exit",d,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,h=Ei(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,si(e,a-1,n-a+3,h),n=a+h.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function wR(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Dl(a);let o;return c;function c(p){return o=p,e.enter("attentionSequence"),d(p)}function d(p){if(p===o)return e.consume(p),d;const h=e.exit("attentionSequence"),b=Dl(p),g=!b||b===2&&s||n.includes(p),v=!s||s===2&&b||n.includes(a);return h._open=!!(o===42?g:g&&(s||!v)),h._close=!!(o===42?v:v&&(b||!g)),t(p)}}function k0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const ER={name:"autolink",tokenize:kR};function kR(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 An(x)?(e.consume(x),c):x===64?n(x):h(x)}function c(x){return x===43||x===45||x===46||yn(x)?(a=1,d(x)):h(x)}function d(x){return x===58?(e.consume(x),a=0,p):(x===43||x===45||x===46||yn(x))&&a++<32?(e.consume(x),d):(a=0,h(x))}function p(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),p)}function h(x){return x===64?(e.consume(x),b):fR(x)?(e.consume(x),h):n(x)}function b(x){return yn(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||yn(x))&&a++<63){const k=x===45?v:g;return e.consume(x),k}return n(x)}}const Cc={partial:!0,tokenize:SR};function SR(e,t,n){return a;function a(o){return Ve(o)?nt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||De(o)?t(o):n(o)}}const I1={continuation:{tokenize:NR},exit:CR,name:"blockQuote",tokenize:_R};function _R(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 Ve(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function NR(e,t,n){const a=this;return s;function s(c){return Ve(c)?nt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(I1,t,n)(c)}}function CR(e){e.exit("blockQuote")}const z1={name:"characterEscape",tokenize:TR};function TR(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 pR(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const B1={name:"characterReference",tokenize:AR};function AR(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"),p}function p(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),o=31,c=yn,b(g))}function h(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=hR,b):(e.enter("characterReferenceValue"),o=7,c=Nm,b(g))}function b(g){if(g===59&&s){const v=e.exit("characterReferenceValue");return c===yn&&!_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 S0={partial:!0,tokenize:OR},_0={concrete:!0,name:"codeFenced",tokenize:jR};function jR(e,t,n){const a=this,s={partial:!0,tokenize:U};let o=0,c=0,d;return p;function p(M){return h(M)}function h(M){const F=a.events[a.events.length-1];return o=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[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"),Ve(M)?nt(e,g,"whitespace")(M):g(M))}function g(M){return M===null||De(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(S0,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)):Ve(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(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"}),k(M))}function k(M){return M===null||De(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===d?n(M):(e.consume(M),k)}function w(M){return e.attempt(s,D,_)(M)}function _(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),S}function S(M){return o>0&&Ve(M)?nt(e,j,"linePrefix",o+1)(M):j(M)}function j(M){return M===null||De(M)?e.check(S0,w,D)(M):(e.enter("codeFlowValue"),A(M))}function A(M){return M===null||De(M)?(e.exit("codeFlowValue"),j(M)):(e.consume(M),A)}function D(M){return e.exit("codeFenced"),t(M)}function U(M,F,$){let ee=0;return L;function L(J){return M.enter("lineEnding"),M.consume(J),M.exit("lineEnding"),Z}function Z(J){return M.enter("codeFencedFence"),Ve(J)?nt(M,ie,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(J):ie(J)}function ie(J){return J===d?(M.enter("codeFencedFenceSequence"),xe(J)):$(J)}function xe(J){return J===d?(ee++,M.consume(J),xe):ee>=c?(M.exit("codeFencedFenceSequence"),Ve(J)?nt(M,ue,"whitespace")(J):ue(J)):$(J)}function ue(J){return J===null||De(J)?(M.exit("codeFencedFence"),F(J)):$(J)}}}function OR(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:RR},DR={partial:!0,tokenize:MR};function RR(e,t,n){const a=this;return s;function s(h){return e.enter("codeIndented"),nt(e,o,"linePrefix",5)(h)}function o(h){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(h):n(h)}function c(h){return h===null?p(h):De(h)?e.attempt(DR,c,p)(h):(e.enter("codeFlowValue"),d(h))}function d(h){return h===null||De(h)?(e.exit("codeFlowValue"),c(h)):(e.consume(h),d)}function p(h){return e.exit("codeIndented"),t(h)}}function MR(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):nt(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 LR={name:"codeText",previous:zR,resolve:IR,tokenize:BR};function IR(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 zR(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function BR(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"),p(g))}function p(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),p):g===96?(o=e.enter("codeTextSequence"),s=0,b(g)):De(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),p):(e.enter("codeTextData"),h(g))}function h(g){return g===null||g===32||g===96||De(g)?(e.exit("codeTextData"),p(g)):(e.consume(g),h)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",h(g))}}class UR{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const a=n??Number.POSITIVE_INFINITY;return a<this.left.length?this.left.slice(t,a):t>this.left.length?this.right.slice(this.right.length-a+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-a+this.left.length).reverse())}splice(t,n,a){const s=n||0;this.setCursor(Math.trunc(t));const o=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return a&&Qo(this.left,a),o.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Qo(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Qo(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Qo(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Qo(this.left,n.reverse())}}}function Qo(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function U1(e){const t={};let n=-1,a,s,o,c,d,p,h;const b=new UR(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"&&(p=a[1]._tokenizer.events,o=0,o<p.length&&p[o][1].type==="lineEndingBlank"&&(o+=2),o<p.length&&p[o][1].type==="content"))for(;++o<p.length&&p[o][1].type!=="content";)p[o][1].type==="chunkText"&&(p[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,PR(b,n)),n=t[n],h=!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 si(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!h}function PR(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,p=[],h={};let b,g,v=-1,x=n,k=0,w=0;const _=[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,_.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):_.pop(),v=_.length;v--;){const S=d.slice(_[v],_[v+1]),j=o.pop();p.push([j,j+S.length-1]),e.splice(j,2,S)}for(p.reverse(),v=-1;++v<p.length;)h[k+p[v][0]]=k+p[v][1],k+=p[v][1]-p[v][0]-1;return h}const FR={resolve:qR,tokenize:HR},$R={partial:!0,tokenize:KR};function qR(e){return U1(e),e}function HR(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($R,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 KR(e,t,n){const a=this;return s;function s(c){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(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 P1(e,t,n,a,s,o,c,d,p){const h=p||Number.POSITIVE_INFINITY;let b=0;return g;function g(S){return S===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(S),e.exit(o),v):S===null||S===32||S===41||Cd(S)?n(S):(e.enter(a),e.enter(c),e.enter(d),e.enter("chunkString",{contentType:"string"}),w(S))}function v(S){return S===62?(e.enter(o),e.consume(S),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),x(S))}function x(S){return S===62?(e.exit("chunkString"),e.exit(d),v(S)):S===null||S===60||De(S)?n(S):(e.consume(S),S===92?k:x)}function k(S){return S===60||S===62||S===92?(e.consume(S),x):x(S)}function w(S){return!b&&(S===null||S===41||Et(S))?(e.exit("chunkString"),e.exit(d),e.exit(c),e.exit(a),t(S)):b<h&&S===40?(e.consume(S),b++,w):S===41?(e.consume(S),b--,w):S===null||S===32||S===40||Cd(S)?n(S):(e.consume(S),S===92?_:w)}function _(S){return S===40||S===41||S===92?(e.consume(S),w):w(S)}}function F1(e,t,n,a,s,o){const c=this;let d=0,p;return h;function h(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&&!p||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),p||(p=!Ve(x)),x===92?v:g)}function v(x){return x===91||x===92||x===93?(e.consume(x),d++,g):g(x)}}function $1(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,p):n(v)}function p(v){return v===c?(e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):(e.enter(o),h(v))}function h(v){return v===c?(e.exit(o),p(c)):v===null?n(v):De(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),nt(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===c||v===null||De(v)?(e.exit("chunkString"),h(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):Ve(s)?nt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const GR={name:"definition",tokenize:QR},YR={partial:!0,tokenize:VR};function QR(e,t,n){const a=this;let s;return o;function o(x){return e.enter("definition"),c(x)}function c(x){return F1.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"),p):n(x)}function p(x){return Et(x)?tc(e,h)(x):h(x)}function h(x){return P1(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(x)}function b(x){return e.attempt(YR,g,g)(x)}function g(x){return Ve(x)?nt(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 VR(e,t,n){return a;function a(d){return Et(d)?tc(e,s)(d):n(d)}function s(d){return $1(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function o(d){return Ve(d)?nt(e,c,"whitespace")(d):c(d)}function c(d){return d===null||De(d)?t(d):n(d)}}const WR={name:"hardBreakEscape",tokenize:XR};function XR(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 ZR={name:"headingAtx",resolve:JR,tokenize:eM};function JR(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"},si(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function eM(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||Et(b)?(e.exit("atxHeadingSequence"),d(b)):n(b)}function d(b){return b===35?(e.enter("atxHeadingSequence"),p(b)):b===null||De(b)?(e.exit("atxHeading"),t(b)):Ve(b)?nt(e,d,"whitespace")(b):(e.enter("atxHeadingText"),h(b))}function p(b){return b===35?(e.consume(b),p):(e.exit("atxHeadingSequence"),d(b))}function h(b){return b===null||b===35||Et(b)?(e.exit("atxHeadingText"),d(b)):(e.consume(b),h)}}const tM=["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"],N0=["pre","script","style","textarea"],nM={concrete:!0,name:"htmlFlow",resolveTo:rM,tokenize:sM},iM={partial:!0,tokenize:oM},aM={partial:!0,tokenize:lM};function rM(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 sM(e,t,n){const a=this;let s,o,c,d,p;return h;function h(T){return b(T)}function b(T){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(T),g}function g(T){return T===33?(e.consume(T),v):T===47?(e.consume(T),o=!0,w):T===63?(e.consume(T),s=3,a.interrupt?t:O):An(T)?(e.consume(T),c=String.fromCharCode(T),_):n(T)}function v(T){return T===45?(e.consume(T),s=2,x):T===91?(e.consume(T),s=5,d=0,k):An(T)?(e.consume(T),s=4,a.interrupt?t:O):n(T)}function x(T){return T===45?(e.consume(T),a.interrupt?t:O):n(T)}function k(T){const be="CDATA[";return T===be.charCodeAt(d++)?(e.consume(T),d===be.length?a.interrupt?t:ie:k):n(T)}function w(T){return An(T)?(e.consume(T),c=String.fromCharCode(T),_):n(T)}function _(T){if(T===null||T===47||T===62||Et(T)){const be=T===47,W=c.toLowerCase();return!be&&!o&&N0.includes(W)?(s=1,a.interrupt?t(T):ie(T)):tM.includes(c.toLowerCase())?(s=6,be?(e.consume(T),S):a.interrupt?t(T):ie(T)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(T):o?j(T):A(T))}return T===45||yn(T)?(e.consume(T),c+=String.fromCharCode(T),_):n(T)}function S(T){return T===62?(e.consume(T),a.interrupt?t:ie):n(T)}function j(T){return Ve(T)?(e.consume(T),j):L(T)}function A(T){return T===47?(e.consume(T),L):T===58||T===95||An(T)?(e.consume(T),D):Ve(T)?(e.consume(T),A):L(T)}function D(T){return T===45||T===46||T===58||T===95||yn(T)?(e.consume(T),D):U(T)}function U(T){return T===61?(e.consume(T),M):Ve(T)?(e.consume(T),U):A(T)}function M(T){return T===null||T===60||T===61||T===62||T===96?n(T):T===34||T===39?(e.consume(T),p=T,F):Ve(T)?(e.consume(T),M):$(T)}function F(T){return T===p?(e.consume(T),p=null,ee):T===null||De(T)?n(T):(e.consume(T),F)}function $(T){return T===null||T===34||T===39||T===47||T===60||T===61||T===62||T===96||Et(T)?U(T):(e.consume(T),$)}function ee(T){return T===47||T===62||Ve(T)?A(T):n(T)}function L(T){return T===62?(e.consume(T),Z):n(T)}function Z(T){return T===null||De(T)?ie(T):Ve(T)?(e.consume(T),Z):n(T)}function ie(T){return T===45&&s===2?(e.consume(T),H):T===60&&s===1?(e.consume(T),ce):T===62&&s===4?(e.consume(T),R):T===63&&s===3?(e.consume(T),O):T===93&&s===5?(e.consume(T),ae):De(T)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(iM,Q,xe)(T)):T===null||De(T)?(e.exit("htmlFlowData"),xe(T)):(e.consume(T),ie)}function xe(T){return e.check(aM,ue,Q)(T)}function ue(T){return e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),J}function J(T){return T===null||De(T)?xe(T):(e.enter("htmlFlowData"),ie(T))}function H(T){return T===45?(e.consume(T),O):ie(T)}function ce(T){return T===47?(e.consume(T),c="",de):ie(T)}function de(T){if(T===62){const be=c.toLowerCase();return N0.includes(be)?(e.consume(T),R):ie(T)}return An(T)&&c.length<8?(e.consume(T),c+=String.fromCharCode(T),de):ie(T)}function ae(T){return T===93?(e.consume(T),O):ie(T)}function O(T){return T===62?(e.consume(T),R):T===45&&s===2?(e.consume(T),O):ie(T)}function R(T){return T===null||De(T)?(e.exit("htmlFlowData"),Q(T)):(e.consume(T),R)}function Q(T){return e.exit("htmlFlow"),t(T)}}function lM(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 oM(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Cc,t,n)}}const cM={name:"htmlText",tokenize:uM};function uM(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),p}function p(O){return O===33?(e.consume(O),h):O===47?(e.consume(O),U):O===63?(e.consume(O),A):An(O)?(e.consume(O),$):n(O)}function h(O){return O===45?(e.consume(O),b):O===91?(e.consume(O),o=0,k):An(O)?(e.consume(O),j):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?H(O):O===45?v(O):g(O)}function k(O){const R="CDATA[";return O===R.charCodeAt(o++)?(e.consume(O),o===R.length?w:k):n(O)}function w(O){return O===null?n(O):O===93?(e.consume(O),_):De(O)?(c=w,ce(O)):(e.consume(O),w)}function _(O){return O===93?(e.consume(O),S):w(O)}function S(O){return O===62?H(O):O===93?(e.consume(O),S):w(O)}function j(O){return O===null||O===62?H(O):De(O)?(c=j,ce(O)):(e.consume(O),j)}function A(O){return O===null?n(O):O===63?(e.consume(O),D):De(O)?(c=A,ce(O)):(e.consume(O),A)}function D(O){return O===62?H(O):A(O)}function U(O){return An(O)?(e.consume(O),M):n(O)}function M(O){return O===45||yn(O)?(e.consume(O),M):F(O)}function F(O){return De(O)?(c=F,ce(O)):Ve(O)?(e.consume(O),F):H(O)}function $(O){return O===45||yn(O)?(e.consume(O),$):O===47||O===62||Et(O)?ee(O):n(O)}function ee(O){return O===47?(e.consume(O),H):O===58||O===95||An(O)?(e.consume(O),L):De(O)?(c=ee,ce(O)):Ve(O)?(e.consume(O),ee):H(O)}function L(O){return O===45||O===46||O===58||O===95||yn(O)?(e.consume(O),L):Z(O)}function Z(O){return O===61?(e.consume(O),ie):De(O)?(c=Z,ce(O)):Ve(O)?(e.consume(O),Z):ee(O)}function ie(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),s=O,xe):De(O)?(c=ie,ce(O)):Ve(O)?(e.consume(O),ie):(e.consume(O),ue)}function xe(O){return O===s?(e.consume(O),s=void 0,J):O===null?n(O):De(O)?(c=xe,ce(O)):(e.consume(O),xe)}function ue(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Et(O)?ee(O):(e.consume(O),ue)}function J(O){return O===47||O===62||Et(O)?ee(O):n(O)}function H(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 Ve(O)?nt(e,ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):ae(O)}function ae(O){return e.enter("htmlTextData"),c(O)}}const Ng={name:"labelEnd",resolveAll:pM,resolveTo:mM,tokenize:gM},dM={tokenize:bM},fM={tokenize:yM},hM={tokenize:xM};function pM(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&&si(e,0,e.length,n),e}function mM(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 p={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},h={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",p,t],["enter",h,t]],d=Ei(d,e.slice(o+1,o+a+3)),d=Ei(d,[["enter",b,t]]),d=Ei(d,tf(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),d=Ei(d,[["exit",b,t],e[c-2],e[c-1],["exit",h,t]]),d=Ei(d,e.slice(c+1)),d=Ei(d,[["exit",p,t]]),si(e,o,e.length,d),e}function gM(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"),p):n(v)}function p(v){return v===40?e.attempt(dM,b,c?b:g)(v):v===91?e.attempt(fM,b,c?h:g)(v):c?b(v):g(v)}function h(v){return e.attempt(hM,b,g)(v)}function b(v){return t(v)}function g(v){return o._balanced=!0,n(v)}}function bM(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 Et(g)?tc(e,o)(g):o(g)}function o(g){return g===41?b(g):P1(e,c,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Et(g)?tc(e,p)(g):b(g)}function d(g){return n(g)}function p(g){return g===34||g===39||g===40?$1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function h(g){return Et(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 yM(e,t,n){const a=this;return s;function s(d){return F1.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 xM(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 vM={name:"labelStartImage",resolveAll:Ng.resolveAll,tokenize:wM};function wM(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 EM={name:"labelStartLink",resolveAll:Ng.resolveAll,tokenize:kM};function kM(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:SM};function SM(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const bd={name:"thematicBreak",tokenize:_M};function _M(e,t,n){let a=0,s;return o;function o(h){return e.enter("thematicBreak"),c(h)}function c(h){return s=h,d(h)}function d(h){return h===s?(e.enter("thematicBreakSequence"),p(h)):a>=3&&(h===null||De(h))?(e.exit("thematicBreak"),t(h)):n(h)}function p(h){return h===s?(e.consume(h),a++,p):(e.exit("thematicBreakSequence"),Ve(h)?nt(e,d,"whitespace")(h):d(h))}}const Pn={continuation:{tokenize:AM},exit:OM,name:"list",tokenize:TM},NM={partial:!0,tokenize:DM},CM={partial:!0,tokenize:jM};function TM(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 k=a.containerState.type||(x===42||x===43||x===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!a.containerState.marker||x===a.containerState.marker:Nm(x)){if(a.containerState.type||(a.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),x===42||x===45?e.check(bd,n,h)(x):h(x);if(!a.interrupt||x===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),p(x)}return n(x)}function p(x){return Nm(x)&&++c<10?(e.consume(x),p):(!a.interrupt||c<2)&&(a.containerState.marker?x===a.containerState.marker:x===41||x===46)?(e.exit("listItemValue"),h(x)):n(x)}function h(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(NM,v,g))}function b(x){return a.containerState.initialBlankLine=!0,o++,v(x)}function g(x){return Ve(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 AM(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,nt(e,t,"listItemIndent",a.containerState.size+1)(d)}function o(d){return a.containerState.furtherBlankLines||!Ve(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(CM,t,c)(d))}function c(d){return a.containerState._closeFlow=!0,a.interrupt=void 0,nt(e,e.attempt(Pn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function jM(e,t,n){const a=this;return nt(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 OM(e){e.exit(this.containerState.type)}function DM(e,t,n){const a=this;return nt(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!Ve(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const C0={name:"setextUnderline",resolveTo:RM,tokenize:MM};function RM(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 MM(e,t,n){const a=this;let s;return o;function o(h){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=h,c(h)):n(h)}function c(h){return e.enter("setextHeadingLineSequence"),d(h)}function d(h){return h===s?(e.consume(h),d):(e.exit("setextHeadingLineSequence"),Ve(h)?nt(e,p,"lineSuffix")(h):p(h))}function p(h){return h===null||De(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const LM={tokenize:IM};function IM(e){const t=this,n=e.attempt(Cc,a,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(FR,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 zM={resolveAll:H1()},BM=q1("string"),UM=q1("text");function q1(e){return{resolveAll:H1(e==="text"?PM: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 h(b)?o(b):d(b)}function d(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),p}function p(b){return h(b)?(n.exit("data"),o(b)):(n.consume(b),p)}function h(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 H1(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 PM(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,p;for(;o--;){const h=s[o];if(typeof h=="string"){for(c=h.length;h.charCodeAt(c-1)===32;)d++,c--;if(c)break;c=-1}else if(h===-2)p=!0,d++;else if(h!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(d=0),d){const h={type:n===e.length||p||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={...h.start},a.start.offset===a.end.offset?Object.assign(a,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const FM={42:Pn,43:Pn,45:Pn,48:Pn,49:Pn,50:Pn,51:Pn,52:Pn,53:Pn,54:Pn,55:Pn,56:Pn,57:Pn,62:I1},$M={91:GR},qM={[-2]:jp,[-1]:jp,32:jp},HM={35:ZR,42:bd,45:[C0,bd],60:nM,61:C0,95:bd,96:_0,126:_0},KM={38:B1,92:z1},GM={[-5]:Op,[-4]:Op,[-3]:Op,33:vM,38:B1,42:Cm,60:[ER,cM],91:EM,92:[WR,z1],93:Ng,95:Cm,96:LR},YM={null:[Cm,zM]},QM={null:[42,95]},VM={null:[]},WM=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:QM,contentInitial:$M,disable:VM,document:FM,flow:HM,flowInitial:qM,insideSpan:YM,string:KM,text:GM},Symbol.toStringTag,{value:"Module"}));function XM(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 p={attempt:F(U),check:F(M),consume:j,enter:A,exit:D,interrupt:F(M,{interrupt:!0})},h={code:null,containerState:{},defineSkip:w,events:[],now:k,parser:e,previous:null,sliceSerialize:v,sliceStream:x,write:g};let b=t.tokenize.call(h,p);return t.resolveAll&&o.push(t),h;function g(Z){return c=Ei(c,Z),_(),c[c.length-1]!==null?[]:($(t,0),h.events=tf(o,h.events,h),h.events)}function v(Z,ie){return JM(x(Z),ie)}function x(Z){return ZM(c,Z)}function k(){const{_bufferIndex:Z,_index:ie,line:xe,column:ue,offset:J}=a;return{_bufferIndex:Z,_index:ie,line:xe,column:ue,offset:J}}function w(Z){s[Z.line]=Z.column,L()}function _(){let Z;for(;a._index<c.length;){const ie=c[a._index];if(typeof ie=="string")for(Z=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===Z&&a._bufferIndex<ie.length;)S(ie.charCodeAt(a._bufferIndex));else S(ie)}}function S(Z){b=b(Z)}function j(Z){De(Z)?(a.line++,a.column=1,a.offset+=Z===-3?2:1,L()):Z!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),h.previous=Z}function A(Z,ie){const xe=ie||{};return xe.type=Z,xe.start=k(),h.events.push(["enter",xe,h]),d.push(xe),xe}function D(Z){const ie=d.pop();return ie.end=k(),h.events.push(["exit",ie,h]),ie}function U(Z,ie){$(Z,ie.from)}function M(Z,ie){ie.restore()}function F(Z,ie){return xe;function xe(ue,J,H){let ce,de,ae,O;return Array.isArray(ue)?Q(ue):"tokenize"in ue?Q([ue]):R(ue);function R(fe){return K;function K(se){const he=se!==null&&fe[se],Oe=se!==null&&fe.null,pt=[...Array.isArray(he)?he:he?[he]:[],...Array.isArray(Oe)?Oe:Oe?[Oe]:[]];return Q(pt)(se)}}function Q(fe){return ce=fe,de=0,fe.length===0?H:T(fe[de])}function T(fe){return K;function K(se){return O=ee(),ae=fe,fe.partial||(h.currentConstruct=fe),fe.name&&h.parser.constructs.disable.null.includes(fe.name)?W():fe.tokenize.call(ie?Object.assign(Object.create(h),ie):h,p,be,W)(se)}}function be(fe){return Z(ae,O),J}function W(fe){return O.restore(),++de<ce.length?T(ce[de]):H}}}function $(Z,ie){Z.resolveAll&&!o.includes(Z)&&o.push(Z),Z.resolve&&si(h.events,ie,h.events.length-ie,Z.resolve(h.events.slice(ie),h)),Z.resolveTo&&(h.events=Z.resolveTo(h.events,h))}function ee(){const Z=k(),ie=h.previous,xe=h.currentConstruct,ue=h.events.length,J=Array.from(d);return{from:ue,restore:H};function H(){a=Z,h.previous=ie,h.currentConstruct=xe,h.events.length=ue,d=J,L()}}function L(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function ZM(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 JM(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=`
|
|
513
|
-
`;break}case-3:{c=`\r
|
|
514
|
-
`;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:M1([WM,...(e||{}).extensions||[]]),content:s(mR),defined:[],document:s(bR),flow:s(LM),lazy:{},string:s(BM),text:s(UM)};return a;function s(o){return c;function c(d){return XM(a,o,d)}}}function tL(e){for(;!U1(e););return e}const T0=/[\0\t\n\r]/g;function nL(){let e=1,t="",n=!0,a;return s;function s(o,c,d){const p=[];let h,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(T0.lastIndex=g,h=T0.exec(o),v=h&&h.index!==void 0?h.index:o.length,x=o.charCodeAt(v),!h){t=o.slice(g);break}if(x===10&&g===v&&a)p.push(-3),a=void 0;else switch(a&&(p.push(-5),a=void 0),g<v&&(p.push(o.slice(g,v)),e+=v-g),x){case 0:{p.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,p.push(-2);e++<b;)p.push(-1);break}case 10:{p.push(-4),e=1;break}default:a=!0,e=1}g=v+1}return d&&(a&&p.push(-5),t&&p.push(t),p.push(null)),p}}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 L1(n.slice(o?2:1),o?16:10)}return _g(n)||e}const K1={}.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(Oe),characterEscape:ee,characterReference:ee,codeFenced:o(pt),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(pt,c),codeText:o(xt,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:o(ci),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Yn),hardBreakEscape:o(Je),hardBreakTrailing:o(Je),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(Yl),reference:T,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Pi),strong:o(ys),thematicBreak:o(xs)},exit:{atxHeading:p(),atxHeadingSequence:U,autolink:p(),autolinkEmail:he,autolinkProtocol:se,blockQuote:p(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:W,characterReferenceMarkerNumeric:W,characterReferenceValue:fe,characterReference:K,codeFenced:p(_),codeFencedFence:w,codeFencedFenceInfo:x,codeFencedFenceMeta:k,codeFlowValue:L,codeIndented:p(S),codeText:p(J),codeTextData:L,data:L,definition:p(),definitionDestinationString:D,definitionLabelString:j,definitionTitleString:A,emphasis:p(),hardBreakEscape:p(ie),hardBreakTrailing:p(ie),htmlFlow:p(xe),htmlFlowData:L,htmlText:p(ue),htmlTextData:L,image:p(ce),label:ae,labelText:de,lineEnding:Z,link:p(H),listItem:p(),listOrdered:p(),listUnordered:p(),paragraph:p(),referenceString:be,resourceDestinationString:O,resourceTitleString:R,resource:Q,setextHeading:p($),setextHeadingLineSequence:F,setextHeadingText:M,strong:p(),thematicBreak:p()}};G1(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(te){let ge={type:"root",children:[]};const Re={stack:[ge],tokenStack:[],config:t,enter:d,exit:h,buffer:c,resume:b,data:n},Ke=[];let it=-1;for(;++it<te.length;)if(te[it][1].type==="listOrdered"||te[it][1].type==="listUnordered")if(te[it][0]==="enter")Ke.push(it);else{const wn=Ke.pop();it=s(te,wn,it)}for(it=-1;++it<te.length;){const wn=t[te[it][0]];K1.call(wn,te[it][1].type)&&wn[te[it][1].type].call(Object.assign({sliceSerialize:te[it][2].sliceSerialize},Re),te[it][1])}if(Re.tokenStack.length>0){const wn=Re.tokenStack[Re.tokenStack.length-1];(wn[1]||A0).call(Re,void 0,wn[0])}for(ge.position={start:cr(te.length>0?te[0][1].start:{line:1,column:1,offset:0}),end:cr(te.length>0?te[te.length-2][1].end:{line:1,column:1,offset:0})},it=-1;++it<t.transforms.length;)ge=t.transforms[it](ge)||ge;return ge}function s(te,ge,Re){let Ke=ge-1,it=-1,wn=!1,Ai,ln,Ut,hn;for(;++Ke<=Re;){const ct=te[Ke];switch(ct[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ct[0]==="enter"?it++:it--,hn=void 0;break}case"lineEndingBlank":{ct[0]==="enter"&&(Ai&&!hn&&!it&&!Ut&&(Ut=Ke),hn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:hn=void 0}if(!it&&ct[0]==="enter"&&ct[1].type==="listItemPrefix"||it===-1&&ct[0]==="exit"&&(ct[1].type==="listUnordered"||ct[1].type==="listOrdered")){if(Ai){let $i=Ke;for(ln=void 0;$i--;){const En=te[$i];if(En[1].type==="lineEnding"||En[1].type==="lineEndingBlank"){if(En[0]==="exit")continue;ln&&(te[ln][1].type="lineEndingBlank",wn=!0),En[1].type="lineEnding",ln=$i}else if(!(En[1].type==="linePrefix"||En[1].type==="blockQuotePrefix"||En[1].type==="blockQuotePrefixWhitespace"||En[1].type==="blockQuoteMarker"||En[1].type==="listItemIndent"))break}Ut&&(!ln||Ut<ln)&&(Ai._spread=!0),Ai.end=Object.assign({},ln?te[ln][1].start:ct[1].end),te.splice(ln||Ke,0,["exit",Ai,ct[2]]),Ke++,Re++}if(ct[1].type==="listItemPrefix"){const $i={type:"listItem",_spread:!1,start:Object.assign({},ct[1].start),end:void 0};Ai=$i,te.splice(Ke,0,["enter",$i,ct[2]]),Ke++,Re++,Ut=void 0,hn=!0}}}return te[ge][1]._spread=wn,Re}function o(te,ge){return Re;function Re(Ke){d.call(this,te(Ke),Ke),ge&&ge.call(this,Ke)}}function c(){this.stack.push({type:"fragment",children:[]})}function d(te,ge,Re){this.stack[this.stack.length-1].children.push(te),this.stack.push(te),this.tokenStack.push([ge,Re||void 0]),te.position={start:cr(ge.start),end:void 0}}function p(te){return ge;function ge(Re){te&&te.call(this,Re),h.call(this,Re)}}function h(te,ge){const Re=this.stack.pop(),Ke=this.tokenStack.pop();if(Ke)Ke[0].type!==te.type&&(ge?ge.call(this,te,Ke[0]):(Ke[1]||A0).call(this,te,Ke[0]));else throw new Error("Cannot close `"+te.type+"` ("+ec({start:te.start,end:te.end})+"): it’s not open");Re.position.end=cr(te.end)}function b(){return Sg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function v(te){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(te),10),this.data.expectingFirstListItemValue=void 0}}function x(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=te}function k(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=te}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function _(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.value=te.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function S(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.value=te.replace(/(\r?\n|\r)$/g,"")}function j(te){const ge=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ge,Re.identifier=Ii(this.sliceSerialize(te)).toLowerCase()}function A(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.title=te}function D(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.url=te}function U(te){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Re=this.sliceSerialize(te).length;ge.depth=Re}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function F(te){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(te).codePointAt(0)===61?1:2}function $(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(te){const Re=this.stack[this.stack.length-1].children;let Ke=Re[Re.length-1];(!Ke||Ke.type!=="text")&&(Ke=Rt(),Ke.position={start:cr(te.start),end:void 0},Re.push(Ke)),this.stack.push(Ke)}function L(te){const ge=this.stack.pop();ge.value+=this.sliceSerialize(te),ge.position.end=cr(te.end)}function Z(te){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Re=ge.children[ge.children.length-1];Re.position.end=cr(te.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(ee.call(this,te),L.call(this,te))}function ie(){this.data.atHardBreak=!0}function xe(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.value=te}function ue(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.value=te}function J(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.value=te}function H(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ge,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function ce(){const te=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";te.type+="Reference",te.referenceType=ge,delete te.url,delete te.title}else delete te.identifier,delete te.label;this.data.referenceType=void 0}function de(te){const ge=this.sliceSerialize(te),Re=this.stack[this.stack.length-2];Re.label=aL(ge),Re.identifier=Ii(ge).toLowerCase()}function ae(){const te=this.stack[this.stack.length-1],ge=this.resume(),Re=this.stack[this.stack.length-1];if(this.data.inReference=!0,Re.type==="link"){const Ke=te.children;Re.children=Ke}else Re.alt=ge}function O(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.url=te}function R(){const te=this.resume(),ge=this.stack[this.stack.length-1];ge.title=te}function Q(){this.data.inReference=void 0}function T(){this.data.referenceType="collapsed"}function be(te){const ge=this.resume(),Re=this.stack[this.stack.length-1];Re.label=ge,Re.identifier=Ii(this.sliceSerialize(te)).toLowerCase(),this.data.referenceType="full"}function W(te){this.data.characterReferenceType=te.type}function fe(te){const ge=this.sliceSerialize(te),Re=this.data.characterReferenceType;let Ke;Re?(Ke=L1(ge,Re==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ke=_g(ge);const it=this.stack[this.stack.length-1];it.value+=Ke}function K(te){const ge=this.stack.pop();ge.position.end=cr(te.end)}function se(te){L.call(this,te);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(te)}function he(te){L.call(this,te);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(te)}function Oe(){return{type:"blockquote",children:[]}}function pt(){return{type:"code",lang:null,meta:null,value:""}}function xt(){return{type:"inlineCode",value:""}}function ci(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Yn(){return{type:"emphasis",children:[]}}function Pi(){return{type:"heading",depth:0,children:[]}}function Je(){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(te){return{type:"list",ordered:te.type==="listOrdered",start:null,spread:te._spread,children:[]}}function Tr(te){return{type:"listItem",spread:te._spread,checked:null,children:[]}}function Yl(){return{type:"paragraph",children:[]}}function ys(){return{type:"strong",children:[]}}function Rt(){return{type:"text",value:""}}function xs(){return{type:"thematicBreak"}}}function cr(e){return{line:e.line,column:e.column,offset:e.offset}}function G1(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?G1(e,a):oL(e,a)}}function oL(e,t){let n;for(n in t)if(K1.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 A0(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:`
|
|
515
|
-
`}]}function fL(e,t){const n=t.value?t.value+`
|
|
516
|
-
`:"",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 p={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,p);const h={type:"element",tagName:"sup",properties:{},children:[p]};return e.patch(t,h),e.applyData(t,h)}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 Y1(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 Y1(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 Y1(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 EL(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 kL(e,t,n){const a=e.all(t),s=n?SL(n):Q1(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:`
|
|
517
|
-
`}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const p=a[a.length-1];p&&(s||p.type!=="element"||p.tagName!=="p")&&c.push({type:"text",value:`
|
|
518
|
-
`});const h={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,h),e.applyData(t,h)}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=Q1(n[a])}return t}function Q1(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]),p=C1(t.children[t.children.length-1]);d&&p&&(c.position={start:d,end:p}),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 p=-1;const h=[];for(;++p<d;){const g=t.children[p],v={},x=c?c[p]:void 0;x&&(v.align=x);let k={type:"element",tagName:o,properties:v,children:[]};g&&(k.children=e.all(g),e.patch(g,k),k=e.applyData(g,k)),h.push(k)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!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 j0=9,O0=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(D0(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(D0(t.slice(s),s>0,!1)),o.join("")}function D0(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===j0||o===O0;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===j0||o===O0;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function RL(e,t){const n={type:"text",value:DL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function ML(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:EL,listItem:kL,list:_L,paragraph:NL,root:CL,strong:TL,table:AL,tableCell:OL,tableRow:jL,text:RL,thematicBreak:ML,toml:td,yaml:td,definition:td,footnoteDefinition:td};function td(){}const V1=-1,nf=0,nc=1,Td=2,Cg=3,Tg=4,Ag=5,jg=6,W1=7,X1=8,R0=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 V1:return n(c,s);case nc:{const d=n([],s);for(const p of c)d.push(a(p));return d}case Td:{const d=n({},s);for(const[p,h]of c)d[a(p)]=a(h);return d}case Cg:return n(new Date(c),s);case Tg:{const{source:d,flags:p}=c;return n(new RegExp(d,p),s)}case Ag:{const d=n(new Map,s);for(const[p,h]of c)d.set(a(p),a(h));return d}case jg:{const d=n(new Set,s);for(const p of c)d.add(a(p));return d}case W1:{const{name:d,message:p}=c;return n(new R0[d](p),s)}case X1: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 R0[o](c),s)};return a},M0=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")?[W1,n]:[Td,n]},nd=([e,t])=>e===nf&&(t==="function"||t==="symbol"),UL=(e,t,n,a)=>{const s=(c,d)=>{const p=a.push(c)-1;return n.set(d,p),p},o=c=>{if(n.has(c))return n.get(c);let[d,p]=Vo(c);switch(d){case nf:{let b=c;switch(p){case"bigint":d=X1,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+p);b=null;break;case"undefined":return s([V1],c)}return s([d,b],c)}case nc:{if(p){let v=c;return p==="DataView"?v=new Uint8Array(c.buffer):p==="ArrayBuffer"&&(v=new Uint8Array(c)),s([p,[...v]],c)}const b=[],g=s([d,b],c);for(const v of c)b.push(o(v));return g}case Td:{if(p)switch(p){case"BigInt":return s([p,c.toString()],c);case"Boolean":case"Number":case"String":return s([p,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:h}=c;return s([d,{name:p,message:h}],c)};return o},L0=(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)?M0(L0(e,t)):structuredClone(e):(e,t)=>M0(L0(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 $L(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 p=-1;for(;++p<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[p]);if(!h)continue;const b=e.all(h),g=String(h.identifier).toUpperCase(),v=Gl(g.toLowerCase());let x=0;const k=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++x<=w;){k.length>0&&k.push({type:"text",value:" "});let j=typeof n=="string"?n:n(p,x);typeof j=="string"&&(j={type:"text",value:j}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(x>1?"-"+x:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(p,x),className:["data-footnote-backref"]},children:Array.isArray(j)?j:[j]})}const _=b[b.length-1];if(_&&_.type==="element"&&_.tagName==="p"){const j=_.children[_.children.length-1];j&&j.type==="text"?j.value+=" ":_.children.push({type:"text",value:" "}),_.children.push(...k)}else b.push(...k);const S={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(b,!0)};e.patch(h,S),d.push(S)}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:`
|
|
519
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
|
|
520
|
-
`}]}}const Tc=(function(e){if(e==null)return GL;if(typeof e=="function")return af(e);if(typeof e=="object")return Array.isArray(e)?qL(e):HL(e);if(typeof e=="string")return KL(e);throw new Error("Expected function, string, or object as test")});function qL(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!!(YL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function GL(){return!0}function YL(e){return e!==null&&typeof e=="object"&&"type"in e}const Z1=[],QL=!0,Tm=!1,VL="skip";function J1(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(p,h,b){const g=p&&typeof p=="object"?p:{};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 ("+(p.type+(x?"<"+x+">":""))+")"})}return v;function v(){let x=Z1,k,w,_;if((!t||o(p,h,b[b.length-1]||void 0))&&(x=WL(n(p,b)),x[0]===Tm))return x;if("children"in p&&p.children){const S=p;if(S.children&&x[0]!==VL)for(w=(a?S.children.length:-1)+c,_=b.concat(S);w>-1&&w<S.children.length;){const j=S.children[w];if(k=d(j,w,_)(),k[0]===Tm)return k;w=typeof k[1]=="number"?k[1]:w+c}}return x}}}function WL(e){return Array.isArray(e)?e:typeof e=="number"?[QL,e]:e==null?Z1:[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),J1(e,o,d,s);function d(p,h){const b=h[h.length-1],g=b?b.children.indexOf(p):void 0;return c(p,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:h,applyData:e3,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:p,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 p(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,..._}=b,S=Ad(_);return S.children=d.all(b),S}return Ad(b)}return(d.options.unknownHandler||t3)(d,b,g)}function h(b){const g=[];if("children"in b){const v=b.children;let x=-1;for(;++x<v.length;){const k=d.one(v[x],b);if(k){if(x&&v[x-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=I0(k.value)),!Array.isArray(k)&&k.type==="element")){const w=k.children[0];w&&w.type==="text"&&(w.value=I0(w.value))}Array.isArray(k)?g.push(...k):g.push(k)}}}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:`
|
|
521
|
-
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
522
|
-
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
523
|
-
`}),n}function I0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function z0(e,t){const n=ZL(e,t),a=n.one(e,void 0),s=$L(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
524
|
-
`},s),o}function i3(e,t){return e&&"run"in e?async function(n,a){const s=z0(n,{file:a,...t});await e.run(s,a)}:function(n,a){return z0(n,{file:a,...e||t})}}function B0(e){if(e)throw e}var Dp,U0;function a3(){if(U0)return Dp;U0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},o=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var b=e.call(h,"constructor"),g=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!b&&!g)return!1;var v;for(v in h);return typeof v>"u"||e.call(h,v)},c=function(h,b){n&&b.name==="__proto__"?n(h,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):h[b.name]=b.newValue},d=function(h,b){if(b==="__proto__")if(e.call(h,b)){if(a)return a(h,b).value}else return;return h[b]};return Dp=function p(){var h,b,g,v,x,k,w=arguments[0],_=1,S=arguments.length,j=!1;for(typeof w=="boolean"&&(j=w,w=arguments[1]||{},_=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});_<S;++_)if(h=arguments[_],h!=null)for(b in h)g=d(w,b),v=d(h,b),w!==v&&(j&&v&&(o(v)||(x=s(v)))?(x?(x=!1,k=g&&s(g)?g:[]):k=g&&o(g)?g:{},c(w,{name:b,newValue:p(j,k,v)})):typeof v<"u"&&c(w,{name:b,newValue:v}));return w},Dp}var r3=a3();const Rp=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(p,...h){const b=e[++o];let g=-1;if(p){c(p);return}for(;++g<s.length;)(h[g]===null||h[g]===void 0)&&(h[g]=s[g]);s=h,b?l3(b,d)(...h):c(null,...h)}}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 p;d&&c.push(s);try{p=e.apply(this,c)}catch(h){const b=h;if(d&&n)throw b;return s(b)}d||(p&&p.then&&typeof p.then=="function"?p.then(o,s):p instanceof Error?s(p):o(p))}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,p;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(p=n.lastIndexOf("/"),p!==n.length-1){p<0?(n="",a=0):(n=n.slice(0,p),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 Mp=["history","path","basename","stem","extname","dirname"];class ek{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<Mp.length;){const o=Mp[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)Mp.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){P0(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"),P0(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 vn(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 P0(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(Rp(!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),p=a.parse(d);a.run(p,d,function(b,g,v){if(b||!g||!v)return h(b);const x=g,k=a.stringify(x,v);k3(k)?v.value=k:v.result=k,h(b,v)});function h(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),$0("processSync","process",n),a;function s(o,c){n=!0,B0(o),a=c}}run(t,n,a){F0(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 p=id(n);s.run(t,p,h);function h(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),$0("runSync","run",a),s;function o(c,d){B0(c),s=d,a=!0}}stringify(t,n){this.freeze();const a=id(n),s=this.compiler||this.Compiler;return Bp("stringify",s),F0(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")p(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(h){if(typeof h=="function")p(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[b,...g]=h;p(b,g)}else c(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function c(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(h.plugins),h.settings&&(s.settings=Rp(!0,s.settings,h.settings))}function d(h){let b=-1;if(h!=null)if(Array.isArray(h))for(;++b<h.length;){const g=h[b];o(g)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function p(h,b){let g=-1,v=-1;for(;++g<a.length;)if(a[g][0]===h){v=g;break}if(v===-1)a.push([h,...b]);else if(b.length>0){let[x,...k]=b;const w=a[v][1];jm(w)&&jm(x)&&(x=Rp(!0,w,x)),a[v]=[h,x,...k]}}}}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 F0(e){if(!jm(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function $0(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function id(e){return E3(e)?e:new ek(e)}function E3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function k3(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",q0=[],H0={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||q0,n=e.remarkPlugins||q0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...H0}:H0;return w3().use(cL).use(n).use(i3,a).use(t)}function A3(e){const t=e.children||"",n=new ek;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,p=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,h),GD(e,{Fragment:f.Fragment,components:s,ignoreInvalidStyle:!0,jsx:f.jsx,jsxs:f.jsxs,passKeys:!0,passNode:!0});function h(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 k=b.properties[x],w=Ap[x];(w===null||w.includes(b.tagName))&&(b.properties[x]=p(String(k||""),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 K0(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 R3(e,t,n){const s=Tc((n||{}).ignore||[]),o=M3(t);let c=-1;for(;++c<o.length;)J1(e,"text",d);function d(h,b){let g=-1,v;for(;++g<b.length;){const x=b[g],k=v?v.children:void 0;if(s(x,k?k.indexOf(x):void 0,v))return;v=x}if(v)return p(h,b)}function p(h,b){const g=b[b.length-1],v=o[c][0],x=o[c][1];let k=0;const _=g.children.indexOf(h);let S=!1,j=[];v.lastIndex=0;let A=v.exec(h.value);for(;A;){const D=A.index,U={index:A.index,input:A.input,stack:[...b,h]};let M=x(...A,U);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?v.lastIndex=D+1:(k!==D&&j.push({type:"text",value:h.value.slice(k,D)}),Array.isArray(M)?j.push(...M):M&&j.push(M),k=D+A[0].length,S=!0),!v.global)break;A=v.exec(h.value)}return S?(k<h.value.length&&j.push({type:"text",value:h.value.slice(k)}),g.children.splice(_,1,...j)):j=[h],_+j.length}}function M3(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:$p,literalAutolinkHttp:$p,literalAutolinkWww:$p},exit:{literalAutolink:q3,literalAutolinkEmail:$3,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 $p(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 $3(e){this.config.exit.autolinkEmail.call(this,e)}function q3(e){this.exit(e)}function H3(e){R3(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(!tk(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!Y3(n)))return!1;const c=Q3(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!tk(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function Y3(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 Q3(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=K0(e,"(");let o=K0(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 tk(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fs(n)||ef(n))&&(!t||n!==47)}nk.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 nk(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:nk},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const d=o.createTracker(c);let p=d.move("[^");const h=o.enter("footnoteDefinition"),b=o.enter("label");return p+=d.move(o.safe(o.associationId(a),{before:p,after:"]"})),b(),p+=d.move("]:"),a.children&&a.children.length>0&&(d.shift(4),p+=d.move((t?`
|
|
525
|
-
`:" ")+o.indentLines(o.containerFlow(a,d.current()),t?ik:sI))),h(),p}}function sI(e,t,n){return t===0?e:ik(e,t,n)}function ik(e,t,n){return(n?"":" ")+e}const lI=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ak.peek=fI;function oI(){return{canContainEols:["delete"],enter:{strikethrough:uI},exit:{strikethrough:dI}}}function cI(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:lI}],handlers:{delete:ak}}}function uI(e){this.enter({type:"delete",children:[]},e)}function dI(e){this.exit(e)}function ak(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=[],p=[];let h=0,b=-1;for(;++b<e.length;){const w=[],_=[];let S=-1;for(e[b].length>h&&(h=e[b].length);++S<e[b].length;){const j=mI(e[b][S]);if(n.alignDelimiters!==!1){const A=s(j);_[S]=A,(p[S]===void 0||A>p[S])&&(p[S]=A)}w.push(j)}c[b]=w,d[b]=_}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<h;)o[g]=G0(a[g]);else{const w=G0(a);for(;++g<h;)o[g]=w}g=-1;const v=[],x=[];for(;++g<h;){const w=o[g];let _="",S="";w===99?(_=":",S=":"):w===108?_=":":w===114&&(S=":");let j=n.alignDelimiters===!1?1:Math.max(1,p[g]-_.length-S.length);const A=_+"-".repeat(j)+S;n.alignDelimiters!==!1&&(j=_.length+j+S.length,j>p[g]&&(p[g]=j),x[g]=j),v[g]=A}c.splice(1,0,v),d.splice(1,0,x),b=-1;const k=[];for(;++b<c.length;){const w=c[b],_=d[b];g=-1;const S=[];for(;++g<h;){const j=w[g]||"";let A="",D="";if(n.alignDelimiters!==!1){const U=p[g]-(_[g]||0),M=o[g];M===114?A=" ".repeat(U):M===99?U%2?(A=" ".repeat(U/2+.5),D=" ".repeat(U/2-.5)):(A=" ".repeat(U/2),D=A):D=" ".repeat(U)}n.delimiterStart!==!1&&!g&&S.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&j==="")&&(n.delimiterStart!==!1||g)&&S.push(" "),n.alignDelimiters!==!1&&S.push(A),S.push(j),n.alignDelimiters!==!1&&S.push(D),n.padding!==!1&&S.push(" "),(n.delimiterEnd!==!1||g!==h-1)&&S.push("|")}k.push(n.delimiterEnd===!1?S.join("").replace(/ +$/,""):S.join(""))}return k.join(`
|
|
526
|
-
`)}function mI(e){return e==null?"":String(e)}function G0(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 Y0(e,t.inConstruct,!0)&&!Y0(e,t.notInConstruct,!1)}function Y0(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 Q0(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
527
|
-
`&&yI(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
528
|
-
`}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 EI(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,kI);return g(),v}const d=n.createTracker(a),p=s.repeat(Math.max(xI(o,s)+1,3)),h=n.enter("codeFenced");let b=d.move(p);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:`
|
|
529
|
-
`,encode:["`"],...d.current()})),g()}return b+=d.move(`
|
|
530
|
-
`),o&&(b+=d.move(o+`
|
|
531
|
-
`)),b+=d.move(p),h(),b}function kI(e,t,n){return(n?"":" ")+e}function Rg(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=Rg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let d=n.enter("label");const p=n.createTracker(a);let h=p.move("[");return h+=p.move(n.safe(n.associationId(e),{before:h,after:"]",...p.current()})),h+=p.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(n.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(d=n.enter("destinationRaw"),h+=p.move(n.safe(e.url,{before:h,after:e.title?" ":`
|
|
532
|
-
`,...p.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=p.move(" "+s),h+=p.move(n.safe(e.title,{before:h,after:s,...p.current()})),h+=p.move(s),d()),c(),h}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}}rk.peek=NI;function rk(e,t,n,a){const s=_I(n),o=n.enter("emphasis"),c=n.createTracker(a),d=c.move(s);let p=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=p.charCodeAt(0),b=jd(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(p=hc(h)+p.slice(1));const g=p.charCodeAt(p.length-1),v=jd(a.after.charCodeAt(0),g,s);v.inside&&(p=p.slice(0,-1)+hc(g));const x=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},d+p+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:`
|
|
533
|
-
`,after:`
|
|
534
|
-
`});return g(),b(),v+`
|
|
535
|
-
`+(s===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
|
|
536
|
-
`))+1))}const c="#".repeat(s),d=n.enter("headingAtx"),p=n.enter("phrasing");o.move(c+" ");let h=n.containerPhrasing(e,{before:"# ",after:`
|
|
537
|
-
`,...o.current()});return/^[\t ]/.test(h)&&(h=hc(h.charCodeAt(0))+h.slice(1)),h=h?c+" "+h:c,n.options.closeAtx&&(h+=" "+c),p(),d(),h}sk.peek=AI;function sk(e){return e.value||""}function AI(){return"<"}lk.peek=jI;function lk(e,t,n,a){const s=Rg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let d=n.enter("label");const p=n.createTracker(a);let h=p.move("![");return h+=p.move(n.safe(e.alt,{before:h,after:"]",...p.current()})),h+=p.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=p.move("<"),h+=p.move(n.safe(e.url,{before:h,after:">",...p.current()})),h+=p.move(">")):(d=n.enter("destinationRaw"),h+=p.move(n.safe(e.url,{before:h,after:e.title?" ":")",...p.current()}))),d(),e.title&&(d=n.enter(`title${o}`),h+=p.move(" "+s),h+=p.move(n.safe(e.title,{before:h,after:s,...p.current()})),h+=p.move(s),d()),h+=p.move(")"),c(),h}function jI(){return"!"}ok.peek=OI;function ok(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const d=n.createTracker(a);let p=d.move("![");const h=n.safe(e.alt,{before:p,after:"]",...d.current()});p+=d.move(h+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:p,after:"]",...d.current()});return c(),n.stack=b,o(),s==="full"||!h||h!==g?p+=d.move(g+"]"):s==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function OI(){return"!"}ck.peek=DI;function ck(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 p;if(c.atBreak)for(;p=d.exec(a);){let h=p.index;a.charCodeAt(h)===10&&a.charCodeAt(h-1)===13&&h--,a=a.slice(0,h)+" "+a.slice(p.index+1)}}return s+a+s}function DI(){return"`"}function uk(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))}dk.peek=RI;function dk(e,t,n,a){const s=Rg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let d,p;if(uk(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"),p=n.enter("label");let h=c.move("[");return h+=c.move(n.containerPhrasing(e,{before:h,after:"](",...c.current()})),h+=c.move("]("),p(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(p=n.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(n.safe(e.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(p=n.enter("destinationRaw"),h+=c.move(n.safe(e.url,{before:h,after:e.title?" ":")",...c.current()}))),p(),e.title&&(p=n.enter(`title${o}`),h+=c.move(" "+s),h+=c.move(n.safe(e.title,{before:h,after:s,...c.current()})),h+=c.move(s),p()),h+=c.move(")"),d(),h}function RI(e,t,n){return uk(e,n)?"<":"["}fk.peek=MI;function fk(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const d=n.createTracker(a);let p=d.move("[");const h=n.containerPhrasing(e,{before:p,after:"]",...d.current()});p+=d.move(h+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:p,after:"]",...d.current()});return c(),n.stack=b,o(),s==="full"||!h||h!==g?p+=d.move(g+"]"):s==="shortcut"?p=p.slice(0,-1):p+=d.move("]"),p}function MI(){return"["}function Mg(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=Mg(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 hk(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):Mg(n);const d=e.ordered?c==="."?")":".":LI(n);let p=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&&(p=!0),hk(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"){p=!0;break}}}}p&&(c=d),n.bulletCurrent=c;const h=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),h}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||Mg(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 p=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,d.current()),b);return p(),h;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 $I(e,t,n,a){return(e.children.some(function(c){return FI(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function qI(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}pk.peek=HI;function pk(e,t,n,a){const s=qI(n),o=n.enter("strong"),c=n.createTracker(a),d=c.move(s+s);let p=c.move(n.containerPhrasing(e,{after:s,before:d,...c.current()}));const h=p.charCodeAt(0),b=jd(a.before.charCodeAt(a.before.length-1),h,s);b.inside&&(p=hc(h)+p.slice(1));const g=p.charCodeAt(p.length-1),v=jd(a.after.charCodeAt(0),g,s);v.inside&&(p=p.slice(0,-1)+hc(g));const x=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:v.outside,before:b.outside},d+p+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 YI(e,t,n){const a=(hk(n)+(n.options.ruleSpaces?" ":"")).repeat(GI(n));return n.options.ruleSpaces?a.slice(0,-1):a}const mk={blockquote:gI,break:Q0,code:EI,definition:SI,emphasis:rk,hardBreak:Q0,heading:TI,html:sk,image:lk,imageReference:ok,inlineCode:ck,link:dk,linkReference:fk,list:zI,listItem:UI,paragraph:PI,root:$I,strong:pk,text:KI,thematicBreak:YI};function QI(){return{enter:{table:VI,tableData:V0,tableHeader:V0,tableRow:XI},exit:{codeText:ZI,table:WI,tableData:qp,tableHeader:qp,tableRow:qp}}}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 qp(e){this.exit(e)}function V0(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:`
|
|
538
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:c,tableCell:p,tableRow:d}};function c(x,k,w,_){return h(b(x,w,_),x.align)}function d(x,k,w,_){const S=g(x,w,_),j=h([S]);return j.slice(0,j.indexOf(`
|
|
539
|
-
`))}function p(x,k,w,_){const S=w.enter("tableCell"),j=w.enter("phrasing"),A=w.containerPhrasing(x,{..._,before:o,after:o});return j(),S(),A}function h(x,k){return pI(x,{align:k,alignDelimiters:a,padding:n,stringLength:s})}function b(x,k,w){const _=x.children;let S=-1;const j=[],A=k.enter("table");for(;++S<_.length;)j[S]=g(_[S],k,w);return A(),j}function g(x,k,w){const _=x.children;let S=-1;const j=[],A=k.enter("tableRow");for(;++S<_.length;)j[S]=p(_[S],x,k,w);return A(),j}function v(x,k,w){let _=mk.inlineCode(x,k,w);return w.stack.includes("tableCell")&&(_=_.replace(/\|/g,"\\$&")),_}}function tz(){return{exit:{taskListCheckValueChecked:W0,taskListCheckValueUnchecked:W0,paragraph:iz}}}function nz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:az}}}function W0(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 p=mk.listItem(e,t,n,{...a,...d.current()});return o&&(p=p.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),p;function h(b){return b+c}}function rz(){return[z3(),aI(),oI(),QI(),tz()]}function sz(e){return{extensions:[B3(),rI(e),cI(),ez(e),nz()]}}const lz={tokenize:hz,partial:!0},gk={tokenize:pz,partial:!0},bk={tokenize:mz,partial:!0},yk={tokenize:gz,partial:!0},oz={tokenize:bz,partial:!0},xk={name:"wwwAutolink",tokenize:dz,previous:wk},vk={name:"protocolAutolink",tokenize:fz,previous:Ek},Da={name:"emailAutolink",tokenize:uz,previous:kk},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,vk];ta[104]=[Da,vk];ta[87]=[Da,xk];ta[119]=[Da,xk];function uz(e,t,n){const a=this;let s,o;return c;function c(g){return!Dm(g)||!kk.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),p):n(g)}function p(g){return g===46?e.check(oz,b,h)(g):g===45||g===95||yn(g)?(o=!0,e.consume(g),p):b(g)}function h(g){return e.consume(g),s=!0,p}function b(g){return o&&s&&An(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||!wk.call(a,a.previous)||Lg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(lz,e.attempt(gk,e.attempt(bk,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)&&Ek.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(An(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),p}return n(g)}function p(g){return g===47?(e.consume(g),o?h:(o=!0,p)):n(g)}function h(g){return g===null||Cd(g)||Et(g)||fs(g)||ef(g)?n(g):e.attempt(gk,e.attempt(bk,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(h){return h===46||h===95?e.check(yk,p,d)(h):h===null||Et(h)||fs(h)||h!==45&&ef(h)?p(h):(o=!0,e.consume(h),c)}function d(h){return h===95?a=!0:(s=a,a=void 0),e.consume(h),c}function p(h){return s||a||!o?n(h):t(h)}}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(yk,t,o)(c):c===null||Et(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||Et(d)||fs(d)?t(d):n(d)}function s(d){return d===null||d===40||d===91||Et(d)||fs(d)?t(d):a(d)}function o(d){return An(d)?c(d):n(d)}function c(d){return d===59?(e.consume(d),a):An(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 yn(o)?n(o):t(o)}}function wk(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Et(e)}function Ek(e){return!An(e)}function kk(e){return!(e===47||Dm(e))}function Dm(e){return e===43||e===45||e===46||e===95||yn(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:kz,continuation:{tokenize:Sz},exit:_z}},text:{91:{name:"gfmFootnoteCall",tokenize:Ez},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 p=a.events[s][1];if(p.type==="labelImage"){c=p;break}if(p.type==="gfmFootnoteCall"||p.type==="labelLink"||p.type==="label"||p.type==="image"||p.type==="link")break}return d;function d(p){if(!c||!c._balanced)return n(p);const h=Ii(a.sliceSerialize({start:c.end,end:a.now()}));return h.codePointAt(0)!==94||!o.includes(h.slice(1))?n(p):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(p),e.exit("gfmFootnoteCallLabelMarker"),t(p))}}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 Ez(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"),p}function p(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(g){if(o>999||g===93&&!c||g===null||g===91||Et(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 Et(g)||(c=!0),o++,e.consume(g),g===92?b:h}function b(g){return g===91||g===92||g===93?(e.consume(g),o++,h):h(g)}}function kz(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,d;return p;function p(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(k)}function b(k){if(c>999||k===93&&!d||k===null||k===91||Et(k))return n(k);if(k===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Ii(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Et(k)||(d=!0),c++,e.consume(k),k===92?g:b}function g(k){return k===91||k===92||k===93?(e.consume(k),c++,b):b(k)}function v(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),s.includes(o)||s.push(o),nt(e,x,"gfmFootnoteDefinitionWhitespace")):n(k)}function x(k){return t(k)}}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 nt(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 p=-1;for(;++p<c.length;)if(c[p][0]==="enter"&&c[p][1].type==="strikethroughSequenceTemporary"&&c[p][1]._close){let h=p;for(;h--;)if(c[h][0]==="exit"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._open&&c[p][1].end.offset-c[p][1].start.offset===c[h][1].end.offset-c[h][1].start.offset){c[p][1].type="strikethroughSequence",c[h][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[h][1].start),end:Object.assign({},c[p][1].end)},g={type:"strikethroughText",start:Object.assign({},c[h][1].end),end:Object.assign({},c[p][1].start)},v=[["enter",b,d],["enter",c[h][1],d],["exit",c[h][1],d],["enter",g,d]],x=d.parser.constructs.insideSpan.null;x&&si(v,v.length,0,tf(x,c.slice(h+1,p),d)),si(v,v.length,0,[["exit",g,d],["enter",c[p][1],d],["exit",c[p][1],d],["exit",b,d]]),si(c,h-1,p-h+3,v),p=h+v.length-2;break}}for(p=-1;++p<c.length;)c[p][1].type==="strikethroughSequenceTemporary"&&(c[p][1].type="data");return c}function o(c,d,p){const h=this.previous,b=this.events;let g=0;return v;function v(k){return h===126&&b[b.length-1][1].type!=="characterEscape"?p(k):(c.enter("strikethroughSequenceTemporary"),x(k))}function x(k){const w=Dl(h);if(k===126)return g>1?p(k):(c.consume(k),g++,x);if(g<2&&!n)return p(k);const _=c.exit("strikethroughSequenceTemporary"),S=Dl(k);return _._open=!S||S===2&&!!w,_._close=!w||w===2&&!!S,d(k)}}}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:Rz}}}}function Dz(e,t,n){const a=this;let s=0,o=0,c;return d;function d(L){let Z=a.events.length-1;for(;Z>-1;){const ue=a.events[Z][1].type;if(ue==="lineEnding"||ue==="linePrefix")Z--;else break}const ie=Z>-1?a.events[Z][1].type:null,xe=ie==="tableHead"||ie==="tableRow"?M:p;return xe===M&&a.parser.lazy[a.now().line]?n(L):xe(L)}function p(L){return e.enter("tableHead"),e.enter("tableRow"),h(L)}function h(L){return L===124||(c=!0,o+=1),b(L)}function b(L){return L===null?n(L):De(L)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),x):n(L):Ve(L)?nt(e,b,"whitespace")(L):(o+=1,c&&(c=!1,s+=1),L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),c=!0,b):(e.enter("data"),g(L)))}function g(L){return L===null||L===124||Et(L)?(e.exit("data"),b(L)):(e.consume(L),L===92?v:g)}function v(L){return L===92||L===124?(e.consume(L),g):g(L)}function x(L){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(L):(e.enter("tableDelimiterRow"),c=!1,Ve(L)?nt(e,k,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):k(L))}function k(L){return L===45||L===58?_(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):U(L)}function w(L){return Ve(L)?nt(e,_,"whitespace")(L):_(L)}function _(L){return L===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),S):L===45?(o+=1,S(L)):L===null||De(L)?D(L):U(L)}function S(L){return L===45?(e.enter("tableDelimiterFiller"),j(L)):U(L)}function j(L){return L===45?(e.consume(L),j):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(L))}function A(L){return Ve(L)?nt(e,D,"whitespace")(L):D(L)}function D(L){return L===124?k(L):L===null||De(L)?!c||s!==o?U(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):U(L)}function U(L){return n(L)}function M(L){return e.enter("tableRow"),F(L)}function F(L){return L===124?(e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),F):L===null||De(L)?(e.exit("tableRow"),t(L)):Ve(L)?nt(e,F,"whitespace")(L):(e.enter("data"),$(L))}function $(L){return L===null||L===124||Et(L)?(e.exit("data"),F(L)):(e.consume(L),L===92?ee:$)}function ee(L){return L===92||L===124?(e.consume(L),$):$(L)}}function Rz(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],d=!1,p=0,h,b,g;const v=new Tz;for(;++n<e.length;){const x=e[n],k=x[1];x[0]==="enter"?k.type==="tableHead"?(d=!1,p!==0&&(X0(v,t,p,h,b),b=void 0,p=0),h={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(n,0,[["enter",h,t]])):k.type==="tableRow"||k.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({},k.start),end:Object.assign({},k.end)},v.add(n,0,[["enter",b,t]])),s=k.type==="tableDelimiterRow"?2:b?3:1):s&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.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)):k.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])):k.type==="tableHead"?(d=!0,p=n):k.type==="tableRow"||k.type==="tableDelimiterRow"?(p=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&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(c[3]=n)}for(p!==0&&X0(v,t,p,h,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 p=ll(t.events,n[1]);if(o={type:c,start:Object.assign({},p),end:Object.assign({},p)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const h=ll(t.events,n[2]),b=ll(t.events,n[3]),g={type:d,start:Object.assign({},h),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 k=n[2]+1,w=n[3]-n[2]-1;e.add(k,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 X0(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 Mz={name:"tasklistCheck",tokenize:Iz};function Lz(){return{text:{91:Mz}}}function Iz(e,t,n){const a=this;return s;function s(p){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(p):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),o)}function o(p){return Et(p)?(e.enter("taskListCheckValueUnchecked"),e.consume(p),e.exit("taskListCheckValueUnchecked"),c):p===88||p===120?(e.enter("taskListCheckValueChecked"),e.consume(p),e.exit("taskListCheckValueChecked"),c):n(p)}function c(p){return p===93?(e.enter("taskListCheckMarker"),e.consume(p),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):n(p)}function d(p){return De(p)?t(p):Ve(p)?e.check({tokenize:zz},t,n)(p):n(p)}}function zz(e,t,n){return nt(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function Bz(e){return M1([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 Z0=(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 $z;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!!(qz(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function $z(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function qz(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const J0=/\n/g,ew=/[\t ]+/g,Rm=bs("br"),tw=bs(Xz),Hz=bs("p"),nw=bs("tr"),Kz=bs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",Wz,Zz]),Sk=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=Sk(e),o=Ck(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...Nk(e,{breakBefore:!0,breakAfter:!0}));let d=-1;for(;++d<a.length;)c.push(..._k(a[d],e,{whitespace:o,breakBefore:d?void 0:s,breakAfter:d<a.length-1?Rm(a[d+1]):s}));const p=[];let h;for(d=-1;++d<c.length;){const b=c[d];typeof b=="number"?h!==void 0&&b>h&&(h=b):b&&(h!==void 0&&h>-1&&p.push(`
|
|
540
|
-
`.repeat(h)||" "),h=-1,p.push(b))}return p.join("")}function _k(e,t,n){return e.type==="element"?Yz(e,t,n):e.type==="text"?n.whitespace==="normal"?Nk(e,n):Qz(e):[]}function Yz(e,t,n){const a=Ck(e,n),s=e.children||[];let o=-1,c=[];if(Kz(e))return c;let d,p;for(Rm(e)||nw(e)&&Z0(t,e,nw)?p=`
|
|
541
|
-
`:Hz(e)?(d=2,p=2):Sk(e)&&(d=1,p=1);++o<s.length;)c=c.concat(_k(s[o],e,{whitespace:a,breakBefore:o?void 0:d,breakAfter:o<s.length-1?Rm(s[o+1]):p}));return tw(e)&&Z0(t,e,tw)&&c.push(" "),d&&c.unshift(d),p&&c.push(p),c}function Nk(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){J0.lastIndex=o;const p=J0.exec(n),h=p&&"index"in p?p.index:n.length;a.push(Vz(n.slice(o,h).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,h===n.length?t.breakAfter:!0)),o=h+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 Qz(e){return[String(e.value)]}function Vz(e,t,n){const a=[];let s=0,o;for(;s<e.length;){ew.lastIndex=s;const c=ew.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 Ck(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"},h={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(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["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"],_=["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"],S=["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:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},U={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[U,g,d,n,e.C_BLOCK_COMMENT_MODE,b,h],F={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},$={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:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,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(F,$,U,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 p={match:/\\"/},h={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}),k={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"],_=["true","false"],S={match:/(\/[a-z._-]+)+/},j=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],A=["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"],U=["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:_,built_in:[...j,...A,"set","shopt",...D,...U]},contains:[x,e.SHEBANG(),k,g,o,c,S,d,p,h,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/}]},h={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(h,{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*\\(",_={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"},S=[g,d,n,e.C_BLOCK_COMMENT_MODE,b,h],j={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:_,contains:S.concat([{begin:/\(/,end:/\)/,keywords:_,contains:S.concat(["self"]),relevance:0}]),relevance:0},A={begin:"("+c+"[\\*&\\s]+)+"+x,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:_,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:_,relevance:0},{begin:x,returnBegin:!0,contains:[e.inherit(v,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:_,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,b,d]}]},d,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:_,disableAutodetect:!0,illegal:"</",contains:[].concat(j,A,S,[g,{begin:e.IDENT_RE+"::",keywords:_},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:h,keywords:_}}}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"},h={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(h,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},v={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},x=t.optional(s)+e.IDENT_RE+"\\s*\\(",k=["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"],_=["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"],S=["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:k,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:_},U={className:"function.dispatch",relevance:0,keywords:{_hint:S},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[U,g,d,n,e.C_BLOCK_COMMENT_MODE,b,h],F={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},$={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:[h,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,h,b,d,{begin:/\(/,end:/\)/,keywords:D,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,h,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(F,$,U,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)*"}),p={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},h={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/}),k={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,x]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]},_=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]});v.contains=[w,k,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,e.C_BLOCK_COMMENT_MODE],x.contains=[_,k,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,p,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const S={variants:[h,w,k,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},j={begin:"<",end:">",contains:[{beginKeywords:"in out"},d]},A=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"}},S,p,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},d,j,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,j,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:"("+A+"\\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,j],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[S,p,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},p=/[A-Za-z0-9_-]+/,h=/"(\\"|[^"])*"/,b=/'[^']*'/,g=t.either(p,h,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])*",iw={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 Tk(e,t,n){return n===-1?"":e.replace(t,a=>Tk(e,t,n-1))}function y4(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+Tk("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),p={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"]},h={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:p,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:p,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:p,relevance:0,contains:[h,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,iw,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},iw,h]}}const aw="[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"],Ak=["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"],jk=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Ok=["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"],E4=[].concat(Ok,Ak,jk);function k4(e){const t=e.regex,n=(de,{after:ae})=>{const O="</"+de[0].slice(1);return de.input.indexOf(O,ae)!==-1},a=aw,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(de,ae)=>{const O=de[0].length+de.index,R=de.input[O];if(R==="<"||R===","){ae.ignoreMatch();return}R===">"&&(n(de,{after:O})||ae.ignoreMatch());let Q;const T=de.input.substring(O);if(Q=T.match(/^\s*=/)){ae.ignoreMatch();return}if((Q=T.match(/^\s+extends\s+/))&&Q.index===0){ae.ignoreMatch();return}}},d={$pattern:aw,keyword:x4,literal:v4,built_in:E4,"variable.language":w4},p="[0-9](_?[0-9])*",h=`\\.(${p})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${p})\\b`},{begin:`\\b(${b})\\b((${h})\\b|\\.)?|(${h})\\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"}},k={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"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},j={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]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,k,w,_,{match:/\$\d+/},g];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(A)});const D=[].concat(j,v.contains),U=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:U},F={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"}}]},$={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:{_:[...Ak,...jk]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ie(de){return t.concat("(?!",de.join("|"),")")}const xe={match:t.concat(/\b/,ie([...Ok,"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},J={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,k,w,_,j,{match:/\$\d+/},g,$,{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:[j,e.REGEXP_MODE,{className:"function",begin:H,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:U}]}]},{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"]}]}]},L,{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]},xe,Z,F,J,{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+")?"},p={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},h=_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,p,{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,p,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,p]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
542
|
-
`},h]}}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(),Dk=["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(),Rk=["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(),R4=Dk.concat(Rk).sort().reverse();function M4(e){const t=C4(e),n=R4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],d=[],p=function(A){return{className:"string",begin:"~?"+A+".*?"+A}},h=function(A,D,U){return{className:A,begin:D,relevance:U}},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,p("'"),p('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,h("variable","@@?"+s,10),h("variable","@\\{"+s+"\\}"),h("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)},k={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}},_={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:v}},S={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,h("keyword","all\\b"),h("variable","@\\{"+s+"\\}"),{begin:"\\b("+j4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,h("selector-tag",o,0),h("selector-id","#"+o),h("selector-class","\\."+o,0),h("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Dk.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Rk.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:v},{begin:"!important"},t.FUNCTION_DISPATCH]},j={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[S]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,_,j,k,S,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+.-]*/,p={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}]},h={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(h,{contains:[]}),v=e.inherit(b,{contains:[]});h.contains.push(v),b.contains.push(g);let x=[n,p];return[h,b,g,v].forEach(S=>{S.contains=S.contains.concat(x)}),x=x.concat(h,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,h,b,{className:"quote",begin:"^>\\s+",contains:x,end:"$"},s,a,p,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"]},p={$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:"("+p.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:p,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*\(.*?\))?/},p={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]},h={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,p],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],v=(w,_,S="\\1")=>{const j=S==="\\1"?S:t.concat(S,_);return t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,j,/(?:\\.|[^\\\/])*?/,S,a)},x=(w,_,S)=>t.concat(t.concat("(?:",w,")"),_,/(?:\\.|[^\\\/])*?/,S,a),k=[p,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}]},h,{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,h]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=k,c.contains=k,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:k}}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:/\?>/}]},p={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},h=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(p)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(p),"on:begin":(ue,J)=>{J.data._beginMatch=ue[1]||ue[2]},"on:end":(ue,J)=>{J.data._beginMatch!==ue[1]&&J.ignoreMatch()}},v=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),x=`[
|
|
543
|
-
]`,k={scope:"string",variants:[b,h,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},_=["false","null","true"],S=["__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"],j=["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:S,literal:(ue=>{const J=[];return ue.forEach(H=>{J.push(H),H.toLowerCase()===H?J.push(H.toUpperCase()):J.push(H.toLowerCase())}),J})(_),built_in:j},U=ue=>ue.map(J=>J.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(x,"+"),t.concat("(?!",U(j).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},F=t.concat(a,"\\b(?!\\()"),$={variants:[{match:[t.concat(/::/,t.lookahead(/(?!class\b)/)),F],scope:{2:"variable.constant"}},{match:[/::/,/class/],scope:{2:"variable.language"}},{match:[s,t.concat(/::/,t.lookahead(/(?!class\b)/)),F],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(/(?!::)/))},L={relevance:0,begin:/\(/,end:/\)/,keywords:D,contains:[ee,c,$,e.C_BLOCK_COMMENT_MODE,k,w,M]},Z={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",U(S).join("\\b|"),"|",U(j).join("\\b|"),"\\b)"),a,t.concat(x,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(Z);const ie=[ee,$,e.C_BLOCK_COMMENT_MODE,k,w,M],xe={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:_,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:_,keyword:["new","array"]},contains:["self",...ie]},...ie,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:D,contains:[xe,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,Z,$,{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",xe,c,$,e.C_BLOCK_COMMENT_MODE,k,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]},k,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 $4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function q4(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"]},p={className:"meta",begin:/^(>>>|\.\.\.) /},h={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,p],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,p,b,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,p,b,h]},{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,h]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,h]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},v="[0-9](_?[0-9])*",x=`(\\b(${v}))?\\.(${v})|\\b(${v})\\.`,k=`\\b|${a.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${v})|(${x}))[eE][+-]?(${v})[jJ]?(?=${k})`},{begin:`(${x})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${k})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${k})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${k})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${k})`},{begin:`\\b(${v})[jJ](?=${k})`}]},_={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:d,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},S={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:["self",p,w,g,e.HASH_COMMENT_MODE]}]};return h.contains=[g,w,p],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:d,illegal:/(<\/|\?)|=>/,contains:[p,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,_,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[S]},{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,S,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]+"},p={begin:"#<",end:">"},h=[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])*",k={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},k,{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(p,h),relevance:0}].concat(p,h);b.contains=M,w.contains=M;const L=[{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 h.unshift(p),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(h).concat(M)}}function Y4(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"],p=["true","false","Some","None","Ok","Err"],h=["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:p,built_in:h},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:h,type:b}},{className:"punctuation",begin:"->"},o]}}const Q4=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=Q4(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"],p=["add","asc","collation","desc","final","first","last","view"],h=["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,k=[...h,...p].filter(U=>!b.includes(U)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},_={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},S={match:t.concat(/\b/,t.either(...x),/\s*\(/),relevance:0,keywords:{built_in:x}};function j(U){return t.concat(/\b/,t.either(...U.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const A={scope:"keyword",match:j(v),relevance:0};function D(U,{exceptions:M,when:F}={}){const $=F;return M=M||[],U.map(ee=>ee.match(/\|\d+$/)||M.includes(ee)?ee:$(ee)?`${ee}|0`:ee)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:D(k,{when:U=>U.length<3}),literal:o,type:d,built_in:g},contains:[{scope:"type",match:j(c)},A,S,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,_]}}function Mk(e){return e?typeof e=="string"?e:e.source:null}function Wo(e){return yt("(?=",e,")")}function yt(...e){return e.map(n=>Mk(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 Nn(...e){return"("+(rB(e).capture?"":"?:")+e.map(a=>Mk(a)).join("|")+")"}const Bg=e=>yt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),sB=["Protocol","Type"].map(Bg),rw=["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"],sw=["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"],lw=["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"],Lk=Nn(/[/=\-+!*%<>&|^~?]/,/[\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]/),Ik=Nn(Lk,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Kp=yt(Lk,Ik,"*"),zk=Nn(/[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=Nn(zk,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Qi=yt(zk,Od,"*"),cd=yt(/[A-Z]/,Od,"*"),uB=["attached","autoclosure",yt(/convention\(/,Nn("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",yt(/objc\(/,Qi,/\)/),"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:[/\./,Nn(...sB,...rw)],className:{2:"keyword"}},o={match:yt(/\./,Nn(...Hp)),relevance:0},c=Hp.filter(Je=>typeof Je=="string").concat(["_|0"]),d=Hp.filter(Je=>typeof Je!="string").concat(lB).map(Bg),p={variants:[{className:"keyword",match:Nn(...d,...rw)}]},h={$pattern:Nn(/\b\w+/,/#\w+/),keyword:c.concat(cB),literal:sw},b=[s,o,p],g={match:yt(/\./,Nn(...lw)),relevance:0},v={className:"built_in",match:yt(/\b/,Nn(...lw),/(?=\()/)},x=[g,v],k={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Kp},{match:`\\.(\\.|${Ik})+`}]},_=[k,w],S="([0-9]_*)+",j="([0-9a-fA-F]_*)+",A={className:"number",relevance:0,variants:[{match:`\\b(${S})(\\.(${S}))?([eE][+-]?(${S}))?\\b`},{match:`\\b0x(${j})(\\.(${j}))?([pP][+-]?(${S}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},D=(Je="")=>({className:"subst",variants:[{match:yt(/\\/,Je,/[0\\tnr"']/)},{match:yt(/\\/,Je,/u\{[0-9a-fA-F]{1,8}\}/)}]}),U=(Je="")=>({className:"subst",match:yt(/\\/,Je,/[\t ]*(?:[\r\n]|\r\n)/)}),M=(Je="")=>({className:"subst",label:"interpol",begin:yt(/\\/,Je,/\(/),end:/\)/}),F=(Je="")=>({begin:yt(Je,/"""/),end:yt(/"""/,Je),contains:[D(Je),U(Je),M(Je)]}),$=(Je="")=>({begin:yt(Je,/"/),end:yt(/"/,Je),contains:[D(Je),M(Je)]}),ee={className:"string",variants:[F(),F("#"),F("##"),F("###"),$(),$("#"),$("##"),$("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],Z={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},ie=Je=>{const Ti=yt(Je,/\//),ui=yt(/\//,Je);return{begin:Ti,end:ui,contains:[...L,{scope:"comment",begin:`#(?!.*${ui})`,end:/$/}]}},xe={scope:"regexp",variants:[ie("###"),ie("##"),ie("#"),Z]},ue={match:yt(/`/,Qi,/`/)},J={className:"variable",match:/\$\d+/},H={className:"variable",match:`\\$${Od}+`},ce=[ue,J,H],de={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:dB,contains:[..._,A,ee]}]}},ae={scope:"keyword",match:yt(/@/,Nn(...uB),Wo(Nn(/\(/,/\s+/)))},O={scope:"meta",match:yt(/@/,Qi)},R=[de,ae,O],Q={match:Wo(/\b[A-Z]/),relevance:0,contains:[{className:"type",match:yt(/(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:yt(/\s+&\s+/,Wo(cd)),relevance:0}]},T={begin:/</,end:/>/,keywords:h,contains:[...a,...b,...R,k,Q]};Q.contains.push(T);const be={match:yt(Qi,/\s*:/),keywords:"_|0",relevance:0},W={begin:/\(/,end:/\)/,relevance:0,keywords:h,contains:["self",be,...a,xe,...b,...x,..._,A,ee,...ce,...R,Q]},fe={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,Q]},K={begin:Nn(Wo(yt(Qi,/\s*:/)),Wo(yt(Qi,/\s+/,Qi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Qi}]},se={begin:/\(/,end:/\)/,keywords:h,contains:[K,...a,...b,..._,A,ee,...R,Q,W],endsParent:!0,illegal:/["']/},he={match:[/(func|macro)/,/\s+/,Nn(ue.match,Qi,Kp)],className:{1:"keyword",3:"title.function"},contains:[fe,se,t],illegal:[/\[/,/%/]},Oe={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[fe,se,t],illegal:/\[|%/},pt={match:[/operator/,/\s+/,Kp],className:{1:"keyword",3:"title"}},xt={begin:[/precedencegroup/,/\s+/,cd],className:{1:"keyword",3:"title"},contains:[Q],keywords:[...oB,...sw],end:/}/},ci={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Yn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Pi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Qi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:h,contains:[fe,...b,{begin:/:/,end:/\{/,keywords:h,contains:[{scope:"title.class.inherited",match:cd},...b],relevance:0}]};for(const Je of ee.variants){const Ti=Je.contains.find(Fi=>Fi.label==="interpol");Ti.keywords=h;const ui=[...b,...x,..._,A,ee,...ce];Ti.contains=[...ui,{begin:/\(/,end:/\)/,contains:["self",...ui]}]}return{name:"Swift",keywords:h,contains:[...a,he,Oe,ci,Yn,Pi,pt,xt,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},xe,...b,...x,..._,A,ee,...ce,...R,Q,W]}}const Dd="[A-Za-z$_][0-9A-Za-z$_]*",Bk=["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"],Uk=["true","false","null","undefined","NaN","Infinity"],Pk=["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"],Fk=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],$k=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],qk=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Hk=[].concat($k,Pk,Fk);function hB(e){const t=e.regex,n=(de,{after:ae})=>{const O="</"+de[0].slice(1);return de.input.indexOf(O,ae)!==-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,ae)=>{const O=de[0].length+de.index,R=de.input[O];if(R==="<"||R===","){ae.ignoreMatch();return}R===">"&&(n(de,{after:O})||ae.ignoreMatch());let Q;const T=de.input.substring(O);if(Q=T.match(/^\s*=/)){ae.ignoreMatch();return}if((Q=T.match(/^\s+extends\s+/))&&Q.index===0){ae.ignoreMatch();return}}},d={$pattern:Dd,keyword:Bk,literal:Uk,built_in:Hk,"variable.language":qk},p="[0-9](_?[0-9])*",h=`\\.(${p})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${h})|\\.)?|(${h}))[eE][+-]?(${p})\\b`},{begin:`\\b(${b})\\b((${h})\\b|\\.)?|(${h})\\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"}},k={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"}},_={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,v]},j={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]},A=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,k,w,_,{match:/\$\d+/},g];v.contains=A.concat({begin:/\{/,end:/\}/,keywords:d,contains:["self"].concat(A)});const D=[].concat(j,v.contains),U=D.concat([{begin:/(\s*)\(/,end:/\)/,keywords:d,contains:["self"].concat(D)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:d,contains:U},F={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"}}]},$={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:{_:[...Pk,...Fk]}},ee={label:"use_strict",className:"meta",relevance:10,begin:/^\s*['"]use (strict|asm)['"]/},L={variants:[{match:[/function/,/\s+/,a,/(?=\s*\()/]},{match:[/function/,/\s*(?=\()/]}],className:{1:"keyword",3:"title.function"},label:"func.def",contains:[M],illegal:/%/},Z={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ie(de){return t.concat("(?!",de.join("|"),")")}const xe={match:t.concat(/\b/,ie([...$k,"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},J={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},H="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(H)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:d,exports:{PARAMS_CONTAINS:U,CLASS_REFERENCE:$},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,x,k,w,_,j,{match:/\$\d+/},g,$,{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:[j,e.REGEXP_MODE,{className:"function",begin:H,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:U}]}]},{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"]}]}]},L,{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]},xe,Z,F,J,{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['"]/},p=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],h={$pattern:Dd,keyword:Bk.concat(p),literal:Uk,built_in:Hk.concat(s),"variable.language":qk},b={className:"meta",begin:"@"+a},g=(w,_,S)=>{const j=w.contains.findIndex(A=>A.label===_);if(j===-1)throw new Error("can not find mode to replace");w.contains.splice(j,1,S)};Object.assign(n.keywords,h),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 k=n.contains.find(w=>w.label==="func.def");return k.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}/,p={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),/ *#/)}]},h={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,p,h,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/},p={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},h={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,p,h,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"}),p=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),h={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,p,d,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,p,d]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[p]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[h],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[h],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:h}]},{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},k={begin:/\{/,end:/\}/,contains:[x],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[x],illegal:"\\n",relevance:0},_=[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},k,w,o,c],S=[..._];return S.pop(),S.push(d),x.contains=S,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:_}}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:k4,json:S4,kotlin:N4,less:M4,lua:L4,makefile:I4,markdown:z4,objectivec:B4,perl:U4,php:P4,"php-template":F4,plaintext:$4,python:q4,"python-repl":H4,r:K4,ruby:G4,rust:Y4,scss:nB,shell:iB,sql:aB,swift:fB,typescript:pB,vbnet:mB,wasm:gB,xml:bB,yaml:yB};var Gp,ow;function vB(){if(ow)return Gp;ow=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(re=>{const ve=B[re],ze=typeof ve;(ze==="object"||ze==="function")&&!Object.isFrozen(ve)&&e(ve)}),B}class t{constructor(re){re.data===void 0&&(re.data={}),this.data=re.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(B,...re){const ve=Object.create(null);for(const ze in B)ve[ze]=B[ze];return re.forEach(function(ze){for(const Nt in ze)ve[Nt]=ze[Nt]}),ve}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:re})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const ve=B.split(".");return[`${re}${ve.shift()}`,...ve.map((ze,Nt)=>`${ze}${"_".repeat(Nt+1)}`)].join(" ")}return`${re}${B}`};class d{constructor(re,ve){this.buffer="",this.classPrefix=ve.classPrefix,re.walk(this)}addText(re){this.buffer+=n(re)}openNode(re){if(!o(re))return;const ve=c(re.scope,{prefix:this.classPrefix});this.span(ve)}closeNode(re){o(re)&&(this.buffer+=s)}value(){return this.buffer}span(re){this.buffer+=`<span class="${re}">`}}const p=(B={})=>{const re={children:[]};return Object.assign(re,B),re};class h{constructor(){this.rootNode=p(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(re){this.top.children.push(re)}openNode(re){const ve=p({scope:re});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(re){return this.constructor._walk(re,this.rootNode)}static _walk(re,ve){return typeof ve=="string"?re.addText(ve):ve.children&&(re.openNode(ve),ve.children.forEach(ze=>this._walk(re,ze)),re.closeNode(ve)),re}static _collapse(re){typeof re!="string"&&re.children&&(re.children.every(ve=>typeof ve=="string")?re.children=[re.children.join("")]:re.children.forEach(ve=>{h._collapse(ve)}))}}class b extends h{constructor(re){super(),this.options=re}addText(re){re!==""&&this.add(re)}startScope(re){this.openNode(re)}endScope(){this.closeNode()}__addSublanguage(re,ve){const ze=re.root;ve&&(ze.scope=`language:${ve}`),this.add(ze)}toHTML(){return new d(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function v(B){return w("(?=",B,")")}function x(B){return w("(?:",B,")*")}function k(B){return w("(?:",B,")?")}function w(...B){return B.map(ve=>g(ve)).join("")}function _(B){const re=B[B.length-1];return typeof re=="object"&&re.constructor===Object?(B.splice(B.length-1,1),re):{}}function S(...B){return"("+(_(B).capture?"":"?:")+B.map(ze=>g(ze)).join("|")+")"}function j(B){return new RegExp(B.toString()+"|").exec("").length-1}function A(B,re){const ve=B&&B.exec(re);return ve&&ve.index===0}const D=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function U(B,{joinWith:re}){let ve=0;return B.map(ze=>{ve+=1;const Nt=ve;let vt=g(ze),Se="";for(;vt.length>0;){const Ee=D.exec(vt);if(!Ee){Se+=vt;break}Se+=vt.substring(0,Ee.index),vt=vt.substring(Ee.index+Ee[0].length),Ee[0][0]==="\\"&&Ee[1]?Se+="\\"+String(Number(Ee[1])+Nt):(Se+=Ee[0],Ee[0]==="("&&ve++)}return Se}).map(ze=>`(${ze})`).join(re)}const M=/\b\B/,F="[a-zA-Z]\\w*",$="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",Z="\\b(0b[01]+)",ie="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",xe=(B={})=>{const re=/^#![ ]*\//;return B.binary&&(B.begin=w(re,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:re,end:/$/,relevance:0,"on:begin":(ve,ze)=>{ve.index!==0&&ze.ignoreMatch()}},B)},ue={begin:"\\\\[\\s\\S]",relevance:0},J={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[ue]},H={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(B,re,ve={}){const ze=a({scope:"comment",begin:B,end:re,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 Nt=S("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(/[ ]+/,"(",Nt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ze},ae=de("//","$"),O=de("/\\*","\\*/"),R=de("#","$"),Q={scope:"number",begin:ee,relevance:0},T={scope:"number",begin:L,relevance:0},be={scope:"number",begin:Z,relevance:0},W={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[ue,{begin:/\[/,end:/\]/,relevance:0,contains:[ue]}]},fe={scope:"title",begin:F,relevance:0},K={scope:"title",begin:$,relevance:0},se={begin:"\\.\\s*"+$,relevance:0};var Oe=Object.freeze({__proto__:null,APOS_STRING_MODE:J,BACKSLASH_ESCAPE:ue,BINARY_NUMBER_MODE:be,BINARY_NUMBER_RE:Z,COMMENT:de,C_BLOCK_COMMENT_MODE:O,C_LINE_COMMENT_MODE:ae,C_NUMBER_MODE:T,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(re,ve)=>{ve.data._beginMatch=re[1]},"on:end":(re,ve)=>{ve.data._beginMatch!==re[1]&&ve.ignoreMatch()}})},HASH_COMMENT_MODE:R,IDENT_RE:F,MATCH_NOTHING_RE:M,METHOD_GUARD:se,NUMBER_MODE:Q,NUMBER_RE:ee,PHRASAL_WORDS_MODE:ce,QUOTE_STRING_MODE:H,REGEXP_MODE:W,RE_STARTERS_RE:ie,SHEBANG:xe,TITLE_MODE:fe,UNDERSCORE_IDENT_RE:$,UNDERSCORE_TITLE_MODE:K});function pt(B,re){B.input[B.index-1]==="."&&re.ignoreMatch()}function xt(B,re){B.className!==void 0&&(B.scope=B.className,delete B.className)}function ci(B,re){re&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=pt,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Yn(B,re){Array.isArray(B.illegal)&&(B.illegal=S(...B.illegal))}function Pi(B,re){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Je(B,re){B.relevance===void 0&&(B.relevance=1)}const Ti=(B,re)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const ve=Object.assign({},B);Object.keys(B).forEach(ze=>{delete B[ze]}),B.keywords=ve.keywords,B.begin=w(ve.beforeMatch,v(ve.begin)),B.starts={relevance:0,contains:[Object.assign(ve,{endsParent:!0})]},B.relevance=0,delete ve.beforeMatch},ui=["of","and","for","in","not","or","if","then","parent","list","value"],Fi="keyword";function na(B,re,ve=Fi){const ze=Object.create(null);return typeof B=="string"?Nt(ve,B.split(" ")):Array.isArray(B)?Nt(ve,B):Object.keys(B).forEach(function(vt){Object.assign(ze,na(B[vt],re,vt))}),ze;function Nt(vt,Se){re&&(Se=Se.map(Ee=>Ee.toLowerCase())),Se.forEach(function(Ee){const Ie=Ee.split("|");ze[Ie[0]]=[vt,Tr(Ie[0],Ie[1])]})}}function Tr(B,re){return re?Number(re):Yl(B)?0:1}function Yl(B){return ui.includes(B.toLowerCase())}const ys={},Rt=B=>{console.error(B)},xs=(B,...re)=>{console.log(`WARN: ${B}`,...re)},te=(B,re)=>{ys[`${B}/${re}`]||(console.log(`Deprecated as of ${B}. ${re}`),ys[`${B}/${re}`]=!0)},ge=new Error;function Re(B,re,{key:ve}){let ze=0;const Nt=B[ve],vt={},Se={};for(let Ee=1;Ee<=re.length;Ee++)Se[Ee+ze]=Nt[Ee],vt[Ee+ze]=!0,ze+=j(re[Ee-1]);B[ve]=Se,B[ve]._emit=vt,B[ve]._multi=!0}function Ke(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Rt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),ge;if(typeof B.beginScope!="object"||B.beginScope===null)throw Rt("beginScope must be object"),ge;Re(B,B.begin,{key:"beginScope"}),B.begin=U(B.begin,{joinWith:""})}}function it(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Rt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),ge;if(typeof B.endScope!="object"||B.endScope===null)throw Rt("endScope must be object"),ge;Re(B,B.end,{key:"endScope"}),B.end=U(B.end,{joinWith:""})}}function wn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function Ai(B){wn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),Ke(B),it(B)}function ln(B){function re(Se,Ee){return new RegExp(g(Se),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(Ee?"g":""))}class ve{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ee,Ie){Ie.position=this.position++,this.matchIndexes[this.matchAt]=Ie,this.regexes.push([Ie,Ee]),this.matchAt+=j(Ee)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ee=this.regexes.map(Ie=>Ie[1]);this.matcherRe=re(U(Ee,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ee){this.matcherRe.lastIndex=this.lastIndex;const Ie=this.matcherRe.exec(Ee);if(!Ie)return null;const Ht=Ie.findIndex((ia,ws)=>ws>0&&ia!==void 0),At=this.matchIndexes[Ht];return Ie.splice(0,Ht),Object.assign(Ie,At)}}class ze{constructor(){this.rules=[],this.multiRegexes=[],this.count=0,this.lastIndex=0,this.regexIndex=0}getMatcher(Ee){if(this.multiRegexes[Ee])return this.multiRegexes[Ee];const Ie=new ve;return this.rules.slice(Ee).forEach(([Ht,At])=>Ie.addRule(Ht,At)),Ie.compile(),this.multiRegexes[Ee]=Ie,Ie}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ee,Ie){this.rules.push([Ee,Ie]),Ie.type==="begin"&&this.count++}exec(Ee){const Ie=this.getMatcher(this.regexIndex);Ie.lastIndex=this.lastIndex;let Ht=Ie.exec(Ee);if(this.resumingScanAtSamePosition()&&!(Ht&&Ht.index===this.lastIndex)){const At=this.getMatcher(0);At.lastIndex=this.lastIndex+1,Ht=At.exec(Ee)}return Ht&&(this.regexIndex+=Ht.position+1,this.regexIndex===this.count&&this.considerAll()),Ht}}function Nt(Se){const Ee=new ze;return Se.contains.forEach(Ie=>Ee.addRule(Ie.begin,{rule:Ie,type:"begin"})),Se.terminatorEnd&&Ee.addRule(Se.terminatorEnd,{type:"end"}),Se.illegal&&Ee.addRule(Se.illegal,{type:"illegal"}),Ee}function vt(Se,Ee){const Ie=Se;if(Se.isCompiled)return Ie;[xt,Pi,Ai,Ti].forEach(At=>At(Se,Ee)),B.compilerExtensions.forEach(At=>At(Se,Ee)),Se.__beforeBegin=null,[ci,Yn,Je].forEach(At=>At(Se,Ee)),Se.isCompiled=!0;let Ht=null;return typeof Se.keywords=="object"&&Se.keywords.$pattern&&(Se.keywords=Object.assign({},Se.keywords),Ht=Se.keywords.$pattern,delete Se.keywords.$pattern),Ht=Ht||/\w+/,Se.keywords&&(Se.keywords=na(Se.keywords,B.case_insensitive)),Ie.keywordPatternRe=re(Ht,!0),Ee&&(Se.begin||(Se.begin=/\B|\b/),Ie.beginRe=re(Ie.begin),!Se.end&&!Se.endsWithParent&&(Se.end=/\B|\b/),Se.end&&(Ie.endRe=re(Ie.end)),Ie.terminatorEnd=g(Ie.end)||"",Se.endsWithParent&&Ee.terminatorEnd&&(Ie.terminatorEnd+=(Se.end?"|":"")+Ee.terminatorEnd)),Se.illegal&&(Ie.illegalRe=re(Se.illegal)),Se.contains||(Se.contains=[]),Se.contains=[].concat(...Se.contains.map(function(At){return hn(At==="self"?Se:At)})),Se.contains.forEach(function(At){vt(At,Ie)}),Se.starts&&vt(Se.starts,Ee),Ie.matcher=Nt(Ie),Ie}if(B.compilerExtensions||(B.compilerExtensions=[]),B.contains&&B.contains.includes("self"))throw new Error("ERR: contains `self` is not supported at the top-level of a language. See documentation.");return B.classNameAliases=a(B.classNameAliases||{}),vt(B)}function Ut(B){return B?B.endsWithParent||Ut(B.starts):!1}function hn(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(re){return a(B,{variants:null},re)})),B.cachedVariants?B.cachedVariants:Ut(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var ct="11.11.1";class $i extends Error{constructor(re,ve){super(re),this.name="HTMLInjectionError",this.html=ve}}const En=n,jc=a,Ar=Symbol("nomatch"),vs=7,jr=function(B){const re=Object.create(null),ve=Object.create(null),ze=[];let Nt=!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 Ee={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(pe){return Ee.noHighlightRe.test(pe)}function Ht(pe){let Te=pe.className+" ";Te+=pe.parentNode?pe.parentNode.className:"";const Ge=Ee.languageDetectRe.exec(Te);if(Ge){const ut=kn(Ge[1]);return ut||(xs(vt.replace("{}",Ge[1])),xs("Falling back to no-highlight mode for this block.",pe)),ut?Ge[1]:"no-highlight"}return Te.split(/\s+/).find(ut=>Ie(ut)||kn(ut))}function At(pe,Te,Ge){let ut="",Gt="";typeof Te=="object"?(ut=pe,Ge=Te.ignoreIllegals,Gt=Te.language):(te("10.7.0","highlight(lang, code, ...args) has been deprecated."),te("10.7.0",`Please use highlight(code, options) instead.
|
|
544
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Gt=pe,ut=Te),Ge===void 0&&(Ge=!0);const mn={code:ut,language:Gt};Dr("before:highlight",mn);const Qn=mn.result?mn.result:ia(mn.language,mn.code,Ge);return Qn.code=mn.code,Dr("after:highlight",Qn),Qn}function ia(pe,Te,Ge,ut){const Gt=Object.create(null);function mn(ye,_e){return ye.keywords[_e]}function Qn(){if(!Le.keywords){Wt.addText(dt);return}let ye=0;Le.keywordPatternRe.lastIndex=0;let _e=Le.keywordPatternRe.exec(dt),Pe="";for(;_e;){Pe+=dt.substring(ye,_e.index);const We=on.case_insensitive?_e[0].toLowerCase():_e[0],Mt=mn(Le,We);if(Mt){const[di,Jl]=Mt;if(Wt.addText(Pe),Pe="",Gt[We]=(Gt[We]||0)+1,Gt[We]<=vs&&(Ia+=Jl),di.startsWith("_"))Pe+=_e[0];else{const zc=on.classNameAliases[di]||di;Vn(_e[0],zc)}}else Pe+=_e[0];ye=Le.keywordPatternRe.lastIndex,_e=Le.keywordPatternRe.exec(dt)}Pe+=dt.substring(ye),Wt.addText(Pe)}function On(){if(dt==="")return;let ye=null;if(typeof Le.subLanguage=="string"){if(!re[Le.subLanguage]){Wt.addText(dt);return}ye=ia(Le.subLanguage,dt,!0,Ic[Le.subLanguage]),Ic[Le.subLanguage]=ye._top}else ye=Es(dt,Le.subLanguage.length?Le.subLanguage:null);Le.relevance>0&&(Ia+=ye.relevance),Wt.__addSublanguage(ye._emitter,ye.language)}function St(){Le.subLanguage!=null?On():Qn(),dt=""}function Vn(ye,_e){ye!==""&&(Wt.startScope(_e),Wt.addText(ye),Wt.endScope())}function Mc(ye,_e){let Pe=1;const We=_e.length-1;for(;Pe<=We;){if(!ye._emit[Pe]){Pe++;continue}const Mt=on.classNameAliases[ye[Pe]]||ye[Pe],di=_e[Pe];Mt?Vn(di,Mt):(dt=di,Qn(),dt=""),Pe++}}function Ss(ye,_e){return ye.scope&&typeof ye.scope=="string"&&Wt.openNode(on.classNameAliases[ye.scope]||ye.scope),ye.beginScope&&(ye.beginScope._wrap?(Vn(dt,on.classNameAliases[ye.beginScope._wrap]||ye.beginScope._wrap),dt=""):ye.beginScope._multi&&(Mc(ye.beginScope,_e),dt="")),Le=Object.create(ye,{parent:{value:Le}}),Le}function Wl(ye,_e,Pe){let We=A(ye.endRe,Pe);if(We){if(ye["on:end"]){const Mt=new t(ye);ye["on:end"](_e,Mt),Mt.isMatchIgnored&&(We=!1)}if(We){for(;ye.endsParent&&ye.parent;)ye=ye.parent;return ye}}if(ye.endsWithParent)return Wl(ye.parent,_e,Pe)}function _s(ye){return Le.matcher.regexIndex===0?(dt+=ye[0],1):(za=!0,0)}function sf(ye){const _e=ye[0],Pe=ye.rule,We=new t(Pe),Mt=[Pe.__beforeBegin,Pe["on:begin"]];for(const di of Mt)if(di&&(di(ye,We),We.isMatchIgnored))return _s(_e);return Pe.skip?dt+=_e:(Pe.excludeBegin&&(dt+=_e),St(),!Pe.returnBegin&&!Pe.excludeBegin&&(dt=_e)),Ss(Pe,ye),Pe.returnBegin?0:_e.length}function Dn(ye){const _e=ye[0],Pe=Te.substring(ye.index),We=Wl(Le,ye,Pe);if(!We)return Ar;const Mt=Le;Le.endScope&&Le.endScope._wrap?(St(),Vn(_e,Le.endScope._wrap)):Le.endScope&&Le.endScope._multi?(St(),Mc(Le.endScope,ye)):Mt.skip?dt+=_e:(Mt.returnEnd||Mt.excludeEnd||(dt+=_e),St(),Mt.excludeEnd&&(dt=_e));do Le.scope&&Wt.closeNode(),!Le.skip&&!Le.subLanguage&&(Ia+=Le.relevance),Le=Le.parent;while(Le!==We.parent);return We.starts&&Ss(We.starts,ye),Mt.returnEnd?0:_e.length}function Xl(){const ye=[];for(let _e=Le;_e!==on;_e=_e.parent)_e.scope&&ye.unshift(_e.scope);ye.forEach(_e=>Wt.openNode(_e))}let Rr={};function Ns(ye,_e){const Pe=_e&&_e[0];if(dt+=ye,Pe==null)return St(),0;if(Rr.type==="begin"&&_e.type==="end"&&Rr.index===_e.index&&Pe===""){if(dt+=Te.slice(_e.index,_e.index+1),!Nt){const We=new Error(`0 width match regex (${pe})`);throw We.languageName=pe,We.badRule=Rr.rule,We}return 1}if(Rr=_e,_e.type==="begin")return sf(_e);if(_e.type==="illegal"&&!Ge){const We=new Error('Illegal lexeme "'+Pe+'" for mode "'+(Le.scope||"<unnamed>")+'"');throw We.mode=Le,We}else if(_e.type==="end"){const We=Dn(_e);if(We!==Ar)return We}if(_e.type==="illegal"&&Pe==="")return dt+=`
|
|
545
|
-
`,1;if(Zl>1e5&&Zl>_e.index*3)throw new Error("potential infinite loop, way more iterations than matches");return dt+=Pe,Pe.length}const on=kn(pe);if(!on)throw Rt(vt.replace("{}",pe)),new Error('Unknown language: "'+pe+'"');const Lc=ln(on);let Cs="",Le=ut||Lc;const Ic={},Wt=new Ee.__emitter(Ee);Xl();let dt="",Ia=0,sa=0,Zl=0,za=!1;try{if(on.__emitTokens)on.__emitTokens(Te,Wt);else{for(Le.matcher.considerAll();;){Zl++,za?za=!1:Le.matcher.considerAll(),Le.matcher.lastIndex=sa;const ye=Le.matcher.exec(Te);if(!ye)break;const _e=Te.substring(sa,ye.index),Pe=Ns(_e,ye);sa=ye.index+Pe}Ns(Te.substring(sa))}return Wt.finalize(),Cs=Wt.toHTML(),{language:pe,value:Cs,relevance:Ia,illegal:!1,_emitter:Wt,_top:Le}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:pe,value:En(Te),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:sa,context:Te.slice(sa-100,sa+100),mode:ye.mode,resultSoFar:Cs},_emitter:Wt};if(Nt)return{language:pe,value:En(Te),illegal:!1,relevance:0,errorRaised:ye,_emitter:Wt,_top:Le};throw ye}}function ws(pe){const Te={value:En(pe),illegal:!1,relevance:0,_top:Se,_emitter:new Ee.__emitter(Ee)};return Te._emitter.addText(pe),Te}function Es(pe,Te){Te=Te||Ee.languages||Object.keys(re);const Ge=ws(pe),ut=Te.filter(kn).filter(Ma).map(St=>ia(St,pe,!1));ut.unshift(Ge);const Gt=ut.sort((St,Vn)=>{if(St.relevance!==Vn.relevance)return Vn.relevance-St.relevance;if(St.language&&Vn.language){if(kn(St.language).supersetOf===Vn.language)return 1;if(kn(Vn.language).supersetOf===St.language)return-1}return 0}),[mn,Qn]=Gt,On=mn;return On.secondBest=Qn,On}function qi(pe,Te,Ge){const ut=Te&&ve[Te]||Ge;pe.classList.add("hljs"),pe.classList.add(`language-${ut}`)}function Kt(pe){let Te=null;const Ge=Ht(pe);if(Ie(Ge))return;if(Dr("before:highlightElement",{el:pe,language:Ge}),pe.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",pe);return}if(pe.children.length>0&&(Ee.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(pe)),Ee.throwUnescapedHTML))throw new $i("One of your code blocks includes unescaped HTML.",pe.innerHTML);Te=pe;const ut=Te.textContent,Gt=Ge?At(ut,{language:Ge,ignoreIllegals:!0}):Es(ut);pe.innerHTML=Gt.value,pe.dataset.highlighted="yes",qi(pe,Ge,Gt.language),pe.result={language:Gt.language,re:Gt.relevance,relevance:Gt.relevance},Gt.secondBest&&(pe.secondBest={language:Gt.secondBest.language,relevance:Gt.secondBest.relevance}),Dr("after:highlightElement",{el:pe,result:Gt,text:ut})}function pn(pe){Ee=jc(Ee,pe)}const Ra=()=>{ks(),te("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ql(){ks(),te("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Oc=!1;function ks(){function pe(){ks()}if(document.readyState==="loading"){Oc||window.addEventListener("DOMContentLoaded",pe,!1),Oc=!0;return}document.querySelectorAll(Ee.cssSelector).forEach(Kt)}function Dc(pe,Te){let Ge=null;try{Ge=Te(B)}catch(ut){if(Rt("Language definition for '{}' could not be registered.".replace("{}",pe)),Nt)Rt(ut);else throw ut;Ge=Se}Ge.name||(Ge.name=pe),re[pe]=Ge,Ge.rawDefinition=Te.bind(null,B),Ge.aliases&&aa(Ge.aliases,{languageName:pe})}function Or(pe){delete re[pe];for(const Te of Object.keys(ve))ve[Te]===pe&&delete ve[Te]}function Vl(){return Object.keys(re)}function kn(pe){return pe=(pe||"").toLowerCase(),re[pe]||re[ve[pe]]}function aa(pe,{languageName:Te}){typeof pe=="string"&&(pe=[pe]),pe.forEach(Ge=>{ve[Ge.toLowerCase()]=Te})}function Ma(pe){const Te=kn(pe);return Te&&!Te.disableAutodetect}function La(pe){pe["before:highlightBlock"]&&!pe["before:highlightElement"]&&(pe["before:highlightElement"]=Te=>{pe["before:highlightBlock"](Object.assign({block:Te.el},Te))}),pe["after:highlightBlock"]&&!pe["after:highlightElement"]&&(pe["after:highlightElement"]=Te=>{pe["after:highlightBlock"](Object.assign({block:Te.el},Te))})}function Vt(pe){La(pe),ze.push(pe)}function Rc(pe){const Te=ze.indexOf(pe);Te!==-1&&ze.splice(Te,1)}function Dr(pe,Te){const Ge=pe;ze.forEach(function(ut){ut[Ge]&&ut[Ge](Te)})}function ra(pe){return te("10.7.0","highlightBlock will be removed entirely in v12.0"),te("10.7.0","Please use highlightElement now."),Kt(pe)}Object.assign(B,{highlight:At,highlightAuto:Es,highlightAll:ks,highlightElement:Kt,highlightBlock:ra,configure:pn,initHighlighting:Ra,initHighlightingOnLoad:Ql,registerLanguage:Dc,unregisterLanguage:Or,listLanguages:Vl,getLanguage:kn,registerAliases:aa,autoDetection:Ma,inherit:jc,addPlugin:Vt,removePlugin:Rc}),B.debugMode=function(){Nt=!1},B.safeMode=function(){Nt=!0},B.versionString=ct,B.regex={concat:w,lookahead:v,either:S,optional:k,anyNumberOfTimes:x};for(const pe in Oe)typeof Oe[pe]=="object"&&e(Oe[pe]);return Object.assign(B,Oe),B},jn=jr({});return jn.newInstance=()=>jr({}),Gp=jn,jn.HighlightJS=jn,jn.default=jn,Gp}var wB=vB();const EB=Lm(wB),cw={},kB="hljs-";function SB(e){const t=EB.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:d};function n(p,h,b){const g=b||cw,v=typeof g.prefix=="string"?g.prefix:kB;if(!t.getLanguage(p))throw new Error("Unknown language: `"+p+"` is not registered");t.configure({__emitter:_B,classPrefix:v});const x=t.highlight(h,{ignoreIllegals:!0,language:p});if(x.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:x.errorRaised});const k=x._emitter.root,w=k.data;return w.language=x.language,w.relevance=x.relevance,k}function a(p,h){const g=(h||cw).subset||s();let v=-1,x=0,k;for(;++v<g.length;){const w=g[v];if(!t.getLanguage(w))continue;const _=n(w,p,h);_.data&&_.data.relevance!==void 0&&_.data.relevance>x&&(x=_.data.relevance,k=_)}return k||{type:"root",children:[],data:{language:void 0,relevance:x}}}function s(){return t.listLanguages()}function o(p,h){if(typeof p=="string")t.registerLanguage(p,h);else{let b;for(b in p)Object.hasOwn(p,b)&&t.registerLanguage(b,p[b])}}function c(p,h){if(typeof p=="string")t.registerAliases(typeof h=="string"?h:[...h],{languageName:p});else{let b;for(b in p)if(Object.hasOwn(p,b)){const g=p[b];t.registerAliases(typeof g=="string"?g:[...g],{languageName:b})}}}function d(p){return!!t.getLanguage(p)}}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 p="hljs";const h=SB(s);if(n&&h.registerAlias(n),c){const b=c.indexOf("-");p=b===-1?c:c.slice(0,b)}return function(b,g){rf(b,"element",function(v,x,k){if(v.tagName!=="code"||!k||k.type!=="element"||k.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(p)||v.properties.className.unshift(p);const _=Gz(v,{whitespace:"pre"});let S;try{S=w?h.highlight(w,_,{prefix:c}):h.highlightAuto(_,{prefix:c,subset:d})}catch(j){const A=j;if(w&&/Unknown language/.test(A.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[k,v],cause:A,place:v.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw A}!w&&S.data&&S.data.language&&v.properties.className.push("language-"+S.data.language),S.children.length>0&&(v.children=S.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{confirm:s,alert:o}=oi(),{data:c,isLoading:d,isError:p,error:h,refetch:b}=lt({queryKey:["skill",e],queryFn:()=>pO(e)});C.useEffect(()=>{const S=j=>{j.key==="Escape"&&n()};return window.addEventListener("keydown",S),()=>window.removeEventListener("keydown",S)},[n]);const g=async(S,j)=>{try{await j(),await b(),a()}catch(A){o({title:`${S}失败`,body:A instanceof Error?A.message:String(A)})}},v=S=>g("link",()=>gO(e,S)),x=async S=>{await s({title:`从 ${S} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&await g("unlink",()=>bO(e,S))},k=S=>g("freeze",()=>yO(e,S)),w=async S=>{await s({title:`解冻 ${e} @ ${S}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&await g("unfreeze",()=>xO(e,S))},_=new Map(((c==null?void 0:c.linkedProjects)??[]).map(S=>[S.project,S.state]));return f.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:f.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[f.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[f.jsxs("div",{children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),c&&f.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[c.category," · ",c.origin||"local"]})]}),f.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:f.jsx(_i,{size:16,strokeWidth:3})})]}),d&&f.jsx("p",{children:"加载中…"}),p&&f.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),c&&f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),f.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(S=>{const j=_.get(S);return f.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:[f.jsxs("div",{className:"flex items-center gap-3",children:[f.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:S}),j==="linked"&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),j==="frozen"&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!j&&f.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),f.jsxs("div",{className:"flex gap-2",children:[!j&&f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(S),type:"button",children:[f.jsx(S2,{size:11})," link"]}),j==="linked"&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>k(S),type:"button",children:[f.jsx(Y2,{size:11})," freeze"]}),f.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(S),type:"button",children:"unlink"})]}),j==="frozen"&&f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(S),type:"button",children:[f.jsx(n2,{size:11})," unfreeze"]}),f.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(S),type:"button",children:"unlink"})]})]})]},S)}),t.length===0&&f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),f.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:c.body?f.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Ug],children:c.body}):f.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),c.references.length>0&&f.jsxs("div",{children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),f.jsx("ul",{className:"flex flex-col gap-2",children:c.references.map(S=>f.jsx(AB,{skillName:e,file:S.name,lines:S.lines},S.name))})]})]})]})})}function AB({skillName:e,file:t,lines:n}){const[a,s]=C.useState(!1),{data:o,isLoading:c,isError:d,error:p}=lt({queryKey:["skill-ref",e,t],queryFn:()=>mO(e,t),enabled:a,staleTime:1/0});return f.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[f.jsxs("button",{type:"button",onClick:()=>s(h=>!h),"aria-label":`${a?"收起":"展开"} ${t}`,"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[f.jsx(Bd,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),f.jsx(Ec,{size:12,strokeWidth:2.5}),f.jsx("span",{className:"flex-1 text-left font-bold",children:t}),f.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&f.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[c&&f.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),d&&f.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",p instanceof Error?p.message:String(p)]}),o&&f.jsx("div",{className:"prose-chat text-sm",children:f.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Ug],children:o.content})})]})]})}const jB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],OB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function DB(){var v;const[e,t]=C.useState("all"),[n,a]=C.useState(""),[s,o]=C.useState(null),c=Kn(),{data:d,isLoading:p}=lt({queryKey:["skills"],queryFn:()=>pg()}),h=lt({queryKey:["projects"],queryFn:_r}),b=C.useMemo(()=>((d==null?void 0:d.data)??[]).filter(k=>!(e!=="all"&&k.category!==e||n&&!k.name.toLowerCase().includes(n.toLowerCase()))),[d,e,n]),g=C.useMemo(()=>{const x=(d==null?void 0:d.data)??[],k={all:x.length};for(const w of x)k[w.category]=(k[w.category]??0)+1;return k},[d]);return f.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[f.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[f.jsxs("div",{children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:p?"加载中…":`${(d==null?void 0:d.data.length)??0} 个 user-level skill`})]}),f.jsx("div",{className:"flex gap-3 items-center",children:f.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await vO(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[f.jsx(Al,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),f.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[f.jsxs("div",{className:"relative flex-1 max-w-md",children:[f.jsx(Ed,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),f.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:n,onChange:x=>a(x.target.value),"aria-label":"搜索 skill"})]}),f.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(x=>f.jsxs("button",{type:"button",onClick:()=>t(x.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===x.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[x.label," ",g[x.value]]},x.value))})]}),f.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:b.map(x=>{var k;return f.jsx(RB,{skill:x,projectCount:((k=h.data)==null?void 0:k.data.length)??0,onOpen:()=>o(x.name)},x.name)})}),s&&f.jsx(TB,{name:s,projects:((v=h.data)==null?void 0:v.data.map(x=>x.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function RB({skill:e,projectCount:t,onOpen:n}){const a=OB[e.category];return f.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:[f.jsxs("div",{className:"flex items-center justify-between",children:[f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),f.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),f.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:[f.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),f.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function MB(){var s;const e=lt({queryKey:["system-info"],queryFn:bE}),t=lt({queryKey:["system-env"],queryFn:gA}),[n,a]=C.useState(!1);return f.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[f.jsx("header",{children:f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),f.jsx(LB,{current:(s=e.data)==null?void 0:s.version}),f.jsxs("section",{className:"nb-card",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"Node"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),f.jsx("dt",{className:"font-bold",children:"Platform"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),f.jsx("dt",{className:"font-bold",children:"PID"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),f.jsx("dt",{className:"font-bold",children:"Uptime"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:UB(e.data.uptimeMs)})]}):f.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",f.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),n?f.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":"编辑 env 文件",children:[f.jsx(Wm,{size:12,strokeWidth:2.5})," 编辑"]})]}),n?f.jsx(IB,{onClose:()=>{a(!1),t.refetch()}}):t.data&&t.data.exists?f.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(o=>f.jsxs("div",{className:"contents",children:[f.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[o.masked&&f.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),o.key]}),f.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:o.value})]},o.key))}):f.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',f.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"}),"。"]})]}),f.jsx(zB,{})]})}function LB({current:e}){var k;const{confirm:t,alert:n}=oi(),[a,s]=C.useState(!1),[o,c]=C.useState(null),d=lt({queryKey:["latest-version"],queryFn:xA,enabled:!1}),[p,h]=C.useState(null),[b,g]=C.useState("npm i -g @coralai/sps-cli@latest"),v=async()=>{var _;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(_=d.data)==null?void 0:_.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){s(!0),c(null),h(null);try{const S=await vA();if(c(S.output),h(S.installedVersion),g(S.command),S.ok)n({title:"升级完成",body:`装上了 v${S.installedVersion}。请 \`pkill -f "sps console"\` 再重启以生效。`});else{const j=S.installedVersion&&S.installedVersion===e?`npm 执行完毕但版本没变(仍 ${S.installedVersion})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。`:"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。";n({title:"升级未生效",body:j})}}catch(S){c(S.message),n({title:"升级失败",body:S.message})}finally{s(!1)}}},x=async()=>{const w=d.data&&!d.data.upToDate?`npm i -g @coralai/sps-cli@${d.data.latest}`:b;try{await navigator.clipboard.writeText(w),n({title:"命令已复制",body:`粘贴到终端运行即可:
|
|
546
|
-
${w}`})}catch{n({title:"复制失败",body:`请手动复制:
|
|
547
|
-
${w}`})}};return f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>d.refetch(),disabled:d.isFetching||!e,type:"button","aria-label":"检查最新版本",children:[d.isFetching?f.jsx(It,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Al,{size:12,strokeWidth:2.5}),"检查更新"]})]}),f.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[f.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),f.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),d.data&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:"npm (最新)"}),f.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[d.data.latest,d.data.upToDate?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):f.jsxs(f.Fragment,{children:[f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:v,disabled:a,type:"button","aria-label":"升级到最新版本",children:[a?f.jsx(It,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(aE,{size:11,strokeWidth:2.5}),"升级"]}),f.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:x,type:"button","aria-label":"复制升级命令",title:"自动升级失败时手动跑",children:[f.jsx(VT,{size:11,strokeWidth:2.5})," 复制命令"]})]})]})]}),p&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:"已安装"}),f.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[p,p===((k=d.data)==null?void 0:k.latest)?f.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"已生效(重启 console 后可见)"}):p===e?f.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"未升级成功"}):null]})]}),d.isError&&f.jsxs(f.Fragment,{children:[f.jsx("dt",{className:"font-bold",children:"检查"}),f.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:d.error instanceof Error?d.error.message:String(d.error)})]})]}),o&&f.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:o})]})}function IB({onClose:e}){const t=Kn(),{alert:n}=oi(),a=lt({queryKey:["system-env-raw"],queryFn:bA}),[s,o]=C.useState(null),[c,d]=C.useState(null);C.useEffect(()=>{a.data&&s===null&&(o(a.data.content),d(a.data.etag))},[a.data,s]);const p=s!==null&&a.data&&s!==a.data.content,h=Hn({mutationFn:()=>{if(s===null)throw new Error("no draft");return yA(s,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:b=>{const g=b.status;n({title:g===409?"env 被其他地方修改了":"保存失败",body:g===409?"请点取消后重开编辑。":b instanceof Error?b.message:String(b)})}});return a.isLoading?f.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):f.jsxs("div",{children:[f.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),f.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:s??"",onChange:b=>o(b.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),f.jsxs("div",{className:"flex items-center justify-between mt-3",children:[f.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",p?" · ● 未保存":""]}),f.jsxs("div",{className:"flex gap-2",children:[f.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:h.isPending,type:"button",children:[f.jsx(_i,{size:12,strokeWidth:3})," 取消"]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>h.mutate(),disabled:!p||h.isPending,type:"button","aria-label":"保存 env",children:[h.isPending?f.jsx(It,{size:12,strokeWidth:3,className:"animate-spin"}):f.jsx(Ud,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function zB(){var g;const{alert:e}=oi(),t=lt({queryKey:["projects"],queryFn:_r}),[n,a]=C.useState({}),[s,o]=C.useState({}),[c,d]=C.useState({}),p=(((g=t.data)==null?void 0:g.data)??[]).map(v=>({project:v.name})),h=async(v,x)=>{o(k=>({...k,[v]:x?"fix":"check"}));try{const k=await wA(v,x);a(w=>({...w,[v]:k})),d(w=>({...w,[v]:!0}))}catch(k){e({title:`doctor ${x?"修复":"检查"}失败`,body:k instanceof Error?k.message:String(k)})}finally{o(k=>({...k,[v]:null}))}},b=async()=>{for(const v of p)await h(v.project,!1)};return f.jsxs("section",{className:"nb-card",children:[f.jsxs("div",{className:"flex items-center justify-between mb-3",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),f.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{b()},disabled:p.length===0||Object.values(s).some(Boolean),type:"button",children:[f.jsx(Al,{size:12,strokeWidth:2.5}),"检查全部"]})]}),p.length===0?f.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"}):f.jsx("ul",{className:"flex flex-col gap-2",children:p.map(v=>{const x=n[v.project],k=s[v.project],w=x?x.checks.filter(A=>A.status==="fail").length:0,_=x?x.checks.filter(A=>A.status==="warn").length:0,S=c[v.project]??!1,j=x!=null;return f.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[f.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[f.jsxs("button",{type:"button",onClick:()=>d(A=>({...A,[v.project]:!S})),disabled:!j,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":S?"折叠":"展开",children:[j&&x.ok?f.jsx(fm,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):j?f.jsx(sc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):f.jsx(fm,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),j&&(S?f.jsx(wc,{size:12}):f.jsx(Bd,{size:12})),f.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:v.project}),j?x.ok?f.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):f.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[w," fail · ",_," warn"]}):f.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:'点 "检查" 运行 sps doctor'})]}),f.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{h(v.project,!1)},disabled:!!k,type:"button","aria-label":"检查",children:[k==="check"?f.jsx(It,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(Al,{size:11,strokeWidth:2.5}),"检查"]}),f.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{h(v.project,!0)},disabled:!!k||j&&x.ok,type:"button","aria-label":"自动修复",title:j&&x.ok?"已无可修问题":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等",children:[k==="fix"?f.jsx(It,{size:11,strokeWidth:3,className:"animate-spin"}):f.jsx(hE,{size:11,strokeWidth:2.5}),"修复"]})]}),S&&j&&f.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[f.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:x.checks.map((A,D)=>f.jsx(BB,{check:A},`${A.name}-${D}`))}),x.fixes.length>0&&f.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[f.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:"已修复"}),f.jsx("ul",{className:"text-xs list-disc pl-4",children:x.fixes.map((A,D)=>f.jsx("li",{children:A},D))})]})]})]},v.project)})})]})}function BB({check:e}){const t=e.status==="pass"?f.jsx(fm,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?f.jsx(sc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?f.jsx(sc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):f.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return f.jsxs("li",{className:"flex items-start gap-2",children:[f.jsx("span",{className:"pt-0.5 shrink-0",children:t}),f.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),f.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 qt("/api/chat/sessions")}function FB(e){return qt(`/api/chat/sessions/${e}`)}async function Yp(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 $B(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function qB(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 qt(`/api/chat/sessions/${e}/messages${n}`)}function uw(){var H,ce,de,ae,O,R,Q,T,be;const{sessionId:e}=Yw(),t=Sr(),n=Kn(),{confirm:a,alert:s}=oi(),o=lt({queryKey:["chat-sessions"],queryFn:PB}),c=lt({queryKey:["chat-session",e],queryFn:()=>FB(e??""),enabled:!!e}),[d,p]=C.useState(null),[h,b]=C.useState(""),[g,v]=C.useState(!1),x=C.useRef(null),[k,w]=C.useState(!1),[_,S]=C.useState([]),[j,A]=C.useState(!1),[D,U]=C.useState(!1),[M,F]=C.useState(!1),[$,ee]=C.useState(null);C.useEffect(()=>{if(!e)return;const W=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let fe=!0;return W.addEventListener("open",()=>{if(fe){fe=!1;return}const K=n.getQueryData(["chat-session",e]),se=K!=null&&K.messages.length?K.messages[K.messages.length-1].ts:void 0;KB(e,se).then(he=>{he.data.length!==0&&n.setQueryData(["chat-session",e],Oe=>{if(!Oe)return Oe;const pt=new Set(Oe.messages.map(ci=>ci.id)),xt=he.data.filter(ci=>!pt.has(ci.id));return xt.length===0?Oe:{...Oe,messages:[...Oe.messages,...xt],lastMessageAt:xt[xt.length-1].ts,messageCount:Oe.messageCount+xt.length}})}).catch(()=>{})}),W.addEventListener("chat.message",K=>{try{const se=JSON.parse(K.data);n.setQueryData(["chat-session",e],he=>{if(!he||he.messages.some(xt=>xt.id===se.message.id))return he;const pt=he.messages.findIndex(xt=>xt.role==="user"&&xt.id.startsWith("optim-")&&xt.content===se.message.content);if(pt>=0){const xt=[...he.messages];return xt[pt]=se.message,{...he,messages:xt}}return{...he,messages:[...he.messages,se.message]}})}catch{}}),W.addEventListener("chat.message.pending",K=>{try{const se=JSON.parse(K.data);p({id:se.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),W.addEventListener("chat.message.chunk.text",K=>{try{const se=JSON.parse(K.data);p(he=>{if(!he||he.id!==se.assistantId)return he;const Oe=[...he.blocks],pt=Oe[Oe.length-1];return pt&&pt.type==="text"?Oe[Oe.length-1]={...pt,target:pt.target+se.text}:Oe.push({type:"text",target:se.text,displayed:""}),{...he,blocks:Oe}})}catch{}}),W.addEventListener("chat.message.chunk.tool_use",K=>{try{const se=JSON.parse(K.data);p(he=>!he||he.id!==se.assistantId?he:{...he,blocks:[...he.blocks,{type:"tool_use",id:se.id,title:se.title,kind:se.kind,status:se.status}]})}catch{}}),W.addEventListener("chat.message.chunk.tool_update",K=>{try{const se=JSON.parse(K.data);p(he=>!he||he.id!==se.assistantId?he:{...he,blocks:he.blocks.map(Oe=>Oe.type==="tool_use"&&Oe.id===se.id?{...Oe,status:se.status}:Oe)})}catch{}}),W.addEventListener("chat.message.complete",K=>{try{const se=JSON.parse(K.data);p(he=>he&&he.id===se.assistantId?{...he,done:!0,finalMessage:se.message}:he)}catch{}}),()=>W.close()},[e,n]),C.useEffect(()=>{if(!d)return;const W=d.blocks.reduce((K,se)=>se.type==="text"?K+(se.target.length-se.displayed.length):K,0);if(W<=0){if(d.done&&d.finalMessage){const K=d.finalMessage;n.setQueryData(["chat-session",e],se=>!se||se.messages.some(he=>he.id===K.id)?se:{...se,messages:[...se.messages,K],lastMessageAt:K.ts,messageCount:se.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),p(null),v(!1)}return}const fe=setTimeout(()=>{p(K=>{if(!K)return K;let se=Math.max(1,Math.ceil(W/40));const he=K.blocks.map(Oe=>{if(Oe.type!=="text"||se<=0)return Oe;const pt=Oe.target.length-Oe.displayed.length;if(pt<=0)return Oe;const xt=Math.min(pt,se);return se-=xt,{...Oe,displayed:Oe.target.slice(0,Oe.displayed.length+xt)}});return{...K,blocks:he}})},25);return()=>clearTimeout(fe)},[d,n,e]),C.useEffect(()=>{const W=x.current;W&&(W.scrollTop=W.scrollHeight)},[c.data,d]);const L=C.useCallback(async(W={})=>{var fe,K;try{const se=await Yp({cwd:((fe=W.cwd)==null?void 0:fe.trim())||void 0,title:((K=W.title)==null?void 0:K.trim())||void 0});n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${se.id}`),w(!1)}catch(se){s({title:"新建对话失败",body:se instanceof Error?se.message:String(se)})}},[n,t,s]),Z=C.useCallback(async()=>{const W=h.trim();if(!W&&_.length===0||g)return;let fe=e;if(!fe){const he=await Yp();n.invalidateQueries({queryKey:["chat-sessions"]}),fe=he.id,t(`/chat/${fe}`,{replace:!0})}const K=_.map(he=>he.path),se={id:`optim-${Date.now()}`,role:"user",content:W||"(附件)",ts:new Date().toISOString(),status:"complete",attachments:K.length>0?K:void 0};n.setQueryData(["chat-session",fe],he=>he?{...he,messages:[...he.messages,se],lastMessageAt:se.ts,messageCount:he.messageCount+1}:{id:fe,createdAt:se.ts,lastMessageAt:se.ts,title:W.slice(0,60)||"附件",project:null,messageCount:1,messages:[se]}),b(""),S([]),v(!0);try{await qB(fe,W||"(请查看附件)",K.length>0?K:void 0)}catch(he){v(!1),console.error("sendMessage failed",he),s({title:"发送失败",body:he instanceof Error?he.message:String(he)})}},[h,_,g,e,n,t,s]),ie=C.useCallback(async W=>{if(W.size>yE){s({title:"文件超过上限",body:`单文件上限 50 MB;当前 ${(W.size/1024/1024).toFixed(2)} MB(${W.name})`});return}let fe=e;if(!fe){const K=await Yp();n.invalidateQueries({queryKey:["chat-sessions"]}),fe=K.id,t(`/chat/${fe}`,{replace:!0})}A(!0);try{const K=await KA(fe,W);S(se=>[...se,{path:K.path,name:K.name}])}catch(K){s({title:"附件上传失败",body:K instanceof Error?K.message:String(K)})}finally{A(!1)}},[e,n,t,s]),xe=C.useCallback(W=>{S(fe=>fe.filter(K=>K.path!==W))},[]),ue=C.useCallback(async(W,fe)=>{await a({title:"删除对话",body:fe==="cli"?"会从 Console 列表移除(停 daemon 会话)。Claude CLI 在 ~/.claude/projects 下的对话存档会保留 —— 想恢复到终端继续聊就重新跑 sps agent --chat --name <名>。":"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await $B(W),n.invalidateQueries({queryKey:["chat-sessions"]}),e===W&&t("/chat"))},[n,e,t,a]),J=C.useCallback(async()=>{if(e)try{await HB(e)}catch(W){s({title:"中断失败",body:W instanceof Error?W.message:String(W)})}},[e,s]);return f.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[f.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[f.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>w(!0),type:"button",children:[f.jsx(Bi,{size:14,strokeWidth:3}),"新建对话"]}),f.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((H=o.data)==null?void 0:H.data.length)??0]}),f.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((ce=o.data)==null?void 0:ce.data)??[]).map(W=>f.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===W.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:[f.jsxs("button",{type:"button","aria-label":`打开对话 ${W.title}${W.cwd?`(工作目录 ${W.cwd})`:""}`,onClick:()=>t(`/chat/${W.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[f.jsx(Qv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),f.jsxs("div",{className:"flex-1 min-w-0",children:[f.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[f.jsx("p",{className:"text-sm font-semibold truncate flex-1",children:W.title}),W.source==="cli"&&f.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:"该会话由 sps agent CLI 创建,从 Claude jsonl 实时读取(只读)",children:"CLI"})]}),f.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[W.messageCount," msg · ",Yk(W.lastMessageAt??W.createdAt)]}),W.cwd&&f.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:W.cwd,children:[f.jsx(oc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",dir:"rtl",children:W.cwd})]})]})]}),f.jsx("button",{type:"button","aria-label":W.source==="cli"?"从 Console 移除该 CLI 会话(不影响 Claude jsonl 存档)":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:fe=>{fe.stopPropagation(),ue(W.id,W.source)},children:f.jsx(zl,{size:12})})]},W.id)),(((de=o.data)==null?void 0:de.data)??[]).length===0&&f.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),f.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?f.jsxs(f.Fragment,{children:[f.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((ae=c.data)==null?void 0:ae.title)??"新对话"}),f.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e}),((O=c.data)==null?void 0:O.cwd)&&f.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:c.data.cwd,children:[f.jsx(oc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate",children:c.data.cwd})]})]}),f.jsxs("div",{ref:x,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((R=c.data)==null?void 0:R.messages)??[]).map(W=>f.jsx(QB,{msg:W,sessionId:e??null,onPreviewAttachment:fe=>ee(fe)},W.id)),d&&f.jsx(WB,{pending:d}),!c.isLoading&&(((Q=c.data)==null?void 0:Q.messages)??[]).length===0&&!d&&!g&&f.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),((T=c.data)==null?void 0:T.source)==="cli"?f.jsxs("div",{className:"border-t-2 border-[var(--color-text)] p-4 bg-[var(--color-accent-purple)]",children:[f.jsxs("p",{className:"text-sm font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] text-center",children:["这是 ",f.jsx("strong",{children:"CLI 会话"}),"(由 ",f.jsx("code",{children:"sps agent"})," 创建),Console 仅展示历史。续聊请在终端运行:"]}),f.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 ",(e??"").replace(/^session-/,"")]})]}):f.jsxs("div",{className:["border-t-2 border-[var(--color-text)] p-3 bg-[var(--color-bg-cream)] transition-colors",M?"bg-[var(--color-accent-mint)]":""].join(" "),onDragOver:W=>{W.dataTransfer.types.includes("Files")&&(W.preventDefault(),W.dataTransfer.dropEffect="copy",M||F(!0))},onDragLeave:()=>F(!1),onDrop:W=>{if(!W.dataTransfer.types.includes("Files"))return;W.preventDefault(),F(!1);const fe=Array.from(W.dataTransfer.files??[]);for(const K of fe)ie(K)},children:[(_.length>0||j)&&f.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[_.map(W=>f.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:()=>ee(W.path),title:`${W.name}
|
|
548
|
-
${W.path}
|
|
549
|
-
点击预览`,children:[Rd(W.path)?f.jsx(y2,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):f.jsx(Ec,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate max-w-[180px]",children:W.name}),f.jsx("span",{role:"button","aria-label":`移除 ${W.name}`,className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:fe=>{fe.stopPropagation(),xe(W.path)},children:f.jsx(_i,{size:11,strokeWidth:3})})]},W.path)),j&&f.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:[f.jsx(It,{size:11,strokeWidth:2.5,className:"animate-spin"}),"上传中..."]})]}),f.jsxs("div",{className:"flex gap-2 items-end",children:[f.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>U(!0),disabled:g,"aria-label":"附加本地文件",title:"附加本地文件(也可拖拽 / 粘贴图片)",children:f.jsx(j2,{size:14,strokeWidth:2.5})}),f.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:M?"松开鼠标以附加文件…":"说点什么… (Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)",rows:2,value:h,onChange:W=>b(W.target.value),onKeyDown:W=>{W.key==="Enter"&&!W.shiftKey&&!W.nativeEvent.isComposing&&(W.preventDefault(),Z())},onPaste:W=>{const K=Array.from(W.clipboardData.items??[]).filter(se=>se.kind==="file"&&se.type.startsWith("image/"));if(K.length!==0){W.preventDefault();for(const se of K){const he=se.getAsFile();he&&ie(he)}}},"aria-label":"消息输入"}),d?f.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:J,type:"button","aria-label":"中断生成",children:[f.jsx(cE,{size:14,strokeWidth:3}),"中断"]}):f.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:Z,disabled:!h.trim()&&_.length===0||g,type:"button","aria-label":"发送",children:[g?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx($2,{size:14,strokeWidth:3}),"发送"]})]})]})]}):f.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:f.jsxs("div",{className:"text-center max-w-md",children:[f.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:f.jsx(Qv,{size:32,strokeWidth:2.5})}),f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),f.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),f.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})}),k&&f.jsx(YB,{onCancel:()=>w(!1),onCreate:W=>L(W)}),D&&f.jsx(Zm,{mode:"file",title:"选择附件文件",initialPath:((be=c.data)==null?void 0:be.cwd)??void 0,onCancel:()=>U(!1),onSelect:W=>{S(fe=>{if(fe.some(se=>se.path===W))return fe;const K=W.split(/[\\/]/).pop()||W;return[...fe,{path:W,name:K}]}),U(!1)}}),$&&e&&f.jsx(GB,{sessionId:e,path:$,onClose:()=>ee(null)})]})}function Rd(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function dw(e){return/\.pdf$/i.test(e)}function Qp(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,s]=C.useState(null),[o,c]=C.useState(null);C.useEffect(()=>{const h=b=>{b.key==="Escape"&&(b.preventDefault(),n())};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[n]),C.useEffect(()=>{if(!Qp(t))return;let h=!1;return fetch(pm(e,t)).then(async b=>{if(!b.ok)throw new Error(`${b.status}`);return b.text()}).then(b=>{h||s(b.length>2e5?b.slice(0,2e5)+`
|
|
550
|
-
|
|
551
|
-
…(truncated)`:b)}).catch(b=>{h||c(b instanceof Error?b.message:String(b))}),()=>{h=!0}},[e,t]);const d=pm(e,t),p=t.split(/[\\/]/).pop()??t;return f.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:f.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":`预览 ${p}`,children:[f.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[f.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f.jsx(ZT,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:p})]}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":"关闭",children:f.jsx(_i,{size:16,strokeWidth:3})})]}),f.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}),f.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[Rd(t)&&f.jsx("div",{className:"flex items-center justify-center p-4",children:f.jsx("img",{src:d,alt:`Preview: ${p}`,className:"max-w-full max-h-[60vh] object-contain"})}),dw(t)&&f.jsx("iframe",{src:d,title:`PDF: ${p}`,className:"w-full",style:{height:"60vh",border:0}}),Qp(t)&&f.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:o?f.jsxs("span",{className:"text-[var(--color-crashed)]",children:["读取失败: ",o]}):a===null?f.jsx("span",{className:"text-[var(--color-text-muted)]",children:"加载中..."}):a}),!Rd(t)&&!dw(t)&&!Qp(t)&&f.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[f.jsx("p",{className:"mb-3",children:"此文件类型不支持内联预览。"}),f.jsx("a",{href:d,download:p,className:"nb-btn nb-btn-primary inline-flex",children:"下载"})]})]})]})})}function YB({onCancel:e,onCreate:t}){const[n,a]=C.useState(""),[s,o]=C.useState(""),[c,d]=C.useState(!1),[p,h]=C.useState(!1);C.useEffect(()=>{if(p)return;const g=v=>{v.key==="Escape"&&(v.preventDefault(),e())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e,p]);const b=async()=>{if(!c){d(!0);try{t({title:n.trim()||void 0,cwd:s.trim()||void 0})}finally{d(!1)}}};return f.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:[f.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":"新建对话",children:[f.jsxs("header",{className:"flex items-center justify-between mb-4",children:[f.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:"新建对话"}),f.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":"关闭",children:f.jsx(_i,{size:16,strokeWidth:3})})]}),f.jsxs("div",{className:"flex flex-col gap-4",children:[f.jsxs("div",{children:[f.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"标题(可选)"}),f.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:"留空 = 自动用首条消息生成",value:n,onChange:g=>a(g.target.value),autoFocus:!0})]}),f.jsxs("div",{children:[f.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"工作目录(可选)"}),f.jsxs("div",{className:"flex gap-2",children:[f.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:s,onChange:g=>o(g.target.value)}),f.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>h(!0),"aria-label":"浏览选择目录",title:"浏览选择目录",children:[f.jsx(rE,{size:14,strokeWidth:2.5}),"浏览"]})]}),f.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[f.jsx(oc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),"Agent 在该目录下读写文件。绝对路径,必须存在。 留空则用 daemon 启动时的目录。"]})]}),f.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[f.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:"取消"}),f.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:b,disabled:c,children:[c?f.jsx(It,{size:14,strokeWidth:3,className:"animate-spin"}):f.jsx(Bi,{size:14,strokeWidth:3}),"创建"]})]})]})]}),p&&f.jsx(Zm,{initialPath:s.trim()||void 0,onCancel:()=>h(!1),onSelect:g=>{o(g),h(!1)}})]})}function QB({msg:e,sessionId:t,onPreviewAttachment:n}){const a=e.role==="user",s=e.role==="error",o=e.blocks&&e.blocks.length>0?e.blocks:[{type:"text",text:e.content}],c=e.attachments??[];return f.jsx("div",{className:a?"self-end max-w-3xl":"self-start max-w-3xl",children:f.jsxs("div",{className:["nb-card",a?"bg-[var(--color-secondary)]":s?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[f.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?"错误":"assistant",f.jsx("span",{className:"font-normal",children:"·"}),f.jsx("span",{className:"font-normal",children:Yk(e.ts)})]}),f.jsx("div",{className:"flex flex-col gap-2",children:o.map((d,p)=>f.jsx(XB,{block:d},p))}),c.length>0&&t&&f.jsx("div",{className:"mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)]/30 flex flex-wrap gap-2",children:c.map(d=>f.jsx(VB,{sessionId:t,path:d,onPreview:()=>n(d)},d))}),e.truncated&&f.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 输出超过 10MB,已截断"})]})})}function VB({sessionId:e,path:t,onPreview:n}){const a=t.split(/[\\/]/).pop()??t;return Rd(t)?f.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}
|
|
552
|
-
点击放大`,children:f.jsx("img",{src:pm(e,t),alt:a,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):f.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}
|
|
553
|
-
${t}
|
|
554
|
-
点击预览`,children:[f.jsx(Ec,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),f.jsx("span",{className:"truncate max-w-[200px]",children:a})]})}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 f.jsx("div",{className:"self-start max-w-3xl",children:f.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[f.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",f.jsx("span",{className:"font-normal",children:"·"}),f.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[f.jsx(It,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),f.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&f.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 f.jsxs("div",{className:"relative",children:[f.jsx(Kk,{text:n.displayed}),s&&f.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return f.jsx(Gk,{tool:n},a)})]})]})})}function XB({block:e}){return e.type==="text"?f.jsx(Kk,{text:e.text}):f.jsx(Gk,{tool:e})}function Kk({text:e}){return e?f.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:f.jsx(Dg,{remarkPlugins:[Ig],rehypePlugins:[Ug],children:e})}):null}function Gk({tool:e}){const[t,n]=C.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return f.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[f.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:[f.jsx(Bd,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),f.jsx(hE,{size:12,strokeWidth:2.5}),f.jsx("span",{className:"font-bold",children:e.kind}),f.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&f.jsx(It,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&f.jsx(lc,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&f.jsx(KT,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&f.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:[f.jsxs("div",{children:["id: ",f.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),f.jsxs("div",{children:["status: ",f.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function Yk(e){if(!e)return"";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m`:n<864e5?`${Math.floor(n/36e5)}h`:t.toLocaleDateString()}function ZB(){const e=Bt();return f.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[f.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:e("notFound.title")}),f.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:e("notFound.body")}),f.jsx(hs,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:e("notFound.home")})]})}function JB(){return f.jsx(BA,{children:f.jsx(GC,{children:f.jsxs(Un,{element:f.jsx(IA,{}),children:[f.jsx(Un,{index:!0,element:f.jsx(qC,{to:"/projects",replace:!0})}),f.jsx(Un,{path:"/projects",element:f.jsx(UA,{})}),f.jsx(Un,{path:"/projects/new",element:f.jsx(WA,{})}),f.jsx(Un,{path:"/projects/:name",element:f.jsx(cO,{})}),f.jsx(Un,{path:"/board",element:f.jsx(VO,{})}),f.jsx(Un,{path:"/workers",element:f.jsx(uD,{})}),f.jsx(Un,{path:"/logs",element:f.jsx(mD,{})}),f.jsx(Un,{path:"/skills",element:f.jsx(DB,{})}),f.jsx(Un,{path:"/system",element:f.jsx(MB,{})}),f.jsx(Un,{path:"/chat",element:f.jsx(uw,{})}),f.jsx(Un,{path:"/chat/:sessionId",element:f.jsx(uw,{})}),f.jsx(Un,{path:"*",element:f.jsx(ZB,{})})]})})})}zA();const eU=new RN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),Qk=document.getElementById("root");if(!Qk)throw new Error("#root not found");oN.createRoot(Qk).render(f.jsx(C.StrictMode,{children:f.jsx(dA,{children:f.jsx(MN,{client:eU,children:f.jsx(bT,{children:f.jsx(YA,{children:f.jsx(JB,{})})})})})}));
|