@coralai/sps-cli 0.51.11 → 0.52.0
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/LICENSE +21 -0
- package/README-CN.md +131 -457
- package/README.md +131 -460
- package/dist/commands/skillCommand.js +17 -17
- package/dist/commands/skillCommand.js.map +1 -1
- package/dist/console/routes/chat.js +3 -3
- package/dist/console/routes/chat.js.map +1 -1
- package/dist/console/routes/fs.js +2 -2
- package/dist/console/routes/fs.js.map +1 -1
- package/dist/console-assets/assets/index-DVmciGET.css +10 -0
- package/dist/console-assets/assets/index-mm4gDnm8.js +553 -0
- package/dist/console-assets/index.html +2 -2
- package/dist/core/wiki/hot.js +2 -2
- package/dist/core/wiki/hot.js.map +1 -1
- package/dist/core/wiki/reader.js +4 -4
- package/dist/core/wiki/reader.js.map +1 -1
- package/dist/core/wiki/scaffold.js +1 -1
- package/dist/main.js +79 -79
- package/dist/main.js.map +1 -1
- package/dist/providers/MarkdownTaskBackend.d.ts +6 -2
- package/dist/providers/MarkdownTaskBackend.d.ts.map +1 -1
- package/dist/providers/MarkdownTaskBackend.js +32 -20
- package/dist/providers/MarkdownTaskBackend.js.map +1 -1
- package/dist/services/CardService.js +14 -14
- package/dist/services/CardService.js.map +1 -1
- package/dist/services/ChatService.js +11 -11
- package/dist/services/ChatService.js.map +1 -1
- package/dist/services/LogService.js +2 -2
- package/dist/services/LogService.js.map +1 -1
- package/dist/services/PipelineService.js +33 -33
- package/dist/services/PipelineService.js.map +1 -1
- package/dist/services/ProjectService.js +16 -16
- package/dist/services/ProjectService.js.map +1 -1
- package/dist/services/SkillService.js +9 -9
- package/dist/services/SkillService.js.map +1 -1
- package/dist/services/SystemService.js +11 -11
- package/dist/services/SystemService.js.map +1 -1
- package/dist/services/WorkerService.js +11 -11
- package/dist/services/WorkerService.js.map +1 -1
- package/package.json +2 -2
- package/skills/sps-memory/SKILL.md +1 -1
- package/skills/sps-pipeline/SKILL.md +19 -19
- package/dist/console-assets/assets/index-BJ1T4p1K.css +0 -10
- package/dist/console-assets/assets/index-DKc9idxO.js +0 -553
|
@@ -1,553 +0,0 @@
|
|
|
1
|
-
var Gk=Object.defineProperty;var pv=e=>{throw TypeError(e)};var Qk=(e,t,n)=>t in e?Gk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var gv=(e,t,n)=>Qk(e,typeof t!="symbol"?t+"":t,n),sm=(e,t,n)=>t.has(e)||pv("Cannot "+n);var I=(e,t,n)=>(sm(e,t,"read from private field"),n?n.call(e):t.get(e)),Ae=(e,t,n)=>t.has(e)?pv("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ve=(e,t,n,a)=>(sm(e,t,"write to private field"),a?a.call(e,n):t.set(e,n),n),Pe=(e,t,n)=>(sm(e,t,"access private method"),n);var Ku=(e,t,n,a)=>({set _(s){ve(e,t,s,n)},get _(){return I(e,t,a)}});(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))a(s);new MutationObserver(s=>{for(const o of s)if(o.type==="childList")for(const c of o.addedNodes)c.tagName==="LINK"&&c.rel==="modulepreload"&&a(c)}).observe(document,{childList:!0,subtree:!0});function n(s){const o={};return s.integrity&&(o.integrity=s.integrity),s.referrerPolicy&&(o.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?o.credentials="include":s.crossOrigin==="anonymous"?o.credentials="omit":o.credentials="same-origin",o}function a(s){if(s.ep)return;s.ep=!0;const o=n(s);fetch(s.href,o)}})();function Dp(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lm={exports:{}},Fo={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var bv;function Yk(){if(bv)return Fo;bv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function n(a,s,o){var c=null;if(o!==void 0&&(c=""+o),s.key!==void 0&&(c=""+s.key),"key"in s){o={};for(var f in s)f!=="key"&&(o[f]=s[f])}else o=s;return s=o.ref,{$$typeof:e,type:a,key:c,ref:s!==void 0?s:null,props:o}}return Fo.Fragment=t,Fo.jsx=n,Fo.jsxs=n,Fo}var yv;function Vk(){return yv||(yv=1,lm.exports=Yk()),lm.exports}var d=Vk(),om={exports:{}},Ie={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var xv;function Wk(){if(xv)return Ie;xv=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.consumer"),c=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),h=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),g=Symbol.for("react.activity"),x=Symbol.iterator;function v(D){return D===null||typeof D!="object"?null:(D=x&&D[x]||D["@@iterator"],typeof D=="function"?D:null)}var E={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,k={};function _(D,X,C){this.props=D,this.context=X,this.refs=k,this.updater=C||E}_.prototype.isReactComponent={},_.prototype.setState=function(D,X){if(typeof D!="object"&&typeof D!="function"&&D!=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,D,X,"setState")},_.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function A(){}A.prototype=_.prototype;function T(D,X,C){this.props=D,this.context=X,this.refs=k,this.updater=C||E}var j=T.prototype=new A;j.constructor=T,w(j,_.prototype),j.isPureReactComponent=!0;var $=Array.isArray;function M(){}var F={H:null,A:null,T:null,S:null},H=Object.prototype.hasOwnProperty;function ee(D,X,C){var G=C.ref;return{$$typeof:e,type:D,key:X,ref:G!==void 0?G:null,props:C}}function L(D,X){return ee(D.type,X,D.props)}function J(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function ae(D){var X={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(C){return X[C]})}var ge=/\/+/g;function fe(D,X){return typeof D=="object"&&D!==null&&D.key!=null?ae(""+D.key):X.toString(36)}function te(D){switch(D.status){case"fulfilled":return D.value;case"rejected":throw D.reason;default:switch(typeof D.status=="string"?D.then(M,M):(D.status="pending",D.then(function(X){D.status==="pending"&&(D.status="fulfilled",D.value=X)},function(X){D.status==="pending"&&(D.status="rejected",D.reason=X)})),D.status){case"fulfilled":return D.value;case"rejected":throw D.reason}}throw D}function q(D,X,C,G,de){var re=typeof D;(re==="undefined"||re==="boolean")&&(D=null);var K=!1;if(D===null)K=!0;else switch(re){case"bigint":case"string":case"number":K=!0;break;case"object":switch(D.$$typeof){case e:case t:K=!0;break;case b:return K=D._init,q(K(D._payload),X,C,G,de)}}if(K)return de=de(D),K=G===""?"."+fe(D,0):G,$(de)?(C="",K!=null&&(C=K.replace(ge,"$&/")+"/"),q(de,X,C,"",function(Ze){return Ze})):de!=null&&(J(de)&&(de=L(de,C+(de.key==null||D&&D.key===de.key?"":(""+de.key).replace(ge,"$&/")+"/")+K)),X.push(de)),1;K=0;var ue=G===""?".":G+":";if($(D))for(var Se=0;Se<D.length;Se++)G=D[Se],re=ue+fe(G,Se),K+=q(G,X,C,re,de);else if(Se=v(D),typeof Se=="function")for(D=Se.call(D),Se=0;!(G=D.next()).done;)G=G.value,re=ue+fe(G,Se++),K+=q(G,X,C,re,de);else if(re==="object"){if(typeof D.then=="function")return q(te(D),X,C,G,de);throw X=String(D),Error("Objects are not valid as a React child (found: "+(X==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":X)+"). If you meant to render a collection of children, use an array instead.")}return K}function ce(D,X,C){if(D==null)return D;var G=[],de=0;return q(D,G,"","",function(re){return X.call(C,re,de++)}),G}function V(D){if(D._status===-1){var X=D._result;X=X(),X.then(function(C){(D._status===0||D._status===-1)&&(D._status=1,D._result=C)},function(C){(D._status===0||D._status===-1)&&(D._status=2,D._result=C)}),D._status===-1&&(D._status=0,D._result=X)}if(D._status===1)return D._result.default;throw D._result}var be=typeof reportError=="function"?reportError:function(D){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var X=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof D=="object"&&D!==null&&typeof D.message=="string"?String(D.message):String(D),error:D});if(!window.dispatchEvent(X))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",D);return}console.error(D)},R={map:ce,forEach:function(D,X,C){ce(D,function(){X.apply(this,arguments)},C)},count:function(D){var X=0;return ce(D,function(){X++}),X},toArray:function(D){return ce(D,function(X){return X})||[]},only:function(D){if(!J(D))throw Error("React.Children.only expected to receive a single React element child.");return D}};return Ie.Activity=g,Ie.Children=R,Ie.Component=_,Ie.Fragment=n,Ie.Profiler=s,Ie.PureComponent=T,Ie.StrictMode=a,Ie.Suspense=h,Ie.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=F,Ie.__COMPILER_RUNTIME={__proto__:null,c:function(D){return F.H.useMemoCache(D)}},Ie.cache=function(D){return function(){return D.apply(null,arguments)}},Ie.cacheSignal=function(){return null},Ie.cloneElement=function(D,X,C){if(D==null)throw Error("The argument must be a React element, but you passed "+D+".");var G=w({},D.props),de=D.key;if(X!=null)for(re in X.key!==void 0&&(de=""+X.key),X)!H.call(X,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&X.ref===void 0||(G[re]=X[re]);var re=arguments.length-2;if(re===1)G.children=C;else if(1<re){for(var K=Array(re),ue=0;ue<re;ue++)K[ue]=arguments[ue+2];G.children=K}return ee(D.type,de,G)},Ie.createContext=function(D){return D={$$typeof:c,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null},D.Provider=D,D.Consumer={$$typeof:o,_context:D},D},Ie.createElement=function(D,X,C){var G,de={},re=null;if(X!=null)for(G in X.key!==void 0&&(re=""+X.key),X)H.call(X,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(de[G]=X[G]);var K=arguments.length-2;if(K===1)de.children=C;else if(1<K){for(var ue=Array(K),Se=0;Se<K;Se++)ue[Se]=arguments[Se+2];de.children=ue}if(D&&D.defaultProps)for(G in K=D.defaultProps,K)de[G]===void 0&&(de[G]=K[G]);return ee(D,re,de)},Ie.createRef=function(){return{current:null}},Ie.forwardRef=function(D){return{$$typeof:f,render:D}},Ie.isValidElement=J,Ie.lazy=function(D){return{$$typeof:b,_payload:{_status:-1,_result:D},_init:V}},Ie.memo=function(D,X){return{$$typeof:m,type:D,compare:X===void 0?null:X}},Ie.startTransition=function(D){var X=F.T,C={};F.T=C;try{var G=D(),de=F.S;de!==null&&de(C,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(M,be)}catch(re){be(re)}finally{X!==null&&C.types!==null&&(X.types=C.types),F.T=X}},Ie.unstable_useCacheRefresh=function(){return F.H.useCacheRefresh()},Ie.use=function(D){return F.H.use(D)},Ie.useActionState=function(D,X,C){return F.H.useActionState(D,X,C)},Ie.useCallback=function(D,X){return F.H.useCallback(D,X)},Ie.useContext=function(D){return F.H.useContext(D)},Ie.useDebugValue=function(){},Ie.useDeferredValue=function(D,X){return F.H.useDeferredValue(D,X)},Ie.useEffect=function(D,X){return F.H.useEffect(D,X)},Ie.useEffectEvent=function(D){return F.H.useEffectEvent(D)},Ie.useId=function(){return F.H.useId()},Ie.useImperativeHandle=function(D,X,C){return F.H.useImperativeHandle(D,X,C)},Ie.useInsertionEffect=function(D,X){return F.H.useInsertionEffect(D,X)},Ie.useLayoutEffect=function(D,X){return F.H.useLayoutEffect(D,X)},Ie.useMemo=function(D,X){return F.H.useMemo(D,X)},Ie.useOptimistic=function(D,X){return F.H.useOptimistic(D,X)},Ie.useReducer=function(D,X,C){return F.H.useReducer(D,X,C)},Ie.useRef=function(D){return F.H.useRef(D)},Ie.useState=function(D){return F.H.useState(D)},Ie.useSyncExternalStore=function(D,X,C){return F.H.useSyncExternalStore(D,X,C)},Ie.useTransition=function(){return F.H.useTransition()},Ie.version="19.2.5",Ie}var vv;function Lp(){return vv||(vv=1,om.exports=Wk()),om.exports}var O=Lp(),cm={exports:{}},Po={},um={exports:{}},fm={};/**
|
|
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 Xk(){return Ev||(Ev=1,(function(e){function t(q,ce){var V=q.length;q.push(ce);e:for(;0<V;){var be=V-1>>>1,R=q[be];if(0<s(R,ce))q[be]=ce,q[V]=R,V=be;else break e}}function n(q){return q.length===0?null:q[0]}function a(q){if(q.length===0)return null;var ce=q[0],V=q.pop();if(V!==ce){q[0]=V;e:for(var be=0,R=q.length,D=R>>>1;be<D;){var X=2*(be+1)-1,C=q[X],G=X+1,de=q[G];if(0>s(C,V))G<R&&0>s(de,C)?(q[be]=de,q[G]=V,be=G):(q[be]=C,q[X]=V,be=X);else if(G<R&&0>s(de,V))q[be]=de,q[G]=V,be=G;else break e}}return ce}function s(q,ce){var V=q.sortIndex-ce.sortIndex;return V!==0?V:q.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,f=c.now();e.unstable_now=function(){return c.now()-f}}var h=[],m=[],b=1,g=null,x=3,v=!1,E=!1,w=!1,k=!1,_=typeof setTimeout=="function"?setTimeout:null,A=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function j(q){for(var ce=n(m);ce!==null;){if(ce.callback===null)a(m);else if(ce.startTime<=q)a(m),ce.sortIndex=ce.expirationTime,t(h,ce);else break;ce=n(m)}}function $(q){if(w=!1,j(q),!E)if(n(h)!==null)E=!0,M||(M=!0,ae());else{var ce=n(m);ce!==null&&te($,ce.startTime-q)}}var M=!1,F=-1,H=5,ee=-1;function L(){return k?!0:!(e.unstable_now()-ee<H)}function J(){if(k=!1,M){var q=e.unstable_now();ee=q;var ce=!0;try{e:{E=!1,w&&(w=!1,A(F),F=-1),v=!0;var V=x;try{t:{for(j(q),g=n(h);g!==null&&!(g.expirationTime>q&&L());){var be=g.callback;if(typeof be=="function"){g.callback=null,x=g.priorityLevel;var R=be(g.expirationTime<=q);if(q=e.unstable_now(),typeof R=="function"){g.callback=R,j(q),ce=!0;break t}g===n(h)&&a(h),j(q)}else a(h);g=n(h)}if(g!==null)ce=!0;else{var D=n(m);D!==null&&te($,D.startTime-q),ce=!1}}break e}finally{g=null,x=V,v=!1}ce=void 0}}finally{ce?ae():M=!1}}}var ae;if(typeof T=="function")ae=function(){T(J)};else if(typeof MessageChannel<"u"){var ge=new MessageChannel,fe=ge.port2;ge.port1.onmessage=J,ae=function(){fe.postMessage(null)}}else ae=function(){_(J,0)};function te(q,ce){F=_(function(){q(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(q){q.callback=null},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):H=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return x},e.unstable_next=function(q){switch(x){case 1:case 2:case 3:var ce=3;break;default:ce=x}var V=x;x=ce;try{return q()}finally{x=V}},e.unstable_requestPaint=function(){k=!0},e.unstable_runWithPriority=function(q,ce){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var V=x;x=q;try{return ce()}finally{x=V}},e.unstable_scheduleCallback=function(q,ce,V){var be=e.unstable_now();switch(typeof V=="object"&&V!==null?(V=V.delay,V=typeof V=="number"&&0<V?be+V:be):V=be,q){case 1:var R=-1;break;case 2:R=250;break;case 5:R=1073741823;break;case 4:R=1e4;break;default:R=5e3}return R=V+R,q={id:b++,callback:ce,priorityLevel:q,startTime:V,expirationTime:R,sortIndex:-1},V>be?(q.sortIndex=V,t(m,q),n(h)===null&&q===n(m)&&(w?(A(F),F=-1):w=!0,te($,V-be))):(q.sortIndex=R,t(h,q),E||v||(E=!0,M||(M=!0,ae()))),q},e.unstable_shouldYield=L,e.unstable_wrapCallback=function(q){var ce=x;return function(){var V=x;x=ce;try{return q.apply(this,arguments)}finally{x=V}}}})(fm)),fm}var Sv;function Zk(){return Sv||(Sv=1,um.exports=Xk()),um.exports}var dm={exports:{}},mn={};/**
|
|
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 wv;function Jk(){if(wv)return mn;wv=1;var e=Lp();function t(h){var m="https://react.dev/errors/"+h;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+h+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function n(){}var a={d:{f:n,r:function(){throw Error(t(522))},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},s=Symbol.for("react.portal");function o(h,m,b){var g=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:g==null?null:""+g,children:h,containerInfo:m,implementation:b}}var c=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function f(h,m){if(h==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return mn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=a,mn.createPortal=function(h,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(t(299));return o(h,m,null,b)},mn.flushSync=function(h){var m=c.T,b=a.p;try{if(c.T=null,a.p=2,h)return h()}finally{c.T=m,a.p=b,a.d.f()}},mn.preconnect=function(h,m){typeof h=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,a.d.C(h,m))},mn.prefetchDNS=function(h){typeof h=="string"&&a.d.D(h)},mn.preinit=function(h,m){if(typeof h=="string"&&m&&typeof m.as=="string"){var b=m.as,g=f(b,m.crossOrigin),x=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?a.d.S(h,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:g,integrity:x,fetchPriority:v}):b==="script"&&a.d.X(h,{crossOrigin:g,integrity:x,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},mn.preinitModule=function(h,m){if(typeof h=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=f(m.as,m.crossOrigin);a.d.M(h,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&a.d.M(h)},mn.preload=function(h,m){if(typeof h=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,g=f(b,m.crossOrigin);a.d.L(h,b,{crossOrigin:g,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},mn.preloadModule=function(h,m){if(typeof h=="string")if(m){var b=f(m.as,m.crossOrigin);a.d.m(h,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else a.d.m(h)},mn.requestFormReset=function(h){a.d.r(h)},mn.unstable_batchedUpdates=function(h,m){return h(m)},mn.useFormState=function(h,m,b){return c.H.useFormState(h,m,b)},mn.useFormStatus=function(){return c.H.useHostTransitionStatus()},mn.version="19.2.5",mn}var _v;function eN(){if(_v)return dm.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(),dm.exports=Jk(),dm.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 kv;function tN(){if(kv)return Po;kv=1;var e=Zk(),t=Lp(),n=eN();function a(i){var r="https://react.dev/errors/"+i;if(1<arguments.length){r+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)r+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+i+"; visit "+r+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function o(i){var r=i,l=i;if(i.alternate)for(;r.return;)r=r.return;else{i=r;do r=i,(r.flags&4098)!==0&&(l=r.return),i=r.return;while(i)}return r.tag===3?l:null}function c(i){if(i.tag===13){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function f(i){if(i.tag===31){var r=i.memoizedState;if(r===null&&(i=i.alternate,i!==null&&(r=i.memoizedState)),r!==null)return r.dehydrated}return null}function h(i){if(o(i)!==i)throw Error(a(188))}function m(i){var r=i.alternate;if(!r){if(r=o(i),r===null)throw Error(a(188));return r!==i?null:i}for(var l=i,u=r;;){var p=l.return;if(p===null)break;var y=p.alternate;if(y===null){if(u=p.return,u!==null){l=u;continue}break}if(p.child===y.child){for(y=p.child;y;){if(y===l)return h(p),i;if(y===u)return h(p),r;y=y.sibling}throw Error(a(188))}if(l.return!==u.return)l=p,u=y;else{for(var S=!1,N=p.child;N;){if(N===l){S=!0,l=p,u=y;break}if(N===u){S=!0,u=p,l=y;break}N=N.sibling}if(!S){for(N=y.child;N;){if(N===l){S=!0,l=y,u=p;break}if(N===u){S=!0,u=y,l=p;break}N=N.sibling}if(!S)throw Error(a(189))}}if(l.alternate!==u)throw Error(a(190))}if(l.tag!==3)throw Error(a(188));return l.stateNode.current===l?i:r}function b(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i;for(i=i.child;i!==null;){if(r=b(i),r!==null)return r;i=i.sibling}return null}var g=Object.assign,x=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),E=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),k=Symbol.for("react.strict_mode"),_=Symbol.for("react.profiler"),A=Symbol.for("react.consumer"),T=Symbol.for("react.context"),j=Symbol.for("react.forward_ref"),$=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),F=Symbol.for("react.memo"),H=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),L=Symbol.for("react.memo_cache_sentinel"),J=Symbol.iterator;function ae(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var ge=Symbol.for("react.client.reference");function fe(i){if(i==null)return null;if(typeof i=="function")return i.$$typeof===ge?null:i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case w:return"Fragment";case _:return"Profiler";case k:return"StrictMode";case $:return"Suspense";case M:return"SuspenseList";case ee:return"Activity"}if(typeof i=="object")switch(i.$$typeof){case E:return"Portal";case T:return i.displayName||"Context";case A:return(i._context.displayName||"Context")+".Consumer";case j:var r=i.render;return i=i.displayName,i||(i=r.displayName||r.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case F:return r=i.displayName||null,r!==null?r:fe(i.type)||"Memo";case H:r=i._payload,i=i._init;try{return fe(i(r))}catch{}}return null}var te=Array.isArray,q=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,V={pending:!1,data:null,method:null,action:null},be=[],R=-1;function D(i){return{current:i}}function X(i){0>R||(i.current=be[R],be[R]=null,R--)}function C(i,r){R++,be[R]=i.current,i.current=r}var G=D(null),de=D(null),re=D(null),K=D(null);function ue(i,r){switch(C(re,r),C(de,i),C(G,null),r.nodeType){case 9:case 11:i=(i=r.documentElement)&&(i=i.namespaceURI)?Bx(i):0;break;default:if(i=r.tagName,r=r.namespaceURI)r=Bx(r),i=Ux(r,i);else switch(i){case"svg":i=1;break;case"math":i=2;break;default:i=0}}X(G),C(G,i)}function Se(){X(G),X(de),X(re)}function Ze(i){i.memoizedState!==null&&C(K,i);var r=G.current,l=Ux(r,i.type);r!==l&&(C(de,i),C(G,l))}function it(i){de.current===i&&(X(G),X(de)),K.current===i&&(X(K),Io._currentValue=V)}var Kn,Ra;function Gn(i){if(Kn===void 0)try{throw Error()}catch(l){var r=l.stack.trim().match(/\n( *(at )?)/);Kn=r&&r[1]||"",Ra=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+Kn+i+Ra}var Bi=!1;function Je(i,r){if(!i||Bi)return"";Bi=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var u={DetermineComponentFrameRoot:function(){try{if(r){var oe=function(){throw Error()};if(Object.defineProperty(oe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(oe,[])}catch(Z){var W=Z}Reflect.construct(i,[],oe)}else{try{oe.call()}catch(Z){W=Z}i.call(oe.prototype)}}else{try{throw Error()}catch(Z){W=Z}(oe=i())&&typeof oe.catch=="function"&&oe.catch(function(){})}}catch(Z){if(Z&&W&&typeof Z.stack=="string")return[Z.stack,W.stack]}return[null,null]}};u.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var p=Object.getOwnPropertyDescriptor(u.DetermineComponentFrameRoot,"name");p&&p.configurable&&Object.defineProperty(u.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var y=u.DetermineComponentFrameRoot(),S=y[0],N=y[1];if(S&&N){var z=S.split(`
|
|
44
|
-
`),Y=N.split(`
|
|
45
|
-
`);for(p=u=0;u<z.length&&!z[u].includes("DetermineComponentFrameRoot");)u++;for(;p<Y.length&&!Y[p].includes("DetermineComponentFrameRoot");)p++;if(u===z.length||p===Y.length)for(u=z.length-1,p=Y.length-1;1<=u&&0<=p&&z[u]!==Y[p];)p--;for(;1<=u&&0<=p;u--,p--)if(z[u]!==Y[p]){if(u!==1||p!==1)do if(u--,p--,0>p||z[u]!==Y[p]){var ie=`
|
|
46
|
-
`+z[u].replace(" at new "," at ");return i.displayName&&ie.includes("<anonymous>")&&(ie=ie.replace("<anonymous>",i.displayName)),ie}while(1<=u&&0<=p);break}}}finally{Bi=!1,Error.prepareStackTrace=l}return(l=i?i.displayName||i.name:"")?Gn(l):""}function Ni(i,r){switch(i.tag){case 26:case 27:case 5:return Gn(i.type);case 16:return Gn("Lazy");case 13:return i.child!==r&&r!==null?Gn("Suspense Fallback"):Gn("Suspense");case 19:return Gn("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 Gn("Activity");default:return""}}function oi(i){try{var r="",l=null;do r+=Ni(i,l),l=i,i=i.return;while(i);return r}catch(u){return`
|
|
47
|
-
Error generating stack: `+u.message+`
|
|
48
|
-
`+u.stack}}var Ui=Object.prototype.hasOwnProperty,ea=e.unstable_scheduleCallback,Tr=e.unstable_cancelCallback,Gl=e.unstable_shouldYield,bs=e.unstable_requestPaint,Mt=e.unstable_now,ys=e.unstable_getCurrentPriorityLevel,ne=e.unstable_ImmediatePriority,pe=e.unstable_UserBlockingPriority,Me=e.unstable_NormalPriority,He=e.unstable_LowPriority,at=e.unstable_IdlePriority,xn=e.log,Ti=e.unstable_setDisableYieldValue,rn=null,It=null;function fn(i){if(typeof xn=="function"&&Ti(i),It&&typeof It.setStrictMode=="function")try{It.setStrictMode(rn,i)}catch{}}var ut=Math.clz32?Math.clz32:Ac,$i=Math.log,vn=Math.LN2;function Ac(i){return i>>>=0,i===0?32:31-($i(i)/vn|0)|0}var Cr=256,xs=262144,Ar=4194304;function Cn(i){var r=i&42;if(r!==0)return r;switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return i&261888;case 262144:case 524288:case 1048576:case 2097152:return i&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return i&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return i}}function B(i,r,l){var u=i.pendingLanes;if(u===0)return 0;var p=0,y=i.suspendedLanes,S=i.pingedLanes;i=i.warmLanes;var N=u&134217727;return N!==0?(u=N&~y,u!==0?p=Cn(u):(S&=N,S!==0?p=Cn(S):l||(l=N&~i,l!==0&&(p=Cn(l))))):(N=u&~y,N!==0?p=Cn(N):S!==0?p=Cn(S):l||(l=u&~i,l!==0&&(p=Cn(l)))),p===0?0:r!==0&&r!==p&&(r&y)===0&&(y=p&-p,l=r&-r,y>=l||y===32&&(l&4194048)!==0)?r:p}function se(i,r){return(i.pendingLanes&~(i.suspendedLanes&~i.pingedLanes)&r)===0}function xe(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=Ar;return Ar<<=1,(Ar&62914560)===0&&(Ar=4194304),i}function kt(i){for(var r=[],l=0;31>l;l++)r.push(i);return r}function xt(i,r){i.pendingLanes|=r,r!==268435456&&(i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0)}function _e(i,r,l,u,p,y){var S=i.pendingLanes;i.pendingLanes=l,i.suspendedLanes=0,i.pingedLanes=0,i.warmLanes=0,i.expiredLanes&=l,i.entangledLanes&=l,i.errorRecoveryDisabledLanes&=l,i.shellSuspendCounter=0;var N=i.entanglements,z=i.expirationTimes,Y=i.hiddenUpdates;for(l=S&~l;0<l;){var ie=31-ut(l),oe=1<<ie;N[ie]=0,z[ie]=-1;var W=Y[ie];if(W!==null)for(Y[ie]=null,ie=0;ie<W.length;ie++){var Z=W[ie];Z!==null&&(Z.lane&=-536870913)}l&=~oe}u!==0&&Ee(i,u,0),y!==0&&p===0&&i.tag!==0&&(i.suspendedLanes|=y&~(S&~r))}function Ee(i,r,l){i.pendingLanes|=r,i.suspendedLanes&=~r;var u=31-ut(r);i.entangledLanes|=r,i.entanglements[u]=i.entanglements[u]|1073741824|l&261930}function Le(i,r){var l=i.entangledLanes|=r;for(i=i.entanglements;l;){var u=31-ut(l),p=1<<u;p&r|i[u]&r&&(i[u]|=r),l&=~p}}function Pt(i,r){var l=r&-r;return l=(l&42)!==0?1:Ct(l),(l&(i.suspendedLanes|r))!==0?0:l}function Ct(i){switch(i){case 2:i=1;break;case 8:i=4;break;case 32:i=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:i=128;break;case 268435456:i=134217728;break;default:i=0}return i}function ta(i){return i&=-i,2<i?8<i?(i&134217727)!==0?32:268435456:8:2}function vs(){var i=ce.p;return i!==0?i:(i=window.event,i===void 0?32:ov(i.type))}function Es(i,r){var l=ce.p;try{return ce.p=i,r()}finally{ce.p=l}}var Fi=Math.random().toString(36).slice(2),qt="__reactFiber$"+Fi,dn="__reactProps$"+Fi,Ma="__reactContainer$"+Fi,Ql="__reactEvents$"+Fi,Oc="__reactListeners$"+Fi,Ss="__reactHandles$"+Fi,Rc="__reactResources$"+Fi,Or="__reactMarker$"+Fi;function Yl(i){delete i[qt],delete i[dn],delete i[Ql],delete i[Oc],delete i[Ss]}function En(i){var r=i[qt];if(r)return r;for(var l=i.parentNode;l;){if(r=l[Ma]||l[qt]){if(l=r.alternate,r.child!==null||l!==null&&l.child!==null)for(i=Gx(i);i!==null;){if(l=i[qt])return l;i=Gx(i)}return r}i=l,l=i.parentNode}return null}function na(i){if(i=i[qt]||i[Ma]){var r=i.tag;if(r===5||r===6||r===13||r===31||r===26||r===27||r===3)return i}return null}function ja(i){var r=i.tag;if(r===5||r===26||r===27||r===6)return i.stateNode;throw Error(a(33))}function Da(i){var r=i[Rc];return r||(r=i[Rc]={hoistableStyles:new Map,hoistableScripts:new Map}),r}function Qt(i){i[Or]=!0}var Mc=new Set,Rr={};function ia(i,r){he(i,r),he(i+"Capture",r)}function he(i,r){for(Rr[i]=r,i=0;i<r.length;i++)Mc.add(r[i])}var Ce=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]*$"),Ke={},ft={};function Ht(i){return Ui.call(ft,i)?!0:Ui.call(Ke,i)?!1:Ce.test(i)?ft[i]=!0:(Ke[i]=!0,!1)}function hn(i,r,l){if(Ht(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 An(i,r,l,u){if(u===null)i.removeAttribute(l);else{switch(typeof u){case"undefined":case"function":case"symbol":case"boolean":i.removeAttribute(l);return}i.setAttributeNS(r,l,""+u)}}function wt(i){switch(typeof i){case"bigint":case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Yn(i){var r=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(r==="checkbox"||r==="radio")}function jc(i,r,l){var u=Object.getOwnPropertyDescriptor(i.constructor.prototype,r);if(!i.hasOwnProperty(r)&&typeof u<"u"&&typeof u.get=="function"&&typeof u.set=="function"){var p=u.get,y=u.set;return Object.defineProperty(i,r,{configurable:!0,get:function(){return p.call(this)},set:function(S){l=""+S,y.call(this,S)}}),Object.defineProperty(i,r,{enumerable:u.enumerable}),{getValue:function(){return l},setValue:function(S){l=""+S},stopTracking:function(){i._valueTracker=null,delete i[r]}}}}function ws(i){if(!i._valueTracker){var r=Yn(i)?"checked":"value";i._valueTracker=jc(i,r,""+i[r])}}function Vl(i){if(!i)return!1;var r=i._valueTracker;if(!r)return!0;var l=r.getValue(),u="";return i&&(u=Yn(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 rd=/[\n"\\]/g;function On(i){return i.replace(rd,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function Wl(i,r,l,u,p,y,S,N){i.name="",S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?i.type=S:i.removeAttribute("type"),r!=null?S==="number"?(r===0&&i.value===""||i.value!=r)&&(i.value=""+wt(r)):i.value!==""+wt(r)&&(i.value=""+wt(r)):S!=="submit"&&S!=="reset"||i.removeAttribute("value"),r!=null?ks(i,S,wt(r)):l!=null?ks(i,S,wt(l)):u!=null&&i.removeAttribute("value"),p==null&&y!=null&&(i.defaultChecked=!!y),p!=null&&(i.checked=p&&typeof p!="function"&&typeof p!="symbol"),N!=null&&typeof N!="function"&&typeof N!="symbol"&&typeof N!="boolean"?i.name=""+wt(N):i.removeAttribute("name")}function Mr(i,r,l,u,p,y,S,N){if(y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(i.type=y),r!=null||l!=null){if(!(y!=="submit"&&y!=="reset"||r!=null)){ws(i);return}l=l!=null?""+wt(l):"",r=r!=null?""+wt(r):l,N||r===i.value||(i.value=r),i.defaultValue=r}u=u??p,u=typeof u!="function"&&typeof u!="symbol"&&!!u,i.checked=N?i.checked:!!u,i.defaultChecked=!!u,S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"&&(i.name=S),ws(i)}function ks(i,r,l){r==="number"&&_s(i.ownerDocument)===i||i.defaultValue===""+l||(i.defaultValue=""+l)}function sn(i,r,l,u){if(i=i.options,r){r={};for(var p=0;p<l.length;p++)r["$"+l[p]]=!0;for(l=0;l<i.length;l++)p=r.hasOwnProperty("$"+i[l].value),i[l].selected!==p&&(i[l].selected=p),p&&u&&(i[l].defaultSelected=!0)}else{for(l=""+wt(l),r=null,p=0;p<i.length;p++){if(i[p].value===l){i[p].selected=!0,u&&(i[p].defaultSelected=!0);return}r!==null||i[p].disabled||(r=i[p])}r!==null&&(r.selected=!0)}}function Dc(i,r,l){if(r!=null&&(r=""+wt(r),r!==i.value&&(i.value=r),l==null)){i.defaultValue!==r&&(i.defaultValue=r);return}i.defaultValue=l!=null?""+wt(l):""}function Ns(i,r,l,u){if(r==null){if(u!=null){if(l!=null)throw Error(a(92));if(te(u)){if(1<u.length)throw Error(a(93));u=u[0]}l=u}l==null&&(l=""),r=l}l=wt(r),i.defaultValue=l,u=i.textContent,u===l&&u!==""&&u!==null&&(i.value=u),ws(i)}function De(i,r){if(r){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=r;return}}i.textContent=r}var Lc=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 Yt(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||Lc.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 p in r)u=r[p],r.hasOwnProperty(p)&&l[p]!==u&&Yt(i,p,u)}else for(var y in r)r.hasOwnProperty(y)&&Yt(i,y,r[y])}function La(i){if(i.indexOf("-")===-1)return!1;switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var aa=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),Xl=/^[\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 Xl.test(""+i)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":i}function ye(){}var ke=null;function Ue(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Ve=null,jt=null;function ci(i){var r=na(i);if(r&&(i=r.stateNode)){var l=i[dn]||null;e:switch(i=r.stateNode,r.type){case"input":if(Wl(i,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),r=l.name,l.type==="radio"&&r!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+On(""+r)+'"][type="radio"]'),r=0;r<l.length;r++){var u=l[r];if(u!==i&&u.form===i.form){var p=u[dn]||null;if(!p)throw Error(a(90));Wl(u,p.value,p.defaultValue,p.defaultValue,p.checked,p.defaultChecked,p.type,p.name)}}for(r=0;r<l.length;r++)u=l[r],u.form===i.form&&Vl(u)}break e;case"textarea":Dc(i,l.value,l.defaultValue);break e;case"select":r=l.value,r!=null&&sn(i,!!l.multiple,r,!1)}}}var Zl=!1;function zc(i,r,l){if(Zl)return i(r,l);Zl=!0;try{var u=i(r);return u}finally{if(Zl=!1,(Ve!==null||jt!==null)&&(wu(),Ve&&(r=Ve,i=jt,jt=Ve=null,ci(r),i)))for(r=0;r<i.length;r++)ci(i[r])}}function Jl(i,r){var l=i.stateNode;if(l===null)return null;var u=l[dn]||null;if(u===null)return null;l=u[r];e:switch(r){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(u=!u.disabled)||(i=i.type,u=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!u;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(a(231,r,typeof l));return l}var ra=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sd=!1;if(ra)try{var eo={};Object.defineProperty(eo,"passive",{get:function(){sd=!0}}),window.addEventListener("test",eo,eo),window.removeEventListener("test",eo,eo)}catch{sd=!1}var Ia=null,ld=null,Ic=null;function Ug(){if(Ic)return Ic;var i,r=ld,l=r.length,u,p="value"in Ia?Ia.value:Ia.textContent,y=p.length;for(i=0;i<l&&r[i]===p[i];i++);var S=l-i;for(u=1;u<=S&&r[l-u]===p[y-u];u++);return Ic=p.slice(i,1<u?1-u:void 0)}function Bc(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 Uc(){return!0}function $g(){return!1}function Rn(i){function r(l,u,p,y,S){this._reactName=l,this._targetInst=p,this.type=u,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var N in i)i.hasOwnProperty(N)&&(l=i[N],this[N]=l?l(y):y[N]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?Uc:$g,this.isPropagationStopped=$g,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=Uc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=Uc)},persist:function(){},isPersistent:Uc}),r}var jr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},$c=Rn(jr),to=g({},jr,{view:0,detail:0}),Hw=Rn(to),od,cd,no,Fc=g({},to,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fd,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==no&&(no&&i.type==="mousemove"?(od=i.screenX-no.screenX,cd=i.screenY-no.screenY):cd=od=0,no=i),od)},movementY:function(i){return"movementY"in i?i.movementY:cd}}),Fg=Rn(Fc),Kw=g({},Fc,{dataTransfer:0}),Gw=Rn(Kw),Qw=g({},to,{relatedTarget:0}),ud=Rn(Qw),Yw=g({},jr,{animationName:0,elapsedTime:0,pseudoElement:0}),Vw=Rn(Yw),Ww=g({},jr,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),Xw=Rn(Ww),Zw=g({},jr,{data:0}),Pg=Rn(Zw),Jw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},e_={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"},t_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function n_(i){var r=this.nativeEvent;return r.getModifierState?r.getModifierState(i):(i=t_[i])?!!r[i]:!1}function fd(){return n_}var i_=g({},to,{key:function(i){if(i.key){var r=Jw[i.key]||i.key;if(r!=="Unidentified")return r}return i.type==="keypress"?(i=Bc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?e_[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fd,charCode:function(i){return i.type==="keypress"?Bc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Bc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),a_=Rn(i_),r_=g({},Fc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qg=Rn(r_),s_=g({},to,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fd}),l_=Rn(s_),o_=g({},jr,{propertyName:0,elapsedTime:0,pseudoElement:0}),c_=Rn(o_),u_=g({},Fc,{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}),f_=Rn(u_),d_=g({},jr,{newState:0,oldState:0}),h_=Rn(d_),m_=[9,13,27,32],dd=ra&&"CompositionEvent"in window,io=null;ra&&"documentMode"in document&&(io=document.documentMode);var p_=ra&&"TextEvent"in window&&!io,Hg=ra&&(!dd||io&&8<io&&11>=io),Kg=" ",Gg=!1;function Qg(i,r){switch(i){case"keyup":return m_.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yg(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ts=!1;function g_(i,r){switch(i){case"compositionend":return Yg(r);case"keypress":return r.which!==32?null:(Gg=!0,Kg);case"textInput":return i=r.data,i===Kg&&Gg?null:i;default:return null}}function b_(i,r){if(Ts)return i==="compositionend"||!dd&&Qg(i,r)?(i=Ug(),Ic=ld=Ia=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 Hg&&r.locale!=="ko"?null:r.data;default:return null}}var y_={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 Vg(i){var r=i&&i.nodeName&&i.nodeName.toLowerCase();return r==="input"?!!y_[i.type]:r==="textarea"}function Wg(i,r,l,u){Ve?jt?jt.push(u):jt=[u]:Ve=u,r=Ou(r,"onChange"),0<r.length&&(l=new $c("onChange","change",null,l,u),i.push({event:l,listeners:r}))}var ao=null,ro=null;function x_(i){Mx(i,0)}function Pc(i){var r=ja(i);if(Vl(r))return i}function Xg(i,r){if(i==="change")return r}var Zg=!1;if(ra){var hd;if(ra){var md="oninput"in document;if(!md){var Jg=document.createElement("div");Jg.setAttribute("oninput","return;"),md=typeof Jg.oninput=="function"}hd=md}else hd=!1;Zg=hd&&(!document.documentMode||9<document.documentMode)}function eb(){ao&&(ao.detachEvent("onpropertychange",tb),ro=ao=null)}function tb(i){if(i.propertyName==="value"&&Pc(ro)){var r=[];Wg(r,ro,i,Ue(i)),zc(x_,r)}}function v_(i,r,l){i==="focusin"?(eb(),ao=r,ro=l,ao.attachEvent("onpropertychange",tb)):i==="focusout"&&eb()}function E_(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Pc(ro)}function S_(i,r){if(i==="click")return Pc(r)}function w_(i,r){if(i==="input"||i==="change")return Pc(r)}function __(i,r){return i===r&&(i!==0||1/i===1/r)||i!==i&&r!==r}var Vn=typeof Object.is=="function"?Object.is:__;function so(i,r){if(Vn(i,r))return!0;if(typeof i!="object"||i===null||typeof r!="object"||r===null)return!1;var l=Object.keys(i),u=Object.keys(r);if(l.length!==u.length)return!1;for(u=0;u<l.length;u++){var p=l[u];if(!Ui.call(r,p)||!Vn(i[p],r[p]))return!1}return!0}function nb(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function ib(i,r){var l=nb(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=nb(l)}}function ab(i,r){return i&&r?i===r?!0:i&&i.nodeType===3?!1:r&&r.nodeType===3?ab(i,r.parentNode):"contains"in i?i.contains(r):i.compareDocumentPosition?!!(i.compareDocumentPosition(r)&16):!1:!1}function rb(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 pd(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 k_=ra&&"documentMode"in document&&11>=document.documentMode,Cs=null,gd=null,lo=null,bd=!1;function sb(i,r,l){var u=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bd||Cs==null||Cs!==_s(u)||(u=Cs,"selectionStart"in u&&pd(u)?u={start:u.selectionStart,end:u.selectionEnd}:(u=(u.ownerDocument&&u.ownerDocument.defaultView||window).getSelection(),u={anchorNode:u.anchorNode,anchorOffset:u.anchorOffset,focusNode:u.focusNode,focusOffset:u.focusOffset}),lo&&so(lo,u)||(lo=u,u=Ou(gd,"onSelect"),0<u.length&&(r=new $c("onSelect","select",null,r,l),i.push({event:r,listeners:u}),r.target=Cs)))}function Dr(i,r){var l={};return l[i.toLowerCase()]=r.toLowerCase(),l["Webkit"+i]="webkit"+r,l["Moz"+i]="moz"+r,l}var As={animationend:Dr("Animation","AnimationEnd"),animationiteration:Dr("Animation","AnimationIteration"),animationstart:Dr("Animation","AnimationStart"),transitionrun:Dr("Transition","TransitionRun"),transitionstart:Dr("Transition","TransitionStart"),transitioncancel:Dr("Transition","TransitionCancel"),transitionend:Dr("Transition","TransitionEnd")},yd={},lb={};ra&&(lb=document.createElement("div").style,"AnimationEvent"in window||(delete As.animationend.animation,delete As.animationiteration.animation,delete As.animationstart.animation),"TransitionEvent"in window||delete As.transitionend.transition);function Lr(i){if(yd[i])return yd[i];if(!As[i])return i;var r=As[i],l;for(l in r)if(r.hasOwnProperty(l)&&l in lb)return yd[i]=r[l];return i}var ob=Lr("animationend"),cb=Lr("animationiteration"),ub=Lr("animationstart"),N_=Lr("transitionrun"),T_=Lr("transitionstart"),C_=Lr("transitioncancel"),fb=Lr("transitionend"),db=new Map,xd="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(" ");xd.push("scrollEnd");function Ci(i,r){db.set(i,r),ia(r,[i])}var qc=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)},ui=[],Os=0,vd=0;function Hc(){for(var i=Os,r=vd=Os=0;r<i;){var l=ui[r];ui[r++]=null;var u=ui[r];ui[r++]=null;var p=ui[r];ui[r++]=null;var y=ui[r];if(ui[r++]=null,u!==null&&p!==null){var S=u.pending;S===null?p.next=p:(p.next=S.next,S.next=p),u.pending=p}y!==0&&hb(l,p,y)}}function Kc(i,r,l,u){ui[Os++]=i,ui[Os++]=r,ui[Os++]=l,ui[Os++]=u,vd|=u,i.lanes|=u,i=i.alternate,i!==null&&(i.lanes|=u)}function Ed(i,r,l,u){return Kc(i,r,l,u),Gc(i)}function zr(i,r){return Kc(i,null,null,r),Gc(i)}function hb(i,r,l){i.lanes|=l;var u=i.alternate;u!==null&&(u.lanes|=l);for(var p=!1,y=i.return;y!==null;)y.childLanes|=l,u=y.alternate,u!==null&&(u.childLanes|=l),y.tag===22&&(i=y.stateNode,i===null||i._visibility&1||(p=!0)),i=y,y=y.return;return i.tag===3?(y=i.stateNode,p&&r!==null&&(p=31-ut(l),i=y.hiddenUpdates,u=i[p],u===null?i[p]=[r]:u.push(r),r.lane=l|536870912),y):null}function Gc(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 Rs={};function A_(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 Wn(i,r,l,u){return new A_(i,r,l,u)}function Sd(i){return i=i.prototype,!(!i||!i.isReactComponent)}function sa(i,r){var l=i.alternate;return l===null?(l=Wn(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,p,y){var S=0;if(u=i,typeof i=="function")Sd(i)&&(S=1);else if(typeof i=="string")S=Dk(i,l,G.current)?26:i==="html"||i==="head"||i==="body"?27:5;else e:switch(i){case ee:return i=Wn(31,l,r,p),i.elementType=ee,i.lanes=y,i;case w:return Ir(l.children,p,y,r);case k:S=8,p|=24;break;case _:return i=Wn(12,l,r,p|2),i.elementType=_,i.lanes=y,i;case $:return i=Wn(13,l,r,p),i.elementType=$,i.lanes=y,i;case M:return i=Wn(19,l,r,p),i.elementType=M,i.lanes=y,i;default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case T:S=10;break e;case A:S=9;break e;case j:S=11;break e;case F:S=14;break e;case H:S=16,u=null;break e}S=29,l=Error(a(130,i===null?"null":typeof i,"")),u=null}return r=Wn(S,l,r,p),r.elementType=i,r.type=u,r.lanes=y,r}function Ir(i,r,l,u){return i=Wn(7,i,u,r),i.lanes=l,i}function wd(i,r,l){return i=Wn(6,i,null,r),i.lanes=l,i}function pb(i){var r=Wn(18,null,null,0);return r.stateNode=i,r}function _d(i,r,l){return r=Wn(4,i.children!==null?i.children:[],i.key,r),r.lanes=l,r.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},r}var gb=new WeakMap;function fi(i,r){if(typeof i=="object"&&i!==null){var l=gb.get(i);return l!==void 0?l:(r={value:i,source:r,stack:oi(r)},gb.set(i,r),r)}return{value:i,source:r,stack:oi(r)}}var Ms=[],js=0,Yc=null,oo=0,di=[],hi=0,Ba=null,Pi=1,qi="";function la(i,r){Ms[js++]=oo,Ms[js++]=Yc,Yc=i,oo=r}function bb(i,r,l){di[hi++]=Pi,di[hi++]=qi,di[hi++]=Ba,Ba=i;var u=Pi;i=qi;var p=32-ut(u)-1;u&=~(1<<p),l+=1;var y=32-ut(r)+p;if(30<y){var S=p-p%5;y=(u&(1<<S)-1).toString(32),u>>=S,p-=S,Pi=1<<32-ut(r)+p|l<<p|u,qi=y+i}else Pi=1<<y|l<<p|u,qi=i}function kd(i){i.return!==null&&(la(i,1),bb(i,1,0))}function Nd(i){for(;i===Yc;)Yc=Ms[--js],Ms[js]=null,oo=Ms[--js],Ms[js]=null;for(;i===Ba;)Ba=di[--hi],di[hi]=null,qi=di[--hi],di[hi]=null,Pi=di[--hi],di[hi]=null}function yb(i,r){di[hi++]=Pi,di[hi++]=qi,di[hi++]=Ba,Pi=r.id,qi=r.overflow,Ba=i}var ln=null,Nt=null,et=!1,Ua=null,mi=!1,Td=Error(a(519));function $a(i){var r=Error(a(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw co(fi(r,i)),Td}function xb(i){var r=i.stateNode,l=i.type,u=i.memoizedProps;switch(r[qt]=i,r[dn]=u,l){case"dialog":Qe("cancel",r),Qe("close",r);break;case"iframe":case"object":case"embed":Qe("load",r);break;case"video":case"audio":for(l=0;l<Mo.length;l++)Qe(Mo[l],r);break;case"source":Qe("error",r);break;case"img":case"image":case"link":Qe("error",r),Qe("load",r);break;case"details":Qe("toggle",r);break;case"input":Qe("invalid",r),Mr(r,u.value,u.defaultValue,u.checked,u.defaultChecked,u.type,u.name,!0);break;case"select":Qe("invalid",r);break;case"textarea":Qe("invalid",r),Ns(r,u.value,u.defaultValue,u.children)}l=u.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||r.textContent===""+l||u.suppressHydrationWarning===!0||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||$a(i,!0)}function vb(i){for(ln=i.return;ln;)switch(ln.tag){case 5:case 31:case 13:mi=!1;return;case 27:case 3:mi=!0;return;default:ln=ln.return}}function Ds(i){if(i!==ln)return!1;if(!et)return vb(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")||Kh(i.type,i.memoizedProps)),l=!l),l&&Nt&&$a(i),vb(i),r===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Nt=Kx(i)}else if(r===31){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(317));Nt=Kx(i)}else r===27?(r=Nt,er(i.type)?(i=Wh,Wh=null,Nt=i):Nt=r):Nt=ln?gi(i.stateNode.nextSibling):null;return!0}function Br(){Nt=ln=null,et=!1}function Cd(){var i=Ua;return i!==null&&(Ln===null?Ln=i:Ln.push.apply(Ln,i),Ua=null),i}function co(i){Ua===null?Ua=[i]:Ua.push(i)}var Ad=D(null),Ur=null,oa=null;function Fa(i,r,l){C(Ad,r._currentValue),r._currentValue=l}function ca(i){i._currentValue=Ad.current,X(Ad)}function Od(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 Rd(i,r,l,u){var p=i.child;for(p!==null&&(p.return=i);p!==null;){var y=p.dependencies;if(y!==null){var S=p.child;y=y.firstContext;e:for(;y!==null;){var N=y;y=p;for(var z=0;z<r.length;z++)if(N.context===r[z]){y.lanes|=l,N=y.alternate,N!==null&&(N.lanes|=l),Od(y.return,l,i),u||(S=null);break e}y=N.next}}else if(p.tag===18){if(S=p.return,S===null)throw Error(a(341));S.lanes|=l,y=S.alternate,y!==null&&(y.lanes|=l),Od(S,l,i),S=null}else S=p.child;if(S!==null)S.return=p;else for(S=p;S!==null;){if(S===i){S=null;break}if(p=S.sibling,p!==null){p.return=S.return,S=p;break}S=S.return}p=S}}function Ls(i,r,l,u){i=null;for(var p=r,y=!1;p!==null;){if(!y){if((p.flags&524288)!==0)y=!0;else if((p.flags&262144)!==0)break}if(p.tag===10){var S=p.alternate;if(S===null)throw Error(a(387));if(S=S.memoizedProps,S!==null){var N=p.type;Vn(p.pendingProps.value,S.value)||(i!==null?i.push(N):i=[N])}}else if(p===K.current){if(S=p.alternate,S===null)throw Error(a(387));S.memoizedState.memoizedState!==p.memoizedState.memoizedState&&(i!==null?i.push(Io):i=[Io])}p=p.return}i!==null&&Rd(r,i,l,u),r.flags|=262144}function Vc(i){for(i=i.firstContext;i!==null;){if(!Vn(i.context._currentValue,i.memoizedValue))return!0;i=i.next}return!1}function $r(i){Ur=i,oa=null,i=i.dependencies,i!==null&&(i.firstContext=null)}function on(i){return Eb(Ur,i)}function Wc(i,r){return Ur===null&&$r(i),Eb(i,r)}function Eb(i,r){var l=r._currentValue;if(r={context:r,memoizedValue:l,next:null},oa===null){if(i===null)throw Error(a(308));oa=r,i.dependencies={lanes:0,firstContext:r},i.flags|=524288}else oa=oa.next=r;return l}var O_=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()})}},R_=e.unstable_scheduleCallback,M_=e.unstable_NormalPriority,Vt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Md(){return{controller:new O_,data:new Map,refCount:0}}function uo(i){i.refCount--,i.refCount===0&&R_(M_,function(){i.controller.abort()})}var fo=null,jd=0,zs=0,Is=null;function j_(i,r){if(fo===null){var l=fo=[];jd=0,zs=zh(),Is={status:"pending",value:void 0,then:function(u){l.push(u)}}}return jd++,r.then(Sb,Sb),r}function Sb(){if(--jd===0&&fo!==null){Is!==null&&(Is.status="fulfilled");var i=fo;fo=null,zs=0,Is=null;for(var r=0;r<i.length;r++)(0,i[r])()}}function D_(i,r){var l=[],u={status:"pending",value:null,reason:null,then:function(p){l.push(p)}};return i.then(function(){u.status="fulfilled",u.value=r;for(var p=0;p<l.length;p++)(0,l[p])(r)},function(p){for(u.status="rejected",u.reason=p,p=0;p<l.length;p++)(0,l[p])(void 0)}),u}var wb=q.S;q.S=function(i,r){sx=Mt(),typeof r=="object"&&r!==null&&typeof r.then=="function"&&j_(i,r),wb!==null&&wb(i,r)};var Fr=D(null);function Dd(){var i=Fr.current;return i!==null?i:vt.pooledCache}function Xc(i,r){r===null?C(Fr,Fr.current):C(Fr,r.pool)}function _b(){var i=Dd();return i===null?null:{parent:Vt._currentValue,pool:i}}var Bs=Error(a(460)),Ld=Error(a(474)),Zc=Error(a(542)),Jc={then:function(){}};function kb(i){return i=i.status,i==="fulfilled"||i==="rejected"}function Nb(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,Cb(i),i;default:if(typeof r.status=="string")r.then(ye,ye);else{if(i=vt,i!==null&&100<i.shellSuspendCounter)throw Error(a(482));i=r,i.status="pending",i.then(function(u){if(r.status==="pending"){var p=r;p.status="fulfilled",p.value=u}},function(u){if(r.status==="pending"){var p=r;p.status="rejected",p.reason=u}})}switch(r.status){case"fulfilled":return r.value;case"rejected":throw i=r.reason,Cb(i),i}throw qr=r,Bs}}function Pr(i){try{var r=i._init;return r(i._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(qr=l,Bs):l}}var qr=null;function Tb(){if(qr===null)throw Error(a(459));var i=qr;return qr=null,i}function Cb(i){if(i===Bs||i===Zc)throw Error(a(483))}var Us=null,ho=0;function eu(i){var r=ho;return ho+=1,Us===null&&(Us=[]),Nb(Us,i,r)}function mo(i,r){r=r.props.ref,i.ref=r!==void 0?r:null}function tu(i,r){throw r.$$typeof===x?Error(a(525)):(i=Object.prototype.toString.call(r),Error(a(31,i==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":i)))}function Ab(i){function r(P,U){if(i){var Q=P.deletions;Q===null?(P.deletions=[U],P.flags|=16):Q.push(U)}}function l(P,U){if(!i)return null;for(;U!==null;)r(P,U),U=U.sibling;return null}function u(P){for(var U=new Map;P!==null;)P.key!==null?U.set(P.key,P):U.set(P.index,P),P=P.sibling;return U}function p(P,U){return P=sa(P,U),P.index=0,P.sibling=null,P}function y(P,U,Q){return P.index=Q,i?(Q=P.alternate,Q!==null?(Q=Q.index,Q<U?(P.flags|=67108866,U):Q):(P.flags|=67108866,U)):(P.flags|=1048576,U)}function S(P){return i&&P.alternate===null&&(P.flags|=67108866),P}function N(P,U,Q,le){return U===null||U.tag!==6?(U=wd(Q,P.mode,le),U.return=P,U):(U=p(U,Q),U.return=P,U)}function z(P,U,Q,le){var Oe=Q.type;return Oe===w?ie(P,U,Q.props.children,le,Q.key):U!==null&&(U.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===H&&Pr(Oe)===U.type)?(U=p(U,Q.props),mo(U,Q),U.return=P,U):(U=Qc(Q.type,Q.key,Q.props,null,P.mode,le),mo(U,Q),U.return=P,U)}function Y(P,U,Q,le){return U===null||U.tag!==4||U.stateNode.containerInfo!==Q.containerInfo||U.stateNode.implementation!==Q.implementation?(U=_d(Q,P.mode,le),U.return=P,U):(U=p(U,Q.children||[]),U.return=P,U)}function ie(P,U,Q,le,Oe){return U===null||U.tag!==7?(U=Ir(Q,P.mode,le,Oe),U.return=P,U):(U=p(U,Q),U.return=P,U)}function oe(P,U,Q){if(typeof U=="string"&&U!==""||typeof U=="number"||typeof U=="bigint")return U=wd(""+U,P.mode,Q),U.return=P,U;if(typeof U=="object"&&U!==null){switch(U.$$typeof){case v:return Q=Qc(U.type,U.key,U.props,null,P.mode,Q),mo(Q,U),Q.return=P,Q;case E:return U=_d(U,P.mode,Q),U.return=P,U;case H:return U=Pr(U),oe(P,U,Q)}if(te(U)||ae(U))return U=Ir(U,P.mode,Q,null),U.return=P,U;if(typeof U.then=="function")return oe(P,eu(U),Q);if(U.$$typeof===T)return oe(P,Wc(P,U),Q);tu(P,U)}return null}function W(P,U,Q,le){var Oe=U!==null?U.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint")return Oe!==null?null:N(P,U,""+Q,le);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:return Q.key===Oe?z(P,U,Q,le):null;case E:return Q.key===Oe?Y(P,U,Q,le):null;case H:return Q=Pr(Q),W(P,U,Q,le)}if(te(Q)||ae(Q))return Oe!==null?null:ie(P,U,Q,le,null);if(typeof Q.then=="function")return W(P,U,eu(Q),le);if(Q.$$typeof===T)return W(P,U,Wc(P,Q),le);tu(P,Q)}return null}function Z(P,U,Q,le,Oe){if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return P=P.get(Q)||null,N(U,P,""+le,Oe);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case v:return P=P.get(le.key===null?Q:le.key)||null,z(U,P,le,Oe);case E:return P=P.get(le.key===null?Q:le.key)||null,Y(U,P,le,Oe);case H:return le=Pr(le),Z(P,U,Q,le,Oe)}if(te(le)||ae(le))return P=P.get(Q)||null,ie(U,P,le,Oe,null);if(typeof le.then=="function")return Z(P,U,Q,eu(le),Oe);if(le.$$typeof===T)return Z(P,U,Q,Wc(U,le),Oe);tu(U,le)}return null}function we(P,U,Q,le){for(var Oe=null,rt=null,Ne=U,Fe=U=0,Xe=null;Ne!==null&&Fe<Q.length;Fe++){Ne.index>Fe?(Xe=Ne,Ne=null):Xe=Ne.sibling;var st=W(P,Ne,Q[Fe],le);if(st===null){Ne===null&&(Ne=Xe);break}i&&Ne&&st.alternate===null&&r(P,Ne),U=y(st,U,Fe),rt===null?Oe=st:rt.sibling=st,rt=st,Ne=Xe}if(Fe===Q.length)return l(P,Ne),et&&la(P,Fe),Oe;if(Ne===null){for(;Fe<Q.length;Fe++)Ne=oe(P,Q[Fe],le),Ne!==null&&(U=y(Ne,U,Fe),rt===null?Oe=Ne:rt.sibling=Ne,rt=Ne);return et&&la(P,Fe),Oe}for(Ne=u(Ne);Fe<Q.length;Fe++)Xe=Z(Ne,P,Fe,Q[Fe],le),Xe!==null&&(i&&Xe.alternate!==null&&Ne.delete(Xe.key===null?Fe:Xe.key),U=y(Xe,U,Fe),rt===null?Oe=Xe:rt.sibling=Xe,rt=Xe);return i&&Ne.forEach(function(rr){return r(P,rr)}),et&&la(P,Fe),Oe}function je(P,U,Q,le){if(Q==null)throw Error(a(151));for(var Oe=null,rt=null,Ne=U,Fe=U=0,Xe=null,st=Q.next();Ne!==null&&!st.done;Fe++,st=Q.next()){Ne.index>Fe?(Xe=Ne,Ne=null):Xe=Ne.sibling;var rr=W(P,Ne,st.value,le);if(rr===null){Ne===null&&(Ne=Xe);break}i&&Ne&&rr.alternate===null&&r(P,Ne),U=y(rr,U,Fe),rt===null?Oe=rr:rt.sibling=rr,rt=rr,Ne=Xe}if(st.done)return l(P,Ne),et&&la(P,Fe),Oe;if(Ne===null){for(;!st.done;Fe++,st=Q.next())st=oe(P,st.value,le),st!==null&&(U=y(st,U,Fe),rt===null?Oe=st:rt.sibling=st,rt=st);return et&&la(P,Fe),Oe}for(Ne=u(Ne);!st.done;Fe++,st=Q.next())st=Z(Ne,P,Fe,st.value,le),st!==null&&(i&&st.alternate!==null&&Ne.delete(st.key===null?Fe:st.key),U=y(st,U,Fe),rt===null?Oe=st:rt.sibling=st,rt=st);return i&&Ne.forEach(function(Kk){return r(P,Kk)}),et&&la(P,Fe),Oe}function bt(P,U,Q,le){if(typeof Q=="object"&&Q!==null&&Q.type===w&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case v:e:{for(var Oe=Q.key;U!==null;){if(U.key===Oe){if(Oe=Q.type,Oe===w){if(U.tag===7){l(P,U.sibling),le=p(U,Q.props.children),le.return=P,P=le;break e}}else if(U.elementType===Oe||typeof Oe=="object"&&Oe!==null&&Oe.$$typeof===H&&Pr(Oe)===U.type){l(P,U.sibling),le=p(U,Q.props),mo(le,Q),le.return=P,P=le;break e}l(P,U);break}else r(P,U);U=U.sibling}Q.type===w?(le=Ir(Q.props.children,P.mode,le,Q.key),le.return=P,P=le):(le=Qc(Q.type,Q.key,Q.props,null,P.mode,le),mo(le,Q),le.return=P,P=le)}return S(P);case E:e:{for(Oe=Q.key;U!==null;){if(U.key===Oe)if(U.tag===4&&U.stateNode.containerInfo===Q.containerInfo&&U.stateNode.implementation===Q.implementation){l(P,U.sibling),le=p(U,Q.children||[]),le.return=P,P=le;break e}else{l(P,U);break}else r(P,U);U=U.sibling}le=_d(Q,P.mode,le),le.return=P,P=le}return S(P);case H:return Q=Pr(Q),bt(P,U,Q,le)}if(te(Q))return we(P,U,Q,le);if(ae(Q)){if(Oe=ae(Q),typeof Oe!="function")throw Error(a(150));return Q=Oe.call(Q),je(P,U,Q,le)}if(typeof Q.then=="function")return bt(P,U,eu(Q),le);if(Q.$$typeof===T)return bt(P,U,Wc(P,Q),le);tu(P,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"||typeof Q=="bigint"?(Q=""+Q,U!==null&&U.tag===6?(l(P,U.sibling),le=p(U,Q),le.return=P,P=le):(l(P,U),le=wd(Q,P.mode,le),le.return=P,P=le),S(P)):l(P,U)}return function(P,U,Q,le){try{ho=0;var Oe=bt(P,U,Q,le);return Us=null,Oe}catch(Ne){if(Ne===Bs||Ne===Zc)throw Ne;var rt=Wn(29,Ne,null,P.mode);return rt.lanes=le,rt.return=P,rt}finally{}}}var Hr=Ab(!0),Ob=Ab(!1),Pa=!1;function zd(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Id(i,r){i=i.updateQueue,r.updateQueue===i&&(r.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,callbacks:null})}function qa(i){return{lane:i,tag:0,payload:null,callback:null,next:null}}function Ha(i,r,l){var u=i.updateQueue;if(u===null)return null;if(u=u.shared,(lt&2)!==0){var p=u.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),u.pending=r,r=Gc(i),hb(i,null,l),r}return Kc(i,u,r,l),Gc(i)}function po(i,r,l){if(r=r.updateQueue,r!==null&&(r=r.shared,(l&4194048)!==0)){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Le(i,l)}}function Bd(i,r){var l=i.updateQueue,u=i.alternate;if(u!==null&&(u=u.updateQueue,l===u)){var p=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var S={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};y===null?p=y=S:y=y.next=S,l=l.next}while(l!==null);y===null?p=y=r:y=y.next=r}else p=y=r;l={baseState:u.baseState,firstBaseUpdate:p,lastBaseUpdate:y,shared:u.shared,callbacks:u.callbacks},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=r:i.next=r,l.lastBaseUpdate=r}var Ud=!1;function go(){if(Ud){var i=Is;if(i!==null)throw i}}function bo(i,r,l,u){Ud=!1;var p=i.updateQueue;Pa=!1;var y=p.firstBaseUpdate,S=p.lastBaseUpdate,N=p.shared.pending;if(N!==null){p.shared.pending=null;var z=N,Y=z.next;z.next=null,S===null?y=Y:S.next=Y,S=z;var ie=i.alternate;ie!==null&&(ie=ie.updateQueue,N=ie.lastBaseUpdate,N!==S&&(N===null?ie.firstBaseUpdate=Y:N.next=Y,ie.lastBaseUpdate=z))}if(y!==null){var oe=p.baseState;S=0,ie=Y=z=null,N=y;do{var W=N.lane&-536870913,Z=W!==N.lane;if(Z?(We&W)===W:(u&W)===W){W!==0&&W===zs&&(Ud=!0),ie!==null&&(ie=ie.next={lane:0,tag:N.tag,payload:N.payload,callback:null,next:null});e:{var we=i,je=N;W=r;var bt=l;switch(je.tag){case 1:if(we=je.payload,typeof we=="function"){oe=we.call(bt,oe,W);break e}oe=we;break e;case 3:we.flags=we.flags&-65537|128;case 0:if(we=je.payload,W=typeof we=="function"?we.call(bt,oe,W):we,W==null)break e;oe=g({},oe,W);break e;case 2:Pa=!0}}W=N.callback,W!==null&&(i.flags|=64,Z&&(i.flags|=8192),Z=p.callbacks,Z===null?p.callbacks=[W]:Z.push(W))}else Z={lane:W,tag:N.tag,payload:N.payload,callback:N.callback,next:null},ie===null?(Y=ie=Z,z=oe):ie=ie.next=Z,S|=W;if(N=N.next,N===null){if(N=p.shared.pending,N===null)break;Z=N,N=Z.next,Z.next=null,p.lastBaseUpdate=Z,p.shared.pending=null}}while(!0);ie===null&&(z=oe),p.baseState=z,p.firstBaseUpdate=Y,p.lastBaseUpdate=ie,y===null&&(p.shared.lanes=0),Va|=S,i.lanes=S,i.memoizedState=oe}}function Rb(i,r){if(typeof i!="function")throw Error(a(191,i));i.call(r)}function Mb(i,r){var l=i.callbacks;if(l!==null)for(i.callbacks=null,i=0;i<l.length;i++)Rb(l[i],r)}var $s=D(null),nu=D(0);function jb(i,r){i=ya,C(nu,i),C($s,r),ya=i|r.baseLanes}function $d(){C(nu,ya),C($s,$s.current)}function Fd(){ya=nu.current,X($s),X(nu)}var Xn=D(null),pi=null;function Ka(i){var r=i.alternate;C(Kt,Kt.current&1),C(Xn,i),pi===null&&(r===null||$s.current!==null||r.memoizedState!==null)&&(pi=i)}function Pd(i){C(Kt,Kt.current),C(Xn,i),pi===null&&(pi=i)}function Db(i){i.tag===22?(C(Kt,Kt.current),C(Xn,i),pi===null&&(pi=i)):Ga()}function Ga(){C(Kt,Kt.current),C(Xn,Xn.current)}function Zn(i){X(Xn),pi===i&&(pi=null),X(Kt)}var Kt=D(0);function iu(i){for(var r=i;r!==null;){if(r.tag===13){var l=r.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Yh(l)||Vh(l)))return r}else if(r.tag===19&&(r.memoizedProps.revealOrder==="forwards"||r.memoizedProps.revealOrder==="backwards"||r.memoizedProps.revealOrder==="unstable_legacy-backwards"||r.memoizedProps.revealOrder==="together")){if((r.flags&128)!==0)return r}else if(r.child!==null){r.child.return=r,r=r.child;continue}if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return null;r=r.return}r.sibling.return=r.return,r=r.sibling}return null}var ua=0,$e=null,pt=null,Wt=null,au=!1,Fs=!1,Kr=!1,ru=0,yo=0,Ps=null,L_=0;function Bt(){throw Error(a(321))}function qd(i,r){if(r===null)return!1;for(var l=0;l<r.length&&l<i.length;l++)if(!Vn(i[l],r[l]))return!1;return!0}function Hd(i,r,l,u,p,y){return ua=y,$e=r,r.memoizedState=null,r.updateQueue=null,r.lanes=0,q.H=i===null||i.memoizedState===null?by:rh,Kr=!1,y=l(u,p),Kr=!1,Fs&&(y=zb(r,l,u,p)),Lb(i),y}function Lb(i){q.H=Eo;var r=pt!==null&&pt.next!==null;if(ua=0,Wt=pt=$e=null,au=!1,yo=0,Ps=null,r)throw Error(a(300));i===null||Xt||(i=i.dependencies,i!==null&&Vc(i)&&(Xt=!0))}function zb(i,r,l,u){$e=i;var p=0;do{if(Fs&&(Ps=null),yo=0,Fs=!1,25<=p)throw Error(a(301));if(p+=1,Wt=pt=null,i.updateQueue!=null){var y=i.updateQueue;y.lastEffect=null,y.events=null,y.stores=null,y.memoCache!=null&&(y.memoCache.index=0)}q.H=yy,y=r(l,u)}while(Fs);return y}function z_(){var i=q.H,r=i.useState()[0];return r=typeof r.then=="function"?xo(r):r,i=i.useState()[0],(pt!==null?pt.memoizedState:null)!==i&&($e.flags|=1024),r}function Kd(){var i=ru!==0;return ru=0,i}function Gd(i,r,l){r.updateQueue=i.updateQueue,r.flags&=-2053,i.lanes&=~l}function Qd(i){if(au){for(i=i.memoizedState;i!==null;){var r=i.queue;r!==null&&(r.pending=null),i=i.next}au=!1}ua=0,Wt=pt=$e=null,Fs=!1,yo=ru=0,Ps=null}function Sn(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?$e.memoizedState=Wt=i:Wt=Wt.next=i,Wt}function Gt(){if(pt===null){var i=$e.alternate;i=i!==null?i.memoizedState:null}else i=pt.next;var r=Wt===null?$e.memoizedState:Wt.next;if(r!==null)Wt=r,pt=i;else{if(i===null)throw $e.alternate===null?Error(a(467)):Error(a(310));pt=i,i={memoizedState:pt.memoizedState,baseState:pt.baseState,baseQueue:pt.baseQueue,queue:pt.queue,next:null},Wt===null?$e.memoizedState=Wt=i:Wt=Wt.next=i}return Wt}function su(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function xo(i){var r=yo;return yo+=1,Ps===null&&(Ps=[]),i=Nb(Ps,i,r),r=$e,(Wt===null?r.memoizedState:Wt.next)===null&&(r=r.alternate,q.H=r===null||r.memoizedState===null?by:rh),i}function lu(i){if(i!==null&&typeof i=="object"){if(typeof i.then=="function")return xo(i);if(i.$$typeof===T)return on(i)}throw Error(a(438,String(i)))}function Yd(i){var r=null,l=$e.updateQueue;if(l!==null&&(r=l.memoCache),r==null){var u=$e.alternate;u!==null&&(u=u.updateQueue,u!==null&&(u=u.memoCache,u!=null&&(r={data:u.data.map(function(p){return p.slice()}),index:0})))}if(r==null&&(r={data:[],index:0}),l===null&&(l=su(),$e.updateQueue=l),l.memoCache=r,l=r.data[r.index],l===void 0)for(l=r.data[r.index]=Array(i),u=0;u<i;u++)l[u]=L;return r.index++,l}function fa(i,r){return typeof r=="function"?r(i):r}function ou(i){var r=Gt();return Vd(r,pt,i)}function Vd(i,r,l){var u=i.queue;if(u===null)throw Error(a(311));u.lastRenderedReducer=l;var p=i.baseQueue,y=u.pending;if(y!==null){if(p!==null){var S=p.next;p.next=y.next,y.next=S}r.baseQueue=p=y,u.pending=null}if(y=i.baseState,p===null)i.memoizedState=y;else{r=p.next;var N=S=null,z=null,Y=r,ie=!1;do{var oe=Y.lane&-536870913;if(oe!==Y.lane?(We&oe)===oe:(ua&oe)===oe){var W=Y.revertLane;if(W===0)z!==null&&(z=z.next={lane:0,revertLane:0,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null}),oe===zs&&(ie=!0);else if((ua&W)===W){Y=Y.next,W===zs&&(ie=!0);continue}else oe={lane:0,revertLane:Y.revertLane,gesture:null,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(N=z=oe,S=y):z=z.next=oe,$e.lanes|=W,Va|=W;oe=Y.action,Kr&&l(y,oe),y=Y.hasEagerState?Y.eagerState:l(y,oe)}else W={lane:oe,revertLane:Y.revertLane,gesture:Y.gesture,action:Y.action,hasEagerState:Y.hasEagerState,eagerState:Y.eagerState,next:null},z===null?(N=z=W,S=y):z=z.next=W,$e.lanes|=oe,Va|=oe;Y=Y.next}while(Y!==null&&Y!==r);if(z===null?S=y:z.next=N,!Vn(y,i.memoizedState)&&(Xt=!0,ie&&(l=Is,l!==null)))throw l;i.memoizedState=y,i.baseState=S,i.baseQueue=z,u.lastRenderedState=y}return p===null&&(u.lanes=0),[i.memoizedState,u.dispatch]}function Wd(i){var r=Gt(),l=r.queue;if(l===null)throw Error(a(311));l.lastRenderedReducer=i;var u=l.dispatch,p=l.pending,y=r.memoizedState;if(p!==null){l.pending=null;var S=p=p.next;do y=i(y,S.action),S=S.next;while(S!==p);Vn(y,r.memoizedState)||(Xt=!0),r.memoizedState=y,r.baseQueue===null&&(r.baseState=y),l.lastRenderedState=y}return[y,u]}function Ib(i,r,l){var u=$e,p=Gt(),y=et;if(y){if(l===void 0)throw Error(a(407));l=l()}else l=r();var S=!Vn((pt||p).memoizedState,l);if(S&&(p.memoizedState=l,Xt=!0),p=p.queue,Jd($b.bind(null,u,p,i),[i]),p.getSnapshot!==r||S||Wt!==null&&Wt.memoizedState.tag&1){if(u.flags|=2048,qs(9,{destroy:void 0},Ub.bind(null,u,p,l,r),null),vt===null)throw Error(a(349));y||(ua&127)!==0||Bb(u,r,l)}return l}function Bb(i,r,l){i.flags|=16384,i={getSnapshot:r,value:l},r=$e.updateQueue,r===null?(r=su(),$e.updateQueue=r,r.stores=[i]):(l=r.stores,l===null?r.stores=[i]:l.push(i))}function Ub(i,r,l,u){r.value=l,r.getSnapshot=u,Fb(r)&&Pb(i)}function $b(i,r,l){return l(function(){Fb(r)&&Pb(i)})}function Fb(i){var r=i.getSnapshot;i=i.value;try{var l=r();return!Vn(i,l)}catch{return!0}}function Pb(i){var r=zr(i,2);r!==null&&zn(r,i,2)}function Xd(i){var r=Sn();if(typeof i=="function"){var l=i;if(i=l(),Kr){fn(!0);try{l()}finally{fn(!1)}}}return r.memoizedState=r.baseState=i,r.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:i},r}function qb(i,r,l,u){return i.baseState=l,Vd(i,pt,typeof u=="function"?u:fa)}function I_(i,r,l,u,p){if(fu(i))throw Error(a(485));if(i=r.action,i!==null){var y={payload:p,action:i,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(S){y.listeners.push(S)}};q.T!==null?l(!0):y.isTransition=!1,u(y),l=r.pending,l===null?(y.next=r.pending=y,Hb(r,y)):(y.next=l.next,r.pending=l.next=y)}}function Hb(i,r){var l=r.action,u=r.payload,p=i.state;if(r.isTransition){var y=q.T,S={};q.T=S;try{var N=l(p,u),z=q.S;z!==null&&z(S,N),Kb(i,r,N)}catch(Y){Zd(i,r,Y)}finally{y!==null&&S.types!==null&&(y.types=S.types),q.T=y}}else try{y=l(p,u),Kb(i,r,y)}catch(Y){Zd(i,r,Y)}}function Kb(i,r,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(u){Gb(i,r,u)},function(u){return Zd(i,r,u)}):Gb(i,r,l)}function Gb(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,Hb(i,l)))}function Zd(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 Yb(i,r){return r}function Vb(i,r){if(et){var l=vt.formState;if(l!==null){e:{var u=$e;if(et){if(Nt){t:{for(var p=Nt,y=mi;p.nodeType!==8;){if(!y){p=null;break t}if(p=gi(p.nextSibling),p===null){p=null;break t}}y=p.data,p=y==="F!"||y==="F"?p:null}if(p){Nt=gi(p.nextSibling),u=p.data==="F!";break e}}$a(u)}u=!1}u&&(r=l[0])}}return l=Sn(),l.memoizedState=l.baseState=r,u={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Yb,lastRenderedState:r},l.queue=u,l=my.bind(null,$e,u),u.dispatch=l,u=Xd(!1),y=ah.bind(null,$e,!1,u.queue),u=Sn(),p={state:r,dispatch:null,action:i,pending:null},u.queue=p,l=I_.bind(null,$e,p,y,l),p.dispatch=l,u.memoizedState=i,[r,l,!1]}function Wb(i){var r=Gt();return Xb(r,pt,i)}function Xb(i,r,l){if(r=Vd(i,r,Yb)[0],i=ou(fa)[0],typeof r=="object"&&r!==null&&typeof r.then=="function")try{var u=xo(r)}catch(S){throw S===Bs?Zc:S}else u=r;r=Gt();var p=r.queue,y=p.dispatch;return l!==r.memoizedState&&($e.flags|=2048,qs(9,{destroy:void 0},B_.bind(null,p,l),null)),[u,y,i]}function B_(i,r){i.action=r}function Zb(i){var r=Gt(),l=pt;if(l!==null)return Xb(r,l,i);Gt(),r=r.memoizedState,l=Gt();var u=l.queue.dispatch;return l.memoizedState=i,[r,u,!1]}function qs(i,r,l,u){return i={tag:i,create:l,deps:u,inst:r,next:null},r=$e.updateQueue,r===null&&(r=su(),$e.updateQueue=r),l=r.lastEffect,l===null?r.lastEffect=i.next=i:(u=l.next,l.next=i,i.next=u,r.lastEffect=i),i}function Jb(){return Gt().memoizedState}function cu(i,r,l,u){var p=Sn();$e.flags|=i,p.memoizedState=qs(1|r,{destroy:void 0},l,u===void 0?null:u)}function uu(i,r,l,u){var p=Gt();u=u===void 0?null:u;var y=p.memoizedState.inst;pt!==null&&u!==null&&qd(u,pt.memoizedState.deps)?p.memoizedState=qs(r,y,l,u):($e.flags|=i,p.memoizedState=qs(1|r,y,l,u))}function ey(i,r){cu(8390656,8,i,r)}function Jd(i,r){uu(2048,8,i,r)}function U_(i){$e.flags|=4;var r=$e.updateQueue;if(r===null)r=su(),$e.updateQueue=r,r.events=[i];else{var l=r.events;l===null?r.events=[i]:l.push(i)}}function ty(i){var r=Gt().memoizedState;return U_({ref:r,nextImpl:i}),function(){if((lt&2)!==0)throw Error(a(440));return r.impl.apply(void 0,arguments)}}function ny(i,r){return uu(4,2,i,r)}function iy(i,r){return uu(4,4,i,r)}function ay(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 ry(i,r,l){l=l!=null?l.concat([i]):null,uu(4,4,ay.bind(null,r,i),l)}function eh(){}function sy(i,r){var l=Gt();r=r===void 0?null:r;var u=l.memoizedState;return r!==null&&qd(r,u[1])?u[0]:(l.memoizedState=[i,r],i)}function ly(i,r){var l=Gt();r=r===void 0?null:r;var u=l.memoizedState;if(r!==null&&qd(r,u[1]))return u[0];if(u=i(),Kr){fn(!0);try{i()}finally{fn(!1)}}return l.memoizedState=[u,r],u}function th(i,r,l){return l===void 0||(ua&1073741824)!==0&&(We&261930)===0?i.memoizedState=r:(i.memoizedState=l,i=ox(),$e.lanes|=i,Va|=i,l)}function oy(i,r,l,u){return Vn(l,r)?l:$s.current!==null?(i=th(i,l,u),Vn(i,r)||(Xt=!0),i):(ua&42)===0||(ua&1073741824)!==0&&(We&261930)===0?(Xt=!0,i.memoizedState=l):(i=ox(),$e.lanes|=i,Va|=i,r)}function cy(i,r,l,u,p){var y=ce.p;ce.p=y!==0&&8>y?y:8;var S=q.T,N={};q.T=N,ah(i,!1,r,l);try{var z=p(),Y=q.S;if(Y!==null&&Y(N,z),z!==null&&typeof z=="object"&&typeof z.then=="function"){var ie=D_(z,u);vo(i,r,ie,ti(i))}else vo(i,r,u,ti(i))}catch(oe){vo(i,r,{then:function(){},status:"rejected",reason:oe},ti())}finally{ce.p=y,S!==null&&N.types!==null&&(S.types=N.types),q.T=S}}function $_(){}function nh(i,r,l,u){if(i.tag!==5)throw Error(a(476));var p=uy(i).queue;cy(i,p,r,V,l===null?$_:function(){return fy(i),l(u)})}function uy(i){var r=i.memoizedState;if(r!==null)return r;r={memoizedState:V,baseState:V,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:V},next:null};var l={};return r.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:fa,lastRenderedState:l},next:null},i.memoizedState=r,i=i.alternate,i!==null&&(i.memoizedState=r),r}function fy(i){var r=uy(i);r.next===null&&(r=i.alternate.memoizedState),vo(i,r.next.queue,{},ti())}function ih(){return on(Io)}function dy(){return Gt().memoizedState}function hy(){return Gt().memoizedState}function F_(i){for(var r=i.return;r!==null;){switch(r.tag){case 24:case 3:var l=ti();i=qa(l);var u=Ha(r,i,l);u!==null&&(zn(u,r,l),po(u,r,l)),r={cache:Md()},i.payload=r;return}r=r.return}}function P_(i,r,l){var u=ti();l={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},fu(i)?py(r,l):(l=Ed(i,r,l,u),l!==null&&(zn(l,i,u),gy(l,r,u)))}function my(i,r,l){var u=ti();vo(i,r,l,u)}function vo(i,r,l,u){var p={lane:u,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(fu(i))py(r,p);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=r.lastRenderedReducer,y!==null))try{var S=r.lastRenderedState,N=y(S,l);if(p.hasEagerState=!0,p.eagerState=N,Vn(N,S))return Kc(i,r,p,0),vt===null&&Hc(),!1}catch{}finally{}if(l=Ed(i,r,p,u),l!==null)return zn(l,i,u),gy(l,r,u),!0}return!1}function ah(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=Ed(i,l,u,2),r!==null&&zn(r,i,2)}function fu(i){var r=i.alternate;return i===$e||r!==null&&r===$e}function py(i,r){Fs=au=!0;var l=i.pending;l===null?r.next=r:(r.next=l.next,l.next=r),i.pending=r}function gy(i,r,l){if((l&4194048)!==0){var u=r.lanes;u&=i.pendingLanes,l|=u,r.lanes=l,Le(i,l)}}var Eo={readContext:on,use:lu,useCallback:Bt,useContext:Bt,useEffect:Bt,useImperativeHandle:Bt,useLayoutEffect:Bt,useInsertionEffect:Bt,useMemo:Bt,useReducer:Bt,useRef:Bt,useState:Bt,useDebugValue:Bt,useDeferredValue:Bt,useTransition:Bt,useSyncExternalStore:Bt,useId:Bt,useHostTransitionStatus:Bt,useFormState:Bt,useActionState:Bt,useOptimistic:Bt,useMemoCache:Bt,useCacheRefresh:Bt};Eo.useEffectEvent=Bt;var by={readContext:on,use:lu,useCallback:function(i,r){return Sn().memoizedState=[i,r===void 0?null:r],i},useContext:on,useEffect:ey,useImperativeHandle:function(i,r,l){l=l!=null?l.concat([i]):null,cu(4194308,4,ay.bind(null,r,i),l)},useLayoutEffect:function(i,r){return cu(4194308,4,i,r)},useInsertionEffect:function(i,r){cu(4,2,i,r)},useMemo:function(i,r){var l=Sn();r=r===void 0?null:r;var u=i();if(Kr){fn(!0);try{i()}finally{fn(!1)}}return l.memoizedState=[u,r],u},useReducer:function(i,r,l){var u=Sn();if(l!==void 0){var p=l(r);if(Kr){fn(!0);try{l(r)}finally{fn(!1)}}}else p=r;return u.memoizedState=u.baseState=p,i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:p},u.queue=i,i=i.dispatch=P_.bind(null,$e,i),[u.memoizedState,i]},useRef:function(i){var r=Sn();return i={current:i},r.memoizedState=i},useState:function(i){i=Xd(i);var r=i.queue,l=my.bind(null,$e,r);return r.dispatch=l,[i.memoizedState,l]},useDebugValue:eh,useDeferredValue:function(i,r){var l=Sn();return th(l,i,r)},useTransition:function(){var i=Xd(!1);return i=cy.bind(null,$e,i.queue,!0,!1),Sn().memoizedState=i,[!1,i]},useSyncExternalStore:function(i,r,l){var u=$e,p=Sn();if(et){if(l===void 0)throw Error(a(407));l=l()}else{if(l=r(),vt===null)throw Error(a(349));(We&127)!==0||Bb(u,r,l)}p.memoizedState=l;var y={value:l,getSnapshot:r};return p.queue=y,ey($b.bind(null,u,y,i),[i]),u.flags|=2048,qs(9,{destroy:void 0},Ub.bind(null,u,y,l,r),null),l},useId:function(){var i=Sn(),r=vt.identifierPrefix;if(et){var l=qi,u=Pi;l=(u&~(1<<32-ut(u)-1)).toString(32)+l,r="_"+r+"R_"+l,l=ru++,0<l&&(r+="H"+l.toString(32)),r+="_"}else l=L_++,r="_"+r+"r_"+l.toString(32)+"_";return i.memoizedState=r},useHostTransitionStatus:ih,useFormState:Vb,useActionState:Vb,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=ah.bind(null,$e,!0,l),l.dispatch=r,[i,r]},useMemoCache:Yd,useCacheRefresh:function(){return Sn().memoizedState=F_.bind(null,$e)},useEffectEvent:function(i){var r=Sn(),l={impl:i};return r.memoizedState=l,function(){if((lt&2)!==0)throw Error(a(440));return l.impl.apply(void 0,arguments)}}},rh={readContext:on,use:lu,useCallback:sy,useContext:on,useEffect:Jd,useImperativeHandle:ry,useInsertionEffect:ny,useLayoutEffect:iy,useMemo:ly,useReducer:ou,useRef:Jb,useState:function(){return ou(fa)},useDebugValue:eh,useDeferredValue:function(i,r){var l=Gt();return oy(l,pt.memoizedState,i,r)},useTransition:function(){var i=ou(fa)[0],r=Gt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Ib,useId:dy,useHostTransitionStatus:ih,useFormState:Wb,useActionState:Wb,useOptimistic:function(i,r){var l=Gt();return qb(l,pt,i,r)},useMemoCache:Yd,useCacheRefresh:hy};rh.useEffectEvent=ty;var yy={readContext:on,use:lu,useCallback:sy,useContext:on,useEffect:Jd,useImperativeHandle:ry,useInsertionEffect:ny,useLayoutEffect:iy,useMemo:ly,useReducer:Wd,useRef:Jb,useState:function(){return Wd(fa)},useDebugValue:eh,useDeferredValue:function(i,r){var l=Gt();return pt===null?th(l,i,r):oy(l,pt.memoizedState,i,r)},useTransition:function(){var i=Wd(fa)[0],r=Gt().memoizedState;return[typeof i=="boolean"?i:xo(i),r]},useSyncExternalStore:Ib,useId:dy,useHostTransitionStatus:ih,useFormState:Zb,useActionState:Zb,useOptimistic:function(i,r){var l=Gt();return pt!==null?qb(l,pt,i,r):(l.baseState=i,[i,l.queue.dispatch])},useMemoCache:Yd,useCacheRefresh:hy};yy.useEffectEvent=ty;function sh(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 lh={enqueueSetState:function(i,r,l){i=i._reactInternals;var u=ti(),p=qa(u);p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(zn(r,i,u),po(r,i,u))},enqueueReplaceState:function(i,r,l){i=i._reactInternals;var u=ti(),p=qa(u);p.tag=1,p.payload=r,l!=null&&(p.callback=l),r=Ha(i,p,u),r!==null&&(zn(r,i,u),po(r,i,u))},enqueueForceUpdate:function(i,r){i=i._reactInternals;var l=ti(),u=qa(l);u.tag=2,r!=null&&(u.callback=r),r=Ha(i,u,l),r!==null&&(zn(r,i,l),po(r,i,l))}};function xy(i,r,l,u,p,y,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(u,y,S):r.prototype&&r.prototype.isPureReactComponent?!so(l,u)||!so(p,y):!0}function vy(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&&lh.enqueueReplaceState(r,r.state,null)}function Gr(i,r){var l=r;if("ref"in r){l={};for(var u in r)u!=="ref"&&(l[u]=r[u])}if(i=i.defaultProps){l===r&&(l=g({},l));for(var p in i)l[p]===void 0&&(l[p]=i[p])}return l}function Ey(i){qc(i)}function Sy(i){console.error(i)}function wy(i){qc(i)}function du(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(p){setTimeout(function(){throw p})}}function oh(i,r,l){return l=qa(l),l.tag=3,l.payload={element:null},l.callback=function(){du(i,r)},l}function ky(i){return i=qa(i),i.tag=3,i}function Ny(i,r,l,u){var p=l.type.getDerivedStateFromError;if(typeof p=="function"){var y=u.value;i.payload=function(){return p(y)},i.callback=function(){_y(r,l,u)}}var S=l.stateNode;S!==null&&typeof S.componentDidCatch=="function"&&(i.callback=function(){_y(r,l,u),typeof p!="function"&&(Wa===null?Wa=new Set([this]):Wa.add(this));var N=u.stack;this.componentDidCatch(u.value,{componentStack:N!==null?N:""})})}function q_(i,r,l,u,p){if(l.flags|=32768,u!==null&&typeof u=="object"&&typeof u.then=="function"){if(r=l.alternate,r!==null&&Ls(r,l,p,!0),l=Xn.current,l!==null){switch(l.tag){case 31:case 13:return pi===null?_u():l.alternate===null&&Ut===0&&(Ut=3),l.flags&=-257,l.flags|=65536,l.lanes=p,u===Jc?l.flags|=16384:(r=l.updateQueue,r===null?l.updateQueue=new Set([u]):r.add(u),jh(i,u,p)),!1;case 22:return l.flags|=65536,u===Jc?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)),jh(i,u,p)),!1}throw Error(a(435,l.tag))}return jh(i,u,p),_u(),!1}if(et)return r=Xn.current,r!==null?((r.flags&65536)===0&&(r.flags|=256),r.flags|=65536,r.lanes=p,u!==Td&&(i=Error(a(422),{cause:u}),co(fi(i,l)))):(u!==Td&&(r=Error(a(423),{cause:u}),co(fi(r,l))),i=i.current.alternate,i.flags|=65536,p&=-p,i.lanes|=p,u=fi(u,l),p=oh(i.stateNode,u,p),Bd(i,p),Ut!==4&&(Ut=2)),!1;var y=Error(a(520),{cause:u});if(y=fi(y,l),Ao===null?Ao=[y]:Ao.push(y),Ut!==4&&(Ut=2),r===null)return!0;u=fi(u,l),l=r;do{switch(l.tag){case 3:return l.flags|=65536,i=p&-p,l.lanes|=i,i=oh(l.stateNode,u,i),Bd(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"&&(Wa===null||!Wa.has(y))))return l.flags|=65536,p&=-p,l.lanes|=p,p=ky(p),Ny(p,i,l,u),Bd(l,p),!1}l=l.return}while(l!==null);return!1}var ch=Error(a(461)),Xt=!1;function cn(i,r,l,u){r.child=i===null?Ob(r,null,l,u):Hr(r,i.child,l,u)}function Ty(i,r,l,u,p){l=l.render;var y=r.ref;if("ref"in u){var S={};for(var N in u)N!=="ref"&&(S[N]=u[N])}else S=u;return $r(r),u=Hd(i,r,l,S,y,p),N=Kd(),i!==null&&!Xt?(Gd(i,r,p),da(i,r,p)):(et&&N&&kd(r),r.flags|=1,cn(i,r,u,p),r.child)}function Cy(i,r,l,u,p){if(i===null){var y=l.type;return typeof y=="function"&&!Sd(y)&&y.defaultProps===void 0&&l.compare===null?(r.tag=15,r.type=y,Ay(i,r,y,u,p)):(i=Qc(l.type,null,u,r,r.mode,p),i.ref=r.ref,i.return=r,r.child=i)}if(y=i.child,!bh(i,p)){var S=y.memoizedProps;if(l=l.compare,l=l!==null?l:so,l(S,u)&&i.ref===r.ref)return da(i,r,p)}return r.flags|=1,i=sa(y,u),i.ref=r.ref,i.return=r,r.child=i}function Ay(i,r,l,u,p){if(i!==null){var y=i.memoizedProps;if(so(y,u)&&i.ref===r.ref)if(Xt=!1,r.pendingProps=u=y,bh(i,p))(i.flags&131072)!==0&&(Xt=!0);else return r.lanes=i.lanes,da(i,r,p)}return uh(i,r,l,u,p)}function Oy(i,r,l,u){var p=u.children,y=i!==null?i.memoizedState:null;if(i===null&&r.stateNode===null&&(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),u.mode==="hidden"){if((r.flags&128)!==0){if(y=y!==null?y.baseLanes|l:l,i!==null){for(u=r.child=i.child,p=0;u!==null;)p=p|u.lanes|u.childLanes,u=u.sibling;u=p&~y}else u=0,r.child=null;return Ry(i,r,y,l,u)}if((l&536870912)!==0)r.memoizedState={baseLanes:0,cachePool:null},i!==null&&Xc(r,y!==null?y.cachePool:null),y!==null?jb(r,y):$d(),Db(r);else return u=r.lanes=536870912,Ry(i,r,y!==null?y.baseLanes|l:l,l,u)}else y!==null?(Xc(r,y.cachePool),jb(r,y),Ga(),r.memoizedState=null):(i!==null&&Xc(r,null),$d(),Ga());return cn(i,r,p,l),r.child}function So(i,r){return i!==null&&i.tag===22||r.stateNode!==null||(r.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.sibling}function Ry(i,r,l,u,p){var y=Dd();return y=y===null?null:{parent:Vt._currentValue,pool:y},r.memoizedState={baseLanes:l,cachePool:y},i!==null&&Xc(r,null),$d(),Db(r),i!==null&&Ls(i,r,u,!0),r.childLanes=p,null}function hu(i,r){return r=pu({mode:r.mode,children:r.children},i.mode),r.ref=i.ref,i.child=r,r.return=i,r}function My(i,r,l){return Hr(r,i.child,null,l),i=hu(r,r.pendingProps),i.flags|=2,Zn(r),r.memoizedState=null,i}function H_(i,r,l){var u=r.pendingProps,p=(r.flags&128)!==0;if(r.flags&=-129,i===null){if(et){if(u.mode==="hidden")return i=hu(r,u),r.lanes=536870912,So(null,i);if(Pd(r),(i=Nt)?(i=Hx(i,mi),i=i!==null&&i.data==="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:Pi,overflow:qi}:null,retryLane:536870912,hydrationErrors:null},l=pb(i),l.return=r,r.child=l,ln=r,Nt=null)):i=null,i===null)throw $a(r);return r.lanes=536870912,null}return hu(r,u)}var y=i.memoizedState;if(y!==null){var S=y.dehydrated;if(Pd(r),p)if(r.flags&256)r.flags&=-257,r=My(i,r,l);else if(r.memoizedState!==null)r.child=i.child,r.flags|=128,r=null;else throw Error(a(558));else if(Xt||Ls(i,r,l,!1),p=(l&i.childLanes)!==0,Xt||p){if(u=vt,u!==null&&(S=Pt(u,l),S!==0&&S!==y.retryLane))throw y.retryLane=S,zr(i,S),zn(u,i,S),ch;_u(),r=My(i,r,l)}else i=y.treeContext,Nt=gi(S.nextSibling),ln=r,et=!0,Ua=null,mi=!1,i!==null&&yb(r,i),r=hu(r,u),r.flags|=4096;return r}return i=sa(i.child,{mode:u.mode,children:u.children}),i.ref=r.ref,r.child=i,i.return=r,i}function 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 uh(i,r,l,u,p){return $r(r),l=Hd(i,r,l,u,void 0,p),u=Kd(),i!==null&&!Xt?(Gd(i,r,p),da(i,r,p)):(et&&u&&kd(r),r.flags|=1,cn(i,r,l,p),r.child)}function jy(i,r,l,u,p,y){return $r(r),r.updateQueue=null,l=zb(r,u,l,p),Lb(i),u=Kd(),i!==null&&!Xt?(Gd(i,r,y),da(i,r,y)):(et&&u&&kd(r),r.flags|=1,cn(i,r,l,y),r.child)}function Dy(i,r,l,u,p){if($r(r),r.stateNode===null){var y=Rs,S=l.contextType;typeof S=="object"&&S!==null&&(y=on(S)),y=new l(u,y),r.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,y.updater=lh,r.stateNode=y,y._reactInternals=r,y=r.stateNode,y.props=u,y.state=r.memoizedState,y.refs={},zd(r),S=l.contextType,y.context=typeof S=="object"&&S!==null?on(S):Rs,y.state=r.memoizedState,S=l.getDerivedStateFromProps,typeof S=="function"&&(sh(r,l,S,u),y.state=r.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(S=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),S!==y.state&&lh.enqueueReplaceState(y,y.state,null),bo(r,u,y,p),go(),y.state=r.memoizedState),typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!0}else if(i===null){y=r.stateNode;var N=r.memoizedProps,z=Gr(l,N);y.props=z;var Y=y.context,ie=l.contextType;S=Rs,typeof ie=="object"&&ie!==null&&(S=on(ie));var oe=l.getDerivedStateFromProps;ie=typeof oe=="function"||typeof y.getSnapshotBeforeUpdate=="function",N=r.pendingProps!==N,ie||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(N||Y!==S)&&vy(r,y,u,S),Pa=!1;var W=r.memoizedState;y.state=W,bo(r,u,y,p),go(),Y=r.memoizedState,N||W!==Y||Pa?(typeof oe=="function"&&(sh(r,l,oe,u),Y=r.memoizedState),(z=Pa||xy(r,l,z,u,W,Y,S))?(ie||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount()),typeof y.componentDidMount=="function"&&(r.flags|=4194308)):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),r.memoizedProps=u,r.memoizedState=Y),y.props=u,y.state=Y,y.context=S,u=z):(typeof y.componentDidMount=="function"&&(r.flags|=4194308),u=!1)}else{y=r.stateNode,Id(i,r),S=r.memoizedProps,ie=Gr(l,S),y.props=ie,oe=r.pendingProps,W=y.context,Y=l.contextType,z=Rs,typeof Y=="object"&&Y!==null&&(z=on(Y)),N=l.getDerivedStateFromProps,(Y=typeof N=="function"||typeof y.getSnapshotBeforeUpdate=="function")||typeof y.UNSAFE_componentWillReceiveProps!="function"&&typeof y.componentWillReceiveProps!="function"||(S!==oe||W!==z)&&vy(r,y,u,z),Pa=!1,W=r.memoizedState,y.state=W,bo(r,u,y,p),go();var Z=r.memoizedState;S!==oe||W!==Z||Pa||i!==null&&i.dependencies!==null&&Vc(i.dependencies)?(typeof N=="function"&&(sh(r,l,N,u),Z=r.memoizedState),(ie=Pa||xy(r,l,ie,u,W,Z,z)||i!==null&&i.dependencies!==null&&Vc(i.dependencies))?(Y||typeof y.UNSAFE_componentWillUpdate!="function"&&typeof y.componentWillUpdate!="function"||(typeof y.componentWillUpdate=="function"&&y.componentWillUpdate(u,Z,z),typeof y.UNSAFE_componentWillUpdate=="function"&&y.UNSAFE_componentWillUpdate(u,Z,z)),typeof y.componentDidUpdate=="function"&&(r.flags|=4),typeof y.getSnapshotBeforeUpdate=="function"&&(r.flags|=1024)):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),r.memoizedProps=u,r.memoizedState=Z),y.props=u,y.state=Z,y.context=z,u=ie):(typeof y.componentDidUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=4),typeof y.getSnapshotBeforeUpdate!="function"||S===i.memoizedProps&&W===i.memoizedState||(r.flags|=1024),u=!1)}return y=u,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=Hr(r,i.child,null,p),r.child=Hr(r,null,l,p)):cn(i,r,l,p),r.memoizedState=y.state,i=r.child):i=da(i,r,p),i}function Ly(i,r,l,u){return Br(),r.flags|=256,cn(i,r,l,u),r.child}var fh={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function dh(i){return{baseLanes:i,cachePool:_b()}}function hh(i,r,l){return i=i!==null?i.childLanes&~l:0,r&&(i|=ei),i}function zy(i,r,l){var u=r.pendingProps,p=!1,y=(r.flags&128)!==0,S;if((S=y)||(S=i!==null&&i.memoizedState===null?!1:(Kt.current&2)!==0),S&&(p=!0,r.flags&=-129),S=(r.flags&32)!==0,r.flags&=-33,i===null){if(et){if(p?Ka(r):Ga(),(i=Nt)?(i=Hx(i,mi),i=i!==null&&i.data!=="&"?i:null,i!==null&&(r.memoizedState={dehydrated:i,treeContext:Ba!==null?{id:Pi,overflow:qi}:null,retryLane:536870912,hydrationErrors:null},l=pb(i),l.return=r,r.child=l,ln=r,Nt=null)):i=null,i===null)throw $a(r);return Vh(i)?r.lanes=32:r.lanes=536870912,null}var N=u.children;return u=u.fallback,p?(Ga(),p=r.mode,N=pu({mode:"hidden",children:N},p),u=Ir(u,p,l,null),N.return=r,u.return=r,N.sibling=u,r.child=N,u=r.child,u.memoizedState=dh(l),u.childLanes=hh(i,S,l),r.memoizedState=fh,So(null,u)):(Ka(r),mh(r,N))}var z=i.memoizedState;if(z!==null&&(N=z.dehydrated,N!==null)){if(y)r.flags&256?(Ka(r),r.flags&=-257,r=ph(i,r,l)):r.memoizedState!==null?(Ga(),r.child=i.child,r.flags|=128,r=null):(Ga(),N=u.fallback,p=r.mode,u=pu({mode:"visible",children:u.children},p),N=Ir(N,p,l,null),N.flags|=2,u.return=r,N.return=r,u.sibling=N,r.child=u,Hr(r,i.child,null,l),u=r.child,u.memoizedState=dh(l),u.childLanes=hh(i,S,l),r.memoizedState=fh,r=So(null,u));else if(Ka(r),Vh(N)){if(S=N.nextSibling&&N.nextSibling.dataset,S)var Y=S.dgst;S=Y,u=Error(a(419)),u.stack="",u.digest=S,co({value:u,source:null,stack:null}),r=ph(i,r,l)}else if(Xt||Ls(i,r,l,!1),S=(l&i.childLanes)!==0,Xt||S){if(S=vt,S!==null&&(u=Pt(S,l),u!==0&&u!==z.retryLane))throw z.retryLane=u,zr(i,u),zn(S,i,u),ch;Yh(N)||_u(),r=ph(i,r,l)}else Yh(N)?(r.flags|=192,r.child=i.child,r=null):(i=z.treeContext,Nt=gi(N.nextSibling),ln=r,et=!0,Ua=null,mi=!1,i!==null&&yb(r,i),r=mh(r,u.children),r.flags|=4096);return r}return p?(Ga(),N=u.fallback,p=r.mode,z=i.child,Y=z.sibling,u=sa(z,{mode:"hidden",children:u.children}),u.subtreeFlags=z.subtreeFlags&65011712,Y!==null?N=sa(Y,N):(N=Ir(N,p,l,null),N.flags|=2),N.return=r,u.return=r,u.sibling=N,r.child=u,So(null,u),u=r.child,N=i.child.memoizedState,N===null?N=dh(l):(p=N.cachePool,p!==null?(z=Vt._currentValue,p=p.parent!==z?{parent:z,pool:z}:p):p=_b(),N={baseLanes:N.baseLanes|l,cachePool:p}),u.memoizedState=N,u.childLanes=hh(i,S,l),r.memoizedState=fh,So(i.child,u)):(Ka(r),l=i.child,i=l.sibling,l=sa(l,{mode:"visible",children:u.children}),l.return=r,l.sibling=null,i!==null&&(S=r.deletions,S===null?(r.deletions=[i],r.flags|=16):S.push(i)),r.child=l,r.memoizedState=null,l)}function mh(i,r){return r=pu({mode:"visible",children:r},i.mode),r.return=i,i.child=r}function pu(i,r){return i=Wn(22,i,null,r),i.lanes=0,i}function ph(i,r,l){return Hr(r,i.child,null,l),i=mh(r,r.pendingProps.children),i.flags|=2,r.memoizedState=null,i}function Iy(i,r,l){i.lanes|=r;var u=i.alternate;u!==null&&(u.lanes|=r),Od(i.return,r,l)}function gh(i,r,l,u,p,y){var S=i.memoizedState;S===null?i.memoizedState={isBackwards:r,rendering:null,renderingStartTime:0,last:u,tail:l,tailMode:p,treeForkCount:y}:(S.isBackwards=r,S.rendering=null,S.renderingStartTime=0,S.last=u,S.tail=l,S.tailMode=p,S.treeForkCount=y)}function By(i,r,l){var u=r.pendingProps,p=u.revealOrder,y=u.tail;u=u.children;var S=Kt.current,N=(S&2)!==0;if(N?(S=S&1|2,r.flags|=128):S&=1,C(Kt,S),cn(i,r,u,l),u=et?oo:0,!N&&i!==null&&(i.flags&128)!==0)e:for(i=r.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Iy(i,l,r);else if(i.tag===19)Iy(i,l,r);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===r)break e;for(;i.sibling===null;){if(i.return===null||i.return===r)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}switch(p){case"forwards":for(l=r.child,p=null;l!==null;)i=l.alternate,i!==null&&iu(i)===null&&(p=l),l=l.sibling;l=p,l===null?(p=r.child,r.child=null):(p=l.sibling,l.sibling=null),gh(r,!1,p,l,y,u);break;case"backwards":case"unstable_legacy-backwards":for(l=null,p=r.child,r.child=null;p!==null;){if(i=p.alternate,i!==null&&iu(i)===null){r.child=p;break}i=p.sibling,p.sibling=l,l=p,p=i}gh(r,!0,l,null,y,u);break;case"together":gh(r,!1,null,null,void 0,u);break;default:r.memoizedState=null}return r.child}function da(i,r,l){if(i!==null&&(r.dependencies=i.dependencies),Va|=r.lanes,(l&r.childLanes)===0)if(i!==null){if(Ls(i,r,l,!1),(l&r.childLanes)===0)return null}else return null;if(i!==null&&r.child!==i.child)throw Error(a(153));if(r.child!==null){for(i=r.child,l=sa(i,i.pendingProps),r.child=l,l.return=r;i.sibling!==null;)i=i.sibling,l=l.sibling=sa(i,i.pendingProps),l.return=r;l.sibling=null}return r.child}function bh(i,r){return(i.lanes&r)!==0?!0:(i=i.dependencies,!!(i!==null&&Vc(i)))}function K_(i,r,l){switch(r.tag){case 3:ue(r,r.stateNode.containerInfo),Fa(r,Vt,i.memoizedState.cache),Br();break;case 27:case 5:Ze(r);break;case 4:ue(r,r.stateNode.containerInfo);break;case 10:Fa(r,r.type,r.memoizedProps.value);break;case 31:if(r.memoizedState!==null)return r.flags|=128,Pd(r),null;break;case 13:var u=r.memoizedState;if(u!==null)return u.dehydrated!==null?(Ka(r),r.flags|=128,null):(l&r.child.childLanes)!==0?zy(i,r,l):(Ka(r),i=da(i,r,l),i!==null?i.sibling:null);Ka(r);break;case 19:var p=(i.flags&128)!==0;if(u=(l&r.childLanes)!==0,u||(Ls(i,r,l,!1),u=(l&r.childLanes)!==0),p){if(u)return By(i,r,l);r.flags|=128}if(p=r.memoizedState,p!==null&&(p.rendering=null,p.tail=null,p.lastEffect=null),C(Kt,Kt.current),u)break;return null;case 22:return r.lanes=0,Oy(i,r,l,r.pendingProps);case 24:Fa(r,Vt,i.memoizedState.cache)}return da(i,r,l)}function Uy(i,r,l){if(i!==null)if(i.memoizedProps!==r.pendingProps)Xt=!0;else{if(!bh(i,l)&&(r.flags&128)===0)return Xt=!1,K_(i,r,l);Xt=(i.flags&131072)!==0}else Xt=!1,et&&(r.flags&1048576)!==0&&bb(r,oo,r.index);switch(r.lanes=0,r.tag){case 16:e:{var u=r.pendingProps;if(i=Pr(r.elementType),r.type=i,typeof i=="function")Sd(i)?(u=Gr(i,u),r.tag=1,r=Dy(null,r,i,u,l)):(r.tag=0,r=uh(null,r,i,u,l));else{if(i!=null){var p=i.$$typeof;if(p===j){r.tag=11,r=Ty(null,r,i,u,l);break e}else if(p===F){r.tag=14,r=Cy(null,r,i,u,l);break e}}throw r=fe(i)||i,Error(a(306,r,""))}}return r;case 0:return uh(i,r,r.type,r.pendingProps,l);case 1:return u=r.type,p=Gr(u,r.pendingProps),Dy(i,r,u,p,l);case 3:e:{if(ue(r,r.stateNode.containerInfo),i===null)throw Error(a(387));u=r.pendingProps;var y=r.memoizedState;p=y.element,Id(i,r),bo(r,u,null,l);var S=r.memoizedState;if(u=S.cache,Fa(r,Vt,u),u!==y.cache&&Rd(r,[Vt],l,!0),go(),u=S.element,y.isDehydrated)if(y={element:u,isDehydrated:!1,cache:S.cache},r.updateQueue.baseState=y,r.memoizedState=y,r.flags&256){r=Ly(i,r,u,l);break e}else if(u!==p){p=fi(Error(a(424)),r),co(p),r=Ly(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(Nt=gi(i.firstChild),ln=r,et=!0,Ua=null,mi=!0,l=Ob(r,null,u,l),r.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling}else{if(Br(),u===p){r=da(i,r,l);break e}cn(i,r,u,l)}r=r.child}return r;case 26:return mu(i,r),i===null?(l=Wx(r.type,null,r.pendingProps,null))?r.memoizedState=l:et||(l=r.type,i=r.pendingProps,u=Ru(re.current).createElement(l),u[qt]=r,u[dn]=i,un(u,l,i),Qt(u),r.stateNode=u):r.memoizedState=Wx(r.type,i.memoizedProps,r.pendingProps,i.memoizedState),null;case 27:return Ze(r),i===null&&et&&(u=r.stateNode=Qx(r.type,r.pendingProps,re.current),ln=r,mi=!0,p=Nt,er(r.type)?(Wh=p,Nt=gi(u.firstChild)):Nt=p),cn(i,r,r.pendingProps.children,l),mu(i,r),i===null&&(r.flags|=4194304),r.child;case 5:return i===null&&et&&((p=u=Nt)&&(u=Ek(u,r.type,r.pendingProps,mi),u!==null?(r.stateNode=u,ln=r,Nt=gi(u.firstChild),mi=!1,p=!0):p=!1),p||$a(r)),Ze(r),p=r.type,y=r.pendingProps,S=i!==null?i.memoizedProps:null,u=y.children,Kh(p,y)?u=null:S!==null&&Kh(p,S)&&(r.flags|=32),r.memoizedState!==null&&(p=Hd(i,r,z_,null,null,l),Io._currentValue=p),mu(i,r),cn(i,r,u,l),r.child;case 6:return i===null&&et&&((i=l=Nt)&&(l=Sk(l,r.pendingProps,mi),l!==null?(r.stateNode=l,ln=r,Nt=null,i=!0):i=!1),i||$a(r)),null;case 13:return zy(i,r,l);case 4:return ue(r,r.stateNode.containerInfo),u=r.pendingProps,i===null?r.child=Hr(r,null,u,l):cn(i,r,u,l),r.child;case 11:return Ty(i,r,r.type,r.pendingProps,l);case 7:return cn(i,r,r.pendingProps,l),r.child;case 8:return cn(i,r,r.pendingProps.children,l),r.child;case 12:return cn(i,r,r.pendingProps.children,l),r.child;case 10:return u=r.pendingProps,Fa(r,r.type,u.value),cn(i,r,u.children,l),r.child;case 9:return p=r.type._context,u=r.pendingProps.children,$r(r),p=on(p),u=u(p),r.flags|=1,cn(i,r,u,l),r.child;case 14:return Cy(i,r,r.type,r.pendingProps,l);case 15:return Ay(i,r,r.type,r.pendingProps,l);case 19:return By(i,r,l);case 31:return H_(i,r,l);case 22:return Oy(i,r,l,r.pendingProps);case 24:return $r(r),u=on(Vt),i===null?(p=Dd(),p===null&&(p=vt,y=Md(),p.pooledCache=y,y.refCount++,y!==null&&(p.pooledCacheLanes|=l),p=y),r.memoizedState={parent:u,cache:p},zd(r),Fa(r,Vt,p)):((i.lanes&l)!==0&&(Id(i,r),bo(r,null,null,l),go()),p=i.memoizedState,y=r.memoizedState,p.parent!==u?(p={parent:u,cache:u},r.memoizedState=p,r.lanes===0&&(r.memoizedState=r.updateQueue.baseState=p),Fa(r,Vt,u)):(u=y.cache,Fa(r,Vt,u),u!==p.cache&&Rd(r,[Vt],l,!0))),cn(i,r,r.pendingProps.children,l),r.child;case 29:throw r.pendingProps}throw Error(a(156,r.tag))}function ha(i){i.flags|=4}function yh(i,r,l,u,p){if((r=(i.mode&32)!==0)&&(r=!1),r){if(i.flags|=16777216,(p&335544128)===p)if(i.stateNode.complete)i.flags|=8192;else if(dx())i.flags|=8192;else throw qr=Jc,Ld}else i.flags&=-16777217}function $y(i,r){if(r.type!=="stylesheet"||(r.state.loading&4)!==0)i.flags&=-16777217;else if(i.flags|=16777216,!tv(r))if(dx())i.flags|=8192;else throw qr=Jc,Ld}function gu(i,r){r!==null&&(i.flags|=4),i.flags&16384&&(r=i.tag!==22?ze():536870912,i.lanes|=r,Qs|=r)}function wo(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 p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags&65011712,u|=p.flags&65011712,p.return=i,p=p.sibling;else for(p=i.child;p!==null;)l|=p.lanes|p.childLanes,u|=p.subtreeFlags,u|=p.flags,p.return=i,p=p.sibling;return i.subtreeFlags|=u,i.childLanes=l,r}function G_(i,r,l){var u=r.pendingProps;switch(Nd(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),ca(Vt),Se(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(i===null||i.child===null)&&(Ds(r)?ha(r):i===null||i.memoizedState.isDehydrated&&(r.flags&256)===0||(r.flags|=1024,Cd())),Tt(r),null;case 26:var p=r.type,y=r.memoizedState;return i===null?(ha(r),y!==null?(Tt(r),$y(r,y)):(Tt(r),yh(r,p,null,u,l))):y?y!==i.memoizedState?(ha(r),Tt(r),$y(r,y)):(Tt(r),r.flags&=-16777217):(i=i.memoizedProps,i!==u&&ha(r),Tt(r),yh(r,p,i,u,l)),null;case 27:if(it(r),l=re.current,p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Tt(r),null}i=G.current,Ds(r)?xb(r):(i=Qx(p,u,l),r.stateNode=i,ha(r))}return Tt(r),null;case 5:if(it(r),p=r.type,i!==null&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(!u){if(r.stateNode===null)throw Error(a(166));return Tt(r),null}if(y=G.current,Ds(r))xb(r);else{var S=Ru(re.current);switch(y){case 1:y=S.createElementNS("http://www.w3.org/2000/svg",p);break;case 2:y=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;default:switch(p){case"svg":y=S.createElementNS("http://www.w3.org/2000/svg",p);break;case"math":y=S.createElementNS("http://www.w3.org/1998/Math/MathML",p);break;case"script":y=S.createElement("div"),y.innerHTML="<script><\/script>",y=y.removeChild(y.firstChild);break;case"select":y=typeof u.is=="string"?S.createElement("select",{is:u.is}):S.createElement("select"),u.multiple?y.multiple=!0:u.size&&(y.size=u.size);break;default:y=typeof u.is=="string"?S.createElement(p,{is:u.is}):S.createElement(p)}}y[qt]=r,y[dn]=u;e:for(S=r.child;S!==null;){if(S.tag===5||S.tag===6)y.appendChild(S.stateNode);else if(S.tag!==4&&S.tag!==27&&S.child!==null){S.child.return=S,S=S.child;continue}if(S===r)break e;for(;S.sibling===null;){if(S.return===null||S.return===r)break e;S=S.return}S.sibling.return=S.return,S=S.sibling}r.stateNode=y;e:switch(un(y,p,u),p){case"button":case"input":case"select":case"textarea":u=!!u.autoFocus;break e;case"img":u=!0;break e;default:u=!1}u&&ha(r)}}return Tt(r),yh(r,r.type,i===null?null:i.memoizedProps,r.pendingProps,l),null;case 6:if(i&&r.stateNode!=null)i.memoizedProps!==u&&ha(r);else{if(typeof u!="string"&&r.stateNode===null)throw Error(a(166));if(i=re.current,Ds(r)){if(i=r.stateNode,l=r.memoizedProps,u=null,p=ln,p!==null)switch(p.tag){case 27:case 5:u=p.memoizedProps}i[qt]=r,i=!!(i.nodeValue===l||u!==null&&u.suppressHydrationWarning===!0||zx(i.nodeValue,l)),i||$a(r,!0)}else i=Ru(i).createTextNode(u),i[qt]=r,r.stateNode=i}return Tt(r),null;case 31:if(l=r.memoizedState,i===null||i.memoizedState!==null){if(u=Ds(r),l!==null){if(i===null){if(!u)throw Error(a(318));if(i=r.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(a(557));i[qt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Tt(r),i=!1}else l=Cd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=l),i=!0;if(!i)return r.flags&256?(Zn(r),r):(Zn(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(p=Ds(r),u!==null&&u.dehydrated!==null){if(i===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[qt]=r}else Br(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;Tt(r),p=!1}else p=Cd(),i!==null&&i.memoizedState!==null&&(i.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?(Zn(r),r):(Zn(r),null)}return Zn(r),(r.flags&128)!==0?(r.lanes=l,r):(l=u!==null,i=i!==null&&i.memoizedState!==null,l&&(u=r.child,p=null,u.alternate!==null&&u.alternate.memoizedState!==null&&u.alternate.memoizedState.cachePool!==null&&(p=u.alternate.memoizedState.cachePool.pool),y=null,u.memoizedState!==null&&u.memoizedState.cachePool!==null&&(y=u.memoizedState.cachePool.pool),y!==p&&(u.flags|=2048)),l!==i&&l&&(r.child.flags|=8192),gu(r,r.updateQueue),Tt(r),null);case 4:return Se(),i===null&&$h(r.stateNode.containerInfo),Tt(r),null;case 10:return ca(r.type),Tt(r),null;case 19:if(X(Kt),u=r.memoizedState,u===null)return Tt(r),null;if(p=(r.flags&128)!==0,y=u.rendering,y===null)if(p)wo(u,!1);else{if(Ut!==0||i!==null&&(i.flags&128)!==0)for(i=r.child;i!==null;){if(y=iu(i),y!==null){for(r.flags|=128,wo(u,!1),i=y.updateQueue,r.updateQueue=i,gu(r,i),r.subtreeFlags=0,i=l,l=r.child;l!==null;)mb(l,i),l=l.sibling;return C(Kt,Kt.current&1|2),et&&la(r,u.treeForkCount),r.child}i=i.sibling}u.tail!==null&&Mt()>Eu&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304)}else{if(!p)if(i=iu(y),i!==null){if(r.flags|=128,p=!0,i=i.updateQueue,r.updateQueue=i,gu(r,i),wo(u,!0),u.tail===null&&u.tailMode==="hidden"&&!y.alternate&&!et)return Tt(r),null}else 2*Mt()-u.renderingStartTime>Eu&&l!==536870912&&(r.flags|=128,p=!0,wo(u,!1),r.lanes=4194304);u.isBackwards?(y.sibling=r.child,r.child=y):(i=u.last,i!==null?i.sibling=y:r.child=y,u.last=y)}return u.tail!==null?(i=u.tail,u.rendering=i,u.tail=i.sibling,u.renderingStartTime=Mt(),i.sibling=null,l=Kt.current,C(Kt,p?l&1|2:l&1),et&&la(r,u.treeForkCount),i):(Tt(r),null);case 22:case 23:return Zn(r),Fd(),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&&gu(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&&X(Fr),null;case 24:return l=null,i!==null&&(l=i.memoizedState.cache),r.memoizedState.cache!==l&&(r.flags|=2048),ca(Vt),Tt(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function Q_(i,r){switch(Nd(r),r.tag){case 1:return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 3:return ca(Vt),Se(),i=r.flags,(i&65536)!==0&&(i&128)===0?(r.flags=i&-65537|128,r):null;case 26:case 27:case 5:return it(r),null;case 31:if(r.memoizedState!==null){if(Zn(r),r.alternate===null)throw Error(a(340));Br()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 13:if(Zn(r),i=r.memoizedState,i!==null&&i.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Br()}return i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 19:return X(Kt),null;case 4:return Se(),null;case 10:return ca(r.type),null;case 22:case 23:return Zn(r),Fd(),i!==null&&X(Fr),i=r.flags,i&65536?(r.flags=i&-65537|128,r):null;case 24:return ca(Vt),null;case 25:return null;default:return null}}function Fy(i,r){switch(Nd(r),r.tag){case 3:ca(Vt),Se();break;case 26:case 27:case 5:it(r);break;case 4:Se();break;case 31:r.memoizedState!==null&&Zn(r);break;case 13:Zn(r);break;case 19:X(Kt);break;case 10:ca(r.type);break;case 22:case 23:Zn(r),Fd(),i!==null&&X(Fr);break;case 24:ca(Vt)}}function _o(i,r){try{var l=r.updateQueue,u=l!==null?l.lastEffect:null;if(u!==null){var p=u.next;l=p;do{if((l.tag&i)===i){u=void 0;var y=l.create,S=l.inst;u=y(),S.destroy=u}l=l.next}while(l!==p)}}catch(N){mt(r,r.return,N)}}function Qa(i,r,l){try{var u=r.updateQueue,p=u!==null?u.lastEffect:null;if(p!==null){var y=p.next;u=y;do{if((u.tag&i)===i){var S=u.inst,N=S.destroy;if(N!==void 0){S.destroy=void 0,p=r;var z=l,Y=N;try{Y()}catch(ie){mt(p,z,ie)}}}u=u.next}while(u!==y)}}catch(ie){mt(r,r.return,ie)}}function Py(i){var r=i.updateQueue;if(r!==null){var l=i.stateNode;try{Mb(r,l)}catch(u){mt(i,i.return,u)}}}function qy(i,r,l){l.props=Gr(i.type,i.memoizedProps),l.state=i.memoizedState;try{l.componentWillUnmount()}catch(u){mt(i,r,u)}}function ko(i,r){try{var l=i.ref;if(l!==null){switch(i.tag){case 26:case 27:case 5:var u=i.stateNode;break;case 30:u=i.stateNode;break;default:u=i.stateNode}typeof l=="function"?i.refCleanup=l(u):l.current=u}}catch(p){mt(i,r,p)}}function Hi(i,r){var l=i.ref,u=i.refCleanup;if(l!==null)if(typeof u=="function")try{u()}catch(p){mt(i,r,p)}finally{i.refCleanup=null,i=i.alternate,i!=null&&(i.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(p){mt(i,r,p)}else l.current=null}function Hy(i){var r=i.type,l=i.memoizedProps,u=i.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":l.autoFocus&&u.focus();break e;case"img":l.src?u.src=l.src:l.srcSet&&(u.srcset=l.srcSet)}}catch(p){mt(i,i.return,p)}}function xh(i,r,l){try{var u=i.stateNode;pk(u,i.type,l,r),u[dn]=r}catch(p){mt(i,i.return,p)}}function Ky(i){return i.tag===5||i.tag===3||i.tag===26||i.tag===27&&er(i.type)||i.tag===4}function vh(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Ky(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.tag===27&&er(i.type)||i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function 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&&er(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 bu(i,r,l){var u=i.tag;if(u===5||u===6)i=i.stateNode,r?l.insertBefore(i,r):l.appendChild(i);else if(u!==4&&(u===27&&er(i.type)&&(l=i.stateNode),i=i.child,i!==null))for(bu(i,r,l),i=i.sibling;i!==null;)bu(i,r,l),i=i.sibling}function Gy(i){var r=i.stateNode,l=i.memoizedProps;try{for(var u=i.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);un(r,u,l),r[qt]=i,r[dn]=l}catch(y){mt(i,i.return,y)}}var ma=!1,Zt=!1,Sh=!1,Qy=typeof WeakSet=="function"?WeakSet:Set,nn=null;function Y_(i,r){if(i=i.containerInfo,qh=Bu,i=rb(i),pd(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var u=l.getSelection&&l.getSelection();if(u&&u.rangeCount!==0){l=u.anchorNode;var p=u.anchorOffset,y=u.focusNode;u=u.focusOffset;try{l.nodeType,y.nodeType}catch{l=null;break e}var S=0,N=-1,z=-1,Y=0,ie=0,oe=i,W=null;t:for(;;){for(var Z;oe!==l||p!==0&&oe.nodeType!==3||(N=S+p),oe!==y||u!==0&&oe.nodeType!==3||(z=S+u),oe.nodeType===3&&(S+=oe.nodeValue.length),(Z=oe.firstChild)!==null;)W=oe,oe=Z;for(;;){if(oe===i)break t;if(W===l&&++Y===p&&(N=S),W===y&&++ie===u&&(z=S),(Z=oe.nextSibling)!==null)break;oe=W,W=oe.parentNode}oe=Z}l=N===-1||z===-1?null:{start:N,end:z}}else l=null}l=l||{start:0,end:0}}else l=null;for(Hh={focusedElem:i,selectionRange:l},Bu=!1,nn=r;nn!==null;)if(r=nn,i=r.child,(r.subtreeFlags&1028)!==0&&i!==null)i.return=r,nn=i;else for(;nn!==null;){switch(r=nn,y=r.alternate,i=r.flags,r.tag){case 0:if((i&4)!==0&&(i=r.updateQueue,i=i!==null?i.events:null,i!==null))for(l=0;l<i.length;l++)p=i[l],p.ref.impl=p.nextImpl;break;case 11:case 15:break;case 1:if((i&1024)!==0&&y!==null){i=void 0,l=r,p=y.memoizedProps,y=y.memoizedState,u=l.stateNode;try{var we=Gr(l.type,p);i=u.getSnapshotBeforeUpdate(we,y),u.__reactInternalSnapshotBeforeUpdate=i}catch(je){mt(l,l.return,je)}}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,nn=i;break}nn=r.return}}function Yy(i,r,l){var u=l.flags;switch(l.tag){case 0:case 11:case 15:ga(i,l),u&4&&_o(5,l);break;case 1:if(ga(i,l),u&4)if(i=l.stateNode,r===null)try{i.componentDidMount()}catch(S){mt(l,l.return,S)}else{var p=Gr(l.type,r.memoizedProps);r=r.memoizedState;try{i.componentDidUpdate(p,r,i.__reactInternalSnapshotBeforeUpdate)}catch(S){mt(l,l.return,S)}}u&64&&Py(l),u&512&&ko(l,l.return);break;case 3:if(ga(i,l),u&64&&(i=l.updateQueue,i!==null)){if(r=null,l.child!==null)switch(l.child.tag){case 27:case 5:r=l.child.stateNode;break;case 1:r=l.child.stateNode}try{Mb(i,r)}catch(S){mt(l,l.return,S)}}break;case 27:r===null&&u&4&&Gy(l);case 26:case 5:ga(i,l),r===null&&u&4&&Hy(l),u&512&&ko(l,l.return);break;case 12:ga(i,l);break;case 31:ga(i,l),u&4&&Xy(i,l);break;case 13:ga(i,l),u&4&&Zy(i,l),u&64&&(i=l.memoizedState,i!==null&&(i=i.dehydrated,i!==null&&(l=ik.bind(null,l),wk(i,l))));break;case 22:if(u=l.memoizedState!==null||ma,!u){r=r!==null&&r.memoizedState!==null||Zt,p=ma;var y=Zt;ma=u,(Zt=r)&&!y?ba(i,l,(l.subtreeFlags&8772)!==0):ga(i,l),ma=p,Zt=y}break;case 30:break;default:ga(i,l)}}function Vy(i){var r=i.alternate;r!==null&&(i.alternate=null,Vy(r)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(r=i.stateNode,r!==null&&Yl(r)),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}var At=null,Mn=!1;function pa(i,r,l){for(l=l.child;l!==null;)Wy(i,r,l),l=l.sibling}function Wy(i,r,l){if(It&&typeof It.onCommitFiberUnmount=="function")try{It.onCommitFiberUnmount(rn,l)}catch{}switch(l.tag){case 26:Zt||Hi(l,r),pa(i,r,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:Zt||Hi(l,r);var u=At,p=Mn;er(l.type)&&(At=l.stateNode,Mn=!1),pa(i,r,l),Do(l.stateNode),At=u,Mn=p;break;case 5:Zt||Hi(l,r);case 6:if(u=At,p=Mn,At=null,pa(i,r,l),At=u,Mn=p,At!==null)if(Mn)try{(At.nodeType===9?At.body:At.nodeName==="HTML"?At.ownerDocument.body:At).removeChild(l.stateNode)}catch(y){mt(l,r,y)}else try{At.removeChild(l.stateNode)}catch(y){mt(l,r,y)}break;case 18:At!==null&&(Mn?(i=At,Px(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,l.stateNode),tl(i)):Px(At,l.stateNode));break;case 4:u=At,p=Mn,At=l.stateNode.containerInfo,Mn=!0,pa(i,r,l),At=u,Mn=p;break;case 0:case 11:case 14:case 15:Qa(2,l,r),Zt||Qa(4,l,r),pa(i,r,l);break;case 1:Zt||(Hi(l,r),u=l.stateNode,typeof u.componentWillUnmount=="function"&&qy(l,r,u)),pa(i,r,l);break;case 21:pa(i,r,l);break;case 22:Zt=(u=Zt)||l.memoizedState!==null,pa(i,r,l),Zt=u;break;default:pa(i,r,l)}}function Xy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null))){i=i.dehydrated;try{tl(i)}catch(l){mt(r,r.return,l)}}}function Zy(i,r){if(r.memoizedState===null&&(i=r.alternate,i!==null&&(i=i.memoizedState,i!==null&&(i=i.dehydrated,i!==null))))try{tl(i)}catch(l){mt(r,r.return,l)}}function V_(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 yu(i,r){var l=V_(i);r.forEach(function(u){if(!l.has(u)){l.add(u);var p=ak.bind(null,i,u);u.then(p,p)}})}function jn(i,r){var l=r.deletions;if(l!==null)for(var u=0;u<l.length;u++){var p=l[u],y=i,S=r,N=S;e:for(;N!==null;){switch(N.tag){case 27:if(er(N.type)){At=N.stateNode,Mn=!1;break e}break;case 5:At=N.stateNode,Mn=!1;break e;case 3:case 4:At=N.stateNode.containerInfo,Mn=!0;break e}N=N.return}if(At===null)throw Error(a(160));Wy(y,S,p),At=null,Mn=!1,y=p.alternate,y!==null&&(y.return=null),p.return=null}if(r.subtreeFlags&13886)for(r=r.child;r!==null;)Jy(r,i),r=r.sibling}var Ai=null;function Jy(i,r){var l=i.alternate,u=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:jn(r,i),Dn(i),u&4&&(Qa(3,i,i.return),_o(3,i),Qa(5,i,i.return));break;case 1:jn(r,i),Dn(i),u&512&&(Zt||l===null||Hi(l,l.return)),u&64&&ma&&(i=i.updateQueue,i!==null&&(u=i.callbacks,u!==null&&(l=i.shared.hiddenCallbacks,i.shared.hiddenCallbacks=l===null?u:l.concat(u))));break;case 26:var p=Ai;if(jn(r,i),Dn(i),u&512&&(Zt||l===null||Hi(l,l.return)),u&4){var y=l!==null?l.memoizedState:null;if(u=i.memoizedState,l===null)if(u===null)if(i.stateNode===null){e:{u=i.type,l=i.memoizedProps,p=p.ownerDocument||p;t:switch(u){case"title":y=p.getElementsByTagName("title")[0],(!y||y[Or]||y[qt]||y.namespaceURI==="http://www.w3.org/2000/svg"||y.hasAttribute("itemprop"))&&(y=p.createElement(u),p.head.insertBefore(y,p.querySelector("head > title"))),un(y,u,l),y[qt]=i,Qt(y),u=y;break e;case"link":var S=Jx("link","href",p).get(u+(l.href||""));if(S){for(var N=0;N<S.length;N++)if(y=S[N],y.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&y.getAttribute("rel")===(l.rel==null?null:l.rel)&&y.getAttribute("title")===(l.title==null?null:l.title)&&y.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){S.splice(N,1);break t}}y=p.createElement(u),un(y,u,l),p.head.appendChild(y);break;case"meta":if(S=Jx("meta","content",p).get(u+(l.content||""))){for(N=0;N<S.length;N++)if(y=S[N],y.getAttribute("content")===(l.content==null?null:""+l.content)&&y.getAttribute("name")===(l.name==null?null:l.name)&&y.getAttribute("property")===(l.property==null?null:l.property)&&y.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&y.getAttribute("charset")===(l.charSet==null?null:l.charSet)){S.splice(N,1);break t}}y=p.createElement(u),un(y,u,l),p.head.appendChild(y);break;default:throw Error(a(468,u))}y[qt]=i,Qt(y),u=y}i.stateNode=u}else ev(p,i.type,i.stateNode);else i.stateNode=Zx(p,u,i.memoizedProps);else y!==u?(y===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):y.count--,u===null?ev(p,i.type,i.stateNode):Zx(p,u,i.memoizedProps)):u===null&&i.stateNode!==null&&xh(i,i.memoizedProps,l.memoizedProps)}break;case 27:jn(r,i),Dn(i),u&512&&(Zt||l===null||Hi(l,l.return)),l!==null&&u&4&&xh(i,i.memoizedProps,l.memoizedProps);break;case 5:if(jn(r,i),Dn(i),u&512&&(Zt||l===null||Hi(l,l.return)),i.flags&32){p=i.stateNode;try{De(p,"")}catch(we){mt(i,i.return,we)}}u&4&&i.stateNode!=null&&(p=i.memoizedProps,xh(i,p,l!==null?l.memoizedProps:p)),u&1024&&(Sh=!0);break;case 6:if(jn(r,i),Dn(i),u&4){if(i.stateNode===null)throw Error(a(162));u=i.memoizedProps,l=i.stateNode;try{l.nodeValue=u}catch(we){mt(i,i.return,we)}}break;case 3:if(Du=null,p=Ai,Ai=Mu(r.containerInfo),jn(r,i),Ai=p,Dn(i),u&4&&l!==null&&l.memoizedState.isDehydrated)try{tl(r.containerInfo)}catch(we){mt(i,i.return,we)}Sh&&(Sh=!1,ex(i));break;case 4:u=Ai,Ai=Mu(i.stateNode.containerInfo),jn(r,i),Dn(i),Ai=u;break;case 12:jn(r,i),Dn(i);break;case 31:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,yu(i,u)));break;case 13:jn(r,i),Dn(i),i.child.flags&8192&&i.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(vu=Mt()),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,yu(i,u)));break;case 22:p=i.memoizedState!==null;var z=l!==null&&l.memoizedState!==null,Y=ma,ie=Zt;if(ma=Y||p,Zt=ie||z,jn(r,i),Zt=ie,ma=Y,Dn(i),u&8192)e:for(r=i.stateNode,r._visibility=p?r._visibility&-2:r._visibility|1,p&&(l===null||z||ma||Zt||Qr(i)),l=null,r=i;;){if(r.tag===5||r.tag===26){if(l===null){z=l=r;try{if(y=z.stateNode,p)S=y.style,typeof S.setProperty=="function"?S.setProperty("display","none","important"):S.display="none";else{N=z.stateNode;var oe=z.memoizedProps.style,W=oe!=null&&oe.hasOwnProperty("display")?oe.display:null;N.style.display=W==null||typeof W=="boolean"?"":(""+W).trim()}}catch(we){mt(z,z.return,we)}}}else if(r.tag===6){if(l===null){z=r;try{z.stateNode.nodeValue=p?"":z.memoizedProps}catch(we){mt(z,z.return,we)}}}else if(r.tag===18){if(l===null){z=r;try{var Z=z.stateNode;p?qx(Z,!0):qx(z.stateNode,!1)}catch(we){mt(z,z.return,we)}}}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,yu(i,l))));break;case 19:jn(r,i),Dn(i),u&4&&(u=i.updateQueue,u!==null&&(i.updateQueue=null,yu(i,u)));break;case 30:break;case 21:break;default:jn(r,i),Dn(i)}}function Dn(i){var r=i.flags;if(r&2){try{for(var l,u=i.return;u!==null;){if(Ky(u)){l=u;break}u=u.return}if(l==null)throw Error(a(160));switch(l.tag){case 27:var p=l.stateNode,y=vh(i);bu(i,y,p);break;case 5:var S=l.stateNode;l.flags&32&&(De(S,""),l.flags&=-33);var N=vh(i);bu(i,N,S);break;case 3:case 4:var z=l.stateNode.containerInfo,Y=vh(i);Eh(i,Y,z);break;default:throw Error(a(161))}}catch(ie){mt(i,i.return,ie)}i.flags&=-3}r&4096&&(i.flags&=-4097)}function ex(i){if(i.subtreeFlags&1024)for(i=i.child;i!==null;){var r=i;ex(r),r.tag===5&&r.flags&1024&&r.stateNode.reset(),i=i.sibling}}function ga(i,r){if(r.subtreeFlags&8772)for(r=r.child;r!==null;)Yy(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:Hi(r,r.return);var l=r.stateNode;typeof l.componentWillUnmount=="function"&&qy(r,r.return,l),Qr(r);break;case 27:Do(r.stateNode);case 26:case 5:Hi(r,r.return),Qr(r);break;case 22:r.memoizedState===null&&Qr(r);break;case 30:Qr(r);break;default:Qr(r)}i=i.sibling}}function ba(i,r,l){for(l=l&&(r.subtreeFlags&8772)!==0,r=r.child;r!==null;){var u=r.alternate,p=i,y=r,S=y.flags;switch(y.tag){case 0:case 11:case 15:ba(p,y,l),_o(4,y);break;case 1:if(ba(p,y,l),u=y,p=u.stateNode,typeof p.componentDidMount=="function")try{p.componentDidMount()}catch(Y){mt(u,u.return,Y)}if(u=y,p=u.updateQueue,p!==null){var N=u.stateNode;try{var z=p.shared.hiddenCallbacks;if(z!==null)for(p.shared.hiddenCallbacks=null,p=0;p<z.length;p++)Rb(z[p],N)}catch(Y){mt(u,u.return,Y)}}l&&S&64&&Py(y),ko(y,y.return);break;case 27:Gy(y);case 26:case 5:ba(p,y,l),l&&u===null&&S&4&&Hy(y),ko(y,y.return);break;case 12:ba(p,y,l);break;case 31:ba(p,y,l),l&&S&4&&Xy(p,y);break;case 13:ba(p,y,l),l&&S&4&&Zy(p,y);break;case 22:y.memoizedState===null&&ba(p,y,l),ko(y,y.return);break;case 30:break;default:ba(p,y,l)}r=r.sibling}}function wh(i,r){var l=null;i!==null&&i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(l=i.memoizedState.cachePool.pool),i=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool),i!==l&&(i!=null&&i.refCount++,l!=null&&uo(l))}function _h(i,r){i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&uo(i))}function Oi(i,r,l,u){if(r.subtreeFlags&10256)for(r=r.child;r!==null;)tx(i,r,l,u),r=r.sibling}function tx(i,r,l,u){var p=r.flags;switch(r.tag){case 0:case 11:case 15:Oi(i,r,l,u),p&2048&&_o(9,r);break;case 1:Oi(i,r,l,u);break;case 3:Oi(i,r,l,u),p&2048&&(i=null,r.alternate!==null&&(i=r.alternate.memoizedState.cache),r=r.memoizedState.cache,r!==i&&(r.refCount++,i!=null&&uo(i)));break;case 12:if(p&2048){Oi(i,r,l,u),i=r.stateNode;try{var y=r.memoizedProps,S=y.id,N=y.onPostCommit;typeof N=="function"&&N(S,r.alternate===null?"mount":"update",i.passiveEffectDuration,-0)}catch(z){mt(r,r.return,z)}}else Oi(i,r,l,u);break;case 31:Oi(i,r,l,u);break;case 13:Oi(i,r,l,u);break;case 23:break;case 22:y=r.stateNode,S=r.alternate,r.memoizedState!==null?y._visibility&2?Oi(i,r,l,u):No(i,r):y._visibility&2?Oi(i,r,l,u):(y._visibility|=2,Hs(i,r,l,u,(r.subtreeFlags&10256)!==0||!1)),p&2048&&wh(S,r);break;case 24:Oi(i,r,l,u),p&2048&&_h(r.alternate,r);break;default:Oi(i,r,l,u)}}function Hs(i,r,l,u,p){for(p=p&&((r.subtreeFlags&10256)!==0||!1),r=r.child;r!==null;){var y=i,S=r,N=l,z=u,Y=S.flags;switch(S.tag){case 0:case 11:case 15:Hs(y,S,N,z,p),_o(8,S);break;case 23:break;case 22:var ie=S.stateNode;S.memoizedState!==null?ie._visibility&2?Hs(y,S,N,z,p):No(y,S):(ie._visibility|=2,Hs(y,S,N,z,p)),p&&Y&2048&&wh(S.alternate,S);break;case 24:Hs(y,S,N,z,p),p&&Y&2048&&_h(S.alternate,S);break;default:Hs(y,S,N,z,p)}r=r.sibling}}function No(i,r){if(r.subtreeFlags&10256)for(r=r.child;r!==null;){var l=i,u=r,p=u.flags;switch(u.tag){case 22:No(l,u),p&2048&&wh(u.alternate,u);break;case 24:No(l,u),p&2048&&_h(u.alternate,u);break;default:No(l,u)}r=r.sibling}}var To=8192;function Ks(i,r,l){if(i.subtreeFlags&To)for(i=i.child;i!==null;)nx(i,r,l),i=i.sibling}function nx(i,r,l){switch(i.tag){case 26:Ks(i,r,l),i.flags&To&&i.memoizedState!==null&&Lk(l,Ai,i.memoizedState,i.memoizedProps);break;case 5:Ks(i,r,l);break;case 3:case 4:var u=Ai;Ai=Mu(i.stateNode.containerInfo),Ks(i,r,l),Ai=u;break;case 22:i.memoizedState===null&&(u=i.alternate,u!==null&&u.memoizedState!==null?(u=To,To=16777216,Ks(i,r,l),To=u):Ks(i,r,l));break;default:Ks(i,r,l)}}function ix(i){var r=i.alternate;if(r!==null&&(i=r.child,i!==null)){r.child=null;do r=i.sibling,i.sibling=null,i=r;while(i!==null)}}function Co(i){var r=i.deletions;if((i.flags&16)!==0){if(r!==null)for(var l=0;l<r.length;l++){var u=r[l];nn=u,rx(u,i)}ix(i)}if(i.subtreeFlags&10256)for(i=i.child;i!==null;)ax(i),i=i.sibling}function ax(i){switch(i.tag){case 0:case 11:case 15:Co(i),i.flags&2048&&Qa(9,i,i.return);break;case 3:Co(i);break;case 12:Co(i);break;case 22:var r=i.stateNode;i.memoizedState!==null&&r._visibility&2&&(i.return===null||i.return.tag!==13)?(r._visibility&=-3,xu(i)):Co(i);break;default:Co(i)}}function xu(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];nn=u,rx(u,i)}ix(i)}for(i=i.child;i!==null;){switch(r=i,r.tag){case 0:case 11:case 15:Qa(8,r,r.return),xu(r);break;case 22:l=r.stateNode,l._visibility&2&&(l._visibility&=-3,xu(r));break;default:xu(r)}i=i.sibling}}function rx(i,r){for(;nn!==null;){var l=nn;switch(l.tag){case 0:case 11:case 15:Qa(8,l,r);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var u=l.memoizedState.cachePool.pool;u!=null&&u.refCount++}break;case 24:uo(l.memoizedState.cache)}if(u=l.child,u!==null)u.return=l,nn=u;else e:for(l=i;nn!==null;){u=nn;var p=u.sibling,y=u.return;if(Vy(u),u===l){nn=null;break e}if(p!==null){p.return=y,nn=p;break e}nn=y}}}var W_={getCacheForType:function(i){var r=on(Vt),l=r.data.get(i);return l===void 0&&(l=i(),r.data.set(i,l)),l},cacheSignal:function(){return on(Vt).controller.signal}},X_=typeof WeakMap=="function"?WeakMap:Map,lt=0,vt=null,Ge=null,We=0,ht=0,Jn=null,Ya=!1,Gs=!1,kh=!1,ya=0,Ut=0,Va=0,Yr=0,Nh=0,ei=0,Qs=0,Ao=null,Ln=null,Th=!1,vu=0,sx=0,Eu=1/0,Su=null,Wa=null,en=0,Xa=null,Ys=null,xa=0,Ch=0,Ah=null,lx=null,Oo=0,Oh=null;function ti(){return(lt&2)!==0&&We!==0?We&-We:q.T!==null?zh():vs()}function ox(){if(ei===0)if((We&536870912)===0||et){var i=xs;xs<<=1,(xs&3932160)===0&&(xs=262144),ei=i}else ei=536870912;return i=Xn.current,i!==null&&(i.flags|=32),ei}function zn(i,r,l){(i===vt&&(ht===2||ht===9)||i.cancelPendingCommit!==null)&&(Vs(i,0),Za(i,We,ei,!1)),xt(i,l),((lt&2)===0||i!==vt)&&(i===vt&&((lt&2)===0&&(Yr|=l),Ut===4&&Za(i,We,ei,!1)),Ki(i))}function cx(i,r,l){if((lt&6)!==0)throw Error(a(327));var u=!l&&(r&127)===0&&(r&i.expiredLanes)===0||se(i,r),p=u?ek(i,r):Mh(i,r,!0),y=u;do{if(p===0){Gs&&!u&&Za(i,r,0,!1);break}else{if(l=i.current.alternate,y&&!Z_(l)){p=Mh(i,r,!1),y=!1;continue}if(p===2){if(y=r,i.errorRecoveryDisabledLanes&y)var S=0;else S=i.pendingLanes&-536870913,S=S!==0?S:S&536870912?536870912:0;if(S!==0){r=S;e:{var N=i;p=Ao;var z=N.current.memoizedState.isDehydrated;if(z&&(Vs(N,S).flags|=256),S=Mh(N,S,!1),S!==2){if(kh&&!z){N.errorRecoveryDisabledLanes|=y,Yr|=y,p=4;break e}y=Ln,Ln=p,y!==null&&(Ln===null?Ln=y:Ln.push.apply(Ln,y))}p=S}if(y=!1,p!==2)continue}}if(p===1){Vs(i,0),Za(i,r,0,!0);break}e:{switch(u=i,y=p,y){case 0:case 1:throw Error(a(345));case 4:if((r&4194048)!==r)break;case 6:Za(u,r,ei,!Ya);break e;case 2:Ln=null;break;case 3:case 5:break;default:throw Error(a(329))}if((r&62914560)===r&&(p=vu+300-Mt(),10<p)){if(Za(u,r,ei,!Ya),B(u,0,!0)!==0)break e;xa=r,u.timeoutHandle=$x(ux.bind(null,u,l,Ln,Su,Th,r,ei,Yr,Qs,Ya,y,"Throttled",-0,0),p);break e}ux(u,l,Ln,Su,Th,r,ei,Yr,Qs,Ya,y,null,-0,0)}}break}while(!0);Ki(i)}function ux(i,r,l,u,p,y,S,N,z,Y,ie,oe,W,Z){if(i.timeoutHandle=-1,oe=r.subtreeFlags,oe&8192||(oe&16785408)===16785408){oe={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:ye},nx(r,y,oe);var we=(y&62914560)===y?vu-Mt():(y&4194048)===y?sx-Mt():0;if(we=zk(oe,we),we!==null){xa=y,i.cancelPendingCommit=we(yx.bind(null,i,r,y,l,u,p,S,N,z,ie,oe,null,W,Z)),Za(i,y,S,!Y);return}}yx(i,r,y,l,u,p,S,N,z)}function Z_(i){for(var r=i;;){var l=r.tag;if((l===0||l===11||l===15)&&r.flags&16384&&(l=r.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var u=0;u<l.length;u++){var p=l[u],y=p.getSnapshot;p=p.value;try{if(!Vn(y(),p))return!1}catch{return!1}}if(l=r.child,r.subtreeFlags&16384&&l!==null)l.return=r,r=l;else{if(r===i)break;for(;r.sibling===null;){if(r.return===null||r.return===i)return!0;r=r.return}r.sibling.return=r.return,r=r.sibling}}return!0}function Za(i,r,l,u){r&=~Nh,r&=~Yr,i.suspendedLanes|=r,i.pingedLanes&=~r,u&&(i.warmLanes|=r),u=i.expirationTimes;for(var p=r;0<p;){var y=31-ut(p),S=1<<y;u[y]=-1,p&=~S}l!==0&&Ee(i,l,r)}function wu(){return(lt&6)===0?(Ro(0),!1):!0}function Rh(){if(Ge!==null){if(ht===0)var i=Ge.return;else i=Ge,oa=Ur=null,Qd(i),Us=null,ho=0,i=Ge;for(;i!==null;)Fy(i.alternate,i),i=i.return;Ge=null}}function Vs(i,r){var l=i.timeoutHandle;l!==-1&&(i.timeoutHandle=-1,yk(l)),l=i.cancelPendingCommit,l!==null&&(i.cancelPendingCommit=null,l()),xa=0,Rh(),vt=i,Ge=l=sa(i.current,null),We=r,ht=0,Jn=null,Ya=!1,Gs=se(i,r),kh=!1,Qs=ei=Nh=Yr=Va=Ut=0,Ln=Ao=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 p=31-ut(u),y=1<<p;r|=i[p],u&=~y}return ya=r,Hc(),l}function fx(i,r){$e=null,q.H=Eo,r===Bs||r===Zc?(r=Tb(),ht=3):r===Ld?(r=Tb(),ht=4):ht=r===ch?8:r!==null&&typeof r=="object"&&typeof r.then=="function"?6:1,Jn=r,Ge===null&&(Ut=1,du(i,fi(r,i.current)))}function dx(){var i=Xn.current;return i===null?!0:(We&4194048)===We?pi===null:(We&62914560)===We||(We&536870912)!==0?i===pi:!1}function hx(){var i=q.H;return q.H=Eo,i===null?Eo:i}function mx(){var i=q.A;return q.A=W_,i}function _u(){Ut=4,Ya||(We&4194048)!==We&&Xn.current!==null||(Gs=!0),(Va&134217727)===0&&(Yr&134217727)===0||vt===null||Za(vt,We,ei,!1)}function Mh(i,r,l){var u=lt;lt|=2;var p=hx(),y=mx();(vt!==i||We!==r)&&(Su=null,Vs(i,r)),r=!1;var S=Ut;e:do try{if(ht!==0&&Ge!==null){var N=Ge,z=Jn;switch(ht){case 8:Rh(),S=6;break e;case 3:case 2:case 9:case 6:Xn.current===null&&(r=!0);var Y=ht;if(ht=0,Jn=null,Ws(i,N,z,Y),l&&Gs){S=0;break e}break;default:Y=ht,ht=0,Jn=null,Ws(i,N,z,Y)}}J_(),S=Ut;break}catch(ie){fx(i,ie)}while(!0);return r&&i.shellSuspendCounter++,oa=Ur=null,lt=u,q.H=p,q.A=y,Ge===null&&(vt=null,We=0,Hc()),S}function J_(){for(;Ge!==null;)px(Ge)}function ek(i,r){var l=lt;lt|=2;var u=hx(),p=mx();vt!==i||We!==r?(Su=null,Eu=Mt()+500,Vs(i,r)):Gs=se(i,r);e:do try{if(ht!==0&&Ge!==null){r=Ge;var y=Jn;t:switch(ht){case 1:ht=0,Jn=null,Ws(i,r,y,1);break;case 2:case 9:if(kb(y)){ht=0,Jn=null,gx(r);break}r=function(){ht!==2&&ht!==9||vt!==i||(ht=7),Ki(i)},y.then(r,r);break e;case 3:ht=7;break e;case 4:ht=5;break e;case 7:kb(y)?(ht=0,Jn=null,gx(r)):(ht=0,Jn=null,Ws(i,r,y,7));break;case 5:var S=null;switch(Ge.tag){case 26:S=Ge.memoizedState;case 5:case 27:var N=Ge;if(S?tv(S):N.stateNode.complete){ht=0,Jn=null;var z=N.sibling;if(z!==null)Ge=z;else{var Y=N.return;Y!==null?(Ge=Y,ku(Y)):Ge=null}break t}}ht=0,Jn=null,Ws(i,r,y,5);break;case 6:ht=0,Jn=null,Ws(i,r,y,6);break;case 8:Rh(),Ut=6;break e;default:throw Error(a(462))}}tk();break}catch(ie){fx(i,ie)}while(!0);return oa=Ur=null,q.H=u,q.A=p,lt=l,Ge!==null?0:(vt=null,We=0,Hc(),Ut)}function tk(){for(;Ge!==null&&!Gl();)px(Ge)}function px(i){var r=Uy(i.alternate,i,ya);i.memoizedProps=i.pendingProps,r===null?ku(i):Ge=r}function gx(i){var r=i,l=r.alternate;switch(r.tag){case 15:case 0:r=jy(l,r,r.pendingProps,r.type,void 0,We);break;case 11:r=jy(l,r,r.pendingProps,r.type.render,r.ref,We);break;case 5:Qd(r);default:Fy(l,r),r=Ge=mb(r,ya),r=Uy(l,r,ya)}i.memoizedProps=i.pendingProps,r===null?ku(i):Ge=r}function Ws(i,r,l,u){oa=Ur=null,Qd(r),Us=null,ho=0;var p=r.return;try{if(q_(i,p,r,l,We)){Ut=1,du(i,fi(l,i.current)),Ge=null;return}}catch(y){if(p!==null)throw Ge=p,y;Ut=1,du(i,fi(l,i.current)),Ge=null;return}r.flags&32768?(et||u===1?i=!0:Gs||(We&536870912)!==0?i=!1:(Ya=i=!0,(u===2||u===9||u===3||u===6)&&(u=Xn.current,u!==null&&u.tag===13&&(u.flags|=16384))),bx(r,i)):ku(r)}function ku(i){var r=i;do{if((r.flags&32768)!==0){bx(r,Ya);return}i=r.return;var l=G_(r.alternate,r,ya);if(l!==null){Ge=l;return}if(r=r.sibling,r!==null){Ge=r;return}Ge=r=i}while(r!==null);Ut===0&&(Ut=5)}function bx(i,r){do{var l=Q_(i.alternate,i);if(l!==null){l.flags&=32767,Ge=l;return}if(l=i.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!r&&(i=i.sibling,i!==null)){Ge=i;return}Ge=i=l}while(i!==null);Ut=6,Ge=null}function yx(i,r,l,u,p,y,S,N,z){i.cancelPendingCommit=null;do Nu();while(en!==0);if((lt&6)!==0)throw Error(a(327));if(r!==null){if(r===i.current)throw Error(a(177));if(y=r.lanes|r.childLanes,y|=vd,_e(i,l,y,S,N,z),i===vt&&(Ge=vt=null,We=0),Ys=r,Xa=i,xa=l,Ch=y,Ah=p,lx=u,(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?(i.callbackNode=null,i.callbackPriority=0,rk(Me,function(){return wx(),null})):(i.callbackNode=null,i.callbackPriority=0),u=(r.flags&13878)!==0,(r.subtreeFlags&13878)!==0||u){u=q.T,q.T=null,p=ce.p,ce.p=2,S=lt,lt|=4;try{Y_(i,r,l)}finally{lt=S,ce.p=p,q.T=u}}en=1,xx(),vx(),Ex()}}function xx(){if(en===1){en=0;var i=Xa,r=Ys,l=(r.flags&13878)!==0;if((r.subtreeFlags&13878)!==0||l){l=q.T,q.T=null;var u=ce.p;ce.p=2;var p=lt;lt|=4;try{Jy(r,i);var y=Hh,S=rb(i.containerInfo),N=y.focusedElem,z=y.selectionRange;if(S!==N&&N&&N.ownerDocument&&ab(N.ownerDocument.documentElement,N)){if(z!==null&&pd(N)){var Y=z.start,ie=z.end;if(ie===void 0&&(ie=Y),"selectionStart"in N)N.selectionStart=Y,N.selectionEnd=Math.min(ie,N.value.length);else{var oe=N.ownerDocument||document,W=oe&&oe.defaultView||window;if(W.getSelection){var Z=W.getSelection(),we=N.textContent.length,je=Math.min(z.start,we),bt=z.end===void 0?je:Math.min(z.end,we);!Z.extend&&je>bt&&(S=bt,bt=je,je=S);var P=ib(N,je),U=ib(N,bt);if(P&&U&&(Z.rangeCount!==1||Z.anchorNode!==P.node||Z.anchorOffset!==P.offset||Z.focusNode!==U.node||Z.focusOffset!==U.offset)){var Q=oe.createRange();Q.setStart(P.node,P.offset),Z.removeAllRanges(),je>bt?(Z.addRange(Q),Z.extend(U.node,U.offset)):(Q.setEnd(U.node,U.offset),Z.addRange(Q))}}}}for(oe=[],Z=N;Z=Z.parentNode;)Z.nodeType===1&&oe.push({element:Z,left:Z.scrollLeft,top:Z.scrollTop});for(typeof N.focus=="function"&&N.focus(),N=0;N<oe.length;N++){var le=oe[N];le.element.scrollLeft=le.left,le.element.scrollTop=le.top}}Bu=!!qh,Hh=qh=null}finally{lt=p,ce.p=u,q.T=l}}i.current=r,en=2}}function vx(){if(en===2){en=0;var i=Xa,r=Ys,l=(r.flags&8772)!==0;if((r.subtreeFlags&8772)!==0||l){l=q.T,q.T=null;var u=ce.p;ce.p=2;var p=lt;lt|=4;try{Yy(i,r.alternate,r)}finally{lt=p,ce.p=u,q.T=l}}en=3}}function Ex(){if(en===4||en===3){en=0,bs();var i=Xa,r=Ys,l=xa,u=lx;(r.subtreeFlags&10256)!==0||(r.flags&10256)!==0?en=5:(en=0,Ys=Xa=null,Sx(i,i.pendingLanes));var p=i.pendingLanes;if(p===0&&(Wa=null),ta(l),r=r.stateNode,It&&typeof It.onCommitFiberRoot=="function")try{It.onCommitFiberRoot(rn,r,void 0,(r.current.flags&128)===128)}catch{}if(u!==null){r=q.T,p=ce.p,ce.p=2,q.T=null;try{for(var y=i.onRecoverableError,S=0;S<u.length;S++){var N=u[S];y(N.value,{componentStack:N.stack})}}finally{q.T=r,ce.p=p}}(xa&3)!==0&&Nu(),Ki(i),p=i.pendingLanes,(l&261930)!==0&&(p&42)!==0?i===Oh?Oo++:(Oo=0,Oh=i):Oo=0,Ro(0)}}function Sx(i,r){(i.pooledCacheLanes&=r)===0&&(r=i.pooledCache,r!=null&&(i.pooledCache=null,uo(r)))}function Nu(){return xx(),vx(),Ex(),wx()}function wx(){if(en!==5)return!1;var i=Xa,r=Ch;Ch=0;var l=ta(xa),u=q.T,p=ce.p;try{ce.p=32>l?32:l,q.T=null,l=Ah,Ah=null;var y=Xa,S=xa;if(en=0,Ys=Xa=null,xa=0,(lt&6)!==0)throw Error(a(331));var N=lt;if(lt|=4,ax(y.current),tx(y,y.current,S,l),lt=N,Ro(0,!1),It&&typeof It.onPostCommitFiberRoot=="function")try{It.onPostCommitFiberRoot(rn,y)}catch{}return!0}finally{ce.p=p,q.T=u,Sx(i,r)}}function _x(i,r,l){r=fi(l,r),r=oh(i.stateNode,r,2),i=Ha(i,r,2),i!==null&&(xt(i,2),Ki(i))}function mt(i,r,l){if(i.tag===3)_x(i,i,l);else for(;r!==null;){if(r.tag===3){_x(r,i,l);break}else if(r.tag===1){var u=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof u.componentDidCatch=="function"&&(Wa===null||!Wa.has(u))){i=fi(l,i),l=ky(2),u=Ha(r,l,2),u!==null&&(Ny(l,u,r,i),xt(u,2),Ki(u));break}}r=r.return}}function jh(i,r,l){var u=i.pingCache;if(u===null){u=i.pingCache=new X_;var p=new Set;u.set(r,p)}else p=u.get(r),p===void 0&&(p=new Set,u.set(r,p));p.has(l)||(kh=!0,p.add(l),i=nk.bind(null,i,r,l),r.then(i,i))}function nk(i,r,l){var u=i.pingCache;u!==null&&u.delete(r),i.pingedLanes|=i.suspendedLanes&l,i.warmLanes&=~l,vt===i&&(We&l)===l&&(Ut===4||Ut===3&&(We&62914560)===We&&300>Mt()-vu?(lt&2)===0&&Vs(i,0):Nh|=l,Qs===We&&(Qs=0)),Ki(i)}function kx(i,r){r===0&&(r=ze()),i=zr(i,r),i!==null&&(xt(i,r),Ki(i))}function ik(i){var r=i.memoizedState,l=0;r!==null&&(l=r.retryLane),kx(i,l)}function ak(i,r){var l=0;switch(i.tag){case 31:case 13:var u=i.stateNode,p=i.memoizedState;p!==null&&(l=p.retryLane);break;case 19:u=i.stateNode;break;case 22:u=i.stateNode._retryCache;break;default:throw Error(a(314))}u!==null&&u.delete(r),kx(i,l)}function rk(i,r){return ea(i,r)}var Tu=null,Xs=null,Dh=!1,Cu=!1,Lh=!1,Ja=0;function Ki(i){i!==Xs&&i.next===null&&(Xs===null?Tu=Xs=i:Xs=Xs.next=i),Cu=!0,Dh||(Dh=!0,lk())}function Ro(i,r){if(!Lh&&Cu){Lh=!0;do for(var l=!1,u=Tu;u!==null;){if(i!==0){var p=u.pendingLanes;if(p===0)var y=0;else{var S=u.suspendedLanes,N=u.pingedLanes;y=(1<<31-ut(42|i)+1)-1,y&=p&~(S&~N),y=y&201326741?y&201326741|1:y?y|2:0}y!==0&&(l=!0,Ax(u,y))}else y=We,y=B(u,u===vt?y:0,u.cancelPendingCommit!==null||u.timeoutHandle!==-1),(y&3)===0||se(u,y)||(l=!0,Ax(u,y));u=u.next}while(l);Lh=!1}}function sk(){Nx()}function Nx(){Cu=Dh=!1;var i=0;Ja!==0&&bk()&&(i=Ja);for(var r=Mt(),l=null,u=Tu;u!==null;){var p=u.next,y=Tx(u,r);y===0?(u.next=null,l===null?Tu=p:l.next=p,p===null&&(Xs=l)):(l=u,(i!==0||(y&3)!==0)&&(Cu=!0)),u=p}en!==0&&en!==5||Ro(i),Ja!==0&&(Ja=0)}function Tx(i,r){for(var l=i.suspendedLanes,u=i.pingedLanes,p=i.expirationTimes,y=i.pendingLanes&-62914561;0<y;){var S=31-ut(y),N=1<<S,z=p[S];z===-1?((N&l)===0||(N&u)!==0)&&(p[S]=xe(N,r)):z<=r&&(i.expiredLanes|=N),y&=~N}if(r=vt,l=We,l=B(i,i===r?l:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u=i.callbackNode,l===0||i===r&&(ht===2||ht===9)||i.cancelPendingCommit!==null)return u!==null&&u!==null&&Tr(u),i.callbackNode=null,i.callbackPriority=0;if((l&3)===0||se(i,l)){if(r=l&-l,r===i.callbackPriority)return r;switch(u!==null&&Tr(u),ta(l)){case 2:case 8:l=pe;break;case 32:l=Me;break;case 268435456:l=at;break;default:l=Me}return u=Cx.bind(null,i),l=ea(l,u),i.callbackPriority=r,i.callbackNode=l,r}return u!==null&&u!==null&&Tr(u),i.callbackPriority=2,i.callbackNode=null,2}function Cx(i,r){if(en!==0&&en!==5)return i.callbackNode=null,i.callbackPriority=0,null;var l=i.callbackNode;if(Nu()&&i.callbackNode!==l)return null;var u=We;return u=B(i,i===vt?u:0,i.cancelPendingCommit!==null||i.timeoutHandle!==-1),u===0?null:(cx(i,u,r),Tx(i,Mt()),i.callbackNode!=null&&i.callbackNode===l?Cx.bind(null,i):null)}function Ax(i,r){if(Nu())return null;cx(i,r,!0)}function lk(){xk(function(){(lt&6)!==0?ea(ne,sk):Nx()})}function zh(){if(Ja===0){var i=zs;i===0&&(i=Cr,Cr<<=1,(Cr&261888)===0&&(Cr=256)),Ja=i}return Ja}function Ox(i){return i==null||typeof i=="symbol"||typeof i=="boolean"?null:typeof i=="function"?i:za(""+i)}function Rx(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 ok(i,r,l,u,p){if(r==="submit"&&l&&l.stateNode===p){var y=Ox((p[dn]||null).action),S=u.submitter;S&&(r=(r=S[dn]||null)?Ox(r.formAction):S.getAttribute("formAction"),r!==null&&(y=r,S=null));var N=new $c("action","action",null,u,p);i.push({event:N,listeners:[{instance:null,listener:function(){if(u.defaultPrevented){if(Ja!==0){var z=S?Rx(p,S):new FormData(p);nh(l,{pending:!0,data:z,method:p.method,action:y},null,z)}}else typeof y=="function"&&(N.preventDefault(),z=S?Rx(p,S):new FormData(p),nh(l,{pending:!0,data:z,method:p.method,action:y},y,z))},currentTarget:p}]})}}for(var Ih=0;Ih<xd.length;Ih++){var Bh=xd[Ih],ck=Bh.toLowerCase(),uk=Bh[0].toUpperCase()+Bh.slice(1);Ci(ck,"on"+uk)}Ci(ob,"onAnimationEnd"),Ci(cb,"onAnimationIteration"),Ci(ub,"onAnimationStart"),Ci("dblclick","onDoubleClick"),Ci("focusin","onFocus"),Ci("focusout","onBlur"),Ci(N_,"onTransitionRun"),Ci(T_,"onTransitionStart"),Ci(C_,"onTransitionCancel"),Ci(fb,"onTransitionEnd"),he("onMouseEnter",["mouseout","mouseover"]),he("onMouseLeave",["mouseout","mouseover"]),he("onPointerEnter",["pointerout","pointerover"]),he("onPointerLeave",["pointerout","pointerover"]),ia("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),ia("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),ia("onBeforeInput",["compositionend","keypress","textInput","paste"]),ia("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),ia("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Mo="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),fk=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Mo));function Mx(i,r){r=(r&4)!==0;for(var l=0;l<i.length;l++){var u=i[l],p=u.event;u=u.listeners;e:{var y=void 0;if(r)for(var S=u.length-1;0<=S;S--){var N=u[S],z=N.instance,Y=N.currentTarget;if(N=N.listener,z!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=Y;try{y(p)}catch(ie){qc(ie)}p.currentTarget=null,y=z}else for(S=0;S<u.length;S++){if(N=u[S],z=N.instance,Y=N.currentTarget,N=N.listener,z!==y&&p.isPropagationStopped())break e;y=N,p.currentTarget=Y;try{y(p)}catch(ie){qc(ie)}p.currentTarget=null,y=z}}}}function Qe(i,r){var l=r[Ql];l===void 0&&(l=r[Ql]=new Set);var u=i+"__bubble";l.has(u)||(jx(r,i,2,!1),l.add(u))}function Uh(i,r,l){var u=0;r&&(u|=4),jx(l,i,u,r)}var Au="_reactListening"+Math.random().toString(36).slice(2);function $h(i){if(!i[Au]){i[Au]=!0,Mc.forEach(function(l){l!=="selectionchange"&&(fk.has(l)||Uh(l,!1,i),Uh(l,!0,i))});var r=i.nodeType===9?i:i.ownerDocument;r===null||r[Au]||(r[Au]=!0,Uh("selectionchange",!1,r))}}function jx(i,r,l,u){switch(ov(r)){case 2:var p=Uk;break;case 8:p=$k;break;default:p=tm}l=p.bind(null,r,l,i),p=void 0,!sd||r!=="touchstart"&&r!=="touchmove"&&r!=="wheel"||(p=!0),u?p!==void 0?i.addEventListener(r,l,{capture:!0,passive:p}):i.addEventListener(r,l,!0):p!==void 0?i.addEventListener(r,l,{passive:p}):i.addEventListener(r,l,!1)}function Fh(i,r,l,u,p){var y=u;if((r&1)===0&&(r&2)===0&&u!==null)e:for(;;){if(u===null)return;var S=u.tag;if(S===3||S===4){var N=u.stateNode.containerInfo;if(N===p)break;if(S===4)for(S=u.return;S!==null;){var z=S.tag;if((z===3||z===4)&&S.stateNode.containerInfo===p)return;S=S.return}for(;N!==null;){if(S=En(N),S===null)return;if(z=S.tag,z===5||z===6||z===26||z===27){u=y=S;continue e}N=N.parentNode}}u=u.return}zc(function(){var Y=y,ie=Ue(l),oe=[];e:{var W=db.get(i);if(W!==void 0){var Z=$c,we=i;switch(i){case"keypress":if(Bc(l)===0)break e;case"keydown":case"keyup":Z=a_;break;case"focusin":we="focus",Z=ud;break;case"focusout":we="blur",Z=ud;break;case"beforeblur":case"afterblur":Z=ud;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Z=Fg;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Z=Gw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Z=l_;break;case ob:case cb:case ub:Z=Vw;break;case fb:Z=c_;break;case"scroll":case"scrollend":Z=Hw;break;case"wheel":Z=f_;break;case"copy":case"cut":case"paste":Z=Xw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Z=qg;break;case"toggle":case"beforetoggle":Z=h_}var je=(r&4)!==0,bt=!je&&(i==="scroll"||i==="scrollend"),P=je?W!==null?W+"Capture":null:W;je=[];for(var U=Y,Q;U!==null;){var le=U;if(Q=le.stateNode,le=le.tag,le!==5&&le!==26&&le!==27||Q===null||P===null||(le=Jl(U,P),le!=null&&je.push(jo(U,le,Q))),bt)break;U=U.return}0<je.length&&(W=new Z(W,we,null,l,ie),oe.push({event:W,listeners:je}))}}if((r&7)===0){e:{if(W=i==="mouseover"||i==="pointerover",Z=i==="mouseout"||i==="pointerout",W&&l!==ke&&(we=l.relatedTarget||l.fromElement)&&(En(we)||we[Ma]))break e;if((Z||W)&&(W=ie.window===ie?ie:(W=ie.ownerDocument)?W.defaultView||W.parentWindow:window,Z?(we=l.relatedTarget||l.toElement,Z=Y,we=we?En(we):null,we!==null&&(bt=o(we),je=we.tag,we!==bt||je!==5&&je!==27&&je!==6)&&(we=null)):(Z=null,we=Y),Z!==we)){if(je=Fg,le="onMouseLeave",P="onMouseEnter",U="mouse",(i==="pointerout"||i==="pointerover")&&(je=qg,le="onPointerLeave",P="onPointerEnter",U="pointer"),bt=Z==null?W:ja(Z),Q=we==null?W:ja(we),W=new je(le,U+"leave",Z,l,ie),W.target=bt,W.relatedTarget=Q,le=null,En(ie)===Y&&(je=new je(P,U+"enter",we,l,ie),je.target=Q,je.relatedTarget=bt,le=je),bt=le,Z&&we)t:{for(je=dk,P=Z,U=we,Q=0,le=P;le;le=je(le))Q++;le=0;for(var Oe=U;Oe;Oe=je(Oe))le++;for(;0<Q-le;)P=je(P),Q--;for(;0<le-Q;)U=je(U),le--;for(;Q--;){if(P===U||U!==null&&P===U.alternate){je=P;break t}P=je(P),U=je(U)}je=null}else je=null;Z!==null&&Dx(oe,W,Z,je,!1),we!==null&&bt!==null&&Dx(oe,bt,we,je,!0)}}e:{if(W=Y?ja(Y):window,Z=W.nodeName&&W.nodeName.toLowerCase(),Z==="select"||Z==="input"&&W.type==="file")var rt=Xg;else if(Vg(W))if(Zg)rt=w_;else{rt=E_;var Ne=v_}else Z=W.nodeName,!Z||Z.toLowerCase()!=="input"||W.type!=="checkbox"&&W.type!=="radio"?Y&&La(Y.elementType)&&(rt=Xg):rt=S_;if(rt&&(rt=rt(i,Y))){Wg(oe,rt,l,ie);break e}Ne&&Ne(i,W,Y),i==="focusout"&&Y&&W.type==="number"&&Y.memoizedProps.value!=null&&ks(W,"number",W.value)}switch(Ne=Y?ja(Y):window,i){case"focusin":(Vg(Ne)||Ne.contentEditable==="true")&&(Cs=Ne,gd=Y,lo=null);break;case"focusout":lo=gd=Cs=null;break;case"mousedown":bd=!0;break;case"contextmenu":case"mouseup":case"dragend":bd=!1,sb(oe,l,ie);break;case"selectionchange":if(k_)break;case"keydown":case"keyup":sb(oe,l,ie)}var Fe;if(dd)e:{switch(i){case"compositionstart":var Xe="onCompositionStart";break e;case"compositionend":Xe="onCompositionEnd";break e;case"compositionupdate":Xe="onCompositionUpdate";break e}Xe=void 0}else Ts?Qg(i,l)&&(Xe="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Xe="onCompositionStart");Xe&&(Hg&&l.locale!=="ko"&&(Ts||Xe!=="onCompositionStart"?Xe==="onCompositionEnd"&&Ts&&(Fe=Ug()):(Ia=ie,ld="value"in Ia?Ia.value:Ia.textContent,Ts=!0)),Ne=Ou(Y,Xe),0<Ne.length&&(Xe=new Pg(Xe,i,null,l,ie),oe.push({event:Xe,listeners:Ne}),Fe?Xe.data=Fe:(Fe=Yg(l),Fe!==null&&(Xe.data=Fe)))),(Fe=p_?g_(i,l):b_(i,l))&&(Xe=Ou(Y,"onBeforeInput"),0<Xe.length&&(Ne=new Pg("onBeforeInput","beforeinput",null,l,ie),oe.push({event:Ne,listeners:Xe}),Ne.data=Fe)),ok(oe,i,Y,l,ie)}Mx(oe,r)})}function jo(i,r,l){return{instance:i,listener:r,currentTarget:l}}function Ou(i,r){for(var l=r+"Capture",u=[];i!==null;){var p=i,y=p.stateNode;if(p=p.tag,p!==5&&p!==26&&p!==27||y===null||(p=Jl(i,l),p!=null&&u.unshift(jo(i,p,y)),p=Jl(i,r),p!=null&&u.push(jo(i,p,y))),i.tag===3)return u;i=i.return}return[]}function dk(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5&&i.tag!==27);return i||null}function Dx(i,r,l,u,p){for(var y=r._reactName,S=[];l!==null&&l!==u;){var N=l,z=N.alternate,Y=N.stateNode;if(N=N.tag,z!==null&&z===u)break;N!==5&&N!==26&&N!==27||Y===null||(z=Y,p?(Y=Jl(l,y),Y!=null&&S.unshift(jo(l,Y,z))):p||(Y=Jl(l,y),Y!=null&&S.push(jo(l,Y,z)))),l=l.return}S.length!==0&&i.push({event:r,listeners:S})}var hk=/\r\n?/g,mk=/\u0000|\uFFFD/g;function Lx(i){return(typeof i=="string"?i:""+i).replace(hk,`
|
|
49
|
-
`).replace(mk,"")}function zx(i,r){return r=Lx(r),Lx(i)===r}function gt(i,r,l,u,p,y){switch(l){case"children":typeof u=="string"?r==="body"||r==="textarea"&&u===""||De(i,u):(typeof u=="number"||typeof u=="bigint")&&r!=="body"&&De(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",p.name,p,null),gt(i,r,"formEncType",p.formEncType,p,null),gt(i,r,"formMethod",p.formMethod,p,null),gt(i,r,"formTarget",p.formTarget,p,null)):(gt(i,r,"encType",p.encType,p,null),gt(i,r,"method",p.method,p,null),gt(i,r,"target",p.target,p,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(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"multiple":i.multiple=u&&typeof u!="function"&&typeof u!="symbol";break;case"muted":i.muted=u&&typeof u!="function"&&typeof u!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(u==null||typeof u=="function"||typeof u=="boolean"||typeof u=="symbol"){i.removeAttribute("xlink:href");break}l=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),hn(i,"popover",u);break;case"xlinkActuate":An(i,"http://www.w3.org/1999/xlink","xlink:actuate",u);break;case"xlinkArcrole":An(i,"http://www.w3.org/1999/xlink","xlink:arcrole",u);break;case"xlinkRole":An(i,"http://www.w3.org/1999/xlink","xlink:role",u);break;case"xlinkShow":An(i,"http://www.w3.org/1999/xlink","xlink:show",u);break;case"xlinkTitle":An(i,"http://www.w3.org/1999/xlink","xlink:title",u);break;case"xlinkType":An(i,"http://www.w3.org/1999/xlink","xlink:type",u);break;case"xmlBase":An(i,"http://www.w3.org/XML/1998/namespace","xml:base",u);break;case"xmlLang":An(i,"http://www.w3.org/XML/1998/namespace","xml:lang",u);break;case"xmlSpace":An(i,"http://www.w3.org/XML/1998/namespace","xml:space",u);break;case"is":hn(i,"is",u);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=aa.get(l)||l,hn(i,l,u))}}function Ph(i,r,l,u,p,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(p.children!=null)throw Error(a(60));i.innerHTML=l}}break;case"children":typeof u=="string"?De(i,u):(typeof u=="number"||typeof u=="bigint")&&De(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(!Rr.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(p=l.endsWith("Capture"),r=l.slice(2,p?l.length-7:void 0),y=i[dn]||null,y=y!=null?y[l]:null,typeof y=="function"&&i.removeEventListener(r,y,p),typeof u=="function")){typeof y!="function"&&y!==null&&(l in i?i[l]=null:i.hasAttribute(l)&&i.removeAttribute(l)),i.addEventListener(r,u,p);break e}l in i?i[l]=u:u===!0?i.setAttribute(l,""):hn(i,l,u)}}}function un(i,r,l){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Qe("error",i),Qe("load",i);var u=!1,p=!1,y;for(y in l)if(l.hasOwnProperty(y)){var S=l[y];if(S!=null)switch(y){case"src":u=!0;break;case"srcSet":p=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(a(137,r));default:gt(i,r,y,S,l,null)}}p&>(i,r,"srcSet",l.srcSet,l,null),u&>(i,r,"src",l.src,l,null);return;case"input":Qe("invalid",i);var N=y=S=p=null,z=null,Y=null;for(u in l)if(l.hasOwnProperty(u)){var ie=l[u];if(ie!=null)switch(u){case"name":p=ie;break;case"type":S=ie;break;case"checked":z=ie;break;case"defaultChecked":Y=ie;break;case"value":y=ie;break;case"defaultValue":N=ie;break;case"children":case"dangerouslySetInnerHTML":if(ie!=null)throw Error(a(137,r));break;default:gt(i,r,u,ie,l,null)}}Mr(i,y,N,z,Y,S,p,!1);return;case"select":Qe("invalid",i),u=S=y=null;for(p in l)if(l.hasOwnProperty(p)&&(N=l[p],N!=null))switch(p){case"value":y=N;break;case"defaultValue":S=N;break;case"multiple":u=N;default:gt(i,r,p,N,l,null)}r=y,l=S,i.multiple=!!u,r!=null?sn(i,!!u,r,!1):l!=null&&sn(i,!!u,l,!0);return;case"textarea":Qe("invalid",i),y=p=u=null;for(S in l)if(l.hasOwnProperty(S)&&(N=l[S],N!=null))switch(S){case"value":u=N;break;case"defaultValue":p=N;break;case"children":y=N;break;case"dangerouslySetInnerHTML":if(N!=null)throw Error(a(91));break;default:gt(i,r,S,N,l,null)}Ns(i,u,p,y);return;case"option":for(z in l)if(l.hasOwnProperty(z)&&(u=l[z],u!=null))switch(z){case"selected":i.selected=u&&typeof u!="function"&&typeof u!="symbol";break;default:gt(i,r,z,u,l,null)}return;case"dialog":Qe("beforetoggle",i),Qe("toggle",i),Qe("cancel",i),Qe("close",i);break;case"iframe":case"object":Qe("load",i);break;case"video":case"audio":for(u=0;u<Mo.length;u++)Qe(Mo[u],i);break;case"image":Qe("error",i),Qe("load",i);break;case"details":Qe("toggle",i);break;case"embed":case"source":case"link":Qe("error",i),Qe("load",i);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(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(La(r)){for(ie in l)l.hasOwnProperty(ie)&&(u=l[ie],u!==void 0&&Ph(i,r,ie,u,l,void 0));return}}for(N in l)l.hasOwnProperty(N)&&(u=l[N],u!=null&>(i,r,N,u,l,null))}function pk(i,r,l,u){switch(r){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var p=null,y=null,S=null,N=null,z=null,Y=null,ie=null;for(Z in l){var oe=l[Z];if(l.hasOwnProperty(Z)&&oe!=null)switch(Z){case"checked":break;case"value":break;case"defaultValue":z=oe;default:u.hasOwnProperty(Z)||gt(i,r,Z,null,u,oe)}}for(var W in u){var Z=u[W];if(oe=l[W],u.hasOwnProperty(W)&&(Z!=null||oe!=null))switch(W){case"type":y=Z;break;case"name":p=Z;break;case"checked":Y=Z;break;case"defaultChecked":ie=Z;break;case"value":S=Z;break;case"defaultValue":N=Z;break;case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(a(137,r));break;default:Z!==oe&>(i,r,W,Z,u,oe)}}Wl(i,S,N,z,Y,ie,y,p);return;case"select":Z=S=N=W=null;for(y in l)if(z=l[y],l.hasOwnProperty(y)&&z!=null)switch(y){case"value":break;case"multiple":Z=z;default:u.hasOwnProperty(y)||gt(i,r,y,null,u,z)}for(p in u)if(y=u[p],z=l[p],u.hasOwnProperty(p)&&(y!=null||z!=null))switch(p){case"value":W=y;break;case"defaultValue":N=y;break;case"multiple":S=y;default:y!==z&>(i,r,p,y,u,z)}r=N,l=S,u=Z,W!=null?sn(i,!!l,W,!1):!!u!=!!l&&(r!=null?sn(i,!!l,r,!0):sn(i,!!l,l?[]:"",!1));return;case"textarea":Z=W=null;for(N in l)if(p=l[N],l.hasOwnProperty(N)&&p!=null&&!u.hasOwnProperty(N))switch(N){case"value":break;case"children":break;default:gt(i,r,N,null,u,p)}for(S in u)if(p=u[S],y=l[S],u.hasOwnProperty(S)&&(p!=null||y!=null))switch(S){case"value":W=p;break;case"defaultValue":Z=p;break;case"children":break;case"dangerouslySetInnerHTML":if(p!=null)throw Error(a(91));break;default:p!==y&>(i,r,S,p,u,y)}Dc(i,W,Z);return;case"option":for(var we in l)if(W=l[we],l.hasOwnProperty(we)&&W!=null&&!u.hasOwnProperty(we))switch(we){case"selected":i.selected=!1;break;default:gt(i,r,we,null,u,W)}for(z in u)if(W=u[z],Z=l[z],u.hasOwnProperty(z)&&W!==Z&&(W!=null||Z!=null))switch(z){case"selected":i.selected=W&&typeof W!="function"&&typeof W!="symbol";break;default:gt(i,r,z,W,u,Z)}return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var je in l)W=l[je],l.hasOwnProperty(je)&&W!=null&&!u.hasOwnProperty(je)&>(i,r,je,null,u,W);for(Y in u)if(W=u[Y],Z=l[Y],u.hasOwnProperty(Y)&&W!==Z&&(W!=null||Z!=null))switch(Y){case"children":case"dangerouslySetInnerHTML":if(W!=null)throw Error(a(137,r));break;default:gt(i,r,Y,W,u,Z)}return;default:if(La(r)){for(var bt in l)W=l[bt],l.hasOwnProperty(bt)&&W!==void 0&&!u.hasOwnProperty(bt)&&Ph(i,r,bt,void 0,u,W);for(ie in u)W=u[ie],Z=l[ie],!u.hasOwnProperty(ie)||W===Z||W===void 0&&Z===void 0||Ph(i,r,ie,W,u,Z);return}}for(var P in l)W=l[P],l.hasOwnProperty(P)&&W!=null&&!u.hasOwnProperty(P)&>(i,r,P,null,u,W);for(oe in u)W=u[oe],Z=l[oe],!u.hasOwnProperty(oe)||W===Z||W==null&&Z==null||gt(i,r,oe,W,u,Z)}function Ix(i){switch(i){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function gk(){if(typeof performance.getEntriesByType=="function"){for(var i=0,r=0,l=performance.getEntriesByType("resource"),u=0;u<l.length;u++){var p=l[u],y=p.transferSize,S=p.initiatorType,N=p.duration;if(y&&N&&Ix(S)){for(S=0,N=p.responseEnd,u+=1;u<l.length;u++){var z=l[u],Y=z.startTime;if(Y>N)break;var ie=z.transferSize,oe=z.initiatorType;ie&&Ix(oe)&&(z=z.responseEnd,S+=ie*(z<N?1:(N-Y)/(z-Y)))}if(--u,r+=8*(y+S)/(p.duration/1e3),i++,10<i)break}}if(0<i)return r/i/1e6}return navigator.connection&&(i=navigator.connection.downlink,typeof i=="number")?i:5}var qh=null,Hh=null;function Ru(i){return i.nodeType===9?i:i.ownerDocument}function Bx(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 Ux(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 Kh(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 Gh=null;function bk(){var i=window.event;return i&&i.type==="popstate"?i===Gh?!1:(Gh=i,!0):(Gh=null,!1)}var $x=typeof setTimeout=="function"?setTimeout:void 0,yk=typeof clearTimeout=="function"?clearTimeout:void 0,Fx=typeof Promise=="function"?Promise:void 0,xk=typeof queueMicrotask=="function"?queueMicrotask:typeof Fx<"u"?function(i){return Fx.resolve(null).then(i).catch(vk)}:$x;function vk(i){setTimeout(function(){throw i})}function er(i){return i==="head"}function Px(i,r){var l=r,u=0;do{var p=l.nextSibling;if(i.removeChild(l),p&&p.nodeType===8)if(l=p.data,l==="/$"||l==="/&"){if(u===0){i.removeChild(p),tl(r);return}u--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")u++;else if(l==="html")Do(i.ownerDocument.documentElement);else if(l==="head"){l=i.ownerDocument.head,Do(l);for(var y=l.firstChild;y;){var S=y.nextSibling,N=y.nodeName;y[Or]||N==="SCRIPT"||N==="STYLE"||N==="LINK"&&y.rel.toLowerCase()==="stylesheet"||l.removeChild(y),y=S}}else l==="body"&&Do(i.ownerDocument.body);l=p}while(l);tl(r)}function qx(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),Yl(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}i.removeChild(l)}}function Ek(i,r,l,u){for(;i.nodeType===1;){var p=l;if(i.nodeName.toLowerCase()!==r.toLowerCase()){if(!u&&(i.nodeName!=="INPUT"||i.type!=="hidden"))break}else if(u){if(!i[Or])switch(r){case"meta":if(!i.hasAttribute("itemprop"))break;return i;case"link":if(y=i.getAttribute("rel"),y==="stylesheet"&&i.hasAttribute("data-precedence"))break;if(y!==p.rel||i.getAttribute("href")!==(p.href==null||p.href===""?null:p.href)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin)||i.getAttribute("title")!==(p.title==null?null:p.title))break;return i;case"style":if(i.hasAttribute("data-precedence"))break;return i;case"script":if(y=i.getAttribute("src"),(y!==(p.src==null?null:p.src)||i.getAttribute("type")!==(p.type==null?null:p.type)||i.getAttribute("crossorigin")!==(p.crossOrigin==null?null:p.crossOrigin))&&y&&i.hasAttribute("async")&&!i.hasAttribute("itemprop"))break;return i;default:return i}}else if(r==="input"&&i.type==="hidden"){var y=p.name==null?null:""+p.name;if(p.type==="hidden"&&i.getAttribute("name")===y)return i}else return i;if(i=gi(i.nextSibling),i===null)break}return null}function Sk(i,r,l){if(r==="")return null;for(;i.nodeType!==3;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!l||(i=gi(i.nextSibling),i===null))return null;return i}function Hx(i,r){for(;i.nodeType!==8;)if((i.nodeType!==1||i.nodeName!=="INPUT"||i.type!=="hidden")&&!r||(i=gi(i.nextSibling),i===null))return null;return i}function Yh(i){return i.data==="$?"||i.data==="$~"}function Vh(i){return i.data==="$!"||i.data==="$?"&&i.ownerDocument.readyState!=="loading"}function wk(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 gi(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 Wh=null;function Kx(i){i=i.nextSibling;for(var r=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"||l==="/&"){if(r===0)return gi(i.nextSibling);r--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||r++}i=i.nextSibling}return null}function Gx(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=Ru(l),i){case"html":if(i=r.documentElement,!i)throw Error(a(452));return i;case"head":if(i=r.head,!i)throw Error(a(453));return i;case"body":if(i=r.body,!i)throw Error(a(454));return i;default:throw Error(a(451))}}function Do(i){for(var r=i.attributes;r.length;)i.removeAttributeNode(r[0]);Yl(i)}var bi=new Map,Yx=new Set;function Mu(i){return typeof i.getRootNode=="function"?i.getRootNode():i.nodeType===9?i:i.ownerDocument}var va=ce.d;ce.d={f:_k,r:kk,D:Nk,C:Tk,L:Ck,m:Ak,X:Rk,S:Ok,M:Mk};function _k(){var i=va.f(),r=wu();return i||r}function kk(i){var r=na(i);r!==null&&r.tag===5&&r.type==="form"?fy(r):va.r(i)}var Zs=typeof document>"u"?null:document;function Vx(i,r,l){var u=Zs;if(u&&typeof r=="string"&&r){var p=On(r);p='link[rel="'+i+'"][href="'+p+'"]',typeof l=="string"&&(p+='[crossorigin="'+l+'"]'),Yx.has(p)||(Yx.add(p),i={rel:i,crossOrigin:l,href:r},u.querySelector(p)===null&&(r=u.createElement("link"),un(r,"link",i),Qt(r),u.head.appendChild(r)))}}function Nk(i){va.D(i),Vx("dns-prefetch",i,null)}function Tk(i,r){va.C(i,r),Vx("preconnect",i,r)}function Ck(i,r,l){va.L(i,r,l);var u=Zs;if(u&&i&&r){var p='link[rel="preload"][as="'+On(r)+'"]';r==="image"&&l&&l.imageSrcSet?(p+='[imagesrcset="'+On(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(p+='[imagesizes="'+On(l.imageSizes)+'"]')):p+='[href="'+On(i)+'"]';var y=p;switch(r){case"style":y=Js(i);break;case"script":y=el(i)}bi.has(y)||(i=g({rel:"preload",href:r==="image"&&l&&l.imageSrcSet?void 0:i,as:r},l),bi.set(y,i),u.querySelector(p)!==null||r==="style"&&u.querySelector(Lo(y))||r==="script"&&u.querySelector(zo(y))||(r=u.createElement("link"),un(r,"link",i),Qt(r),u.head.appendChild(r)))}}function Ak(i,r){va.m(i,r);var l=Zs;if(l&&i){var u=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+On(u)+'"][href="'+On(i)+'"]',y=p;switch(u){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":y=el(i)}if(!bi.has(y)&&(i=g({rel:"modulepreload",href:i},r),bi.set(y,i),l.querySelector(p)===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"),un(u,"link",i),Qt(u),l.head.appendChild(u)}}}function Ok(i,r,l){va.S(i,r,l);var u=Zs;if(u&&i){var p=Da(u).hoistableStyles,y=Js(i);r=r||"default";var S=p.get(y);if(!S){var N={loading:0,preload:null};if(S=u.querySelector(Lo(y)))N.loading=5;else{i=g({rel:"stylesheet",href:i,"data-precedence":r},l),(l=bi.get(y))&&Xh(i,l);var z=S=u.createElement("link");Qt(z),un(z,"link",i),z._p=new Promise(function(Y,ie){z.onload=Y,z.onerror=ie}),z.addEventListener("load",function(){N.loading|=1}),z.addEventListener("error",function(){N.loading|=2}),N.loading|=4,ju(S,r,u)}S={type:"stylesheet",instance:S,count:1,state:N},p.set(y,S)}}}function Rk(i,r){va.X(i,r);var l=Zs;if(l&&i){var u=Da(l).hoistableScripts,p=el(i),y=u.get(p);y||(y=l.querySelector(zo(p)),y||(i=g({src:i,async:!0},r),(r=bi.get(p))&&Zh(i,r),y=l.createElement("script"),Qt(y),un(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Mk(i,r){va.M(i,r);var l=Zs;if(l&&i){var u=Da(l).hoistableScripts,p=el(i),y=u.get(p);y||(y=l.querySelector(zo(p)),y||(i=g({src:i,async:!0,type:"module"},r),(r=bi.get(p))&&Zh(i,r),y=l.createElement("script"),Qt(y),un(y,"link",i),l.head.appendChild(y)),y={type:"script",instance:y,count:1,state:null},u.set(p,y))}}function Wx(i,r,l,u){var p=(p=re.current)?Mu(p):null;if(!p)throw Error(a(446));switch(i){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(r=Js(l.href),l=Da(p).hoistableStyles,u=l.get(r),u||(u={type:"style",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){i=Js(l.href);var y=Da(p).hoistableStyles,S=y.get(i);if(S||(p=p.ownerDocument||p,S={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},y.set(i,S),(y=p.querySelector(Lo(i)))&&!y._p&&(S.instance=y,S.state.loading=5),bi.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},bi.set(i,l),y||jk(p,i,l,S.state))),r&&u===null)throw Error(a(528,""));return S}if(r&&u!==null)throw Error(a(529,""));return null;case"script":return r=l.async,l=l.src,typeof l=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=el(l),l=Da(p).hoistableScripts,u=l.get(r),u||(u={type:"script",instance:null,count:0,state:null},l.set(r,u)),u):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,i))}}function Js(i){return'href="'+On(i)+'"'}function Lo(i){return'link[rel="stylesheet"]['+i+"]"}function Xx(i){return g({},i,{"data-precedence":i.precedence,precedence:null})}function jk(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}),un(r,"link",l),Qt(r),i.head.appendChild(r))}function el(i){return'[src="'+On(i)+'"]'}function zo(i){return"script[async]"+i}function Zx(i,r,l){if(r.count++,r.instance===null)switch(r.type){case"style":var u=i.querySelector('style[data-href~="'+On(l.href)+'"]');if(u)return r.instance=u,Qt(u),u;var p=g({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return u=(i.ownerDocument||i).createElement("style"),Qt(u),un(u,"style",p),ju(u,l.precedence,i),r.instance=u;case"stylesheet":p=Js(l.href);var y=i.querySelector(Lo(p));if(y)return r.state.loading|=4,r.instance=y,Qt(y),y;u=Xx(l),(p=bi.get(p))&&Xh(u,p),y=(i.ownerDocument||i).createElement("link"),Qt(y);var S=y;return S._p=new Promise(function(N,z){S.onload=N,S.onerror=z}),un(y,"link",u),r.state.loading|=4,ju(y,l.precedence,i),r.instance=y;case"script":return y=el(l.src),(p=i.querySelector(zo(y)))?(r.instance=p,Qt(p),p):(u=l,(p=bi.get(y))&&(u=g({},l),Zh(u,p)),i=i.ownerDocument||i,p=i.createElement("script"),Qt(p),un(p,"link",u),i.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(u=r.instance,r.state.loading|=4,ju(u,l.precedence,i));return r.instance}function ju(i,r,l){for(var u=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=u.length?u[u.length-1]:null,y=p,S=0;S<u.length;S++){var N=u[S];if(N.dataset.precedence===r)y=N;else if(y!==p)break}y?y.parentNode.insertBefore(i,y.nextSibling):(r=l.nodeType===9?l.head:l,r.insertBefore(i,r.firstChild))}function Xh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.title==null&&(i.title=r.title)}function Zh(i,r){i.crossOrigin==null&&(i.crossOrigin=r.crossOrigin),i.referrerPolicy==null&&(i.referrerPolicy=r.referrerPolicy),i.integrity==null&&(i.integrity=r.integrity)}var Du=null;function Jx(i,r,l){if(Du===null){var u=new Map,p=Du=new Map;p.set(l,u)}else p=Du,u=p.get(l),u||(u=new Map,p.set(l,u));if(u.has(i))return u;for(u.set(i,null),l=l.getElementsByTagName(i),p=0;p<l.length;p++){var y=l[p];if(!(y[Or]||y[qt]||i==="link"&&y.getAttribute("rel")==="stylesheet")&&y.namespaceURI!=="http://www.w3.org/2000/svg"){var S=y.getAttribute(r)||"";S=i+S;var N=u.get(S);N?N.push(y):u.set(S,[y])}}return u}function ev(i,r,l){i=i.ownerDocument||i,i.head.insertBefore(l,r==="title"?i.querySelector("head > title"):null)}function Dk(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 tv(i){return!(i.type==="stylesheet"&&(i.state.loading&3)===0)}function Lk(i,r,l,u){if(l.type==="stylesheet"&&(typeof u.media!="string"||matchMedia(u.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var p=Js(u.href),y=r.querySelector(Lo(p));if(y){r=y._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(i.count++,i=Lu.bind(i),r.then(i,i)),l.state.loading|=4,l.instance=y,Qt(y);return}y=r.ownerDocument||r,u=Xx(u),(p=bi.get(p))&&Xh(u,p),y=y.createElement("link"),Qt(y);var S=y;S._p=new Promise(function(N,z){S.onload=N,S.onerror=z}),un(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=Lu.bind(i),r.addEventListener("load",l),r.addEventListener("error",l))}}var Jh=0;function zk(i,r){return i.stylesheets&&i.count===0&&Iu(i,i.stylesheets),0<i.count||0<i.imgCount?function(l){var u=setTimeout(function(){if(i.stylesheets&&Iu(i,i.stylesheets),i.unsuspend){var y=i.unsuspend;i.unsuspend=null,y()}},6e4+r);0<i.imgBytes&&Jh===0&&(Jh=62500*gk());var p=setTimeout(function(){if(i.waitingForImages=!1,i.count===0&&(i.stylesheets&&Iu(i,i.stylesheets),i.unsuspend)){var y=i.unsuspend;i.unsuspend=null,y()}},(i.imgBytes>Jh?50:800)+r);return i.unsuspend=l,function(){i.unsuspend=null,clearTimeout(u),clearTimeout(p)}}:null}function Lu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Iu(this,this.stylesheets);else if(this.unsuspend){var i=this.unsuspend;this.unsuspend=null,i()}}}var zu=null;function Iu(i,r){i.stylesheets=null,i.unsuspend!==null&&(i.count++,zu=new Map,r.forEach(Ik,i),zu=null,Lu.call(i))}function Ik(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 p=i.querySelectorAll("link[data-precedence],style[data-precedence]"),y=0;y<p.length;y++){var S=p[y];(S.nodeName==="LINK"||S.getAttribute("media")!=="not all")&&(l.set(S.dataset.precedence,S),u=S)}u&&l.set(null,u)}p=r.instance,S=p.getAttribute("data-precedence"),y=l.get(S)||u,y===u&&l.set(null,p),l.set(S,p),this.count++,u=Lu.bind(this),p.addEventListener("load",u),p.addEventListener("error",u),y?y.parentNode.insertBefore(p,y.nextSibling):(i=i.nodeType===9?i.head:i,i.insertBefore(p,i.firstChild)),r.state.loading|=4}}var Io={$$typeof:T,Provider:null,Consumer:null,_currentValue:V,_currentValue2:V,_threadCount:0};function Bk(i,r,l,u,p,y,S,N,z){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=kt(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=kt(0),this.hiddenUpdates=kt(null),this.identifierPrefix=u,this.onUncaughtError=p,this.onCaughtError=y,this.onRecoverableError=S,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=z,this.incompleteTransitions=new Map}function nv(i,r,l,u,p,y,S,N,z,Y,ie,oe){return i=new Bk(i,r,l,S,z,Y,ie,oe,N),r=1,y===!0&&(r|=24),y=Wn(3,null,null,r),i.current=y,y.stateNode=i,r=Md(),r.refCount++,i.pooledCache=r,r.refCount++,y.memoizedState={element:u,isDehydrated:l,cache:r},zd(y),i}function iv(i){return i?(i=Rs,i):Rs}function av(i,r,l,u,p,y){p=iv(p),u.context===null?u.context=p:u.pendingContext=p,u=qa(r),u.payload={element:l},y=y===void 0?null:y,y!==null&&(u.callback=y),l=Ha(i,u,r),l!==null&&(zn(l,i,r),po(l,i,r))}function rv(i,r){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<r?l:r}}function em(i,r){rv(i,r),(i=i.alternate)&&rv(i,r)}function sv(i){if(i.tag===13||i.tag===31){var r=zr(i,67108864);r!==null&&zn(r,i,67108864),em(i,67108864)}}function lv(i){if(i.tag===13||i.tag===31){var r=ti();r=Ct(r);var l=zr(i,r);l!==null&&zn(l,i,r),em(i,r)}}var Bu=!0;function Uk(i,r,l,u){var p=q.T;q.T=null;var y=ce.p;try{ce.p=2,tm(i,r,l,u)}finally{ce.p=y,q.T=p}}function $k(i,r,l,u){var p=q.T;q.T=null;var y=ce.p;try{ce.p=8,tm(i,r,l,u)}finally{ce.p=y,q.T=p}}function tm(i,r,l,u){if(Bu){var p=nm(u);if(p===null)Fh(i,r,u,Uu,l),cv(i,u);else if(Pk(p,i,r,l,u))u.stopPropagation();else if(cv(i,u),r&4&&-1<Fk.indexOf(i)){for(;p!==null;){var y=na(p);if(y!==null)switch(y.tag){case 3:if(y=y.stateNode,y.current.memoizedState.isDehydrated){var S=Cn(y.pendingLanes);if(S!==0){var N=y;for(N.pendingLanes|=2,N.entangledLanes|=2;S;){var z=1<<31-ut(S);N.entanglements[1]|=z,S&=~z}Ki(y),(lt&6)===0&&(Eu=Mt()+500,Ro(0))}}break;case 31:case 13:N=zr(y,2),N!==null&&zn(N,y,2),wu(),em(y,2)}if(y=nm(u),y===null&&Fh(i,r,u,Uu,l),y===p)break;p=y}p!==null&&u.stopPropagation()}else Fh(i,r,u,null,l)}}function nm(i){return i=Ue(i),im(i)}var Uu=null;function im(i){if(Uu=null,i=En(i),i!==null){var r=o(i);if(r===null)i=null;else{var l=r.tag;if(l===13){if(i=c(r),i!==null)return i;i=null}else if(l===31){if(i=f(r),i!==null)return i;i=null}else if(l===3){if(r.stateNode.current.memoizedState.isDehydrated)return r.tag===3?r.stateNode.containerInfo:null;i=null}else r!==i&&(i=null)}}return Uu=i,null}function ov(i){switch(i){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(ys()){case ne:return 2;case pe:return 8;case Me:case He:return 32;case at:return 268435456;default:return 32}default:return 32}}var am=!1,tr=null,nr=null,ir=null,Bo=new Map,Uo=new Map,ar=[],Fk="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 cv(i,r){switch(i){case"focusin":case"focusout":tr=null;break;case"dragenter":case"dragleave":nr=null;break;case"mouseover":case"mouseout":ir=null;break;case"pointerover":case"pointerout":Bo.delete(r.pointerId);break;case"gotpointercapture":case"lostpointercapture":Uo.delete(r.pointerId)}}function $o(i,r,l,u,p,y){return i===null||i.nativeEvent!==y?(i={blockedOn:r,domEventName:l,eventSystemFlags:u,nativeEvent:y,targetContainers:[p]},r!==null&&(r=na(r),r!==null&&sv(r)),i):(i.eventSystemFlags|=u,r=i.targetContainers,p!==null&&r.indexOf(p)===-1&&r.push(p),i)}function Pk(i,r,l,u,p){switch(r){case"focusin":return tr=$o(tr,i,r,l,u,p),!0;case"dragenter":return nr=$o(nr,i,r,l,u,p),!0;case"mouseover":return ir=$o(ir,i,r,l,u,p),!0;case"pointerover":var y=p.pointerId;return Bo.set(y,$o(Bo.get(y)||null,i,r,l,u,p)),!0;case"gotpointercapture":return y=p.pointerId,Uo.set(y,$o(Uo.get(y)||null,i,r,l,u,p)),!0}return!1}function uv(i){var r=En(i.target);if(r!==null){var l=o(r);if(l!==null){if(r=l.tag,r===13){if(r=c(l),r!==null){i.blockedOn=r,Es(i.priority,function(){lv(l)});return}}else if(r===31){if(r=f(l),r!==null){i.blockedOn=r,Es(i.priority,function(){lv(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 $u(i){if(i.blockedOn!==null)return!1;for(var r=i.targetContainers;0<r.length;){var l=nm(i.nativeEvent);if(l===null){l=i.nativeEvent;var u=new l.constructor(l.type,l);ke=u,l.target.dispatchEvent(u),ke=null}else return r=na(l),r!==null&&sv(r),i.blockedOn=l,!1;r.shift()}return!0}function fv(i,r,l){$u(i)&&l.delete(r)}function qk(){am=!1,tr!==null&&$u(tr)&&(tr=null),nr!==null&&$u(nr)&&(nr=null),ir!==null&&$u(ir)&&(ir=null),Bo.forEach(fv),Uo.forEach(fv)}function Fu(i,r){i.blockedOn===r&&(i.blockedOn=null,am||(am=!0,e.unstable_scheduleCallback(e.unstable_NormalPriority,qk)))}var Pu=null;function dv(i){Pu!==i&&(Pu=i,e.unstable_scheduleCallback(e.unstable_NormalPriority,function(){Pu===i&&(Pu=null);for(var r=0;r<i.length;r+=3){var l=i[r],u=i[r+1],p=i[r+2];if(typeof u!="function"){if(im(u||l)===null)continue;break}var y=na(l);y!==null&&(i.splice(r,3),r-=3,nh(y,{pending:!0,data:p,method:l.method,action:u},u,p))}}))}function tl(i){function r(z){return Fu(z,i)}tr!==null&&Fu(tr,i),nr!==null&&Fu(nr,i),ir!==null&&Fu(ir,i),Bo.forEach(r),Uo.forEach(r);for(var l=0;l<ar.length;l++){var u=ar[l];u.blockedOn===i&&(u.blockedOn=null)}for(;0<ar.length&&(l=ar[0],l.blockedOn===null);)uv(l),l.blockedOn===null&&ar.shift();if(l=(i.ownerDocument||i).$$reactFormReplay,l!=null)for(u=0;u<l.length;u+=3){var p=l[u],y=l[u+1],S=p[dn]||null;if(typeof y=="function")S||dv(l);else if(S){var N=null;if(y&&y.hasAttribute("formAction")){if(p=y,S=y[dn]||null)N=S.formAction;else if(im(p)!==null)continue}else N=S.action;typeof N=="function"?l[u+1]=N:(l.splice(u,3),u-=3),dv(l)}}}function hv(){function i(y){y.canIntercept&&y.info==="react-transition"&&y.intercept({handler:function(){return new Promise(function(S){return p=S})},focusReset:"manual",scroll:"manual"})}function r(){p!==null&&(p(),p=null),u||setTimeout(l,20)}function l(){if(!u&&!navigation.transition){var y=navigation.currentEntry;y&&y.url!=null&&navigation.navigate(y.url,{state:y.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var u=!1,p=null;return navigation.addEventListener("navigate",i),navigation.addEventListener("navigatesuccess",r),navigation.addEventListener("navigateerror",r),setTimeout(l,100),function(){u=!0,navigation.removeEventListener("navigate",i),navigation.removeEventListener("navigatesuccess",r),navigation.removeEventListener("navigateerror",r),p!==null&&(p(),p=null)}}}function rm(i){this._internalRoot=i}qu.prototype.render=rm.prototype.render=function(i){var r=this._internalRoot;if(r===null)throw Error(a(409));var l=r.current,u=ti();av(l,u,i,r,null,null)},qu.prototype.unmount=rm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var r=i.containerInfo;av(i.current,2,null,i,null,null),wu(),r[Ma]=null}};function qu(i){this._internalRoot=i}qu.prototype.unstable_scheduleHydration=function(i){if(i){var r=vs();i={blockedOn:null,target:i,priority:r};for(var l=0;l<ar.length&&r!==0&&r<ar[l].priority;l++);ar.splice(l,0,i),l===0&&uv(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=m(r),i=i!==null?b(i):null,i=i===null?null:i.stateNode,i};var Hk={bundleType:0,version:"19.2.5",rendererPackageName:"react-dom",currentDispatcherRef:q,reconcilerVersion:"19.2.5"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Hu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hu.isDisabled&&Hu.supportsFiber)try{rn=Hu.inject(Hk),It=Hu}catch{}}return Po.createRoot=function(i,r){if(!s(i))throw Error(a(299));var l=!1,u="",p=Ey,y=Sy,S=wy;return r!=null&&(r.unstable_strictMode===!0&&(l=!0),r.identifierPrefix!==void 0&&(u=r.identifierPrefix),r.onUncaughtError!==void 0&&(p=r.onUncaughtError),r.onCaughtError!==void 0&&(y=r.onCaughtError),r.onRecoverableError!==void 0&&(S=r.onRecoverableError)),r=nv(i,1,!1,null,null,l,u,null,p,y,S,hv),i[Ma]=r.current,$h(i),new rm(r)},Po.hydrateRoot=function(i,r,l){if(!s(i))throw Error(a(299));var u=!1,p="",y=Ey,S=Sy,N=wy,z=null;return l!=null&&(l.unstable_strictMode===!0&&(u=!0),l.identifierPrefix!==void 0&&(p=l.identifierPrefix),l.onUncaughtError!==void 0&&(y=l.onUncaughtError),l.onCaughtError!==void 0&&(S=l.onCaughtError),l.onRecoverableError!==void 0&&(N=l.onRecoverableError),l.formState!==void 0&&(z=l.formState)),r=nv(i,1,!0,r,l??null,u,p,z,y,S,N,hv),r.context=iv(null),l=r.current,u=ti(),u=Ct(u),p=qa(u),p.callback=null,Ha(l,p,u),l=u,r.current.lanes=l,xt(r,l),Ki(r),i[Ma]=r.current,$h(i),new qu(r)},Po.version="19.2.5",Po}var Nv;function nN(){if(Nv)return cm.exports;Nv=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(),cm.exports=tN(),cm.exports}var iN=nN(),Ml=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},es,fr,gl,u1,aN=(u1=class extends Ml{constructor(){super();Ae(this,es);Ae(this,fr);Ae(this,gl);ve(this,gl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t();return window.addEventListener("visibilitychange",n,!1),()=>{window.removeEventListener("visibilitychange",n)}}})}onSubscribe(){I(this,fr)||this.setEventListener(I(this,gl))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,fr))==null||t.call(this),ve(this,fr,void 0))}setEventListener(t){var n;ve(this,gl,t),(n=I(this,fr))==null||n.call(this),ve(this,fr,t(a=>{typeof a=="boolean"?this.setFocused(a):this.onFocus()}))}setFocused(t){I(this,es)!==t&&(ve(this,es,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(n=>{n(t)})}isFocused(){var t;return typeof I(this,es)=="boolean"?I(this,es):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},es=new WeakMap,fr=new WeakMap,gl=new WeakMap,u1),zp=new aN,rN={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},dr,jp,f1,sN=(f1=class{constructor(){Ae(this,dr,rN);Ae(this,jp,!1)}setTimeoutProvider(e){ve(this,dr,e)}setTimeout(e,t){return I(this,dr).setTimeout(e,t)}clearTimeout(e){I(this,dr).clearTimeout(e)}setInterval(e,t){return I(this,dr).setInterval(e,t)}clearInterval(e){I(this,dr).clearInterval(e)}},dr=new WeakMap,jp=new WeakMap,f1),Wr=new sN;function lN(e){setTimeout(e,0)}var oN=typeof window>"u"||"Deno"in globalThis;function kn(){}function cN(e,t){return typeof e=="function"?e(t):e}function Ym(e){return typeof e=="number"&&e>=0&&e!==1/0}function E1(e,t){return Math.max(e+(t||0)-Date.now(),0)}function vr(e,t){return typeof e=="function"?e(t):e}function xi(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:f}=e;if(c){if(a){if(t.queryHash!==Ip(c,t.options))return!1}else if(!nc(t.queryKey,c))return!1}if(n!=="all"){const h=t.isActive();if(n==="active"&&!h||n==="inactive"&&h)return!1}return!(typeof f=="boolean"&&t.isStale()!==f||s&&s!==t.state.fetchStatus||o&&!o(t))}function Cv(e,t){const{exact:n,status:a,predicate:s,mutationKey:o}=e;if(o){if(!t.options.mutationKey)return!1;if(n){if(cs(t.options.mutationKey)!==cs(o))return!1}else if(!nc(t.options.mutationKey,o))return!1}return!(a&&t.state.status!==a||s&&!s(t))}function Ip(e,t){return((t==null?void 0:t.queryKeyHashFn)||cs)(e)}function cs(e){return JSON.stringify(e,(t,n)=>Vm(n)?Object.keys(n).sort().reduce((a,s)=>(a[s]=n[s],a),{}):n)}function nc(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?Object.keys(t).every(n=>nc(e[n],t[n])):!1}var uN=Object.prototype.hasOwnProperty;function S1(e,t,n=0){if(e===t)return e;if(n>500)return t;const a=Av(e)&&Av(t);if(!a&&!(Vm(e)&&Vm(t)))return t;const o=(a?e:Object.keys(e)).length,c=a?t:Object.keys(t),f=c.length,h=a?new Array(f):{};let m=0;for(let b=0;b<f;b++){const g=a?b:c[b],x=e[g],v=t[g];if(x===v){h[g]=x,(a?b<o:uN.call(e,g))&&m++;continue}if(x===null||v===null||typeof x!="object"||typeof v!="object"){h[g]=v;continue}const E=S1(x,v,n+1);h[g]=E,E===x&&m++}return o===f&&m===o?e:h}function yf(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 Av(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Vm(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 fN(e){return new Promise(t=>{Wr.setTimeout(t,e)})}function Wm(e,t,n){return typeof n.structuralSharing=="function"?n.structuralSharing(e,t):n.structuralSharing!==!1?S1(e,t):t}function dN(e,t,n=0){const a=[...e,t];return n&&a.length>n?a.slice(1):a}function hN(e,t,n=0){const a=[t,...e];return n&&a.length>n?a.slice(0,-1):a}var Bp=Symbol();function w1(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Bp?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function Up(e,t){return typeof e=="function"?e(...t):!!e}function mN(e,t,n){let a=!1,s;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(s??(s=t()),a||(a=!0,s.aborted?n():s.addEventListener("abort",n,{once:!0})),s)}),e}var ic=(()=>{let e=()=>oN;return{isServer(){return e()},setIsServer(t){e=t}}})();function Xm(){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 pN=lN;function gN(){let e=[],t=0,n=f=>{f()},a=f=>{f()},s=pN;const o=f=>{t?e.push(f):s(()=>{n(f)})},c=()=>{const f=e;e=[],f.length&&s(()=>{a(()=>{f.forEach(h=>{n(h)})})})};return{batch:f=>{let h;t++;try{h=f()}finally{t--,t||c()}return h},batchCalls:f=>(...h)=>{o(()=>{f(...h)})},schedule:o,setNotifyFunction:f=>{n=f},setBatchNotifyFunction:f=>{a=f},setScheduler:f=>{s=f}}}var tn=gN(),bl,hr,yl,d1,bN=(d1=class extends Ml{constructor(){super();Ae(this,bl,!0);Ae(this,hr);Ae(this,yl);ve(this,yl,t=>{if(typeof window<"u"&&window.addEventListener){const n=()=>t(!0),a=()=>t(!1);return window.addEventListener("online",n,!1),window.addEventListener("offline",a,!1),()=>{window.removeEventListener("online",n),window.removeEventListener("offline",a)}}})}onSubscribe(){I(this,hr)||this.setEventListener(I(this,yl))}onUnsubscribe(){var t;this.hasListeners()||((t=I(this,hr))==null||t.call(this),ve(this,hr,void 0))}setEventListener(t){var n;ve(this,yl,t),(n=I(this,hr))==null||n.call(this),ve(this,hr,t(this.setOnline.bind(this)))}setOnline(t){I(this,bl)!==t&&(ve(this,bl,t),this.listeners.forEach(a=>{a(t)}))}isOnline(){return I(this,bl)}},bl=new WeakMap,hr=new WeakMap,yl=new WeakMap,d1),xf=new bN;function yN(e){return Math.min(1e3*2**e,3e4)}function _1(e){return(e??"online")==="online"?xf.isOnline():!0}var Zm=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function k1(e){let t=!1,n=0,a;const s=Xm(),o=()=>s.status!=="pending",c=w=>{var k;if(!o()){const _=new Zm(w);x(_),(k=e.onCancel)==null||k.call(e,_)}},f=()=>{t=!0},h=()=>{t=!1},m=()=>zp.isFocused()&&(e.networkMode==="always"||xf.isOnline())&&e.canRun(),b=()=>_1(e.networkMode)&&e.canRun(),g=w=>{o()||(a==null||a(),s.resolve(w))},x=w=>{o()||(a==null||a(),s.reject(w))},v=()=>new Promise(w=>{var k;a=_=>{(o()||m())&&w(_)},(k=e.onPause)==null||k.call(e)}).then(()=>{var w;a=void 0,o()||(w=e.onContinue)==null||w.call(e)}),E=()=>{if(o())return;let w;const k=n===0?e.initialPromise:void 0;try{w=k??e.fn()}catch(_){w=Promise.reject(_)}Promise.resolve(w).then(g).catch(_=>{var M;if(o())return;const A=e.retry??(ic.isServer()?0:3),T=e.retryDelay??yN,j=typeof T=="function"?T(n,_):T,$=A===!0||typeof A=="number"&&n<A||typeof A=="function"&&A(n,_);if(t||!$){x(_);return}n++,(M=e.onFail)==null||M.call(e,n,_),fN(j).then(()=>m()?void 0:v()).then(()=>{t?x(_):E()})})};return{promise:s,status:()=>s.status,cancel:c,continue:()=>(a==null||a(),s),cancelRetry:f,continueRetry:h,canStart:b,start:()=>(b()?E():v().then(E),s)}}var ts,h1,N1=(h1=class{constructor(){Ae(this,ts)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ym(this.gcTime)&&ve(this,ts,Wr.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(ic.isServer()?1/0:300*1e3))}clearGcTimeout(){I(this,ts)!==void 0&&(Wr.clearTimeout(I(this,ts)),ve(this,ts,void 0))}},ts=new WeakMap,h1),ns,xl,yi,is,an,hc,as,ii,T1,Ea,m1,xN=(m1=class extends N1{constructor(t){super();Ae(this,ii);Ae(this,ns);Ae(this,xl);Ae(this,yi);Ae(this,is);Ae(this,an);Ae(this,hc);Ae(this,as);ve(this,as,!1),ve(this,hc,t.defaultOptions),this.setOptions(t.options),this.observers=[],ve(this,is,t.client),ve(this,yi,I(this,is).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,ve(this,ns,Mv(this.options)),this.state=t.state??I(this,ns),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=I(this,an))==null?void 0:t.promise}setOptions(t){if(this.options={...I(this,hc),...t},this.updateGcTime(this.options.gcTime),this.state&&this.state.data===void 0){const n=Mv(this.options);n.data!==void 0&&(this.setState(Rv(n.data,n.dataUpdatedAt)),ve(this,ns,n))}}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&I(this,yi).remove(this)}setData(t,n){const a=Wm(this.state.data,t,this.options);return Pe(this,ii,Ea).call(this,{data:a,type:"success",dataUpdatedAt:n==null?void 0:n.updatedAt,manual:n==null?void 0:n.manual}),a}setState(t,n){Pe(this,ii,Ea).call(this,{type:"setState",state:t,setStateOptions:n})}cancel(t){var a,s;const n=(a=I(this,an))==null?void 0:a.promise;return(s=I(this,an))==null||s.cancel(t),n?n.then(kn).catch(kn):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}get resetState(){return I(this,ns)}reset(){this.destroy(),this.setState(this.resetState)}isActive(){return this.observers.some(t=>xi(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Bp||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0?this.observers.some(t=>vr(t.options.staleTime,this)==="static"):!1}isStale(){return this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0||this.state.isInvalidated}isStaleByTime(t=0){return this.state.data===void 0?!0:t==="static"?!1:this.state.isInvalidated?!0:!E1(this.state.dataUpdatedAt,t)}onFocus(){var n;const t=this.observers.find(a=>a.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,an))==null||n.continue()}onOnline(){var n;const t=this.observers.find(a=>a.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(n=I(this,an))==null||n.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),I(this,yi).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(n=>n!==t),this.observers.length||(I(this,an)&&(I(this,as)||Pe(this,ii,T1).call(this)?I(this,an).cancel({revert:!0}):I(this,an).cancelRetry()),this.scheduleGc()),I(this,yi).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||Pe(this,ii,Ea).call(this,{type:"invalidate"})}async fetch(t,n){var h,m,b,g,x,v,E,w,k,_,A,T;if(this.state.fetchStatus!=="idle"&&((h=I(this,an))==null?void 0:h.status())!=="rejected"){if(this.state.data!==void 0&&(n!=null&&n.cancelRefetch))this.cancel({silent:!0});else if(I(this,an))return I(this,an).continueRetry(),I(this,an).promise}if(t&&this.setOptions(t),!this.options.queryFn){const j=this.observers.find($=>$.options.queryFn);j&&this.setOptions(j.options)}const a=new AbortController,s=j=>{Object.defineProperty(j,"signal",{enumerable:!0,get:()=>(ve(this,as,!0),a.signal)})},o=()=>{const j=w1(this.options,n),M=(()=>{const F={client:I(this,is),queryKey:this.queryKey,meta:this.meta};return s(F),F})();return ve(this,as,!1),this.options.persister?this.options.persister(j,M,this):j(M)},f=(()=>{const j={fetchOptions:n,options:this.options,queryKey:this.queryKey,client:I(this,is),state:this.state,fetchFn:o};return s(j),j})();(m=this.options.behavior)==null||m.onFetch(f,this),ve(this,xl,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((b=f.fetchOptions)==null?void 0:b.meta))&&Pe(this,ii,Ea).call(this,{type:"fetch",meta:(g=f.fetchOptions)==null?void 0:g.meta}),ve(this,an,k1({initialPromise:n==null?void 0:n.initialPromise,fn:f.fetchFn,onCancel:j=>{j instanceof Zm&&j.revert&&this.setState({...I(this,xl),fetchStatus:"idle"}),a.abort()},onFail:(j,$)=>{Pe(this,ii,Ea).call(this,{type:"failed",failureCount:j,error:$})},onPause:()=>{Pe(this,ii,Ea).call(this,{type:"pause"})},onContinue:()=>{Pe(this,ii,Ea).call(this,{type:"continue"})},retry:f.options.retry,retryDelay:f.options.retryDelay,networkMode:f.options.networkMode,canRun:()=>!0}));try{const j=await I(this,an).start();if(j===void 0)throw new Error(`${this.queryHash} data is undefined`);return this.setData(j),(v=(x=I(this,yi).config).onSuccess)==null||v.call(x,j,this),(w=(E=I(this,yi).config).onSettled)==null||w.call(E,j,this.state.error,this),j}catch(j){if(j instanceof Zm){if(j.silent)return I(this,an).promise;if(j.revert){if(this.state.data===void 0)throw j;return this.state.data}}throw Pe(this,ii,Ea).call(this,{type:"error",error:j}),(_=(k=I(this,yi).config).onError)==null||_.call(k,j,this),(T=(A=I(this,yi).config).onSettled)==null||T.call(A,this.state.data,j,this),j}finally{this.scheduleGc()}}},ns=new WeakMap,xl=new WeakMap,yi=new WeakMap,is=new WeakMap,an=new WeakMap,hc=new WeakMap,as=new WeakMap,ii=new WeakSet,T1=function(){return this.state.fetchStatus==="paused"&&this.state.status==="pending"},Ea=function(t){const n=a=>{switch(t.type){case"failed":return{...a,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...a,fetchStatus:"paused"};case"continue":return{...a,fetchStatus:"fetching"};case"fetch":return{...a,...C1(a.data,this.options),fetchMeta:t.meta??null};case"success":const s={...a,...Rv(t.data,t.dataUpdatedAt),dataUpdateCount:a.dataUpdateCount+1,...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};return ve(this,xl,t.manual?s:void 0),s;case"error":const o=t.error;return{...a,error:o,errorUpdateCount:a.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:a.fetchFailureCount+1,fetchFailureReason:o,fetchStatus:"idle",status:"error",isInvalidated:!0};case"invalidate":return{...a,isInvalidated:!0};case"setState":return{...a,...t.state}}};this.state=n(this.state),tn.batch(()=>{this.observers.forEach(a=>{a.onQueryUpdate()}),I(this,yi).notify({query:this,type:"updated",action:t})})},m1);function C1(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:_1(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Rv(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:"success"}}function Mv(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,n=t!==void 0,a=n?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:n?a??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:n?"success":"pending",fetchStatus:"idle"}}var Un,tt,mc,wn,rs,vl,Sa,mr,pc,El,Sl,ss,ls,pr,wl,ct,Wo,Jm,ep,tp,np,ip,ap,rp,A1,p1,vN=(p1=class extends Ml{constructor(t,n){super();Ae(this,ct);Ae(this,Un);Ae(this,tt);Ae(this,mc);Ae(this,wn);Ae(this,rs);Ae(this,vl);Ae(this,Sa);Ae(this,mr);Ae(this,pc);Ae(this,El);Ae(this,Sl);Ae(this,ss);Ae(this,ls);Ae(this,pr);Ae(this,wl,new Set);this.options=n,ve(this,Un,t),ve(this,mr,null),ve(this,Sa,Xm()),this.bindMethods(),this.setOptions(n)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(I(this,tt).addObserver(this),jv(I(this,tt),this.options)?Pe(this,ct,Wo).call(this):this.updateResult(),Pe(this,ct,np).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return sp(I(this,tt),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return sp(I(this,tt),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,Pe(this,ct,ip).call(this),Pe(this,ct,ap).call(this),I(this,tt).removeObserver(this)}setOptions(t){const n=this.options,a=I(this,tt);if(this.options=I(this,Un).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof xi(this.options.enabled,I(this,tt))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");Pe(this,ct,rp).call(this),I(this,tt).setOptions(this.options),n._defaulted&&!yf(this.options,n)&&I(this,Un).getQueryCache().notify({type:"observerOptionsUpdated",query:I(this,tt),observer:this});const s=this.hasListeners();s&&Dv(I(this,tt),a,this.options,n)&&Pe(this,ct,Wo).call(this),this.updateResult(),s&&(I(this,tt)!==a||xi(this.options.enabled,I(this,tt))!==xi(n.enabled,I(this,tt))||vr(this.options.staleTime,I(this,tt))!==vr(n.staleTime,I(this,tt)))&&Pe(this,ct,Jm).call(this);const o=Pe(this,ct,ep).call(this);s&&(I(this,tt)!==a||xi(this.options.enabled,I(this,tt))!==xi(n.enabled,I(this,tt))||o!==I(this,pr))&&Pe(this,ct,tp).call(this,o)}getOptimisticResult(t){const n=I(this,Un).getQueryCache().build(I(this,Un),t),a=this.createResult(n,t);return SN(this,a)&&(ve(this,wn,a),ve(this,vl,this.options),ve(this,rs,I(this,tt).state)),a}getCurrentResult(){return I(this,wn)}trackResult(t,n){return new Proxy(t,{get:(a,s)=>(this.trackProp(s),n==null||n(s),s==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&I(this,Sa).status==="pending"&&I(this,Sa).reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(a,s))})}trackProp(t){I(this,wl).add(t)}getCurrentQuery(){return I(this,tt)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const n=I(this,Un).defaultQueryOptions(t),a=I(this,Un).getQueryCache().build(I(this,Un),n);return a.fetch().then(()=>this.createResult(a,n))}fetch(t){return Pe(this,ct,Wo).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),I(this,wn)))}createResult(t,n){var ee;const a=I(this,tt),s=this.options,o=I(this,wn),c=I(this,rs),f=I(this,vl),m=t!==a?t.state:I(this,mc),{state:b}=t;let g={...b},x=!1,v;if(n._optimisticResults){const L=this.hasListeners(),J=!L&&jv(t,n),ae=L&&Dv(t,a,n,s);(J||ae)&&(g={...g,...C1(b.data,t.options)}),n._optimisticResults==="isRestoring"&&(g.fetchStatus="idle")}let{error:E,errorUpdatedAt:w,status:k}=g;v=g.data;let _=!1;if(n.placeholderData!==void 0&&v===void 0&&k==="pending"){let L;o!=null&&o.isPlaceholderData&&n.placeholderData===(f==null?void 0:f.placeholderData)?(L=o.data,_=!0):L=typeof n.placeholderData=="function"?n.placeholderData((ee=I(this,Sl))==null?void 0:ee.state.data,I(this,Sl)):n.placeholderData,L!==void 0&&(k="success",v=Wm(o==null?void 0:o.data,L,n),x=!0)}if(n.select&&v!==void 0&&!_)if(o&&v===(c==null?void 0:c.data)&&n.select===I(this,pc))v=I(this,El);else try{ve(this,pc,n.select),v=n.select(v),v=Wm(o==null?void 0:o.data,v,n),ve(this,El,v),ve(this,mr,null)}catch(L){ve(this,mr,L)}I(this,mr)&&(E=I(this,mr),v=I(this,El),w=Date.now(),k="error");const A=g.fetchStatus==="fetching",T=k==="pending",j=k==="error",$=T&&A,M=v!==void 0,H={status:k,fetchStatus:g.fetchStatus,isPending:T,isSuccess:k==="success",isError:j,isInitialLoading:$,isLoading:$,data:v,dataUpdatedAt:g.dataUpdatedAt,error:E,errorUpdatedAt:w,failureCount:g.fetchFailureCount,failureReason:g.fetchFailureReason,errorUpdateCount:g.errorUpdateCount,isFetched:t.isFetched(),isFetchedAfterMount:g.dataUpdateCount>m.dataUpdateCount||g.errorUpdateCount>m.errorUpdateCount,isFetching:A,isRefetching:A&&!T,isLoadingError:j&&!M,isPaused:g.fetchStatus==="paused",isPlaceholderData:x,isRefetchError:j&&M,isStale:$p(t,n),refetch:this.refetch,promise:I(this,Sa),isEnabled:xi(n.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const L=H.data!==void 0,J=H.status==="error"&&!L,ae=te=>{J?te.reject(H.error):L&&te.resolve(H.data)},ge=()=>{const te=ve(this,Sa,H.promise=Xm());ae(te)},fe=I(this,Sa);switch(fe.status){case"pending":t.queryHash===a.queryHash&&ae(fe);break;case"fulfilled":(J||H.data!==fe.value)&&ge();break;case"rejected":(!J||H.error!==fe.reason)&&ge();break}}return H}updateResult(){const t=I(this,wn),n=this.createResult(I(this,tt),this.options);if(ve(this,rs,I(this,tt).state),ve(this,vl,this.options),I(this,rs).data!==void 0&&ve(this,Sl,I(this,tt)),yf(n,t))return;ve(this,wn,n);const a=()=>{if(!t)return!0;const{notifyOnChangeProps:s}=this.options,o=typeof s=="function"?s():s;if(o==="all"||!o&&!I(this,wl).size)return!0;const c=new Set(o??I(this,wl));return this.options.throwOnError&&c.add("error"),Object.keys(I(this,wn)).some(f=>{const h=f;return I(this,wn)[h]!==t[h]&&c.has(h)})};Pe(this,ct,A1).call(this,{listeners:a()})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&Pe(this,ct,np).call(this)}},Un=new WeakMap,tt=new WeakMap,mc=new WeakMap,wn=new WeakMap,rs=new WeakMap,vl=new WeakMap,Sa=new WeakMap,mr=new WeakMap,pc=new WeakMap,El=new WeakMap,Sl=new WeakMap,ss=new WeakMap,ls=new WeakMap,pr=new WeakMap,wl=new WeakMap,ct=new WeakSet,Wo=function(t){Pe(this,ct,rp).call(this);let n=I(this,tt).fetch(this.options,t);return t!=null&&t.throwOnError||(n=n.catch(kn)),n},Jm=function(){Pe(this,ct,ip).call(this);const t=vr(this.options.staleTime,I(this,tt));if(ic.isServer()||I(this,wn).isStale||!Ym(t))return;const a=E1(I(this,wn).dataUpdatedAt,t)+1;ve(this,ss,Wr.setTimeout(()=>{I(this,wn).isStale||this.updateResult()},a))},ep=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(I(this,tt)):this.options.refetchInterval)??!1},tp=function(t){Pe(this,ct,ap).call(this),ve(this,pr,t),!(ic.isServer()||xi(this.options.enabled,I(this,tt))===!1||!Ym(I(this,pr))||I(this,pr)===0)&&ve(this,ls,Wr.setInterval(()=>{(this.options.refetchIntervalInBackground||zp.isFocused())&&Pe(this,ct,Wo).call(this)},I(this,pr)))},np=function(){Pe(this,ct,Jm).call(this),Pe(this,ct,tp).call(this,Pe(this,ct,ep).call(this))},ip=function(){I(this,ss)!==void 0&&(Wr.clearTimeout(I(this,ss)),ve(this,ss,void 0))},ap=function(){I(this,ls)!==void 0&&(Wr.clearInterval(I(this,ls)),ve(this,ls,void 0))},rp=function(){const t=I(this,Un).getQueryCache().build(I(this,Un),this.options);if(t===I(this,tt))return;const n=I(this,tt);ve(this,tt,t),ve(this,mc,t.state),this.hasListeners()&&(n==null||n.removeObserver(this),t.addObserver(this))},A1=function(t){tn.batch(()=>{t.listeners&&this.listeners.forEach(n=>{n(I(this,wn))}),I(this,Un).getQueryCache().notify({query:I(this,tt),type:"observerResultsUpdated"})})},p1);function EN(e,t){return xi(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function jv(e,t){return EN(e,t)||e.state.data!==void 0&&sp(e,t,t.refetchOnMount)}function sp(e,t,n){if(xi(t.enabled,e)!==!1&&vr(t.staleTime,e)!=="static"){const a=typeof n=="function"?n(e):n;return a==="always"||a!==!1&&$p(e,t)}return!1}function Dv(e,t,n,a){return(e!==t||xi(a.enabled,e)===!1)&&(!n.suspense||e.state.status!=="error")&&$p(e,n)}function $p(e,t){return xi(t.enabled,e)!==!1&&e.isStaleByTime(vr(t.staleTime,e))}function SN(e,t){return!yf(e.getCurrentResult(),t)}function Lv(e){return{onFetch:(t,n)=>{var b,g,x,v,E;const a=t.options,s=(x=(g=(b=t.fetchOptions)==null?void 0:b.meta)==null?void 0:g.fetchMore)==null?void 0:x.direction,o=((v=t.state.data)==null?void 0:v.pages)||[],c=((E=t.state.data)==null?void 0:E.pageParams)||[];let f={pages:[],pageParams:[]},h=0;const m=async()=>{let w=!1;const k=T=>{mN(T,()=>t.signal,()=>w=!0)},_=w1(t.options,t.fetchOptions),A=async(T,j,$)=>{if(w)return Promise.reject();if(j==null&&T.pages.length)return Promise.resolve(T);const F=(()=>{const J={client:t.client,queryKey:t.queryKey,pageParam:j,direction:$?"backward":"forward",meta:t.options.meta};return k(J),J})(),H=await _(F),{maxPages:ee}=t.options,L=$?hN:dN;return{pages:L(T.pages,H,ee),pageParams:L(T.pageParams,j,ee)}};if(s&&o.length){const T=s==="backward",j=T?wN:zv,$={pages:o,pageParams:c},M=j(a,$);f=await A($,M,T)}else{const T=e??o.length;do{const j=h===0?c[0]??a.initialPageParam:zv(a,f);if(h>0&&j==null)break;f=await A(f,j),h++}while(h<T)}return f};t.options.persister?t.fetchFn=()=>{var w,k;return(k=(w=t.options).persister)==null?void 0:k.call(w,m,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=m}}}function 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 wN(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 gc,Yi,pn,os,Vi,cr,g1,_N=(g1=class extends N1{constructor(t){super();Ae(this,Vi);Ae(this,gc);Ae(this,Yi);Ae(this,pn);Ae(this,os);ve(this,gc,t.client),this.mutationId=t.mutationId,ve(this,pn,t.mutationCache),ve(this,Yi,[]),this.state=t.state||O1(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){I(this,Yi).includes(t)||(I(this,Yi).push(t),this.clearGcTimeout(),I(this,pn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ve(this,Yi,I(this,Yi).filter(n=>n!==t)),this.scheduleGc(),I(this,pn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){I(this,Yi).length||(this.state.status==="pending"?this.scheduleGc():I(this,pn).remove(this))}continue(){var t;return((t=I(this,os))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var c,f,h,m,b,g,x,v,E,w,k,_,A,T,j,$,M,F;const n=()=>{Pe(this,Vi,cr).call(this,{type:"continue"})},a={client:I(this,gc),meta:this.options.meta,mutationKey:this.options.mutationKey};ve(this,os,k1({fn:()=>this.options.mutationFn?this.options.mutationFn(t,a):Promise.reject(new Error("No mutationFn found")),onFail:(H,ee)=>{Pe(this,Vi,cr).call(this,{type:"failed",failureCount:H,error:ee})},onPause:()=>{Pe(this,Vi,cr).call(this,{type:"pause"})},onContinue:n,retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>I(this,pn).canRun(this)}));const s=this.state.status==="pending",o=!I(this,os).canStart();try{if(s)n();else{Pe(this,Vi,cr).call(this,{type:"pending",variables:t,isPaused:o}),I(this,pn).config.onMutate&&await I(this,pn).config.onMutate(t,this,a);const ee=await((f=(c=this.options).onMutate)==null?void 0:f.call(c,t,a));ee!==this.state.context&&Pe(this,Vi,cr).call(this,{type:"pending",context:ee,variables:t,isPaused:o})}const H=await I(this,os).start();return await((m=(h=I(this,pn).config).onSuccess)==null?void 0:m.call(h,H,t,this.state.context,this,a)),await((g=(b=this.options).onSuccess)==null?void 0:g.call(b,H,t,this.state.context,a)),await((v=(x=I(this,pn).config).onSettled)==null?void 0:v.call(x,H,null,this.state.variables,this.state.context,this,a)),await((w=(E=this.options).onSettled)==null?void 0:w.call(E,H,null,t,this.state.context,a)),Pe(this,Vi,cr).call(this,{type:"success",data:H}),H}catch(H){try{await((_=(k=I(this,pn).config).onError)==null?void 0:_.call(k,H,t,this.state.context,this,a))}catch(ee){Promise.reject(ee)}try{await((T=(A=this.options).onError)==null?void 0:T.call(A,H,t,this.state.context,a))}catch(ee){Promise.reject(ee)}try{await(($=(j=I(this,pn).config).onSettled)==null?void 0:$.call(j,void 0,H,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,H,t,this.state.context,a))}catch(ee){Promise.reject(ee)}throw Pe(this,Vi,cr).call(this,{type:"error",error:H}),H}finally{I(this,pn).runNext(this)}}},gc=new WeakMap,Yi=new WeakMap,pn=new WeakMap,os=new WeakMap,Vi=new WeakSet,cr=function(t){const n=a=>{switch(t.type){case"failed":return{...a,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...a,isPaused:!0};case"continue":return{...a,isPaused:!1};case"pending":return{...a,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...a,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...a,data:void 0,error:t.error,failureCount:a.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),tn.batch(()=>{I(this,Yi).forEach(a=>{a.onMutationUpdate(t)}),I(this,pn).notify({mutation:this,type:"updated",action:t})})},g1);function O1(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}var wa,Mi,bc,b1,kN=(b1=class extends Ml{constructor(t={}){super();Ae(this,wa);Ae(this,Mi);Ae(this,bc);this.config=t,ve(this,wa,new Set),ve(this,Mi,new Map),ve(this,bc,0)}build(t,n,a){const s=new _N({client:t,mutationCache:this,mutationId:++Ku(this,bc)._,options:t.defaultMutationOptions(n),state:a});return this.add(s),s}add(t){I(this,wa).add(t);const n=Gu(t);if(typeof n=="string"){const a=I(this,Mi).get(n);a?a.push(t):I(this,Mi).set(n,[t])}this.notify({type:"added",mutation:t})}remove(t){if(I(this,wa).delete(t)){const n=Gu(t);if(typeof n=="string"){const a=I(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&&I(this,Mi).delete(n)}}this.notify({type:"removed",mutation:t})}canRun(t){const n=Gu(t);if(typeof n=="string"){const a=I(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=Gu(t);if(typeof n=="string"){const s=(a=I(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(){tn.batch(()=>{I(this,wa).forEach(t=>{this.notify({type:"removed",mutation:t})}),I(this,wa).clear(),I(this,Mi).clear()})}getAll(){return Array.from(I(this,wa))}find(t){const n={exact:!0,...t};return this.getAll().find(a=>Cv(n,a))}findAll(t={}){return this.getAll().filter(n=>Cv(t,n))}notify(t){tn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}resumePausedMutations(){const t=this.getAll().filter(n=>n.state.isPaused);return tn.batch(()=>Promise.all(t.map(n=>n.continue().catch(kn))))}},wa=new WeakMap,Mi=new WeakMap,bc=new WeakMap,b1);function Gu(e){var t;return(t=e.options.scope)==null?void 0:t.id}var _a,gr,$n,ka,Ca,uf,lp,y1,NN=(y1=class extends Ml{constructor(n,a){super();Ae(this,Ca);Ae(this,_a);Ae(this,gr);Ae(this,$n);Ae(this,ka);ve(this,_a,n),this.setOptions(a),this.bindMethods(),Pe(this,Ca,uf).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const a=this.options;this.options=I(this,_a).defaultMutationOptions(n),yf(this.options,a)||I(this,_a).getMutationCache().notify({type:"observerOptionsUpdated",mutation:I(this,$n),observer:this}),a!=null&&a.mutationKey&&this.options.mutationKey&&cs(a.mutationKey)!==cs(this.options.mutationKey)?this.reset():((s=I(this,$n))==null?void 0:s.state.status)==="pending"&&I(this,$n).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=I(this,$n))==null||n.removeObserver(this)}onMutationUpdate(n){Pe(this,Ca,uf).call(this),Pe(this,Ca,lp).call(this,n)}getCurrentResult(){return I(this,gr)}reset(){var n;(n=I(this,$n))==null||n.removeObserver(this),ve(this,$n,void 0),Pe(this,Ca,uf).call(this),Pe(this,Ca,lp).call(this)}mutate(n,a){var s;return ve(this,ka,a),(s=I(this,$n))==null||s.removeObserver(this),ve(this,$n,I(this,_a).getMutationCache().build(I(this,_a),this.options)),I(this,$n).addObserver(this),I(this,$n).execute(n)}},_a=new WeakMap,gr=new WeakMap,$n=new WeakMap,ka=new WeakMap,Ca=new WeakSet,uf=function(){var a;const n=((a=I(this,$n))==null?void 0:a.state)??O1();ve(this,gr,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},lp=function(n){tn.batch(()=>{var a,s,o,c,f,h,m,b;if(I(this,ka)&&this.hasListeners()){const g=I(this,gr).variables,x=I(this,gr).context,v={client:I(this,_a),meta:this.options.meta,mutationKey:this.options.mutationKey};if((n==null?void 0:n.type)==="success"){try{(s=(a=I(this,ka)).onSuccess)==null||s.call(a,n.data,g,x,v)}catch(E){Promise.reject(E)}try{(c=(o=I(this,ka)).onSettled)==null||c.call(o,n.data,null,g,x,v)}catch(E){Promise.reject(E)}}else if((n==null?void 0:n.type)==="error"){try{(h=(f=I(this,ka)).onError)==null||h.call(f,n.error,g,x,v)}catch(E){Promise.reject(E)}try{(b=(m=I(this,ka)).onSettled)==null||b.call(m,void 0,n.error,g,x,v)}catch(E){Promise.reject(E)}}}this.listeners.forEach(g=>{g(I(this,gr))})})},y1),Wi,x1,TN=(x1=class extends Ml{constructor(t={}){super();Ae(this,Wi);this.config=t,ve(this,Wi,new Map)}build(t,n,a){const s=n.queryKey,o=n.queryHash??Ip(s,n);let c=this.get(o);return c||(c=new xN({client:t,queryKey:s,queryHash:o,options:t.defaultQueryOptions(n),state:a,defaultOptions:t.getQueryDefaults(s)}),this.add(c)),c}add(t){I(this,Wi).has(t.queryHash)||(I(this,Wi).set(t.queryHash,t),this.notify({type:"added",query:t}))}remove(t){const n=I(this,Wi).get(t.queryHash);n&&(t.destroy(),n===t&&I(this,Wi).delete(t.queryHash),this.notify({type:"removed",query:t}))}clear(){tn.batch(()=>{this.getAll().forEach(t=>{this.remove(t)})})}get(t){return I(this,Wi).get(t)}getAll(){return[...I(this,Wi).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){tn.batch(()=>{this.listeners.forEach(n=>{n(t)})})}onFocus(){tn.batch(()=>{this.getAll().forEach(t=>{t.onFocus()})})}onOnline(){tn.batch(()=>{this.getAll().forEach(t=>{t.onOnline()})})}},Wi=new WeakMap,x1),$t,br,yr,_l,kl,xr,Nl,Tl,v1,CN=(v1=class{constructor(e={}){Ae(this,$t);Ae(this,br);Ae(this,yr);Ae(this,_l);Ae(this,kl);Ae(this,xr);Ae(this,Nl);Ae(this,Tl);ve(this,$t,e.queryCache||new TN),ve(this,br,e.mutationCache||new kN),ve(this,yr,e.defaultOptions||{}),ve(this,_l,new Map),ve(this,kl,new Map),ve(this,xr,0)}mount(){Ku(this,xr)._++,I(this,xr)===1&&(ve(this,Nl,zp.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,$t).onFocus())})),ve(this,Tl,xf.subscribe(async e=>{e&&(await this.resumePausedMutations(),I(this,$t).onOnline())})))}unmount(){var e,t;Ku(this,xr)._--,I(this,xr)===0&&((e=I(this,Nl))==null||e.call(this),ve(this,Nl,void 0),(t=I(this,Tl))==null||t.call(this),ve(this,Tl,void 0))}isFetching(e){return I(this,$t).findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return I(this,br).findAll({...e,status:"pending"}).length}getQueryData(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,$t).get(t.queryHash))==null?void 0:n.state.data}ensureQueryData(e){const t=this.defaultQueryOptions(e),n=I(this,$t).build(this,t),a=n.state.data;return a===void 0?this.fetchQuery(e):(e.revalidateIfStale&&n.isStaleByTime(vr(t.staleTime,n))&&this.prefetchQuery(t),Promise.resolve(a))}getQueriesData(e){return I(this,$t).findAll(e).map(({queryKey:t,state:n})=>{const a=n.data;return[t,a]})}setQueryData(e,t,n){const a=this.defaultQueryOptions({queryKey:e}),s=I(this,$t).get(a.queryHash),o=s==null?void 0:s.state.data,c=cN(t,o);if(c!==void 0)return I(this,$t).build(this,a).setData(c,{...n,manual:!0})}setQueriesData(e,t,n){return tn.batch(()=>I(this,$t).findAll(e).map(({queryKey:a})=>[a,this.setQueryData(a,t,n)]))}getQueryState(e){var n;const t=this.defaultQueryOptions({queryKey:e});return(n=I(this,$t).get(t.queryHash))==null?void 0:n.state}removeQueries(e){const t=I(this,$t);tn.batch(()=>{t.findAll(e).forEach(n=>{t.remove(n)})})}resetQueries(e,t){const n=I(this,$t);return tn.batch(()=>(n.findAll(e).forEach(a=>{a.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){const n={revert:!0,...t},a=tn.batch(()=>I(this,$t).findAll(e).map(s=>s.cancel(n)));return Promise.all(a).then(kn).catch(kn)}invalidateQueries(e,t={}){return tn.batch(()=>(I(this,$t).findAll(e).forEach(n=>{n.invalidate()}),(e==null?void 0:e.refetchType)==="none"?Promise.resolve():this.refetchQueries({...e,type:(e==null?void 0:e.refetchType)??(e==null?void 0:e.type)??"active"},t)))}refetchQueries(e,t={}){const n={...t,cancelRefetch:t.cancelRefetch??!0},a=tn.batch(()=>I(this,$t).findAll(e).filter(s=>!s.isDisabled()&&!s.isStatic()).map(s=>{let o=s.fetch(void 0,n);return n.throwOnError||(o=o.catch(kn)),s.state.fetchStatus==="paused"?Promise.resolve():o}));return Promise.all(a).then(kn)}fetchQuery(e){const t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);const n=I(this,$t).build(this,t);return n.isStaleByTime(vr(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(kn).catch(kn)}fetchInfiniteQuery(e){return e.behavior=Lv(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(kn).catch(kn)}ensureInfiniteQueryData(e){return e.behavior=Lv(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return xf.isOnline()?I(this,br).resumePausedMutations():Promise.resolve()}getQueryCache(){return I(this,$t)}getMutationCache(){return I(this,br)}getDefaultOptions(){return I(this,yr)}setDefaultOptions(e){ve(this,yr,e)}setQueryDefaults(e,t){I(this,_l).set(cs(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){const t=[...I(this,_l).values()],n={};return t.forEach(a=>{nc(e,a.queryKey)&&Object.assign(n,a.defaultOptions)}),n}setMutationDefaults(e,t){I(this,kl).set(cs(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){const t=[...I(this,kl).values()],n={};return t.forEach(a=>{nc(e,a.mutationKey)&&Object.assign(n,a.defaultOptions)}),n}defaultQueryOptions(e){if(e._defaulted)return e;const t={...I(this,yr).queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=Ip(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===Bp&&(t.enabled=!1),t}defaultMutationOptions(e){return e!=null&&e._defaulted?e:{...I(this,yr).mutations,...(e==null?void 0:e.mutationKey)&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){I(this,$t).clear(),I(this,br).clear()}},$t=new WeakMap,br=new WeakMap,yr=new WeakMap,_l=new WeakMap,kl=new WeakMap,xr=new WeakMap,Nl=new WeakMap,Tl=new WeakMap,v1),R1=O.createContext(void 0),qn=e=>{const t=O.useContext(R1);if(!t)throw new Error("No QueryClient set, use QueryClientProvider to set one");return t},AN=({client:e,children:t})=>(O.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),d.jsx(R1.Provider,{value:e,children:t})),M1=O.createContext(!1),ON=()=>O.useContext(M1);M1.Provider;function RN(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var MN=O.createContext(RN()),jN=()=>O.useContext(MN),DN=(e,t,n)=>{const a=n!=null&&n.state.error&&typeof e.throwOnError=="function"?Up(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||a)&&(t.isReset()||(e.retryOnMount=!1))},LN=e=>{O.useEffect(()=>{e.clearReset()},[e])},zN=({result:e,errorResetBoundary:t,throwOnError:n,query:a,suspense:s})=>e.isError&&!t.isReset()&&!e.isFetching&&a&&(s&&e.data===void 0||Up(n,[e.error,a])),IN=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))}},BN=(e,t)=>e.isLoading&&e.isFetching&&!t,UN=(e,t)=>(e==null?void 0:e.suspense)&&t.isPending,Iv=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function $N(e,t,n){var x,v,E,w;const a=ON(),s=jN(),o=qn(),c=o.defaultQueryOptions(e);(v=(x=o.getDefaultOptions().queries)==null?void 0:x._experimental_beforeQuery)==null||v.call(x,c);const f=o.getQueryCache().get(c.queryHash);c._optimisticResults=a?"isRestoring":"optimistic",IN(c),DN(c,s,f),LN(s);const h=!o.getQueryCache().get(c.queryHash),[m]=O.useState(()=>new t(o,c)),b=m.getOptimisticResult(c),g=!a&&e.subscribed!==!1;if(O.useSyncExternalStore(O.useCallback(k=>{const _=g?m.subscribe(tn.batchCalls(k)):kn;return m.updateResult(),_},[m,g]),()=>m.getCurrentResult(),()=>m.getCurrentResult()),O.useEffect(()=>{m.setOptions(c)},[c,m]),UN(c,b))throw Iv(c,m,s);if(zN({result:b,errorResetBoundary:s,throwOnError:c.throwOnError,query:f,suspense:c.suspense}))throw b.error;if((w=(E=o.getDefaultOptions().queries)==null?void 0:E._experimental_afterQuery)==null||w.call(E,c,b),c.experimental_prefetchInRender&&!ic.isServer()&&BN(b,a)){const k=h?Iv(c,m,s):f==null?void 0:f.promise;k==null||k.catch(kn).finally(()=>{m.updateResult()})}return c.notifyOnChangeProps?b:m.trackResult(b)}function ot(e,t){return $N(e,vN)}function Pn(e,t){const n=qn(),[a]=O.useState(()=>new NN(n,e));O.useEffect(()=>{a.setOptions(e)},[a,e]);const s=O.useSyncExternalStore(O.useCallback(c=>a.subscribe(tn.batchCalls(c)),[a]),()=>a.getCurrentResult(),()=>a.getCurrentResult()),o=O.useCallback((c,f)=>{a.mutate(c,f).catch(kn)},[a]);if(s.error&&Up(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 Bv="popstate";function Uv(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function FN(e={}){function t(a,s){var m;let o=(m=s.state)==null?void 0:m.masked,{pathname:c,search:f,hash:h}=o||a.location;return op("",{pathname:c,search:f,hash:h},s.state&&s.state.usr||null,s.state&&s.state.key||"default",o?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function n(a,s){return typeof s=="string"?s:ac(s)}return 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 PN(){return Math.random().toString(36).substring(2,10)}function $v(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 op(e,t,n=null,a,s){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?jl(t):t,state:n,key:t&&t.key||a||PN(),unstable_mask:s}}function ac({pathname:e="/",search:t="",hash:n=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),n&&n!=="#"&&(e+=n.charAt(0)==="#"?n:"#"+n),e}function jl(e){let t={};if(e){let n=e.indexOf("#");n>=0&&(t.hash=e.substring(n),e=e.substring(0,n));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function qN(e,t,n,a={}){let{window:s=document.defaultView,v5Compat:o=!1}=a,c=s.history,f="POP",h=null,m=b();m==null&&(m=0,c.replaceState({...c.state,idx:m},""));function b(){return(c.state||{idx:null}).idx}function g(){f="POP";let k=b(),_=k==null?null:k-m;m=k,h&&h({action:f,location:w.location,delta:_})}function x(k,_){f="PUSH";let A=Uv(k)?k:op(w.location,k,_);m=b()+1;let T=$v(A,m),j=w.createHref(A.unstable_mask||A);try{c.pushState(T,"",j)}catch($){if($ instanceof DOMException&&$.name==="DataCloneError")throw $;s.location.assign(j)}o&&h&&h({action:f,location:w.location,delta:1})}function v(k,_){f="REPLACE";let A=Uv(k)?k:op(w.location,k,_);m=b();let T=$v(A,m),j=w.createHref(A.unstable_mask||A);c.replaceState(T,"",j),o&&h&&h({action:f,location:w.location,delta:0})}function E(k){return HN(k)}let w={get action(){return f},get location(){return e(s,c)},listen(k){if(h)throw new Error("A history only accepts one active listener");return s.addEventListener(Bv,g),h=k,()=>{s.removeEventListener(Bv,g),h=null}},createHref(k){return t(s,k)},createURL:E,encodeLocation(k){let _=E(k);return{pathname:_.pathname,search:_.search,hash:_.hash}},push:x,replace:v,go(k){return c.go(k)}};return w}function HN(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:ac(e);return a=a.replace(/ $/,"%20"),!t&&a.startsWith("//")&&(a=n+a),new URL(a,n)}function j1(e,t,n="/"){return KN(e,t,n,!1)}function KN(e,t,n,a){let s=typeof t=="string"?jl(t):t,o=Aa(s.pathname||"/",n);if(o==null)return null;let c=D1(e);GN(c);let f=null;for(let h=0;f==null&&h<c.length;++h){let m=i2(o);f=t2(c[h],m,a)}return f}function D1(e,t=[],n=[],a="",s=!1){let o=(c,f,h=s,m)=>{let b={relativePath:m===void 0?c.path||"":m,caseSensitive:c.caseSensitive===!0,childrenIndex:f,route:c};if(b.relativePath.startsWith("/")){if(!b.relativePath.startsWith(a)&&h)return;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=ji([a,b.relativePath]),x=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}".`),D1(c.children,t,x,g,h)),!(c.path==null&&!c.index)&&t.push({path:g,score:JN(g,c.index),routesMeta:x})};return e.forEach((c,f)=>{var h;if(c.path===""||!((h=c.path)!=null&&h.includes("?")))o(c,f);else for(let m of L1(c.path))o(c,f,!0,m)}),t}function L1(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=L1(a.join("/")),f=[];return f.push(...c.map(h=>h===""?o:[o,h].join("/"))),s&&f.push(...c),f.map(h=>e.startsWith("/")&&h===""?"/":h)}function GN(e){e.sort((t,n)=>t.score!==n.score?n.score-t.score:e2(t.routesMeta.map(a=>a.childrenIndex),n.routesMeta.map(a=>a.childrenIndex)))}var QN=/^:[\w-]+$/,YN=3,VN=2,WN=1,XN=10,ZN=-2,Fv=e=>e==="*";function JN(e,t){let n=e.split("/"),a=n.length;return n.some(Fv)&&(a+=ZN),t&&(a+=VN),n.filter(s=>!Fv(s)).reduce((s,o)=>s+(QN.test(o)?YN:o===""?WN:XN),a)}function e2(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 t2(e,t,n=!1){let{routesMeta:a}=e,s={},o="/",c=[];for(let f=0;f<a.length;++f){let h=a[f],m=f===a.length-1,b=o==="/"?t:t.slice(o.length)||"/",g=vf({path:h.relativePath,caseSensitive:h.caseSensitive,end:m},b),x=h.route;if(!g&&m&&n&&!a[a.length-1].route.index&&(g=vf({path:h.relativePath,caseSensitive:h.caseSensitive,end:!1},b)),!g)return null;Object.assign(s,g.params),c.push({params:s,pathname:ji([o,g.pathname]),pathnameBase:l2(ji([o,g.pathnameBase])),route:x}),g.pathnameBase!=="/"&&(o=ji([o,g.pathnameBase]))}return c}function vf(e,t){typeof e=="string"&&(e={path:e,caseSensitive:!1,end:!0});let[n,a]=n2(e.path,e.caseSensitive,e.end),s=t.match(n);if(!s)return null;let o=s[0],c=o.replace(/(.)\/+$/,"$1"),f=s.slice(1);return{params:a.reduce((m,{paramName:b,isOptional:g},x)=>{if(b==="*"){let E=f[x]||"";c=o.slice(0,o.length-E.length).replace(/(.)\/+$/,"$1")}const v=f[x];return g&&!v?m[b]=void 0:m[b]=(v||"").replace(/%2F/g,"/"),m},{}),pathname:o,pathnameBase:c,pattern:e}}function n2(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,f,h,m,b)=>{if(a.push({paramName:f,isOptional:h!=null}),h){let g=b.charAt(m+c.length);return g&&g!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),s+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):n?s+="\\/*$":e!==""&&e!=="/"&&(s+="(?:(?=\\/|$))"),[new RegExp(s,t?void 0:"i"),a]}function i2(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 Aa(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let n=t.endsWith("/")?t.length-1:t.length,a=e.charAt(n);return a&&a!=="/"?null:e.slice(n)||"/"}var a2=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i;function r2(e,t="/"){let{pathname:n,search:a="",hash:s=""}=typeof e=="string"?jl(e):e,o;return n?(n=z1(n),n.startsWith("/")?o=Pv(n.substring(1),"/"):o=Pv(n,t)):o=t,{pathname:o,search:o2(a),hash:c2(s)}}function Pv(e,t){let n=Ef(t).split("/");return e.split("/").forEach(s=>{s===".."?n.length>1&&n.pop():s!=="."&&n.push(s)}),n.length>1?n.join("/"):"/"}function hm(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 s2(e){return e.filter((t,n)=>n===0||t.route.path&&t.route.path.length>0)}function Fp(e){let t=s2(e);return t.map((n,a)=>a===t.length-1?n.pathname:n.pathnameBase)}function Df(e,t,n,a=!1){let s;typeof e=="string"?s=jl(e):(s={...e},Ot(!s.pathname||!s.pathname.includes("?"),hm("?","pathname","search",s)),Ot(!s.pathname||!s.pathname.includes("#"),hm("#","pathname","hash",s)),Ot(!s.search||!s.search.includes("#"),hm("#","search","hash",s)));let o=e===""||s.pathname==="",c=o?"/":s.pathname,f;if(c==null)f=n;else{let g=t.length-1;if(!a&&c.startsWith("..")){let x=c.split("/");for(;x[0]==="..";)x.shift(),g-=1;s.pathname=x.join("/")}f=g>=0?t[g]:"/"}let h=r2(s,f),m=c&&c!=="/"&&c.endsWith("/"),b=(o||c===".")&&n.endsWith("/");return!h.pathname.endsWith("/")&&(m||b)&&(h.pathname+="/"),h}var z1=e=>e.replace(/\/\/+/g,"/"),ji=e=>z1(e.join("/")),Ef=e=>e.replace(/\/+$/,""),l2=e=>Ef(e).replace(/^\/*/,"/"),o2=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,c2=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,u2=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 f2(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function d2(e){let t=e.map(n=>n.route.path).filter(Boolean);return ji(t)||"/"}var I1=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function B1(e,t){let n=e;if(typeof n!="string"||!a2.test(n))return{absoluteURL:void 0,isExternal:!1,to:n};let a=n,s=!1;if(I1)try{let o=new URL(window.location.href),c=n.startsWith("//")?new URL(o.protocol+n):new URL(n),f=Aa(c.pathname,t);c.origin===o.origin&&f!=null?n=f+c.search+c.hash:s=!0}catch{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 U1=["POST","PUT","PATCH","DELETE"];new Set(U1);var h2=["GET",...U1];new Set(h2);var Dl=O.createContext(null);Dl.displayName="DataRouter";var Lf=O.createContext(null);Lf.displayName="DataRouterState";var $1=O.createContext(!1);function m2(){return O.useContext($1)}var F1=O.createContext({isTransitioning:!1});F1.displayName="ViewTransition";var p2=O.createContext(new Map);p2.displayName="Fetchers";var g2=O.createContext(null);g2.displayName="Await";var si=O.createContext(null);si.displayName="Navigation";var yc=O.createContext(null);yc.displayName="Location";var ki=O.createContext({outlet:null,matches:[],isDataRoute:!1});ki.displayName="Route";var Pp=O.createContext(null);Pp.displayName="RouteError";var P1="REACT_ROUTER_ERROR",b2="REDIRECT",y2="ROUTE_ERROR_RESPONSE";function x2(e){if(e.startsWith(`${P1}:${b2}:{`))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 v2(e){if(e.startsWith(`${P1}:${y2}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new u2(t.status,t.statusText,t.data)}catch{}}function E2(e,{relative:t}={}){Ot(Ll(),"useHref() may be used only in the context of a <Router> component.");let{basename:n,navigator:a}=O.useContext(si),{hash:s,pathname:o,search:c}=xc(e,{relative:t}),f=o;return n!=="/"&&(f=o==="/"?n:ji([n,o])),a.createHref({pathname:f,search:c,hash:s})}function Ll(){return O.useContext(yc)!=null}function Li(){return Ot(Ll(),"useLocation() may be used only in the context of a <Router> component."),O.useContext(yc).location}var q1="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function H1(e){O.useContext(si).static||O.useLayoutEffect(e)}function wr(){let{isDataRoute:e}=O.useContext(ki);return e?z2():S2()}function S2(){Ot(Ll(),"useNavigate() may be used only in the context of a <Router> component.");let e=O.useContext(Dl),{basename:t,navigator:n}=O.useContext(si),{matches:a}=O.useContext(ki),{pathname:s}=Li(),o=JSON.stringify(Fp(a)),c=O.useRef(!1);return H1(()=>{c.current=!0}),O.useCallback((h,m={})=>{if(Si(c.current,q1),!c.current)return;if(typeof h=="number"){n.go(h);return}let b=Df(h,JSON.parse(o),s,m.relative==="path");e==null&&t!=="/"&&(b.pathname=b.pathname==="/"?t:ji([t,b.pathname])),(m.replace?n.replace:n.push)(b,m.state,m)},[t,n,o,s,e])}var w2=O.createContext(null);function _2(e){let t=O.useContext(ki).outlet;return O.useMemo(()=>t&&O.createElement(w2.Provider,{value:e},t),[t,e])}function K1(){let{matches:e}=O.useContext(ki),t=e[e.length-1];return(t==null?void 0:t.params)??{}}function xc(e,{relative:t}={}){let{matches:n}=O.useContext(ki),{pathname:a}=Li(),s=JSON.stringify(Fp(n));return O.useMemo(()=>Df(e,JSON.parse(s),a,t==="path"),[e,s,a,t])}function k2(e,t){return G1(e,t)}function G1(e,t,n){var k;Ot(Ll(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:a}=O.useContext(si),{matches:s}=O.useContext(ki),o=s[s.length-1],c=o?o.params:{},f=o?o.pathname:"/",h=o?o.pathnameBase:"/",m=o&&o.route;{let _=m&&m.path||"";Y1(f,!m||_.endsWith("*")||_.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${f}" (under <Route path="${_}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
|
|
59
|
-
|
|
60
|
-
Please change the parent <Route path="${_}"> to <Route path="${_==="/"?"*":`${_}/*`}">.`)}let b=Li(),g;if(t){let _=typeof t=="string"?jl(t):t;Ot(h==="/"||((k=_.pathname)==null?void 0:k.startsWith(h)),`When overriding the location using \`<Routes location>\` or \`useRoutes(routes, location)\`, the location pathname must begin with the portion of the URL pathname that was matched by all parent routes. The current pathname base is "${h}" but pathname "${_.pathname}" was given in the \`location\` prop.`),g=_}else g=b;let x=g.pathname||"/",v=x;if(h!=="/"){let _=h.replace(/^\//,"").split("/");v="/"+x.replace(/^\//,"").split("/").slice(_.length).join("/")}let E=j1(e,{pathname:v});Si(m||E!=null,`No routes matched location "${g.pathname}${g.search}${g.hash}" `),Si(E==null||E[E.length-1].route.element!==void 0||E[E.length-1].route.Component!==void 0||E[E.length-1].route.lazy!==void 0,`Matched leaf route at location "${g.pathname}${g.search}${g.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`);let w=O2(E&&E.map(_=>Object.assign({},_,{params:Object.assign({},c,_.params),pathname:ji([h,a.encodeLocation?a.encodeLocation(_.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathname]),pathnameBase:_.pathnameBase==="/"?h:ji([h,a.encodeLocation?a.encodeLocation(_.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:_.pathnameBase])})),s,n);return t&&w?O.createElement(yc.Provider,{value:{location:{pathname:"/",search:"",hash:"",state:null,key:"default",unstable_mask:void 0,...g},navigationType:"POP"}},w):w}function N2(){let e=L2(),t=f2(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),n=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",s={padding:"0.5rem",backgroundColor:a},o={padding:"2px 4px",backgroundColor:a},c=null;return console.error("Error handled by React Router default ErrorBoundary:",e),c=O.createElement(O.Fragment,null,O.createElement("p",null,"💿 Hey developer 👋"),O.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",O.createElement("code",{style:o},"ErrorBoundary")," or"," ",O.createElement("code",{style:o},"errorElement")," prop on your route.")),O.createElement(O.Fragment,null,O.createElement("h2",null,"Unexpected Application Error!"),O.createElement("h3",{style:{fontStyle:"italic"}},t),n?O.createElement("pre",{style:s},n):null,c)}var T2=O.createElement(N2,null),Q1=class extends O.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const n=v2(e.digest);n&&(e=n)}let t=e!==void 0?O.createElement(ki.Provider,{value:this.props.routeContext},O.createElement(Pp.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?O.createElement(C2,{error:e},t):t}};Q1.contextType=$1;var mm=new WeakMap;function C2({children:e,error:t}){let{basename:n}=O.useContext(si);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let a=x2(t.digest);if(a){let s=mm.get(t);if(s)throw s;let o=B1(a.location,n);if(I1&&!mm.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 mm.set(t,c),c}return O.createElement("meta",{httpEquiv:"refresh",content:`0;url=${o.absoluteURL||o.to}`})}}return e}function A2({routeContext:e,match:t,children:n}){let a=O.useContext(Dl);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),O.createElement(ki.Provider,{value:e},n)}function O2(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,f=-1;if(n&&a){c=a.renderFallback;for(let b=0;b<s.length;b++){let g=s[b];if((g.route.HydrateFallback||g.route.hydrateFallbackElement)&&(f=b),g.route.id){let{loaderData:x,errors:v}=a,E=g.route.loader&&!x.hasOwnProperty(g.route.id)&&(!v||v[g.route.id]===void 0);if(g.route.lazy||E){n.isStatic&&(c=!0),f>=0?s=s.slice(0,f+1):s=[s[0]];break}}}}let h=n==null?void 0:n.onError,m=a&&h?(b,g)=>{var x,v;h(b,{location:a.location,params:((v=(x=a.matches)==null?void 0:x[0])==null?void 0:v.params)??{},unstable_pattern:d2(a.matches),errorInfo:g})}:void 0;return s.reduceRight((b,g,x)=>{let v,E=!1,w=null,k=null;a&&(v=o&&g.route.id?o[g.route.id]:void 0,w=g.route.errorElement||T2,c&&(f<0&&x===0?(Y1("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),E=!0,k=null):f===x&&(E=!0,k=g.route.hydrateFallbackElement||null)));let _=t.concat(s.slice(0,x+1)),A=()=>{let T;return v?T=w:E?T=k:g.route.Component?T=O.createElement(g.route.Component,null):g.route.element?T=g.route.element:T=b,O.createElement(A2,{match:g,routeContext:{outlet:b,matches:_,isDataRoute:a!=null},children:T})};return a&&(g.route.ErrorBoundary||g.route.errorElement||x===0)?O.createElement(Q1,{location:a.location,revalidation:a.revalidation,component:w,error:v,children:A(),routeContext:{outlet:null,matches:_,isDataRoute:!0},onError:m}):A()},null)}function qp(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function R2(e){let t=O.useContext(Dl);return Ot(t,qp(e)),t}function M2(e){let t=O.useContext(Lf);return Ot(t,qp(e)),t}function j2(e){let t=O.useContext(ki);return Ot(t,qp(e)),t}function Hp(e){let t=j2(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 D2(){return Hp("useRouteId")}function L2(){var a;let e=O.useContext(Pp),t=M2("useRouteError"),n=Hp("useRouteError");return e!==void 0?e:(a=t.errors)==null?void 0:a[n]}function z2(){let{router:e}=R2("useNavigate"),t=Hp("useNavigate"),n=O.useRef(!1);return H1(()=>{n.current=!0}),O.useCallback(async(s,o={})=>{Si(n.current,q1),n.current&&(typeof s=="number"?await e.navigate(s):await e.navigate(s,{fromRouteId:t,...o}))},[e,t])}var qv={};function Y1(e,t,n){!t&&!qv[e]&&(qv[e]=!0,Si(!1,n))}O.memo(I2);function I2({routes:e,future:t,state:n,isStatic:a,onError:s}){return G1(e,void 0,{state:n,isStatic:a,onError:s})}function B2({to:e,replace:t,state:n,relative:a}){Ot(Ll(),"<Navigate> may be used only in the context of a <Router> component.");let{static:s}=O.useContext(si);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}=O.useContext(ki),{pathname:c}=Li(),f=wr(),h=Df(e,Fp(o),c,a==="path"),m=JSON.stringify(h);return O.useEffect(()=>{f(JSON.parse(m),{replace:t,state:n,relative:a})},[f,m,a,t,n]),null}function U2(e){return _2(e.context)}function In(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 $2({basename:e="/",children:t=null,location:n,navigationType:a="POP",navigator:s,static:o=!1,unstable_useTransitions:c}){Ot(!Ll(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),h=O.useMemo(()=>({basename:f,navigator:s,static:o,unstable_useTransitions:c,future:{}}),[f,s,o,c]);typeof n=="string"&&(n=jl(n));let{pathname:m="/",search:b="",hash:g="",state:x=null,key:v="default",unstable_mask:E}=n,w=O.useMemo(()=>{let k=Aa(m,f);return k==null?null:{location:{pathname:k,search:b,hash:g,state:x,key:v,unstable_mask:E},navigationType:a}},[f,m,b,g,x,v,a,E]);return Si(w!=null,`<Router basename="${f}"> is not able to match the URL "${m}${b}${g}" because it does not start with the basename, so the <Router> won't render anything.`),w==null?null:O.createElement(si.Provider,{value:h},O.createElement(yc.Provider,{children:t,value:w}))}function F2({children:e,location:t}){return k2(cp(e),t)}function cp(e,t=[]){let n=[];return O.Children.forEach(e,(a,s)=>{if(!O.isValidElement(a))return;let o=[...t,s];if(a.type===O.Fragment){n.push.apply(n,cp(a.props.children,o));return}Ot(a.type===In,`[${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=cp(a.props.children,o)),n.push(c)}),n}var ff="get",df="application/x-www-form-urlencoded";function zf(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function P2(e){return zf(e)&&e.tagName.toLowerCase()==="button"}function q2(e){return zf(e)&&e.tagName.toLowerCase()==="form"}function H2(e){return zf(e)&&e.tagName.toLowerCase()==="input"}function K2(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function G2(e,t){return e.button===0&&(!t||t==="_self")&&!K2(e)}function up(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 Q2(e,t){let n=up(e);return t&&t.forEach((a,s)=>{n.has(s)||t.getAll(s).forEach(o=>{n.append(s,o)})}),n}var Qu=null;function Y2(){if(Qu===null)try{new FormData(document.createElement("form"),0),Qu=!1}catch{Qu=!0}return Qu}var V2=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function pm(e){return e!=null&&!V2.has(e)?(Si(!1,`"${e}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${df}"`),null):e}function W2(e,t){let n,a,s,o,c;if(q2(e)){let f=e.getAttribute("action");a=f?Aa(f,t):null,n=e.getAttribute("method")||ff,s=pm(e.getAttribute("enctype"))||df,o=new FormData(e)}else if(P2(e)||H2(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let h=e.getAttribute("formaction")||f.getAttribute("action");if(a=h?Aa(h,t):null,n=e.getAttribute("formmethod")||f.getAttribute("method")||ff,s=pm(e.getAttribute("formenctype"))||pm(f.getAttribute("enctype"))||df,o=new FormData(f,e),!Y2()){let{name:m,type:b,value:g}=e;if(b==="image"){let x=m?`${m}.`:"";o.append(`${x}x`,"0"),o.append(`${x}y`,"0")}else m&&o.append(m,g)}}else{if(zf(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=ff,a=null,s=df,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 Kp(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function V1(e,t,n,a){let s=typeof e=="string"?new URL(e,typeof window>"u"?"server://singlefetch/":window.location.origin):e;return n?s.pathname.endsWith("/")?s.pathname=`${s.pathname}_.${a}`:s.pathname=`${s.pathname}.${a}`:s.pathname==="/"?s.pathname=`_root.${a}`:t&&Aa(s.pathname,t)==="/"?s.pathname=`${Ef(t)}/_root.${a}`:s.pathname=`${Ef(s.pathname)}.${a}`,s}async function X2(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 Z2(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 J2(e,t,n){let a=await Promise.all(e.map(async s=>{let o=t.routes[s.route.id];if(o){let c=await X2(o,n);return c.links?c.links():[]}return[]}));return iT(a.flat(1).filter(Z2).filter(s=>s.rel==="stylesheet"||s.rel==="preload").map(s=>s.rel==="stylesheet"?{...s,rel:"prefetch",as:"style"}:{...s,rel:"prefetch"}))}function Hv(e,t,n,a,s,o){let c=(h,m)=>n[m]?h.route.id!==n[m].route.id:!0,f=(h,m)=>{var b;return n[m].pathname!==h.pathname||((b=n[m].route.path)==null?void 0:b.endsWith("*"))&&n[m].params["*"]!==h.params["*"]};return o==="assets"?t.filter((h,m)=>c(h,m)||f(h,m)):o==="data"?t.filter((h,m)=>{var g;let b=a.routes[h.route.id];if(!b||!b.hasLoader)return!1;if(c(h,m)||f(h,m))return!0;if(h.route.shouldRevalidate){let x=h.route.shouldRevalidate({currentUrl:new URL(s.pathname+s.search+s.hash,window.origin),currentParams:((g=n[0])==null?void 0:g.params)||{},nextUrl:new URL(e,window.origin),nextParams:h.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function eT(e,t,{includeHydrateFallback:n}={}){return tT(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 tT(e){return[...new Set(e)]}function nT(e){let t={},n=Object.keys(e).sort();for(let a of n)t[a]=e[a];return t}function iT(e,t){let n=new Set;return new Set(t),e.reduce((a,s)=>{let o=JSON.stringify(nT(s));return n.has(o)||(n.add(o),a.push({key:o,link:s})),a},[])}function Gp(){let e=O.useContext(Dl);return Kp(e,"You must render this element inside a <DataRouterContext.Provider> element"),e}function aT(){let e=O.useContext(Lf);return Kp(e,"You must render this element inside a <DataRouterStateContext.Provider> element"),e}var Qp=O.createContext(void 0);Qp.displayName="FrameworkContext";function Yp(){let e=O.useContext(Qp);return Kp(e,"You must render this element inside a <HydratedRouter> element"),e}function rT(e,t){let n=O.useContext(Qp),[a,s]=O.useState(!1),[o,c]=O.useState(!1),{onFocus:f,onBlur:h,onMouseEnter:m,onMouseLeave:b,onTouchStart:g}=t,x=O.useRef(null);O.useEffect(()=>{if(e==="render"&&c(!0),e==="viewport"){let w=_=>{_.forEach(A=>{c(A.isIntersecting)})},k=new IntersectionObserver(w,{threshold:.5});return x.current&&k.observe(x.current),()=>{k.disconnect()}}},[e]),O.useEffect(()=>{if(a){let w=setTimeout(()=>{c(!0)},100);return()=>{clearTimeout(w)}}},[a]);let v=()=>{s(!0)},E=()=>{s(!1),c(!1)};return n?e!=="intent"?[o,x,{}]:[o,x,{onFocus:qo(f,v),onBlur:qo(h,E),onMouseEnter:qo(m,v),onMouseLeave:qo(b,E),onTouchStart:qo(g,v)}]:[!1,x,{}]}function qo(e,t){return n=>{e&&e(n),n.defaultPrevented||t(n)}}function sT({page:e,...t}){let n=m2(),{router:a}=Gp(),s=O.useMemo(()=>j1(a.routes,e,a.basename),[a.routes,e,a.basename]);return s?n?O.createElement(oT,{page:e,matches:s,...t}):O.createElement(cT,{page:e,matches:s,...t}):null}function lT(e){let{manifest:t,routeModules:n}=Yp(),[a,s]=O.useState([]);return O.useEffect(()=>{let o=!1;return J2(e,t,n).then(c=>{o||s(c)}),()=>{o=!0}},[e,t,n]),a}function oT({page:e,matches:t,...n}){let a=Li(),{future:s}=Yp(),{basename:o}=Gp(),c=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let f=V1(e,o,s.unstable_trailingSlashAwareDataRequests,"rsc"),h=!1,m=[];for(let b of t)typeof b.route.shouldRevalidate=="function"?h=!0:m.push(b.route.id);return h&&m.length>0&&f.searchParams.set("_routes",m.join(",")),[f.pathname+f.search]},[o,s.unstable_trailingSlashAwareDataRequests,e,a,t]);return O.createElement(O.Fragment,null,c.map(f=>O.createElement("link",{key:f,rel:"prefetch",as:"fetch",href:f,...n})))}function cT({page:e,matches:t,...n}){let a=Li(),{future:s,manifest:o,routeModules:c}=Yp(),{basename:f}=Gp(),{loaderData:h,matches:m}=aT(),b=O.useMemo(()=>Hv(e,t,m,o,a,"data"),[e,t,m,o,a]),g=O.useMemo(()=>Hv(e,t,m,o,a,"assets"),[e,t,m,o,a]),x=O.useMemo(()=>{if(e===a.pathname+a.search+a.hash)return[];let w=new Set,k=!1;if(t.forEach(A=>{var j;let T=o.routes[A.route.id];!T||!T.hasLoader||(!b.some($=>$.route.id===A.route.id)&&A.route.id in h&&((j=c[A.route.id])!=null&&j.shouldRevalidate)||T.hasClientLoader?k=!0:w.add(A.route.id))}),w.size===0)return[];let _=V1(e,f,s.unstable_trailingSlashAwareDataRequests,"data");return k&&w.size>0&&_.searchParams.set("_routes",t.filter(A=>w.has(A.route.id)).map(A=>A.route.id).join(",")),[_.pathname+_.search]},[f,s.unstable_trailingSlashAwareDataRequests,h,a,o,b,t,e,c]),v=O.useMemo(()=>eT(g,o),[g,o]),E=lT(g);return O.createElement(O.Fragment,null,x.map(w=>O.createElement("link",{key:w,rel:"prefetch",as:"fetch",href:w,...n})),v.map(w=>O.createElement("link",{key:w,rel:"modulepreload",href:w,...n})),E.map(({key:w,link:k})=>O.createElement("link",{key:w,nonce:n.nonce,...k,crossOrigin:k.crossOrigin??n.crossOrigin})))}function uT(...e){return t=>{e.forEach(n=>{typeof n=="function"?n(t):n!=null&&(n.current=t)})}}var fT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{fT&&(window.__reactRouterVersion="7.14.2")}catch{}function dT({basename:e,children:t,unstable_useTransitions:n,window:a}){let s=O.useRef();s.current==null&&(s.current=FN({window:a,v5Compat:!0}));let o=s.current,[c,f]=O.useState({action:o.action,location:o.location}),h=O.useCallback(m=>{n===!1?f(m):O.startTransition(()=>f(m))},[n]);return O.useLayoutEffect(()=>o.listen(h),[o,h]),O.createElement($2,{basename:e,children:t,location:c.location,navigationType:c.action,navigator:o,unstable_useTransitions:n})}var W1=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,ds=O.forwardRef(function({onClick:t,discover:n="render",prefetch:a="none",relative:s,reloadDocument:o,replace:c,unstable_mask:f,state:h,target:m,to:b,preventScrollReset:g,viewTransition:x,unstable_defaultShouldRevalidate:v,...E},w){let{basename:k,navigator:_,unstable_useTransitions:A}=O.useContext(si),T=typeof b=="string"&&W1.test(b),j=B1(b,k);b=j.to;let $=E2(b,{relative:s}),M=Li(),F=null;if(f){let te=Df(f,[],M.unstable_mask?M.unstable_mask.pathname:"/",!0);k!=="/"&&(te.pathname=te.pathname==="/"?k:ji([k,te.pathname])),F=_.createHref(te)}let[H,ee,L]=rT(a,E),J=pT(b,{replace:c,unstable_mask:f,state:h,target:m,preventScrollReset:g,relative:s,viewTransition:x,unstable_defaultShouldRevalidate:v,unstable_useTransitions:A});function ae(te){t&&t(te),te.defaultPrevented||J(te)}let ge=!(j.isExternal||o),fe=O.createElement("a",{...E,...L,href:(ge?F:void 0)||j.absoluteURL||$,onClick:ge?ae:t,ref:uT(w,ee),target:m,"data-discover":!T&&n==="render"?"true":void 0});return H&&!T?O.createElement(O.Fragment,null,fe,O.createElement(sT,{page:$})):fe});ds.displayName="Link";var X1=O.forwardRef(function({"aria-current":t="page",caseSensitive:n=!1,className:a="",end:s=!1,style:o,to:c,viewTransition:f,children:h,...m},b){let g=xc(c,{relative:m.relative}),x=Li(),v=O.useContext(Lf),{navigator:E,basename:w}=O.useContext(si),k=v!=null&&vT(g)&&f===!0,_=E.encodeLocation?E.encodeLocation(g).pathname:g.pathname,A=x.pathname,T=v&&v.navigation&&v.navigation.location?v.navigation.location.pathname:null;n||(A=A.toLowerCase(),T=T?T.toLowerCase():null,_=_.toLowerCase()),T&&w&&(T=Aa(T,w)||T);const j=_!=="/"&&_.endsWith("/")?_.length-1:_.length;let $=A===_||!s&&A.startsWith(_)&&A.charAt(j)==="/",M=T!=null&&(T===_||!s&&T.startsWith(_)&&T.charAt(_.length)==="/"),F={isActive:$,isPending:M,isTransitioning:k},H=$?t:void 0,ee;typeof a=="function"?ee=a(F):ee=[a,$?"active":null,M?"pending":null,k?"transitioning":null].filter(Boolean).join(" ");let L=typeof o=="function"?o(F):o;return O.createElement(ds,{...m,"aria-current":H,className:ee,ref:b,style:L,to:c,viewTransition:f},typeof h=="function"?h(F):h)});X1.displayName="NavLink";var hT=O.forwardRef(({discover:e="render",fetcherKey:t,navigate:n,reloadDocument:a,replace:s,state:o,method:c=ff,action:f,onSubmit:h,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:x,...v},E)=>{let{unstable_useTransitions:w}=O.useContext(si),k=yT(),_=xT(f,{relative:m}),A=c.toLowerCase()==="get"?"get":"post",T=typeof f=="string"&&W1.test(f),j=$=>{if(h&&h($),$.defaultPrevented)return;$.preventDefault();let M=$.nativeEvent.submitter,F=(M==null?void 0:M.getAttribute("formmethod"))||c,H=()=>k(M||$.currentTarget,{fetcherKey:t,method:F,navigate:n,replace:s,state:o,relative:m,preventScrollReset:b,viewTransition:g,unstable_defaultShouldRevalidate:x});w&&n!==!1?O.startTransition(()=>H()):H()};return O.createElement("form",{ref:E,method:A,action:_,onSubmit:a?h:j,...v,"data-discover":!T&&e==="render"?"true":void 0})});hT.displayName="Form";function mT(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function Z1(e){let t=O.useContext(Dl);return Ot(t,mT(e)),t}function pT(e,{target:t,replace:n,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h,unstable_useTransitions:m}={}){let b=wr(),g=Li(),x=xc(e,{relative:c});return O.useCallback(v=>{if(G2(v,t)){v.preventDefault();let E=n!==void 0?n:ac(g)===ac(x),w=()=>b(e,{replace:E,unstable_mask:a,state:s,preventScrollReset:o,relative:c,viewTransition:f,unstable_defaultShouldRevalidate:h});m?O.startTransition(()=>w()):w()}},[g,b,x,n,a,s,t,e,o,c,f,h,m])}function J1(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=O.useRef(up(e)),n=O.useRef(!1),a=Li(),s=O.useMemo(()=>Q2(a.search,n.current?null:t.current),[a.search]),o=wr(),c=O.useCallback((f,h)=>{const m=up(typeof f=="function"?f(new URLSearchParams(s)):f);n.current=!0,o("?"+m,h)},[o,s]);return[s,c]}var gT=0,bT=()=>`__${String(++gT)}__`;function yT(){let{router:e}=Z1("useSubmit"),{basename:t}=O.useContext(si),n=D2(),a=e.fetch,s=e.navigate;return O.useCallback(async(o,c={})=>{let{action:f,method:h,encType:m,formData:b,body:g}=W2(o,t);if(c.navigate===!1){let x=c.fetcherKey||bT();await a(x,n,c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||h,formEncType:c.encType||m,flushSync:c.flushSync})}else await s(c.action||f,{unstable_defaultShouldRevalidate:c.unstable_defaultShouldRevalidate,preventScrollReset:c.preventScrollReset,formData:b,body:g,formMethod:c.method||h,formEncType:c.encType||m,replace:c.replace,state:c.state,fromRouteId:n,flushSync:c.flushSync,viewTransition:c.viewTransition})},[a,s,t,n])}function xT(e,{relative:t}={}){let{basename:n}=O.useContext(si),a=O.useContext(ki);Ot(a,"useFormAction must be used inside a RouteContext");let[s]=a.matches.slice(-1),o={...xc(e||".",{relative:t})},c=Li();if(e==null){o.search=c.search;let f=new URLSearchParams(o.search),h=f.getAll("index");if(h.some(b=>b==="")){f.delete("index"),h.filter(g=>g).forEach(g=>f.append("index",g));let b=f.toString();o.search=b?`?${b}`:""}}return(!e||e===".")&&s.route.index&&(o.search=o.search?o.search.replace(/^\?/,"?index&"):"?index"),n!=="/"&&(o.pathname=o.pathname==="/"?n:ji([n,o.pathname])),ac(o)}function vT(e,{relative:t}={}){let n=O.useContext(F1);Ot(n!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:a}=Z1("useViewTransitionState"),s=xc(e,{relative:t});if(!n.isTransitioning)return!1;let o=Aa(n.currentLocation.pathname,a)||n.currentLocation.pathname,c=Aa(n.nextLocation.pathname,a)||n.nextLocation.pathname;return vf(s.pathname,c)!=null||vf(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 ET=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),ST=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,a)=>a?a.toUpperCase():n.toLowerCase()),Kv=e=>{const t=ST(e);return t.charAt(0).toUpperCase()+t.slice(1)},eE=(...e)=>e.filter((t,n,a)=>!!t&&t.trim()!==""&&a.indexOf(t)===n).join(" ").trim(),wT=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 _T={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 kT=O.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:a,className:s="",children:o,iconNode:c,...f},h)=>O.createElement("svg",{ref:h,..._T,width:t,height:t,stroke:e,strokeWidth:a?Number(n)*24/Number(t):n,className:eE("lucide",s),...!o&&!wT(f)&&{"aria-hidden":"true"},...f},[...c.map(([m,b])=>O.createElement(m,b)),...Array.isArray(o)?o:[o]]));/**
|
|
76
|
-
* @license lucide-react v0.544.0 - ISC
|
|
77
|
-
*
|
|
78
|
-
* This source code is licensed under the ISC license.
|
|
79
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
80
|
-
*/const Te=(e,t)=>{const n=O.forwardRef(({className:a,...s},o)=>O.createElement(kT,{ref:o,iconNode:t,className:eE(`lucide-${ET(Kv(e))}`,`lucide-${e}`,a),...s}));return n.displayName=Kv(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 NT=[["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"}]],If=Te("activity",NT);/**
|
|
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 TT=[["path",{d:"m12 19-7-7 7-7",key:"1l729n"}],["path",{d:"M19 12H5",key:"x3x0zl"}]],tE=Te("arrow-left",TT);/**
|
|
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 CT=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],AT=Te("arrow-up",CT);/**
|
|
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 OT=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],RT=Te("check",OT);/**
|
|
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 MT=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],vc=Te("chevron-down",MT);/**
|
|
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 jT=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Bf=Te("chevron-right",jT);/**
|
|
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 DT=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],LT=Te("chevron-up",DT);/**
|
|
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 zT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],rc=Te("circle-alert",zT);/**
|
|
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 IT=[["path",{d:"M21.801 10A10 10 0 1 1 17 3.335",key:"yps3ct"}],["path",{d:"m9 11 3 3L22 4",key:"1pflzl"}]],fp=Te("circle-check-big",IT);/**
|
|
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 BT=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],sc=Te("circle-check",BT);/**
|
|
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 UT=[["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"}]],$T=Te("circle-x",UT);/**
|
|
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 FT=[["path",{d:"M12 6v6l4 2",key:"mmk7yg"}],["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],PT=Te("clock",FT);/**
|
|
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"}]],HT=Te("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 KT=[["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"}]],nE=Te("download",KT);/**
|
|
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 GT=[["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"}]],QT=Te("eye",GT);/**
|
|
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 YT=[["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"}]],Gv=Te("file-code",YT);/**
|
|
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 VT=[["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=Te("file-text",VT);/**
|
|
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 WT=[["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"}]],XT=Te("flame",WT);/**
|
|
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 ZT=[["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"}]],JT=Te("folder-git-2",ZT);/**
|
|
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 eC=[["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"}]],iE=Te("folder-open",eC);/**
|
|
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 tC=[["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"}]],lc=Te("folder",tC);/**
|
|
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 nC=[["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"}]],iC=Te("funnel",nC);/**
|
|
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 aC=[["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"}]],rC=Te("git-branch",aC);/**
|
|
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 sC=[["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"}]],lC=Te("globe",sC);/**
|
|
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 oC=[["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"}]],cC=Te("history",oC);/**
|
|
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 uC=[["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"}]],fC=Te("house",uC);/**
|
|
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 dC=[["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"}]],hC=Te("image",dC);/**
|
|
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 mC=[["path",{d:"M5 3v14",key:"9nsxs2"}],["path",{d:"M12 3v8",key:"1h2ygw"}],["path",{d:"M19 3v18",key:"1sk56x"}]],pC=Te("kanban",mC);/**
|
|
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 gC=[["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"}]],bC=Te("layout-grid",gC);/**
|
|
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 yC=[["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"}]],xC=Te("link",yC);/**
|
|
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 vC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Lt=Te("loader-circle",vC);/**
|
|
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 EC=[["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=Te("message-circle",EC);/**
|
|
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 SC=[["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"}]],wC=Te("message-square",SC);/**
|
|
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 _C=[["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"}]],kC=Te("paperclip",_C);/**
|
|
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 NC=[["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"}]],TC=Te("pause",NC);/**
|
|
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 CC=[["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"}]],Vp=Te("pen-line",CC);/**
|
|
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 AC=[["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"}]],Wp=Te("play",AC);/**
|
|
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 OC=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],zi=Te("plus",OC);/**
|
|
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 RC=[["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"}]],aE=Te("radio",RC);/**
|
|
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 MC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Cl=Te("refresh-cw",MC);/**
|
|
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 jC=[["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"}]],rE=Te("rotate-ccw",jC);/**
|
|
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 DC=[["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"}]],Uf=Te("save",DC);/**
|
|
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 LC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Sf=Te("search",LC);/**
|
|
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 zC=[["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"}]],IC=Te("send",zC);/**
|
|
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 BC=[["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"}]],sE=Te("settings",BC);/**
|
|
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 UC=[["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"}]],$C=Te("skull",UC);/**
|
|
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 FC=[["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"}]],PC=Te("snowflake",FC);/**
|
|
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 qC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],lE=Te("square",qC);/**
|
|
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 HC=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],oE=Te("terminal",HC);/**
|
|
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 KC=[["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"}]],GC=Te("timer-reset",KC);/**
|
|
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 QC=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],zl=Te("trash-2",QC);/**
|
|
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 YC=[["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"}]],VC=Te("triangle-alert",YC);/**
|
|
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 WC=[["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"}]],cE=Te("users",WC);/**
|
|
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 XC=[["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"}]],uE=Te("workflow",XC);/**
|
|
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 ZC=[["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"}]],fE=Te("wrench",ZC);/**
|
|
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 JC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],wi=Te("x",JC);/**
|
|
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 eA=[["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"}]],tA=Te("zap",eA),nA=[{to:"/chat",label:"对话",icon:wC},{to:"/projects",label:"项目",icon:bC},{to:"/board",label:"看板",icon:pC},{to:"/workers",label:"Workers",icon:cE},{to:"/logs",label:"Logs",icon:Ec},{to:"/skills",label:"Skills",icon:lC},{to:"/system",label:"系统",icon:sE}];function iA(){return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"font-[family-name:var(--font-heading)] font-bold text-lg px-3 pt-2 pb-4 flex items-center gap-3 text-[var(--color-text)]",children:[d.jsx("span",{className:"w-5 h-5 rounded-md bg-[var(--color-accent-mint)] border-2 border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]"}),"SPS Console"]}),d.jsx("nav",{className:"flex flex-col gap-1.5 mt-2","aria-label":"主导航",children:nA.map(e=>{const t=e.icon;return d.jsxs(X1,{to:e.to,className:({isActive:n})=>["flex items-center gap-3 px-3 py-2.5 rounded-xl font-semibold text-sm cursor-pointer transition-transform duration-150","border-2 border-transparent",n?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] font-bold":"text-[var(--color-text)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)] hover:shadow-[3px_3px_0_var(--color-text)] hover:-translate-x-px hover:-translate-y-px"].join(" "),children:[d.jsx(t,{size:18,strokeWidth:2.5}),e.label]},e.to)})})]})}class aA extends Error{constructor(t,n,a){super(n),this.status=t,this.detail=a,this.name="ApiError"}}async function Ft(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 aA(t.status,`${t.status} ${t.statusText}`,n)}return await t.json()}function dE(){return Ft("/api/system/info")}function rA(){return Ft("/api/system/env")}function sA(){return Ft("/api/system/env/raw")}async function lA(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 oA(){return Ft("/api/system/latest-version")}async function cA(){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 uA(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 Ft("/api/projects")}function fA(e){return Ft(`/api/projects/${encodeURIComponent(e)}`)}async function dA(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 hA(e){return Ft(`/api/projects/${encodeURIComponent(e)}/conf`)}async function mA(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 pA(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 gA(e){return Ft(`/api/projects/${encodeURIComponent(e)}/pipelines`)}async function bA(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 yA(e,t){return Ft(`/api/projects/${encodeURIComponent(e)}/pipelines/${encodeURIComponent(t)}`)}async function xA(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 vA(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 EA(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 SA(){var f;const e=ot({queryKey:["system-info"],queryFn:dE,refetchInterval:3e4}),t=ot({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}),n=_A(),a=!e.isError,s=((f=t.data)==null?void 0:f.data)??[],o=s.filter(h=>h.pipelineStatus==="running").length,c=s.reduce((h,m)=>h+m.workers.active,0);return d.jsxs("div",{className:"h-10 flex items-center gap-3 px-6 font-[family-name:var(--font-mono)] text-[11px] text-[var(--color-text-muted)]",children:[d.jsx("span",{className:"nb-status",style:{background:a?"var(--color-running-bg)":"var(--color-crashed-bg)",color:a?"var(--color-running)":"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:a?"server":"offline"}),d.jsx(wA,{state:n}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1",title:"活跃 pipeline 数",children:[d.jsx(If,{size:10,strokeWidth:2.5}),d.jsx("span",{className:"font-bold text-[var(--color-text)]",children:o})," pipeline"]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1",title:"活跃 worker 数",children:[d.jsx(aE,{size:10,strokeWidth:2.5}),d.jsx("span",{className:"font-bold text-[var(--color-text)]",children:c})," worker"]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["localhost:",window.location.port]}),e.data&&d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["v",e.data.version]}),d.jsx("span",{className:"text-[var(--color-text-subtle)]",children:"·"}),d.jsxs("span",{children:["node ",e.data.nodeVersion]})]})]})}function wA({state:e}){return e==="open"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px 2px 7px"},children:"SSE"}):e==="connecting"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)",padding:"2px 8px 2px 7px"},children:"SSE·connect"}):d.jsxs("span",{className:"nb-status",style:{background:"var(--color-crashed-bg)",color:"var(--color-crashed)",padding:"2px 8px 2px 7px"},children:[d.jsx(rc,{size:9,strokeWidth:2.5}),"SSE·down"]})}function _A(){const[e,t]=O.useState("connecting");return O.useEffect(()=>{let n=null,a=null,s=!1;const o=()=>{s||(n=new EventSource("/stream/heartbeat"),n.addEventListener("server.heartbeat",()=>t("open")),n.addEventListener("open",()=>t("open")),n.addEventListener("error",()=>{(n==null?void 0:n.readyState)===EventSource.CLOSED?(t("closed"),a==null&&(a=setTimeout(()=>{a=null,n==null||n.close(),o()},1e4))):t("connecting")}))};return o(),()=>{s=!0,a!=null&&clearTimeout(a),n==null||n.close()}},[]),e}function kA(){return d.jsxs("div",{className:"grid grid-cols-[240px_1fr] grid-rows-[1fr_40px] h-screen",children:[d.jsx("aside",{className:"row-span-1 row-start-1 border-r-[3px] border-[var(--color-text)] bg-[var(--color-bg)] p-4 flex flex-col",children:d.jsx(iA,{})}),d.jsx("main",{className:"row-start-1 overflow-auto p-6 flex flex-col gap-4",children:d.jsx(U2,{})}),d.jsx("footer",{className:"col-span-2 row-start-2 border-t-[3px] border-[var(--color-text)] bg-[var(--color-bg)]",children:d.jsx(SA,{})})]})}function dp(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 NA(){typeof window>"u"||(window.addEventListener("error",e=>{dp(e.error??e.message??"unknown error","window.error")}),window.addEventListener("unhandledrejection",e=>{const t=e.reason;dp(t instanceof Error?t:String(t),"unhandledrejection")}))}class TA extends O.Component{constructor(){super(...arguments);gv(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,a){var s;dp(n,`ErrorBoundary: ${((s=a.componentStack)==null?void 0:s.slice(0,200))??""}`),console.error("[ErrorBoundary]",n,a)}render(){return this.state.error?d.jsx("div",{className:"p-6",children:d.jsxs("div",{className:"nb-card max-w-2xl bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"💥 UI 崩了"}),d.jsx("p",{className:"text-sm mb-3 text-[var(--color-text-muted)]",children:this.state.error.message}),d.jsxs("details",{className:"text-xs mb-4",children:[d.jsx("summary",{className:"cursor-pointer font-semibold",children:"stack"}),d.jsx("pre",{className:"mt-2 font-[family-name:var(--font-mono)] overflow-auto max-h-60 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-md p-3",children:this.state.error.stack??"(no stack)"})]}),d.jsx("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>{this.setState({error:null}),window.location.reload()},children:"刷新页面"})]})}):this.props.children}}function CA(){const e=wr(),{data:t,isLoading:n,isError:a,error:s,refetch:o}=ot({queryKey:["projects"],queryFn:_r});return d.jsxs("div",{className:"flex flex-col gap-6 max-w-6xl",children:[d.jsxs("header",{className:"flex items-center justify-between",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"项目 🎯"}),d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:t?`${t.data.length} 个本机项目`:n?"加载中…":"点击刷新重试"})]}),d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsxs("button",{className:"nb-btn nb-btn-yellow",onClick:()=>o(),type:"button",children:[d.jsx(If,{size:16,strokeWidth:2.5}),"刷新"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>e("/projects/new"),"aria-label":"新建项目",children:[d.jsx(zi,{size:16,strokeWidth:3}),"新建项目"]})]})]}),n&&d.jsx(RA,{}),a&&d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:"加载失败"}),d.jsx("p",{className:"text-sm text-[var(--color-text)]",children:s instanceof Error?s.message:String(s)}),d.jsx("button",{className:"nb-btn mt-4",onClick:()=>o(),type:"button",children:"重试"})]}),t&&t.data.length===0&&d.jsx(MA,{}),t&&t.data.length>0&&d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:t.data.map(c=>d.jsx(AA,{project:c},c.name))})]})}function AA({project:e}){const t=e.pipelineStatus==="running";return d.jsxs(ds,{to:`/projects/${encodeURIComponent(e.name)}`,className:"nb-card nb-card-interactive block no-underline text-[var(--color-text)]",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-xl truncate",children:e.name}),d.jsx(OA,{status:e.pipelineStatus})]}),e.repoDir&&d.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] truncate mb-3",children:e.repoDir}),d.jsxs("div",{className:"grid grid-cols-3 gap-2 text-sm mt-4 pt-3 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[d.jsx(gm,{label:"cards",value:e.cards.total,accent:"purple"}),d.jsx(gm,{label:"inprogress",value:e.cards.inprogress,accent:e.cards.inprogress>0?"yellow":"idle"}),d.jsx(gm,{label:"workers",value:`${e.workers.active}/${e.workers.total}`,accent:t?"mint":"idle"})]})]})}function gm({label:e,value:t,accent:n}){const a={purple:"var(--color-accent-purple)",yellow:"var(--color-accent-yellow)",mint:"var(--color-accent-mint)",idle:"var(--color-bg-cream)"};return d.jsxs("div",{className:"flex flex-col items-center justify-center py-2 rounded-lg border-2 border-[var(--color-text)]",style:{background:a[n]},children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-lg",children:t}),d.jsx("span",{className:"text-[10px] uppercase tracking-wider text-[var(--color-text-muted)] font-semibold",children:e})]})}function OA({status:e}){const t={running:{bg:"var(--color-running-bg)",label:"running"},idle:{bg:"var(--color-idle-bg)",label:"idle"},stopping:{bg:"var(--color-stuck-bg)",label:"stopping"},error:{bg:"var(--color-crashed-bg)",label:"error"}},{bg:n,label:a}=t[e],s=e==="running"?"var(--color-running)":e==="error"?"var(--color-crashed)":e==="stopping"?"var(--color-stuck)":"var(--color-idle)";return d.jsx("span",{className:"nb-status",style:{background:n,color:s},children:a})}function RA(){return d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4",children:[0,1,2].map(e=>d.jsxs("div",{className:"nb-card opacity-60 animate-pulse",children:[d.jsx("div",{className:"h-6 w-32 bg-[var(--color-border-light)] rounded-md mb-3"}),d.jsx("div",{className:"h-3 w-full bg-[var(--color-border-light)] rounded-md mb-2"}),d.jsx("div",{className:"h-3 w-2/3 bg-[var(--color-border-light)] rounded-md"})]},e))})}function MA(){return d.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] flex items-center gap-6 p-8",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center",children:d.jsx(cE,{size:32,strokeWidth:2.5})}),d.jsxs("div",{className:"flex-1",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"还没有项目 ✨"}),d.jsxs("p",{className:"text-sm text-[var(--color-text)] mb-4",children:["运行 ",d.jsx("code",{className:"bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded-md font-[family-name:var(--font-mono)]",children:"sps project init <name>"})," 创建第一个项目。"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",children:[d.jsx(zi,{size:16,strokeWidth:3}),"新建项目"]})]})]})}function jA(e){const t=e?`?path=${encodeURIComponent(e)}`:"";return Ft(`/api/fs/browse${t}`)}const hE=50*1024*1024;async function DA(e,t){if(t.size>hE)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 hp(e,t){return`/api/fs/file?${new URLSearchParams({path:t,sessionId:e}).toString()}`}function Xp({initialPath:e,onCancel:t,onSelect:n,title:a="选择目录",mode:s="directory"}){var v,E,w;const[o,c]=O.useState(e??null),[f,h]=O.useState(null),m=ot({queryKey:["fs-browse",o],queryFn:()=>jA(o??void 0),staleTime:0,gcTime:0}),b=((v=m.data)==null?void 0:v.path)??o??"",g=((E=m.data)==null?void 0:E.parent)??null,x=((w=m.data)==null?void 0:w.home)??null;return O.useEffect(()=>{const k=_=>{_.key==="Escape"&&(_.preventDefault(),t())};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[t]),d.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center bg-[rgba(45,55,72,0.5)] p-4",role:"presentation",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-lg w-full p-5 flex flex-col",style:{maxHeight:"70vh"},role:"dialog","aria-modal":"true","aria-label":a,children:[d.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base",children:a}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:t,"aria-label":"关闭",children:d.jsx(wi,{size:14,strokeWidth:3})})]}),d.jsxs("div",{className:"flex items-center gap-2 mb-3 shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>g&&c(g),disabled:!g||m.isLoading,"aria-label":"上级目录",title:"上级目录",children:d.jsx(AT,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",style:{padding:"4px 10px",fontSize:12},onClick:()=>x&&c(x),disabled:!x||m.isLoading,"aria-label":"回到 Home",title:"回到 Home",children:d.jsx(fC,{size:12,strokeWidth:3})}),d.jsx("div",{className:"flex-1 min-w-0 nb-input font-[family-name:var(--font-mono)] text-xs px-2 py-1.5 truncate",title:b,dir:"rtl",children:b||"..."})]}),d.jsxs("div",{className:"flex-1 overflow-y-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[m.isLoading&&d.jsxs("div",{className:"flex items-center justify-center py-12 text-[var(--color-text-muted)]",children:[d.jsx(Lt,{size:16,strokeWidth:3,className:"animate-spin mr-2"}),"加载中..."]}),m.isError&&d.jsxs("div",{className:"p-4 text-sm text-[var(--color-crashed)]",children:[d.jsx("p",{className:"font-bold mb-1",children:"读取失败"}),d.jsx("p",{className:"text-xs font-[family-name:var(--font-mono)] break-all",children:m.error instanceof Error?m.error.message:String(m.error)})]}),m.data&&d.jsxs("ul",{className:"divide-y-2 divide-[var(--color-text)]/20",children:[m.data.entries.length===0&&d.jsx("li",{className:"p-4 text-xs text-[var(--color-text-subtle)] italic text-center",children:"— 空目录 —"}),m.data.entries.map(k=>{const _=(()=>{const j=b.endsWith("/")||b.endsWith("\\")?"":"/";return`${b}${j}${k.name}`})(),A=s==="file"&&f===_,T=k.isDirectory||s==="file";return d.jsx("li",{children:d.jsxs("button",{type:"button",className:["w-full flex items-center gap-2 px-3 py-2 text-left text-sm font-[family-name:var(--font-mono)]","disabled:opacity-50 disabled:cursor-not-allowed",A?"bg-[var(--color-accent-mint)] font-bold":"hover:bg-[var(--color-accent-mint)]"].join(" "),disabled:!T,onClick:()=>{k.isDirectory?(h(null),c(_)):s==="file"&&h(_)},onDoubleClick:()=>{s==="file"&&!k.isDirectory&&n(_)},title:k.isDirectory?`进入 ${k.name}/`:s==="file"?`选择 ${k.name}(双击直接确认)`:"文件不可选",children:[k.isDirectory?d.jsx(lc,{size:14,strokeWidth:2.5,className:"flex-shrink-0 text-[var(--color-text)]"}):d.jsx("span",{className:"w-3.5 h-3.5 flex-shrink-0"}),d.jsx("span",{className:"truncate",children:k.name}),k.isDirectory&&d.jsx(Bf,{size:12,strokeWidth:2.5,className:"ml-auto flex-shrink-0 text-[var(--color-text-muted)]"})]})},k.name)})]})]}),d.jsxs("div",{className:"flex gap-2 justify-end pt-3 shrink-0",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:t,children:"取消"}),s==="file"?d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>f&&n(f),disabled:!f||m.isLoading||m.isError,title:f??"请先点选一个文件",children:[d.jsx(sc,{size:14,strokeWidth:3}),"使用此文件"]}):d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:()=>n(b),disabled:!b||m.isLoading||m.isError,children:[d.jsx(sc,{size:14,strokeWidth:3}),"选此目录"]})]})]})})}function LA({title:e,body:t,confirm:n,onConfirm:a,onCancel:s,danger:o}){return O.useEffect(()=>{const c=f=>{f.key==="Escape"&&s()};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[s]),d.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"confirm-title",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{id:"confirm-title",className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5",children:t}),d.jsxs("div",{className:"flex gap-3 justify-end",children:[d.jsx("button",{className:"nb-btn",onClick:s,type:"button",children:"取消"}),d.jsx("button",{className:o?"nb-btn nb-btn-danger":"nb-btn nb-btn-yellow",onClick:async()=>{await a()},type:"button",children:n})]})]})})}const mE=O.createContext(null);function zA({children:e}){const[t,n]=O.useState(null),a=O.useCallback(c=>new Promise(f=>{n({kind:"confirm",opts:c,resolve:h=>{n(null),f(h)}})}),[]),s=O.useCallback(c=>new Promise(f=>{n({kind:"alert",opts:c,resolve:()=>{n(null),f()}})}),[]),o=O.useCallback(c=>new Promise(f=>{n({kind:"prompt",opts:c,resolve:h=>{n(null),f(h)}})}),[]);return d.jsxs(mE.Provider,{value:{confirm:a,alert:s,prompt:o},children:[e,(t==null?void 0:t.kind)==="confirm"&&d.jsx(LA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"确定",danger:t.opts.danger,onConfirm:()=>t.resolve(!0),onCancel:()=>t.resolve(!1)}),(t==null?void 0:t.kind)==="alert"&&d.jsx(IA,{title:t.opts.title,body:t.opts.body,confirm:t.opts.confirm??"知道了",onClose:()=>t.resolve()}),(t==null?void 0:t.kind)==="prompt"&&d.jsx(BA,{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 li(){const e=O.useContext(mE);if(!e)throw new Error("useDialog must be used inside <DialogProvider>");return e}function IA({title:e,body:t,confirm:n,onClose:a}){return O.useEffect(()=>{const s=o=>{(o.key==="Escape"||o.key==="Enter")&&a()};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[a]),d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-5 whitespace-pre-wrap break-words",children:t}),d.jsx("div",{className:"flex gap-3 justify-end",children:d.jsx("button",{className:"nb-btn nb-btn-primary",onClick:a,type:"button",autoFocus:!0,children:n})})]})})}function BA({title:e,body:t,placeholder:n,defaultValue:a,confirm:s,cancel:o,onConfirm:c,onCancel:f}){const[h,m]=O.useState(a??""),b=O.useRef(null);O.useEffect(()=>{var v,E;(v=b.current)==null||v.focus(),(E=b.current)==null||E.select();const x=w=>{w.key==="Escape"&&f()};return window.addEventListener("keydown",x),()=>window.removeEventListener("keydown",x)},[f]);const g=()=>{const x=h.trim();x&&c(x)};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-2",children:e}),t&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-3 whitespace-pre-wrap break-words",children:t}),d.jsx("input",{ref:b,type:"text",className:"nb-input w-full mb-5",placeholder:n,value:h,onChange:x=>m(x.target.value),onKeyDown:x=>{x.key==="Enter"&&!x.nativeEvent.isComposing&&(x.preventDefault(),g())}}),d.jsxs("div",{className:"flex gap-3 justify-end",children:[d.jsx("button",{className:"nb-btn",onClick:f,type:"button",children:o}),d.jsx("button",{className:"nb-btn nb-btn-primary",onClick:g,type:"button",disabled:!h.trim(),children:s})]})]})})}function UA(){const e=wr(),t=qn(),{alert:n}=li(),[a,s]=O.useState({name:"",projectDir:"",enableGit:!0,createIfMissing:!0,mergeBranch:"main",maxWorkers:"1",ackTimeoutMin:"5"}),[o,c]=O.useState(!1),f=Pn({mutationFn:b=>dA(b),onSuccess:b=>{t.invalidateQueries({queryKey:["projects"]}),e(`/projects/${encodeURIComponent(b.name)}`)},onError:b=>{n({title:"创建失败",body:b instanceof Error?b.message:String(b)})}}),h=/^[a-zA-Z0-9_-]+$/.test(a.name),m=h&&a.projectDir.trim()!==""&&!f.isPending;return d.jsxs("div",{className:"flex flex-col gap-5 max-w-2xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("button",{type:"button",onClick:()=>e("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[d.jsx(tE,{size:14,strokeWidth:3}),"返回"]}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:"新建项目"})]}),d.jsx("div",{className:"nb-card",children:d.jsxs("form",{onSubmit:b=>{b.preventDefault(),m&&f.mutate(a)},className:"flex flex-col gap-5",children:[d.jsxs(sr,{label:"项目名",hint:"只能用字母、数字、下划线、连字符。例如 acme-web",children:[d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如: acme-web",value:a.name,onChange:b=>s({...a,name:b.target.value}),autoFocus:!0,required:!0}),a.name&&!h&&d.jsx("p",{className:"text-xs text-[var(--color-crashed)] mt-1",children:"名称只能包含 a-z A-Z 0-9 _ -"})]}),d.jsxs(sr,{label:"项目目录",hint:"本机绝对路径(代码或文档都可)。和是否启用 git 无关。",children:[d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)]",placeholder:"/home/coral/code/acme",value:a.projectDir,onChange:b=>s({...a,projectDir:b.target.value}),required:!0}),d.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>c(!0),"aria-label":"浏览选择项目目录",title:"浏览选择项目目录",children:[d.jsx(iE,{size:14,strokeWidth:2.5}),"浏览"]})]}),d.jsxs("label",{className:"flex items-center gap-2 mt-2 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.createIfMissing!==!1,onChange:b=>s({...a,createIfMissing:b.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"目录不存在时自动创建(推荐 — 否则 .claude/ 和 wiki/ 安装会被跳过)"})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[d.jsx(sr,{label:"最大 Worker 数",children:d.jsx("input",{type:"number",min:"1",max:"8",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.maxWorkers,onChange:b=>s({...a,maxWorkers:b.target.value})})}),d.jsx(sr,{label:"ACK 超时(分钟)",hint:"Worker 启动后多久没 ACK 视为失败",children:d.jsx("input",{type:"number",min:"1",max:"30",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.ackTimeoutMin??"5",onChange:b=>s({...a,ackTimeoutMin:b.target.value})})})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.enableGit??!0,onChange:b=>s({...a,enableGit:b.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-sm font-bold",children:"启用 Git(Worker 自动 commit + push)"})]}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] mb-3",children:"关闭后 Worker 只做任务、不做版本控制;适合文档/数据处理等非代码项目。"}),a.enableGit!==!1&&d.jsxs("div",{className:"flex flex-col gap-4 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4",children:[d.jsx(sr,{label:"合并分支",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:a.mergeBranch??"main",onChange:b=>s({...a,mergeBranch:b.target.value})})}),d.jsx(sr,{label:"Git 远程项目路径",hint:"如 user/repo,空则跳过远程 API(只本地 commit/push)",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"user/repo",value:a.gitlabProject??"",onChange:b=>s({...a,gitlabProject:b.target.value})})}),a.gitlabProject&&d.jsx(sr,{label:"GitLab 项目 ID",hint:"数字;GitHub 用户留空",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"42",value:a.gitlabProjectId??"",onChange:b=>s({...a,gitlabProjectId:b.target.value})})})]})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsxs("label",{className:"flex items-center gap-3 mb-3 cursor-pointer select-none",children:[d.jsx("input",{type:"checkbox",checked:a.enableWiki===!0,onChange:b=>s({...a,enableWiki:b.target.checked}),className:"w-4 h-4 cursor-pointer"}),d.jsx("span",{className:"text-sm font-bold",children:"启用 Wiki 知识库(per-project,doc-28)"})]}),d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["开启后自动 scaffold ",d.jsx("code",{className:"font-mono",children:"wiki/"})," 目录,并向 Worker prompt 注入 5 层检索上下文与 wiki-update 提示。可后续 ",d.jsx("code",{className:"font-mono",children:"sps wiki init"})," 补办。"]})]}),d.jsxs("div",{className:"pt-3 border-t-2 border-[var(--color-text)] border-dashed",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-3 text-[var(--color-text-muted)]",children:"通知"}),d.jsx(sr,{label:"Matrix 房间 ID",hint:"空则使用全局配置;不填 = 不通知",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"!abc:matrix.example.com",value:a.matrixRoomId??"",onChange:b=>s({...a,matrixRoomId:b.target.value})})})]}),d.jsxs("div",{className:"flex gap-3 justify-end pt-3",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:()=>e("/projects"),disabled:f.isPending,children:"取消"}),d.jsx("button",{type:"submit",className:"nb-btn nb-btn-primary",disabled:!m,"aria-label":"创建项目",children:f.isPending?d.jsxs(d.Fragment,{children:[d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}),"创建中…"]}):d.jsxs(d.Fragment,{children:[d.jsx(zi,{size:14,strokeWidth:3}),"创建"]})})]})]})}),o&&d.jsx(Xp,{title:"选择项目目录",initialPath:a.projectDir.trim()||void 0,onCancel:()=>c(!1),onSelect:b=>{s({...a,projectDir:b}),c(!1)}})]})}function sr({label:e,hint:t,children:n}){return d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:e}),n,t&&d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:t})]})}const Zp=Symbol.for("yaml.alias"),mp=Symbol.for("yaml.document"),Er=Symbol.for("yaml.map"),pE=Symbol.for("yaml.pair"),Zi=Symbol.for("yaml.scalar"),Il=Symbol.for("yaml.seq"),_i=Symbol.for("yaml.node.type"),kr=e=>!!e&&typeof e=="object"&&e[_i]===Zp,hs=e=>!!e&&typeof e=="object"&&e[_i]===mp,Bl=e=>!!e&&typeof e=="object"&&e[_i]===Er,Rt=e=>!!e&&typeof e=="object"&&e[_i]===pE,St=e=>!!e&&typeof e=="object"&&e[_i]===Zi,Ul=e=>!!e&&typeof e=="object"&&e[_i]===Il;function Dt(e){if(e&&typeof e=="object")switch(e[_i]){case Er:case Il:return!0}return!1}function zt(e){if(e&&typeof e=="object")switch(e[_i]){case Zp:case Er:case Zi:case Il:return!0}return!1}const gE=e=>(St(e)||Dt(e))&&!!e.anchor,Fn=Symbol("break visit"),bE=Symbol("skip children"),Xi=Symbol("remove node");function ms(e,t){const n=yE(t);hs(e)?cl(null,e.contents,n,Object.freeze([e]))===Xi&&(e.contents=null):cl(null,e,n,Object.freeze([]))}ms.BREAK=Fn;ms.SKIP=bE;ms.REMOVE=Xi;function cl(e,t,n,a){const s=xE(e,t,n,a);if(zt(s)||Rt(s))return vE(e,a,s),cl(e,s,n,a);if(typeof s!="symbol"){if(Dt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=cl(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Xi&&(t.items.splice(o,1),o-=1)}}}else if(Rt(t)){a=Object.freeze(a.concat(t));const o=cl("key",t.key,n,a);if(o===Fn)return Fn;o===Xi&&(t.key=null);const c=cl("value",t.value,n,a);if(c===Fn)return Fn;c===Xi&&(t.value=null)}}return s}async function $f(e,t){const n=yE(t);hs(e)?await ul(null,e.contents,n,Object.freeze([e]))===Xi&&(e.contents=null):await ul(null,e,n,Object.freeze([]))}$f.BREAK=Fn;$f.SKIP=bE;$f.REMOVE=Xi;async function ul(e,t,n,a){const s=await xE(e,t,n,a);if(zt(s)||Rt(s))return vE(e,a,s),ul(e,s,n,a);if(typeof s!="symbol"){if(Dt(t)){a=Object.freeze(a.concat(t));for(let o=0;o<t.items.length;++o){const c=await ul(o,t.items[o],n,a);if(typeof c=="number")o=c-1;else{if(c===Fn)return Fn;c===Xi&&(t.items.splice(o,1),o-=1)}}}else if(Rt(t)){a=Object.freeze(a.concat(t));const o=await ul("key",t.key,n,a);if(o===Fn)return Fn;o===Xi&&(t.key=null);const c=await ul("value",t.value,n,a);if(c===Fn)return Fn;c===Xi&&(t.value=null)}}return s}function yE(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 xE(e,t,n,a){var s,o,c,f,h;if(typeof n=="function")return n(e,t,a);if(Bl(t))return(s=n.Map)==null?void 0:s.call(n,e,t,a);if(Ul(t))return(o=n.Seq)==null?void 0:o.call(n,e,t,a);if(Rt(t))return(c=n.Pair)==null?void 0:c.call(n,e,t,a);if(St(t))return(f=n.Scalar)==null?void 0:f.call(n,e,t,a);if(kr(t))return(h=n.Alias)==null?void 0:h.call(n,e,t,a)}function vE(e,t,n){const a=t[t.length-1];if(Dt(a))a.items[e]=n;else if(Rt(a))e==="key"?a.key=n:a.value=n;else if(hs(a))a.contents=n;else{const s=kr(a)?"alias":"scalar";throw new Error(`Cannot replace node with ${s} parent`)}}const $A={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},FA=e=>e.replace(/[!,[\]{}]/g,t=>$A[t]);class Nn{constructor(t,n){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Nn.defaultYaml,t),this.tags=Object.assign({},Nn.defaultTags,n)}clone(){const t=new Nn(this.yaml,this.tags);return t.docStart=this.docStart,t}atDocument(){const t=new Nn(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Nn.defaultTags);break}return t}add(t,n){this.atNextDocument&&(this.yaml={explicit:Nn.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Nn.defaultTags),this.atNextDocument=!1);const a=t.trim().split(/[ \t]+/),s=a.shift();switch(s){case"%TAG":{if(a.length!==2&&(n(0,"%TAG directive should contain exactly two parts"),a.length<2))return!1;const[o,c]=a;return this.tags[o]=c,!0}case"%YAML":{if(this.yaml.explicit=!0,a.length!==1)return n(0,"%YAML directive should contain exactly one part"),!1;const[o]=a;if(o==="1.1"||o==="1.2")return this.yaml.version=o,!0;{const c=/^\d+\.\d+$/.test(o);return n(6,`Unsupported YAML version ${o}`,c),!1}}default:return n(0,`Unknown directive ${s}`,!0),!1}}tagName(t,n){if(t==="!")return"!";if(t[0]!=="!")return n(`Not a valid tag: ${t}`),null;if(t[1]==="<"){const c=t.slice(2,-1);return c==="!"||c==="!!"?(n(`Verbatim tags aren't resolved, so ${t} is invalid.`),null):(t[t.length-1]!==">"&&n("Verbatim tags must end with a >"),c)}const[,a,s]=t.match(/^(.*!)([^!]*)$/s);s||n(`The ${t} tag has no suffix`);const o=this.tags[a];if(o)try{return o+decodeURIComponent(s)}catch(c){return n(String(c)),null}return a==="!"?t:(n(`Could not resolve tag: ${t}`),null)}tagString(t){for(const[n,a]of Object.entries(this.tags))if(t.startsWith(a))return n+FA(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,f)=>{zt(f)&&f.tag&&(o[f.tag]=!0)}),s=Object.keys(o)}else s=[];for(const[o,c]of a)o==="!!"&&c==="tag:yaml.org,2002:"||(!t||s.some(f=>f.startsWith(c)))&&n.push(`%TAG ${o} ${c}`);return n.join(`
|
|
366
|
-
`)}}Nn.defaultYaml={explicit:!1,version:"1.2"};Nn.defaultTags={"!!":"tag:yaml.org,2002:"};function EE(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 SE(e){const t=new Set;return ms(e,{Value(n,a){a.anchor&&t.add(a.anchor)}}),t}function wE(e,t){for(let n=1;;++n){const a=`${e}${n}`;if(!t.has(a))return a}}function PA(e,t){const n=[],a=new Map;let s=null;return{onAnchor:o=>{n.push(o),s??(s=SE(e));const c=wE(t,s);return s.add(c),c},setAnchors:()=>{for(const o of n){const c=a.get(o);if(typeof c=="object"&&c.anchor&&(St(c.node)||Dt(c.node)))c.node.anchor=c.anchor;else{const f=new Error("Failed to resolve repeated object (this should not happen)");throw f.source=o,f}}},sourceObjects:a}}function fl(e,t,n,a){if(a&&typeof a=="object")if(Array.isArray(a))for(let s=0,o=a.length;s<o;++s){const c=a[s],f=fl(e,a,String(s),c);f===void 0?delete a[s]:f!==c&&(a[s]=f)}else if(a instanceof Map)for(const s of Array.from(a.keys())){const o=a.get(s),c=fl(e,a,s,o);c===void 0?a.delete(s):c!==o&&a.set(s,c)}else if(a instanceof Set)for(const s of Array.from(a)){const o=fl(e,a,s,s);o===void 0?a.delete(s):o!==s&&(a.delete(s),a.add(o))}else for(const[s,o]of Object.entries(a)){const c=fl(e,a,s,o);c===void 0?delete a[s]:c!==o&&(a[s]=c)}return e.call(t,n,a)}function Ei(e,t,n){if(Array.isArray(e))return e.map((a,s)=>Ei(a,String(s),n));if(e&&typeof e.toJSON=="function"){if(!n||!gE(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 Jp{constructor(t){Object.defineProperty(this,_i,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(t.range=this.range.slice()),t}toJS(t,{mapAsMap:n,maxAliasCount:a,onAnchor:s,reviver:o}={}){if(!hs(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:!0,mapAsMap:n===!0,mapKeyWarned:!1,maxAliasCount:typeof a=="number"?a:100},f=Ei(this,"",c);if(typeof s=="function")for(const{count:h,res:m}of c.anchors.values())s(m,h);return typeof o=="function"?fl(o,{"":f},"",f):f}}class Ff extends Jp{constructor(t){super(Zp),this.source=t,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t,n){let a;n!=null&&n.aliasResolveCache?a=n.aliasResolveCache:(a=[],ms(t,{Node:(o,c)=>{(kr(c)||gE(c))&&a.push(c)}}),n&&(n.aliasResolveCache=a));let s;for(const o of a){if(o===this)break;o.anchor===this.source&&(s=o)}return s}toJSON(t,n){if(!n)return{source:this.source};const{anchors:a,doc:s,maxAliasCount:o}=n,c=this.resolve(s,n);if(!c){const h=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(h)}let f=a.get(c);if(f||(Ei(c,null,n),f=a.get(c)),(f==null?void 0:f.res)===void 0){const h="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(h)}if(o>=0&&(f.count+=1,f.aliasCount===0&&(f.aliasCount=hf(s,c,a)),f.count*f.aliasCount>o)){const h="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(h)}return f.res}toString(t,n,a){const s=`*${this.source}`;if(t){if(EE(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 hf(e,t,n){if(kr(t)){const a=t.resolve(e),s=n&&a&&n.get(a);return s?s.count*s.aliasCount:0}else if(Dt(t)){let a=0;for(const s of t.items){const o=hf(e,s,n);o>a&&(a=o)}return a}else if(Rt(t)){const a=hf(e,t.key,n),s=hf(e,t.value,n);return Math.max(a,s)}return 1}const _E=e=>!e||typeof e!="function"&&typeof e!="object";class Be extends Jp{constructor(t){super(Zi),this.value=t}toJSON(t,n){return n!=null&&n.keep?this.value:Ei(this.value,t,n)}toString(){return String(this.value)}}Be.BLOCK_FOLDED="BLOCK_FOLDED";Be.BLOCK_LITERAL="BLOCK_LITERAL";Be.PLAIN="PLAIN";Be.QUOTE_DOUBLE="QUOTE_DOUBLE";Be.QUOTE_SINGLE="QUOTE_SINGLE";const qA="tag:yaml.org,2002:";function HA(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 oc(e,t,n){var g,x,v;if(hs(e)&&(e=e.contents),zt(e))return e;if(Rt(e)){const E=(x=(g=n.schema[Er]).createNode)==null?void 0:x.call(g,n.schema,null,n);return E.items.push(e),E}(e instanceof String||e instanceof Number||e instanceof Boolean||typeof BigInt<"u"&&e instanceof BigInt)&&(e=e.valueOf());const{aliasDuplicateObjects:a,onAnchor:s,onTagObj:o,schema:c,sourceObjects:f}=n;let h;if(a&&e&&typeof e=="object"){if(h=f.get(e),h)return h.anchor??(h.anchor=s(e)),new Ff(h.anchor);h={anchor:null,node:null},f.set(e,h)}t!=null&&t.startsWith("!!")&&(t=qA+t.slice(2));let m=HA(e,t,c.tags);if(!m){if(e&&typeof e.toJSON=="function"&&(e=e.toJSON()),!e||typeof e!="object"){const E=new Be(e);return h&&(h.node=E),E}m=e instanceof Map?c[Er]:Symbol.iterator in Object(e)?c[Il]:c[Er]}o&&(o(m),delete n.onTagObj);const b=m!=null&&m.createNode?m.createNode(n.schema,e,n):typeof((v=m==null?void 0:m.nodeClass)==null?void 0:v.from)=="function"?m.nodeClass.from(n.schema,e,n):new Be(e);return t?b.tag=t:m.default||(b.tag=m.tag),h&&(h.node=b),b}function wf(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 oc(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 Xo=e=>e==null||typeof e=="object"&&!!e[Symbol.iterator]().next().done;class kE extends Jp{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)||Rt(a)?a.clone(t):a),this.range&&(n.range=this.range.slice()),n}addIn(t,n){if(Xo(t))this.add(n);else{const[a,...s]=t,o=this.get(a,!0);if(Dt(o))o.addIn(s,n);else if(o===void 0&&this.schema)this.set(a,wf(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(Dt(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&&St(o)?o.value:o:Dt(o)?o.getIn(s,n):void 0}hasAllNullValues(t){return this.items.every(n=>{if(!Rt(n))return!1;const a=n.value;return a==null||t&&St(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 Dt(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(Dt(o))o.setIn(s,n);else if(o===void 0&&this.schema)this.set(a,wf(this.schema,s,n));else throw new Error(`Expected YAML collection at ${a}. Remaining path: ${s}`)}}}const KA=e=>e.replace(/^(?!$)(?: $)?/gm,"#");function Na(e,t){return/^\n+$/.test(e)?e.substring(1):t?e.replace(/^(?! *$)/gm,t):e}const Xr=(e,t,n)=>e.endsWith(`
|
|
367
|
-
`)?Na(n,t):n.includes(`
|
|
368
|
-
`)?`
|
|
369
|
-
`+Na(n,t):(e.endsWith(" ")?"":" ")+n,NE="flow",pp="block",mf="quoted";function Pf(e,t,n="flow",{indentAtStart:a,lineWidth:s=80,minContentWidth:o=20,onFold:c,onOverflow:f}={}){if(!s||s<0)return e;s<o&&(o=0);const h=Math.max(1+o,1+s-t.length);if(e.length<=h)return e;const m=[],b={};let g=s-t.length;typeof a=="number"&&(a>s-Math.max(2,o)?m.push(0):g=s-a);let x,v,E=!1,w=-1,k=-1,_=-1;n===pp&&(w=Yv(e,w,t.length),w!==-1&&(g=w+h));for(let T;T=e[w+=1];){if(n===mf&&T==="\\"){switch(k=w,e[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}_=w}if(T===`
|
|
370
|
-
`)n===pp&&(w=Yv(e,w,t.length)),g=w+t.length+h,x=void 0;else{if(T===" "&&v&&v!==" "&&v!==`
|
|
371
|
-
`&&v!==" "){const j=e[w+1];j&&j!==" "&&j!==`
|
|
372
|
-
`&&j!==" "&&(x=w)}if(w>=g)if(x)m.push(x),g=x+h,x=void 0;else if(n===mf){for(;v===" "||v===" ";)v=T,T=e[w+=1],E=!0;const j=w>_+1?w-2:k-1;if(b[j])return e;m.push(j),b[j]=!0,g=j+h,x=void 0}else E=!0}v=T}if(E&&f&&f(),m.length===0)return e;c&&c();let A=e.slice(0,m[0]);for(let T=0;T<m.length;++T){const j=m[T],$=m[T+1]||e.length;j===0?A=`
|
|
373
|
-
${t}${e.slice(0,$)}`:(n===mf&&b[j]&&(A+=`${e[j]}\\`),A+=`
|
|
374
|
-
${t}${e.slice(j+1,$)}`)}return A}function Yv(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!==`
|
|
375
|
-
`);a=t,s=t+1,o=e[s]}return a}const qf=(e,t)=>({indentAtStart:t?e.indent.length:e.indentAtStart,lineWidth:e.options.lineWidth,minContentWidth:e.options.minContentWidth}),Hf=e=>/^(%|---|\.\.\.)/m.test(e);function GA(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]===`
|
|
376
|
-
`){if(o-c>a)return!0;if(c=o+1,s-c<=a)return!1}return!0}function Zo(e,t){const n=JSON.stringify(e);if(t.options.doubleQuotedAsJSON)return n;const{implicitKey:a}=t,s=t.options.doubleQuotedMinMultiLineLength,o=t.indent||(Hf(e)?" ":"");let c="",f=0;for(let h=0,m=n[h];m;m=n[++h])if(m===" "&&n[h+1]==="\\"&&n[h+2]==="n"&&(c+=n.slice(f,h)+"\\ ",h+=1,f=h,m="\\"),m==="\\")switch(n[h+1]){case"u":{c+=n.slice(f,h);const b=n.substr(h+2,4);switch(b){case"0000":c+="\\0";break;case"0007":c+="\\a";break;case"000b":c+="\\v";break;case"001b":c+="\\e";break;case"0085":c+="\\N";break;case"00a0":c+="\\_";break;case"2028":c+="\\L";break;case"2029":c+="\\P";break;default:b.substr(0,2)==="00"?c+="\\x"+b.substr(2):c+=n.substr(h,6)}h+=5,f=h+1}break;case"n":if(a||n[h+2]==='"'||n.length<s)h+=1;else{for(c+=n.slice(f,h)+`
|
|
377
|
-
|
|
378
|
-
`;n[h+2]==="\\"&&n[h+3]==="n"&&n[h+4]!=='"';)c+=`
|
|
379
|
-
`,h+=2;c+=o,n[h+2]===" "&&(c+="\\"),h+=1,f=h+1}break;default:h+=1}return c=f?c+n.slice(f):n,a?c:Pf(c,o,mf,qf(t,!1))}function gp(e,t){if(t.options.singleQuote===!1||t.implicitKey&&e.includes(`
|
|
380
|
-
`)||/[ \t]\n|\n[ \t]/.test(e))return Zo(e,t);const n=t.indent||(Hf(e)?" ":""),a="'"+e.replace(/'/g,"''").replace(/\n+/g,`$&
|
|
381
|
-
${n}`)+"'";return t.implicitKey?a:Pf(a,n,NE,qf(t,!1))}function dl(e,t){const{singleQuote:n}=t.options;let a;if(n===!1)a=Zo;else{const s=e.includes('"'),o=e.includes("'");s&&!o?a=gp:o&&!s?a=Zo:a=n?gp:Zo}return a(e,t)}let bp;try{bp=new RegExp(`(^|(?<!
|
|
382
|
-
))
|
|
383
|
-
+(?!
|
|
384
|
-
|$)`,"g")}catch{bp=/\n+(?!\n|$)/g}function pf({comment:e,type:t,value:n},a,s,o){const{blockQuote:c,commentString:f,lineWidth:h}=a.options;if(!c||/\n[\t ]+$/.test(n))return dl(n,a);const m=a.indent||(a.forceBlockIndent||Hf(n)?" ":""),b=c==="literal"?!0:c==="folded"||t===Be.BLOCK_FOLDED?!1:t===Be.BLOCK_LITERAL?!0:!GA(n,h,m.length);if(!n)return b?`|
|
|
385
|
-
`:`>
|
|
386
|
-
`;let g,x;for(x=n.length;x>0;--x){const $=n[x-1];if($!==`
|
|
387
|
-
`&&$!==" "&&$!==" ")break}let v=n.substring(x);const E=v.indexOf(`
|
|
388
|
-
`);E===-1?g="-":n===v||E!==v.length-1?(g="+",o&&o()):g="",v&&(n=n.slice(0,-v.length),v[v.length-1]===`
|
|
389
|
-
`&&(v=v.slice(0,-1)),v=v.replace(bp,`$&${m}`));let w=!1,k,_=-1;for(k=0;k<n.length;++k){const $=n[k];if($===" ")w=!0;else if($===`
|
|
390
|
-
`)_=k;else break}let A=n.substring(0,_<k?_+1:k);A&&(n=n.substring(A.length),A=A.replace(/\n+/g,`$&${m}`));let j=(w?m?"2":"1":"")+g;if(e&&(j+=" "+f(e.replace(/ ?[\r\n]+/g," ")),s&&s()),!b){const $=n.replace(/\n+/g,`
|
|
391
|
-
$&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${m}`);let M=!1;const F=qf(a,!0);c!=="folded"&&t!==Be.BLOCK_FOLDED&&(F.onOverflow=()=>{M=!0});const H=Pf(`${A}${$}${v}`,m,pp,F);if(!M)return`>${j}
|
|
392
|
-
${m}${H}`}return n=n.replace(/\n+/g,`$&${m}`),`|${j}
|
|
393
|
-
${m}${A}${n}${v}`}function QA(e,t,n,a){const{type:s,value:o}=e,{actualString:c,implicitKey:f,indent:h,indentStep:m,inFlow:b}=t;if(f&&o.includes(`
|
|
394
|
-
`)||b&&/[[\]{},]/.test(o))return dl(o,t);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(o))return f||b||!o.includes(`
|
|
395
|
-
`)?dl(o,t):pf(e,t,n,a);if(!f&&!b&&s!==Be.PLAIN&&o.includes(`
|
|
396
|
-
`))return pf(e,t,n,a);if(Hf(o)){if(h==="")return t.forceBlockIndent=!0,pf(e,t,n,a);if(f&&h===m)return dl(o,t)}const g=o.replace(/\n+/g,`$&
|
|
397
|
-
${h}`);if(c){const x=w=>{var k;return w.default&&w.tag!=="tag:yaml.org,2002:str"&&((k=w.test)==null?void 0:k.test(g))},{compat:v,tags:E}=t.doc.schema;if(E.some(x)||v!=null&&v.some(x))return dl(o,t)}return f?g:Pf(g,h,NE,qf(t,!1))}function Sc(e,t,n,a){const{implicitKey:s,inFlow:o}=t,c=typeof e.value=="string"?e:Object.assign({},e,{value:String(e.value)});let{type:f}=e;f!==Be.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(c.value)&&(f=Be.QUOTE_DOUBLE);const h=b=>{switch(b){case Be.BLOCK_FOLDED:case Be.BLOCK_LITERAL:return s||o?dl(c.value,t):pf(c,t,n,a);case Be.QUOTE_DOUBLE:return Zo(c.value,t);case Be.QUOTE_SINGLE:return gp(c.value,t);case Be.PLAIN:return QA(c,t,n,a);default:return null}};let m=h(f);if(m===null){const{defaultKeyType:b,defaultStringType:g}=t.options,x=s&&b||g;if(m=h(x),m===null)throw new Error(`Unsupported default string type ${x}`)}return m}function TE(e,t){const n=Object.assign({blockQuote:!0,commentString:KA,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 YA(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(St(t)){a=t.value;let o=e.filter(c=>{var f;return(f=c.identify)==null?void 0:f.call(c,a)});if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}n=o.find(c=>c.format===t.format)??o.find(c=>!c.format)}else a=t,n=e.find(o=>o.nodeClass&&a instanceof o.nodeClass);if(!n){const o=((s=a==null?void 0:a.constructor)==null?void 0:s.name)??(a===null?"null":typeof a);throw new Error(`Tag not resolved for ${o} value`)}return n}function VA(e,t,{anchors:n,doc:a}){if(!a.directives)return"";const s=[],o=(St(e)||Dt(e))&&e.anchor;o&&EE(o)&&(n.add(o),s.push(`&${o}`));const c=e.tag??(t.default?null:t.tag);return c&&s.push(a.directives.tagString(c)),s.join(" ")}function Al(e,t,n,a){var h;if(Rt(e))return e.toString(t,n,a);if(kr(e)){if(t.doc.directives)return e.toString(t);if((h=t.resolvedAliases)!=null&&h.has(e))throw new TypeError("Cannot stringify circular structure without alias nodes");t.resolvedAliases?t.resolvedAliases.add(e):t.resolvedAliases=new Set([e]),e=e.resolve(t.doc)}let s;const o=zt(e)?e:t.doc.createNode(e,{onTagObj:m=>s=m});s??(s=YA(t.doc.schema.tags,o));const c=VA(o,s,t);c.length>0&&(t.indentAtStart=(t.indentAtStart??0)+c.length+1);const f=typeof s.stringify=="function"?s.stringify(o,t,n,a):St(o)?Sc(o,t,n,a):o.toString(t,n,a);return c?St(o)||f[0]==="{"||f[0]==="["?`${c} ${f}`:`${c}
|
|
398
|
-
${t.indent}${f}`:f}function WA({key:e,value:t},n,a,s){const{allNullValues:o,doc:c,indent:f,indentStep:h,options:{commentString:m,indentSeq:b,simpleKeys:g}}=n;let x=zt(e)&&e.comment||null;if(g){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(Dt(e)||!zt(e)&&typeof e=="object"){const F="With simple keys, collection cannot be used as a key value";throw new Error(F)}}let v=!g&&(!e||x&&t==null&&!n.inFlow||Dt(e)||(St(e)?e.type===Be.BLOCK_FOLDED||e.type===Be.BLOCK_LITERAL:typeof e=="object"));n=Object.assign({},n,{allNullValues:!1,implicitKey:!v&&(g||!o),indent:f+h});let E=!1,w=!1,k=Al(e,n,()=>E=!0,()=>w=!0);if(!v&&!n.inFlow&&k.length>1024){if(g)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");v=!0}if(n.inFlow){if(o||t==null)return E&&a&&a(),k===""?"?":v?`? ${k}`:k}else if(o&&!g||t==null&&v)return k=`? ${k}`,x&&!E?k+=Xr(k,n.indent,m(x)):w&&s&&s(),k;E&&(x=null),v?(x&&(k+=Xr(k,n.indent,m(x))),k=`? ${k}
|
|
399
|
-
${f}:`):(k=`${k}:`,x&&(k+=Xr(k,n.indent,m(x))));let _,A,T;zt(t)?(_=!!t.spaceBefore,A=t.commentBefore,T=t.comment):(_=!1,A=null,T=null,t&&typeof t=="object"&&(t=c.createNode(t))),n.implicitKey=!1,!v&&!x&&St(t)&&(n.indentAtStart=k.length+1),w=!1,!b&&h.length>=2&&!n.inFlow&&!v&&Ul(t)&&!t.flow&&!t.tag&&!t.anchor&&(n.indent=n.indent.substring(2));let j=!1;const $=Al(t,n,()=>j=!0,()=>w=!0);let M=" ";if(x||_||A){if(M=_?`
|
|
400
|
-
`:"",A){const F=m(A);M+=`
|
|
401
|
-
${Na(F,n.indent)}`}$===""&&!n.inFlow?M===`
|
|
402
|
-
`&&T&&(M=`
|
|
403
|
-
|
|
404
|
-
`):M+=`
|
|
405
|
-
${n.indent}`}else if(!v&&Dt(t)){const F=$[0],H=$.indexOf(`
|
|
406
|
-
`),ee=H!==-1,L=n.inFlow??t.flow??t.items.length===0;if(ee||!L){let J=!1;if(ee&&(F==="&"||F==="!")){let ae=$.indexOf(" ");F==="&"&&ae!==-1&&ae<H&&$[ae+1]==="!"&&(ae=$.indexOf(" ",ae+1)),(ae===-1||H<ae)&&(J=!0)}J||(M=`
|
|
407
|
-
${n.indent}`)}}else($===""||$[0]===`
|
|
408
|
-
`)&&(M="");return k+=M+$,n.inFlow?j&&a&&a():T&&!j?k+=Xr(k,n.indent,m(T)):w&&s&&s(),k}function CE(e,t){(e==="debug"||e==="warn")&&console.warn(t)}const Yu="<<",Ta={identify:e=>e===Yu||typeof e=="symbol"&&e.description===Yu,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new Be(Symbol(Yu)),{addToJSMap:AE}),stringify:()=>Yu},XA=(e,t)=>(Ta.identify(t)||St(t)&&(!t.type||t.type===Be.PLAIN)&&Ta.identify(t.value))&&(e==null?void 0:e.doc.schema.tags.some(n=>n.tag===Ta.tag&&n.default));function AE(e,t,n){if(n=e&&kr(n)?n.resolve(e.doc):n,Ul(n))for(const a of n.items)bm(e,t,a);else if(Array.isArray(n))for(const a of n)bm(e,t,a);else bm(e,t,n)}function bm(e,t,n){const a=e&&kr(n)?n.resolve(e.doc):n;if(!Bl(a))throw new Error("Merge sources must be maps or map aliases");const s=a.toJSON(null,e,Map);for(const[o,c]of s)t instanceof Map?t.has(o)||t.set(o,c):t instanceof Set?t.add(o):Object.prototype.hasOwnProperty.call(t,o)||Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0});return t}function OE(e,t,{key:n,value:a}){if(zt(n)&&n.addToJSMap)n.addToJSMap(e,t,a);else if(XA(e,n))AE(e,t,a);else{const s=Ei(n,"",e);if(t instanceof Map)t.set(s,Ei(a,s,e));else if(t instanceof Set)t.add(s);else{const o=ZA(n,s,e),c=Ei(a,o,e);o in t?Object.defineProperty(t,o,{value:c,writable:!0,enumerable:!0,configurable:!0}):t[o]=c}}return t}function ZA(e,t,n){if(t===null)return"";if(typeof t!="object")return String(t);if(zt(e)&&(n!=null&&n.doc)){const a=TE(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)+'..."'),CE(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 eg(e,t,n){const a=oc(e,void 0,n),s=oc(t,void 0,n);return new bn(a,s)}class bn{constructor(t,n=null){Object.defineProperty(this,_i,{value:pE}),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 bn(n,a)}toJSON(t,n){const a=n!=null&&n.mapAsMap?new Map:{};return OE(n,a,this)}toString(t,n,a){return t!=null&&t.doc?WA(this,t,n,a):JSON.stringify(this)}}function RE(e,t,n){return(t.inFlow??e.flow?eO:JA)(e,t,n)}function JA({comment:e,items:t},n,{blockItemPrefix:a,flowChars:s,itemIndent:o,onChompKeep:c,onComment:f}){const{indent:h,options:{commentString:m}}=n,b=Object.assign({},n,{indent:o,type:null});let g=!1;const x=[];for(let E=0;E<t.length;++E){const w=t[E];let k=null;if(zt(w))!g&&w.spaceBefore&&x.push(""),_f(n,x,w.commentBefore,g),w.comment&&(k=w.comment);else if(Rt(w)){const A=zt(w.key)?w.key:null;A&&(!g&&A.spaceBefore&&x.push(""),_f(n,x,A.commentBefore,g))}g=!1;let _=Al(w,b,()=>k=null,()=>g=!0);k&&(_+=Xr(_,o,m(k))),g&&k&&(g=!1),x.push(a+_)}let v;if(x.length===0)v=s.start+s.end;else{v=x[0];for(let E=1;E<x.length;++E){const w=x[E];v+=w?`
|
|
409
|
-
${h}${w}`:`
|
|
410
|
-
`}}return e?(v+=`
|
|
411
|
-
`+Na(m(e),h),f&&f()):g&&c&&c(),v}function eO({items:e},t,{flowChars:n,itemIndent:a}){const{indent:s,indentStep:o,flowCollectionPadding:c,options:{commentString:f}}=t;a+=o;const h=Object.assign({},t,{indent:a,inFlow:!0,type:null});let m=!1,b=0;const g=[];for(let E=0;E<e.length;++E){const w=e[E];let k=null;if(zt(w))w.spaceBefore&&g.push(""),_f(t,g,w.commentBefore,!1),w.comment&&(k=w.comment);else if(Rt(w)){const A=zt(w.key)?w.key:null;A&&(A.spaceBefore&&g.push(""),_f(t,g,A.commentBefore,!1),A.comment&&(m=!0));const T=zt(w.value)?w.value:null;T?(T.comment&&(k=T.comment),T.commentBefore&&(m=!0)):w.value==null&&(A!=null&&A.comment)&&(k=A.comment)}k&&(m=!0);let _=Al(w,h,()=>k=null);m||(m=g.length>b||_.includes(`
|
|
412
|
-
`)),E<e.length-1?_+=",":t.options.trailingComma&&(t.options.lineWidth>0&&(m||(m=g.reduce((A,T)=>A+T.length+2,2)+(_.length+2)>t.options.lineWidth)),m&&(_+=",")),k&&(_+=Xr(_,a,f(k))),g.push(_),b=g.length}const{start:x,end:v}=n;if(g.length===0)return x+v;if(!m){const E=g.reduce((w,k)=>w+k.length+2,2);m=t.options.lineWidth>0&&E>t.options.lineWidth}if(m){let E=x;for(const w of g)E+=w?`
|
|
413
|
-
${o}${s}${w}`:`
|
|
414
|
-
`;return`${E}
|
|
415
|
-
${s}${v}`}else return`${x}${c}${g.join(" ")}${c}${v}`}function _f({indent:e,options:{commentString:t}},n,a,s){if(a&&s&&(a=a.replace(/^\n+/,"")),a){const o=Na(t(a),e);n.push(o.trimStart())}}function Zr(e,t){const n=St(t)?t.value:t;for(const a of e)if(Rt(a)&&(a.key===t||a.key===n||St(a.key)&&a.key.value===n))return a}class ai extends kE{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(Er,t),this.items=[]}static from(t,n,a){const{keepUndefined:s,replacer:o}=a,c=new this(t),f=(h,m)=>{if(typeof o=="function")m=o.call(n,h,m);else if(Array.isArray(o)&&!o.includes(h))return;(m!==void 0||s)&&c.items.push(eg(h,m,a))};if(n instanceof Map)for(const[h,m]of n)f(h,m);else if(n&&typeof n=="object")for(const h of Object.keys(n))f(h,n[h]);return typeof t.sortMapEntries=="function"&&c.items.sort(t.sortMapEntries),c}add(t,n){var c;let a;Rt(t)?a=t:!t||typeof t!="object"||!("key"in t)?a=new bn(t,t==null?void 0:t.value):a=new bn(t.key,t.value);const s=Zr(this.items,a.key),o=(c=this.schema)==null?void 0:c.sortMapEntries;if(s){if(!n)throw new Error(`Key ${a.key} already set`);St(s.value)&&_E(a.value)?s.value.value=a.value:s.value=a.value}else if(o){const f=this.items.findIndex(h=>o(a,h)<0);f===-1?this.items.push(a):this.items.splice(f,0,a)}else this.items.push(a)}delete(t){const n=Zr(this.items,t);return n?this.items.splice(this.items.indexOf(n),1).length>0:!1}get(t,n){const a=Zr(this.items,t),s=a==null?void 0:a.value;return(!n&&St(s)?s.value:s)??void 0}has(t){return!!Zr(this.items,t)}set(t,n){this.add(new bn(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)OE(n,s,o);return s}toString(t,n,a){if(!t)return JSON.stringify(this);for(const s of this.items)if(!Rt(s))throw new Error(`Map items must all be pairs; found ${JSON.stringify(s)} instead`);return!t.allNullValues&&this.hasAllNullValues(!1)&&(t=Object.assign({},t,{allNullValues:!0})),RE(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:a,onComment:n})}}const $l={collection:"map",default:!0,nodeClass:ai,tag:"tag:yaml.org,2002:map",resolve(e,t){return Bl(e)||t("Expected a mapping for this tag"),e},createNode:(e,t,n)=>ai.from(e,t,n)};class Sr extends kE{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(Il,t),this.items=[]}add(t){this.items.push(t)}delete(t){const n=Vu(t);return typeof n!="number"?!1:this.items.splice(n,1).length>0}get(t,n){const a=Vu(t);if(typeof a!="number")return;const s=this.items[a];return!n&&St(s)?s.value:s}has(t){const n=Vu(t);return typeof n=="number"&&n<this.items.length}set(t,n){const a=Vu(t);if(typeof a!="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[a];St(s)&&_E(n)?s.value=n:this.items[a]=n}toJSON(t,n){const a=[];n!=null&&n.onCreate&&n.onCreate(a);let s=0;for(const o of this.items)a.push(Ei(o,String(s++),n));return a}toString(t,n,a){return t?RE(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:a,onComment:n}):JSON.stringify(this)}static from(t,n,a){const{replacer:s}=a,o=new this(t);if(n&&Symbol.iterator in Object(n)){let c=0;for(let f of n){if(typeof s=="function"){const h=n instanceof Set?f:String(c++);f=s.call(n,h,f)}o.items.push(oc(f,void 0,a))}}return o}}function Vu(e){let t=St(e)?e.value:e;return t&&typeof t=="string"&&(t=Number(t)),typeof t=="number"&&Number.isInteger(t)&&t>=0?t:null}const Fl={collection:"seq",default:!0,nodeClass:Sr,tag:"tag:yaml.org,2002:seq",resolve(e,t){return Ul(e)||t("Expected a sequence for this tag"),e},createNode:(e,t,n)=>Sr.from(e,t,n)},Kf={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),Sc(e,t,n,a)}},Gf={identify:e=>e==null,createNode:()=>new Be(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new Be(null),stringify:({source:e},t)=>typeof e=="string"&&Gf.test.test(e)?e:t.options.nullStr},tg={identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:e=>new Be(e[0]==="t"||e[0]==="T"),stringify({source:e,value:t},n){if(e&&tg.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 Ii({format:e,minFractionDigits:t,tag:n,value:a}){if(typeof a=="bigint")return String(a);const s=typeof a=="number"?a:Number(a);if(!isFinite(s))return isNaN(s)?".nan":s<0?"-.inf":".inf";let o=Object.is(a,-0)?"-0":JSON.stringify(a);if(!e&&t&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let c=o.indexOf(".");c<0&&(c=o.length,o+=".");let f=t-(o.length-c-1);for(;f-- >0;)o+="0"}return o}const ME={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:Ii},jE={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():Ii(e)}},DE={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 Be(parseFloat(e)),n=e.indexOf(".");return n!==-1&&e[e.length-1]==="0"&&(t.minFractionDigits=e.length-n-1),t},stringify:Ii},Qf=e=>typeof e=="bigint"||Number.isInteger(e),ng=(e,t,n,{intAsBigInt:a})=>a?BigInt(e):parseInt(e.substring(t),n);function LE(e,t,n){const{value:a}=e;return Qf(a)&&a>=0?n+a.toString(t):Ii(e)}const zE={identify:e=>Qf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(e,t,n)=>ng(e,2,8,n),stringify:e=>LE(e,8,"0o")},IE={identify:Qf,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(e,t,n)=>ng(e,0,10,n),stringify:Ii},BE={identify:e=>Qf(e)&&e>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(e,t,n)=>ng(e,2,16,n),stringify:e=>LE(e,16,"0x")},tO=[$l,Fl,Kf,Gf,tg,zE,IE,BE,ME,jE,DE];function Vv(e){return typeof e=="bigint"||Number.isInteger(e)}const Wu=({value:e})=>JSON.stringify(e),nO=[{identify:e=>typeof e=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:e=>e,stringify:Wu},{identify:e=>e==null,createNode:()=>new Be(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:Wu},{identify:e=>typeof e=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:e=>e==="true",stringify:Wu},{identify:Vv,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})=>Vv(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:Wu}],iO={default:!0,tag:"",test:/^/,resolve(e,t){return t(`Unresolved plain scalar ${JSON.stringify(e)}`),e}},aO=[$l,Fl].concat(nO,iO),ig={identify:e=>e instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(e,t){if(typeof atob=="function"){const n=atob(e.replace(/[\n\r]/g,"")),a=new Uint8Array(n.length);for(let s=0;s<n.length;++s)a[s]=n.charCodeAt(s);return a}else return t("This environment does not support reading binary tags; either Buffer or atob is required"),e},stringify({comment:e,type:t,value:n},a,s,o){if(!n)return"";const c=n;let f;if(typeof btoa=="function"){let h="";for(let m=0;m<c.length;++m)h+=String.fromCharCode(c[m]);f=btoa(h)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(t??(t=Be.BLOCK_LITERAL),t!==Be.QUOTE_DOUBLE){const h=Math.max(a.options.lineWidth-a.indent.length,a.options.minContentWidth),m=Math.ceil(f.length/h),b=new Array(m);for(let g=0,x=0;g<m;++g,x+=h)b[g]=f.substr(x,h);f=b.join(t===Be.BLOCK_LITERAL?`
|
|
416
|
-
`:" ")}return Sc({comment:e,type:t,value:f},a,s,o)}};function UE(e,t){if(Ul(e))for(let n=0;n<e.items.length;++n){let a=e.items[n];if(!Rt(a)){if(Bl(a)){a.items.length>1&&t("Each pair must have its own sequence indicator");const s=a.items[0]||new bn(new Be(null));if(a.commentBefore&&(s.key.commentBefore=s.key.commentBefore?`${a.commentBefore}
|
|
417
|
-
${s.key.commentBefore}`:a.commentBefore),a.comment){const o=s.value??s.key;o.comment=o.comment?`${a.comment}
|
|
418
|
-
${o.comment}`:a.comment}a=s}e.items[n]=Rt(a)?a:new bn(a)}}else t("Expected a sequence for this tag");return e}function $E(e,t,n){const{replacer:a}=n,s=new Sr(e);s.tag="tag:yaml.org,2002:pairs";let o=0;if(t&&Symbol.iterator in Object(t))for(let c of t){typeof a=="function"&&(c=a.call(t,String(o++),c));let f,h;if(Array.isArray(c))if(c.length===2)f=c[0],h=c[1];else throw new TypeError(`Expected [key, value] tuple: ${c}`);else if(c&&c instanceof Object){const m=Object.keys(c);if(m.length===1)f=m[0],h=c[f];else throw new TypeError(`Expected tuple with one key, not ${m.length} keys`)}else f=c;s.items.push(eg(f,h,n))}return s}const ag={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:UE,createNode:$E};class hl extends Sr{constructor(){super(),this.add=ai.prototype.add.bind(this),this.delete=ai.prototype.delete.bind(this),this.get=ai.prototype.get.bind(this),this.has=ai.prototype.has.bind(this),this.set=ai.prototype.set.bind(this),this.tag=hl.tag}toJSON(t,n){if(!n)return super.toJSON(t);const a=new Map;n!=null&&n.onCreate&&n.onCreate(a);for(const s of this.items){let o,c;if(Rt(s)?(o=Ei(s.key,"",n),c=Ei(s.value,o,n)):o=Ei(s,"",n),a.has(o))throw new Error("Ordered maps must not include duplicate keys");a.set(o,c)}return a}static from(t,n,a){const s=$E(t,n,a),o=new this;return o.items=s.items,o}}hl.tag="tag:yaml.org,2002:omap";const rg={collection:"seq",identify:e=>e instanceof Map,nodeClass:hl,default:!1,tag:"tag:yaml.org,2002:omap",resolve(e,t){const n=UE(e,t),a=[];for(const{key:s}of n.items)St(s)&&(a.includes(s.value)?t(`Ordered maps must not include duplicate keys: ${s.value}`):a.push(s.value));return Object.assign(new hl,n)},createNode:(e,t,n)=>hl.from(e,t,n)};function FE({value:e,source:t},n){return t&&(e?PE:qE).test.test(t)?t:e?n.options.trueStr:n.options.falseStr}const PE={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 Be(!0),stringify:FE},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 Be(!1),stringify:FE},rO={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:Ii},sO={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():Ii(e)}},lO={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 Be(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:Ii},wc=e=>typeof e=="bigint"||Number.isInteger(e);function Yf(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 sg(e,t,n){const{value:a}=e;if(wc(a)){const s=a.toString(t);return a<0?"-"+n+s.substr(1):n+s}return Ii(e)}const oO={identify:wc,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(e,t,n)=>Yf(e,2,2,n),stringify:e=>sg(e,2,"0b")},cO={identify:wc,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(e,t,n)=>Yf(e,1,8,n),stringify:e=>sg(e,8,"0")},uO={identify:wc,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(e,t,n)=>Yf(e,0,10,n),stringify:Ii},fO={identify:wc,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(e,t,n)=>Yf(e,2,16,n),stringify:e=>sg(e,16,"0x")};class ml extends ai{constructor(t){super(t),this.tag=ml.tag}add(t){let n;Rt(t)?n=t:t&&typeof t=="object"&&"key"in t&&"value"in t&&t.value===null?n=new bn(t.key,null):n=new bn(t,null),Zr(this.items,n.key)||this.items.push(n)}get(t,n){const a=Zr(this.items,t);return!n&&Rt(a)?St(a.key)?a.key.value:a.key:a}set(t,n){if(typeof n!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof n}`);const a=Zr(this.items,t);a&&!n?this.items.splice(this.items.indexOf(a),1):!a&&n&&this.items.push(new bn(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(eg(c,null,a));return o}}ml.tag="tag:yaml.org,2002:set";const lg={collection:"map",identify:e=>e instanceof Set,nodeClass:ml,default:!1,tag:"tag:yaml.org,2002:set",createNode:(e,t,n)=>ml.from(e,t,n),resolve(e,t){if(Bl(e)){if(e.hasAllNullValues(!0))return Object.assign(new ml,e);t("Set items must all have null values")}else t("Expected a mapping for this tag");return e}};function og(e,t){const n=e[0],a=n==="-"||n==="+"?e.substring(1):e,s=c=>t?BigInt(c):Number(c),o=a.replace(/_/g,"").split(":").reduce((c,f)=>c*s(60)+s(f),s(0));return n==="-"?s(-1)*o:o}function HE(e){let{value:t}=e,n=c=>c;if(typeof t=="bigint")n=c=>BigInt(c);else if(isNaN(t)||!isFinite(t))return Ii(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 KE={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})=>og(e,n),stringify:HE},GE={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=>og(e,!1),stringify:HE},Vf={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(Vf.test);if(!t)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,a,s,o,c,f]=t.map(Number),h=t[7]?Number((t[7]+"00").substr(1,3)):0;let m=Date.UTC(n,a-1,s,o||0,c||0,f||0,h);const b=t[8];if(b&&b!=="Z"){let g=og(b,!1);Math.abs(g)<30&&(g*=60),m-=6e4*g}return new Date(m)},stringify:({value:e})=>(e==null?void 0:e.toISOString().replace(/(T00:00:00)?\.000Z$/,""))??""},Wv=[$l,Fl,Kf,Gf,PE,qE,oO,cO,uO,fO,rO,sO,lO,ig,Ta,rg,ag,lg,KE,GE,Vf],Xv=new Map([["core",tO],["failsafe",[$l,Fl,Kf]],["json",aO],["yaml11",Wv],["yaml-1.1",Wv]]),Zv={binary:ig,bool:tg,float:DE,floatExp:jE,floatNaN:ME,floatTime:GE,int:IE,intHex:BE,intOct:zE,intTime:KE,map:$l,merge:Ta,null:Gf,omap:rg,pairs:ag,seq:Fl,set:lg,timestamp:Vf},dO={"tag:yaml.org,2002:binary":ig,"tag:yaml.org,2002:merge":Ta,"tag:yaml.org,2002:omap":rg,"tag:yaml.org,2002:pairs":ag,"tag:yaml.org,2002:set":lg,"tag:yaml.org,2002:timestamp":Vf};function ym(e,t,n){const a=Xv.get(t);if(a&&!e)return n&&!a.includes(Ta)?a.concat(Ta):a.slice();let s=a;if(!s)if(Array.isArray(e))s=[];else{const o=Array.from(Xv.keys()).filter(c=>c!=="yaml11").map(c=>JSON.stringify(c)).join(", ");throw new Error(`Unknown schema "${t}"; use one of ${o} or define customTags array`)}if(Array.isArray(e))for(const o of e)s=s.concat(o);else typeof e=="function"&&(s=e(s.slice()));return n&&(s=s.concat(Ta)),s.reduce((o,c)=>{const f=typeof c=="string"?Zv[c]:c;if(!f){const h=JSON.stringify(c),m=Object.keys(Zv).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${h}; use one of ${m}`)}return o.includes(f)||o.push(f),o},[])}const hO=(e,t)=>e.key<t.key?-1:e.key>t.key?1:0;let QE=class YE{constructor({compat:t,customTags:n,merge:a,resolveKnownTags:s,schema:o,sortMapEntries:c,toStringDefaults:f}){this.compat=Array.isArray(t)?ym(t,"compat"):t?ym(null,t):null,this.name=typeof o=="string"&&o||"core",this.knownTags=s?dO:{},this.tags=ym(n,this.name,a),this.toStringOptions=f??null,Object.defineProperty(this,Er,{value:$l}),Object.defineProperty(this,Zi,{value:Kf}),Object.defineProperty(this,Il,{value:Fl}),this.sortMapEntries=typeof c=="function"?c:c===!0?hO:null}clone(){const t=Object.create(YE.prototype,Object.getOwnPropertyDescriptors(this));return t.tags=this.tags.slice(),t}};function mO(e,t){var h;const n=[];let a=t.directives===!0;if(t.directives!==!1&&e.directives){const m=e.directives.toString(e);m?(n.push(m),a=!0):e.directives.docStart&&(a=!0)}a&&n.push("---");const s=TE(e,t),{commentString:o}=s.options;if(e.commentBefore){n.length!==1&&n.unshift("");const m=o(e.commentBefore);n.unshift(Na(m,""))}let c=!1,f=null;if(e.contents){if(zt(e.contents)){if(e.contents.spaceBefore&&a&&n.push(""),e.contents.commentBefore){const g=o(e.contents.commentBefore);n.push(Na(g,""))}s.forceBlockIndent=!!e.comment,f=e.contents.comment}const m=f?void 0:()=>c=!0;let b=Al(e.contents,s,()=>f=null,m);f&&(b+=Xr(b,"",o(f))),(b[0]==="|"||b[0]===">")&&n[n.length-1]==="---"?n[n.length-1]=`--- ${b}`:n.push(b)}else n.push(Al(e.contents,s));if((h=e.directives)!=null&&h.docEnd)if(e.comment){const m=o(e.comment);m.includes(`
|
|
419
|
-
`)?(n.push("..."),n.push(Na(m,""))):n.push(`... ${m}`)}else n.push("...");else{let m=e.comment;m&&c&&(m=m.replace(/^\n+/,"")),m&&((!c||f)&&n[n.length-1]!==""&&n.push(""),n.push(Na(o(m),"")))}return n.join(`
|
|
420
|
-
`)+`
|
|
421
|
-
`}class Pl{constructor(t,n,a){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,_i,{value:mp});let s=null;typeof n=="function"||Array.isArray(n)?s=n:a===void 0&&n&&(a=n,n=void 0);const o=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},a);this.options=o;let{version:c}=o;a!=null&&a._directives?(this.directives=a._directives.atDocument(),this.directives.yaml.explicit&&(c=this.directives.yaml.version)):this.directives=new Nn({version:c}),this.setSchema(c,a),this.contents=t===void 0?null:this.createNode(t,s,a)}clone(){const t=Object.create(Pl.prototype,{[_i]:{value:mp}});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){nl(this.contents)&&this.contents.add(t)}addIn(t,n){nl(this.contents)&&this.contents.addIn(t,n)}createAlias(t,n){if(!t.anchor){const a=SE(this);t.anchor=!n||a.has(n)?wE(n||"a",a):n}return new Ff(t.anchor)}createNode(t,n,a){let s;if(typeof n=="function")t=n.call({"":t},"",t),s=n;else if(Array.isArray(n)){const k=A=>typeof A=="number"||A instanceof String||A instanceof Number,_=n.filter(k).map(String);_.length>0&&(n=n.concat(_)),s=n}else a===void 0&&n&&(a=n,n=void 0);const{aliasDuplicateObjects:o,anchorPrefix:c,flow:f,keepUndefined:h,onTagObj:m,tag:b}=a??{},{onAnchor:g,setAnchors:x,sourceObjects:v}=PA(this,c||"a"),E={aliasDuplicateObjects:o??!0,keepUndefined:h??!1,onAnchor:g,onTagObj:m,replacer:s,schema:this.schema,sourceObjects:v},w=oc(t,b,E);return f&&Dt(w)&&(w.flow=!0),x(),w}createPair(t,n,a={}){const s=this.createNode(t,null,a),o=this.createNode(n,null,a);return new bn(s,o)}delete(t){return nl(this.contents)?this.contents.delete(t):!1}deleteIn(t){return Xo(t)?this.contents==null?!1:(this.contents=null,!0):nl(this.contents)?this.contents.deleteIn(t):!1}get(t,n){return Dt(this.contents)?this.contents.get(t,n):void 0}getIn(t,n){return Xo(t)?!n&&St(this.contents)?this.contents.value:this.contents:Dt(this.contents)?this.contents.getIn(t,n):void 0}has(t){return Dt(this.contents)?this.contents.has(t):!1}hasIn(t){return Xo(t)?this.contents!==void 0:Dt(this.contents)?this.contents.hasIn(t):!1}set(t,n){this.contents==null?this.contents=wf(this.schema,[t],n):nl(this.contents)&&this.contents.set(t,n)}setIn(t,n){Xo(t)?this.contents=n:this.contents==null?this.contents=wf(this.schema,Array.from(t),n):nl(this.contents)&&this.contents.setIn(t,n)}setSchema(t,n={}){typeof t=="number"&&(t=String(t));let a;switch(t){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Nn({version:"1.1"}),a={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=t:this.directives=new Nn({version:t}),a={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,a=null;break;default:{const s=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${s}`)}}if(n.schema instanceof Object)this.schema=n.schema;else if(a)this.schema=new QE(Object.assign(a,n));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:t,jsonArg:n,mapAsMap:a,maxAliasCount:s,onAnchor:o,reviver:c}={}){const f={anchors:new Map,doc:this,keep:!t,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof s=="number"?s:100},h=Ei(this.contents,n??"",f);if(typeof o=="function")for(const{count:m,res:b}of f.anchors.values())o(b,m);return typeof c=="function"?fl(c,{"":h},"",h):h}toJSON(t,n){return this.toJS({json:!0,jsonArg:t,mapAsMap:!1,onAnchor:n})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const n=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${n}`)}return mO(this,t)}}function nl(e){if(Dt(e))return!0;throw new Error("Expected a YAML collection as document contents")}class cg extends Error{constructor(t,n,a,s){super(),this.name=t,this.code=a,this.message=s,this.pos=n}}class Jr extends cg{constructor(t,n,a){super("YAMLParseError",t,n,a)}}class VE extends cg{constructor(t,n,a){super("YAMLWarning",t,n,a)}}const kf=(e,t)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map(f=>t.linePos(f));const{line:a,col:s}=n.linePos[0];n.message+=` at line ${a}, column ${s}`;let o=s-1,c=e.substring(t.lineStarts[a-1],t.lineStarts[a]).replace(/[\n\r]+$/,"");if(o>=60&&c.length>80){const f=Math.min(o-39,c.length-79);c="…"+c.substring(f),o-=f-1}if(c.length>80&&(c=c.substring(0,79)+"…"),a>1&&/^ *$/.test(c.substring(0,o))){let f=e.substring(t.lineStarts[a-2],t.lineStarts[a-1]);f.length>80&&(f=f.substring(0,79)+`…
|
|
422
|
-
`),c=f+c}if(/[^ ]/.test(c)){let f=1;const h=n.linePos[1];(h==null?void 0:h.line)===a&&h.col>s&&(f=Math.max(1,Math.min(h.col-s,80-o)));const m=" ".repeat(o)+"^".repeat(f);n.message+=`:
|
|
423
|
-
|
|
424
|
-
${c}
|
|
425
|
-
${m}
|
|
426
|
-
`}};function Ol(e,{flow:t,indicator:n,next:a,offset:s,onError:o,parentIndent:c,startOnNewline:f}){let h=!1,m=f,b=f,g="",x="",v=!1,E=!1,w=null,k=null,_=null,A=null,T=null,j=null,$=null;for(const H of e)switch(E&&(H.type!=="space"&&H.type!=="newline"&&H.type!=="comma"&&o(H.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),E=!1),w&&(m&&H.type!=="comment"&&H.type!=="newline"&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),H.type){case"space":!t&&(n!=="doc-start"||(a==null?void 0:a.type)!=="flow-collection")&&H.source.includes(" ")&&(w=H),b=!0;break;case"comment":{b||o(H,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const ee=H.source.substring(1)||" ";g?g+=x+ee:g=ee,x="",m=!1;break}case"newline":m?g?g+=H.source:(!j||n!=="seq-item-ind")&&(h=!0):x+=H.source,m=!0,v=!0,(k||_)&&(A=H),b=!0;break;case"anchor":k&&o(H,"MULTIPLE_ANCHORS","A node can have at most one anchor"),H.source.endsWith(":")&&o(H.offset+H.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),k=H,$??($=H.offset),m=!1,b=!1,E=!0;break;case"tag":{_&&o(H,"MULTIPLE_TAGS","A node can have at most one tag"),_=H,$??($=H.offset),m=!1,b=!1,E=!0;break}case n:(k||_)&&o(H,"BAD_PROP_ORDER",`Anchors and tags must be after the ${H.source} indicator`),j&&o(H,"UNEXPECTED_TOKEN",`Unexpected ${H.source} in ${t??"collection"}`),j=H,m=n==="seq-item-ind"||n==="explicit-key-ind",b=!1;break;case"comma":if(t){T&&o(H,"UNEXPECTED_TOKEN",`Unexpected , in ${t}`),T=H,m=!1,b=!1;break}default:o(H,"UNEXPECTED_TOKEN",`Unexpected ${H.type} token`),m=!1,b=!1}const M=e[e.length-1],F=M?M.offset+M.source.length:s;return E&&a&&a.type!=="space"&&a.type!=="newline"&&a.type!=="comma"&&(a.type!=="scalar"||a.source!=="")&&o(a.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(m&&w.indent<=c||(a==null?void 0:a.type)==="block-map"||(a==null?void 0:a.type)==="block-seq")&&o(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:j,spaceBefore:h,comment:g,hasNewline:v,anchor:k,tag:_,newlineAfterProp:A,end:F,start:$??F}}function cc(e){if(!e)return null;switch(e.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(e.source.includes(`
|
|
427
|
-
`))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(cc(t.key)||cc(t.value))return!0}return!1;default:return!0}}function yp(e,t,n){if((t==null?void 0:t.type)==="flow-collection"){const a=t.end[0];a.indent===e&&(a.source==="]"||a.source==="}")&&cc(t)&&n(a,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function WE(e,t,n){const{uniqueKeys:a}=e.options;if(a===!1)return!1;const s=typeof a=="function"?a:(o,c)=>o===c||St(o)&&St(c)&&o.value===c.value;return t.some(o=>s(o.key,n))}const Jv="All mapping items must start at the same column";function pO({composeNode:e,composeEmptyNode:t},n,a,s,o){var b;const c=(o==null?void 0:o.nodeClass)??ai,f=new c(n.schema);n.atRoot&&(n.atRoot=!1);let h=a.offset,m=null;for(const g of a.items){const{start:x,key:v,sep:E,value:w}=g,k=Ol(x,{indicator:"explicit-key-ind",next:v??(E==null?void 0:E[0]),offset:h,onError:s,parentIndent:a.indent,startOnNewline:!0}),_=!k.found;if(_){if(v&&(v.type==="block-seq"?s(h,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in v&&v.indent!==a.indent&&s(h,"BAD_INDENT",Jv)),!k.anchor&&!k.tag&&!E){m=k.end,k.comment&&(f.comment?f.comment+=`
|
|
428
|
-
`+k.comment:f.comment=k.comment);continue}(k.newlineAfterProp||cc(v))&&s(v??x[x.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else((b=k.found)==null?void 0:b.indent)!==a.indent&&s(h,"BAD_INDENT",Jv);n.atKey=!0;const A=k.end,T=v?e(n,v,k,s):t(n,A,x,null,k,s);n.schema.compat&&yp(a.indent,v,s),n.atKey=!1,WE(n,f.items,T)&&s(A,"DUPLICATE_KEY","Map keys must be unique");const j=Ol(E??[],{indicator:"map-value-ind",next:w,offset:T.range[2],onError:s,parentIndent:a.indent,startOnNewline:!v||v.type==="block-scalar"});if(h=j.end,j.found){_&&((w==null?void 0:w.type)==="block-map"&&!j.hasNewline&&s(h,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),n.options.strict&&k.start<j.found.offset-1024&&s(T.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const $=w?e(n,w,j,s):t(n,h,E,null,j,s);n.schema.compat&&yp(a.indent,w,s),h=$.range[2];const M=new bn(T,$);n.options.keepSourceTokens&&(M.srcToken=g),f.items.push(M)}else{_&&s(T.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),j.comment&&(T.comment?T.comment+=`
|
|
429
|
-
`+j.comment:T.comment=j.comment);const $=new bn(T);n.options.keepSourceTokens&&($.srcToken=g),f.items.push($)}}return m&&m<h&&s(m,"IMPOSSIBLE","Map comment with trailing content"),f.range=[a.offset,h,m??h],f}function gO({composeNode:e,composeEmptyNode:t},n,a,s,o){const c=(o==null?void 0:o.nodeClass)??Sr,f=new c(n.schema);n.atRoot&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let h=a.offset,m=null;for(const{start:b,value:g}of a.items){const x=Ol(b,{indicator:"seq-item-ind",next:g,offset:h,onError:s,parentIndent:a.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||g)(g==null?void 0:g.type)==="block-seq"?s(x.end,"BAD_INDENT","All sequence items must start at the same column"):s(h,"MISSING_CHAR","Sequence item without - indicator");else{m=x.end,x.comment&&(f.comment=x.comment);continue}const v=g?e(n,g,x,s):t(n,x.end,b,null,x,s);n.schema.compat&&yp(a.indent,g,s),h=v.range[2],f.items.push(v)}return f.range=[a.offset,h,m??h],f}function _c(e,t,n,a){let s="";if(e){let o=!1,c="";for(const f of e){const{source:h,type:m}=f;switch(m){case"space":o=!0;break;case"comment":{n&&!o&&a(f,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=h.substring(1)||" ";s?s+=c+b:s=b,c="";break}case"newline":s&&(c+=h),o=!0;break;default:a(f,"UNEXPECTED_TOKEN",`Unexpected ${m} at node end`)}t+=h.length}}return{comment:s,offset:t}}const xm="Block collections are not allowed within flow collections",vm=e=>e&&(e.type==="block-map"||e.type==="block-seq");function bO({composeNode:e,composeEmptyNode:t},n,a,s,o){var k;const c=a.start.source==="{",f=c?"flow map":"flow sequence",h=(o==null?void 0:o.nodeClass)??(c?ai:Sr),m=new h(n.schema);m.flow=!0;const b=n.atRoot;b&&(n.atRoot=!1),n.atKey&&(n.atKey=!1);let g=a.offset+a.start.source.length;for(let _=0;_<a.items.length;++_){const A=a.items[_],{start:T,key:j,sep:$,value:M}=A,F=Ol(T,{flow:f,indicator:"explicit-key-ind",next:j??($==null?void 0:$[0]),offset:g,onError:s,parentIndent:a.indent,startOnNewline:!1});if(!F.found){if(!F.anchor&&!F.tag&&!$&&!M){_===0&&F.comma?s(F.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`):_<a.items.length-1&&s(F.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${f}`),F.comment&&(m.comment?m.comment+=`
|
|
430
|
-
`+F.comment:m.comment=F.comment),g=F.end;continue}!c&&n.options.strict&&cc(j)&&s(j,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)F.comma&&s(F.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${f}`);else if(F.comma||s(F.start,"MISSING_CHAR",`Missing , between ${f} items`),F.comment){let H="";e:for(const ee of T)switch(ee.type){case"comma":case"space":break;case"comment":H=ee.source.substring(1);break e;default:break e}if(H){let ee=m.items[m.items.length-1];Rt(ee)&&(ee=ee.value??ee.key),ee.comment?ee.comment+=`
|
|
431
|
-
`+H:ee.comment=H,F.comment=F.comment.substring(H.length+1)}}if(!c&&!$&&!F.found){const H=M?e(n,M,F,s):t(n,F.end,$,null,F,s);m.items.push(H),g=H.range[2],vm(M)&&s(H.range,"BLOCK_IN_FLOW",xm)}else{n.atKey=!0;const H=F.end,ee=j?e(n,j,F,s):t(n,H,T,null,F,s);vm(j)&&s(ee.range,"BLOCK_IN_FLOW",xm),n.atKey=!1;const L=Ol($??[],{flow:f,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($)for(const ge of $){if(ge===L.found)break;if(ge.type==="newline"){s(ge,"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&&((k=M.source)==null?void 0:k[0])===":"?s(M,"MISSING_CHAR",`Missing space after : in ${f}`):s(L.start,"MISSING_CHAR",`Missing , or : between ${f} items`));const J=M?e(n,M,L,s):L.found?t(n,L.end,$,null,L,s):null;J?vm(M)&&s(J.range,"BLOCK_IN_FLOW",xm):L.comment&&(ee.comment?ee.comment+=`
|
|
432
|
-
`+L.comment:ee.comment=L.comment);const ae=new bn(ee,J);if(n.options.keepSourceTokens&&(ae.srcToken=A),c){const ge=m;WE(n,ge.items,ee)&&s(H,"DUPLICATE_KEY","Map keys must be unique"),ge.items.push(ae)}else{const ge=new ai(n.schema);ge.flow=!0,ge.items.push(ae);const fe=(J??ee).range;ge.range=[ee.range[0],fe[1],fe[2]],m.items.push(ge)}g=J?J.range[2]:L.end}}const x=c?"}":"]",[v,...E]=a.end;let w=g;if((v==null?void 0:v.source)===x)w=v.offset+v.source.length;else{const _=f[0].toUpperCase()+f.substring(1),A=b?`${_} must end with a ${x}`:`${_} in block collection must be sufficiently indented and end with a ${x}`;s(g,b?"MISSING_CHAR":"BAD_INDENT",A),v&&v.source.length!==1&&E.unshift(v)}if(E.length>0){const _=_c(E,w,n.options.strict,s);_.comment&&(m.comment?m.comment+=`
|
|
433
|
-
`+_.comment:m.comment=_.comment),m.range=[a.offset,w,_.offset]}else m.range=[a.offset,w,w];return m}function Em(e,t,n,a,s,o){const c=n.type==="block-map"?pO(e,t,n,a,o):n.type==="block-seq"?gO(e,t,n,a,o):bO(e,t,n,a,o),f=c.constructor;return s==="!"||s===f.tagName?(c.tag=f.tagName,c):(s&&(c.tag=s),c)}function yO(e,t,n,a,s){var x;const o=a.tag,c=o?t.directives.tagName(o.source,v=>s(o,"TAG_RESOLVE_FAILED",v)):null;if(n.type==="block-seq"){const{anchor:v,newlineAfterProp:E}=a,w=v&&o?v.offset>o.offset?v:o:v??o;w&&(!E||E.offset<w.offset)&&s(w,"MISSING_CHAR","Missing newline after block sequence props")}const f=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!o||!c||c==="!"||c===ai.tagName&&f==="map"||c===Sr.tagName&&f==="seq")return Em(e,t,n,s,c);let h=t.schema.tags.find(v=>v.tag===c&&v.collection===f);if(!h){const v=t.schema.knownTags[c];if((v==null?void 0:v.collection)===f)t.schema.tags.push(Object.assign({},v,{default:!1})),h=v;else return v?s(o,"BAD_COLLECTION_TYPE",`${v.tag} used for ${f} collection, but expects ${v.collection??"scalar"}`,!0):s(o,"TAG_RESOLVE_FAILED",`Unresolved tag: ${c}`,!0),Em(e,t,n,s,c)}const m=Em(e,t,n,s,c,h),b=((x=h.resolve)==null?void 0:x.call(h,m,v=>s(o,"TAG_RESOLVE_FAILED",v),t.options))??m,g=zt(b)?b:new Be(b);return g.range=m.range,g.tag=c,h!=null&&h.format&&(g.format=h.format),g}function XE(e,t,n){const a=t.offset,s=xO(t,e.options.strict,n);if(!s)return{value:"",type:null,comment:"",range:[a,a,a]};const o=s.mode===">"?Be.BLOCK_FOLDED:Be.BLOCK_LITERAL,c=t.source?vO(t.source):[];let f=c.length;for(let w=c.length-1;w>=0;--w){const k=c[w][1];if(k===""||k==="\r")f=w;else break}if(f===0){const w=s.chomp==="+"&&c.length>0?`
|
|
434
|
-
`.repeat(Math.max(1,c.length-1)):"";let k=a+s.length;return t.source&&(k+=t.source.length),{value:w,type:o,comment:s.comment,range:[a,k,k]}}let h=t.indent+s.indent,m=t.offset+s.length,b=0;for(let w=0;w<f;++w){const[k,_]=c[w];if(_===""||_==="\r")s.indent===0&&k.length>h&&(h=k.length);else{k.length<h&&n(m+k.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),s.indent===0&&(h=k.length),b=w,h===0&&!e.atRoot&&n(m,"BAD_INDENT","Block scalar values in collections must be indented");break}m+=k.length+_.length+1}for(let w=c.length-1;w>=f;--w)c[w][0].length>h&&(f=w+1);let g="",x="",v=!1;for(let w=0;w<b;++w)g+=c[w][0].slice(h)+`
|
|
435
|
-
`;for(let w=b;w<f;++w){let[k,_]=c[w];m+=k.length+_.length+1;const A=_[_.length-1]==="\r";if(A&&(_=_.slice(0,-1)),_&&k.length<h){const j=`Block scalar lines must not be less indented than their ${s.indent?"explicit indentation indicator":"first line"}`;n(m-_.length-(A?2:1),"BAD_INDENT",j),k=""}o===Be.BLOCK_LITERAL?(g+=x+k.slice(h)+_,x=`
|
|
436
|
-
`):k.length>h||_[0]===" "?(x===" "?x=`
|
|
437
|
-
`:!v&&x===`
|
|
438
|
-
`&&(x=`
|
|
439
|
-
|
|
440
|
-
`),g+=x+k.slice(h)+_,x=`
|
|
441
|
-
`,v=!0):_===""?x===`
|
|
442
|
-
`?g+=`
|
|
443
|
-
`:x=`
|
|
444
|
-
`:(g+=x+_,x=" ",v=!1)}switch(s.chomp){case"-":break;case"+":for(let w=f;w<c.length;++w)g+=`
|
|
445
|
-
`+c[w][0].slice(h);g[g.length-1]!==`
|
|
446
|
-
`&&(g+=`
|
|
447
|
-
`);break;default:g+=`
|
|
448
|
-
`}const E=a+s.length+t.source.length;return{value:g,type:o,comment:s.comment,range:[a,E,E]}}function xO({offset:e,props:t},n,a){if(t[0].type!=="block-scalar-header")return a(t[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:s}=t[0],o=s[0];let c=0,f="",h=-1;for(let x=1;x<s.length;++x){const v=s[x];if(!f&&(v==="-"||v==="+"))f=v;else{const E=Number(v);!c&&E?c=E:h===-1&&(h=e+x)}}h!==-1&&a(h,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${s}`);let m=!1,b="",g=s.length;for(let x=1;x<t.length;++x){const v=t[x];switch(v.type){case"space":m=!0;case"newline":g+=v.source.length;break;case"comment":n&&!m&&a(v,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),g+=v.source.length,b=v.source.substring(1);break;case"error":a(v,"UNEXPECTED_TOKEN",v.message),g+=v.source.length;break;default:{const E=`Unexpected token in block scalar header: ${v.type}`;a(v,"UNEXPECTED_TOKEN",E);const w=v.source;w&&typeof w=="string"&&(g+=w.length)}}}return{mode:o,indent:c,chomp:f,comment:b,length:g}}function vO(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 ZE(e,t,n){const{offset:a,type:s,source:o,end:c}=e;let f,h;const m=(x,v,E)=>n(a+x,v,E);switch(s){case"scalar":f=Be.PLAIN,h=EO(o,m);break;case"single-quoted-scalar":f=Be.QUOTE_SINGLE,h=SO(o,m);break;case"double-quoted-scalar":f=Be.QUOTE_DOUBLE,h=wO(o,m);break;default:return n(e,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${s}`),{value:"",type:null,comment:"",range:[a,a+o.length,a+o.length]}}const b=a+o.length,g=_c(c,b,t,n);return{value:h,type:f,comment:g.comment,range:[a,b,g.offset]}}function EO(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}`),JE(e)}function SO(e,t){return(e[e.length-1]!=="'"||e.length===1)&&t(e.length,"MISSING_CHAR","Missing closing 'quote"),JE(e.slice(1,-1)).replace(/''/g,"'")}function JE(e){let t,n;try{t=new RegExp(`(.*?)(?<![ ])[ ]*\r?
|
|
449
|
-
`,"sy"),n=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
|
|
450
|
-
`,"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===`
|
|
451
|
-
`?s+=o:o=`
|
|
452
|
-
`:(s+=o+a[1],o=" "),c=n.lastIndex;const f=/[ \t]*(.*)/sy;return f.lastIndex=c,a=f.exec(e),s+o+((a==null?void 0:a[1])??"")}function wO(e,t){let n="";for(let a=1;a<e.length-1;++a){const s=e[a];if(!(s==="\r"&&e[a+1]===`
|
|
453
|
-
`))if(s===`
|
|
454
|
-
`){const{fold:o,offset:c}=_O(e,a);n+=o,a=c}else if(s==="\\"){let o=e[++a];const c=kO[o];if(c)n+=c;else if(o===`
|
|
455
|
-
`)for(o=e[a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="\r"&&e[a+1]===`
|
|
456
|
-
`)for(o=e[++a+1];o===" "||o===" ";)o=e[++a+1];else if(o==="x"||o==="u"||o==="U"){const f={x:2,u:4,U:8}[o];n+=NO(e,a+1,f,t),a+=f}else{const f=e.substr(a-1,2);t(a-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),n+=f}}else if(s===" "||s===" "){const o=a;let c=e[a+1];for(;c===" "||c===" ";)c=e[++a+1];c!==`
|
|
457
|
-
`&&!(c==="\r"&&e[a+2]===`
|
|
458
|
-
`)&&(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 _O(e,t){let n="",a=e[t+1];for(;(a===" "||a===" "||a===`
|
|
459
|
-
`||a==="\r")&&!(a==="\r"&&e[t+2]!==`
|
|
460
|
-
`);)a===`
|
|
461
|
-
`&&(n+=`
|
|
462
|
-
`),t+=1,a=e[t+1];return n||(n=" "),{fold:n,offset:t}}const kO={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
|
|
463
|
-
`,r:"\r",t:" ",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function NO(e,t,n,a){const s=e.substr(t,n),c=s.length===n&&/^[0-9a-fA-F]+$/.test(s)?parseInt(s,16):NaN;if(isNaN(c)){const f=e.substr(t-2,n+2);return a(t-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${f}`),f}return String.fromCodePoint(c)}function eS(e,t,n,a){const{value:s,type:o,comment:c,range:f}=t.type==="block-scalar"?XE(e,t,a):ZE(t,e.options.strict,a),h=n?e.directives.tagName(n.source,g=>a(n,"TAG_RESOLVE_FAILED",g)):null;let m;e.options.stringKeys&&e.atKey?m=e.schema[Zi]:h?m=TO(e.schema,s,h,n,a):t.type==="scalar"?m=CO(e,s,t,a):m=e.schema[Zi];let b;try{const g=m.resolve(s,x=>a(n??t,"TAG_RESOLVE_FAILED",x),e.options);b=St(g)?g:new Be(g)}catch(g){const x=g instanceof Error?g.message:String(g);a(n??t,"TAG_RESOLVE_FAILED",x),b=new Be(s)}return b.range=f,b.source=s,o&&(b.type=o),h&&(b.tag=h),m.format&&(b.format=m.format),c&&(b.comment=c),b}function TO(e,t,n,a,s){var f;if(n==="!")return e[Zi];const o=[];for(const h of e.tags)if(!h.collection&&h.tag===n)if(h.default&&h.test)o.push(h);else return h;for(const h of o)if((f=h.test)!=null&&f.test(t))return h;const c=e.knownTags[n];return c&&!c.collection?(e.tags.push(Object.assign({},c,{default:!1,test:void 0})),c):(s(a,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str"),e[Zi])}function CO({atKey:e,directives:t,schema:n},a,s,o){const c=n.tags.find(f=>{var h;return(f.default===!0||e&&f.default==="key")&&((h=f.test)==null?void 0:h.test(a))})||n[Zi];if(n.compat){const f=n.compat.find(h=>{var m;return h.default&&((m=h.test)==null?void 0:m.test(a))})??n[Zi];if(c.tag!==f.tag){const h=t.tagString(c.tag),m=t.tagString(f.tag),b=`Value may be parsed as either ${h} or ${m}`;o(s,"TAG_RESOLVE_FAILED",b,!0)}}return c}function AO(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 OO={composeNode:tS,composeEmptyNode:ug};function tS(e,t,n,a){const s=e.atKey,{spaceBefore:o,comment:c,anchor:f,tag:h}=n;let m,b=!0;switch(t.type){case"alias":m=RO(e,t,a),(f||h)&&a(t,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":m=eS(e,t,h,a),f&&(m.anchor=f.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":try{m=yO(OO,e,t,n,a),f&&(m.anchor=f.source.substring(1))}catch(g){const x=g instanceof Error?g.message:String(g);a(t,"RESOURCE_EXHAUSTION",x)}break;default:{const g=t.type==="error"?t.message:`Unsupported token (type: ${t.type})`;a(t,"UNEXPECTED_TOKEN",g),b=!1}}return m??(m=ug(e,t.offset,void 0,null,n,a)),f&&m.anchor===""&&a(f,"BAD_ALIAS","Anchor cannot be an empty string"),s&&e.options.stringKeys&&(!St(m)||typeof m.value!="string"||m.tag&&m.tag!=="tag:yaml.org,2002:str")&&a(h??t,"NON_STRING_KEY","With stringKeys, all keys must be strings"),o&&(m.spaceBefore=!0),c&&(t.type==="scalar"&&t.source===""?m.comment=c:m.commentBefore=c),e.options.keepSourceTokens&&b&&(m.srcToken=t),m}function ug(e,t,n,a,{spaceBefore:s,comment:o,anchor:c,tag:f,end:h},m){const b={type:"scalar",offset:AO(t,n,a),indent:-1,source:""},g=eS(e,b,f,m);return c&&(g.anchor=c.source.substring(1),g.anchor===""&&m(c,"BAD_ALIAS","Anchor cannot be an empty string")),s&&(g.spaceBefore=!0),o&&(g.comment=o,g.range[2]=h),g}function RO({options:e},{offset:t,source:n,end:a},s){const o=new Ff(n.substring(1));o.source===""&&s(t,"BAD_ALIAS","Alias cannot be an empty string"),o.source.endsWith(":")&&s(t+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const c=t+n.length,f=_c(a,c,e.strict,s);return o.range=[t,c,f.offset],f.comment&&(o.comment=f.comment),o}function MO(e,t,{offset:n,start:a,value:s,end:o},c){const f=Object.assign({_directives:t},e),h=new Pl(void 0,f),m={atKey:!1,atRoot:!0,directives:h.directives,options:h.options,schema:h.schema},b=Ol(a,{indicator:"doc-start",next:s??(o==null?void 0:o[0]),offset:n,onError:c,parentIndent:0,startOnNewline:!0});b.found&&(h.directives.docStart=!0,s&&(s.type==="block-map"||s.type==="block-seq")&&!b.hasNewline&&c(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),h.contents=s?tS(m,s,b,c):ug(m,b.end,a,null,b,c);const g=h.contents.range[2],x=_c(o,g,!1,c);return x.comment&&(h.comment=x.comment),h.range=[n,g,x.offset],h}function Ho(e){if(typeof e=="number")return[e,e+1];if(Array.isArray(e))return e.length===2?e:[e[0],e[1]];const{offset:t,source:n}=e;return[t,t+(typeof n=="string"?n.length:1)]}function e0(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?`
|
|
464
|
-
|
|
465
|
-
`:`
|
|
466
|
-
`)+(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=Ho(n);o?this.warnings.push(new VE(c,a,s)):this.errors.push(new Jr(c,a,s))},this.directives=new Nn({version:t.version||"1.2"}),this.options=t}decorate(t,n){const{comment:a,afterEmptyLine:s}=e0(this.prelude);if(a){const o=t.contents;if(n)t.comment=t.comment?`${t.comment}
|
|
467
|
-
${a}`:a;else if(s||t.directives.docStart||!o)t.commentBefore=a;else if(Dt(o)&&!o.flow&&o.items.length>0){let c=o.items[0];Rt(c)&&(c=c.key);const f=c.commentBefore;c.commentBefore=f?`${a}
|
|
468
|
-
${f}`:a}else{const c=o.commentBefore;o.commentBefore=c?`${a}
|
|
469
|
-
${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:e0(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,n=!1,a=-1){for(const s of t)yield*this.next(s);yield*this.end(n,a)}*next(t){switch(t.type){case"directive":this.directives.add(t.source,(n,a,s)=>{const o=Ho(t);o[0]+=n,this.onError(o,"BAD_DIRECTIVE",a,s)}),this.prelude.push(t.source),this.atDirectives=!0;break;case"document":{const n=MO(this.options,this.directives,t,this.onError);this.atDirectives&&!n.directives.docStart&&this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(n,!1),this.doc&&(yield this.doc),this.doc=n,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const n=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message,a=new Jr(Ho(t),"UNEXPECTED_TOKEN",n);this.atDirectives||!this.doc?this.errors.push(a):this.doc.errors.push(a);break}case"doc-end":{if(!this.doc){const a="Unexpected doc-end without preceding document";this.errors.push(new Jr(Ho(t),"UNEXPECTED_TOKEN",a));break}this.doc.directives.docEnd=!0;const n=_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}
|
|
470
|
-
${n.comment}`:n.comment}this.doc.range[2]=n.offset;break}default:this.errors.push(new Jr(Ho(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=!1,n=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(t){const a=Object.assign({_directives:this.directives},this.options),s=new Pl(void 0,a);this.atDirectives&&this.onError(n,"MISSING_CHAR","Missing directives-end indicator line"),s.range=[0,n,n],this.decorate(s,!1),yield s}}}function jO(e,t=!0,n){if(e){const a=(s,o,c)=>{const f=typeof s=="number"?s:Array.isArray(s)?s[0]:s.offset;if(n)n(f,o,c);else throw new Jr([f,f+1],o,c)};switch(e.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return ZE(e,t,a);case"block-scalar":return XE({options:{strict:t}},e,a)}}return null}function DO(e,t){const{implicitKey:n=!1,indent:a,inFlow:s=!1,offset:o=-1,type:c="PLAIN"}=t,f=Sc({type:c,value:e},{implicitKey:n,indent:a>0?" ".repeat(a):"",inFlow:s,options:{blockQuote:!0,lineWidth:-1}}),h=t.end??[{type:"newline",offset:-1,indent:a,source:`
|
|
471
|
-
`}];switch(f[0]){case"|":case">":{const m=f.indexOf(`
|
|
472
|
-
`),b=f.substring(0,m),g=f.substring(m+1)+`
|
|
473
|
-
`,x=[{type:"block-scalar-header",offset:o,indent:a,source:b}];return nS(x,h)||x.push({type:"newline",offset:-1,indent:a,source:`
|
|
474
|
-
`}),{type:"block-scalar",offset:o,indent:a,props:x,source:g}}case'"':return{type:"double-quoted-scalar",offset:o,indent:a,source:f,end:h};case"'":return{type:"single-quoted-scalar",offset:o,indent:a,source:f,end:h};default:return{type:"scalar",offset:o,indent:a,source:f,end:h}}}function LO(e,t,n={}){let{afterKey:a=!1,implicitKey:s=!1,inFlow:o=!1,type:c}=n,f="indent"in e?e.indent:null;if(a&&typeof f=="number"&&(f+=2),!c)switch(e.type){case"single-quoted-scalar":c="QUOTE_SINGLE";break;case"double-quoted-scalar":c="QUOTE_DOUBLE";break;case"block-scalar":{const m=e.props[0];if(m.type!=="block-scalar-header")throw new Error("Invalid block scalar header");c=m.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:c="PLAIN"}const h=Sc({type:c,value:t},{implicitKey:s||f===null,indent:f!==null&&f>0?" ".repeat(f):"",inFlow:o,options:{blockQuote:!0,lineWidth:-1}});switch(h[0]){case"|":case">":zO(e,h);break;case'"':Sm(e,h,"double-quoted-scalar");break;case"'":Sm(e,h,"single-quoted-scalar");break;default:Sm(e,h,"scalar")}}function zO(e,t){const n=t.indexOf(`
|
|
475
|
-
`),a=t.substring(0,n),s=t.substring(n+1)+`
|
|
476
|
-
`;if(e.type==="block-scalar"){const o=e.props[0];if(o.type!=="block-scalar-header")throw new Error("Invalid block scalar header");o.source=a,e.source=s}else{const{offset:o}=e,c="indent"in e?e.indent:-1,f=[{type:"block-scalar-header",offset:o,indent:c,source:a}];nS(f,"end"in e?e.end:void 0)||f.push({type:"newline",offset:-1,indent:c,source:`
|
|
477
|
-
`});for(const h of Object.keys(e))h!=="type"&&h!=="offset"&&delete e[h];Object.assign(e,{type:"block-scalar",indent:c,props:f,source:s})}}function nS(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 Sm(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:`
|
|
478
|
-
`};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 IO=e=>"type"in e?Nf(e):gf(e);function Nf(e){switch(e.type){case"block-scalar":{let t="";for(const n of e.props)t+=Nf(n);return t+e.source}case"block-map":case"block-seq":{let t="";for(const n of e.items)t+=gf(n);return t}case"flow-collection":{let t=e.start.source;for(const n of e.items)t+=gf(n);for(const n of e.end)t+=n.source;return t}case"document":{let t=gf(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 gf({start:e,key:t,sep:n,value:a}){let s="";for(const o of e)s+=o.source;if(t&&(s+=Nf(t)),n)for(const o of n)s+=o.source;return a&&(s+=Nf(a)),s}const xp=Symbol("break visit"),BO=Symbol("skip children"),iS=Symbol("remove item");function us(e,t){"type"in e&&e.type==="document"&&(e={start:e.start,value:e.value}),aS(Object.freeze([]),e,t)}us.BREAK=xp;us.SKIP=BO;us.REMOVE=iS;us.itemAtPath=(e,t)=>{let n=e;for(const[a,s]of t){const o=n==null?void 0:n[a];if(o&&"items"in o)n=o.items[s];else return}return n};us.parentCollection=(e,t)=>{const n=us.itemAtPath(e,t.slice(0,-1)),a=t[t.length-1][0],s=n==null?void 0:n[a];if(s&&"items"in s)return s;throw new Error("Parent collection not found")};function aS(e,t,n){let a=n(t,e);if(typeof a=="symbol")return a;for(const s of["key","value"]){const o=t[s];if(o&&"items"in o){for(let c=0;c<o.items.length;++c){const f=aS(Object.freeze(e.concat([[s,c]])),o.items[c],n);if(typeof f=="number")c=f-1;else{if(f===xp)return xp;f===iS&&(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 Wf="\uFEFF",Xf="",Zf="",uc="",UO=e=>!!e&&"items"in e,$O=e=>!!e&&(e.type==="scalar"||e.type==="single-quoted-scalar"||e.type==="double-quoted-scalar"||e.type==="block-scalar");function FO(e){switch(e){case Wf:return"<BOM>";case Xf:return"<DOC>";case Zf:return"<FLOW_END>";case uc:return"<SCALAR>";default:return JSON.stringify(e)}}function rS(e){switch(e){case Wf:return"byte-order-mark";case Xf:return"doc-mode";case Zf:return"flow-error-end";case uc:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
|
|
479
|
-
`:case`\r
|
|
480
|
-
`: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 PO=Object.freeze(Object.defineProperty({__proto__:null,BOM:Wf,DOCUMENT:Xf,FLOW_END:Zf,SCALAR:uc,createScalarToken:DO,isCollection:UO,isScalar:$O,prettyToken:FO,resolveAsScalar:jO,setScalarValue:LO,stringify:IO,tokenType:rS,visit:us},Symbol.toStringTag,{value:"Module"}));function Ri(e){switch(e){case void 0:case" ":case`
|
|
481
|
-
`:case"\r":case" ":return!0;default:return!1}}const t0=new Set("0123456789ABCDEFabcdef"),qO=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),Xu=new Set(",[]{}"),HO=new Set(` ,[]{}
|
|
482
|
-
\r `),wm=e=>!e||HO.has(e);class sS{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===`
|
|
483
|
-
`?!0:n==="\r"?this.buffer[t+1]===`
|
|
484
|
-
`:!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===`
|
|
485
|
-
`||!s&&!this.atEnd)return t+a+1}return n===`
|
|
486
|
-
`||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(`
|
|
487
|
-
`,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]===Wf&&(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 Xf,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(wm),"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 Zf,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(wm),"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(`
|
|
488
|
-
`,this.pos);if(s!==-1){for(;s!==-1;){const o=this.continueScalar(s+1);if(o===-1)break;s=a.indexOf(`
|
|
489
|
-
`,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`
|
|
490
|
-
`:t=o,n=0;break;case"\r":{const c=this.buffer[o+1];if(!c&&!this.atEnd)return this.setNext("block-scalar");if(c===`
|
|
491
|
-
`)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(`
|
|
492
|
-
`,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===`
|
|
493
|
-
`;)a=this.buffer[++s];t=s-1}else if(!this.blockScalarKeep)do{let o=t-1,c=this.buffer[o];c==="\r"&&(c=this.buffer[--o]);const f=o;for(;c===" ";)c=this.buffer[--o];if(c===`
|
|
494
|
-
`&&o>=this.pos&&o+1+n>f)t=o;else break}while(!0);return yield uc,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&&Xu.has(o))break;n=a}else if(Ri(s)){let o=this.buffer[a+1];if(s==="\r"&&(o===`
|
|
495
|
-
`?(a+=1,s=`
|
|
496
|
-
`,o=this.buffer[a+1]):n=a),o==="#"||t&&Xu.has(o))break;if(s===`
|
|
497
|
-
`){const c=this.continueScalar(a+1);if(c===-1)break;a=Math.max(a,c-2)}}else{if(t&&Xu.has(s))break;n=a}return!s&&!this.atEnd?this.setNext("plain-scalar"):(yield uc,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(wm))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0,n=this.charAt(1);if(Ri(n)||t&&Xu.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(qO.has(n))n=this.buffer[++t];else if(n==="%"&&t0.has(this.buffer[t+1])&&t0.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===`
|
|
498
|
-
`?yield*this.pushCount(1):t==="\r"&&this.charAt(1)===`
|
|
499
|
-
`?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 lS{constructor(){this.lineStarts=[],this.addNewLine=t=>this.lineStarts.push(t),this.linePos=t=>{let n=0,a=this.lineStarts.length;for(;n<a;){const o=n+a>>1;this.lineStarts[o]<t?n=o+1:a=o}if(this.lineStarts[n]===t)return{line:n+1,col:1};if(n===0)return{line:0,col:t};const s=this.lineStarts[n-1];return{line:n,col:t-s+1}}}}function ur(e,t){for(let n=0;n<e.length;++n)if(e[n].type===t)return!0;return!1}function n0(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 oS(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 Zu(e){switch(e.type){case"document":return e.start;case"block-map":{const t=e.items[e.items.length-1];return t.sep??t.start}case"block-seq":return e.items[e.items.length-1].start;default:return[]}}function il(e){var n;if(e.length===0)return[];let t=e.length;e:for(;--t>=0;)switch(e[t].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;((n=e[++t])==null?void 0:n.type)==="space";);return e.splice(t,e.length)}function i0(e){if(e.start.type==="flow-seq-start")for(const t of e.items)t.sep&&!t.value&&!ur(t.start,"explicit-key-ind")&&!ur(t.sep,"map-value-ind")&&(t.key&&(t.value=t.key),delete t.key,oS(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 dg{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 sS,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=rS(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"&&i0(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&&n0(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":{n0(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=Zu(this.peek(2)),a=il(n);let s;t.end?(s=t.end,s.push(this.sourceToken),delete t.end):s=[this.sourceToken];const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:a,key:t,sep:s}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=o}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":if(t.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let n=this.source.indexOf(`
|
|
500
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
501
|
-
`,n)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else if(n.sep)n.sep.push(this.sourceToken);else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const s=!this.onKeyLine&&this.indent===t.indent,o=s&&(n.sep||n.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&n.sep&&!n.value){const f=[];for(let h=0;h<n.sep.length;++h){const m=n.sep[h];switch(m.type){case"newline":f.push(h);break;case"space":break;case"comment":m.indent>t.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=n.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||n.value?(c.push(this.sourceToken),t.items.push({start:c}),this.onKeyLine=!0):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"explicit-key-ind":!n.sep&&!n.explicitKey?(n.start.push(this.sourceToken),n.explicitKey=!0):o||n.value?(c.push(this.sourceToken),t.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(n.explicitKey)if(n.sep)if(n.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(ur(n.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(oS(n.key)&&!ur(n.sep,"newline")){const f=il(n.start),h=n.key,m=n.sep;m.push(this.sourceToken),delete n.key,delete n.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:h,sep:m}]})}else c.length>0?n.sep=n.sep.concat(c,this.sourceToken):n.sep.push(this.sourceToken);else if(ur(n.start,"newline"))Object.assign(n,{key:null,sep:[this.sourceToken]});else{const f=il(n.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else n.sep?n.value||o?t.items.push({start:c,key:null,sep:[this.sourceToken]}):ur(n.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||n.value?(t.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):n.sep?this.stack.push(f):(Object.assign(n,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(t);if(f){if(f.type==="block-seq"){if(!n.explicitKey&&n.sep&&!ur(n.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else s&&t.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(t){var a;const n=t.items[t.items.length-1];switch(this.type){case"newline":if(n.value){const s="end"in n.value?n.value.end:void 0,o=Array.isArray(s)?s[s.length-1]:void 0;(o==null?void 0:o.type)==="comment"?s==null||s.push(this.sourceToken):t.items.push({start:[this.sourceToken]})}else n.start.push(this.sourceToken);return;case"space":case"comment":if(n.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(n.start,t.indent)){const s=t.items[t.items.length-2],o=(a=s==null?void 0:s.value)==null?void 0:a.end;if(Array.isArray(o)){Array.prototype.push.apply(o,n.start),o.push(this.sourceToken),t.items.pop();return}}n.start.push(this.sourceToken)}return;case"anchor":case"tag":if(n.value||this.indent<=t.indent)break;n.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;n.value||ur(n.start,"seq-item-ind")?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return}if(this.indent>t.indent){const s=this.startBlockValue(t);if(s){this.stack.push(s);return}}yield*this.pop(),yield*this.step()}*flowCollection(t){const n=t.items[t.items.length-1];if(this.type==="flow-error-end"){let a;do yield*this.pop(),a=this.peek(1);while((a==null?void 0:a.type)==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!n||n.sep?t.items.push({start:[this.sourceToken]}):n.start.push(this.sourceToken);return;case"map-value-ind":!n||n.value?t.items.push({start:[],key:null,sep:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):Object.assign(n,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!n||n.value?t.items.push({start:[this.sourceToken]}):n.sep?n.sep.push(this.sourceToken):n.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const s=this.flowScalar(this.type);!n||n.value?t.items.push({start:[],key:s,sep:[]}):n.sep?this.stack.push(s):Object.assign(n,{key:s,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const a=this.startBlockValue(t);a?this.stack.push(a):(yield*this.pop(),yield*this.step())}else{const a=this.peek(2);if(a.type==="block-map"&&(this.type==="map-value-ind"&&a.indent===t.indent||this.type==="newline"&&!a.items[a.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&a.type!=="flow-collection"){const s=Zu(a),o=il(s);i0(t);const c=t.end.splice(1,t.end.length);c.push(this.sourceToken);const f={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:o,key:t,sep:c}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=f}else yield*this.lineEnd(t)}}flowScalar(t){if(this.onNewLine){let n=this.source.indexOf(`
|
|
502
|
-
`)+1;for(;n!==0;)this.onNewLine(this.offset+n),n=this.source.indexOf(`
|
|
503
|
-
`,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=Zu(t),a=il(n);return a.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const n=Zu(t),a=il(n);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:a,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,n){return this.type!=="comment"||this.indent<=n?!1:t.every(a=>a.type==="newline"||a.type==="space")}*documentEnd(t){this.type!=="doc-mode"&&(t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;case"space":case"comment":default:t.end?t.end.push(this.sourceToken):t.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function cS(e){const t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new lS||null,prettyErrors:t}}function KO(e,t={}){const{lineCounter:n,prettyErrors:a}=cS(t),s=new dg(n==null?void 0:n.addNewLine),o=new fg(t),c=Array.from(o.compose(s.parse(e)));if(a&&n)for(const f of c)f.errors.forEach(kf(e,n)),f.warnings.forEach(kf(e,n));return c.length>0?c:Object.assign([],{empty:!0},o.streamInfo())}function uS(e,t={}){const{lineCounter:n,prettyErrors:a}=cS(t),s=new dg(n==null?void 0:n.addNewLine),o=new fg(t);let c=null;for(const f of o.compose(s.parse(e),!0,e.length))if(!c)c=f;else if(c.options.logLevel!=="silent"){c.errors.push(new Jr(f.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}return a&&n&&(c.errors.forEach(kf(e,n)),c.warnings.forEach(kf(e,n))),c}function GO(e,t,n){let a;typeof t=="function"?a=t:n===void 0&&t&&typeof t=="object"&&(n=t);const s=uS(e,n);if(!s)return null;if(s.warnings.forEach(o=>CE(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 QO(e,t,n){let a=null;if(typeof t=="function"||Array.isArray(t)?a=t:n===void 0&&t&&(n=t),typeof n=="string"&&(n=n.length),typeof n=="number"){const s=Math.round(n);n=s<1?void 0:s>8?{indent:8}:{indent:s}}if(e===void 0){const{keepUndefined:s}=n??t??{};if(!s)return}return hs(e)&&!a?e.toString(n):new Pl(e,a,n).toString(n)}const a0=Object.freeze(Object.defineProperty({__proto__:null,Alias:Ff,CST:PO,Composer:fg,Document:Pl,Lexer:sS,LineCounter:lS,Pair:bn,Parser:dg,Scalar:Be,Schema:QE,YAMLError:cg,YAMLMap:ai,YAMLParseError:Jr,YAMLSeq:Sr,YAMLWarning:VE,isAlias:kr,isCollection:Dt,isDocument:hs,isMap:Bl,isNode:zt,isPair:Rt,isScalar:St,isSeq:Ul,parse:GO,parseAllDocuments:KO,parseDocument:uS,stringify:QO,visit:ms,visitAsync:$f},Symbol.toStringTag,{value:"Module"}));function YO({projectName:e,file:t,onClose:n,onSaved:a}){const s=qn(),{alert:o}=li(),{data:c,isLoading:f,isError:h,error:m,refetch:b}=ot({queryKey:["pipeline-file",e,t],queryFn:()=>yA(e,t)}),[g,x]=O.useState("structured"),[v,E]=O.useState(null),[w,k]=O.useState(null);O.useEffect(()=>{c&&v===null&&(E(c.content),k(c.etag),c.parseError&&x("yaml"))},[c,v]),O.useEffect(()=>{const M=F=>{F.key==="Escape"&&n()};return window.addEventListener("keydown",M),()=>window.removeEventListener("keydown",M)},[n]);const _=Pn({mutationFn:()=>{if(v===null||w===null)throw new Error("no draft");return xA(e,t,v,w)},onSuccess:M=>{k(M.etag),s.invalidateQueries({queryKey:["pipeline-file",e,t]}),s.invalidateQueries({queryKey:["project-pipelines",e]}),a()},onError:M=>{const F=M.status;o({title:F===409?"文件已被其他地方修改":F===422?"YAML 语法错":"保存失败",body:M instanceof Error?M.message:String(M)})}}),A=v!==null&&c&&v!==c.content,{parsed:T,parseError:j}=O.useMemo(()=>{if(v===null)return{parsed:null,parseError:null};try{return{parsed:a0.parse(v)??{},parseError:null}}catch(M){return{parsed:null,parseError:M instanceof Error?M.message:String(M)}}},[v]),$=M=>{try{const F=a0.stringify(M,{lineWidth:0});E(F)}catch(F){o({title:"YAML 序列化失败",body:F instanceof Error?F.message:String(F)})}};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[d.jsxs("header",{className:"flex items-start justify-between gap-3 mb-3 flex-shrink-0",children:[d.jsxs("div",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold flex items-center gap-2",children:[d.jsx(Gv,{size:20,strokeWidth:2.5}),d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-lg",children:t}),(c==null?void 0:c.isActive)&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)",padding:"2px 8px"},children:"active"})]}),d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:[e,"/pipelines/",t,w&&` · etag ${w}`]})]}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:d.jsx(wi,{size:14,strokeWidth:3})})]}),f&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),h&&d.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",m instanceof Error?m.message:String(m)]}),c&&v!==null&&d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-center gap-3 mb-3 flex-shrink-0 flex-wrap",children:[d.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[d.jsxs("button",{type:"button",onClick:()=>x("structured"),"aria-pressed":g==="structured",disabled:!!j,className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="structured"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]",j?"opacity-50 cursor-not-allowed":""].join(" "),title:j??void 0,children:[d.jsx(Ec,{size:11,strokeWidth:2.5}),"结构化"]}),d.jsxs("button",{type:"button",onClick:()=>x("yaml"),"aria-pressed":g==="yaml",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",g==="yaml"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(Gv,{size:11,strokeWidth:2.5}),"原始 YAML"]})]}),j&&d.jsxs("div",{className:"flex items-center gap-1 text-xs text-[var(--color-crashed)] font-bold",children:[d.jsx(rc,{size:12,strokeWidth:2.5}),"YAML parse: ",j]}),(c==null?void 0:c.isActive)&&d.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold ml-auto",children:"⚠ 这是当前激活的 pipeline,保存后下一轮 tick 生效"})]}),d.jsxs("div",{className:"flex-1 overflow-auto",children:[g==="structured"&&T&&d.jsx(VO,{parsed:T,onChange:$}),g==="yaml"&&d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:400,resize:"vertical"},value:v,onChange:M=>E(M.target.value),spellCheck:!1,"aria-label":"pipeline YAML 编辑器"})]}),d.jsxs("div",{className:"flex items-center justify-between mt-3 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:A?d.jsx("span",{className:"text-[var(--color-stuck)] font-bold",children:"● 未保存"}):_.isSuccess?d.jsxs("span",{className:"text-[var(--color-running)] font-bold flex items-center gap-1",children:[d.jsx(sc,{size:12,strokeWidth:2.5})," 已保存"]}):"无变化"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:()=>{E(null),b()},disabled:_.isPending,type:"button",children:"重新加载"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:()=>_.mutate(),disabled:!A||_.isPending,type:"button","aria-label":"保存 pipeline",children:[_.isPending?d.jsx(Lt,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(Uf,{size:13,strokeWidth:3}),"保存"]})]})]})]})]})})}function VO({parsed:e,onChange:t}){const n=e.stages??[],a=h=>{t({...e,stages:h})},s=()=>{a([...n,{name:`stage-${n.length+1}`,on_complete:"move_card Done"}])},o=h=>{a(n.filter((m,b)=>b!==h))},c=(h,m)=>{const b=[...n],g=h+m;g<0||g>=b.length||([b[h],b[g]]=[b[g],b[h]],a(b))},f=(h,m)=>{a(n.map((b,g)=>g===h?{...b,...m}:b))};return d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("label",{className:"flex items-center gap-2 text-sm",children:[d.jsx("span",{className:"font-bold",children:"mode:"}),d.jsxs("select",{className:"nb-input",style:{padding:"4px 10px",fontSize:12},value:e.mode??"project",onChange:h=>t({...e,mode:h.target.value}),children:[d.jsx("option",{value:"project",children:"project"}),d.jsx("option",{value:"steps",children:"steps"})]})]}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"project = 事件驱动流水线(默认) · steps = 顺序脚本"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider",children:["Stages (",n.length,")"]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 12px",fontSize:12},onClick:s,"aria-label":"添加 stage",children:[d.jsx(zi,{size:11,strokeWidth:3})," 添加 stage"]})]}),n.length===0?d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没 stage。点"添加 stage"开始。'}):d.jsx("div",{className:"flex flex-col gap-3",children:n.map((h,m)=>d.jsx(WO,{stage:h,index:m,total:n.length,onChange:b=>f(m,b),onRemove:()=>o(m),onMoveUp:()=>c(m,-1),onMoveDown:()=>c(m,1)},m))})]})]})}function WO({stage:e,index:t,total:n,onChange:a,onRemove:s,onMoveUp:o,onMoveDown:c}){const f=e.on_fail??{};return d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("h4",{className:"font-[family-name:var(--font-heading)] font-bold text-sm",children:["Stage #",t+1,e.name&&d.jsx("code",{className:"ml-2 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:e.name})]}),d.jsxs("div",{className:"flex gap-1",children:[d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:o,disabled:t===0,"aria-label":"上移",children:d.jsx(LT,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"3px 8px"},onClick:c,disabled:t===n-1,"aria-label":"下移",children:d.jsx(vc,{size:12,strokeWidth:3})}),d.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"3px 8px"},onClick:s,"aria-label":"删除 stage",children:d.jsx(zl,{size:12,strokeWidth:3})})]})]}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[d.jsx(lr,{label:"name",hint:"stage 唯一名",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.name??"",onChange:h=>a({name:h.target.value}),placeholder:"develop"})}),d.jsx(lr,{label:"profile",hint:"skill 画像,可空",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.profile??"",onChange:h=>a({profile:h.target.value||void 0}),placeholder:"fullstack"})}),d.jsx(lr,{label:"card_state",hint:"本 stage 期间卡片状态",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.card_state??"",onChange:h=>a({card_state:h.target.value||void 0}),placeholder:"Inprogress"})}),d.jsx(lr,{label:"timeout",hint:"可选,如 30m 2h",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.timeout??"",onChange:h=>a({timeout:h.target.value||void 0}),placeholder:"2h"})}),d.jsx(lr,{label:"trigger",hint:"触发条件,可空走默认",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.trigger??"",onChange:h=>a({trigger:h.target.value||void 0}),placeholder:"card_enters 'Todo'"})}),d.jsx(lr,{label:"on_complete",hint:"成功后动作",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:e.on_complete??"",onChange:h=>a({on_complete:h.target.value}),placeholder:"move_card Done"})})]}),d.jsxs("div",{className:"mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)]",children:[d.jsx("h5",{className:"text-xs font-bold uppercase tracking-wider mb-2 text-[var(--color-text-muted)]",children:"on_fail"}),d.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[d.jsx(lr,{label:"action",hint:"失败时动作,如 label NEEDS-FIX",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.action??"",onChange:h=>a({on_fail:{...f,action:h.target.value||void 0}}),placeholder:"label NEEDS-FIX"})}),d.jsx(lr,{label:"comment",hint:"写进卡片的注释",children:d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",value:f.comment??"",onChange:h=>a({on_fail:{...f,comment:h.target.value||void 0}}),placeholder:"Worker failed. Check logs."})})]}),d.jsxs("label",{className:"flex items-center gap-2 mt-3 text-sm cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f.halt??!0,onChange:h=>a({on_fail:{...f,halt:h.target.checked}})}),d.jsx("span",{className:"font-bold",children:"halt"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"(失败后停流水线;去掉则继续下一张卡)"})]})]})]})}function lr({label:e,hint:t,children:n}){return d.jsxs("label",{className:"flex flex-col gap-1",children:[d.jsx("span",{className:"text-xs font-bold font-[family-name:var(--font-mono)]",children:e}),n,t&&d.jsx("span",{className:"text-[10px] text-[var(--color-text-muted)]",children:t})]})}function XO({onCancel:e,onCreate:t,hasActive:n,hasSample:a,isPending:s}){const[o,c]=O.useState(""),[f,h]=O.useState("blank");O.useEffect(()=>{const v=E=>{E.key==="Escape"&&e()};return window.addEventListener("keydown",v),()=>window.removeEventListener("keydown",v)},[e]);const m=o.trim(),b=m.endsWith(".yaml")?m:m?`${m}.yaml`:"",g=b&&/^[a-zA-Z0-9_.-]+\.yaml$/.test(b),x=()=>{!g||s||t(b,f)};return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-50 flex items-center justify-center p-6 bg-black/30",children:d.jsxs("div",{className:"nb-card max-w-md w-full",children:[d.jsxs("header",{className:"flex items-start justify-between mb-4",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"新建 pipeline"}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:e,type:"button","aria-label":"关闭",children:d.jsx(wi,{size:14,strokeWidth:3})})]}),d.jsxs("form",{onSubmit:v=>{v.preventDefault(),x()},className:"flex flex-col gap-4",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:"文件名"}),d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",placeholder:"例如 ci",value:o,onChange:v=>c(v.target.value),autoFocus:!0}),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)]",children:["实际会保存为 ",d.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:b||"xxx.yaml"}),"。 只允许 a-z A-Z 0-9 _ -;已有同名文件会 409 报错。"]})]}),d.jsxs("fieldset",{className:"flex flex-col gap-2",children:[d.jsx("legend",{className:"text-sm font-bold mb-1",children:"初始内容"}),d.jsx(_m,{value:"blank",current:f,label:"空白模板",desc:"最简 1 stage (develop → Done)",onSelect:h}),d.jsx(_m,{value:"sample",current:f,label:"教学模板",desc:"从 sample.yaml.example 复制(带注释,讲解所有字段)",onSelect:h,disabled:!a,disabledReason:"sample.yaml.example 不存在"}),d.jsx(_m,{value:"active",current:f,label:"复制当前活动的",desc:"从 project.yaml 复制(基于目前的配置改)",onSelect:h,disabled:!n,disabledReason:"project.yaml 不存在"})]}),d.jsxs("div",{className:"flex gap-3 justify-end pt-2",children:[d.jsx("button",{className:"nb-btn",onClick:e,type:"button",disabled:s,children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"submit",disabled:!g||s,"aria-label":"创建 pipeline",children:[s?d.jsx(Lt,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(zi,{size:13,strokeWidth:3}),"创建"]})]})]})]})})}function _m({value:e,current:t,label:n,desc:a,onSelect:s,disabled:o,disabledReason:c}){const f=t===e;return d.jsxs("label",{className:["flex items-start gap-2 p-2 rounded-lg border-2 cursor-pointer",o?"border-[var(--color-border-light)] opacity-50 cursor-not-allowed":f?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"border-[var(--color-border-light)] hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsx("input",{type:"radio",name:"pipeline-template",value:e,checked:f,disabled:o,onChange:()=>s(e),className:"mt-1 flex-shrink-0"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:n}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)]",children:o?c:a})]})]})}function ZO(){var o;const{name:e=""}=K1(),t=wr(),[n,a]=O.useState("overview"),s=ot({queryKey:["project",e],queryFn:()=>fA(e),enabled:!!e});return d.jsxs("div",{className:"flex flex-col gap-5 max-w-4xl",children:[d.jsxs("header",{className:"flex items-center gap-3",children:[d.jsxs("button",{type:"button",onClick:()=>t("/projects"),className:"nb-btn",style:{padding:"6px 12px"},"aria-label":"返回项目列表",children:[d.jsx(tE,{size:14,strokeWidth:3}),"返回"]}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold flex-1",children:e}),d.jsx(ds,{to:`/board?project=${encodeURIComponent(e)}`,className:"nb-btn nb-btn-mint",children:"看板"})]}),d.jsxs("nav",{className:"flex gap-2 flex-wrap",children:[d.jsx(Ju,{current:n,value:"overview",onSelect:a,icon:JT,children:"概览"}),d.jsx(Ju,{current:n,value:"config",onSelect:a,icon:sE,children:"配置"}),d.jsx(Ju,{current:n,value:"pipelines",onSelect:a,icon:uE,children:"Pipelines"}),d.jsx(Ju,{current:n,value:"danger",onSelect:a,icon:zl,children:"危险操作"})]}),n==="overview"&&d.jsx(JO,{name:e,data:s.data,loading:s.isLoading}),n==="config"&&d.jsx(eR,{name:e}),n==="pipelines"&&d.jsx(tR,{name:e}),n==="danger"&&d.jsx(nR,{name:e,repoDir:((o=s.data)==null?void 0:o.repoDir)??null})]})}function Ju({current:e,value:t,onSelect:n,icon:a,children:s}){const o=e===t;return d.jsxs("button",{type:"button",onClick:()=>n(t),"aria-current":o?"page":void 0,className:["nb-btn",o?"nb-btn-primary":""].join(" "),style:{padding:"6px 14px",fontSize:13},children:[d.jsx(a,{size:13,strokeWidth:2.5}),s]})}function JO({name:e,data:t,loading:n}){return n?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):t?d.jsx("div",{className:"nb-card",children:d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-3 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"仓库路径"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.repoDir??"—"}),d.jsx("dt",{className:"font-bold",children:"PM 后端"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pmBackend}),d.jsx("dt",{className:"font-bold",children:"Agent"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.agentProvider}),d.jsx("dt",{className:"font-bold",children:"卡片"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.cards.total," 张 · ",t.cards.inprogress," 进行中 · ",t.cards.done," 完成"]}),d.jsx("dt",{className:"font-bold",children:"Worker"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)]",children:[t.workers.total," 个(",t.workers.active," 活跃)"]}),d.jsx("dt",{className:"font-bold",children:"Pipeline"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pipelineStatus}),d.jsx("dt",{className:"font-bold",children:"最近活动"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.lastActivityAt?new Date(t.lastActivityAt).toLocaleString():"—"})]})}):d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsxs("p",{children:["项目 ",e," 不存在或无法读取。"]})})}function eR({name:e}){const t=qn(),{alert:n}=li(),{data:a,isLoading:s,isError:o,error:c,refetch:f}=ot({queryKey:["project-conf",e],queryFn:()=>hA(e)}),[h,m]=O.useState(null),[b,g]=O.useState(null);O.useEffect(()=>{a&&h===null&&(m(a.content),g(a.etag))},[a,h]);const x=h!==null&&a!==void 0&&h!==a.content,v=Pn({mutationFn:()=>{if(h===null||b===null)throw new Error("no draft");return mA(e,h,b)},onSuccess:E=>{g(E.etag),t.invalidateQueries({queryKey:["project-conf",e]}),t.invalidateQueries({queryKey:["project",e]})},onError:E=>{const w=E.status;n({title:w===409?"配置已被其他地方修改":"保存失败",body:w===409?'conf 文件在你编辑期间被改过。点"重新加载"后再编辑。':E instanceof Error?E.message:String(E)})}});return s?d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})}):o?d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsxs("p",{children:["加载失败: ",c instanceof Error?c.message:String(c)]})}):d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:d.jsxs("code",{className:"font-[family-name:var(--font-mono)] text-sm bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:["~/.coral/projects/",e,"/conf"]})}),b&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] mt-1",children:["etag: ",b]})]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px"},onClick:()=>{m(null),f()},disabled:v.isPending,"aria-label":"重新加载",children:[d.jsx(Cl,{size:13,strokeWidth:2.5}),"重新加载"]}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>v.mutate(),disabled:!x||v.isPending,"aria-label":"保存配置",children:[v.isPending?d.jsx(Lt,{size:13,strokeWidth:3,className:"animate-spin"}):v.isSuccess&&!x?d.jsx(RT,{size:13,strokeWidth:3}):d.jsx(Uf,{size:13,strokeWidth:3}),"保存"]})]})]}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:480,resize:"vertical"},value:h??"",onChange:E=>m(E.target.value),spellCheck:!1,"aria-label":"conf 文件编辑器"}),x&&d.jsx("p",{className:"text-xs text-[var(--color-stuck)] mt-2 font-bold",children:"● 未保存的修改"})]})}function tR({name:e}){const t=qn(),{confirm:n,alert:a}=li(),{data:s,isLoading:o}=ot({queryKey:["project-pipelines",e],queryFn:()=>gA(e)}),[c,f]=O.useState(null),[h,m]=O.useState(!1),b=Pn({mutationFn:E=>bA(e,E),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:E=>{a({title:"切换失败",body:E instanceof Error?E.message:String(E)})}}),g=Pn({mutationFn:E=>EA(e,E),onSuccess:()=>t.invalidateQueries({queryKey:["project-pipelines",e]}),onError:E=>{a({title:"删除失败",body:E instanceof Error?E.message:String(E)})}}),x=Pn({mutationFn:E=>vA(e,E.name,E.template),onSuccess:E=>{t.invalidateQueries({queryKey:["project-pipelines",e]}),m(!1),f(E.name)},onError:E=>{a({title:"创建失败",body:E instanceof Error?E.message:String(E)})}});if(o)return d.jsx("div",{className:"nb-card",children:d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})});const v=[];s!=null&&s.active&&v.push({name:s.active,isActive:!0});for(const E of(s==null?void 0:s.available)??[])v.push({name:E.name,isActive:!1});return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold",children:"Pipelines"}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>m(!0),disabled:x.isPending,"aria-label":"新建 pipeline",children:[d.jsx(zi,{size:12,strokeWidth:3}),"新建 pipeline"]})]}),v.length===0?d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic p-4 border-2 border-dashed border-[var(--color-text)] rounded-lg text-center",children:'还没有 pipeline 文件。点"新建 pipeline"开始。'}):d.jsx("ul",{className:"flex flex-col gap-2",children:v.map(E=>d.jsxs("li",{className:"flex items-center gap-3 p-3 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsx(uE,{size:16,strokeWidth:2.5}),d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold flex-1",children:E.name}),E.isActive&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"active"}),d.jsxs("div",{className:"flex gap-1",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>f(E.name),"aria-label":`编辑 ${E.name}`,children:[d.jsx(Vp,{size:11,strokeWidth:2.5}),"编辑"]}),!E.isActive&&d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`切换到 ${E.name}`,body:`当前 project.yaml 会被 ${E.name} 的内容覆盖。继续?`,confirm:"切换"})&&b.mutate(E.name)},disabled:b.isPending,"aria-label":`切换到 ${E.name}`,children:"切换"}),d.jsx("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{await n({title:`删除 ${E.name}`,body:"这个 pipeline 文件会被永久删除。",confirm:"删除",danger:!0})&&g.mutate(E.name)},disabled:g.isPending,"aria-label":`删除 ${E.name}`,children:d.jsx(zl,{size:11,strokeWidth:2.5})})]})]})]},E.name))})]}),c&&d.jsx(YO,{projectName:e,file:c,onClose:()=>f(null),onSaved:()=>{t.invalidateQueries({queryKey:["project-pipelines",e]})}}),h&&d.jsx(XO,{hasActive:!!(s!=null&&s.active),hasSample:!0,isPending:x.isPending,onCancel:()=>m(!1),onCreate:(E,w)=>x.mutate({name:E,template:w})})]})}function nR({name:e,repoDir:t}){const n=wr(),a=qn(),{alert:s}=li(),[o,c]=O.useState(""),[f,h]=O.useState(!0),m=Pn({mutationFn:()=>pA(e,{includeClaudeDir:f}),onSuccess:b=>{a.invalidateQueries({queryKey:["projects"]});const g=b.claudeRemoved.filter(x=>x.ok).map(x=>x.path);s({title:"已删除",body:g.length>0?`项目已删除。同时清理了:
|
|
504
|
-
${g.join(`
|
|
505
|
-
`)}`:"项目已删除。"}).then(()=>n("/projects"))},onError:b=>{s({title:"删除失败",body:b instanceof Error?b.message:String(b)})}});return d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-lg font-bold mb-2 text-[var(--color-crashed)]",children:"删除项目"}),d.jsxs("p",{className:"text-sm mb-4",children:["这会清理 ",d.jsxs("code",{className:"font-[family-name:var(--font-mono)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] px-1.5 py-0.5 rounded",children:["~/.coral/projects/",e,"/"]}),"(包括所有卡片、runtime、logs)。"]}),t&&d.jsxs("label",{className:"flex items-start gap-2 mb-4 p-3 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg cursor-pointer",children:[d.jsx("input",{type:"checkbox",checked:f,onChange:b=>h(b.target.checked),className:"mt-0.5"}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:"同时清理 repo 的 .claude/"}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[t,"/.claude/"]}),d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1",children:"repo 本身不动,只清这个目录。"})]})]}),d.jsx("div",{className:"mb-4",children:d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsxs("span",{className:"text-sm font-bold",children:["输入项目名 ",d.jsx("code",{className:"font-[family-name:var(--font-mono)] text-xs",children:e})," 确认:"]}),d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-mono)]",value:o,onChange:b=>c(b.target.value),placeholder:e})]})}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",disabled:o!==e||m.isPending,onClick:()=>m.mutate(),"aria-label":"永久删除项目",children:[m.isPending?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(zl,{size:14,strokeWidth:3}),"永久删除"]})]})}function hg(e){const t=e?`?project=${encodeURIComponent(e)}`:"";return Ft(`/api/skills${t}`)}function iR(e){return Ft(`/api/skills/${encodeURIComponent(e)}`)}function aR(e,t){return Ft(`/api/skills/${encodeURIComponent(e)}/references/${encodeURIComponent(t)}`)}async function Jf(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 rR(e,t){return Jf(`/api/skills/${encodeURIComponent(e)}/link`,{project:t})}function sR(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 lR(e,t){return Jf(`/api/skills/${encodeURIComponent(e)}/freeze`,{project:t})}function oR(e,t){return Jf(`/api/skills/${encodeURIComponent(e)}/unfreeze`,{project:t})}function cR(){return Jf("/api/skills/sync")}function uR({project:e,isPending:t,onCancel:n,onCreate:a}){var A;const[s,o]=O.useState(""),[c,f]=O.useState(""),[h,m]=O.useState(new Set),[b,g]=O.useState(!1),x=ot({queryKey:["skills-all",e],queryFn:()=>hg(e)});O.useEffect(()=>{const T=j=>{j.key==="Escape"&&n()};return window.addEventListener("keydown",T),()=>window.removeEventListener("keydown",T)},[n]);const E=s.trim().length>0&&s.trim().length<=200&&!t,w=T=>{const j=new Set(h);j.has(T)?j.delete(T):j.add(T),m(j)},k=()=>{E&&a({title:s.trim(),description:c.trim(),skills:[...h],labels:["AI-PIPELINE"],initialState:b?"Backlog":"Planning"})},_=((A=x.data)==null?void 0:A.data)??[];return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-xl flex flex-col",style:{maxHeight:"calc(100vh - 64px)"},children:[d.jsxs("header",{className:"flex items-center justify-between mb-4 flex-shrink-0",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold",children:"新建卡片"}),d.jsx("button",{className:"nb-btn nb-btn-mint p-2",onClick:n,type:"button","aria-label":"关闭",children:d.jsx(wi,{size:14,strokeWidth:3})})]}),d.jsxs("form",{onSubmit:T=>{T.preventDefault(),k()},className:"flex flex-col gap-4 overflow-auto",children:[d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:"标题 *"}),d.jsx("input",{type:"text",className:"nb-input w-full",placeholder:"例如:接入 GitHub OAuth 登录",value:s,onChange:T=>o(T.target.value),maxLength:200,autoFocus:!0,required:!0}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"写简短明了的目标(<200 字符)"})]}),d.jsxs("label",{className:"flex flex-col gap-1.5",children:[d.jsx("span",{className:"text-sm font-bold",children:"描述"}),d.jsx("textarea",{className:"nb-input w-full",style:{minHeight:120,resize:"vertical"},placeholder:"用户故事、需求、验收标准、参考资料… Claude 启动时会读这里的内容",value:c,onChange:T=>f(T.target.value)}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"支持 markdown。空的话就只有 title,Claude 只能靠 title 推断要做啥。"})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm font-bold",children:"Skills"}),d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"勾选哪些 skill 会被加载(走 frontmatter `skills:`)。不选也行,Worker 默认加载项目级 skills。"}),x.isLoading&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),x.isError&&d.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["skill 列表加载失败,不影响创建:",x.error instanceof Error?x.error.message:String(x.error)]}),_.length>0&&d.jsx("div",{className:"flex flex-wrap gap-2",children:_.map(T=>{const j=h.has(T.name);return d.jsx("button",{type:"button",onClick:()=>w(T.name),className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",j?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)] font-bold":"bg-[var(--color-bg)] border-[var(--color-border-light)] hover:border-[var(--color-text)]"].join(" "),"aria-pressed":j,children:T.name},T.name)})}),h.size>0&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)]",children:["已选 ",h.size," 个:",[...h].join(", ")]})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[d.jsx("span",{className:"text-sm font-bold",children:"派发"}),d.jsxs("label",{className:"flex items-center gap-3 cursor-pointer select-none p-3 border-[2px] border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)]",children:[d.jsx("input",{type:"checkbox",className:"w-4 h-4 accent-[var(--color-cta)] cursor-pointer",checked:b,onChange:T=>g(T.target.checked)}),d.jsxs("div",{className:"flex-1",children:[d.jsx("div",{className:"text-sm font-bold",children:"立即派发执行(直接进 Backlog)"}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] mt-0.5",children:["默认不勾:卡进 ",d.jsx("code",{className:"font-mono",children:"Planning"})," 暂存,等你看板上拖到 ",d.jsx("code",{className:"font-mono",children:"Backlog"})," 再开工。 勾上:跳过暂存,下次 tick 直接派 worker 跑。"]})]})]})]})]}),d.jsxs("div",{className:"flex gap-2 justify-end mt-4 pt-3 border-t-2 border-dashed border-[var(--color-text)] flex-shrink-0",children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 14px"},onClick:n,disabled:t,type:"button",children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 14px"},onClick:k,disabled:!E,type:"button","aria-label":"创建卡片",children:[t?d.jsx(Lt,{size:13,strokeWidth:3,className:"animate-spin"}):d.jsx(zi,{size:13,strokeWidth:3}),"创建"]})]})]})})}function fR(e){return Ft(`/api/projects/${encodeURIComponent(e)}/cards`)}function dR(e,t){return Ft(`/api/projects/${encodeURIComponent(e)}/cards/${t}`)}async function ql(e,t){const n=await fetch(e,{method:"POST",headers:t?{"Content-Type":"application/json"}:void 0,body:t?JSON.stringify(t):void 0});if(!n.ok){const a=await n.text();throw new Error(`${n.status} ${n.statusText}: ${a}`)}return n.json().catch(()=>({}))}function hR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/reset`)}async function mR(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 pR(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/cards/${t}/launch`)}function gR(e,t){const n=typeof t=="string"?{title:t}:t;return ql(`/api/projects/${encodeURIComponent(e)}/cards`,n)}async function bR(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 yR(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 xR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/start`)}function vR(e){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/stop`)}function ER(e,t){return ql(`/api/projects/${encodeURIComponent(e)}/pipeline/reset`,t??{})}function SR(e){const t=qn();O.useEffect(()=>{if(!e)return;const n=`/stream/projects/${encodeURIComponent(e)}`,a=new EventSource(n),s=f=>{try{const h=JSON.parse(f.data);t.invalidateQueries({queryKey:["cards",h.project]}),t.invalidateQueries({queryKey:["card",h.project,h.seq]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},o=f=>{try{const h=JSON.parse(f.data);t.invalidateQueries({queryKey:["workers",h.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}},c=f=>{try{const h=JSON.parse(f.data);t.invalidateQueries({queryKey:["pipeline-status",h.project]}),t.invalidateQueries({queryKey:["projects"]})}catch{}};return a.addEventListener("card.created",s),a.addEventListener("card.updated",s),a.addEventListener("card.moved",s),a.addEventListener("card.deleted",s),a.addEventListener("worker.updated",o),a.addEventListener("worker.added",o),a.addEventListener("worker.deleted",o),a.addEventListener("pipeline.status",c),a.addEventListener("pipeline.started",c),a.addEventListener("pipeline.stopped",c),()=>a.close()},[e,t])}const wR=new Set(["python","typescript","golang","rust","kotlin","swift","java"]),_R=new Set(["frontend","backend","mobile","database","devops"]),kR=new Set(["backend-architect","frontend-developer","code-reviewer","database-optimizer","devops-automator","security-engineer","qa-tester","security","qa","architect","db-opt"]),NR=new Set(["coding-standards","tdd-workflow","git-workflow","architecture-decision-records","debugging-workflow"]);function TR(e){return wR.has(e)?"lang":_R.has(e)?"end":kR.has(e)?"persona":NR.has(e)?"workflow":"other"}const CR={lang:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg)"};function fS({name:e}){const t=CR[TR(e)];return d.jsx("span",{className:"nb-badge",style:{background:t},children:e})}function dS({label:e,kind:t="default"}){const n=t==="warn"?"var(--color-accent-pink)":t==="accent"?"var(--color-accent-yellow)":"var(--color-bg-cream)";return d.jsx("span",{className:"nb-badge",style:{background:n},children:e})}function AR({card:e,onClick:t,done:n,draggable:a}){const s=e.labels.some(o=>o.startsWith("STARTED-"))&&!n;return d.jsxs("article",{onClick:t,onKeyDown:o=>{(o.key==="Enter"||o.key===" ")&&(o.preventDefault(),t())},draggable:a,onDragStart:o=>{o.dataTransfer.setData("application/x-sps-card-seq",String(e.seq)),o.dataTransfer.effectAllowed="move"},tabIndex:0,role:"button","aria-label":`Card #${e.seq}: ${e.title}`,className:["bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl p-3","shadow-[3px_3px_0_var(--color-text)] cursor-pointer","transition-[transform,box-shadow] duration-[180ms] ease-out","hover:-translate-x-0.5 hover:-translate-y-0.5 hover:shadow-[5px_5px_0_var(--color-text)]","focus:outline-none focus-visible:ring-[3px] focus-visible:ring-offset-2 focus-visible:ring-[var(--color-text)]",n?"opacity-60":"",a?"active:cursor-grabbing":""].join(" "),children:[d.jsxs("div",{className:"flex items-center justify-between gap-2 mb-2",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-[11px] px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full",children:["#",e.seq]}),s&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"running"})]}),d.jsx("p",{className:`font-bold text-sm leading-5 mb-2 line-clamp-2 ${n?"line-through decoration-2":""}`,children:e.title}),(e.skills.length>0||e.labels.length>0)&&d.jsxs("div",{className:"flex flex-wrap gap-1 mb-2",children:[e.skills.slice(0,3).map(o=>d.jsx(fS,{name:o},o)),e.labels.filter(o=>o==="NEEDS-FIX").map(o=>d.jsx(dS,{label:o,kind:"warn"},o))]}),e.checklist&&e.checklist.total>0&&d.jsx(OR,{stats:e.checklist}),d.jsxs("div",{className:"pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)] flex items-center gap-2 text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-subtle)]",children:[d.jsx("span",{children:RR(e.updatedAt??e.createdAt)}),e.branch&&d.jsxs("span",{className:"truncate",children:["· ",e.branch]})]})]})}function OR({stats:e}){return d.jsxs("div",{className:"mb-2",children:[d.jsxs("div",{className:"flex items-center justify-between text-[11px] font-[family-name:var(--font-mono)] mb-1",children:[d.jsxs("span",{className:"font-bold",children:["检查清单 ",e.done,"/",e.total]}),d.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[e.percent,"%"]})]}),d.jsx("div",{className:"w-full h-1.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full overflow-hidden mb-1.5",children:d.jsx("div",{className:"h-full bg-[var(--color-cta)] transition-[width] duration-200",style:{width:`${e.percent}%`}})}),d.jsxs("ul",{className:"text-[11px] space-y-0.5",children:[e.items.slice(0,3).map((t,n)=>d.jsxs("li",{className:`flex items-start gap-1 ${t.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{className:"flex-shrink-0 mt-0.5",children:t.done?"✓":"○"}),d.jsx("span",{className:"line-clamp-1",children:t.text})]},n)),e.items.length>3&&d.jsxs("li",{className:"text-[var(--color-text-subtle)] italic pl-3",children:["… 还有 ",e.items.length-3," 条"]})]})]})}function RR(e){if(!e)return"—";const t=new Date(e),n=Date.now()-t.getTime();return n<6e4?"刚才":n<36e5?`${Math.floor(n/6e4)}m ago`:n<864e5?`${Math.floor(n/36e5)}h ago`:t.toLocaleDateString()}function MR({label:e,bg:t,cards:n,onCardClick:a,onDropCard:s}){const[o,c]=O.useState(!1);return d.jsxs("div",{className:["flex flex-col p-3 rounded-2xl border-[3px] min-h-[280px] h-full min-h-0 overflow-hidden","transition-all",o?"border-[var(--color-cta)] shadow-[4px_4px_0_var(--color-cta)]":"border-[var(--color-text)]"].join(" "),style:{background:t},onDragOver:f=>{!s||!f.dataTransfer.types.includes("application/x-sps-card-seq")||(f.preventDefault(),f.dataTransfer.dropEffect="move",o||c(!0))},onDragLeave:()=>c(!1),onDrop:f=>{if(c(!1),!s)return;const h=f.dataTransfer.getData("application/x-sps-card-seq"),m=Number.parseInt(h,10);Number.isFinite(m)&&(f.preventDefault(),s(m))},children:[d.jsxs("div",{className:"flex items-center justify-between px-1 pb-2 mb-2 border-b-2 border-[var(--color-text)] shrink-0",children:[d.jsx("span",{className:"font-[family-name:var(--font-heading)] font-bold text-sm uppercase tracking-wider",children:e}),d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full",children:n.length})]}),d.jsxs("div",{className:"flex flex-col gap-2 flex-1 min-h-0 overflow-y-auto pr-1 -mr-1",style:{scrollbarWidth:"thin",scrollbarColor:"var(--color-text) transparent"},children:[n.length===0&&d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] text-center py-6 italic",children:"— 空 —"}),n.map(f=>d.jsx(AR,{card:f,onClick:()=>a(f),done:e==="Done",draggable:!!s},f.seq))]})]})}function vp(e,t){if(!e)return"";const n=e.split(`
|
|
506
|
-
`),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(`
|
|
507
|
-
`).trim()}function km(e){return vp(e,"描述")}function jR({project:e,seq:t,onClose:n,onChanged:a}){var q,ce,V,be,R,D,X,C,G,de,re;const s=qn(),{confirm:o,alert:c}=li(),{data:f,isLoading:h,isError:m,error:b,refetch:g}=ot({queryKey:["card",e,t],queryFn:()=>dR(e,t)}),[x,v]=O.useState(!1),[E,w]=O.useState(""),[k,_]=O.useState(""),[A,T]=O.useState(new Set),[j,$]=O.useState([]),[M,F]=O.useState(""),H=ot({queryKey:["skills-all",e],queryFn:()=>hg(e),enabled:x}),L=((ce=(q=ot({queryKey:["projects"],queryFn:_r,refetchInterval:1e4}).data)==null?void 0:q.data.find(K=>K.name===e))==null?void 0:ce.pipelineStatus)==="running";O.useEffect(()=>{x&&f&&(w(f.title),_(km(f.body)),T(new Set(f.skills)),$([...f.labels]))},[x,f]),O.useEffect(()=>{const K=ue=>{ue.key==="Escape"&&(x?v(!1):n())};return window.addEventListener("keydown",K),()=>window.removeEventListener("keydown",K)},[n,x]);const J=Pn({mutationFn:()=>{if(!f)throw new Error("no data");const K={},ue=E.trim();ue&&ue!==f.title&&(K.title=ue);const Se=km(f.body);k!==Se&&(K.description=k);const Ze=[...A].sort(),it=[...f.skills].sort();return JSON.stringify(Ze)!==JSON.stringify(it)&&(K.skills=Ze),JSON.stringify(j)!==JSON.stringify(f.labels)&&(K.labels=j),Object.keys(K).length===0?Promise.resolve({ok:!0,noop:!0}):yR(e,t,K)},onSuccess:()=>{s.invalidateQueries({queryKey:["card",e,t]}),s.invalidateQueries({queryKey:["cards",e]}),v(!1),a()},onError:K=>{c({title:"保存失败",body:K instanceof Error?K.message:String(K)})}}),ae=O.useMemo(()=>{if(!x||!f)return!1;if(E.trim()!==f.title||k!==km(f.body))return!0;const K=[...A].sort(),ue=[...f.skills].sort();return JSON.stringify(K)!==JSON.stringify(ue)||JSON.stringify(j)!==JSON.stringify(f.labels)},[x,f,E,k,A,j]),ge=K=>{const ue=new Set(A);ue.has(K)?ue.delete(K):ue.add(K),T(ue)},fe=()=>{const K=M.trim();if(K){if(j.includes(K)){F("");return}$([...j,K]),F("")}},te=K=>{$(j.filter(ue=>ue!==K))};return d.jsx("div",{role:"dialog","aria-modal":"true","aria-labelledby":"card-modal-title",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-12 w-full max-w-3xl bg-[var(--color-bg)]",children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsxs("div",{className:"flex items-center gap-3 mb-1",children:[d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs px-2 py-0.5 bg-[var(--color-accent-purple)] border-2 border-[var(--color-text)] rounded-full",children:["#",t]}),(f==null?void 0:f.state)&&d.jsx("span",{className:"font-[family-name:var(--font-mono)] text-xs px-2 py-0.5 bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-full font-semibold",children:f.state}),x&&d.jsx("span",{className:"text-xs font-bold text-[var(--color-stuck)]",children:"⚠ 编辑中"})]}),x?d.jsx("input",{type:"text",className:"nb-input w-full font-[family-name:var(--font-heading)] text-xl font-bold",value:E,onChange:K=>w(K.target.value),maxLength:200,"aria-label":"卡片标题"}):d.jsx("h2",{id:"card-modal-title",className:"font-[family-name:var(--font-heading)] text-2xl font-bold break-words",children:(f==null?void 0:f.title)??"加载中…"})]}),d.jsxs("div",{className:"flex gap-2 flex-shrink-0",children:[!x&&f&&d.jsxs("button",{onClick:()=>v(!0),className:"nb-btn",style:{padding:"6px 12px"},type:"button","aria-label":"编辑卡片",children:[d.jsx(Vp,{size:12,strokeWidth:2.5})," 编辑"]}),d.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:d.jsx(wi,{size:14,strokeWidth:3})})]})]}),h&&d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}),m&&d.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",b instanceof Error?b.message:String(b)]}),f&&d.jsxs("div",{className:"flex flex-col gap-4",children:[f.branch&&!x&&d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(rC,{size:14}),d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:f.branch})]}),x?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),H.isLoading&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 skill 列表…"}),H.data&&H.data.data.length>0&&d.jsx("div",{className:"flex flex-wrap gap-1.5",children:H.data.data.map(K=>{const ue=A.has(K.name);return d.jsx("button",{type:"button",onClick:()=>ge(K.name),"aria-pressed":ue,className:["px-2.5 py-1 text-xs font-[family-name:var(--font-mono)] rounded-full border-2 transition-all",ue?"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)})})]}),d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),d.jsxs("div",{className:"flex flex-wrap gap-1.5 items-center",children:[j.map(K=>d.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-accent-yellow)] border-2 border-[var(--color-text)] rounded-full",children:[K,d.jsx("button",{type:"button",onClick:()=>te(K),className:"hover:text-[var(--color-crashed)]","aria-label":`删除 ${K}`,children:d.jsx(wi,{size:10,strokeWidth:3})})]},K)),d.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(),fe())}}),M&&d.jsx("button",{type:"button",className:"nb-btn",style:{padding:"2px 6px",fontSize:11},onClick:fe,"aria-label":"添加 label",children:d.jsx(zi,{size:10,strokeWidth:3})})]}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:"注意:AI-PIPELINE / STARTED-* / COMPLETED-* / NEEDS-FIX 由流水线自动管理,手动改可能被覆盖"})]})]}):d.jsxs(d.Fragment,{children:[f.skills.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Skills"}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.skills.map(K=>d.jsx(fS,{name:K},K))})]}),f.labels.length>0&&d.jsxs("div",{children:[d.jsx("div",{className:"text-sm font-bold mb-1.5",children:"Labels"}),d.jsx("div",{className:"flex items-center gap-2 flex-wrap",children:f.labels.map(K=>d.jsx(dS,{label:K,kind:K==="NEEDS-FIX"?"warn":"default"},K))})]})]}),x?d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:180,resize:"vertical"},value:k,onChange:K=>_(K.target.value),"aria-label":"卡片描述"}),d.jsx("p",{className:"text-[10px] text-[var(--color-text-muted)] mt-1",children:'只替换 "## 描述" 段的内容;检查清单和日志段不动。'})]}),(((C=f.checklist)==null?void 0:C.total)??0)>0&&d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:[d.jsx("div",{className:"flex items-center justify-between mb-2",children:d.jsxs("span",{className:"font-bold text-sm",children:["检查清单 ",((G=f.checklist)==null?void 0:G.done)??0,"/",((de=f.checklist)==null?void 0:de.total)??0]})}),d.jsx("ul",{className:"text-sm space-y-1",children:(((re=f.checklist)==null?void 0:re.items)??[]).map((K,ue)=>d.jsxs("li",{className:`flex items-start gap-2 ${K.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{children:K.done?"✓":"○"}),d.jsx("span",{children:K.text})]},ue))})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"描述"}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:vp(f.body,"描述")||"(空)"})]}),d.jsxs("div",{children:[d.jsxs("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:["检查清单 ",d.jsxs("span",{className:"text-[var(--color-text-muted)] normal-case tracking-normal",children:[((V=f.checklist)==null?void 0:V.done)??0,"/",((be=f.checklist)==null?void 0:be.total)??0]})]}),d.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)] p-3",children:(((R=f.checklist)==null?void 0:R.total)??0)>0?d.jsxs(d.Fragment,{children:[d.jsx("div",{className:"flex items-center justify-end mb-2",children:d.jsx("div",{className:"w-24 h-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-full overflow-hidden",children:d.jsx("div",{className:"h-full bg-[var(--color-cta)]",style:{width:`${((D=f.checklist)==null?void 0:D.percent)??0}%`}})})}),d.jsx("ul",{className:"text-sm space-y-1",children:(((X=f.checklist)==null?void 0:X.items)??[]).map((K,ue)=>d.jsxs("li",{className:`flex items-start gap-2 ${K.done?"opacity-60 line-through":""}`,children:[d.jsx("span",{children:K.done?"✓":"○"}),d.jsx("span",{children:K.text})]},ue))})]}):d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:["暂无清单项。在描述里用 ",d.jsx("code",{className:"font-[family-name:var(--font-mono)]",children:"- [ ] 项"})," 语法添加。"]})})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"日志"}),d.jsx("pre",{className:"text-xs whitespace-pre-wrap font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-64 overflow-auto",children:vp(f.body,"日志")||"(空)"})]})]}),d.jsx("div",{className:"flex gap-2 pt-2 border-t-2 border-[var(--color-border-light)] justify-end flex-wrap",children:x?d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"nb-btn",type:"button",onClick:()=>{v(!1),g()},disabled:J.isPending,children:"取消"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",onClick:()=>J.mutate(),disabled:!ae||!E.trim()||J.isPending,"aria-label":"保存卡片修改",children:[J.isPending?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(Uf,{size:14,strokeWidth:3}),"保存"]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn nb-btn-primary",type:"button",disabled:f.state==="Done"||L,title:f.state==="Done"?"卡片已完成;先拖回 Todo 再启动":L?"Pipeline 正在跑——supervisor 会自动 dispatch,无需手动启动":void 0,onClick:async()=>{try{await pR(e,t),a()}catch(K){c({title:"启动 worker 失败",body:K instanceof Error?K.message:String(K)})}},children:[d.jsx(Wp,{size:14,strokeWidth:3}),"启动 worker"]}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{if(await o({title:`重置卡片 #${t}`,body:"卡片状态会回到初始,已做的 checklist 会清空。",confirm:"重置",danger:!0}))try{await hR(e,t),a(),n()}catch(ue){c({title:"重置失败",body:ue instanceof Error?ue.message:String(ue)})}},children:[d.jsx(rE,{size:14,strokeWidth:2.5}),"重置卡片"]}),d.jsxs("button",{className:"nb-btn",style:{background:"var(--color-crashed)",color:"var(--color-bg)"},type:"button",onClick:async()=>{if(!(!await o({title:`删除卡片 #${t}`,body:`即将删除 "${f.title}"。此操作不可恢复(md 文件将被物理删除)。是否继续?`,confirm:"继续",danger:!0})||!await o({title:"最终确认",body:`请再次确认删除卡片 #${t}。`,confirm:"确定删除",danger:!0})))try{await mR(e,t),a(),n()}catch(Se){c({title:"删除失败",body:Se instanceof Error?Se.message:String(Se)})}},"aria-label":"删除卡片",children:[d.jsx(zl,{size:14,strokeWidth:2.5}),"删除卡片"]})]})})]})]})})}function DR({current:e,onChange:t}){const[n,a]=O.useState(!1),s=O.useRef(null),{data:o}=ot({queryKey:["projects"],queryFn:_r});return O.useEffect(()=>{const c=f=>{var h;(h=s.current)!=null&&h.contains(f.target)||a(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[]),d.jsxs("div",{className:"relative",ref:s,children:[d.jsxs("button",{type:"button",className:"inline-flex items-center gap-2 px-3 py-2 bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[3px_3px_0_var(--color-text)] font-[family-name:var(--font-mono)] text-sm font-bold hover:-translate-x-px hover:-translate-y-px hover:shadow-[4px_4px_0_var(--color-text)] transition-[transform,box-shadow] duration-150",onClick:()=>a(c=>!c),children:[e,d.jsx(vc,{size:14,strokeWidth:2.5})]}),n&&o&&d.jsx("div",{className:"absolute right-0 mt-2 z-20 min-w-[200px] bg-[var(--color-bg)] border-[3px] border-[var(--color-text)] rounded-xl shadow-[5px_5px_0_var(--color-text)] overflow-hidden",children:o.data.map(c=>d.jsxs("button",{type:"button",onClick:()=>{t(c.name),a(!1)},className:["w-full text-left px-4 py-2 text-sm font-semibold",c.name===e?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)]",children:c.name}),d.jsxs("span",{className:"ml-2 text-xs text-[var(--color-text-muted)]",children:[c.cards.total," cards"]})]},c.name))})]})}const LR=[{state:"Planning",label:"Planning",bg:"var(--color-accent-purple)"},{state:"Backlog",label:"Backlog",bg:"var(--color-bg-cream)"},{state:"Todo",label:"Todo",bg:"var(--color-accent-yellow)"},{state:"Inprogress",label:"Inprogress",bg:"var(--color-secondary)"},{state:"QA",label:"QA / Review",bg:"var(--color-accent-pink)"},{state:"Done",label:"Done",bg:"var(--color-accent-mint)"}],hS="sps-console:last-board-project";function zR(){if(typeof window>"u")return null;try{return localStorage.getItem(hS)}catch{return null}}function IR(e){if(!(typeof window>"u"))try{localStorage.setItem(hS,e)}catch{}}function BR(){var te,q,ce;const[e,t]=J1(),n=e.get("project"),[a,s]=O.useState(null),[o,c]=O.useState(""),[f,h]=O.useState(()=>new Set),[m,b]=O.useState(()=>new Set),{confirm:g,alert:x}=li();SR(n);const v=ot({queryKey:["projects"],queryFn:_r}),E=ot({queryKey:["cards",n],queryFn:()=>fR(n??""),enabled:!!n}),w=qn(),k=()=>{w.invalidateQueries({queryKey:["cards",n]}),w.invalidateQueries({queryKey:["projects"]}),w.invalidateQueries({queryKey:["pipeline-status",n]})},_=V=>{t({project:V})};O.useEffect(()=>{var be;if(n){IR(n);return}const V=zR();V&&((be=v.data)!=null&&be.data.some(R=>R.name===V))&&t({project:V},{replace:!0})},[n,v.data,t]);const A=Pn({mutationFn:()=>xR(n),onSuccess:()=>{k()},onError:V=>{x({title:"启动 pipeline 失败",body:V instanceof Error?V.message:String(V)})}}),T=Pn({mutationFn:()=>vR(n),onSuccess:()=>k(),onError:V=>{x({title:"停止 pipeline 失败",body:V instanceof Error?V.message:String(V)})}}),j=Pn({mutationFn:()=>ER(n,{all:!0}),onSuccess:()=>k(),onError:V=>{x({title:"重置失败",body:V instanceof Error?V.message:String(V)})}}),[$,M]=O.useState(!1),F=Pn({mutationFn:V=>gR(n,V),onSuccess:()=>{k(),M(!1)},onError:V=>{x({title:"新建卡片失败",body:V instanceof Error?V.message:String(V)})}}),H=Pn({mutationFn:({seq:V,state:be})=>bR(n,V,be),onMutate:async({seq:V,state:be})=>{await w.cancelQueries({queryKey:["cards",n]});const R=w.getQueryData(["cards",n]);return R&&w.setQueryData(["cards",n],{...R,data:R.data.map(D=>D.seq===V?{...D,state:be}:D)}),{prev:R}},onError:(V,be,R)=>{R!=null&&R.prev&&w.setQueryData(["cards",n],R.prev),x({title:"移动卡片失败",body:V instanceof Error?V.message:String(V)})},onSettled:()=>{w.invalidateQueries({queryKey:["cards",n]})}}),ee=((te=E.data)==null?void 0:te.data)??[],{allSkills:L,allLabels:J}=O.useMemo(()=>{const V=new Set,be=new Set;for(const R of ee){for(const D of R.skills)V.add(D);for(const D of R.labels)be.add(D)}return{allSkills:[...V].sort(),allLabels:[...be].sort()}},[ee]);if(!n)return d.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"看板"}),d.jsxs("div",{className:"nb-card bg-[var(--color-accent-yellow)] max-w-2xl",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"选择一个项目 🎯"}),d.jsx("p",{className:"text-sm mb-4 text-[var(--color-text-muted)]",children:"看板按项目分。挑一个开始:"}),d.jsx("div",{className:"flex flex-wrap gap-2",children:(q=v.data)==null?void 0:q.data.map(V=>d.jsx("button",{className:"nb-btn nb-btn-blue",onClick:()=>_(V.name),type:"button",children:V.name},V.name))})]})]});const ae=ee.filter(V=>{if(o){const be=o.toLowerCase();if(!(V.title.toLowerCase().includes(be)||V.skills.some(D=>D.toLowerCase().includes(be))||V.labels.some(D=>D.toLowerCase().includes(be))))return!1}return!(f.size>0&&!V.skills.some(R=>f.has(R))||m.size>0&&!V.labels.some(R=>m.has(R)))}),ge=(ce=v.data)==null?void 0:ce.data.find(V=>V.name===n),fe=(ge==null?void 0:ge.pipelineStatus)==="running";return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full flex-1 min-h-0",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3 shrink-0",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"看板 ✨"}),d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm mt-1",children:ge?`${ge.name} · ${ge.cards.total} cards · ${ge.workers.active} workers 活跃`:"加载中…"})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsx(DR,{current:n,onChange:_}),d.jsxs("button",{className:fe?"nb-btn nb-btn-danger":"nb-btn nb-btn-primary",onClick:()=>fe?T.mutate():A.mutate(),disabled:A.isPending||T.isPending,type:"button","aria-label":fe?"停止 pipeline":"启动 pipeline",title:fe?"停止 pipeline":"启动 pipeline",children:[A.isPending||T.isPending?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):fe?d.jsx(lE,{size:14,strokeWidth:3}):d.jsx(Wp,{size:14,strokeWidth:3}),fe?"停止":"启动"]}),d.jsxs("button",{className:"nb-btn nb-btn-yellow",type:"button",onClick:async()=>{await g({title:"重置整个流水线",body:"这会清空所有卡片的运行状态、worker marker、分支。不可撤销。",confirm:"重置全部",danger:!0})&&j.mutate()},disabled:j.isPending,children:[j.isPending?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(rE,{size:14,strokeWidth:2.5}),"重置"]}),d.jsxs("button",{className:"nb-btn nb-btn-mint",type:"button",onClick:()=>M(!0),disabled:F.isPending,children:[F.isPending?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(zi,{size:14,strokeWidth:3}),"新卡片"]})]})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap shrink-0",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Sf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索标题 / skill / label…",value:o,onChange:V=>c(V.target.value),"aria-label":"搜索卡片"})]}),d.jsx(r0,{label:"skill",options:L,selected:f,onChange:h}),d.jsx(r0,{label:"label",options:J,selected:m,onChange:b}),(o||f.size>0||m.size>0)&&d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{c(""),h(new Set),b(new Set)},type:"button","aria-label":"清空筛选",children:[d.jsx(wi,{size:11,strokeWidth:3}),"清空"]}),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] flex items-center gap-1 font-[family-name:var(--font-mono)]",children:[d.jsx(iC,{size:12}),ae.length," / ",ee.length]})]}),E.isError&&d.jsxs("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:[d.jsx("p",{className:"font-semibold",children:"加载卡片失败"}),d.jsx("p",{className:"text-sm mt-1 text-[var(--color-text-muted)]",children:E.error instanceof Error?E.error.message:String(E.error)})]}),!E.isError&&d.jsx("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-6 auto-rows-fr gap-3 flex-1 min-h-0",children:LR.map(V=>d.jsx(MR,{label:V.label,bg:V.bg,cards:ae.filter(UR(V.state)),onCardClick:be=>s(be.seq),onDropCard:be=>H.mutate({seq:be,state:V.state})},V.state))}),a!==null&&d.jsx(jR,{project:n,seq:a,onClose:()=>s(null),onChanged:k}),$&&d.jsx(uR,{project:n,isPending:F.isPending,onCancel:()=>M(!1),onCreate:V=>F.mutate(V)})]})}function UR(e){return t=>e==="QA"?t.state==="QA"||t.state==="Review":e==="Done"?t.state==="Done"||t.state==="Canceled":t.state===e}function r0({label:e,options:t,selected:n,onChange:a}){const[s,o]=O.useState(!1),c=O.useRef(null);O.useEffect(()=>{if(!s)return;const b=x=>{var v;(v=c.current)!=null&&v.contains(x.target)||o(!1)},g=x=>{x.key==="Escape"&&o(!1)};return window.addEventListener("click",b),window.addEventListener("keydown",g),()=>{window.removeEventListener("click",b),window.removeEventListener("keydown",g)}},[s]);const f=b=>{const g=new Set(n);g.has(b)?g.delete(b):g.add(b),a(g)},h=t.length===0,m=n.size;return d.jsxs("div",{ref:c,className:"relative",children:[d.jsxs("button",{type:"button",className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>!h&&o(b=>!b),disabled:h,"aria-haspopup":"listbox","aria-expanded":s,"aria-label":`按 ${e} 筛选`,children:[e,m>0&&d.jsx("span",{className:"ml-1 px-1.5 py-0.5 text-[10px] font-bold rounded-full bg-[var(--color-primary)] text-[var(--color-text)] border border-[var(--color-text)]",children:m}),d.jsx(vc,{size:11,strokeWidth:3,className:["transition-transform",s?"rotate-180":""].join(" ")})]}),s&&d.jsxs("div",{role:"listbox",className:"absolute left-0 top-full mt-2 z-20 min-w-[200px] max-h-64 overflow-auto nb-card p-2",style:{padding:8},children:[t.map(b=>{const g=n.has(b);return d.jsxs("label",{className:["flex items-center gap-2 px-2 py-1.5 rounded cursor-pointer text-sm font-[family-name:var(--font-mono)]",g?"bg-[var(--color-accent-mint)]":"hover:bg-[var(--color-bg-cream)]"].join(" "),children:[d.jsx("input",{type:"checkbox",checked:g,onChange:()=>f(b),className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",children:b})]},b)}),m>0&&d.jsx("button",{type:"button",className:"w-full mt-2 pt-2 border-t-2 border-dashed border-[var(--color-text)] text-xs font-bold text-[var(--color-crashed)] text-center",onClick:()=>a(new Set),children:"清空选择"})]})]})}function $R(){return Ft("/api/workers/all")}function FR(e){return Ft(`/api/projects/${encodeURIComponent(e)}/workers`)}function PR(e,t){return Ft(`/api/projects/${encodeURIComponent(e)}/workers/${t}`)}async function mS(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 s0(e,t){return mS(`/api/projects/${encodeURIComponent(e)}/workers/${t}/kill`)}function qR(e,t,n){return mS(`/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:d.jsx(Lt,{size:9,strokeWidth:3,className:"animate-spin"})},stuck:{bg:"var(--color-stuck-bg)",color:"var(--color-stuck)",label:"stuck"},crashed:{bg:"var(--color-crashed-bg)",color:"var(--color-crashed)",label:"crashed",icon:d.jsx($C,{size:9,strokeWidth:2.5})},idle:{bg:"var(--color-idle-bg)",color:"var(--color-idle)",label:"idle"}}[e];return d.jsxs("span",{className:"nb-status inline-flex items-center gap-1",style:{background:n.bg,color:n.color},children:[n.icon,n.label]})}function pg(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 HR(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 gg(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 KR({alerts:e,selected:t,onSelect:n}){return e.length===0?d.jsxs("div",{className:"nb-card bg-[var(--color-running-bg)] flex items-center gap-3",children:[d.jsx(sc,{size:18,strokeWidth:2.5,className:"text-[var(--color-running)]"}),d.jsx("span",{className:"text-sm font-bold text-[var(--color-running)]",children:"全部 worker 健康"})]}):d.jsxs("section",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2 text-[var(--color-crashed)]",children:[d.jsx(VC,{size:14,strokeWidth:2.5}),"Alerts (",e.length,")"]}),d.jsx("div",{className:"flex flex-col gap-2",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return d.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="crashed"?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-stuck-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[d.jsx(mg,{state:a.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold",children:[a.project,"/worker-",a.slot]}),a.card&&d.jsxs("span",{className:"truncate",children:["#",a.card.seq," ",a.card.title]}),d.jsxs("span",{className:"ml-auto text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1",children:[d.jsx(PT,{size:10,strokeWidth:2.5}),pg(a.runtimeMs)]})]}),a.markerUpdatedAt&&d.jsx("div",{className:"text-xs text-[var(--color-text-muted)] mt-1 font-[family-name:var(--font-mono)]",children:a.state==="crashed"?"PID 已死。":`marker 停 ${gg(a.markerUpdatedAt)}。`})]},`${a.project}-${a.slot}`)})})]})}function GR({active:e,selected:t,onSelect:n}){return e.length===0?d.jsx("div",{className:"nb-card bg-[var(--color-bg-cream)]",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"没有 worker 在运行。"})}):d.jsxs("section",{children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2 flex items-center gap-2",children:[d.jsx(If,{size:14,strokeWidth:2.5}),"Active (",e.length,")"]}),d.jsx("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-3",children:e.map(a=>{const s=(t==null?void 0:t.project)===a.project&&(t==null?void 0:t.slot)===a.slot;return d.jsxs("button",{type:"button",onClick:()=>n(a.project,a.slot),className:["nb-card p-3 text-left",a.state==="starting"?"bg-[var(--color-secondary)]":"bg-[var(--color-running-bg)]",s?"ring-4 ring-[var(--color-text)]":""].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(mg,{state:a.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm flex-1 truncate",children:[a.project,"/worker-",a.slot]}),d.jsx("span",{className:`text-xs font-[family-name:var(--font-mono)] ${HR(a.runtimeMs)}`,children:pg(a.runtimeMs)})]}),a.card&&d.jsxs("div",{className:"text-sm font-semibold mb-1 truncate",children:["#",a.card.seq," · ",a.card.title]}),d.jsxs("div",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-2 mb-1",children:[a.stage&&d.jsxs("span",{children:["stage: ",a.stage]}),a.markerUpdatedAt&&d.jsxs("span",{className:"ml-auto",children:["marker ",gg(a.markerUpdatedAt)]})]}),a.lastLogLine&&d.jsxs("div",{className:"text-[11px] font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded px-2 py-1 mt-2 truncate",children:[d.jsx(oE,{size:9,strokeWidth:2.5,className:"inline-block mr-1 align-text-bottom"}),a.lastLogLine.msg]})]},`${a.project}-${a.slot}`)})})]})}function QR({capacity:e,selected:t,onSelect:n}){return e.length===0?null:d.jsxs("section",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-sm font-bold uppercase tracking-wider mb-2",children:"Capacity"}),d.jsx("div",{className:"nb-card p-0 overflow-hidden",children:d.jsxs("table",{className:"w-full text-sm",children:[d.jsx("thead",{children:d.jsxs("tr",{className:"bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)]",children:[d.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"项目"}),d.jsx("th",{className:"px-3 py-2 text-left font-bold text-xs uppercase tracking-wider",children:"占用"}),d.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"running"}),d.jsx("th",{className:"px-3 py-2 text-right font-bold text-xs uppercase tracking-wider",children:"其它"}),d.jsx("th",{className:"px-3 py-2"})]})}),d.jsx("tbody",{children:e.map(a=>{const s=a.running+a.starting+a.stuck+a.crashed,o=(t==null?void 0:t.project)===a.project;return d.jsxs("tr",{onClick:()=>n(a.project),className:["border-b border-dashed border-[var(--color-border-light)] last:border-0 cursor-pointer hover:bg-[var(--color-accent-yellow)]",o?"bg-[var(--color-accent-yellow)]":""].join(" "),children:[d.jsx("td",{className:"px-3 py-2 font-[family-name:var(--font-mono)] font-bold",children:a.project}),d.jsx("td",{className:"px-3 py-2",children:d.jsx(YR,{total:a.total,cap:a})}),d.jsxs("td",{className:"px-3 py-2 text-right font-[family-name:var(--font-mono)]",children:[d.jsx("span",{className:"text-[var(--color-running)] font-bold",children:a.running}),d.jsxs("span",{className:"text-[var(--color-text-muted)]",children:["/",a.total]})]}),d.jsxs("td",{className:"px-3 py-2 text-right text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)]",children:[a.starting>0&&d.jsxs("span",{className:"mr-2",children:["starting ",a.starting]}),a.stuck>0&&d.jsxs("span",{className:"text-[var(--color-stuck)] font-bold mr-2",children:["stuck ",a.stuck]}),a.crashed>0&&d.jsxs("span",{className:"text-[var(--color-crashed)] font-bold mr-2",children:["crashed ",a.crashed]}),s===0&&d.jsx("span",{children:"idle"})]}),d.jsx("td",{className:"px-3 py-2 text-right",children:d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:"详情 →"})})]},a.project)})})]})})]})}function YR({total:e,cap:t}){const n=[];for(let a=0;a<t.crashed;a++)n.push("crashed");for(let a=0;a<t.stuck;a++)n.push("stuck");for(let a=0;a<t.starting;a++)n.push("starting");for(let a=0;a<t.running;a++)n.push("running");for(let a=0;a<t.idle;a++)n.push("idle");return d.jsxs("div",{className:"flex gap-1 items-center",children:[n.map((a,s)=>d.jsx("span",{className:"inline-block w-3 h-3 rounded-full border-2 border-[var(--color-text)]",style:{background:VR(a)},title:a},s)),d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] ml-2 font-[family-name:var(--font-mono)]",children:[e," slot",e!==1?"s":""]})]})}function VR(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 WR({project:e,initialSlot:t,onChange:n}){var h;const a=ot({queryKey:["workers",e],queryFn:()=>FR(e),refetchInterval:3e3}),s=((h=a.data)==null?void 0:h.data)??[],[o,c]=O.useState(null);O.useEffect(()=>{if(s.length===0){c(null);return}const m=s[0].slot;c(b=>b!=null&&s.some(g=>g.slot===b)?b:t!=null&&s.some(g=>g.slot===t)?t:m)},[e,t,s.length]);const f=s.find(m=>m.slot===o)??null;return d.jsxs("div",{className:"flex flex-col h-full",children:[d.jsxs("div",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[d.jsxs("div",{className:"flex items-center justify-between mb-2",children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold truncate",children:e}),d.jsx(ds,{to:`/board?project=${encodeURIComponent(e)}`,className:"text-xs underline text-[var(--color-text-muted)] hover:text-[var(--color-text)]",children:"看板 →"})]}),a.isLoading&&s.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载 workers…"}):s.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"该项目没有 worker slot。"}):d.jsx("div",{className:"flex flex-wrap gap-2",children:s.map(m=>d.jsx(XR,{worker:m,active:m.slot===o,onClick:()=>c(m.slot)},m.slot))})]}),f?d.jsx(ZR,{project:e,worker:f,onChange:n}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:s.length===0?"无 worker":"请选择一个 worker"})})]})}function XR({worker:e,active:t,onClick:n}){return d.jsxs("button",{type:"button",onClick:n,className:["nb-card p-2 text-left min-w-[130px] transition-transform",t?"ring-4 ring-[var(--color-text)]":"opacity-80 hover:opacity-100"].join(" "),children:[d.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[d.jsx(mg,{state:e.state}),d.jsxs("span",{className:"font-[family-name:var(--font-mono)] font-bold text-xs",children:["worker-",e.slot]})]}),e.card?d.jsxs("div",{className:"text-[11px] truncate font-[family-name:var(--font-mono)]",children:["#",e.card.seq," ",e.card.title]}):d.jsx("div",{className:"text-[11px] text-[var(--color-text-muted)] italic",children:"空闲"})]})}function ZR({project:e,worker:t,onChange:n}){var m,b;const{confirm:a,alert:s}=li(),o=t.state==="crashed"||t.state==="stuck",c=ot({queryKey:["worker-detail",e,t.slot],queryFn:()=>PR(e,t.slot),refetchInterval:3e3}),f=((m=c.data)==null?void 0:m.recentOutput)??[],h=((b=c.data)==null?void 0:b.recentLogs)??[];return d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[t.card?d.jsxs("div",{children:[d.jsx("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1",children:"当前卡片"}),d.jsxs("div",{className:"text-sm font-semibold break-words",children:["#",t.card.seq," · ",t.card.title]})]}):d.jsx("div",{className:"text-sm text-[var(--color-text-muted)] italic",children:"slot 空闲,没有当前卡片。"}),d.jsxs("dl",{className:"grid grid-cols-[100px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"Stage"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.stage??"—"}),d.jsx("dt",{className:"font-bold",children:"PID"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:t.pid??"—"}),d.jsx("dt",{className:"font-bold",children:"Runtime"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:pg(t.runtimeMs)}),d.jsx("dt",{className:"font-bold",children:"Started"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.startedAt?new Date(t.startedAt).toLocaleString():"—"}),d.jsx("dt",{className:"font-bold",children:"Marker"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)] text-xs",children:t.markerUpdatedAt?gg(t.markerUpdatedAt):"—"})]}),d.jsxs("div",{children:[d.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 flex items-center gap-1",children:[d.jsx(oE,{size:10,strokeWidth:2.5}),"Claude 输出 · 最近 ",f.length," 行"]}),c.isLoading&&f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"加载中…"}):f.length===0?d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] italic",children:"还没收到 session 输出。Worker 刚启动时需要几秒。"}):d.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-80 overflow-auto whitespace-pre-wrap break-words",children:f.map(g=>`${g.ts?`${g.ts} [${g.kind}] `:`[${g.kind}] `}${g.text}`).join(`
|
|
508
|
-
`)})]}),h.length>0&&d.jsxs("div",{children:[d.jsxs("div",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-1 opacity-60",children:["Supervisor 心跳 · 最近 ",h.length," 行"]}),d.jsx("pre",{className:"text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded p-2 max-h-40 overflow-auto whitespace-pre-wrap break-words opacity-80",children:h.map(g=>`${g.ts??""} [${g.level}] ${g.msg}`).join(`
|
|
509
|
-
`)}),d.jsx(ds,{to:`/logs?project=${encodeURIComponent(e)}&worker=${t.slot}`,className:"text-xs underline text-[var(--color-running)] mt-1 inline-block",children:"查看完整 log →"})]})]}),d.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg-cream)] flex gap-2 justify-end flex-wrap",children:[o&&t.card&&d.jsxs("button",{type:"button",className:"nb-btn nb-btn-mint",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`重启 worker-${t.slot}`,body:`先杀进程,再重新 launch 到 #${t.card.seq}`,confirm:"重启"})){try{await s0(e,t.slot)}catch{}try{await qR(e,t.slot,t.card.seq),n()}catch(x){s({title:"重启失败",body:x instanceof Error?x.message:String(x)})}}},children:[d.jsx(GC,{size:11,strokeWidth:2.5})," 重启"]}),t.state!=="idle"&&d.jsxs("button",{type:"button",className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:async()=>{if(await a({title:`终止 worker-${t.slot}`,body:"当前任务强制中断。",confirm:"终止",danger:!0}))try{await s0(e,t.slot),n()}catch(x){s({title:"终止失败",body:x instanceof Error?x.message:String(x)})}},children:[d.jsx(tA,{size:11,strokeWidth:2.5})," 终止"]})]})]})}function JR(){var o;const e=qn(),[t,n]=O.useState(null),a=ot({queryKey:["workers-agg"],queryFn:$R,refetchInterval:5e3});O.useEffect(()=>{if(!a.data)return;const c=a.data.capacity.map(h=>h.project),f=[];for(const h of c){const m=new EventSource(`/stream/projects/${encodeURIComponent(h)}`),b=()=>{e.invalidateQueries({queryKey:["workers-agg"]})};m.addEventListener("worker.updated",b),m.addEventListener("worker.added",b),m.addEventListener("worker.deleted",b),m.addEventListener("card.updated",b),f.push(m)}return()=>{for(const h of f)h.close()}},[(o=a.data)==null?void 0:o.capacity.map(c=>c.project).join(","),e]);const s=O.useMemo(()=>{if(!a.data)return{projects:0,running:0,starting:0,stuck:0,crashed:0,idle:0};const c={projects:a.data.capacity.length,running:0,starting:0,stuck:0,crashed:0,idle:0};for(const f of a.data.capacity)c.running+=f.running,c.starting+=f.starting,c.stuck+=f.stuck,c.crashed+=f.crashed,c.idle+=f.idle;return c},[a.data]);return d.jsxs("div",{className:"flex flex-col gap-4 h-[calc(100vh-140px)]",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Workers 👷"}),d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:["跨 ",s.projects," 项目 · ",s.running," 跑 · ",s.starting," 启动 ·"," ",d.jsxs("span",{className:"text-[var(--color-stuck)]",children:[s.stuck," 卡"]})," ·"," ",d.jsxs("span",{className:"text-[var(--color-crashed)]",children:[s.crashed," 崩"]})," · ",s.idle," 闲"]})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a.refetch(),disabled:a.isFetching,type:"button","aria-label":"刷新",children:[a.isFetching?d.jsx(Lt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Cl,{size:12,strokeWidth:2.5}),"刷新"]})]}),d.jsxs("div",{className:"grid grid-cols-1 xl:grid-cols-2 gap-4 flex-1 min-h-0",children:[d.jsxs("div",{className:"flex flex-col gap-4 overflow-auto pr-2",children:[a.isLoading&&d.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"加载中…"}),a.isError&&d.jsx("div",{className:"nb-card bg-[var(--color-crashed-bg)]",children:d.jsxs("p",{children:["加载失败: ",a.error instanceof Error?a.error.message:String(a.error)]})}),a.data&&d.jsxs(d.Fragment,{children:[d.jsx(KR,{alerts:a.data.alerts,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),d.jsx(GR,{active:a.data.active,selected:t,onSelect:(c,f)=>n({project:c,slot:f})}),d.jsx(QR,{capacity:a.data.capacity,selected:t,onSelect:c=>n({project:c})})]})]}),d.jsx("aside",{className:"nb-card p-0 overflow-hidden flex flex-col h-full",children:t?d.jsx(WR,{project:t.project,initialSlot:t.slot,onChange:()=>e.invalidateQueries({queryKey:["workers-agg"]})}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-6 text-center",children:d.jsxs("div",{children:[d.jsx(If,{size:32,className:"mx-auto mb-3 text-[var(--color-text-subtle)]",strokeWidth:2}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)]",children:"点击项目 / worker 查看详情"})]})})})]})]})}function eM(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),Ft(`/api/logs?${t}`)}function tM(e){const t=new URLSearchParams({project:e.project});return e.worker&&t.set("worker",e.worker),`/stream/logs?${t}`}const nM=["error","warn","info","debug"],iM=["error","warn","info"];function aM(){var H,ee;const[e,t]=J1(),n=e.get("project"),a=e.get("worker")??"",[s,o]=O.useState([]),[c,f]=O.useState(!1),[h,m]=O.useState(!0),[b,g]=O.useState(()=>new Set(iM)),[x,v]=O.useState(""),[E,w]=O.useState("live"),[k,_]=O.useState(()=>{const L=new Date(Date.now()-36e5),J=ae=>String(ae).padStart(2,"0");return`${L.getFullYear()}-${J(L.getMonth()+1)}-${J(L.getDate())}T${J(L.getHours())}:${J(L.getMinutes())}`}),A=O.useRef(null),T=!n,j=ot({queryKey:["projects"],queryFn:_r}),{data:$,refetch:M}=ot({queryKey:["logs",n??"agg",a,E,E==="history"?k:"live"],queryFn:()=>eM({project:n||void 0,worker:a||void 0,limit:E==="history"?2e3:500,since:E==="history"?new Date(k).toISOString():void 0}),refetchInterval:T&&E==="live"?5e3:!1});O.useEffect(()=>{$!=null&&$.data&&o($.data)},[$]),O.useEffect(()=>{if(!n||E!=="live")return;const L=tM({project:n,worker:a||void 0}),J=new EventSource(L);return J.addEventListener("log.line",ae=>{if(!c)try{const ge=JSON.parse(ae.data);o(fe=>{const te=[...fe,ge];return te.length>5e3&&te.splice(0,te.length-5e3),te})}catch{}}),()=>J.close()},[n,a,c,E]),O.useEffect(()=>{if(!h)return;const L=A.current;L&&(L.scrollTop=L.scrollHeight)},[s,h]);const F=O.useMemo(()=>{const L=x.toLowerCase();return s.filter(J=>!(!b.has(J.level)||L&&!J.msg.toLowerCase().includes(L)))},[s,b,x]);return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsx("header",{className:"flex items-center justify-between gap-3 flex-wrap",children:d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold tracking-tight",children:"Logs 📜"}),d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[T?`全部项目(${((H=j.data)==null?void 0:H.data.length)??0})`:n,a&&` · worker-${a}`," · ",T&&E==="live"?"5s 轮询":"tail -f"," · ",s.length," lines",c&&d.jsx("span",{className:"text-[var(--color-stuck)] ml-2 font-bold",children:"⏸ PAUSED"})]})]})}),d.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[d.jsxs("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:[d.jsxs("button",{type:"button",onClick:()=>w("live"),"aria-pressed":E==="live",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",E==="live"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(aE,{size:11,strokeWidth:2.5}),"实时"]}),d.jsxs("button",{type:"button",onClick:()=>w("history"),"aria-pressed":E==="history",className:["px-3 py-1 rounded-full text-xs font-bold flex items-center gap-1.5",E==="history"?"bg-[var(--color-primary)] text-[var(--color-text)] shadow-[1px_1px_0_var(--color-text)]":"text-[var(--color-text-muted)]"].join(" "),children:[d.jsx(cC,{size:11,strokeWidth:2.5}),"历史"]})]}),E==="history"&&d.jsxs(d.Fragment,{children:[d.jsx("input",{type:"datetime-local",className:"nb-input",style:{padding:"4px 8px",fontSize:12},value:k,onChange:L=>_(L.target.value),"aria-label":"查询起始时间"}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px",fontSize:12},onClick:()=>M(),type:"button","aria-label":"查询",children:[d.jsx(Sf,{size:11,strokeWidth:3}),"查询"]})]}),d.jsxs("div",{className:"relative",children:[d.jsx(lc,{size:14,strokeWidth:2.5,className:"absolute left-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"}),d.jsxs("select",{className:"nb-input appearance-none pl-9 pr-9 font-[family-name:var(--font-mono)] cursor-pointer",style:{padding:"10px 36px 10px 36px",fontSize:13,minWidth:180},value:n??"",onChange:L=>{const J=L.target.value;t(J?{project:J}:{})},"aria-label":"筛选项目",children:[d.jsx("option",{value:"",children:"全部项目"}),(ee=j.data)==null?void 0:ee.data.map(L=>d.jsx("option",{value:L.name,children:L.name},L.name))]}),d.jsx(vc,{size:14,strokeWidth:3,className:"absolute right-3 top-1/2 -translate-y-1/2 pointer-events-none text-[var(--color-text)]"})]}),d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Sf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"过滤关键字…",value:x,onChange:L=>v(L.target.value),"aria-label":"过滤日志"})]}),d.jsx("div",{className:"flex items-center gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:nM.map(L=>d.jsx(rM,{level:L,enabled:b.has(L),onToggle:()=>{g(J=>{const ae=new Set(J);return ae.has(L)?ae.delete(L):ae.add(L),ae})}},L))}),d.jsxs("div",{className:"ml-auto flex gap-2",children:[E==="live"&&d.jsxs(d.Fragment,{children:[d.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>m(L=>!L),type:"button",children:h?"✓ Auto-scroll":"Auto-scroll"}),d.jsx("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f(L=>!L),type:"button",children:c?d.jsxs(d.Fragment,{children:[d.jsx(Wp,{size:12,strokeWidth:3})," Resume"]}):d.jsxs(d.Fragment,{children:[d.jsx(TC,{size:12,strokeWidth:3})," Pause"]})})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>{const L=new Blob([F.map(ge=>ge.raw).join(`
|
|
510
|
-
`)],{type:"text/plain"}),J=URL.createObjectURL(L),ae=document.createElement("a");ae.href=J,ae.download=`${n}-log-${Date.now()}.log`,ae.click(),URL.revokeObjectURL(J)},type:"button",children:[d.jsx(nE,{size:12,strokeWidth:2.5})," Export"]})]})]}),d.jsxs("div",{className:"nb-card p-0 overflow-hidden",children:[d.jsxs("div",{className:"px-4 py-2 bg-[var(--color-bg-cream)] border-b-2 border-[var(--color-text)] flex items-center justify-between font-[family-name:var(--font-mono)] text-xs",children:[d.jsx("span",{className:"text-[var(--color-text-muted)]",children:($==null?void 0:$.file)??"~/.coral/projects/.../logs/*.log"}),E==="live"?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"live"}):d.jsx("span",{className:"nb-status",style:{background:"var(--color-accent-purple)",color:"var(--color-text)"},children:"history"})]}),d.jsxs("div",{ref:A,className:"overflow-auto font-[family-name:var(--font-mono)] text-[12px] leading-[22px] max-h-[70vh] bg-[var(--color-bg)] p-2",onScroll:L=>{const J=L.currentTarget;!(J.scrollHeight-J.scrollTop-J.clientHeight<40)&&h&&m(!1)},children:[F.map((L,J)=>d.jsx(sM,{line:L},J)),F.length===0&&d.jsx("div",{className:"text-center py-12 text-[var(--color-text-subtle)]",children:"没有匹配的日志"})]})]})]})}function rM({level:e,enabled:t,onToggle:n}){const a={error:"var(--color-crashed-bg)",warn:"var(--color-stuck-bg)",info:"var(--color-secondary)",debug:"var(--color-accent-purple)"},s={error:"var(--color-crashed)",warn:"var(--color-stuck)",info:"var(--color-text)",debug:"var(--color-text)"};return d.jsx("button",{type:"button",onClick:n,"aria-pressed":t,className:["px-3 py-0.5 rounded-full font-[family-name:var(--font-mono)] text-[10px] font-bold tracking-widest cursor-pointer",t?"border-[1.5px] border-[var(--color-text)]":"text-[var(--color-text-subtle)]"].join(" "),style:t?{background:a[e],color:s[e]}:{},children:e.toUpperCase()})}function sM({line:e}){var a;const t={error:"bg-[var(--color-crashed)] text-[var(--color-text)]",warn:"bg-[var(--color-stuck)] text-[var(--color-text)]",info:"bg-[var(--color-secondary)] text-[var(--color-text)]",debug:"",trace:""},n=!!e.project;return d.jsxs("div",{className:["grid gap-2 px-2 py-0.5 rounded hover:bg-[var(--color-bg-cream)]",n?"grid-cols-[100px_90px_60px_1fr]":"grid-cols-[100px_60px_1fr]"].join(" "),children:[d.jsx("span",{className:"text-[var(--color-text-subtle)] whitespace-nowrap",children:e.ts?((a=e.ts.split("T")[1])==null?void 0:a.replace("Z",""))??e.ts:"--"}),n&&d.jsx("span",{className:"truncate text-[var(--color-text-muted)] font-bold",title:e.project,children:e.project}),d.jsx("span",{className:`text-center font-bold ${t[e.level]??""}`,style:{borderRadius:4,padding:"0 6px"},children:e.level.toUpperCase()}),d.jsx("span",{className:"truncate text-[var(--color-text)]",children:e.msg})]})}function lM(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const oM=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,cM=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,uM={};function l0(e,t){return(uM.jsx?cM:oM).test(e)}const fM=/[ \t\n\f\r]/g;function dM(e){return typeof e=="object"?e.type==="text"?o0(e.value):!1:o0(e)}function o0(e){return e.replace(fM,"")===""}class kc{constructor(t,n,a){this.normal=n,this.property=t,a&&(this.space=a)}}kc.prototype.normal={};kc.prototype.property={};kc.prototype.space=void 0;function pS(e,t){const n={},a={};for(const s of e)Object.assign(n,s.property),Object.assign(a,s.normal);return new kc(n,a,t)}function Ep(e){return e.toLowerCase()}class Hn{constructor(t,n){this.attribute=n,this.property=t}}Hn.prototype.attribute="";Hn.prototype.booleanish=!1;Hn.prototype.boolean=!1;Hn.prototype.commaOrSpaceSeparated=!1;Hn.prototype.commaSeparated=!1;Hn.prototype.defined=!1;Hn.prototype.mustUseProperty=!1;Hn.prototype.number=!1;Hn.prototype.overloadedBoolean=!1;Hn.prototype.property="";Hn.prototype.spaceSeparated=!1;Hn.prototype.space=void 0;let hM=0;const qe=ps(),Jt=ps(),Sp=ps(),me=ps(),_t=ps(),pl=ps(),ni=ps();function ps(){return 2**++hM}const wp=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Jt,commaOrSpaceSeparated:ni,commaSeparated:pl,number:me,overloadedBoolean:Sp,spaceSeparated:_t},Symbol.toStringTag,{value:"Module"})),Nm=Object.keys(wp);class bg extends Hn{constructor(t,n,a,s){let o=-1;if(super(t,n),c0(this,"space",s),typeof a=="number")for(;++o<Nm.length;){const c=Nm[o];c0(this,Nm[o],(a&wp[c])===wp[c])}}}bg.prototype.defined=!0;function c0(e,t,n){n&&(e[t]=n)}function Hl(e){const t={},n={};for(const[a,s]of Object.entries(e.properties)){const o=new bg(a,e.transform(e.attributes||{},a),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(a)&&(o.mustUseProperty=!0),t[a]=o,n[Ep(a)]=a,n[Ep(o.attribute)]=a}return new kc(t,n,e.space)}const gS=Hl({properties:{ariaActiveDescendant:null,ariaAtomic:Jt,ariaAutoComplete:null,ariaBusy:Jt,ariaChecked:Jt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:_t,ariaCurrent:null,ariaDescribedBy:_t,ariaDetails:null,ariaDisabled:Jt,ariaDropEffect:_t,ariaErrorMessage:null,ariaExpanded:Jt,ariaFlowTo:_t,ariaGrabbed:Jt,ariaHasPopup:null,ariaHidden:Jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:_t,ariaLevel:me,ariaLive:null,ariaModal:Jt,ariaMultiLine:Jt,ariaMultiSelectable:Jt,ariaOrientation:null,ariaOwns:_t,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Jt,ariaReadOnly:Jt,ariaRelevant:null,ariaRequired:Jt,ariaRoleDescription:_t,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Jt,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 bS(e,t){return t in e?e[t]:t}function yS(e,t){return bS(e,t.toLowerCase())}const mM=Hl({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:pl,acceptCharset:_t,accessKey:_t,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:_t,autoFocus:qe,autoPlay:qe,blocking:_t,capture:null,charSet:null,checked:qe,cite:null,className:_t,cols:me,colSpan:null,content:null,contentEditable:Jt,controls:qe,controlsList:_t,coords:me|pl,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:Sp,draggable:Jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:_t,height:me,hidden:Sp,high:me,href:null,hrefLang:null,htmlFor:_t,httpEquiv:_t,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:_t,itemRef:_t,itemScope:qe,itemType:_t,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,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:qe,optimum:me,pattern:null,ping:_t,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:_t,required:qe,reversed:qe,rows:me,rowSpan:me,sandbox:_t,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Jt,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:qe,useMap:null,value:Jt,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:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Jt,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:qe,disableRemotePlayback:qe,prefix:null,property:null,results:me,security:null,unselectable:null},space:"html",transform:yS}),pM=Hl({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ni,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:qe,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:pl,g2:pl,glyphName:pl,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:ni,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:ni,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ni,rev:ni,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ni,requiredFeatures:ni,requiredFonts:ni,requiredFormats:ni,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:ni,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:ni,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:ni,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:bS}),xS=Hl({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),vS=Hl({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:yS}),ES=Hl({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),gM={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"},bM=/[A-Z]/g,u0=/-[a-z]/g,yM=/^data[-\w.:]+$/i;function xM(e,t){const n=Ep(t);let a=t,s=Hn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&yM.test(t)){if(t.charAt(4)==="-"){const o=t.slice(5).replace(u0,EM);a="data"+o.charAt(0).toUpperCase()+o.slice(1)}else{const o=t.slice(4);if(!u0.test(o)){let c=o.replace(bM,vM);c.charAt(0)!=="-"&&(c="-"+c),t="data"+c}}s=bg}return new s(a,t)}function vM(e){return"-"+e.toLowerCase()}function EM(e){return e.charAt(1).toUpperCase()}const SM=pS([gS,mM,xS,vS,ES],"html"),yg=pS([gS,pM,xS,vS,ES],"svg");function wM(e){return e.join(" ").trim()}var al={},Tm,f0;function _M(){if(f0)return Tm;f0=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,a=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,o=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,c=/^[;\s]*/,f=/^\s+|\s+$/g,h=`
|
|
511
|
-
`,m="/",b="*",g="",x="comment",v="declaration";function E(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var A=1,T=1;function j(fe){var te=fe.match(t);te&&(A+=te.length);var q=fe.lastIndexOf(h);T=~q?fe.length-q:T+fe.length}function $(){var fe={line:A,column:T};return function(te){return te.position=new M(fe),ee(),te}}function M(fe){this.start=fe,this.end={line:A,column:T},this.source=_.source}M.prototype.content=k;function F(fe){var te=new Error(_.source+":"+A+":"+T+": "+fe);if(te.reason=fe,te.filename=_.source,te.line=A,te.column=T,te.source=k,!_.silent)throw te}function H(fe){var te=fe.exec(k);if(te){var q=te[0];return j(q),k=k.slice(q.length),te}}function ee(){H(n)}function L(fe){var te;for(fe=fe||[];te=J();)te!==!1&&fe.push(te);return fe}function J(){var fe=$();if(!(m!=k.charAt(0)||b!=k.charAt(1))){for(var te=2;g!=k.charAt(te)&&(b!=k.charAt(te)||m!=k.charAt(te+1));)++te;if(te+=2,g===k.charAt(te-1))return F("End of comment missing");var q=k.slice(2,te-2);return T+=2,j(q),k=k.slice(te),T+=2,fe({type:x,comment:q})}}function ae(){var fe=$(),te=H(a);if(te){if(J(),!H(s))return F("property missing ':'");var q=H(o),ce=fe({type:v,property:w(te[0].replace(e,g)),value:q?w(q[0].replace(e,g)):g});return H(c),ce}}function ge(){var fe=[];L(fe);for(var te;te=ae();)te!==!1&&(fe.push(te),L(fe));return fe}return ee(),ge()}function w(k){return k?k.replace(f,g):g}return Tm=E,Tm}var d0;function kM(){if(d0)return al;d0=1;var e=al&&al.__importDefault||function(a){return a&&a.__esModule?a:{default:a}};Object.defineProperty(al,"__esModule",{value:!0}),al.default=n;const t=e(_M());function n(a,s){let o=null;if(!a||typeof a!="string")return o;const c=(0,t.default)(a),f=typeof s=="function";return c.forEach(h=>{if(h.type!=="declaration")return;const{property:m,value:b}=h;f?s(m,b,h):b&&(o=o||{},o[m]=b)}),o}return al}var Ko={},h0;function NM(){if(h0)return Ko;h0=1,Object.defineProperty(Ko,"__esModule",{value:!0}),Ko.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,a=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,o=function(m){return!m||n.test(m)||e.test(m)},c=function(m,b){return b.toUpperCase()},f=function(m,b){return"".concat(b,"-")},h=function(m,b){return b===void 0&&(b={}),o(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(s,f):m=m.replace(a,f),m.replace(t,c))};return Ko.camelCase=h,Ko}var Go,m0;function TM(){if(m0)return Go;m0=1;var e=Go&&Go.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(kM()),n=NM();function a(s,o){var c={};return!s||typeof s!="string"||(0,t.default)(s,function(f,h){f&&h&&(c[(0,n.camelCase)(f,o)]=h)}),c}return a.default=a,Go=a,Go}var CM=TM();const AM=Dp(CM),SS=wS("end"),xg=wS("start");function wS(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 OM(e){const t=xg(e),n=SS(e);if(t&&n)return{start:t,end:n}}function Jo(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?p0(e.position):"start"in e||"end"in e?p0(e):"line"in e||"column"in e?_p(e):""}function _p(e){return g0(e&&e.line)+":"+g0(e&&e.column)}function p0(e){return _p(e&&e.start)+"-"+_p(e&&e.end)}function g0(e){return e&&typeof e=="number"?e:1}class yn extends Error{constructor(t,n,a){super(),typeof n=="string"&&(a=n,n=void 0);let s="",o={},c=!1;if(n&&("line"in n&&"column"in n?o={place:n}:"start"in n&&"end"in n?o={place:n}:"type"in n?o={ancestors:[n],place:n.position}:o={...n}),typeof t=="string"?s=t:!o.cause&&t&&(c=!0,s=t.message,o.cause=t),!o.ruleId&&!o.source&&typeof a=="string"){const h=a.indexOf(":");h===-1?o.ruleId=a:(o.source=a.slice(0,h),o.ruleId=a.slice(h+1))}if(!o.place&&o.ancestors&&o.ancestors){const h=o.ancestors[o.ancestors.length-1];h&&(o.place=h.position)}const f=o.place&&"start"in o.place?o.place.start:o.place;this.ancestors=o.ancestors||void 0,this.cause=o.cause||void 0,this.column=f?f.column:void 0,this.fatal=void 0,this.file="",this.message=s,this.line=f?f.line:void 0,this.name=Jo(o.place)||"1:1",this.place=o.place||void 0,this.reason=this.message,this.ruleId=o.ruleId||void 0,this.source=o.source||void 0,this.stack=c&&o.cause&&typeof o.cause.stack=="string"?o.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}yn.prototype.file="";yn.prototype.name="";yn.prototype.reason="";yn.prototype.message="";yn.prototype.stack="";yn.prototype.column=void 0;yn.prototype.line=void 0;yn.prototype.ancestors=void 0;yn.prototype.cause=void 0;yn.prototype.fatal=void 0;yn.prototype.place=void 0;yn.prototype.ruleId=void 0;yn.prototype.source=void 0;const vg={}.hasOwnProperty,RM=new Map,MM=/[A-Z]/g,jM=new Set(["table","tbody","thead","tfoot","tr"]),DM=new Set(["td","th"]),_S="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function LM(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=qM(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=PM(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"?yg:SM,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},o=kS(s,e,void 0);return o&&typeof o!="string"?o:s.create(e,s.Fragment,{children:o||void 0},void 0)}function kS(e,t,n){if(t.type==="element")return zM(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return IM(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return UM(e,t,n);if(t.type==="mdxjsEsm")return BM(e,t);if(t.type==="root")return $M(e,t,n);if(t.type==="text")return FM(e,t)}function zM(e,t,n){const a=e.schema;let s=a;t.tagName.toLowerCase()==="svg"&&a.space==="html"&&(s=yg,e.schema=s),e.ancestors.push(t);const o=TS(e,t.tagName,!1),c=HM(e,t);let f=Sg(e,t);return jM.has(t.tagName)&&(f=f.filter(function(h){return typeof h=="string"?!dM(h):!0})),NS(e,c,o,t),Eg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function IM(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 BM(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);fc(e,t.position)}function UM(e,t,n){const a=e.schema;let s=a;t.name==="svg"&&a.space==="html"&&(s=yg,e.schema=s),e.ancestors.push(t);const o=t.name===null?e.Fragment:TS(e,t.name,!0),c=KM(e,t),f=Sg(e,t);return NS(e,c,o,t),Eg(c,f),e.ancestors.pop(),e.schema=a,e.create(t,o,c,n)}function $M(e,t,n){const a={};return Eg(a,Sg(e,t)),e.create(t,e.Fragment,a,n)}function FM(e,t){return t.value}function NS(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 PM(e,t,n){return a;function a(s,o,c,f){const m=Array.isArray(c.children)?n:t;return f?m(o,c,f):m(o,c)}}function qM(e,t){return n;function n(a,s,o,c){const f=Array.isArray(o.children),h=xg(a);return t(s,o,c,f,{columnNumber:h?h.column-1:void 0,fileName:e,lineNumber:h?h.line:void 0},void 0)}}function HM(e,t){const n={};let a,s;for(s in t.properties)if(s!=="children"&&vg.call(t.properties,s)){const o=GM(e,s,t.properties[s]);if(o){const[c,f]=o;e.tableCellAlignToStyle&&c==="align"&&typeof f=="string"&&DM.has(t.tagName)?a=f:n[c]=f}}if(a){const o=n.style||(n.style={});o[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=a}return n}function KM(e,t){const n={};for(const a of t.attributes)if(a.type==="mdxJsxExpressionAttribute")if(a.data&&a.data.estree&&e.evaluater){const o=a.data.estree.body[0];o.type;const c=o.expression;c.type;const f=c.properties[0];f.type,Object.assign(n,e.evaluater.evaluateExpression(f.argument))}else 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 f=a.value.data.estree.body[0];f.type,o=e.evaluater.evaluateExpression(f.expression)}else fc(e,t.position);else o=a.value===null?!0:a.value;n[s]=o}return n}function Sg(e,t){const n=[];let a=-1;const s=e.passKeys?new Map:RM;for(;++a<t.children.length;){const o=t.children[a];let c;if(e.passKeys){const h=o.type==="element"?o.tagName:o.type==="mdxJsxFlowElement"||o.type==="mdxJsxTextElement"?o.name:void 0;if(h){const m=s.get(h)||0;c=h+"-"+m,s.set(h,m+1)}}const f=kS(e,o,c);f!==void 0&&n.push(f)}return n}function GM(e,t,n){const a=xM(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=a.commaSeparated?lM(n):wM(n)),a.property==="style"){let s=typeof n=="object"?n:QM(e,String(n));return e.stylePropertyNameCase==="css"&&(s=YM(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&a.space?gM[a.property]||a.property:a.attribute,n]}}function QM(e,t){try{return AM(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const a=n,s=new yn("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=_S+"#cannot-parse-style-attribute",s}}function TS(e,t,n){let a;if(!n)a={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let o=-1,c;for(;++o<s.length;){const f=l0(s[o])?{type:"Identifier",name:s[o]}:{type:"Literal",value:s[o]};c=c?{type:"MemberExpression",object:c,property:f,computed:!!(o&&f.type==="Literal"),optional:!1}:f}a=c}else a=l0(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(a.type==="Literal"){const s=a.value;return vg.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 yn("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=_S+"#cannot-handle-mdx-estrees-without-createevaluater",n}function YM(e){const t={};let n;for(n in e)vg.call(e,n)&&(t[VM(n)]=e[n]);return t}function VM(e){let t=e.replace(MM,WM);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function WM(e){return"-"+e.toLowerCase()}const Cm={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"]},XM={};function wg(e,t){const n=XM,a=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return CS(e,a,s)}function CS(e,t,n){if(ZM(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 b0(e.children,t,n)}return Array.isArray(e)?b0(e,t,n):""}function b0(e,t,n){const a=[];let s=-1;for(;++s<e.length;)a[s]=CS(e[s],t,n);return a.join("")}function ZM(e){return!!(e&&typeof e=="object")}const y0=document.createElement("i");function _g(e){const t="&"+e+";";y0.innerHTML=t;const n=y0.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ri(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 vi(e,t){return e.length>0?(ri(e,e.length,0,t),e):t}const x0={}.hasOwnProperty;function AS(e){const t={};let n=-1;for(;++n<e.length;)JM(t,e[n]);return t}function JM(e,t){let n;for(n in t){const s=(x0.call(e,n)?e[n]:void 0)||(e[n]={}),o=t[n];let c;if(o)for(c in o){x0.call(s,c)||(s[c]=[]);const f=o[c];ej(s[c],Array.isArray(f)?f:f?[f]:[])}}}function ej(e,t){let n=-1;const a=[];for(;++n<t.length;)(t[n].add==="after"?e:a).push(t[n]);ri(e,0,0,a)}function OS(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 Di(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Tn=Nr(/[A-Za-z]/),gn=Nr(/[\dA-Za-z]/),tj=Nr(/[#-'*+\--9=?A-Z^-~]/);function Tf(e){return e!==null&&(e<32||e===127)}const kp=Nr(/\d/),nj=Nr(/[\dA-Fa-f]/),ij=Nr(/[!-/:-@[-`{-~]/);function Re(e){return e!==null&&e<-2}function Et(e){return e!==null&&(e<0||e===32)}function Ye(e){return e===-2||e===-1||e===32}const ed=Nr(new RegExp("\\p{P}|\\p{S}","u")),fs=Nr(/\s/);function Nr(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Kl(e){const t=[];let n=-1,a=0,s=0;for(;++n<e.length;){const o=e.charCodeAt(n);let c="";if(o===37&&gn(e.charCodeAt(n+1))&&gn(e.charCodeAt(n+2)))s=2;else if(o<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(o))||(c=String.fromCharCode(o));else if(o>55295&&o<57344){const f=e.charCodeAt(n+1);o<56320&&f>56319&&f<57344?(c=String.fromCharCode(o,f),s=1):c="�"}else c=String.fromCharCode(o);c&&(t.push(e.slice(a,n),encodeURIComponent(c)),a=n+s+1,c=""),s&&(n+=s,s=0)}return t.join("")+e.slice(a)}function nt(e,t,n,a){const s=a?a-1:Number.POSITIVE_INFINITY;let o=0;return c;function c(h){return Ye(h)?(e.enter(n),f(h)):t(h)}function f(h){return Ye(h)&&o++<s?(e.consume(h),f):(e.exit(n),t(h))}}const aj={tokenize:rj};function rj(e){const t=e.attempt(this.parser.constructs.contentInitial,a,s);let n;return t;function a(f){if(f===null){e.consume(f);return}return e.enter("lineEnding"),e.consume(f),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(f){return e.enter("paragraph"),o(f)}function o(f){const h=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=h),n=h,c(f)}function c(f){if(f===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(f);return}return Re(f)?(e.consume(f),e.exit("chunkText"),o):(e.consume(f),c)}}const sj={tokenize:lj},v0={tokenize:oj};function lj(e){const t=this,n=[];let a=0,s,o,c;return f;function f(T){if(a<n.length){const j=n[a];return t.containerState=j[1],e.attempt(j[0].continuation,h,m)(T)}return m(T)}function h(T){if(a++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&A();const j=t.events.length;let $=j,M;for(;$--;)if(t.events[$][0]==="exit"&&t.events[$][1].type==="chunkFlow"){M=t.events[$][1].end;break}_(a);let F=j;for(;F<t.events.length;)t.events[F][1].end={...M},F++;return ri(t.events,$+1,0,t.events.slice(j)),t.events.length=F,m(T)}return f(T)}function m(T){if(a===n.length){if(!s)return x(T);if(s.currentConstruct&&s.currentConstruct.concrete)return E(T);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(v0,b,g)(T)}function b(T){return s&&A(),_(a),x(T)}function g(T){return t.parser.lazy[t.now().line]=a!==n.length,c=t.now().offset,E(T)}function x(T){return t.containerState={},e.attempt(v0,v,E)(T)}function v(T){return a++,n.push([t.currentConstruct,t.containerState]),x(T)}function E(T){if(T===null){s&&A(),_(0),e.consume(T);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:o}),w(T)}function w(T){if(T===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(T);return}return Re(T)?(e.consume(T),k(e.exit("chunkFlow")),a=0,t.interrupt=void 0,f):(e.consume(T),w)}function k(T,j){const $=t.sliceStream(T);if(j&&$.push(null),T.previous=o,o&&(o.next=T),o=T,s.defineSkip(T.start),s.write($),t.parser.lazy[T.start.line]){let M=s.events.length;for(;M--;)if(s.events[M][1].start.offset<c&&(!s.events[M][1].end||s.events[M][1].end.offset>c))return;const F=t.events.length;let H=F,ee,L;for(;H--;)if(t.events[H][0]==="exit"&&t.events[H][1].type==="chunkFlow"){if(ee){L=t.events[H][1].end;break}ee=!0}for(_(a),M=F;M<t.events.length;)t.events[M][1].end={...L},M++;ri(t.events,H+1,0,t.events.slice(F)),t.events.length=M}}function _(T){let j=n.length;for(;j-- >T;){const $=n[j];t.containerState=$[1],$[0].exit.call(t,e)}n.length=T}function A(){s.write([null]),o=void 0,s=void 0,t.containerState._closeFlow=void 0}}function oj(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 Rl(e){if(e===null||Et(e)||fs(e))return 1;if(ed(e))return 2}function td(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 Np={name:"attention",resolveAll:cj,tokenize:uj};function cj(e,t){let n=-1,a,s,o,c,f,h,m,b;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(a=n;a--;)if(e[a][0]==="exit"&&e[a][1].type==="attentionSequence"&&e[a][1]._open&&t.sliceSerialize(e[a][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[a][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[a][1].end.offset-e[a][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;h=e[a][1].end.offset-e[a][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const g={...e[a][1].end},x={...e[n][1].start};E0(g,-h),E0(x,h),c={type:h>1?"strongSequence":"emphasisSequence",start:g,end:{...e[a][1].end}},f={type:h>1?"strongSequence":"emphasisSequence",start:{...e[n][1].start},end:x},o={type:h>1?"strongText":"emphasisText",start:{...e[a][1].end},end:{...e[n][1].start}},s={type:h>1?"strong":"emphasis",start:{...c.start},end:{...f.end}},e[a][1].end={...c.start},e[n][1].start={...f.end},m=[],e[a][1].end.offset-e[a][1].start.offset&&(m=vi(m,[["enter",e[a][1],t],["exit",e[a][1],t]])),m=vi(m,[["enter",s,t],["enter",c,t],["exit",c,t],["enter",o,t]]),m=vi(m,td(t.parser.constructs.insideSpan.null,e.slice(a+1,n),t)),m=vi(m,[["exit",o,t],["enter",f,t],["exit",f,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(b=2,m=vi(m,[["enter",e[n][1],t],["exit",e[n][1],t]])):b=0,ri(e,a-1,n-a+3,m),n=a+m.length-b-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function uj(e,t){const n=this.parser.constructs.attentionMarkers.null,a=this.previous,s=Rl(a);let o;return c;function c(h){return o=h,e.enter("attentionSequence"),f(h)}function f(h){if(h===o)return e.consume(h),f;const m=e.exit("attentionSequence"),b=Rl(h),g=!b||b===2&&s||n.includes(h),x=!s||s===2&&b||n.includes(a);return m._open=!!(o===42?g:g&&(s||!x)),m._close=!!(o===42?x:x&&(b||!g)),t(h)}}function E0(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const fj={name:"autolink",tokenize:dj};function dj(e,t,n){let a=0;return s;function s(v){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),o}function o(v){return Tn(v)?(e.consume(v),c):v===64?n(v):m(v)}function c(v){return v===43||v===45||v===46||gn(v)?(a=1,f(v)):m(v)}function f(v){return v===58?(e.consume(v),a=0,h):(v===43||v===45||v===46||gn(v))&&a++<32?(e.consume(v),f):(a=0,m(v))}function h(v){return v===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):v===null||v===32||v===60||Tf(v)?n(v):(e.consume(v),h)}function m(v){return v===64?(e.consume(v),b):tj(v)?(e.consume(v),m):n(v)}function b(v){return gn(v)?g(v):n(v)}function g(v){return v===46?(e.consume(v),a=0,b):v===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(v),e.exit("autolinkMarker"),e.exit("autolink"),t):x(v)}function x(v){if((v===45||gn(v))&&a++<63){const E=v===45?x:g;return e.consume(v),E}return n(v)}}const Nc={partial:!0,tokenize:hj};function hj(e,t,n){return a;function a(o){return Ye(o)?nt(e,s,"linePrefix")(o):s(o)}function s(o){return o===null||Re(o)?t(o):n(o)}}const RS={continuation:{tokenize:pj},exit:gj,name:"blockQuote",tokenize:mj};function mj(e,t,n){const a=this;return s;function s(c){if(c===62){const f=a.containerState;return f.open||(e.enter("blockQuote",{_container:!0}),f.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(c),e.exit("blockQuoteMarker"),o}return n(c)}function o(c){return Ye(c)?(e.enter("blockQuotePrefixWhitespace"),e.consume(c),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(c))}}function pj(e,t,n){const a=this;return s;function s(c){return Ye(c)?nt(e,o,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c):o(c)}function o(c){return e.attempt(RS,t,n)(c)}}function gj(e){e.exit("blockQuote")}const MS={name:"characterEscape",tokenize:bj};function bj(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 ij(o)?(e.enter("characterEscapeValue"),e.consume(o),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(o)}}const jS={name:"characterReference",tokenize:yj};function yj(e,t,n){const a=this;let s=0,o,c;return f;function f(g){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(g),e.exit("characterReferenceMarker"),h}function h(g){return g===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(g),e.exit("characterReferenceMarkerNumeric"),m):(e.enter("characterReferenceValue"),o=31,c=gn,b(g))}function m(g){return g===88||g===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(g),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),o=6,c=nj,b):(e.enter("characterReferenceValue"),o=7,c=kp,b(g))}function b(g){if(g===59&&s){const x=e.exit("characterReferenceValue");return c===gn&&!_g(a.sliceSerialize(x))?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:vj},w0={concrete:!0,name:"codeFenced",tokenize:xj};function xj(e,t,n){const a=this,s={partial:!0,tokenize:$};let o=0,c=0,f;return h;function h(M){return m(M)}function m(M){const F=a.events[a.events.length-1];return o=F&&F[1].type==="linePrefix"?F[2].sliceSerialize(F[1],!0).length:0,f=M,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===f?(c++,e.consume(M),b):c<3?n(M):(e.exit("codeFencedFenceSequence"),Ye(M)?nt(e,g,"whitespace")(M):g(M))}function g(M){return M===null||Re(M)?(e.exit("codeFencedFence"),a.interrupt?t(M):e.check(S0,w,j)(M)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),x(M))}function x(M){return M===null||Re(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),g(M)):Ye(M)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,v,"whitespace")(M)):M===96&&M===f?n(M):(e.consume(M),x)}function v(M){return M===null||Re(M)?g(M):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),E(M))}function E(M){return M===null||Re(M)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),g(M)):M===96&&M===f?n(M):(e.consume(M),E)}function w(M){return e.attempt(s,j,k)(M)}function k(M){return e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),_}function _(M){return o>0&&Ye(M)?nt(e,A,"linePrefix",o+1)(M):A(M)}function A(M){return M===null||Re(M)?e.check(S0,w,j)(M):(e.enter("codeFlowValue"),T(M))}function T(M){return M===null||Re(M)?(e.exit("codeFlowValue"),A(M)):(e.consume(M),T)}function j(M){return e.exit("codeFenced"),t(M)}function $(M,F,H){let ee=0;return L;function L(te){return M.enter("lineEnding"),M.consume(te),M.exit("lineEnding"),J}function J(te){return M.enter("codeFencedFence"),Ye(te)?nt(M,ae,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(te):ae(te)}function ae(te){return te===f?(M.enter("codeFencedFenceSequence"),ge(te)):H(te)}function ge(te){return te===f?(ee++,M.consume(te),ge):ee>=c?(M.exit("codeFencedFenceSequence"),Ye(te)?nt(M,fe,"whitespace")(te):fe(te)):H(te)}function fe(te){return te===null||Re(te)?(M.exit("codeFencedFence"),F(te)):H(te)}}}function vj(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 Am={name:"codeIndented",tokenize:Sj},Ej={partial:!0,tokenize:wj};function Sj(e,t,n){const a=this;return s;function s(m){return e.enter("codeIndented"),nt(e,o,"linePrefix",5)(m)}function o(m){const b=a.events[a.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?c(m):n(m)}function c(m){return m===null?h(m):Re(m)?e.attempt(Ej,c,h)(m):(e.enter("codeFlowValue"),f(m))}function f(m){return m===null||Re(m)?(e.exit("codeFlowValue"),c(m)):(e.consume(m),f)}function h(m){return e.exit("codeIndented"),t(m)}}function wj(e,t,n){const a=this;return s;function s(c){return a.parser.lazy[a.now().line]?n(c):Re(c)?(e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),s):nt(e,o,"linePrefix",5)(c)}function o(c){const f=a.events[a.events.length-1];return f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):Re(c)?s(c):n(c)}}const _j={name:"codeText",previous:Nj,resolve:kj,tokenize:Tj};function kj(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 Nj(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Tj(e,t,n){let a=0,s,o;return c;function c(g){return e.enter("codeText"),e.enter("codeTextSequence"),f(g)}function f(g){return g===96?(e.consume(g),a++,f):(e.exit("codeTextSequence"),h(g))}function h(g){return g===null?n(g):g===32?(e.enter("space"),e.consume(g),e.exit("space"),h):g===96?(o=e.enter("codeTextSequence"),s=0,b(g)):Re(g)?(e.enter("lineEnding"),e.consume(g),e.exit("lineEnding"),h):(e.enter("codeTextData"),m(g))}function m(g){return g===null||g===32||g===96||Re(g)?(e.exit("codeTextData"),h(g)):(e.consume(g),m)}function b(g){return g===96?(e.consume(g),s++,b):s===a?(e.exit("codeTextSequence"),e.exit("codeText"),t(g)):(o.type="codeTextData",m(g))}}class Cj{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 DS(e){const t={};let n=-1,a,s,o,c,f,h,m;const b=new Cj(e);for(;++n<b.length;){for(;n in t;)n=t[n];if(a=b.get(n),n&&a[1].type==="chunkFlow"&&b.get(n-1)[1].type==="listItemPrefix"&&(h=a[1]._tokenizer.events,o=0,o<h.length&&h[o][1].type==="lineEndingBlank"&&(o+=2),o<h.length&&h[o][1].type==="content"))for(;++o<h.length&&h[o][1].type!=="content";)h[o][1].type==="chunkText"&&(h[o][1]._isInFirstContentOfListItem=!0,o++);if(a[0]==="enter")a[1].contentType&&(Object.assign(t,Aj(b,n)),n=t[n],m=!0);else if(a[1]._container){for(o=n,s=void 0;o--;)if(c=b.get(o),c[1].type==="lineEnding"||c[1].type==="lineEndingBlank")c[0]==="enter"&&(s&&(b.get(s)[1].type="lineEndingBlank"),c[1].type="lineEnding",s=o);else if(!(c[1].type==="linePrefix"||c[1].type==="listItemIndent"))break;s&&(a[1].end={...b.get(s)[1].start},f=b.slice(s,n),f.unshift(a),b.splice(s,n-s+1,f))}}return ri(e,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function Aj(e,t){const n=e.get(t)[1],a=e.get(t)[2];let s=t-1;const o=[];let c=n._tokenizer;c||(c=a.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(c._contentTypeTextTrailing=!0));const f=c.events,h=[],m={};let b,g,x=-1,v=n,E=0,w=0;const k=[w];for(;v;){for(;e.get(++s)[1]!==v;);o.push(s),v._tokenizer||(b=a.sliceStream(v),v.next||b.push(null),g&&c.defineSkip(v.start),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=!0),c.write(b),v._isInFirstContentOfListItem&&(c._gfmTasklistFirstContentOfListItem=void 0)),g=v,v=v.next}for(v=n;++x<f.length;)f[x][0]==="exit"&&f[x-1][0]==="enter"&&f[x][1].type===f[x-1][1].type&&f[x][1].start.line!==f[x][1].end.line&&(w=x+1,k.push(w),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(c.events=[],v?(v._tokenizer=void 0,v.previous=void 0):k.pop(),x=k.length;x--;){const _=f.slice(k[x],k[x+1]),A=o.pop();h.push([A,A+_.length-1]),e.splice(A,2,_)}for(h.reverse(),x=-1;++x<h.length;)m[E+h[x][0]]=E+h[x][1],E+=h[x][1]-h[x][0]-1;return m}const Oj={resolve:Mj,tokenize:jj},Rj={partial:!0,tokenize:Dj};function Mj(e){return DS(e),e}function jj(e,t){let n;return a;function a(f){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(f)}function s(f){return f===null?o(f):Re(f)?e.check(Rj,c,o)(f):(e.consume(f),s)}function o(f){return e.exit("chunkContent"),e.exit("content"),t(f)}function c(f){return e.consume(f),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,s}}function Dj(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||Re(c))return n(c);const f=a.events[a.events.length-1];return!a.parser.constructs.disable.null.includes("codeIndented")&&f&&f[1].type==="linePrefix"&&f[2].sliceSerialize(f[1],!0).length>=4?t(c):e.interrupt(a.parser.constructs.flow,n,t)(c)}}function LS(e,t,n,a,s,o,c,f,h){const m=h||Number.POSITIVE_INFINITY;let b=0;return g;function g(_){return _===60?(e.enter(a),e.enter(s),e.enter(o),e.consume(_),e.exit(o),x):_===null||_===32||_===41||Tf(_)?n(_):(e.enter(a),e.enter(c),e.enter(f),e.enter("chunkString",{contentType:"string"}),w(_))}function x(_){return _===62?(e.enter(o),e.consume(_),e.exit(o),e.exit(s),e.exit(a),t):(e.enter(f),e.enter("chunkString",{contentType:"string"}),v(_))}function v(_){return _===62?(e.exit("chunkString"),e.exit(f),x(_)):_===null||_===60||Re(_)?n(_):(e.consume(_),_===92?E:v)}function E(_){return _===60||_===62||_===92?(e.consume(_),v):v(_)}function w(_){return!b&&(_===null||_===41||Et(_))?(e.exit("chunkString"),e.exit(f),e.exit(c),e.exit(a),t(_)):b<m&&_===40?(e.consume(_),b++,w):_===41?(e.consume(_),b--,w):_===null||_===32||_===40||Tf(_)?n(_):(e.consume(_),_===92?k:w)}function k(_){return _===40||_===41||_===92?(e.consume(_),w):w(_)}}function zS(e,t,n,a,s,o){const c=this;let f=0,h;return m;function m(v){return e.enter(a),e.enter(s),e.consume(v),e.exit(s),e.enter(o),b}function b(v){return f>999||v===null||v===91||v===93&&!h||v===94&&!f&&"_hiddenFootnoteSupport"in c.parser.constructs?n(v):v===93?(e.exit(o),e.enter(s),e.consume(v),e.exit(s),e.exit(a),t):Re(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),b):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===null||v===91||v===93||Re(v)||f++>999?(e.exit("chunkString"),b(v)):(e.consume(v),h||(h=!Ye(v)),v===92?x:g)}function x(v){return v===91||v===92||v===93?(e.consume(v),f++,g):g(v)}}function IS(e,t,n,a,s,o){let c;return f;function f(x){return x===34||x===39||x===40?(e.enter(a),e.enter(s),e.consume(x),e.exit(s),c=x===40?41:x,h):n(x)}function h(x){return x===c?(e.enter(s),e.consume(x),e.exit(s),e.exit(a),t):(e.enter(o),m(x))}function m(x){return x===c?(e.exit(o),h(c)):x===null?n(x):Re(x)?(e.enter("lineEnding"),e.consume(x),e.exit("lineEnding"),nt(e,m,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),b(x))}function b(x){return x===c||x===null||Re(x)?(e.exit("chunkString"),m(x)):(e.consume(x),x===92?g:b)}function g(x){return x===c||x===92?(e.consume(x),b):b(x)}}function ec(e,t){let n;return a;function a(s){return Re(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,a):Ye(s)?nt(e,a,n?"linePrefix":"lineSuffix")(s):t(s)}}const Lj={name:"definition",tokenize:Ij},zj={partial:!0,tokenize:Bj};function Ij(e,t,n){const a=this;let s;return o;function o(v){return e.enter("definition"),c(v)}function c(v){return zS.call(a,e,f,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function f(v){return s=Di(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)),v===58?(e.enter("definitionMarker"),e.consume(v),e.exit("definitionMarker"),h):n(v)}function h(v){return Et(v)?ec(e,m)(v):m(v)}function m(v){return LS(e,b,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return e.attempt(zj,g,g)(v)}function g(v){return Ye(v)?nt(e,x,"whitespace")(v):x(v)}function x(v){return v===null||Re(v)?(e.exit("definition"),a.parser.defined.push(s),t(v)):n(v)}}function Bj(e,t,n){return a;function a(f){return Et(f)?ec(e,s)(f):n(f)}function s(f){return IS(e,o,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(f)}function o(f){return Ye(f)?nt(e,c,"whitespace")(f):c(f)}function c(f){return f===null||Re(f)?t(f):n(f)}}const Uj={name:"hardBreakEscape",tokenize:$j};function $j(e,t,n){return a;function a(o){return e.enter("hardBreakEscape"),e.consume(o),s}function s(o){return Re(o)?(e.exit("hardBreakEscape"),t(o)):n(o)}}const Fj={name:"headingAtx",resolve:Pj,tokenize:qj};function Pj(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"},ri(e,a,n-a+1,[["enter",s,t],["enter",o,t],["exit",o,t],["exit",s,t]])),e}function qj(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"),f(b)):n(b)}function f(b){return b===35?(e.enter("atxHeadingSequence"),h(b)):b===null||Re(b)?(e.exit("atxHeading"),t(b)):Ye(b)?nt(e,f,"whitespace")(b):(e.enter("atxHeadingText"),m(b))}function h(b){return b===35?(e.consume(b),h):(e.exit("atxHeadingSequence"),f(b))}function m(b){return b===null||b===35||Et(b)?(e.exit("atxHeadingText"),f(b)):(e.consume(b),m)}}const Hj=["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"],_0=["pre","script","style","textarea"],Kj={concrete:!0,name:"htmlFlow",resolveTo:Yj,tokenize:Vj},Gj={partial:!0,tokenize:Xj},Qj={partial:!0,tokenize:Wj};function Yj(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 Vj(e,t,n){const a=this;let s,o,c,f,h;return m;function m(C){return b(C)}function b(C){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(C),g}function g(C){return C===33?(e.consume(C),x):C===47?(e.consume(C),o=!0,w):C===63?(e.consume(C),s=3,a.interrupt?t:R):Tn(C)?(e.consume(C),c=String.fromCharCode(C),k):n(C)}function x(C){return C===45?(e.consume(C),s=2,v):C===91?(e.consume(C),s=5,f=0,E):Tn(C)?(e.consume(C),s=4,a.interrupt?t:R):n(C)}function v(C){return C===45?(e.consume(C),a.interrupt?t:R):n(C)}function E(C){const G="CDATA[";return C===G.charCodeAt(f++)?(e.consume(C),f===G.length?a.interrupt?t:ae:E):n(C)}function w(C){return Tn(C)?(e.consume(C),c=String.fromCharCode(C),k):n(C)}function k(C){if(C===null||C===47||C===62||Et(C)){const G=C===47,de=c.toLowerCase();return!G&&!o&&_0.includes(de)?(s=1,a.interrupt?t(C):ae(C)):Hj.includes(c.toLowerCase())?(s=6,G?(e.consume(C),_):a.interrupt?t(C):ae(C)):(s=7,a.interrupt&&!a.parser.lazy[a.now().line]?n(C):o?A(C):T(C))}return C===45||gn(C)?(e.consume(C),c+=String.fromCharCode(C),k):n(C)}function _(C){return C===62?(e.consume(C),a.interrupt?t:ae):n(C)}function A(C){return Ye(C)?(e.consume(C),A):L(C)}function T(C){return C===47?(e.consume(C),L):C===58||C===95||Tn(C)?(e.consume(C),j):Ye(C)?(e.consume(C),T):L(C)}function j(C){return C===45||C===46||C===58||C===95||gn(C)?(e.consume(C),j):$(C)}function $(C){return C===61?(e.consume(C),M):Ye(C)?(e.consume(C),$):T(C)}function M(C){return C===null||C===60||C===61||C===62||C===96?n(C):C===34||C===39?(e.consume(C),h=C,F):Ye(C)?(e.consume(C),M):H(C)}function F(C){return C===h?(e.consume(C),h=null,ee):C===null||Re(C)?n(C):(e.consume(C),F)}function H(C){return C===null||C===34||C===39||C===47||C===60||C===61||C===62||C===96||Et(C)?$(C):(e.consume(C),H)}function ee(C){return C===47||C===62||Ye(C)?T(C):n(C)}function L(C){return C===62?(e.consume(C),J):n(C)}function J(C){return C===null||Re(C)?ae(C):Ye(C)?(e.consume(C),J):n(C)}function ae(C){return C===45&&s===2?(e.consume(C),q):C===60&&s===1?(e.consume(C),ce):C===62&&s===4?(e.consume(C),D):C===63&&s===3?(e.consume(C),R):C===93&&s===5?(e.consume(C),be):Re(C)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(Gj,X,ge)(C)):C===null||Re(C)?(e.exit("htmlFlowData"),ge(C)):(e.consume(C),ae)}function ge(C){return e.check(Qj,fe,X)(C)}function fe(C){return e.enter("lineEnding"),e.consume(C),e.exit("lineEnding"),te}function te(C){return C===null||Re(C)?ge(C):(e.enter("htmlFlowData"),ae(C))}function q(C){return C===45?(e.consume(C),R):ae(C)}function ce(C){return C===47?(e.consume(C),c="",V):ae(C)}function V(C){if(C===62){const G=c.toLowerCase();return _0.includes(G)?(e.consume(C),D):ae(C)}return Tn(C)&&c.length<8?(e.consume(C),c+=String.fromCharCode(C),V):ae(C)}function be(C){return C===93?(e.consume(C),R):ae(C)}function R(C){return C===62?(e.consume(C),D):C===45&&s===2?(e.consume(C),R):ae(C)}function D(C){return C===null||Re(C)?(e.exit("htmlFlowData"),X(C)):(e.consume(C),D)}function X(C){return e.exit("htmlFlow"),t(C)}}function Wj(e,t,n){const a=this;return s;function s(c){return Re(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 Xj(e,t,n){return a;function a(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(Nc,t,n)}}const Zj={name:"htmlText",tokenize:Jj};function Jj(e,t,n){const a=this;let s,o,c;return f;function f(R){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(R),h}function h(R){return R===33?(e.consume(R),m):R===47?(e.consume(R),$):R===63?(e.consume(R),T):Tn(R)?(e.consume(R),H):n(R)}function m(R){return R===45?(e.consume(R),b):R===91?(e.consume(R),o=0,E):Tn(R)?(e.consume(R),A):n(R)}function b(R){return R===45?(e.consume(R),v):n(R)}function g(R){return R===null?n(R):R===45?(e.consume(R),x):Re(R)?(c=g,ce(R)):(e.consume(R),g)}function x(R){return R===45?(e.consume(R),v):g(R)}function v(R){return R===62?q(R):R===45?x(R):g(R)}function E(R){const D="CDATA[";return R===D.charCodeAt(o++)?(e.consume(R),o===D.length?w:E):n(R)}function w(R){return R===null?n(R):R===93?(e.consume(R),k):Re(R)?(c=w,ce(R)):(e.consume(R),w)}function k(R){return R===93?(e.consume(R),_):w(R)}function _(R){return R===62?q(R):R===93?(e.consume(R),_):w(R)}function A(R){return R===null||R===62?q(R):Re(R)?(c=A,ce(R)):(e.consume(R),A)}function T(R){return R===null?n(R):R===63?(e.consume(R),j):Re(R)?(c=T,ce(R)):(e.consume(R),T)}function j(R){return R===62?q(R):T(R)}function $(R){return Tn(R)?(e.consume(R),M):n(R)}function M(R){return R===45||gn(R)?(e.consume(R),M):F(R)}function F(R){return Re(R)?(c=F,ce(R)):Ye(R)?(e.consume(R),F):q(R)}function H(R){return R===45||gn(R)?(e.consume(R),H):R===47||R===62||Et(R)?ee(R):n(R)}function ee(R){return R===47?(e.consume(R),q):R===58||R===95||Tn(R)?(e.consume(R),L):Re(R)?(c=ee,ce(R)):Ye(R)?(e.consume(R),ee):q(R)}function L(R){return R===45||R===46||R===58||R===95||gn(R)?(e.consume(R),L):J(R)}function J(R){return R===61?(e.consume(R),ae):Re(R)?(c=J,ce(R)):Ye(R)?(e.consume(R),J):ee(R)}function ae(R){return R===null||R===60||R===61||R===62||R===96?n(R):R===34||R===39?(e.consume(R),s=R,ge):Re(R)?(c=ae,ce(R)):Ye(R)?(e.consume(R),ae):(e.consume(R),fe)}function ge(R){return R===s?(e.consume(R),s=void 0,te):R===null?n(R):Re(R)?(c=ge,ce(R)):(e.consume(R),ge)}function fe(R){return R===null||R===34||R===39||R===60||R===61||R===96?n(R):R===47||R===62||Et(R)?ee(R):(e.consume(R),fe)}function te(R){return R===47||R===62||Et(R)?ee(R):n(R)}function q(R){return R===62?(e.consume(R),e.exit("htmlTextData"),e.exit("htmlText"),t):n(R)}function ce(R){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),V}function V(R){return Ye(R)?nt(e,be,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(R):be(R)}function be(R){return e.enter("htmlTextData"),c(R)}}const kg={name:"labelEnd",resolveAll:iD,resolveTo:aD,tokenize:rD},eD={tokenize:sD},tD={tokenize:lD},nD={tokenize:oD};function iD(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&&ri(e,0,e.length,n),e}function aD(e,t){let n=e.length,a=0,s,o,c,f;for(;n--;)if(s=e[n][1],o){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(c){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(o=n,s.type!=="labelLink")){a=2;break}}else s.type==="labelEnd"&&(c=n);const h={type:e[o][1].type==="labelLink"?"link":"image",start:{...e[o][1].start},end:{...e[e.length-1][1].end}},m={type:"label",start:{...e[o][1].start},end:{...e[c][1].end}},b={type:"labelText",start:{...e[o+a+2][1].end},end:{...e[c-2][1].start}};return f=[["enter",h,t],["enter",m,t]],f=vi(f,e.slice(o+1,o+a+3)),f=vi(f,[["enter",b,t]]),f=vi(f,td(t.parser.constructs.insideSpan.null,e.slice(o+a+4,c-3),t)),f=vi(f,[["exit",b,t],e[c-2],e[c-1],["exit",m,t]]),f=vi(f,e.slice(c+1)),f=vi(f,[["exit",h,t]]),ri(e,o,e.length,f),e}function rD(e,t,n){const a=this;let s=a.events.length,o,c;for(;s--;)if((a.events[s][1].type==="labelImage"||a.events[s][1].type==="labelLink")&&!a.events[s][1]._balanced){o=a.events[s][1];break}return f;function f(x){return o?o._inactive?g(x):(c=a.parser.defined.includes(Di(a.sliceSerialize({start:o.end,end:a.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(x),e.exit("labelMarker"),e.exit("labelEnd"),h):n(x)}function h(x){return x===40?e.attempt(eD,b,c?b:g)(x):x===91?e.attempt(tD,b,c?m:g)(x):c?b(x):g(x)}function m(x){return e.attempt(nD,b,g)(x)}function b(x){return t(x)}function g(x){return o._balanced=!0,n(x)}}function sD(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)?ec(e,o)(g):o(g)}function o(g){return g===41?b(g):LS(e,c,f,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(g)}function c(g){return Et(g)?ec(e,h)(g):b(g)}function f(g){return n(g)}function h(g){return g===34||g===39||g===40?IS(e,m,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(g):b(g)}function m(g){return Et(g)?ec(e,b)(g):b(g)}function b(g){return g===41?(e.enter("resourceMarker"),e.consume(g),e.exit("resourceMarker"),e.exit("resource"),t):n(g)}}function lD(e,t,n){const a=this;return s;function s(f){return zS.call(a,e,o,c,"reference","referenceMarker","referenceString")(f)}function o(f){return a.parser.defined.includes(Di(a.sliceSerialize(a.events[a.events.length-1][1]).slice(1,-1)))?t(f):n(f)}function c(f){return n(f)}}function oD(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 cD={name:"labelStartImage",resolveAll:kg.resolveAll,tokenize:uD};function uD(e,t,n){const a=this;return s;function s(f){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(f),e.exit("labelImageMarker"),o}function o(f){return f===91?(e.enter("labelMarker"),e.consume(f),e.exit("labelMarker"),e.exit("labelImage"),c):n(f)}function c(f){return f===94&&"_hiddenFootnoteSupport"in a.parser.constructs?n(f):t(f)}}const fD={name:"labelStartLink",resolveAll:kg.resolveAll,tokenize:dD};function dD(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 Om={name:"lineEnding",tokenize:hD};function hD(e,t){return n;function n(a){return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const bf={name:"thematicBreak",tokenize:mD};function mD(e,t,n){let a=0,s;return o;function o(m){return e.enter("thematicBreak"),c(m)}function c(m){return s=m,f(m)}function f(m){return m===s?(e.enter("thematicBreakSequence"),h(m)):a>=3&&(m===null||Re(m))?(e.exit("thematicBreak"),t(m)):n(m)}function h(m){return m===s?(e.consume(m),a++,h):(e.exit("thematicBreakSequence"),Ye(m)?nt(e,f,"whitespace")(m):f(m))}}const Bn={continuation:{tokenize:yD},exit:vD,name:"list",tokenize:bD},pD={partial:!0,tokenize:ED},gD={partial:!0,tokenize:xD};function bD(e,t,n){const a=this,s=a.events[a.events.length-1];let o=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,c=0;return f;function f(v){const E=a.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(E==="listUnordered"?!a.containerState.marker||v===a.containerState.marker:kp(v)){if(a.containerState.type||(a.containerState.type=E,e.enter(E,{_container:!0})),E==="listUnordered")return e.enter("listItemPrefix"),v===42||v===45?e.check(bf,n,m)(v):m(v);if(!a.interrupt||v===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),h(v)}return n(v)}function h(v){return kp(v)&&++c<10?(e.consume(v),h):(!a.interrupt||c<2)&&(a.containerState.marker?v===a.containerState.marker:v===41||v===46)?(e.exit("listItemValue"),m(v)):n(v)}function m(v){return e.enter("listItemMarker"),e.consume(v),e.exit("listItemMarker"),a.containerState.marker=a.containerState.marker||v,e.check(Nc,a.interrupt?n:b,e.attempt(pD,x,g))}function b(v){return a.containerState.initialBlankLine=!0,o++,x(v)}function g(v){return Ye(v)?(e.enter("listItemPrefixWhitespace"),e.consume(v),e.exit("listItemPrefixWhitespace"),x):n(v)}function x(v){return a.containerState.size=o+a.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(v)}}function yD(e,t,n){const a=this;return a.containerState._closeFlow=void 0,e.check(Nc,s,o);function s(f){return a.containerState.furtherBlankLines=a.containerState.furtherBlankLines||a.containerState.initialBlankLine,nt(e,t,"listItemIndent",a.containerState.size+1)(f)}function o(f){return a.containerState.furtherBlankLines||!Ye(f)?(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,c(f)):(a.containerState.furtherBlankLines=void 0,a.containerState.initialBlankLine=void 0,e.attempt(gD,t,c)(f))}function c(f){return a.containerState._closeFlow=!0,a.interrupt=void 0,nt(e,e.attempt(Bn,t,n),"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f)}}function xD(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 vD(e){e.exit(this.containerState.type)}function ED(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!Ye(o)&&c&&c[1].type==="listItemPrefixWhitespace"?t(o):n(o)}}const k0={name:"setextUnderline",resolveTo:SD,tokenize:wD};function SD(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 wD(e,t,n){const a=this;let s;return o;function o(m){let b=a.events.length,g;for(;b--;)if(a.events[b][1].type!=="lineEnding"&&a.events[b][1].type!=="linePrefix"&&a.events[b][1].type!=="content"){g=a.events[b][1].type==="paragraph";break}return!a.parser.lazy[a.now().line]&&(a.interrupt||g)?(e.enter("setextHeadingLine"),s=m,c(m)):n(m)}function c(m){return e.enter("setextHeadingLineSequence"),f(m)}function f(m){return m===s?(e.consume(m),f):(e.exit("setextHeadingLineSequence"),Ye(m)?nt(e,h,"lineSuffix")(m):h(m))}function h(m){return m===null||Re(m)?(e.exit("setextHeadingLine"),t(m)):n(m)}}const _D={tokenize:kD};function kD(e){const t=this,n=e.attempt(Nc,a,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(Oj,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 ND={resolveAll:US()},TD=BS("string"),CD=BS("text");function BS(e){return{resolveAll:US(e==="text"?AD:void 0),tokenize:t};function t(n){const a=this,s=this.parser.constructs[e],o=n.attempt(s,c,f);return c;function c(b){return m(b)?o(b):f(b)}function f(b){if(b===null){n.consume(b);return}return n.enter("data"),n.consume(b),h}function h(b){return m(b)?(n.exit("data"),o(b)):(n.consume(b),h)}function m(b){if(b===null)return!0;const g=s[b];let x=-1;if(g)for(;++x<g.length;){const v=g[x];if(!v.previous||v.previous.call(a,a.previous))return!0}return!1}}}function US(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 AD(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const a=e[n-1][1],s=t.sliceStream(a);let o=s.length,c=-1,f=0,h;for(;o--;){const m=s[o];if(typeof m=="string"){for(c=m.length;m.charCodeAt(c-1)===32;)f++,c--;if(c)break;c=-1}else if(m===-2)h=!0,f++;else if(m!==-1){o++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(f=0),f){const m={type:n===e.length||h||f<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:o?c:a.start._bufferIndex+c,_index:a.start._index+o,line:a.end.line,column:a.end.column-f,offset:a.end.offset-f},end:{...a.end}};a.end={...m.start},a.start.offset===a.end.offset?Object.assign(a,m):(e.splice(n,0,["enter",m,t],["exit",m,t]),n+=2)}n++}return e}const OD={42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:RS},RD={91:Lj},MD={[-2]:Am,[-1]:Am,32:Am},jD={35:Fj,42:bf,45:[k0,bf],60:Kj,61:k0,95:bf,96:w0,126:w0},DD={38:jS,92:MS},LD={[-5]:Om,[-4]:Om,[-3]:Om,33:cD,38:jS,42:Np,60:[fj,Zj],91:fD,92:[Uj,MS],93:kg,95:Np,96:_j},zD={null:[Np,ND]},ID={null:[42,95]},BD={null:[]},UD=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:ID,contentInitial:RD,disable:BD,document:OD,flow:jD,flowInitial:MD,insideSpan:zD,string:DD,text:LD},Symbol.toStringTag,{value:"Module"}));function $D(e,t,n){let a={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},o=[];let c=[],f=[];const h={attempt:F($),check:F(M),consume:A,enter:T,exit:j,interrupt:F(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:w,events:[],now:E,parser:e,previous:null,sliceSerialize:x,sliceStream:v,write:g};let b=t.tokenize.call(m,h);return t.resolveAll&&o.push(t),m;function g(J){return c=vi(c,J),k(),c[c.length-1]!==null?[]:(H(t,0),m.events=td(o,m.events,m),m.events)}function x(J,ae){return PD(v(J),ae)}function v(J){return FD(c,J)}function E(){const{_bufferIndex:J,_index:ae,line:ge,column:fe,offset:te}=a;return{_bufferIndex:J,_index:ae,line:ge,column:fe,offset:te}}function w(J){s[J.line]=J.column,L()}function k(){let J;for(;a._index<c.length;){const ae=c[a._index];if(typeof ae=="string")for(J=a._index,a._bufferIndex<0&&(a._bufferIndex=0);a._index===J&&a._bufferIndex<ae.length;)_(ae.charCodeAt(a._bufferIndex));else _(ae)}}function _(J){b=b(J)}function A(J){Re(J)?(a.line++,a.column=1,a.offset+=J===-3?2:1,L()):J!==-1&&(a.column++,a.offset++),a._bufferIndex<0?a._index++:(a._bufferIndex++,a._bufferIndex===c[a._index].length&&(a._bufferIndex=-1,a._index++)),m.previous=J}function T(J,ae){const ge=ae||{};return ge.type=J,ge.start=E(),m.events.push(["enter",ge,m]),f.push(ge),ge}function j(J){const ae=f.pop();return ae.end=E(),m.events.push(["exit",ae,m]),ae}function $(J,ae){H(J,ae.from)}function M(J,ae){ae.restore()}function F(J,ae){return ge;function ge(fe,te,q){let ce,V,be,R;return Array.isArray(fe)?X(fe):"tokenize"in fe?X([fe]):D(fe);function D(re){return K;function K(ue){const Se=ue!==null&&re[ue],Ze=ue!==null&&re.null,it=[...Array.isArray(Se)?Se:Se?[Se]:[],...Array.isArray(Ze)?Ze:Ze?[Ze]:[]];return X(it)(ue)}}function X(re){return ce=re,V=0,re.length===0?q:C(re[V])}function C(re){return K;function K(ue){return R=ee(),be=re,re.partial||(m.currentConstruct=re),re.name&&m.parser.constructs.disable.null.includes(re.name)?de():re.tokenize.call(ae?Object.assign(Object.create(m),ae):m,h,G,de)(ue)}}function G(re){return J(be,R),te}function de(re){return R.restore(),++V<ce.length?C(ce[V]):q}}}function H(J,ae){J.resolveAll&&!o.includes(J)&&o.push(J),J.resolve&&ri(m.events,ae,m.events.length-ae,J.resolve(m.events.slice(ae),m)),J.resolveTo&&(m.events=J.resolveTo(m.events,m))}function ee(){const J=E(),ae=m.previous,ge=m.currentConstruct,fe=m.events.length,te=Array.from(f);return{from:fe,restore:q};function q(){a=J,m.previous=ae,m.currentConstruct=ge,m.events.length=fe,f=te,L()}}function L(){a.line in s&&a.column<2&&(a.column=s[a.line],a.offset+=s[a.line]-1)}}function FD(e,t){const n=t.start._index,a=t.start._bufferIndex,s=t.end._index,o=t.end._bufferIndex;let c;if(n===s)c=[e[n].slice(a,o)];else{if(c=e.slice(n,s),a>-1){const f=c[0];typeof f=="string"?c[0]=f.slice(a):c.shift()}o>0&&c.push(e[s].slice(0,o))}return c}function PD(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=`
|
|
512
|
-
`;break}case-3:{c=`\r
|
|
513
|
-
`;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 qD(e){const a={constructs:AS([UD,...(e||{}).extensions||[]]),content:s(aj),defined:[],document:s(sj),flow:s(_D),lazy:{},string:s(TD),text:s(CD)};return a;function s(o){return c;function c(f){return $D(a,o,f)}}}function HD(e){for(;!DS(e););return e}const N0=/[\0\t\n\r]/g;function KD(){let e=1,t="",n=!0,a;return s;function s(o,c,f){const h=[];let m,b,g,x,v;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(N0.lastIndex=g,m=N0.exec(o),x=m&&m.index!==void 0?m.index:o.length,v=o.charCodeAt(x),!m){t=o.slice(g);break}if(v===10&&g===x&&a)h.push(-3),a=void 0;else switch(a&&(h.push(-5),a=void 0),g<x&&(h.push(o.slice(g,x)),e+=x-g),v){case 0:{h.push(65533),e++;break}case 9:{for(b=Math.ceil(e/4)*4,h.push(-2);e++<b;)h.push(-1);break}case 10:{h.push(-4),e=1;break}default:a=!0,e=1}g=x+1}return f&&(a&&h.push(-5),t&&h.push(t),h.push(null)),h}}const GD=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function QD(e){return e.replace(GD,YD)}function YD(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),o=s===120||s===88;return OS(n.slice(o?2:1),o?16:10)}return _g(n)||e}const $S={}.hasOwnProperty;function VD(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),WD(n)(HD(qD(n).document().write(KD()(e,t,!0))))}function WD(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:o(Ui),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:o(Bi),blockQuote:o(Ze),characterEscape:ee,characterReference:ee,codeFenced:o(it),codeFencedFenceInfo:c,codeFencedFenceMeta:c,codeIndented:o(it,c),codeText:o(Kn,c),codeTextData:ee,data:ee,codeFlowValue:ee,definition:o(Ra),definitionDestinationString:c,definitionLabelString:c,definitionTitleString:c,emphasis:o(Gn),hardBreakEscape:o(Je),hardBreakTrailing:o(Je),htmlFlow:o(Ni,c),htmlFlowData:ee,htmlText:o(Ni,c),htmlTextData:ee,image:o(oi),label:c,link:o(Ui),listItem:o(Tr),listItemValue:x,listOrdered:o(ea,g),listUnordered:o(ea),paragraph:o(Gl),reference:C,referenceString:c,resourceDestinationString:c,resourceTitleString:c,setextHeading:o(Bi),strong:o(bs),thematicBreak:o(ys)},exit:{atxHeading:h(),atxHeadingSequence:$,autolink:h(),autolinkEmail:Se,autolinkProtocol:ue,blockQuote:h(),characterEscapeValue:L,characterReferenceMarkerHexadecimal:de,characterReferenceMarkerNumeric:de,characterReferenceValue:re,characterReference:K,codeFenced:h(k),codeFencedFence:w,codeFencedFenceInfo:v,codeFencedFenceMeta:E,codeFlowValue:L,codeIndented:h(_),codeText:h(te),codeTextData:L,data:L,definition:h(),definitionDestinationString:j,definitionLabelString:A,definitionTitleString:T,emphasis:h(),hardBreakEscape:h(ae),hardBreakTrailing:h(ae),htmlFlow:h(ge),htmlFlowData:L,htmlText:h(fe),htmlTextData:L,image:h(ce),label:be,labelText:V,lineEnding:J,link:h(q),listItem:h(),listOrdered:h(),listUnordered:h(),paragraph:h(),referenceString:G,resourceDestinationString:R,resourceTitleString:D,resource:X,setextHeading:h(H),setextHeadingLineSequence:F,setextHeadingText:M,strong:h(),thematicBreak:h()}};FS(t,(e||{}).mdastExtensions||[]);const n={};return a;function a(ne){let pe={type:"root",children:[]};const Me={stack:[pe],tokenStack:[],config:t,enter:f,exit:m,buffer:c,resume:b,data:n},He=[];let at=-1;for(;++at<ne.length;)if(ne[at][1].type==="listOrdered"||ne[at][1].type==="listUnordered")if(ne[at][0]==="enter")He.push(at);else{const xn=He.pop();at=s(ne,xn,at)}for(at=-1;++at<ne.length;){const xn=t[ne[at][0]];$S.call(xn,ne[at][1].type)&&xn[ne[at][1].type].call(Object.assign({sliceSerialize:ne[at][2].sliceSerialize},Me),ne[at][1])}if(Me.tokenStack.length>0){const xn=Me.tokenStack[Me.tokenStack.length-1];(xn[1]||T0).call(Me,void 0,xn[0])}for(pe.position={start:or(ne.length>0?ne[0][1].start:{line:1,column:1,offset:0}),end:or(ne.length>0?ne[ne.length-2][1].end:{line:1,column:1,offset:0})},at=-1;++at<t.transforms.length;)pe=t.transforms[at](pe)||pe;return pe}function s(ne,pe,Me){let He=pe-1,at=-1,xn=!1,Ti,rn,It,fn;for(;++He<=Me;){const ut=ne[He];switch(ut[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{ut[0]==="enter"?at++:at--,fn=void 0;break}case"lineEndingBlank":{ut[0]==="enter"&&(Ti&&!fn&&!at&&!It&&(It=He),fn=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:fn=void 0}if(!at&&ut[0]==="enter"&&ut[1].type==="listItemPrefix"||at===-1&&ut[0]==="exit"&&(ut[1].type==="listUnordered"||ut[1].type==="listOrdered")){if(Ti){let $i=He;for(rn=void 0;$i--;){const vn=ne[$i];if(vn[1].type==="lineEnding"||vn[1].type==="lineEndingBlank"){if(vn[0]==="exit")continue;rn&&(ne[rn][1].type="lineEndingBlank",xn=!0),vn[1].type="lineEnding",rn=$i}else if(!(vn[1].type==="linePrefix"||vn[1].type==="blockQuotePrefix"||vn[1].type==="blockQuotePrefixWhitespace"||vn[1].type==="blockQuoteMarker"||vn[1].type==="listItemIndent"))break}It&&(!rn||It<rn)&&(Ti._spread=!0),Ti.end=Object.assign({},rn?ne[rn][1].start:ut[1].end),ne.splice(rn||He,0,["exit",Ti,ut[2]]),He++,Me++}if(ut[1].type==="listItemPrefix"){const $i={type:"listItem",_spread:!1,start:Object.assign({},ut[1].start),end:void 0};Ti=$i,ne.splice(He,0,["enter",$i,ut[2]]),He++,Me++,It=void 0,fn=!0}}}return ne[pe][1]._spread=xn,Me}function o(ne,pe){return Me;function Me(He){f.call(this,ne(He),He),pe&&pe.call(this,He)}}function c(){this.stack.push({type:"fragment",children:[]})}function f(ne,pe,Me){this.stack[this.stack.length-1].children.push(ne),this.stack.push(ne),this.tokenStack.push([pe,Me||void 0]),ne.position={start:or(pe.start),end:void 0}}function h(ne){return pe;function pe(Me){ne&&ne.call(this,Me),m.call(this,Me)}}function m(ne,pe){const Me=this.stack.pop(),He=this.tokenStack.pop();if(He)He[0].type!==ne.type&&(pe?pe.call(this,ne,He[0]):(He[1]||T0).call(this,ne,He[0]));else throw new Error("Cannot close `"+ne.type+"` ("+Jo({start:ne.start,end:ne.end})+"): it’s not open");Me.position.end=or(ne.end)}function b(){return wg(this.stack.pop())}function g(){this.data.expectingFirstListItemValue=!0}function x(ne){if(this.data.expectingFirstListItemValue){const pe=this.stack[this.stack.length-2];pe.start=Number.parseInt(this.sliceSerialize(ne),10),this.data.expectingFirstListItemValue=void 0}}function v(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.lang=ne}function E(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.meta=ne}function w(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ne.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ne.replace(/(\r?\n|\r)$/g,"")}function A(ne){const pe=this.resume(),Me=this.stack[this.stack.length-1];Me.label=pe,Me.identifier=Di(this.sliceSerialize(ne)).toLowerCase()}function T(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ne}function j(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ne}function $(ne){const pe=this.stack[this.stack.length-1];if(!pe.depth){const Me=this.sliceSerialize(ne).length;pe.depth=Me}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function F(ne){const pe=this.stack[this.stack.length-1];pe.depth=this.sliceSerialize(ne).codePointAt(0)===61?1:2}function H(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(ne){const Me=this.stack[this.stack.length-1].children;let He=Me[Me.length-1];(!He||He.type!=="text")&&(He=Mt(),He.position={start:or(ne.start),end:void 0},Me.push(He)),this.stack.push(He)}function L(ne){const pe=this.stack.pop();pe.value+=this.sliceSerialize(ne),pe.position.end=or(ne.end)}function J(ne){const pe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Me=pe.children[pe.children.length-1];Me.position.end=or(ne.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(pe.type)&&(ee.call(this,ne),L.call(this,ne))}function ae(){this.data.atHardBreak=!0}function ge(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ne}function fe(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ne}function te(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.value=ne}function q(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=pe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function ce(){const ne=this.stack[this.stack.length-1];if(this.data.inReference){const pe=this.data.referenceType||"shortcut";ne.type+="Reference",ne.referenceType=pe,delete ne.url,delete ne.title}else delete ne.identifier,delete ne.label;this.data.referenceType=void 0}function V(ne){const pe=this.sliceSerialize(ne),Me=this.stack[this.stack.length-2];Me.label=QD(pe),Me.identifier=Di(pe).toLowerCase()}function be(){const ne=this.stack[this.stack.length-1],pe=this.resume(),Me=this.stack[this.stack.length-1];if(this.data.inReference=!0,Me.type==="link"){const He=ne.children;Me.children=He}else Me.alt=pe}function R(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.url=ne}function D(){const ne=this.resume(),pe=this.stack[this.stack.length-1];pe.title=ne}function X(){this.data.inReference=void 0}function C(){this.data.referenceType="collapsed"}function G(ne){const pe=this.resume(),Me=this.stack[this.stack.length-1];Me.label=pe,Me.identifier=Di(this.sliceSerialize(ne)).toLowerCase(),this.data.referenceType="full"}function de(ne){this.data.characterReferenceType=ne.type}function re(ne){const pe=this.sliceSerialize(ne),Me=this.data.characterReferenceType;let He;Me?(He=OS(pe,Me==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):He=_g(pe);const at=this.stack[this.stack.length-1];at.value+=He}function K(ne){const pe=this.stack.pop();pe.position.end=or(ne.end)}function ue(ne){L.call(this,ne);const pe=this.stack[this.stack.length-1];pe.url=this.sliceSerialize(ne)}function Se(ne){L.call(this,ne);const pe=this.stack[this.stack.length-1];pe.url="mailto:"+this.sliceSerialize(ne)}function Ze(){return{type:"blockquote",children:[]}}function it(){return{type:"code",lang:null,meta:null,value:""}}function Kn(){return{type:"inlineCode",value:""}}function Ra(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Gn(){return{type:"emphasis",children:[]}}function Bi(){return{type:"heading",depth:0,children:[]}}function Je(){return{type:"break"}}function Ni(){return{type:"html",value:""}}function oi(){return{type:"image",title:null,url:"",alt:null}}function Ui(){return{type:"link",title:null,url:"",children:[]}}function ea(ne){return{type:"list",ordered:ne.type==="listOrdered",start:null,spread:ne._spread,children:[]}}function Tr(ne){return{type:"listItem",spread:ne._spread,checked:null,children:[]}}function Gl(){return{type:"paragraph",children:[]}}function bs(){return{type:"strong",children:[]}}function Mt(){return{type:"text",value:""}}function ys(){return{type:"thematicBreak"}}}function or(e){return{line:e.line,column:e.column,offset:e.offset}}function FS(e,t){let n=-1;for(;++n<t.length;){const a=t[n];Array.isArray(a)?FS(e,a):XD(e,a)}}function XD(e,t){let n;for(n in t)if($S.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 T0(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Jo({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Jo({start:t.start,end:t.end})+") is still open")}function ZD(e){const t=this;t.parser=n;function n(a){return VD(a,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function JD(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 eL(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
514
|
-
`}]}function tL(e,t){const n=t.value?t.value+`
|
|
515
|
-
`:"",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 nL(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function iL(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function aL(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",a=String(t.identifier).toUpperCase(),s=Kl(a.toLowerCase()),o=e.footnoteOrder.indexOf(a);let c,f=e.footnoteCounts.get(a);f===void 0?(f=0,e.footnoteOrder.push(a),c=e.footnoteOrder.length):c=o+1,f+=1,e.footnoteCounts.set(a,f);const h={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+s,id:n+"fnref-"+s+(f>1?"-"+f:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(c)}]};e.patch(t,h);const m={type:"element",tagName:"sup",properties:{},children:[h]};return e.patch(t,m),e.applyData(t,m)}function rL(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 sL(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function PS(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 lL(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return PS(e,t);const s={src:Kl(a.url||""),alt:t.alt};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,o),e.applyData(t,o)}function oL(e,t){const n={src:Kl(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,a),e.applyData(t,a)}function cL(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 uL(e,t){const n=String(t.identifier).toUpperCase(),a=e.definitionById.get(n);if(!a)return PS(e,t);const s={href:Kl(a.url||"")};a.title!==null&&a.title!==void 0&&(s.title=a.title);const o={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,o),e.applyData(t,o)}function fL(e,t){const n={href:Kl(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const a={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function dL(e,t,n){const a=e.all(t),s=n?hL(n):qS(t),o={},c=[];if(typeof t.checked=="boolean"){const b=a[0];let g;b&&b.type==="element"&&b.tagName==="p"?g=b:(g={type:"element",tagName:"p",properties:{},children:[]},a.unshift(g)),g.children.length>0&&g.children.unshift({type:"text",value:" "}),g.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),o.className=["task-list-item"]}let f=-1;for(;++f<a.length;){const b=a[f];(s||f!==0||b.type!=="element"||b.tagName!=="p")&&c.push({type:"text",value:`
|
|
516
|
-
`}),b.type==="element"&&b.tagName==="p"&&!s?c.push(...b.children):c.push(b)}const h=a[a.length-1];h&&(s||h.type!=="element"||h.tagName!=="p")&&c.push({type:"text",value:`
|
|
517
|
-
`});const m={type:"element",tagName:"li",properties:o,children:c};return e.patch(t,m),e.applyData(t,m)}function hL(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=qS(n[a])}return t}function qS(e){const t=e.spread;return t??e.children.length>1}function mL(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 pL(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function gL(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function bL(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function yL(e,t){const n=e.all(t),a=n.shift(),s=[];if(a){const c={type:"element",tagName:"thead",properties:{},children:e.wrap([a],!0)};e.patch(t.children[0],c),s.push(c)}if(n.length>0){const c={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},f=xg(t.children[1]),h=SS(t.children[t.children.length-1]);f&&h&&(c.position={start:f,end:h}),s.push(c)}const o={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,o),e.applyData(t,o)}function xL(e,t,n){const a=n?n.children:void 0,o=(a?a.indexOf(t):1)===0?"th":"td",c=n&&n.type==="table"?n.align:void 0,f=c?c.length:t.children.length;let h=-1;const m=[];for(;++h<f;){const g=t.children[h],x={},v=c?c[h]:void 0;v&&(x.align=v);let E={type:"element",tagName:o,properties:x,children:[]};g&&(E.children=e.all(g),e.patch(g,E),E=e.applyData(g,E)),m.push(E)}const b={type:"element",tagName:"tr",properties:{},children:e.wrap(m,!0)};return e.patch(t,b),e.applyData(t,b)}function vL(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const C0=9,A0=32;function EL(e){const t=String(e),n=/\r?\n|\r/g;let a=n.exec(t),s=0;const o=[];for(;a;)o.push(O0(t.slice(s,a.index),s>0,!0),a[0]),s=a.index+a[0].length,a=n.exec(t);return o.push(O0(t.slice(s),s>0,!1)),o.join("")}function O0(e,t,n){let a=0,s=e.length;if(t){let o=e.codePointAt(a);for(;o===C0||o===A0;)a++,o=e.codePointAt(a)}if(n){let o=e.codePointAt(s-1);for(;o===C0||o===A0;)s--,o=e.codePointAt(s-1)}return s>a?e.slice(a,s):""}function SL(e,t){const n={type:"text",value:EL(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function wL(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const _L={blockquote:JD,break:eL,code:tL,delete:nL,emphasis:iL,footnoteReference:aL,heading:rL,html:sL,imageReference:lL,image:oL,inlineCode:cL,linkReference:uL,link:fL,listItem:dL,list:mL,paragraph:pL,root:gL,strong:bL,table:yL,tableCell:vL,tableRow:xL,text:SL,thematicBreak:wL,toml:ef,yaml:ef,definition:ef,footnoteDefinition:ef};function ef(){}const HS=-1,nd=0,tc=1,Cf=2,Ng=3,Tg=4,Cg=5,Ag=6,KS=7,GS=8,R0=typeof self=="object"?self:globalThis,kL=(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 nd:case HS:return n(c,s);case tc:{const f=n([],s);for(const h of c)f.push(a(h));return f}case Cf:{const f=n({},s);for(const[h,m]of c)f[a(h)]=a(m);return f}case Ng:return n(new Date(c),s);case Tg:{const{source:f,flags:h}=c;return n(new RegExp(f,h),s)}case Cg:{const f=n(new Map,s);for(const[h,m]of c)f.set(a(h),a(m));return f}case Ag:{const f=n(new Set,s);for(const h of c)f.add(a(h));return f}case KS:{const{name:f,message:h}=c;return n(new R0[f](h),s)}case GS:return n(BigInt(c),s);case"BigInt":return n(Object(BigInt(c)),s);case"ArrayBuffer":return n(new Uint8Array(c).buffer,c);case"DataView":{const{buffer:f}=new Uint8Array(c);return n(new DataView(f),c)}}return n(new R0[o](c),s)};return a},M0=e=>kL(new Map,e)(0),rl="",{toString:NL}={},{keys:TL}=Object,Yo=e=>{const t=typeof e;if(t!=="object"||!e)return[nd,t];const n=NL.call(e).slice(8,-1);switch(n){case"Array":return[tc,rl];case"Object":return[Cf,rl];case"Date":return[Ng,rl];case"RegExp":return[Tg,rl];case"Map":return[Cg,rl];case"Set":return[Ag,rl];case"DataView":return[tc,n]}return n.includes("Array")?[tc,n]:n.includes("Error")?[KS,n]:[Cf,n]},tf=([e,t])=>e===nd&&(t==="function"||t==="symbol"),CL=(e,t,n,a)=>{const s=(c,f)=>{const h=a.push(c)-1;return n.set(f,h),h},o=c=>{if(n.has(c))return n.get(c);let[f,h]=Yo(c);switch(f){case nd:{let b=c;switch(h){case"bigint":f=GS,b=c.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+h);b=null;break;case"undefined":return s([HS],c)}return s([f,b],c)}case tc:{if(h){let x=c;return h==="DataView"?x=new Uint8Array(c.buffer):h==="ArrayBuffer"&&(x=new Uint8Array(c)),s([h,[...x]],c)}const b=[],g=s([f,b],c);for(const x of c)b.push(o(x));return g}case Cf:{if(h)switch(h){case"BigInt":return s([h,c.toString()],c);case"Boolean":case"Number":case"String":return s([h,c.valueOf()],c)}if(t&&"toJSON"in c)return o(c.toJSON());const b=[],g=s([f,b],c);for(const x of TL(c))(e||!tf(Yo(c[x])))&&b.push([o(x),o(c[x])]);return g}case Ng:return s([f,c.toISOString()],c);case Tg:{const{source:b,flags:g}=c;return s([f,{source:b,flags:g}],c)}case Cg:{const b=[],g=s([f,b],c);for(const[x,v]of c)(e||!(tf(Yo(x))||tf(Yo(v))))&&b.push([o(x),o(v)]);return g}case Ag:{const b=[],g=s([f,b],c);for(const x of c)(e||!tf(Yo(x)))&&b.push(o(x));return g}}const{message:m}=c;return s([f,{name:h,message:m}],c)};return o},j0=(e,{json:t,lossy:n}={})=>{const a=[];return CL(!(t||n),!!t,new Map,a)(e),a},Af=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?M0(j0(e,t)):structuredClone(e):(e,t)=>M0(j0(e,t));function AL(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 OL(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function RL(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||AL,a=e.options.footnoteBackLabel||OL,s=e.options.footnoteLabel||"Footnotes",o=e.options.footnoteLabelTagName||"h2",c=e.options.footnoteLabelProperties||{className:["sr-only"]},f=[];let h=-1;for(;++h<e.footnoteOrder.length;){const m=e.footnoteById.get(e.footnoteOrder[h]);if(!m)continue;const b=e.all(m),g=String(m.identifier).toUpperCase(),x=Kl(g.toLowerCase());let v=0;const E=[],w=e.footnoteCounts.get(g);for(;w!==void 0&&++v<=w;){E.length>0&&E.push({type:"text",value:" "});let A=typeof n=="string"?n:n(h,v);typeof A=="string"&&(A={type:"text",value:A}),E.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+x+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof a=="string"?a:a(h,v),className:["data-footnote-backref"]},children:Array.isArray(A)?A:[A]})}const k=b[b.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const A=k.children[k.children.length-1];A&&A.type==="text"?A.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...E)}else b.push(...E);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+x},children:e.wrap(b,!0)};e.patch(m,_),f.push(_)}if(f.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:o,properties:{...Af(c),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
518
|
-
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(f,!0)},{type:"text",value:`
|
|
519
|
-
`}]}}const Tc=(function(e){if(e==null)return LL;if(typeof e=="function")return id(e);if(typeof e=="object")return Array.isArray(e)?ML(e):jL(e);if(typeof e=="string")return DL(e);throw new Error("Expected function, string, or object as test")});function ML(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Tc(e[n]);return id(a);function a(...s){let o=-1;for(;++o<t.length;)if(t[o].apply(this,s))return!0;return!1}}function jL(e){const t=e;return id(n);function n(a){const s=a;let o;for(o in e)if(s[o]!==t[o])return!1;return!0}}function DL(e){return id(t);function t(n){return n&&n.type===e}}function id(e){return t;function t(n,a,s){return!!(zL(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function LL(){return!0}function zL(e){return e!==null&&typeof e=="object"&&"type"in e}const QS=[],IL=!0,Tp=!1,BL="skip";function YS(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;f(e,void 0,[])();function f(h,m,b){const g=h&&typeof h=="object"?h:{};if(typeof g.type=="string"){const v=typeof g.tagName=="string"?g.tagName:typeof g.name=="string"?g.name:void 0;Object.defineProperty(x,"name",{value:"node ("+(h.type+(v?"<"+v+">":""))+")"})}return x;function x(){let v=QS,E,w,k;if((!t||o(h,m,b[b.length-1]||void 0))&&(v=UL(n(h,b)),v[0]===Tp))return v;if("children"in h&&h.children){const _=h;if(_.children&&v[0]!==BL)for(w=(a?_.children.length:-1)+c,k=b.concat(_);w>-1&&w<_.children.length;){const A=_.children[w];if(E=f(A,w,k)(),E[0]===Tp)return E;w=typeof E[1]=="number"?E[1]:w+c}}return v}}}function UL(e){return Array.isArray(e)?e:typeof e=="number"?[IL,e]:e==null?QS:[e]}function ad(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),YS(e,o,f,s);function f(h,m){const b=m[m.length-1],g=b?b.children.indexOf(h):void 0;return c(h,g,b)}}const Cp={}.hasOwnProperty,$L={};function FL(e,t){const n=t||$L,a=new Map,s=new Map,o=new Map,c={..._L,...n.handlers},f={all:m,applyData:qL,definitionById:a,footnoteById:s,footnoteCounts:o,footnoteOrder:[],handlers:c,one:h,options:n,patch:PL,wrap:KL};return ad(e,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const g=b.type==="definition"?a:s,x=String(b.identifier).toUpperCase();g.has(x)||g.set(x,b)}}),f;function h(b,g){const x=b.type,v=f.handlers[x];if(Cp.call(f.handlers,x)&&v)return v(f,b,g);if(f.options.passThrough&&f.options.passThrough.includes(x)){if("children"in b){const{children:w,...k}=b,_=Af(k);return _.children=f.all(b),_}return Af(b)}return(f.options.unknownHandler||HL)(f,b,g)}function m(b){const g=[];if("children"in b){const x=b.children;let v=-1;for(;++v<x.length;){const E=f.one(x[v],b);if(E){if(v&&x[v-1].type==="break"&&(!Array.isArray(E)&&E.type==="text"&&(E.value=D0(E.value)),!Array.isArray(E)&&E.type==="element")){const w=E.children[0];w&&w.type==="text"&&(w.value=D0(w.value))}Array.isArray(E)?g.push(...E):g.push(E)}}}return g}}function PL(e,t){e.position&&(t.position=OM(e))}function qL(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,Af(o)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function HL(e,t){const n=t.data||{},a="value"in t&&!(Cp.call(n,"hProperties")||Cp.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 KL(e,t){const n=[];let a=-1;for(t&&n.push({type:"text",value:`
|
|
520
|
-
`});++a<e.length;)a&&n.push({type:"text",value:`
|
|
521
|
-
`}),n.push(e[a]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
522
|
-
`}),n}function D0(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function L0(e,t){const n=FL(e,t),a=n.one(e,void 0),s=RL(n),o=Array.isArray(a)?{type:"root",children:a}:a||{type:"root",children:[]};return s&&o.children.push({type:"text",value:`
|
|
523
|
-
`},s),o}function GL(e,t){return e&&"run"in e?async function(n,a){const s=L0(n,{file:a,...t});await e.run(s,a)}:function(n,a){return L0(n,{file:a,...e||t})}}function z0(e){if(e)throw e}var Rm,I0;function QL(){if(I0)return Rm;I0=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,a=Object.getOwnPropertyDescriptor,s=function(m){return typeof Array.isArray=="function"?Array.isArray(m):t.call(m)==="[object Array]"},o=function(m){if(!m||t.call(m)!=="[object Object]")return!1;var b=e.call(m,"constructor"),g=m.constructor&&m.constructor.prototype&&e.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!g)return!1;var x;for(x in m);return typeof x>"u"||e.call(m,x)},c=function(m,b){n&&b.name==="__proto__"?n(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},f=function(m,b){if(b==="__proto__")if(e.call(m,b)){if(a)return a(m,b).value}else return;return m[b]};return Rm=function h(){var m,b,g,x,v,E,w=arguments[0],k=1,_=arguments.length,A=!1;for(typeof w=="boolean"&&(A=w,w=arguments[1]||{},k=2),(w==null||typeof w!="object"&&typeof w!="function")&&(w={});k<_;++k)if(m=arguments[k],m!=null)for(b in m)g=f(w,b),x=f(m,b),w!==x&&(A&&x&&(o(x)||(v=s(x)))?(v?(v=!1,E=g&&s(g)?g:[]):E=g&&o(g)?g:{},c(w,{name:b,newValue:h(A,E,x)})):typeof x<"u"&&c(w,{name:b,newValue:x}));return w},Rm}var YL=QL();const Mm=Dp(YL);function Ap(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 VL(){const e=[],t={run:n,use:a};return t;function n(...s){let o=-1;const c=s.pop();if(typeof c!="function")throw new TypeError("Expected function as last argument, not "+c);f(null,...s);function f(h,...m){const b=e[++o];let g=-1;if(h){c(h);return}for(;++g<s.length;)(m[g]===null||m[g]===void 0)&&(m[g]=s[g]);s=m,b?WL(b,f)(...m):c(null,...m)}}function a(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function WL(e,t){let n;return a;function a(...c){const f=e.length>c.length;let h;f&&c.push(s);try{h=e.apply(this,c)}catch(m){const b=m;if(f&&n)throw b;return s(b)}f||(h&&h.then&&typeof h.then=="function"?h.then(o,s):h instanceof Error?s(h):o(h))}function s(c,...f){n||(n=!0,t(c,...f))}function o(c){s(null,c)}}const Qi={basename:XL,dirname:ZL,extname:JL,join:e3,sep:"/"};function XL(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Cc(e);let n=0,a=-1,s=e.length,o;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else a<0&&(o=!0,a=s+1);return a<0?"":e.slice(n,a)}if(t===e)return"";let c=-1,f=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(o){n=s+1;break}}else c<0&&(o=!0,c=s+1),f>-1&&(e.codePointAt(s)===t.codePointAt(f--)?f<0&&(a=s):(f=-1,a=c));return n===a?a=c:a<0&&(a=e.length),e.slice(n,a)}function ZL(e){if(Cc(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 JL(e){Cc(e);let t=e.length,n=-1,a=0,s=-1,o=0,c;for(;t--;){const f=e.codePointAt(t);if(f===47){if(c){a=t+1;break}continue}n<0&&(c=!0,n=t+1),f===46?s<0?s=t:o!==1&&(o=1):s>-1&&(o=-1)}return s<0||n<0||o===0||o===1&&s===n-1&&s===a+1?"":e.slice(s,n)}function e3(...e){let t=-1,n;for(;++t<e.length;)Cc(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":t3(n)}function t3(e){Cc(e);const t=e.codePointAt(0)===47;let n=n3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function n3(e,t){let n="",a=0,s=-1,o=0,c=-1,f,h;for(;++c<=e.length;){if(c<e.length)f=e.codePointAt(c);else{if(f===47)break;f=47}if(f===47){if(!(s===c-1||o===1))if(s!==c-1&&o===2){if(n.length<2||a!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(h=n.lastIndexOf("/"),h!==n.length-1){h<0?(n="",a=0):(n=n.slice(0,h),a=n.length-1-n.lastIndexOf("/")),s=c,o=0;continue}}else if(n.length>0){n="",a=0,s=c,o=0;continue}}t&&(n=n.length>0?n+"/..":"..",a=2)}else n.length>0?n+="/"+e.slice(s+1,c):n=e.slice(s+1,c),a=c-s-1;s=c,o=0}else f===46&&o>-1?o++:o=-1}return n}function Cc(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const i3={cwd:a3};function a3(){return"/"}function Op(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function r3(e){if(typeof e=="string")e=new URL(e);else if(!Op(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 s3(e)}function s3(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 jm=["history","path","basename","stem","extname","dirname"];class VS{constructor(t){let n;t?Op(t)?n={path:t}:typeof t=="string"||l3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":i3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let a=-1;for(;++a<jm.length;){const o=jm[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)jm.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Qi.basename(this.path):void 0}set basename(t){Lm(t,"basename"),Dm(t,"basename"),this.path=Qi.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qi.dirname(this.path):void 0}set dirname(t){B0(this.basename,"dirname"),this.path=Qi.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qi.extname(this.path):void 0}set extname(t){if(Dm(t,"extname"),B0(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=Qi.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Op(t)&&(t=r3(t)),Lm(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qi.basename(this.path,this.extname):void 0}set stem(t){Lm(t,"stem"),Dm(t,"stem"),this.path=Qi.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 yn(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 Dm(e,t){if(e&&e.includes(Qi.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qi.sep+"`")}function Lm(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function B0(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function l3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const o3=(function(e){const a=this.constructor.prototype,s=a[e],o=function(){return s.apply(o,arguments)};return Object.setPrototypeOf(o,a),o}),c3={}.hasOwnProperty;class Og extends o3{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=VL()}copy(){const t=new Og;let n=-1;for(;++n<this.attachers.length;){const a=this.attachers[n];t.use(...a)}return t.data(Mm(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Bm("data",this.frozen),this.namespace[t]=n,this):c3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Bm("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=nf(t),a=this.parser||this.Parser;return zm("parse",a),a(String(n),n)}process(t,n){const a=this;return this.freeze(),zm("process",this.parser||this.Parser),Im("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(o,c){const f=nf(t),h=a.parse(f);a.run(h,f,function(b,g,x){if(b||!g||!x)return m(b);const v=g,E=a.stringify(v,x);d3(E)?x.value=E:x.result=E,m(b,x)});function m(b,g){b||!g?c(b):o?o(g):n(void 0,g)}}}processSync(t){let n=!1,a;return this.freeze(),zm("processSync",this.parser||this.Parser),Im("processSync",this.compiler||this.Compiler),this.process(t,s),$0("processSync","process",n),a;function s(o,c){n=!0,z0(o),a=c}}run(t,n,a){U0(t),this.freeze();const s=this.transformers;return!a&&typeof n=="function"&&(a=n,n=void 0),a?o(void 0,a):new Promise(o);function o(c,f){const h=nf(n);s.run(t,h,m);function m(b,g,x){const v=g||t;b?f(b):c?c(v):a(void 0,v,x)}}}runSync(t,n){let a=!1,s;return this.run(t,n,o),$0("runSync","run",a),s;function o(c,f){z0(c),s=f,a=!0}}stringify(t,n){this.freeze();const a=nf(n),s=this.compiler||this.Compiler;return Im("stringify",s),U0(t),s(t,a)}use(t,...n){const a=this.attachers,s=this.namespace;if(Bm("use",this.frozen),t!=null)if(typeof t=="function")h(t,n);else if(typeof t=="object")Array.isArray(t)?f(t):c(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function o(m){if(typeof m=="function")h(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...g]=m;h(b,g)}else c(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function c(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");f(m.plugins),m.settings&&(s.settings=Mm(!0,s.settings,m.settings))}function f(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const g=m[b];o(g)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function h(m,b){let g=-1,x=-1;for(;++g<a.length;)if(a[g][0]===m){x=g;break}if(x===-1)a.push([m,...b]);else if(b.length>0){let[v,...E]=b;const w=a[x][1];Ap(w)&&Ap(v)&&(v=Mm(!0,w,v)),a[x]=[m,v,...E]}}}}const u3=new Og().freeze();function zm(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Im(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Bm(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 U0(e){if(!Ap(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 nf(e){return f3(e)?e:new VS(e)}function f3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function d3(e){return typeof e=="string"||h3(e)}function h3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const m3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",F0=[],P0={allowDangerousHtml:!0},p3=/^(https?|ircs?|mailto|xmpp)$/i,g3=[{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 Rg(e){const t=b3(e),n=y3(e);return x3(t.runSync(t.parse(n),n),e)}function b3(e){const t=e.rehypePlugins||F0,n=e.remarkPlugins||F0,a=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...P0}:P0;return u3().use(ZD).use(n).use(GL,a).use(t)}function y3(e){const t=e.children||"",n=new VS;return typeof t=="string"&&(n.value=t),n}function x3(e,t){const n=t.allowedElements,a=t.allowElement,s=t.components,o=t.disallowedElements,c=t.skipHtml,f=t.unwrapDisallowed,h=t.urlTransform||v3;for(const b of g3)Object.hasOwn(t,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+m3+b.id,void 0);return ad(e,m),LM(e,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(b,g,x){if(b.type==="raw"&&x&&typeof g=="number")return c?x.children.splice(g,1):x.children[g]={type:"text",value:b.value},g;if(b.type==="element"){let v;for(v in Cm)if(Object.hasOwn(Cm,v)&&Object.hasOwn(b.properties,v)){const E=b.properties[v],w=Cm[v];(w===null||w.includes(b.tagName))&&(b.properties[v]=h(String(E||""),v,b))}}if(b.type==="element"){let v=n?!n.includes(b.tagName):o?o.includes(b.tagName):!1;if(!v&&a&&typeof g=="number"&&(v=!a(b,g,x)),v&&x&&typeof g=="number")return f&&b.children?x.children.splice(g,1,...b.children):x.children.splice(g,1),g}}}function v3(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||p3.test(e.slice(0,t))?e:""}function q0(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 E3(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function S3(e,t,n){const s=Tc((n||{}).ignore||[]),o=w3(t);let c=-1;for(;++c<o.length;)YS(e,"text",f);function f(m,b){let g=-1,x;for(;++g<b.length;){const v=b[g],E=x?x.children:void 0;if(s(v,E?E.indexOf(v):void 0,x))return;x=v}if(x)return h(m,b)}function h(m,b){const g=b[b.length-1],x=o[c][0],v=o[c][1];let E=0;const k=g.children.indexOf(m);let _=!1,A=[];x.lastIndex=0;let T=x.exec(m.value);for(;T;){const j=T.index,$={index:T.index,input:T.input,stack:[...b,m]};let M=v(...T,$);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?x.lastIndex=j+1:(E!==j&&A.push({type:"text",value:m.value.slice(E,j)}),Array.isArray(M)?A.push(...M):M&&A.push(M),E=j+T[0].length,_=!0),!x.global)break;T=x.exec(m.value)}return _?(E<m.value.length&&A.push({type:"text",value:m.value.slice(E)}),g.children.splice(k,1,...A)):A=[m],k+A.length}}function w3(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([_3(s[0]),k3(s[1])])}return t}function _3(e){return typeof e=="string"?new RegExp(E3(e),"g"):e}function k3(e){return typeof e=="function"?e:function(){return e}}const Um="phrasing",$m=["autolink","link","image","label"];function N3(){return{transforms:[j3],enter:{literalAutolink:C3,literalAutolinkEmail:Fm,literalAutolinkHttp:Fm,literalAutolinkWww:Fm},exit:{literalAutolink:M3,literalAutolinkEmail:R3,literalAutolinkHttp:A3,literalAutolinkWww:O3}}}function T3(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Um,notInConstruct:$m},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Um,notInConstruct:$m},{character:":",before:"[ps]",after:"\\/",inConstruct:Um,notInConstruct:$m}]}}function C3(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fm(e){this.config.enter.autolinkProtocol.call(this,e)}function A3(e){this.config.exit.autolinkProtocol.call(this,e)}function O3(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 R3(e){this.config.exit.autolinkEmail.call(this,e)}function M3(e){this.exit(e)}function j3(e){S3(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,D3],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),L3]],{ignore:["link","linkReference"]})}function D3(e,t,n,a,s){let o="";if(!WS(s)||(/^w/i.test(t)&&(n=t+n,t="",o="http://"),!z3(n)))return!1;const c=I3(n+a);if(!c[0])return!1;const f={type:"link",title:null,url:o+t+c[0],children:[{type:"text",value:t+c[0]}]};return c[1]?[f,{type:"text",value:c[1]}]:f}function L3(e,t,n,a){return!WS(a,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function z3(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 I3(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=q0(e,"(");let o=q0(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 WS(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||fs(n)||ed(n))&&(!t||n!==47)}XS.peek=G3;function B3(){this.buffer()}function U3(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function $3(){this.buffer()}function F3(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function P3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Di(this.sliceSerialize(e)).toLowerCase(),n.label=t}function q3(e){this.exit(e)}function H3(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Di(this.sliceSerialize(e)).toLowerCase(),n.label=t}function K3(e){this.exit(e)}function G3(){return"["}function XS(e,t,n,a){const s=n.createTracker(a);let o=s.move("[^");const c=n.enter("footnoteReference"),f=n.enter("reference");return o+=s.move(n.safe(n.associationId(e),{after:"]",before:o})),f(),c(),o+=s.move("]"),o}function Q3(){return{enter:{gfmFootnoteCallString:B3,gfmFootnoteCall:U3,gfmFootnoteDefinitionLabelString:$3,gfmFootnoteDefinition:F3},exit:{gfmFootnoteCallString:P3,gfmFootnoteCall:q3,gfmFootnoteDefinitionLabelString:H3,gfmFootnoteDefinition:K3}}}function Y3(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:XS},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(a,s,o,c){const f=o.createTracker(c);let h=f.move("[^");const m=o.enter("footnoteDefinition"),b=o.enter("label");return h+=f.move(o.safe(o.associationId(a),{before:h,after:"]"})),b(),h+=f.move("]:"),a.children&&a.children.length>0&&(f.shift(4),h+=f.move((t?`
|
|
524
|
-
`:" ")+o.indentLines(o.containerFlow(a,f.current()),t?ZS:V3))),m(),h}}function V3(e,t,n){return t===0?e:ZS(e,t,n)}function ZS(e,t,n){return(n?"":" ")+e}const W3=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];JS.peek=tz;function X3(){return{canContainEols:["delete"],enter:{strikethrough:J3},exit:{strikethrough:ez}}}function Z3(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:W3}],handlers:{delete:JS}}}function J3(e){this.enter({type:"delete",children:[]},e)}function ez(e){this.exit(e)}function JS(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 tz(){return"~"}function nz(e){return e.length}function iz(e,t){const n=t||{},a=(n.align||[]).concat(),s=n.stringLength||nz,o=[],c=[],f=[],h=[];let m=0,b=-1;for(;++b<e.length;){const w=[],k=[];let _=-1;for(e[b].length>m&&(m=e[b].length);++_<e[b].length;){const A=az(e[b][_]);if(n.alignDelimiters!==!1){const T=s(A);k[_]=T,(h[_]===void 0||T>h[_])&&(h[_]=T)}w.push(A)}c[b]=w,f[b]=k}let g=-1;if(typeof a=="object"&&"length"in a)for(;++g<m;)o[g]=H0(a[g]);else{const w=H0(a);for(;++g<m;)o[g]=w}g=-1;const x=[],v=[];for(;++g<m;){const w=o[g];let k="",_="";w===99?(k=":",_=":"):w===108?k=":":w===114&&(_=":");let A=n.alignDelimiters===!1?1:Math.max(1,h[g]-k.length-_.length);const T=k+"-".repeat(A)+_;n.alignDelimiters!==!1&&(A=k.length+A+_.length,A>h[g]&&(h[g]=A),v[g]=A),x[g]=T}c.splice(1,0,x),f.splice(1,0,v),b=-1;const E=[];for(;++b<c.length;){const w=c[b],k=f[b];g=-1;const _=[];for(;++g<m;){const A=w[g]||"";let T="",j="";if(n.alignDelimiters!==!1){const $=h[g]-(k[g]||0),M=o[g];M===114?T=" ".repeat($):M===99?$%2?(T=" ".repeat($/2+.5),j=" ".repeat($/2-.5)):(T=" ".repeat($/2),j=T):j=" ".repeat($)}n.delimiterStart!==!1&&!g&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||g)&&_.push(" "),n.alignDelimiters!==!1&&_.push(T),_.push(A),n.alignDelimiters!==!1&&_.push(j),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||g!==m-1)&&_.push("|")}E.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return E.join(`
|
|
525
|
-
`)}function az(e){return e==null?"":String(e)}function H0(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 rz(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()),sz);return s(),c}function sz(e,t,n){return">"+(n?"":" ")+e}function lz(e,t){return K0(e,t.inConstruct,!0)&&!K0(e,t.notInConstruct,!1)}function K0(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 G0(e,t,n,a){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
526
|
-
`&&lz(n.stack,n.unsafe[s]))return/[ \t]/.test(a.before)?"":" ";return`\\
|
|
527
|
-
`}function oz(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 cz(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 uz(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 fz(e,t,n,a){const s=uz(n),o=e.value||"",c=s==="`"?"GraveAccent":"Tilde";if(cz(e,n)){const g=n.enter("codeIndented"),x=n.indentLines(o,dz);return g(),x}const f=n.createTracker(a),h=s.repeat(Math.max(oz(o,s)+1,3)),m=n.enter("codeFenced");let b=f.move(h);if(e.lang){const g=n.enter(`codeFencedLang${c}`);b+=f.move(n.safe(e.lang,{before:b,after:" ",encode:["`"],...f.current()})),g()}if(e.lang&&e.meta){const g=n.enter(`codeFencedMeta${c}`);b+=f.move(" "),b+=f.move(n.safe(e.meta,{before:b,after:`
|
|
528
|
-
`,encode:["`"],...f.current()})),g()}return b+=f.move(`
|
|
529
|
-
`),o&&(b+=f.move(o+`
|
|
530
|
-
`)),b+=f.move(h),m(),b}function dz(e,t,n){return(n?"":" ")+e}function Mg(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function hz(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("definition");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("[");return m+=h.move(n.safe(n.associationId(e),{before:m,after:"]",...h.current()})),m+=h.move("]: "),f(),!e.url||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":`
|
|
531
|
-
`,...h.current()}))),f(),e.title&&(f=n.enter(`title${o}`),m+=h.move(" "+s),m+=h.move(n.safe(e.title,{before:m,after:s,...h.current()})),m+=h.move(s),f()),c(),m}function mz(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 dc(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Of(e,t,n){const a=Rl(e),s=Rl(t);return a===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:a===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ew.peek=pz;function ew(e,t,n,a){const s=mz(n),o=n.enter("emphasis"),c=n.createTracker(a),f=c.move(s);let h=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const m=h.charCodeAt(0),b=Of(a.before.charCodeAt(a.before.length-1),m,s);b.inside&&(h=dc(m)+h.slice(1));const g=h.charCodeAt(h.length-1),x=Of(a.after.charCodeAt(0),g,s);x.inside&&(h=h.slice(0,-1)+dc(g));const v=c.move(s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},f+h+v}function pz(e,t,n){return n.options.emphasis||"*"}function gz(e,t){let n=!1;return ad(e,function(a){if("value"in a&&/\r?\n|\r/.test(a.value)||a.type==="break")return n=!0,Tp}),!!((!e.depth||e.depth<3)&&wg(e)&&(t.options.setext||n))}function bz(e,t,n,a){const s=Math.max(Math.min(6,e.depth||1),1),o=n.createTracker(a);if(gz(e,n)){const b=n.enter("headingSetext"),g=n.enter("phrasing"),x=n.containerPhrasing(e,{...o.current(),before:`
|
|
532
|
-
`,after:`
|
|
533
|
-
`});return g(),b(),x+`
|
|
534
|
-
`+(s===1?"=":"-").repeat(x.length-(Math.max(x.lastIndexOf("\r"),x.lastIndexOf(`
|
|
535
|
-
`))+1))}const c="#".repeat(s),f=n.enter("headingAtx"),h=n.enter("phrasing");o.move(c+" ");let m=n.containerPhrasing(e,{before:"# ",after:`
|
|
536
|
-
`,...o.current()});return/^[\t ]/.test(m)&&(m=dc(m.charCodeAt(0))+m.slice(1)),m=m?c+" "+m:c,n.options.closeAtx&&(m+=" "+c),h(),f(),m}tw.peek=yz;function tw(e){return e.value||""}function yz(){return"<"}nw.peek=xz;function nw(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.enter("image");let f=n.enter("label");const h=n.createTracker(a);let m=h.move("![");return m+=h.move(n.safe(e.alt,{before:m,after:"]",...h.current()})),m+=h.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=n.enter("destinationLiteral"),m+=h.move("<"),m+=h.move(n.safe(e.url,{before:m,after:">",...h.current()})),m+=h.move(">")):(f=n.enter("destinationRaw"),m+=h.move(n.safe(e.url,{before:m,after:e.title?" ":")",...h.current()}))),f(),e.title&&(f=n.enter(`title${o}`),m+=h.move(" "+s),m+=h.move(n.safe(e.title,{before:m,after:s,...h.current()})),m+=h.move(s),f()),m+=h.move(")"),c(),m}function xz(){return"!"}iw.peek=vz;function iw(e,t,n,a){const s=e.referenceType,o=n.enter("imageReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("![");const m=n.safe(e.alt,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=b,o(),s==="full"||!m||m!==g?h+=f.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function vz(){return"!"}aw.peek=Ez;function aw(e,t,n){let a=e.value||"",s="`",o=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(a);)s+="`";for(/[^ \r\n]/.test(a)&&(/^[ \r\n]/.test(a)&&/[ \r\n]$/.test(a)||/^`|`$/.test(a))&&(a=" "+a+" ");++o<n.unsafe.length;){const c=n.unsafe[o],f=n.compilePattern(c);let h;if(c.atBreak)for(;h=f.exec(a);){let m=h.index;a.charCodeAt(m)===10&&a.charCodeAt(m-1)===13&&m--,a=a.slice(0,m)+" "+a.slice(h.index+1)}}return s+a+s}function Ez(){return"`"}function rw(e,t){const n=wg(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))}sw.peek=Sz;function sw(e,t,n,a){const s=Mg(n),o=s==='"'?"Quote":"Apostrophe",c=n.createTracker(a);let f,h;if(rw(e,n)){const b=n.stack;n.stack=[],f=n.enter("autolink");let g=c.move("<");return g+=c.move(n.containerPhrasing(e,{before:g,after:">",...c.current()})),g+=c.move(">"),f(),n.stack=b,g}f=n.enter("link"),h=n.enter("label");let m=c.move("[");return m+=c.move(n.containerPhrasing(e,{before:m,after:"](",...c.current()})),m+=c.move("]("),h(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(h=n.enter("destinationLiteral"),m+=c.move("<"),m+=c.move(n.safe(e.url,{before:m,after:">",...c.current()})),m+=c.move(">")):(h=n.enter("destinationRaw"),m+=c.move(n.safe(e.url,{before:m,after:e.title?" ":")",...c.current()}))),h(),e.title&&(h=n.enter(`title${o}`),m+=c.move(" "+s),m+=c.move(n.safe(e.title,{before:m,after:s,...c.current()})),m+=c.move(s),h()),m+=c.move(")"),f(),m}function Sz(e,t,n){return rw(e,n)?"<":"["}lw.peek=wz;function lw(e,t,n,a){const s=e.referenceType,o=n.enter("linkReference");let c=n.enter("label");const f=n.createTracker(a);let h=f.move("[");const m=n.containerPhrasing(e,{before:h,after:"]",...f.current()});h+=f.move(m+"]["),c();const b=n.stack;n.stack=[],c=n.enter("reference");const g=n.safe(n.associationId(e),{before:h,after:"]",...f.current()});return c(),n.stack=b,o(),s==="full"||!m||m!==g?h+=f.move(g+"]"):s==="shortcut"?h=h.slice(0,-1):h+=f.move("]"),h}function wz(){return"["}function jg(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 _z(e){const t=jg(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 kz(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 ow(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 Nz(e,t,n,a){const s=n.enter("list"),o=n.bulletCurrent;let c=e.ordered?kz(n):jg(n);const f=e.ordered?c==="."?")":".":_z(n);let h=t&&n.bulletLastUsed?c===n.bulletLastUsed:!1;if(!e.ordered){const b=e.children?e.children[0]:void 0;if((c==="*"||c==="-")&&b&&(!b.children||!b.children[0])&&n.stack[n.stack.length-1]==="list"&&n.stack[n.stack.length-2]==="listItem"&&n.stack[n.stack.length-3]==="list"&&n.stack[n.stack.length-4]==="listItem"&&n.indexStack[n.indexStack.length-1]===0&&n.indexStack[n.indexStack.length-2]===0&&n.indexStack[n.indexStack.length-3]===0&&(h=!0),ow(n)===c&&b){let g=-1;for(;++g<e.children.length;){const x=e.children[g];if(x&&x.type==="listItem"&&x.children&&x.children[0]&&x.children[0].type==="thematicBreak"){h=!0;break}}}}h&&(c=f),n.bulletCurrent=c;const m=n.containerFlow(e,a);return n.bulletLastUsed=c,n.bulletCurrent=o,s(),m}function Tz(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 Cz(e,t,n,a){const s=Tz(n);let o=n.bulletCurrent||jg(n);t&&t.type==="list"&&t.ordered&&(o=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+o);let c=o.length+1;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(c=Math.ceil(c/4)*4);const f=n.createTracker(a);f.move(o+" ".repeat(c-o.length)),f.shift(c);const h=n.enter("listItem"),m=n.indentLines(n.containerFlow(e,f.current()),b);return h(),m;function b(g,x,v){return x?(v?"":" ".repeat(c))+g:(v?o:o+" ".repeat(c-o.length))+g}}function Az(e,t,n,a){const s=n.enter("paragraph"),o=n.enter("phrasing"),c=n.containerPhrasing(e,a);return o(),s(),c}const Oz=Tc(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Rz(e,t,n,a){return(e.children.some(function(c){return Oz(c)})?n.containerPhrasing:n.containerFlow).call(n,e,a)}function Mz(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}cw.peek=jz;function cw(e,t,n,a){const s=Mz(n),o=n.enter("strong"),c=n.createTracker(a),f=c.move(s+s);let h=c.move(n.containerPhrasing(e,{after:s,before:f,...c.current()}));const m=h.charCodeAt(0),b=Of(a.before.charCodeAt(a.before.length-1),m,s);b.inside&&(h=dc(m)+h.slice(1));const g=h.charCodeAt(h.length-1),x=Of(a.after.charCodeAt(0),g,s);x.inside&&(h=h.slice(0,-1)+dc(g));const v=c.move(s+s);return o(),n.attentionEncodeSurroundingInfo={after:x.outside,before:b.outside},f+h+v}function jz(e,t,n){return n.options.strong||"*"}function Dz(e,t,n,a){return n.safe(e.value,a)}function Lz(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 zz(e,t,n){const a=(ow(n)+(n.options.ruleSpaces?" ":"")).repeat(Lz(n));return n.options.ruleSpaces?a.slice(0,-1):a}const uw={blockquote:rz,break:G0,code:fz,definition:hz,emphasis:ew,hardBreak:G0,heading:bz,html:tw,image:nw,imageReference:iw,inlineCode:aw,link:sw,linkReference:lw,list:Nz,listItem:Cz,paragraph:Az,root:Rz,strong:cw,text:Dz,thematicBreak:zz};function Iz(){return{enter:{table:Bz,tableData:Q0,tableHeader:Q0,tableRow:$z},exit:{codeText:Fz,table:Uz,tableData:Pm,tableHeader:Pm,tableRow:Pm}}}function Bz(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 Uz(e){this.exit(e),this.data.inTable=void 0}function $z(e){this.enter({type:"tableRow",children:[]},e)}function Pm(e){this.exit(e)}function Q0(e){this.enter({type:"tableCell",children:[]},e)}function Fz(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,Pz));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function Pz(e,t){return t==="|"?t:e}function qz(e){const t=e||{},n=t.tableCellPadding,a=t.tablePipeAlign,s=t.stringLength,o=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
537
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:x,table:c,tableCell:h,tableRow:f}};function c(v,E,w,k){return m(b(v,w,k),v.align)}function f(v,E,w,k){const _=g(v,w,k),A=m([_]);return A.slice(0,A.indexOf(`
|
|
538
|
-
`))}function h(v,E,w,k){const _=w.enter("tableCell"),A=w.enter("phrasing"),T=w.containerPhrasing(v,{...k,before:o,after:o});return A(),_(),T}function m(v,E){return iz(v,{align:E,alignDelimiters:a,padding:n,stringLength:s})}function b(v,E,w){const k=v.children;let _=-1;const A=[],T=E.enter("table");for(;++_<k.length;)A[_]=g(k[_],E,w);return T(),A}function g(v,E,w){const k=v.children;let _=-1;const A=[],T=E.enter("tableRow");for(;++_<k.length;)A[_]=h(k[_],v,E,w);return T(),A}function x(v,E,w){let k=uw.inlineCode(v,E,w);return w.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function Hz(){return{exit:{taskListCheckValueChecked:Y0,taskListCheckValueUnchecked:Y0,paragraph:Gz}}}function Kz(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Qz}}}function Y0(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function Gz(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const a=n.children[0];if(a&&a.type==="text"){const s=t.children;let o=-1,c;for(;++o<s.length;){const f=s[o];if(f.type==="paragraph"){c=f;break}}c===n&&(a.value=a.value.slice(1),a.value.length===0?n.children.shift():n.position&&a.position&&typeof a.position.start.offset=="number"&&(a.position.start.column++,a.position.start.offset++,n.position.start=Object.assign({},a.position.start)))}}this.exit(e)}function Qz(e,t,n,a){const s=e.children[0],o=typeof e.checked=="boolean"&&s&&s.type==="paragraph",c="["+(e.checked?"x":" ")+"] ",f=n.createTracker(a);o&&f.move(c);let h=uw.listItem(e,t,n,{...a,...f.current()});return o&&(h=h.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),h;function m(b){return b+c}}function Yz(){return[N3(),Q3(),X3(),Iz(),Hz()]}function Vz(e){return{extensions:[T3(),Y3(e),Z3(),qz(e),Kz()]}}const Wz={tokenize:nI,partial:!0},fw={tokenize:iI,partial:!0},dw={tokenize:aI,partial:!0},hw={tokenize:rI,partial:!0},Xz={tokenize:sI,partial:!0},mw={name:"wwwAutolink",tokenize:eI,previous:gw},pw={name:"protocolAutolink",tokenize:tI,previous:bw},Oa={name:"emailAutolink",tokenize:Jz,previous:yw},Ji={};function Zz(){return{text:Ji}}let Vr=48;for(;Vr<123;)Ji[Vr]=Oa,Vr++,Vr===58?Vr=65:Vr===91&&(Vr=97);Ji[43]=Oa;Ji[45]=Oa;Ji[46]=Oa;Ji[95]=Oa;Ji[72]=[Oa,pw];Ji[104]=[Oa,pw];Ji[87]=[Oa,mw];Ji[119]=[Oa,mw];function Jz(e,t,n){const a=this;let s,o;return c;function c(g){return!Rp(g)||!yw.call(a,a.previous)||Dg(a.events)?n(g):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),f(g))}function f(g){return Rp(g)?(e.consume(g),f):g===64?(e.consume(g),h):n(g)}function h(g){return g===46?e.check(Xz,b,m)(g):g===45||g===95||gn(g)?(o=!0,e.consume(g),h):b(g)}function m(g){return e.consume(g),s=!0,h}function b(g){return o&&s&&Tn(a.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(g)):n(g)}}function eI(e,t,n){const a=this;return s;function s(c){return c!==87&&c!==119||!gw.call(a,a.previous)||Dg(a.events)?n(c):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(Wz,e.attempt(fw,e.attempt(dw,o),n),n)(c))}function o(c){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(c)}}function tI(e,t,n){const a=this;let s="",o=!1;return c;function c(g){return(g===72||g===104)&&bw.call(a,a.previous)&&!Dg(a.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(g),e.consume(g),f):n(g)}function f(g){if(Tn(g)&&s.length<5)return s+=String.fromCodePoint(g),e.consume(g),f;if(g===58){const x=s.toLowerCase();if(x==="http"||x==="https")return e.consume(g),h}return n(g)}function h(g){return g===47?(e.consume(g),o?m:(o=!0,h)):n(g)}function m(g){return g===null||Tf(g)||Et(g)||fs(g)||ed(g)?n(g):e.attempt(fw,e.attempt(dw,b),n)(g)}function b(g){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(g)}}function nI(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 iI(e,t,n){let a,s,o;return c;function c(m){return m===46||m===95?e.check(hw,h,f)(m):m===null||Et(m)||fs(m)||m!==45&&ed(m)?h(m):(o=!0,e.consume(m),c)}function f(m){return m===95?a=!0:(s=a,a=void 0),e.consume(m),c}function h(m){return s||a||!o?n(m):t(m)}}function aI(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(hw,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 rI(e,t,n){return a;function a(f){return f===33||f===34||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===63||f===95||f===126?(e.consume(f),a):f===38?(e.consume(f),o):f===93?(e.consume(f),s):f===60||f===null||Et(f)||fs(f)?t(f):n(f)}function s(f){return f===null||f===40||f===91||Et(f)||fs(f)?t(f):a(f)}function o(f){return Tn(f)?c(f):n(f)}function c(f){return f===59?(e.consume(f),a):Tn(f)?(e.consume(f),c):n(f)}}function sI(e,t,n){return a;function a(o){return e.consume(o),s}function s(o){return gn(o)?n(o):t(o)}}function gw(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Et(e)}function bw(e){return!Tn(e)}function yw(e){return!(e===47||Rp(e))}function Rp(e){return e===43||e===45||e===46||e===95||gn(e)}function Dg(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 lI={tokenize:pI,partial:!0};function oI(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:dI,continuation:{tokenize:hI},exit:mI}},text:{91:{name:"gfmFootnoteCall",tokenize:fI},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:cI,resolveTo:uI}}}}function cI(e,t,n){const a=this;let s=a.events.length;const o=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let c;for(;s--;){const h=a.events[s][1];if(h.type==="labelImage"){c=h;break}if(h.type==="gfmFootnoteCall"||h.type==="labelLink"||h.type==="label"||h.type==="image"||h.type==="link")break}return f;function f(h){if(!c||!c._balanced)return n(h);const m=Di(a.sliceSerialize({start:c.end,end:a.now()}));return m.codePointAt(0)!==94||!o.includes(m.slice(1))?n(h):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(h),e.exit("gfmFootnoteCallLabelMarker"),t(h))}}function uI(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const a={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const o={type:"gfmFootnoteCallString",start:Object.assign({},s.end),end:Object.assign({},e[e.length-1][1].start)},c={type:"chunkString",contentType:"string",start:Object.assign({},o.start),end:Object.assign({},o.end)},f=[e[n+1],e[n+2],["enter",a,t],e[n+3],e[n+4],["enter",s,t],["exit",s,t],["enter",o,t],["enter",c,t],["exit",c,t],["exit",o,t],e[e.length-2],e[e.length-1],["exit",a,t]];return e.splice(n,e.length-n+1,...f),e}function fI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o=0,c;return f;function f(g){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(g),e.exit("gfmFootnoteCallLabelMarker"),h}function h(g){return g!==94?n(g):(e.enter("gfmFootnoteCallMarker"),e.consume(g),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",m)}function m(g){if(o>999||g===93&&!c||g===null||g===91||Et(g))return n(g);if(g===93){e.exit("chunkString");const x=e.exit("gfmFootnoteCallString");return s.includes(Di(a.sliceSerialize(x)))?(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:m}function b(g){return g===91||g===92||g===93?(e.consume(g),o++,m):m(g)}}function dI(e,t,n){const a=this,s=a.parser.gfmFootnotes||(a.parser.gfmFootnotes=[]);let o,c=0,f;return h;function h(E){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(E){return E===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",b):n(E)}function b(E){if(c>999||E===93&&!f||E===null||E===91||Et(E))return n(E);if(E===93){e.exit("chunkString");const w=e.exit("gfmFootnoteDefinitionLabelString");return o=Di(a.sliceSerialize(w)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(E),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),x}return Et(E)||(f=!0),c++,e.consume(E),E===92?g:b}function g(E){return E===91||E===92||E===93?(e.consume(E),c++,b):b(E)}function x(E){return E===58?(e.enter("definitionMarker"),e.consume(E),e.exit("definitionMarker"),s.includes(o)||s.push(o),nt(e,v,"gfmFootnoteDefinitionWhitespace")):n(E)}function v(E){return t(E)}}function hI(e,t,n){return e.check(Nc,t,e.attempt(lI,t,n))}function mI(e){e.exit("gfmFootnoteDefinition")}function pI(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 gI(e){let n=(e||{}).singleTilde;const a={name:"strikethrough",tokenize:o,resolveAll:s};return n==null&&(n=!0),{text:{126:a},insideSpan:{null:[a]},attentionMarkers:{null:[126]}};function s(c,f){let h=-1;for(;++h<c.length;)if(c[h][0]==="enter"&&c[h][1].type==="strikethroughSequenceTemporary"&&c[h][1]._close){let m=h;for(;m--;)if(c[m][0]==="exit"&&c[m][1].type==="strikethroughSequenceTemporary"&&c[m][1]._open&&c[h][1].end.offset-c[h][1].start.offset===c[m][1].end.offset-c[m][1].start.offset){c[h][1].type="strikethroughSequence",c[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},c[m][1].start),end:Object.assign({},c[h][1].end)},g={type:"strikethroughText",start:Object.assign({},c[m][1].end),end:Object.assign({},c[h][1].start)},x=[["enter",b,f],["enter",c[m][1],f],["exit",c[m][1],f],["enter",g,f]],v=f.parser.constructs.insideSpan.null;v&&ri(x,x.length,0,td(v,c.slice(m+1,h),f)),ri(x,x.length,0,[["exit",g,f],["enter",c[h][1],f],["exit",c[h][1],f],["exit",b,f]]),ri(c,m-1,h-m+3,x),h=m+x.length-2;break}}for(h=-1;++h<c.length;)c[h][1].type==="strikethroughSequenceTemporary"&&(c[h][1].type="data");return c}function o(c,f,h){const m=this.previous,b=this.events;let g=0;return x;function x(E){return m===126&&b[b.length-1][1].type!=="characterEscape"?h(E):(c.enter("strikethroughSequenceTemporary"),v(E))}function v(E){const w=Rl(m);if(E===126)return g>1?h(E):(c.consume(E),g++,v);if(g<2&&!n)return h(E);const k=c.exit("strikethroughSequenceTemporary"),_=Rl(E);return k._open=!_||_===2&&!!w,k._close=!w||w===2&&!!_,f(E)}}}class bI{constructor(){this.map=[]}add(t,n,a){yI(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 yI(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 xI(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 vI(){return{flow:{null:{name:"table",tokenize:EI,resolveAll:SI}}}}function EI(e,t,n){const a=this;let s=0,o=0,c;return f;function f(L){let J=a.events.length-1;for(;J>-1;){const fe=a.events[J][1].type;if(fe==="lineEnding"||fe==="linePrefix")J--;else break}const ae=J>-1?a.events[J][1].type:null,ge=ae==="tableHead"||ae==="tableRow"?M:h;return ge===M&&a.parser.lazy[a.now().line]?n(L):ge(L)}function h(L){return e.enter("tableHead"),e.enter("tableRow"),m(L)}function m(L){return L===124||(c=!0,o+=1),b(L)}function b(L){return L===null?n(L):Re(L)?o>1?(o=0,a.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),v):n(L):Ye(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?x:g)}function x(L){return L===92||L===124?(e.consume(L),g):g(L)}function v(L){return a.interrupt=!1,a.parser.lazy[a.now().line]?n(L):(e.enter("tableDelimiterRow"),c=!1,Ye(L)?nt(e,E,"linePrefix",a.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(L):E(L))}function E(L){return L===45||L===58?k(L):L===124?(c=!0,e.enter("tableCellDivider"),e.consume(L),e.exit("tableCellDivider"),w):$(L)}function w(L){return Ye(L)?nt(e,k,"whitespace")(L):k(L)}function k(L){return L===58?(o+=1,c=!0,e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),_):L===45?(o+=1,_(L)):L===null||Re(L)?j(L):$(L)}function _(L){return L===45?(e.enter("tableDelimiterFiller"),A(L)):$(L)}function A(L){return L===45?(e.consume(L),A):L===58?(c=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(L),e.exit("tableDelimiterMarker"),T):(e.exit("tableDelimiterFiller"),T(L))}function T(L){return Ye(L)?nt(e,j,"whitespace")(L):j(L)}function j(L){return L===124?E(L):L===null||Re(L)?!c||s!==o?$(L):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(L)):$(L)}function $(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||Re(L)?(e.exit("tableRow"),t(L)):Ye(L)?nt(e,F,"whitespace")(L):(e.enter("data"),H(L))}function H(L){return L===null||L===124||Et(L)?(e.exit("data"),F(L)):(e.consume(L),L===92?ee:H)}function ee(L){return L===92||L===124?(e.consume(L),H):H(L)}}function SI(e,t){let n=-1,a=!0,s=0,o=[0,0,0,0],c=[0,0,0,0],f=!1,h=0,m,b,g;const x=new bI;for(;++n<e.length;){const v=e[n],E=v[1];v[0]==="enter"?E.type==="tableHead"?(f=!1,h!==0&&(V0(x,t,h,m,b),b=void 0,h=0),m={type:"table",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",m,t]])):E.type==="tableRow"||E.type==="tableDelimiterRow"?(a=!0,g=void 0,o=[0,0,0,0],c=[0,n+1,0,0],f&&(f=!1,b={type:"tableBody",start:Object.assign({},E.start),end:Object.assign({},E.end)},x.add(n,0,[["enter",b,t]])),s=E.type==="tableDelimiterRow"?2:b?3:1):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")?(a=!1,c[2]===0&&(o[1]!==0&&(c[0]=c[1],g=af(x,t,o,s,void 0,g),o=[0,0,0,0]),c[2]=n)):E.type==="tableCellDivider"&&(a?a=!1:(o[1]!==0&&(c[0]=c[1],g=af(x,t,o,s,void 0,g)),o=c,c=[o[1],n,0,0])):E.type==="tableHead"?(f=!0,h=n):E.type==="tableRow"||E.type==="tableDelimiterRow"?(h=n,o[1]!==0?(c[0]=c[1],g=af(x,t,o,s,n,g)):c[1]!==0&&(g=af(x,t,c,s,n,g)),s=0):s&&(E.type==="data"||E.type==="tableDelimiterMarker"||E.type==="tableDelimiterFiller")&&(c[3]=n)}for(h!==0&&V0(x,t,h,m,b),x.consume(t.events),n=-1;++n<t.events.length;){const v=t.events[n];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=xI(t.events,n))}return e}function af(e,t,n,a,s,o){const c=a===1?"tableHeader":a===2?"tableDelimiter":"tableData",f="tableContent";n[0]!==0&&(o.end=Object.assign({},sl(t.events,n[0])),e.add(n[0],0,[["exit",o,t]]));const h=sl(t.events,n[1]);if(o={type:c,start:Object.assign({},h),end:Object.assign({},h)},e.add(n[1],0,[["enter",o,t]]),n[2]!==0){const m=sl(t.events,n[2]),b=sl(t.events,n[3]),g={type:f,start:Object.assign({},m),end:Object.assign({},b)};if(e.add(n[2],0,[["enter",g,t]]),a!==2){const x=t.events[n[2]],v=t.events[n[3]];if(x[1].end=Object.assign({},v[1].end),x[1].type="chunkText",x[1].contentType="text",n[3]>n[2]+1){const E=n[2]+1,w=n[3]-n[2]-1;e.add(E,w,[])}}e.add(n[3]+1,0,[["exit",g,t]])}return s!==void 0&&(o.end=Object.assign({},sl(t.events,s)),e.add(s,0,[["exit",o,t]]),o=void 0),o}function V0(e,t,n,a,s){const o=[],c=sl(t.events,n);s&&(s.end=Object.assign({},c),o.push(["exit",s,t])),a.end=Object.assign({},c),o.push(["exit",a,t]),e.add(n+1,0,o)}function sl(e,t){const n=e[t],a=n[0]==="enter"?"start":"end";return n[1][a]}const wI={name:"tasklistCheck",tokenize:kI};function _I(){return{text:{91:wI}}}function kI(e,t,n){const a=this;return s;function s(h){return a.previous!==null||!a._gfmTasklistFirstContentOfListItem?n(h):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),o)}function o(h){return Et(h)?(e.enter("taskListCheckValueUnchecked"),e.consume(h),e.exit("taskListCheckValueUnchecked"),c):h===88||h===120?(e.enter("taskListCheckValueChecked"),e.consume(h),e.exit("taskListCheckValueChecked"),c):n(h)}function c(h){return h===93?(e.enter("taskListCheckMarker"),e.consume(h),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),f):n(h)}function f(h){return Re(h)?t(h):Ye(h)?e.check({tokenize:NI},t,n)(h):n(h)}}function NI(e,t,n){return nt(e,a,"whitespace");function a(s){return s===null?n(s):t(s)}}function TI(e){return AS([Zz(),oI(),gI(e),vI(),_I()])}const CI={};function Lg(e){const t=this,n=e||CI,a=t.data(),s=a.micromarkExtensions||(a.micromarkExtensions=[]),o=a.fromMarkdownExtensions||(a.fromMarkdownExtensions=[]),c=a.toMarkdownExtensions||(a.toMarkdownExtensions=[]);s.push(TI(n)),o.push(Yz()),c.push(Vz(n))}const W0=(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]}),gs=(function(e){if(e==null)return RI;if(typeof e=="string")return OI(e);if(typeof e=="object")return AI(e);if(typeof e=="function")return zg(e);throw new Error("Expected function, string, or array as `test`")});function AI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=gs(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 OI(e){return zg(t);function t(n){return n.tagName===e}}function zg(e){return t;function t(n,a,s){return!!(MI(n)&&e.call(this,n,typeof a=="number"?a:void 0,s||void 0))}}function RI(e){return!!(e&&typeof e=="object"&&"type"in e&&e.type==="element"&&"tagName"in e&&typeof e.tagName=="string")}function MI(e){return e!==null&&typeof e=="object"&&"type"in e&&"tagName"in e}const X0=/\n/g,Z0=/[\t ]+/g,Mp=gs("br"),J0=gs($I),jI=gs("p"),e1=gs("tr"),DI=gs(["datalist","head","noembed","noframes","noscript","rp","script","style","template","title",UI,FI]),xw=gs(["address","article","aside","blockquote","body","caption","center","dd","dialog","dir","dl","dt","div","figure","figcaption","footer","form,","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","legend","li","listing","main","menu","nav","ol","p","plaintext","pre","section","ul","xmp"]);function LI(e,t){const n=t||{},a="children"in e?e.children:[],s=xw(e),o=Sw(e,{whitespace:n.whitespace||"normal"}),c=[];(e.type==="text"||e.type==="comment")&&c.push(...Ew(e,{breakBefore:!0,breakAfter:!0}));let f=-1;for(;++f<a.length;)c.push(...vw(a[f],e,{whitespace:o,breakBefore:f?void 0:s,breakAfter:f<a.length-1?Mp(a[f+1]):s}));const h=[];let m;for(f=-1;++f<c.length;){const b=c[f];typeof b=="number"?m!==void 0&&b>m&&(m=b):b&&(m!==void 0&&m>-1&&h.push(`
|
|
539
|
-
`.repeat(m)||" "),m=-1,h.push(b))}return h.join("")}function vw(e,t,n){return e.type==="element"?zI(e,t,n):e.type==="text"?n.whitespace==="normal"?Ew(e,n):II(e):[]}function zI(e,t,n){const a=Sw(e,n),s=e.children||[];let o=-1,c=[];if(DI(e))return c;let f,h;for(Mp(e)||e1(e)&&W0(t,e,e1)?h=`
|
|
540
|
-
`:jI(e)?(f=2,h=2):xw(e)&&(f=1,h=1);++o<s.length;)c=c.concat(vw(s[o],e,{whitespace:a,breakBefore:o?void 0:f,breakAfter:o<s.length-1?Mp(s[o+1]):h}));return J0(e)&&W0(t,e,J0)&&c.push(" "),f&&c.unshift(f),h&&c.push(h),c}function Ew(e,t){const n=String(e.value),a=[],s=[];let o=0;for(;o<=n.length;){X0.lastIndex=o;const h=X0.exec(n),m=h&&"index"in h?h.index:n.length;a.push(BI(n.slice(o,m).replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,""),o===0?t.breakBefore:!0,m===n.length?t.breakAfter:!0)),o=m+1}let c=-1,f;for(;++c<a.length;)a[c].charCodeAt(a[c].length-1)===8203||c<a.length-1&&a[c+1].charCodeAt(0)===8203?(s.push(a[c]),f=void 0):a[c]?(typeof f=="number"&&s.push(f),s.push(a[c]),f=0):(c===0||c===a.length-1)&&s.push(0);return s}function II(e){return[String(e.value)]}function BI(e,t,n){const a=[];let s=0,o;for(;s<e.length;){Z0.lastIndex=s;const c=Z0.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 Sw(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 UI(e){return!!(e.properties||{}).hidden}function $I(e){return e.tagName==="td"||e.tagName==="th"}function FI(e){return e.tagName==="dialog"&&!(e.properties||{}).open}function PI(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},$={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[$,g,f,n,e.C_BLOCK_COMMENT_MODE,b,m],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:M.concat([{begin:/\(/,end:/\)/,keywords:j,contains:M.concat(["self"]),relevance:0}]),relevance:0},H={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:j,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(F,H,$,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:j,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function qI(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=PI(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 HI(e){const t=e.regex,n={},a={begin:/\$\{/,end:/\}/,contains:["self",{begin:/:-/,contains:[n]}]};Object.assign(n,{className:"variable",variants:[{begin:t.concat(/\$[\w\d#@][\w\d_]*/,"(?![\\w\\d])(?![$])")},a]});const s={className:"subst",begin:/\$\(/,end:/\)/,contains:[e.BACKSLASH_ESCAPE]},o=e.inherit(e.COMMENT(),{match:[/(^|\s)/,/#.*$/],scope:{2:"comment"}}),c={begin:/<<-?\s*(?=\w+)/,starts:{contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,className:"string"})]}},f={className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,n,s]};s.contains.push(f);const h={match:/\\"/},m={className:"string",begin:/'/,end:/'/},b={match:/\\'/},g={begin:/\$?\(\(/,end:/\)\)/,contains:[{begin:/\d+#[0-9a-f]+/,className:"number"},e.NUMBER_MODE,n]},x=["fish","bash","zsh","sh","csh","ksh","tcsh","dash","scsh"],v=e.SHEBANG({binary:`(${x.join("|")})`,relevance:10}),E={className:"function",begin:/\w[\w\d_]*\s*\(\s*\)\s*\{/,returnBegin:!0,contains:[e.inherit(e.TITLE_MODE,{begin:/\w[\w\d_]*/})],relevance:0},w=["if","then","else","elif","fi","time","for","while","until","in","do","done","case","esac","coproc","function","select"],k=["true","false"],_={match:/(\/[a-z._-]+)+/},A=["break","cd","continue","eval","exec","exit","export","getopts","hash","pwd","readonly","return","shift","test","times","trap","umask","unset"],T=["alias","bind","builtin","caller","command","declare","echo","enable","help","let","local","logout","mapfile","printf","read","readarray","source","sudo","type","typeset","ulimit","unalias"],j=["autoload","bg","bindkey","bye","cap","chdir","clone","comparguments","compcall","compctl","compdescribe","compfiles","compgroups","compquote","comptags","comptry","compvalues","dirs","disable","disown","echotc","echoti","emulate","fc","fg","float","functions","getcap","getln","history","integer","jobs","kill","limit","log","noglob","popd","print","pushd","pushln","rehash","sched","setcap","setopt","stat","suspend","ttyctl","unfunction","unhash","unlimit","unsetopt","vared","wait","whence","where","which","zcompile","zformat","zftp","zle","zmodload","zparseopts","zprof","zpty","zregexparse","zsocket","zstyle","ztcp"],$=["chcon","chgrp","chown","chmod","cp","dd","df","dir","dircolors","ln","ls","mkdir","mkfifo","mknod","mktemp","mv","realpath","rm","rmdir","shred","sync","touch","truncate","vdir","b2sum","base32","base64","cat","cksum","comm","csplit","cut","expand","fmt","fold","head","join","md5sum","nl","numfmt","od","paste","ptx","pr","sha1sum","sha224sum","sha256sum","sha384sum","sha512sum","shuf","sort","split","sum","tac","tail","tr","tsort","unexpand","uniq","wc","arch","basename","chroot","date","dirname","du","echo","env","expr","factor","groups","hostid","id","link","logname","nice","nohup","nproc","pathchk","pinky","printenv","printf","pwd","readlink","runcon","seq","sleep","stat","stdbuf","stty","tee","test","timeout","tty","uname","unlink","uptime","users","who","whoami","yes"];return{name:"Bash",aliases:["sh","zsh"],keywords:{$pattern:/\b[a-z][a-z0-9._-]+\b/,keyword:w,literal:k,built_in:[...A,...T,"set","shopt",...j,...$]},contains:[v,e.SHEBANG(),E,g,o,c,_,f,h,m,b,n]}}function KI(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",variants:[{begin:"\\b[a-z\\d_]*_t\\b"},{match:/\batomic_[a-z]{3,6}\b/}]},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{match:/\b(0b[01']+)/},{match:/(-?)\b([\d']+(\.[\d']*)?|\.[\d']+)((ll|LL|l|L)(u|U)?|(u|U)(ll|LL|l|L)?|f|F|b|B)/},{match:/(-?)\b(0[xX][a-fA-F0-9]+(?:'[a-fA-F0-9]+)*(?:\.[a-fA-F0-9]*(?:'[a-fA-F0-9]*)*)?(?:[pP][-+]?[0-9]+)?(l|L)?(u|U)?)/},{match:/(-?)\b\d+(?:'\d+)*(?:\.\d*(?:'\d*)*)?(?:[eE][-+]?\d+)?/}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef elifdef elifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",k={keyword:["asm","auto","break","case","continue","default","do","else","enum","extern","for","fortran","goto","if","inline","register","restrict","return","sizeof","typeof","typeof_unqual","struct","switch","typedef","union","volatile","while","_Alignas","_Alignof","_Atomic","_Generic","_Noreturn","_Static_assert","_Thread_local","alignas","alignof","noreturn","static_assert","thread_local","_Pragma"],type:["float","double","signed","unsigned","int","short","long","char","void","_Bool","_BitInt","_Complex","_Imaginary","_Decimal32","_Decimal64","_Decimal96","_Decimal128","_Decimal64x","_Decimal128x","_Float16","_Float32","_Float64","_Float128","_Float32x","_Float64x","_Float128x","const","static","constexpr","complex","bool","imaginary"],literal:"true false NULL",built_in:"std string wstring cin cout cerr clog stdin stdout stderr stringstream istringstream ostringstream auto_ptr deque list queue stack vector map set pair bitset multiset multimap unordered_set unordered_map unordered_multiset unordered_multimap priority_queue make_pair array shared_ptr abort terminate abs acos asin atan2 atan calloc ceil cosh cos exit exp fabs floor fmod fprintf fputs free frexp fscanf future isalnum isalpha iscntrl isdigit isgraph islower isprint ispunct isspace isupper isxdigit tolower toupper labs ldexp log10 log malloc realloc memchr memcmp memcpy memset modf pow printf putchar puts scanf sinh sin snprintf sprintf sqrt sscanf strcat strchr strcmp strcpy strcspn strlen strncat strncmp strncpy strpbrk strrchr strspn strstr tanh tan vfprintf vprintf vsprintf endl initializer_list unique_ptr"},_=[g,f,n,e.C_BLOCK_COMMENT_MODE,b,m],A={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:k,contains:_.concat([{begin:/\(/,end:/\)/,keywords:k,contains:_.concat(["self"]),relevance:0}]),relevance:0},T={begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:k,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:k,relevance:0},{begin:v,returnBegin:!0,contains:[e.inherit(x,{className:"title.function"})],relevance:0},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:k,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C",aliases:["h"],keywords:k,disableAutodetect:!0,illegal:"</",contains:[].concat(A,T,_,[g,{begin:e.IDENT_RE+"::",keywords:k},{className:"class",beginKeywords:"enum class struct union",end:/[{;:<>=]/,contains:[{beginKeywords:"final class struct"},e.TITLE_MODE]}]),exports:{preprocessor:g,strings:m,keywords:k}}}function GI(e){const t=e.regex,n=e.COMMENT("//","$",{contains:[{begin:/\\\n/}]}),a="decltype\\(auto\\)",s="[a-zA-Z_]\\w*::",c="(?!struct)("+a+"|"+t.optional(s)+"[a-zA-Z_]\\w*"+t.optional("<[^<>]+>")+")",f={className:"type",begin:"\\b[a-z\\d_]*_t\\b"},m={className:"string",variants:[{begin:'(u8?|U|L)?"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]},{begin:"(u8?|U|L)?'("+"\\\\(x[0-9A-Fa-f]{2}|u[0-9A-Fa-f]{4,8}|[0-7]{3}|\\S)"+"|.)",end:"'",illegal:"."},e.END_SAME_AS_BEGIN({begin:/(?:u8?|U|L)?R"([^()\\ ]{0,16})\(/,end:/\)([^()\\ ]{0,16})"/})]},b={className:"number",variants:[{begin:"[+-]?(?:(?:[0-9](?:'?[0-9])*\\.(?:[0-9](?:'?[0-9])*)?|\\.[0-9](?:'?[0-9])*)(?:[Ee][+-]?[0-9](?:'?[0-9])*)?|[0-9](?:'?[0-9])*[Ee][+-]?[0-9](?:'?[0-9])*|0[Xx](?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*(?:\\.(?:[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)?)?|\\.[0-9A-Fa-f](?:'?[0-9A-Fa-f])*)[Pp][+-]?[0-9](?:'?[0-9])*)(?:[Ff](?:16|32|64|128)?|(BF|bf)16|[Ll]|)"},{begin:"[+-]?\\b(?:0[Bb][01](?:'?[01])*|0[Xx][0-9A-Fa-f](?:'?[0-9A-Fa-f])*|0(?:'?[0-7])*|[1-9](?:'?[0-9])*)(?:[Uu](?:LL?|ll?)|[Uu][Zz]?|(?:LL?|ll?)[Uu]?|[Zz][Uu]|)"}],relevance:0},g={className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma _Pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(m,{className:"string"}),{className:"string",begin:/<.*?>/},n,e.C_BLOCK_COMMENT_MODE]},x={className:"title",begin:t.optional(s)+e.IDENT_RE,relevance:0},v=t.optional(s)+e.IDENT_RE+"\\s*\\(",E=["alignas","alignof","and","and_eq","asm","atomic_cancel","atomic_commit","atomic_noexcept","auto","bitand","bitor","break","case","catch","class","co_await","co_return","co_yield","compl","concept","const_cast|10","consteval","constexpr","constinit","continue","decltype","default","delete","do","dynamic_cast|10","else","enum","explicit","export","extern","false","final","for","friend","goto","if","import","inline","module","mutable","namespace","new","noexcept","not","not_eq","nullptr","operator","or","or_eq","override","private","protected","public","reflexpr","register","reinterpret_cast|10","requires","return","sizeof","static_assert","static_cast|10","struct","switch","synchronized","template","this","thread_local","throw","transaction_safe","transaction_safe_dynamic","true","try","typedef","typeid","typename","union","using","virtual","volatile","while","xor","xor_eq"],w=["bool","char","char16_t","char32_t","char8_t","double","float","int","long","short","void","wchar_t","unsigned","signed","const","static"],k=["any","auto_ptr","barrier","binary_semaphore","bitset","complex","condition_variable","condition_variable_any","counting_semaphore","deque","false_type","flat_map","flat_set","future","imaginary","initializer_list","istringstream","jthread","latch","lock_guard","multimap","multiset","mutex","optional","ostringstream","packaged_task","pair","promise","priority_queue","queue","recursive_mutex","recursive_timed_mutex","scoped_lock","set","shared_future","shared_lock","shared_mutex","shared_timed_mutex","shared_ptr","stack","string_view","stringstream","timed_mutex","thread","true_type","tuple","unique_lock","unique_ptr","unordered_map","unordered_multimap","unordered_multiset","unordered_set","variant","vector","weak_ptr","wstring","wstring_view"],_=["abort","abs","acos","apply","as_const","asin","atan","atan2","calloc","ceil","cerr","cin","clog","cos","cosh","cout","declval","endl","exchange","exit","exp","fabs","floor","fmod","forward","fprintf","fputs","free","frexp","fscanf","future","invoke","isalnum","isalpha","iscntrl","isdigit","isgraph","islower","isprint","ispunct","isspace","isupper","isxdigit","labs","launder","ldexp","log","log10","make_pair","make_shared","make_shared_for_overwrite","make_tuple","make_unique","malloc","memchr","memcmp","memcpy","memset","modf","move","pow","printf","putchar","puts","realloc","scanf","sin","sinh","snprintf","sprintf","sqrt","sscanf","std","stderr","stdin","stdout","strcat","strchr","strcmp","strcpy","strcspn","strlen","strncat","strncmp","strncpy","strpbrk","strrchr","strspn","strstr","swap","tan","tanh","terminate","to_underlying","tolower","toupper","vfprintf","visit","vprintf","vsprintf"],j={type:w,keyword:E,literal:["NULL","false","nullopt","nullptr","true"],built_in:["_Pragma"],_type_hints:k},$={className:"function.dispatch",relevance:0,keywords:{_hint:_},begin:t.concat(/\b/,/(?!decltype)/,/(?!if)/,/(?!for)/,/(?!switch)/,/(?!while)/,e.IDENT_RE,t.lookahead(/(<[^<>]+>|)\s*\(/))},M=[$,g,f,n,e.C_BLOCK_COMMENT_MODE,b,m],F={variants:[{begin:/=/,end:/;/},{begin:/\(/,end:/\)/},{beginKeywords:"new throw return else",end:/;/}],keywords:j,contains:M.concat([{begin:/\(/,end:/\)/,keywords:j,contains:M.concat(["self"]),relevance:0}]),relevance:0},H={className:"function",begin:"("+c+"[\\*&\\s]+)+"+v,returnBegin:!0,end:/[{;=]/,excludeEnd:!0,keywords:j,illegal:/[^\w\s\*&:<>.]/,contains:[{begin:a,keywords:j,relevance:0},{begin:v,returnBegin:!0,contains:[x],relevance:0},{begin:/::/,relevance:0},{begin:/:/,endsWithParent:!0,contains:[m,b]},{relevance:0,match:/,/},{className:"params",begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:[n,e.C_BLOCK_COMMENT_MODE,m,b,f,{begin:/\(/,end:/\)/,keywords:j,relevance:0,contains:["self",n,e.C_BLOCK_COMMENT_MODE,m,b,f]}]},f,n,e.C_BLOCK_COMMENT_MODE,g]};return{name:"C++",aliases:["cc","c++","h++","hpp","hh","hxx","cxx"],keywords:j,illegal:"</",classNameAliases:{"function.dispatch":"built_in"},contains:[].concat(F,H,$,M,[g,{begin:"\\b(deque|list|queue|priority_queue|pair|stack|vector|map|set|bitset|multiset|multimap|unordered_map|unordered_set|unordered_multiset|unordered_multimap|array|tuple|optional|variant|function|flat_map|flat_set)\\s*<(?!<)",end:">",keywords:j,contains:["self",f]},{begin:e.IDENT_RE+"::",keywords:j},{match:[/\b(?:enum(?:\s+(?:class|struct))?|class|struct|union)/,/\s+/,/\w+/],className:{1:"keyword",3:"title.class"}}])}}function QI(e){const t=["bool","byte","char","decimal","delegate","double","dynamic","enum","float","int","long","nint","nuint","object","sbyte","short","string","ulong","uint","ushort"],n=["public","private","protected","static","internal","protected","abstract","async","extern","override","unsafe","virtual","new","sealed","partial"],a=["default","false","null","true"],s=["abstract","as","base","break","case","catch","class","const","continue","do","else","event","explicit","extern","finally","fixed","for","foreach","goto","if","implicit","in","interface","internal","is","lock","namespace","new","operator","out","override","params","private","protected","public","readonly","record","ref","return","scoped","sealed","sizeof","stackalloc","static","struct","switch","this","throw","try","typeof","unchecked","unsafe","using","virtual","void","volatile","while"],o=["add","alias","and","ascending","args","async","await","by","descending","dynamic","equals","file","from","get","global","group","init","into","join","let","nameof","not","notnull","on","or","orderby","partial","record","remove","required","scoped","select","set","unmanaged","value|0","var","when","where","with","yield"],c={keyword:s.concat(o),built_in:t,literal:a},f=e.inherit(e.TITLE_MODE,{begin:"[a-zA-Z](\\.?\\w)*"}),h={className:"number",variants:[{begin:"\\b(0b[01']+)"},{begin:"(-?)\\b([\\d']+(\\.[\\d']*)?|\\.[\\d']+)(u|U|l|L|ul|UL|f|F|b|B)"},{begin:"(-?)(\\b0[xX][a-fA-F0-9']+|(\\b[\\d']+(\\.[\\d']*)?|\\.[\\d']+)([eE][-+]?[\\d']+)?)"}],relevance:0},m={className:"string",begin:/"""("*)(?!")(.|\n)*?"""\1/,relevance:1},b={className:"string",begin:'@"',end:'"',contains:[{begin:'""'}]},g=e.inherit(b,{illegal:/\n/}),x={className:"subst",begin:/\{/,end:/\}/,keywords:c},v=e.inherit(x,{illegal:/\n/}),E={className:"string",begin:/\$"/,end:'"',illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},e.BACKSLASH_ESCAPE,v]},w={className:"string",begin:/\$@"/,end:'"',contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},x]},k=e.inherit(w,{illegal:/\n/,contains:[{begin:/\{\{/},{begin:/\}\}/},{begin:'""'},v]});x.contains=[w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.C_BLOCK_COMMENT_MODE],v.contains=[k,E,g,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,h,e.inherit(e.C_BLOCK_COMMENT_MODE,{illegal:/\n/})];const _={variants:[m,w,E,b,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},A={begin:"<",end:">",contains:[{beginKeywords:"in out"},f]},T=e.IDENT_RE+"(<"+e.IDENT_RE+"(\\s*,\\s*"+e.IDENT_RE+")*>)?(\\[\\])?",j={begin:"@"+e.IDENT_RE,relevance:0};return{name:"C#",aliases:["cs","c#"],keywords:c,illegal:/::/,contains:[e.COMMENT("///","$",{returnBegin:!0,contains:[{className:"doctag",variants:[{begin:"///",relevance:0},{begin:"<!--|-->"},{begin:"</?",end:">"}]}]}),e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{className:"meta",begin:"#",end:"$",keywords:{keyword:"if else elif endif define undef warning error line region endregion pragma checksum"}},_,h,{beginKeywords:"class interface",relevance:0,end:/[{;=]/,illegal:/[^\s:,]/,contains:[{beginKeywords:"where class"},f,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"namespace",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"record",relevance:0,end:/[{;=]/,illegal:/[^\s:]/,contains:[f,A,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"meta",begin:"^\\s*\\[(?=[\\w])",excludeBegin:!0,end:"\\]",excludeEnd:!0,contains:[{className:"string",begin:/"/,end:/"/}]},{beginKeywords:"new return throw await else",relevance:0},{className:"function",begin:"("+T+"\\s+)+"+e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,end:/\s*[{;=]/,excludeEnd:!0,keywords:c,contains:[{beginKeywords:n.join(" "),relevance:0},{begin:e.IDENT_RE+"\\s*(<[^=]+>\\s*)?\\(",returnBegin:!0,contains:[e.TITLE_MODE,A],relevance:0},{match:/\(\)/},{className:"params",begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:c,relevance:0,contains:[_,h,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},j]}}const YI=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_-]*/}}),VI=["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"],WI=["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"],XI=[...VI,...WI],ZI=["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(),JI=["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(),e4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),t4=["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 n4(e){const t=e.regex,n=YI(e),a={begin:/-(webkit|moz|ms|o)-(?=[a-z])/},s="and or not only",o=/@-?\w[\w]*(-\w+)*/,c="[a-zA-Z-][a-zA-Z0-9_-]*",f=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE];return{name:"CSS",case_insensitive:!0,illegal:/[=|'\$]/,keywords:{keyframePosition:"from to"},classNameAliases:{keyframePosition:"selector-tag"},contains:[n.BLOCK_COMMENT,a,n.CSS_NUMBER_MODE,{className:"selector-id",begin:/#[A-Za-z0-9_-]+/,relevance:0},{className:"selector-class",begin:"\\."+c,relevance:0},n.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",variants:[{begin:":("+JI.join("|")+")"},{begin:":(:)?("+e4.join("|")+")"}]},n.CSS_VARIABLE,{className:"attribute",begin:"\\b("+t4.join("|")+")\\b"},{begin:/:/,end:/[;}{]/,contains:[n.BLOCK_COMMENT,n.HEXCOLOR,n.IMPORTANT,n.CSS_NUMBER_MODE,...f,{begin:/(url|data-uri)\(/,end:/\)/,relevance:0,keywords:{built_in:"url data-uri"},contains:[...f,{className:"string",begin:/[^)]/,endsWithParent:!0,excludeEnd:!0}]},n.FUNCTION_DISPATCH]},{begin:t.lookahead(/@/),end:"[{;]",relevance:0,illegal:/:/,contains:[{className:"keyword",begin:o},{begin:/\s/,endsWithParent:!0,excludeEnd:!0,relevance:0,keywords:{$pattern:/[a-z-]+/,keyword:s,attribute:ZI.join(" ")},contains:[{begin:/[a-z-]+(?=:)/,className:"attribute"},...f,n.CSS_NUMBER_MODE]}]},{className:"selector-tag",begin:"\\b("+XI.join("|")+")\\b"}]}}function i4(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 a4(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 r4(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 s4(e){const t=e.regex,n={className:"number",relevance:0,variants:[{begin:/([+-]+)?[\d]+_[\d_]+/},{begin:e.NUMBER_RE}]},a=e.COMMENT();a.variants=[{begin:/;/,end:/$/},{begin:/#/,end:/$/}];const s={className:"variable",variants:[{begin:/\$[\w\d"][\w\d_]*/},{begin:/\$\{(.*?)\}/}]},o={className:"literal",begin:/\bon|off|true|false|yes|no\b/},c={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:"'''",end:"'''",relevance:10},{begin:'"""',end:'"""',relevance:10},{begin:'"',end:'"'},{begin:"'",end:"'"}]},f={begin:/\[/,end:/\]/,contains:[a,o,s,c,n,"self"],relevance:0},h=/[A-Za-z0-9_-]+/,m=/"(\\"|[^"])*"/,b=/'[^']*'/,g=t.either(h,m,b),x=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:x,className:"attr",starts:{end:/$/,contains:[a,f,o,s,c,n]}}]}}var ll="[0-9](_*[0-9])*",rf=`\\.(${ll})`,sf="[0-9a-fA-F](_*[0-9a-fA-F])*",t1={className:"number",variants:[{begin:`(\\b(${ll})((${rf})|\\.)?|(${rf}))[eE][+-]?(${ll})[fFdD]?\\b`},{begin:`\\b(${ll})((${rf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${rf})[fFdD]?\\b`},{begin:`\\b(${ll})[fFdD]\\b`},{begin:`\\b0[xX]((${sf})\\.?|(${sf})?\\.(${sf}))[pP][+-]?(${ll})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${sf})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function ww(e,t,n){return n===-1?"":e.replace(t,a=>ww(e,t,n-1))}function l4(e){const t=e.regex,n="[À-ʸa-zA-Z_$][À-ʸa-zA-Z_$0-9]*",a=n+ww("(?:<"+n+"~~~(?:\\s*,\\s*"+n+"~~~)*>)?",/~~~/g,2),h={keyword:["synchronized","abstract","private","var","static","if","const ","for","while","strictfp","finally","protected","import","native","final","void","enum","else","break","transient","catch","instanceof","volatile","case","assert","package","default","public","try","switch","continue","throws","protected","public","private","module","requires","exports","do","sealed","yield","permits","goto","when"],literal:["false","true","null"],type:["char","boolean","long","float","int","byte","short","double"],built_in:["super","this"]},m={className:"meta",begin:"@"+n,contains:[{begin:/\(/,end:/\)/,contains:["self"]}]},b={className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[e.C_BLOCK_COMMENT_MODE],endsParent:!0};return{name:"Java",aliases:["jsp"],keywords:h,illegal:/<\/|#/,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{begin:/\w+@/,relevance:0},{className:"doctag",begin:"@[A-Za-z]+"}]}),{begin:/import java\.[a-z]+\./,keywords:"import",relevance:2},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,{begin:/"""/,end:/"""/,className:"string",contains:[e.BACKSLASH_ESCAPE]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,{match:[/\b(?:class|interface|enum|extends|implements|new)/,/\s+/,n],className:{1:"keyword",3:"title.class"}},{match:/non-sealed/,scope:"keyword"},{begin:[t.concat(/(?!else)/,n),/\s+/,n,/\s+/,/=(?!=)/],className:{1:"type",3:"variable",5:"operator"}},{begin:[/record/,/\s+/,n],className:{1:"keyword",3:"title.class"},contains:[b,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{beginKeywords:"new throw return else",relevance:0},{begin:["(?:"+a+"\\s+)",e.UNDERSCORE_IDENT_RE,/\s*(?=\()/],className:{2:"title.function"},keywords:h,contains:[{className:"params",begin:/\(/,end:/\)/,keywords:h,relevance:0,contains:[m,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,t1,e.C_BLOCK_COMMENT_MODE]},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},t1,m]}}const n1="[A-Za-z$_][0-9A-Za-z$_]*",o4=["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"],c4=["true","false","null","undefined","NaN","Infinity"],_w=["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"],kw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Nw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],u4=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],f4=[].concat(Nw,_w,kw);function d4(e){const t=e.regex,n=(V,{after:be})=>{const R="</"+V[0].slice(1);return V.input.indexOf(R,be)!==-1},a=n1,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,be)=>{const R=V[0].length+V.index,D=V.input[R];if(D==="<"||D===","){be.ignoreMatch();return}D===">"&&(n(V,{after:R})||be.ignoreMatch());let X;const C=V.input.substring(R);if(X=C.match(/^\s*=/)){be.ignoreMatch();return}if((X=C.match(/^\s+extends\s+/))&&X.index===0){be.ignoreMatch();return}}},f={$pattern:n1,keyword:o4,literal:c4,built_in:f4,"variable.language":u4},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,k,{match:/\$\d+/},g];x.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const j=[].concat(A,x.contains),$=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(j)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},F={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"}}]},H={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:{_:[..._w,...kw]}},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:/%/},J={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ae(V){return t.concat("(?!",V.join("|"),")")}const ge={match:t.concat(/\b/,ae([...Nw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},fe={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,k,A,{match:/\$\d+/},g,H,{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:[A,e.REGEXP_MODE,{className:"function",begin:q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{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},fe,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},ge,J,F,te,{match:/\$[(.]/}]}}function h4(e){const t={className:"attr",begin:/"(\\.|[^\\"\r\n])*"(?=\s*:)/,relevance:1.01},n={match:/[{}[\],:]/,className:"punctuation",relevance:0},a=["true","false","null"],s={scope:"literal",beginKeywords:a.join(" ")};return{name:"JSON",aliases:["jsonc"],keywords:{literal:a},contains:[t,n,e.QUOTE_STRING_MODE,s,e.C_NUMBER_MODE,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE],illegal:"\\S"}}var ol="[0-9](_*[0-9])*",lf=`\\.(${ol})`,of="[0-9a-fA-F](_*[0-9a-fA-F])*",m4={className:"number",variants:[{begin:`(\\b(${ol})((${lf})|\\.)?|(${lf}))[eE][+-]?(${ol})[fFdD]?\\b`},{begin:`\\b(${ol})((${lf})[fFdD]?\\b|\\.([fFdD]\\b)?)`},{begin:`(${lf})[fFdD]?\\b`},{begin:`\\b(${ol})[fFdD]\\b`},{begin:`\\b0[xX]((${of})\\.?|(${of})?\\.(${of}))[pP][+-]?(${ol})[fFdD]?\\b`},{begin:"\\b(0|[1-9](_*[0-9])*)[lL]?\\b"},{begin:`\\b0[xX](${of})[lL]?\\b`},{begin:"\\b0(_*[0-7])*[lL]?\\b"},{begin:"\\b0[bB][01](_*[01])*[lL]?\\b"}],relevance:0};function p4(e){const t={keyword:"abstract as val var vararg get set class object open private protected public noinline crossinline dynamic final enum if else do while for when throw try catch finally import package is in fun override companion reified inline lateinit init interface annotation data sealed internal infix operator out by constructor super tailrec where const inner suspend typealias external expect actual",built_in:"Byte Short Char Int Long Boolean Float Double Void Unit Nothing",literal:"true false null"},n={className:"keyword",begin:/\b(break|continue|return|this)\b/,starts:{contains:[{className:"symbol",begin:/@\w+/}]}},a={className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"@"},s={className:"subst",begin:/\$\{/,end:/\}/,contains:[e.C_NUMBER_MODE]},o={className:"variable",begin:"\\$"+e.UNDERSCORE_IDENT_RE},c={className:"string",variants:[{begin:'"""',end:'"""(?=[^"])',contains:[o,s]},{begin:"'",end:"'",illegal:/\n/,contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"',illegal:/\n/,contains:[e.BACKSLASH_ESCAPE,o,s]}]};s.contains.push(c);const f={className:"meta",begin:"@(?:file|property|field|get|set|receiver|param|setparam|delegate)\\s*:(?:\\s*"+e.UNDERSCORE_IDENT_RE+")?"},h={className:"meta",begin:"@"+e.UNDERSCORE_IDENT_RE,contains:[{begin:/\(/,end:/\)/,contains:[e.inherit(c,{className:"string"}),"self"]}]},m=m4,b=e.COMMENT("/\\*","\\*/",{contains:[e.C_BLOCK_COMMENT_MODE]}),g={variants:[{className:"type",begin:e.UNDERSCORE_IDENT_RE},{begin:/\(/,end:/\)/,contains:[]}]},x=g;return x.variants[1].contains=[g],g.variants[1].contains=[x],{name:"Kotlin",aliases:["kt","kts"],keywords:t,contains:[e.COMMENT("/\\*\\*","\\*/",{relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"}]}),e.C_LINE_COMMENT_MODE,b,n,a,f,h,{className:"function",beginKeywords:"fun",end:"[(]|$",returnBegin:!0,excludeEnd:!0,keywords:t,relevance:5,contains:[{begin:e.UNDERSCORE_IDENT_RE+"\\s*\\(",returnBegin:!0,relevance:0,contains:[e.UNDERSCORE_TITLE_MODE]},{className:"type",begin:/</,end:/>/,keywords:"reified",relevance:0},{className:"params",begin:/\(/,end:/\)/,endsParent:!0,keywords:t,relevance:0,contains:[{begin:/:/,end:/[=,\/]/,endsWithParent:!0,contains:[g,e.C_LINE_COMMENT_MODE,b],relevance:0},e.C_LINE_COMMENT_MODE,b,f,h,c,e.C_NUMBER_MODE]},b]},{begin:[/class|interface|trait/,/\s+/,e.UNDERSCORE_IDENT_RE],beginScope:{3:"title.class"},keywords:"class interface trait",end:/[:\{(]|$/,excludeEnd:!0,illegal:"extends implements",contains:[{beginKeywords:"public protected internal private constructor"},e.UNDERSCORE_TITLE_MODE,{className:"type",begin:/</,end:/>/,excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:/[,:]\s*/,end:/[<\(,){\s]|$/,excludeBegin:!0,returnEnd:!0},f,h]},c,{className:"meta",begin:"^#!/usr/bin/env",end:"$",illegal:`
|
|
541
|
-
`},m]}}const g4=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_-]*/}}),b4=["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"],y4=["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=[...b4,...y4],v4=["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(),Tw=["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(),Cw=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),E4=["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(),S4=Tw.concat(Cw).sort().reverse();function w4(e){const t=g4(e),n=S4,a="and or not only",s="[\\w-]+",o="("+s+"|@\\{"+s+"\\})",c=[],f=[],h=function(T){return{className:"string",begin:"~?"+T+".*?"+T}},m=function(T,j,$){return{className:T,begin:j,relevance:$}},b={$pattern:/[a-z-]+/,keyword:a,attribute:v4.join(" ")},g={begin:"\\(",end:"\\)",contains:f,keywords:b,relevance:0};f.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,h("'"),h('"'),t.CSS_NUMBER_MODE,{begin:"(url|data-uri)\\(",starts:{className:"string",end:"[\\)\\n]",excludeEnd:!0}},t.HEXCOLOR,g,m("variable","@@?"+s,10),m("variable","@\\{"+s+"\\}"),m("built_in","~?`[^`]*?`"),{className:"attribute",begin:s+"\\s*:",end:":",returnBegin:!0,excludeEnd:!0},t.IMPORTANT,{beginKeywords:"and not"},t.FUNCTION_DISPATCH);const x=f.concat({begin:/\{/,end:/\}/,contains:c}),v={beginKeywords:"when",endsWithParent:!0,contains:[{beginKeywords:"and not"}].concat(f)},E={begin:o+"\\s*:",returnBegin:!0,end:/[;}]/,relevance:0,contains:[{begin:/-(webkit|moz|ms|o)-/},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+E4.join("|")+")\\b",end:/(?=:)/,starts:{endsWithParent:!0,illegal:"[<=$]",relevance:0,contains:f}}]},w={className:"keyword",begin:"@(import|media|charset|font-face|(-[a-z]+-)?keyframes|supports|document|namespace|page|viewport|host)\\b",starts:{end:"[;{}]",keywords:b,returnEnd:!0,contains:f,relevance:0}},k={className:"variable",variants:[{begin:"@"+s+"\\s*:",relevance:15},{begin:"@"+s}],starts:{end:"[;}]",returnEnd:!0,contains:x}},_={variants:[{begin:"[\\.#:&\\[>]",end:"[;{}]"},{begin:o,end:/\{/}],returnBegin:!0,returnEnd:!0,illegal:`[<='$"]`,relevance:0,contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,v,m("keyword","all\\b"),m("variable","@\\{"+s+"\\}"),{begin:"\\b("+x4.join("|")+")\\b",className:"selector-tag"},t.CSS_NUMBER_MODE,m("selector-tag",o,0),m("selector-id","#"+o),m("selector-class","\\."+o,0),m("selector-tag","&",0),t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-pseudo",begin:":("+Tw.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+Cw.join("|")+")"},{begin:/\(/,end:/\)/,relevance:0,contains:x},{begin:"!important"},t.FUNCTION_DISPATCH]},A={begin:s+`:(:)?(${n.join("|")})`,returnBegin:!0,contains:[_]};return c.push(e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,w,k,A,E,_,v,t.FUNCTION_DISPATCH),{name:"Less",case_insensitive:!0,illegal:`[=>'/<($"]`,contains:c}}function _4(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 k4(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 N4(e){const t=e.regex,n={begin:/<\/?[A-Za-z_]/,end:">",subLanguage:"xml",relevance:0},a={begin:"^[-\\*]{3,}",end:"$"},s={className:"code",variants:[{begin:"(`{3,})[^`](.|\\n)*?\\1`*[ ]*"},{begin:"(~{3,})[^~](.|\\n)*?\\1~*[ ]*"},{begin:"```",end:"```+[ ]*$"},{begin:"~~~",end:"~~~+[ ]*$"},{begin:"`.+?`"},{begin:"(?=^( {4}|\\t))",contains:[{begin:"^( {4}|\\t)",end:"(\\n)$"}],relevance:0}]},o={className:"bullet",begin:"^[ ]*([*+-]|(\\d+\\.))(?=\\s+)",end:"\\s+",excludeEnd:!0},c={begin:/^\[[^\n]+\]:/,returnBegin:!0,contains:[{className:"symbol",begin:/\[/,end:/\]/,excludeBegin:!0,excludeEnd:!0},{className:"link",begin:/:\s*/,end:/$/,excludeBegin:!0}]},f=/[A-Za-z][A-Za-z0-9+.-]*/,h={variants:[{begin:/\[.+?\]\[.*?\]/,relevance:0},{begin:/\[.+?\]\(((data|javascript|mailto):|(?:http|ftp)s?:\/\/).*?\)/,relevance:2},{begin:t.concat(/\[.+?\]\(/,f,/:\/\/.*?\)/),relevance:2},{begin:/\[.+?\]\([./?&#].*?\)/,relevance:1},{begin:/\[.*?\]\(.*?\)/,relevance:0}],returnBegin:!0,contains:[{match:/\[(?=\])/},{className:"string",relevance:0,begin:"\\[",end:"\\]",excludeBegin:!0,returnEnd:!0},{className:"link",relevance:0,begin:"\\]\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0},{className:"symbol",relevance:0,begin:"\\]\\[",end:"\\]",excludeBegin:!0,excludeEnd:!0}]},m={className:"strong",contains:[],variants:[{begin:/_{2}(?!\s)/,end:/_{2}/},{begin:/\*{2}(?!\s)/,end:/\*{2}/}]},b={className:"emphasis",contains:[],variants:[{begin:/\*(?![*\s])/,end:/\*/},{begin:/_(?![_\s])/,end:/_/,relevance:0}]},g=e.inherit(m,{contains:[]}),x=e.inherit(b,{contains:[]});m.contains.push(x),b.contains.push(g);let v=[n,h];return[m,b,g,x].forEach(_=>{_.contains=_.contains.concat(v)}),v=v.concat(m,b),{name:"Markdown",aliases:["md","mkdown","mkd"],contains:[{className:"section",variants:[{begin:"^#{1,6}",end:"$",contains:v},{begin:"(?=^.+?\\n[=-]{2,}$)",contains:[{begin:"^[=-]*$"},{begin:"^",end:"\\n",contains:v}]}]},n,o,m,b,{className:"quote",begin:"^>\\s+",contains:v,end:"$"},s,a,h,c,{scope:"literal",match:/&([a-zA-Z0-9]+|#[0-9]{1,7}|#[Xx][0-9a-fA-F]{1,6});/}]}}function T4(e){const t={className:"built_in",begin:"\\b(AV|CA|CF|CG|CI|CL|CM|CN|CT|MK|MP|MTK|MTL|NS|SCN|SK|UI|WK|XC)\\w+"},n=/[a-zA-Z@][a-zA-Z0-9_]*/,f={"variable.language":["this","super"],$pattern:n,keyword:["while","export","sizeof","typedef","const","struct","for","union","volatile","static","mutable","if","do","return","goto","enum","else","break","extern","asm","case","default","register","explicit","typename","switch","continue","inline","readonly","assign","readwrite","self","@synchronized","id","typeof","nonatomic","IBOutlet","IBAction","strong","weak","copy","in","out","inout","bycopy","byref","oneway","__strong","__weak","__block","__autoreleasing","@private","@protected","@public","@try","@property","@end","@throw","@catch","@finally","@autoreleasepool","@synthesize","@dynamic","@selector","@optional","@required","@encode","@package","@import","@defs","@compatibility_alias","__bridge","__bridge_transfer","__bridge_retained","__bridge_retain","__covariant","__contravariant","__kindof","_Nonnull","_Nullable","_Null_unspecified","__FUNCTION__","__PRETTY_FUNCTION__","__attribute__","getter","setter","retain","unsafe_unretained","nonnull","nullable","null_unspecified","null_resettable","class","instancetype","NS_DESIGNATED_INITIALIZER","NS_UNAVAILABLE","NS_REQUIRES_SUPER","NS_RETURNS_INNER_POINTER","NS_INLINE","NS_AVAILABLE","NS_DEPRECATED","NS_ENUM","NS_OPTIONS","NS_SWIFT_UNAVAILABLE","NS_ASSUME_NONNULL_BEGIN","NS_ASSUME_NONNULL_END","NS_REFINED_FOR_SWIFT","NS_SWIFT_NAME","NS_SWIFT_NOTHROW","NS_DURING","NS_HANDLER","NS_ENDHANDLER","NS_VALUERETURN","NS_VOIDRETURN"],literal:["false","true","FALSE","TRUE","nil","YES","NO","NULL"],built_in:["dispatch_once_t","dispatch_queue_t","dispatch_sync","dispatch_async","dispatch_once"],type:["int","float","char","unsigned","signed","short","long","double","wchar_t","unichar","void","bool","BOOL","id|0","_Bool"]},h={$pattern:n,keyword:["@interface","@class","@protocol","@implementation"]};return{name:"Objective-C",aliases:["mm","objc","obj-c","obj-c++","objective-c++"],keywords:f,illegal:"</",contains:[t,e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,e.C_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,{className:"string",variants:[{begin:'@"',end:'"',illegal:"\\n",contains:[e.BACKSLASH_ESCAPE]}]},{className:"meta",begin:/#\s*[a-z]+\b/,end:/$/,keywords:{keyword:"if else elif endif define undef warning error line pragma ifdef ifndef include"},contains:[{begin:/\\\n/,relevance:0},e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),{className:"string",begin:/<.*?>/,end:/$/,illegal:"\\n"},e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE]},{className:"class",begin:"("+h.keyword.join("|")+")\\b",end:/(\{|$)/,excludeEnd:!0,keywords:h,contains:[e.UNDERSCORE_TITLE_MODE]},{begin:"\\."+e.UNDERSCORE_IDENT_RE,relevance:0}]}}function C4(e){const t=e.regex,n=["abs","accept","alarm","and","atan2","bind","binmode","bless","break","caller","chdir","chmod","chomp","chop","chown","chr","chroot","class","close","closedir","connect","continue","cos","crypt","dbmclose","dbmopen","defined","delete","die","do","dump","each","else","elsif","endgrent","endhostent","endnetent","endprotoent","endpwent","endservent","eof","eval","exec","exists","exit","exp","fcntl","field","fileno","flock","for","foreach","fork","format","formline","getc","getgrent","getgrgid","getgrnam","gethostbyaddr","gethostbyname","gethostent","getlogin","getnetbyaddr","getnetbyname","getnetent","getpeername","getpgrp","getpriority","getprotobyname","getprotobynumber","getprotoent","getpwent","getpwnam","getpwuid","getservbyname","getservbyport","getservent","getsockname","getsockopt","given","glob","gmtime","goto","grep","gt","hex","if","index","int","ioctl","join","keys","kill","last","lc","lcfirst","length","link","listen","local","localtime","log","lstat","lt","ma","map","method","mkdir","msgctl","msgget","msgrcv","msgsnd","my","ne","next","no","not","oct","open","opendir","or","ord","our","pack","package","pipe","pop","pos","print","printf","prototype","push","q|0","qq","quotemeta","qw","qx","rand","read","readdir","readline","readlink","readpipe","recv","redo","ref","rename","require","reset","return","reverse","rewinddir","rindex","rmdir","say","scalar","seek","seekdir","select","semctl","semget","semop","send","setgrent","sethostent","setnetent","setpgrp","setpriority","setprotoent","setpwent","setservent","setsockopt","shift","shmctl","shmget","shmread","shmwrite","shutdown","sin","sleep","socket","socketpair","sort","splice","split","sprintf","sqrt","srand","stat","state","study","sub","substr","symlink","syscall","sysopen","sysread","sysseek","system","syswrite","tell","telldir","tie","tied","time","times","tr","truncate","uc","ucfirst","umask","undef","unless","unlink","unpack","unshift","untie","until","use","utime","values","vec","wait","waitpid","wantarray","warn","when","while","write","x|0","xor","y|0"],a=/[dualxmsipngr]{0,12}/,s={$pattern:/[\w.]+/,keyword:n.join(" ")},o={className:"subst",begin:"[$@]\\{",end:"\\}",keywords:s},c={begin:/->\{/,end:/\}/},f={scope:"attr",match:/\s+:\s*\w+(\s*\(.*?\))?/},h={scope:"variable",variants:[{begin:/\$\d/},{begin:t.concat(/[$%@](?!")(\^\w\b|#\w+(::\w+)*|\{\w+\}|\w+(::\w*)*)/,"(?![A-Za-z])(?![@$%])")},{begin:/[$%@](?!")[^\s\w{=]|\$=/,relevance:0}],contains:[f]},m={className:"number",variants:[{match:/0?\.[0-9][0-9_]+\b/},{match:/\bv?(0|[1-9][0-9_]*(\.[0-9_]+)?|[1-9][0-9_]*)\b/},{match:/\b0[0-7][0-7_]*\b/},{match:/\b0x[0-9a-fA-F][0-9a-fA-F_]*\b/},{match:/\b0b[0-1][0-1_]*\b/}],relevance:0},b=[e.BACKSLASH_ESCAPE,o,h],g=[/!/,/\//,/\|/,/\?/,/'/,/"/,/#/],x=(w,k,_="\\1")=>{const A=_==="\\1"?_:t.concat(_,k);return t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,A,/(?:\\.|[^\\\/])*?/,_,a)},v=(w,k,_)=>t.concat(t.concat("(?:",w,")"),k,/(?:\\.|[^\\\/])*?/,_,a),E=[h,e.HASH_COMMENT_MODE,e.COMMENT(/^=\w/,/=cut/,{endsWithParent:!0}),c,{className:"string",contains:b,variants:[{begin:"q[qwxr]?\\s*\\(",end:"\\)",relevance:5},{begin:"q[qwxr]?\\s*\\[",end:"\\]",relevance:5},{begin:"q[qwxr]?\\s*\\{",end:"\\}",relevance:5},{begin:"q[qwxr]?\\s*\\|",end:"\\|",relevance:5},{begin:"q[qwxr]?\\s*<",end:">",relevance:5},{begin:"qw\\s+q",end:"q",relevance:5},{begin:"'",end:"'",contains:[e.BACKSLASH_ESCAPE]},{begin:'"',end:'"'},{begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE]},{begin:/\{\w+\}/,relevance:0},{begin:"-?\\w+\\s*=>",relevance:0}]},m,{begin:"(\\/\\/|"+e.RE_STARTERS_RE+"|\\b(split|return|print|reverse|grep)\\b)\\s*",keywords:"split return print reverse grep",relevance:0,contains:[e.HASH_COMMENT_MODE,{className:"regexp",variants:[{begin:x("s|tr|y",t.either(...g,{capture:!0}))},{begin:x("s|tr|y","\\(","\\)")},{begin:x("s|tr|y","\\[","\\]")},{begin:x("s|tr|y","\\{","\\}")}],relevance:2},{className:"regexp",variants:[{begin:/(m|qr)\/\//,relevance:0},{begin:v("(?:m|qr)?",/\//,/\//)},{begin:v("m|qr",t.either(...g,{capture:!0}),/\1/)},{begin:v("m|qr",/\(/,/\)/)},{begin:v("m|qr",/\[/,/\]/)},{begin:v("m|qr",/\{/,/\}/)}]}]},{className:"function",beginKeywords:"sub method",end:"(\\s*\\(.*?\\))?[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f]},{className:"class",beginKeywords:"class",end:"[;{]",excludeEnd:!0,relevance:5,contains:[e.TITLE_MODE,f,m]},{begin:"-\\w\\b",relevance:0},{begin:"^__DATA__$",end:"^__END__$",subLanguage:"mojolicious",contains:[{begin:"^@@.*",end:"$",className:"comment"}]}];return o.contains=E,c.contains=E,{name:"Perl",aliases:["pl","pm"],keywords:s,contains:E}}function A4(e){const t=e.regex,n=/(?![A-Za-z0-9])(?![$])/,a=t.concat(/[a-zA-Z_\x7f-\xff][a-zA-Z0-9_\x7f-\xff]*/,n),s=t.concat(/(\\?[A-Z][a-z0-9_\x7f-\xff]+|\\?[A-Z]+(?=[A-Z][a-z0-9_\x7f-\xff])){1,}/,n),o=t.concat(/[A-Z]+/,n),c={scope:"variable",match:"\\$+"+a},f={scope:"meta",variants:[{begin:/<\?php/,relevance:10},{begin:/<\?=/},{begin:/<\?/,relevance:.1},{begin:/\?>/}]},h={scope:"subst",variants:[{begin:/\$\w+/},{begin:/\{\$/,end:/\}/}]},m=e.inherit(e.APOS_STRING_MODE,{illegal:null}),b=e.inherit(e.QUOTE_STRING_MODE,{illegal:null,contains:e.QUOTE_STRING_MODE.contains.concat(h)}),g={begin:/<<<[ \t]*(?:(\w+)|"(\w+)")\n/,end:/[ \t]*(\w+)\b/,contains:e.QUOTE_STRING_MODE.contains.concat(h),"on:begin":(fe,te)=>{te.data._beginMatch=fe[1]||fe[2]},"on:end":(fe,te)=>{te.data._beginMatch!==fe[1]&&te.ignoreMatch()}},x=e.END_SAME_AS_BEGIN({begin:/<<<[ \t]*'(\w+)'\n/,end:/[ \t]*(\w+)\b/}),v=`[
|
|
542
|
-
]`,E={scope:"string",variants:[b,m,g,x]},w={scope:"number",variants:[{begin:"\\b0[bB][01]+(?:_[01]+)*\\b"},{begin:"\\b0[oO][0-7]+(?:_[0-7]+)*\\b"},{begin:"\\b0[xX][\\da-fA-F]+(?:_[\\da-fA-F]+)*\\b"},{begin:"(?:\\b\\d+(?:_\\d+)*(\\.(?:\\d+(?:_\\d+)*))?|\\B\\.\\d+)(?:[eE][+-]?\\d+)?"}],relevance:0},k=["false","null","true"],_=["__CLASS__","__DIR__","__FILE__","__FUNCTION__","__COMPILER_HALT_OFFSET__","__LINE__","__METHOD__","__NAMESPACE__","__TRAIT__","die","echo","exit","include","include_once","print","require","require_once","array","abstract","and","as","binary","bool","boolean","break","callable","case","catch","class","clone","const","continue","declare","default","do","double","else","elseif","empty","enddeclare","endfor","endforeach","endif","endswitch","endwhile","enum","eval","extends","final","finally","float","for","foreach","from","global","goto","if","implements","instanceof","insteadof","int","integer","interface","isset","iterable","list","match|0","mixed","new","never","object","or","private","protected","public","readonly","real","return","string","switch","throw","trait","try","unset","use","var","void","while","xor","yield"],A=["Error|0","AppendIterator","ArgumentCountError","ArithmeticError","ArrayIterator","ArrayObject","AssertionError","BadFunctionCallException","BadMethodCallException","CachingIterator","CallbackFilterIterator","CompileError","Countable","DirectoryIterator","DivisionByZeroError","DomainException","EmptyIterator","ErrorException","Exception","FilesystemIterator","FilterIterator","GlobIterator","InfiniteIterator","InvalidArgumentException","IteratorIterator","LengthException","LimitIterator","LogicException","MultipleIterator","NoRewindIterator","OutOfBoundsException","OutOfRangeException","OuterIterator","OverflowException","ParentIterator","ParseError","RangeException","RecursiveArrayIterator","RecursiveCachingIterator","RecursiveCallbackFilterIterator","RecursiveDirectoryIterator","RecursiveFilterIterator","RecursiveIterator","RecursiveIteratorIterator","RecursiveRegexIterator","RecursiveTreeIterator","RegexIterator","RuntimeException","SeekableIterator","SplDoublyLinkedList","SplFileInfo","SplFileObject","SplFixedArray","SplHeap","SplMaxHeap","SplMinHeap","SplObjectStorage","SplObserver","SplPriorityQueue","SplQueue","SplStack","SplSubject","SplTempFileObject","TypeError","UnderflowException","UnexpectedValueException","UnhandledMatchError","ArrayAccess","BackedEnum","Closure","Fiber","Generator","Iterator","IteratorAggregate","Serializable","Stringable","Throwable","Traversable","UnitEnum","WeakReference","WeakMap","Directory","__PHP_Incomplete_Class","parent","php_user_filter","self","static","stdClass"],j={keyword:_,literal:(fe=>{const te=[];return fe.forEach(q=>{te.push(q),q.toLowerCase()===q?te.push(q.toUpperCase()):te.push(q.toLowerCase())}),te})(k),built_in:A},$=fe=>fe.map(te=>te.replace(/\|\d+$/,"")),M={variants:[{match:[/new/,t.concat(v,"+"),t.concat("(?!",$(A).join("\\b|"),"\\b)"),s],scope:{1:"keyword",4:"title.class"}}]},F=t.concat(a,"\\b(?!\\()"),H={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:j,contains:[ee,c,H,e.C_BLOCK_COMMENT_MODE,E,w,M]},J={relevance:0,match:[/\b/,t.concat("(?!fn\\b|function\\b|",$(_).join("\\b|"),"|",$(A).join("\\b|"),"\\b)"),a,t.concat(v,"*"),t.lookahead(/(?=\()/)],scope:{3:"title.function.invoke"},contains:[L]};L.contains.push(J);const ae=[ee,H,e.C_BLOCK_COMMENT_MODE,E,w,M],ge={begin:t.concat(/#\[\s*\\?/,t.either(s,o)),beginScope:"meta",end:/]/,endScope:"meta",keywords:{literal:k,keyword:["new","array"]},contains:[{begin:/\[/,end:/]/,keywords:{literal:k,keyword:["new","array"]},contains:["self",...ae]},...ae,{scope:"meta",variants:[{match:s},{match:o}]}]};return{case_insensitive:!1,keywords:j,contains:[ge,e.HASH_COMMENT_MODE,e.COMMENT("//","$"),e.COMMENT("/\\*","\\*/",{contains:[{scope:"doctag",match:"@[A-Za-z]+"}]}),{match:/__halt_compiler\(\);/,keywords:"__halt_compiler",starts:{scope:"comment",end:e.MATCH_NOTHING_RE,contains:[{match:/\?>/,scope:"meta",endsParent:!0}]}},f,{scope:"variable.language",match:/\$this\b/},c,J,H,{match:[/const/,/\s/,a],scope:{1:"keyword",3:"variable.constant"}},M,{scope:"function",relevance:0,beginKeywords:"fn function",end:/[;{]/,excludeEnd:!0,illegal:"[$%\\[]",contains:[{beginKeywords:"use"},e.UNDERSCORE_TITLE_MODE,{begin:"=>",endsParent:!0},{scope:"params",begin:"\\(",end:"\\)",excludeBegin:!0,excludeEnd:!0,keywords:j,contains:["self",ge,c,H,e.C_BLOCK_COMMENT_MODE,E,w]}]},{scope:"class",variants:[{beginKeywords:"enum",illegal:/[($"]/},{beginKeywords:"class interface trait",illegal:/[:($"]/}],relevance:0,end:/\{/,excludeEnd:!0,contains:[{beginKeywords:"extends implements"},e.UNDERSCORE_TITLE_MODE]},{beginKeywords:"namespace",relevance:0,end:";",illegal:/[.']/,contains:[e.inherit(e.UNDERSCORE_TITLE_MODE,{scope:"title.class"})]},{beginKeywords:"use",relevance:0,end:";",contains:[{match:/\b(as|const|function)\b/,scope:"keyword"},e.UNDERSCORE_TITLE_MODE]},E,w]}}function O4(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 R4(e){return{name:"Plain text",aliases:["text","txt"],disableAutodetect:!0}}function M4(e){const t=e.regex,n=new RegExp("[\\p{XID_Start}_]\\p{XID_Continue}*","u"),a=["and","as","assert","async","await","break","case","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","match","nonlocal|10","not","or","pass","raise","return","try","while","with","yield"],f={$pattern:/[A-Za-z]\w+|__\w+__/,keyword:a,built_in:["__import__","abs","all","any","ascii","bin","bool","breakpoint","bytearray","bytes","callable","chr","classmethod","compile","complex","delattr","dict","dir","divmod","enumerate","eval","exec","filter","float","format","frozenset","getattr","globals","hasattr","hash","help","hex","id","input","int","isinstance","issubclass","iter","len","list","locals","map","max","memoryview","min","next","object","oct","open","ord","pow","print","property","range","repr","reversed","round","set","setattr","slice","sorted","staticmethod","str","sum","super","tuple","type","vars","zip"],literal:["__debug__","Ellipsis","False","None","NotImplemented","True"],type:["Any","Callable","Coroutine","Dict","List","Literal","Generic","Optional","Sequence","Set","Tuple","Type","Union"]},h={className:"meta",begin:/^(>>>|\.\.\.) /},m={className:"subst",begin:/\{/,end:/\}/,keywords:f,illegal:/#/},b={begin:/\{\{/,relevance:0},g={className:"string",contains:[e.BACKSLASH_ESCAPE],variants:[{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([uU]|[bB]|[rR]|[bB][rR]|[rR][bB])?"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h],relevance:10},{begin:/([fF][rR]|[rR][fF]|[fF])'''/,end:/'''/,contains:[e.BACKSLASH_ESCAPE,h,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"""/,end:/"""/,contains:[e.BACKSLASH_ESCAPE,h,b,m]},{begin:/([uU]|[rR])'/,end:/'/,relevance:10},{begin:/([uU]|[rR])"/,end:/"/,relevance:10},{begin:/([bB]|[bB][rR]|[rR][bB])'/,end:/'/},{begin:/([bB]|[bB][rR]|[rR][bB])"/,end:/"/},{begin:/([fF][rR]|[rR][fF]|[fF])'/,end:/'/,contains:[e.BACKSLASH_ESCAPE,b,m]},{begin:/([fF][rR]|[rR][fF]|[fF])"/,end:/"/,contains:[e.BACKSLASH_ESCAPE,b,m]},e.APOS_STRING_MODE,e.QUOTE_STRING_MODE]},x="[0-9](_?[0-9])*",v=`(\\b(${x}))?\\.(${x})|\\b(${x})\\.`,E=`\\b|${a.join("|")}`,w={className:"number",relevance:0,variants:[{begin:`(\\b(${x})|(${v}))[eE][+-]?(${x})[jJ]?(?=${E})`},{begin:`(${v})[jJ]?`},{begin:`\\b([1-9](_?[0-9])*|0+(_?0)*)[lLjJ]?(?=${E})`},{begin:`\\b0[bB](_?[01])+[lL]?(?=${E})`},{begin:`\\b0[oO](_?[0-7])+[lL]?(?=${E})`},{begin:`\\b0[xX](_?[0-9a-fA-F])+[lL]?(?=${E})`},{begin:`\\b(${x})[jJ](?=${E})`}]},k={className:"comment",begin:t.lookahead(/# type:/),end:/$/,keywords:f,contains:[{begin:/# type:/},{begin:/#/,end:/\b\B/,endsWithParent:!0}]},_={className:"params",variants:[{className:"",begin:/\(\s*\)/,skip:!0},{begin:/\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:["self",h,w,g,e.HASH_COMMENT_MODE]}]};return m.contains=[g,w,h],{name:"Python",aliases:["py","gyp","ipython"],unicodeRegex:!0,keywords:f,illegal:/(<\/|\?)|=>/,contains:[h,w,{scope:"variable.language",match:/\bself\b/},{beginKeywords:"if",relevance:0},{match:/\bor\b/,scope:"keyword"},g,k,e.HASH_COMMENT_MODE,{match:[/\bdef/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[_]},{variants:[{match:[/\bclass/,/\s+/,n,/\s*/,/\(\s*/,n,/\s*\)/]},{match:[/\bclass/,/\s+/,n]}],scope:{1:"keyword",3:"title.class",6:"title.class.inherited"}},{className:"meta",begin:/^[\t ]*@/,end:/(?=#)|$/,contains:[w,_,g]}]}}function j4(e){return{aliases:["pycon"],contains:[{className:"meta.prompt",starts:{end:/ |$/,starts:{end:"$",subLanguage:"python"}},variants:[{begin:/^>>>(?=[ ]|$)/},{begin:/^\.\.\.(?=[ ]|$)/}]}]}}function D4(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 L4(e){const t=e.regex,n="([a-zA-Z_]\\w*[!?=]?|[-+~]@|<<|>>|=~|===?|<=>|[<>]=?|\\*\\*|[-/+%^&*~`|]|\\[\\]=?)",a=t.either(/\b([A-Z]+[a-z0-9]+)+/,/\b([A-Z]+[a-z0-9]+)+[A-Z]+/),s=t.concat(a,/(::\w+)*/),c={"variable.constant":["__FILE__","__LINE__","__ENCODING__"],"variable.language":["self","super"],keyword:["alias","and","begin","BEGIN","break","case","class","defined","do","else","elsif","end","END","ensure","for","if","in","module","next","not","or","redo","require","rescue","retry","return","then","undef","unless","until","when","while","yield",...["include","extend","prepend","public","private","protected","raise","throw"]],built_in:["proc","lambda","attr_accessor","attr_reader","attr_writer","define_method","private_constant","module_function"],literal:["true","false","nil"]},f={className:"doctag",begin:"@[A-Za-z]+"},h={begin:"#<",end:">"},m=[e.COMMENT("#","$",{contains:[f]}),e.COMMENT("^=begin","^=end",{contains:[f],relevance:10}),e.COMMENT("^__END__",e.MATCH_NOTHING_RE)],b={className:"subst",begin:/#\{/,end:/\}/,keywords:c},g={className:"string",contains:[e.BACKSLASH_ESCAPE,b],variants:[{begin:/'/,end:/'/},{begin:/"/,end:/"/},{begin:/`/,end:/`/},{begin:/%[qQwWx]?\(/,end:/\)/},{begin:/%[qQwWx]?\[/,end:/\]/},{begin:/%[qQwWx]?\{/,end:/\}/},{begin:/%[qQwWx]?</,end:/>/},{begin:/%[qQwWx]?\//,end:/\//},{begin:/%[qQwWx]?%/,end:/%/},{begin:/%[qQwWx]?-/,end:/-/},{begin:/%[qQwWx]?\|/,end:/\|/},{begin:/\B\?(\\\d{1,3})/},{begin:/\B\?(\\x[A-Fa-f0-9]{1,2})/},{begin:/\B\?(\\u\{?[A-Fa-f0-9]{1,6}\}?)/},{begin:/\B\?(\\M-\\C-|\\M-\\c|\\c\\M-|\\M-|\\C-\\M-)[\x20-\x7e]/},{begin:/\B\?\\(c|C-)[\x20-\x7e]/},{begin:/\B\?\\?\S/},{begin:t.concat(/<<[-~]?'?/,t.lookahead(/(\w+)(?=\W)[^\n]*\n(?:[^\n]*\n)*?\s*\1\b/)),contains:[e.END_SAME_AS_BEGIN({begin:/(\w+)/,end:/(\w+)/,contains:[e.BACKSLASH_ESCAPE,b]})]}]},x="[1-9](_?[0-9])*|0",v="[0-9](_?[0-9])*",E={className:"number",relevance:0,variants:[{begin:`\\b(${x})(\\.(${v}))?([eE][+-]?(${v})|r)?i?\\b`},{begin:"\\b0[dD][0-9](_?[0-9])*r?i?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*r?i?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*r?i?\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*r?i?\\b"},{begin:"\\b0(_?[0-7])+r?i?\\b"}]},w={variants:[{match:/\(\)/},{className:"params",begin:/\(/,end:/(?=\))/,excludeBegin:!0,endsParent:!0,keywords:c}]},M=[g,{variants:[{match:[/class\s+/,s,/\s+<\s+/,s]},{match:[/\b(class|module)\s+/,s]}],scope:{2:"title.class",4:"title.class.inherited"},keywords:c},{match:[/(include|extend)\s+/,s],scope:{2:"title.class"},keywords:c},{relevance:0,match:[s,/\.new[. (]/],scope:{1:"title.class"}},{relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"},{relevance:0,match:a,scope:"title.class"},{match:[/def/,/\s+/,n],scope:{1:"keyword",3:"title.function"},contains:[w]},{begin:e.IDENT_RE+"::"},{className:"symbol",begin:e.UNDERSCORE_IDENT_RE+"(!|\\?)?:",relevance:0},{className:"symbol",begin:":(?!\\s)",contains:[g,{begin:n}],relevance:0},E,{className:"variable",begin:"(\\$\\W)|((\\$|@@?)(\\w+))(?=[^@$?])(?![A-Za-z])(?![@$?'])"},{className:"params",begin:/\|(?!=)/,end:/\|/,excludeBegin:!0,excludeEnd:!0,relevance:0,keywords:c},{begin:"("+e.RE_STARTERS_RE+"|unless)\\s*",keywords:"unless",contains:[{className:"regexp",contains:[e.BACKSLASH_ESCAPE,b],illegal:/\n/,variants:[{begin:"/",end:"/[a-z]*"},{begin:/%r\{/,end:/\}[a-z]*/},{begin:"%r\\(",end:"\\)[a-z]*"},{begin:"%r!",end:"![a-z]*"},{begin:"%r\\[",end:"\\][a-z]*"}]}].concat(h,m),relevance:0}].concat(h,m);b.contains=M,w.contains=M;const 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 m.unshift(h),{name:"Ruby",aliases:["rb","gemspec","podspec","thor","irb"],keywords:c,illegal:/\/\*/,contains:[e.SHEBANG({binary:"ruby"})].concat(L).concat(m).concat(M)}}function z4(e){const t=e.regex,n=/(r#)?/,a=t.concat(n,e.UNDERSCORE_IDENT_RE),s=t.concat(n,e.IDENT_RE),o={className:"title.function.invoke",relevance:0,begin:t.concat(/\b/,/(?!let|for|while|if|else|match\b)/,s,t.lookahead(/\s*\(/))},c="([ui](8|16|32|64|128|size)|f(32|64))?",f=["abstract","as","async","await","become","box","break","const","continue","crate","do","dyn","else","enum","extern","false","final","fn","for","if","impl","in","let","loop","macro","match","mod","move","mut","override","priv","pub","ref","return","self","Self","static","struct","super","trait","true","try","type","typeof","union","unsafe","unsized","use","virtual","where","while","yield"],h=["true","false","Some","None","Ok","Err"],m=["drop ","Copy","Send","Sized","Sync","Drop","Fn","FnMut","FnOnce","ToOwned","Clone","Debug","PartialEq","PartialOrd","Eq","Ord","AsRef","AsMut","Into","From","Default","Iterator","Extend","IntoIterator","DoubleEndedIterator","ExactSizeIterator","SliceConcatExt","ToString","assert!","assert_eq!","bitflags!","bytes!","cfg!","col!","concat!","concat_idents!","debug_assert!","debug_assert_eq!","env!","eprintln!","panic!","file!","format!","format_args!","include_bytes!","include_str!","line!","local_data_key!","module_path!","option_env!","print!","println!","select!","stringify!","try!","unimplemented!","unreachable!","vec!","write!","writeln!","macro_rules!","assert_ne!","debug_assert_ne!"],b=["i8","i16","i32","i64","i128","isize","u8","u16","u32","u64","u128","usize","f32","f64","str","char","bool","Box","Option","Result","String","Vec"];return{name:"Rust",aliases:["rs"],keywords:{$pattern:e.IDENT_RE+"!?",type:b,keyword:f,literal:h,built_in:m},illegal:"</",contains:[e.C_LINE_COMMENT_MODE,e.COMMENT("/\\*","\\*/",{contains:["self"]}),e.inherit(e.QUOTE_STRING_MODE,{begin:/b?"/,illegal:null}),{className:"symbol",begin:/'[a-zA-Z_][a-zA-Z0-9_]*(?!')/},{scope:"string",variants:[{begin:/b?r(#*)"(.|\n)*?"\1(?!#)/},{begin:/b?'/,end:/'/,contains:[{scope:"char.escape",match:/\\('|\w|x\w{2}|u\w{4}|U\w{8})/}]}]},{className:"number",variants:[{begin:"\\b0b([01_]+)"+c},{begin:"\\b0o([0-7_]+)"+c},{begin:"\\b0x([A-Fa-f0-9_]+)"+c},{begin:"\\b(\\d[\\d_]*(\\.[0-9_]+)?([eE][+-]?[0-9_]+)?)"+c}],relevance:0},{begin:[/fn/,/\s+/,a],className:{1:"keyword",3:"title.function"}},{className:"meta",begin:"#!?\\[",end:"\\]",contains:[{className:"string",begin:/"/,end:/"/,contains:[e.BACKSLASH_ESCAPE]}]},{begin:[/let/,/\s+/,/(?:mut\s+)?/,a],className:{1:"keyword",3:"keyword",4:"variable"}},{begin:[/for/,/\s+/,a,/\s+/,/in/],className:{1:"keyword",3:"variable",5:"keyword"}},{begin:[/type/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:[/(?:trait|enum|struct|union|impl|for)/,/\s+/,a],className:{1:"keyword",3:"title.class"}},{begin:e.IDENT_RE+"::",keywords:{keyword:"Self",built_in:m,type:b}},{className:"punctuation",begin:"->"},o]}}const I4=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_-]*/}}),B4=["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"],U4=["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"],$4=[...B4,...U4],F4=["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(),P4=["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(),q4=["after","backdrop","before","cue","cue-region","first-letter","first-line","grammar-error","marker","part","placeholder","selection","slotted","spelling-error"].sort().reverse(),H4=["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 K4(e){const t=I4(e),n=q4,a=P4,s="@[a-z-]+",o="and or not only",f={className:"variable",begin:"(\\$"+"[a-zA-Z-][a-zA-Z0-9_-]*"+")\\b",relevance:0};return{name:"SCSS",case_insensitive:!0,illegal:"[=/|']",contains:[e.C_LINE_COMMENT_MODE,e.C_BLOCK_COMMENT_MODE,t.CSS_NUMBER_MODE,{className:"selector-id",begin:"#[A-Za-z0-9_-]+",relevance:0},{className:"selector-class",begin:"\\.[A-Za-z0-9_-]+",relevance:0},t.ATTRIBUTE_SELECTOR_MODE,{className:"selector-tag",begin:"\\b("+$4.join("|")+")\\b",relevance:0},{className:"selector-pseudo",begin:":("+a.join("|")+")"},{className:"selector-pseudo",begin:":(:)?("+n.join("|")+")"},f,{begin:/\(/,end:/\)/,contains:[t.CSS_NUMBER_MODE]},t.CSS_VARIABLE,{className:"attribute",begin:"\\b("+H4.join("|")+")\\b"},{begin:"\\b(whitespace|wait|w-resize|visible|vertical-text|vertical-ideographic|uppercase|upper-roman|upper-alpha|underline|transparent|top|thin|thick|text|text-top|text-bottom|tb-rl|table-header-group|table-footer-group|sw-resize|super|strict|static|square|solid|small-caps|separate|se-resize|scroll|s-resize|rtl|row-resize|ridge|right|repeat|repeat-y|repeat-x|relative|progress|pointer|overline|outside|outset|oblique|nowrap|not-allowed|normal|none|nw-resize|no-repeat|no-drop|newspaper|ne-resize|n-resize|move|middle|medium|ltr|lr-tb|lowercase|lower-roman|lower-alpha|loose|list-item|line|line-through|line-edge|lighter|left|keep-all|justify|italic|inter-word|inter-ideograph|inside|inset|inline|inline-block|inherit|inactive|ideograph-space|ideograph-parenthesis|ideograph-numeric|ideograph-alpha|horizontal|hidden|help|hand|groove|fixed|ellipsis|e-resize|double|dotted|distribute|distribute-space|distribute-letter|distribute-all-lines|disc|disabled|default|decimal|dashed|crosshair|collapse|col-resize|circle|char|center|capitalize|break-word|break-all|bottom|both|bolder|bold|block|bidi-override|below|baseline|auto|always|all-scroll|absolute|table|table-cell)\\b"},{begin:/:/,end:/[;}{]/,relevance:0,contains:[t.BLOCK_COMMENT,f,t.HEXCOLOR,t.CSS_NUMBER_MODE,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.IMPORTANT,t.FUNCTION_DISPATCH]},{begin:"@(page|font-face)",keywords:{$pattern:s,keyword:"@page @font-face"}},{begin:"@",end:"[{;]",returnBegin:!0,keywords:{$pattern:/[a-z-]+/,keyword:o,attribute:F4.join(" ")},contains:[{begin:s,className:"keyword"},{begin:/[a-z-]+(?=:)/,className:"attribute"},f,e.QUOTE_STRING_MODE,e.APOS_STRING_MODE,t.HEXCOLOR,t.CSS_NUMBER_MODE]},t.FUNCTION_DISPATCH]}}function G4(e){return{name:"Shell Session",aliases:["console","shellsession"],contains:[{className:"meta.prompt",begin:/^\s{0,3}[/~\w\d[\]()@-]*[>%$#][ ]?/,starts:{end:/[^\\](?=\s*$)/,subLanguage:"bash"}}]}}function Q4(e){const t=e.regex,n=e.COMMENT("--","$"),a={scope:"string",variants:[{begin:/'/,end:/'/,contains:[{match:/''/}]}]},s={begin:/"/,end:/"/,contains:[{match:/""/}]},o=["true","false","unknown"],c=["double precision","large object","with timezone","without timezone"],f=["bigint","binary","blob","boolean","char","character","clob","date","dec","decfloat","decimal","float","int","integer","interval","nchar","nclob","national","numeric","real","row","smallint","time","timestamp","varchar","varying","varbinary"],h=["add","asc","collation","desc","final","first","last","view"],m=["abs","acos","all","allocate","alter","and","any","are","array","array_agg","array_max_cardinality","as","asensitive","asin","asymmetric","at","atan","atomic","authorization","avg","begin","begin_frame","begin_partition","between","bigint","binary","blob","boolean","both","by","call","called","cardinality","cascaded","case","cast","ceil","ceiling","char","char_length","character","character_length","check","classifier","clob","close","coalesce","collate","collect","column","commit","condition","connect","constraint","contains","convert","copy","corr","corresponding","cos","cosh","count","covar_pop","covar_samp","create","cross","cube","cume_dist","current","current_catalog","current_date","current_default_transform_group","current_path","current_role","current_row","current_schema","current_time","current_timestamp","current_path","current_role","current_transform_group_for_type","current_user","cursor","cycle","date","day","deallocate","dec","decimal","decfloat","declare","default","define","delete","dense_rank","deref","describe","deterministic","disconnect","distinct","double","drop","dynamic","each","element","else","empty","end","end_frame","end_partition","end-exec","equals","escape","every","except","exec","execute","exists","exp","external","extract","false","fetch","filter","first_value","float","floor","for","foreign","frame_row","free","from","full","function","fusion","get","global","grant","group","grouping","groups","having","hold","hour","identity","in","indicator","initial","inner","inout","insensitive","insert","int","integer","intersect","intersection","interval","into","is","join","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","language","large","last_value","lateral","lead","leading","left","like","like_regex","listagg","ln","local","localtime","localtimestamp","log","log10","lower","match","match_number","match_recognize","matches","max","member","merge","method","min","minute","mod","modifies","module","month","multiset","national","natural","nchar","nclob","new","no","none","normalize","not","nth_value","ntile","null","nullif","numeric","octet_length","occurrences_regex","of","offset","old","omit","on","one","only","open","or","order","out","outer","over","overlaps","overlay","parameter","partition","pattern","per","percent","percent_rank","percentile_cont","percentile_disc","period","portion","position","position_regex","power","precedes","precision","prepare","primary","procedure","ptf","range","rank","reads","real","recursive","ref","references","referencing","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","release","result","return","returns","revoke","right","rollback","rollup","row","row_number","rows","running","savepoint","scope","scroll","search","second","seek","select","sensitive","session_user","set","show","similar","sin","sinh","skip","smallint","some","specific","specifictype","sql","sqlexception","sqlstate","sqlwarning","sqrt","start","static","stddev_pop","stddev_samp","submultiset","subset","substring","substring_regex","succeeds","sum","symmetric","system","system_time","system_user","table","tablesample","tan","tanh","then","time","timestamp","timezone_hour","timezone_minute","to","trailing","translate","translate_regex","translation","treat","trigger","trim","trim_array","true","truncate","uescape","union","unique","unknown","unnest","update","upper","user","using","value","values","value_of","var_pop","var_samp","varbinary","varchar","varying","versioning","when","whenever","where","width_bucket","window","with","within","without","year"],b=["abs","acos","array_agg","asin","atan","avg","cast","ceil","ceiling","coalesce","corr","cos","cosh","count","covar_pop","covar_samp","cume_dist","dense_rank","deref","element","exp","extract","first_value","floor","json_array","json_arrayagg","json_exists","json_object","json_objectagg","json_query","json_table","json_table_primitive","json_value","lag","last_value","lead","listagg","ln","log","log10","lower","max","min","mod","nth_value","ntile","nullif","percent_rank","percentile_cont","percentile_disc","position","position_regex","power","rank","regr_avgx","regr_avgy","regr_count","regr_intercept","regr_r2","regr_slope","regr_sxx","regr_sxy","regr_syy","row_number","sin","sinh","sqrt","stddev_pop","stddev_samp","substring","substring_regex","sum","tan","tanh","translate","translate_regex","treat","trim","trim_array","unnest","upper","value_of","var_pop","var_samp","width_bucket"],g=["current_catalog","current_date","current_default_transform_group","current_path","current_role","current_schema","current_transform_group_for_type","current_user","session_user","system_time","system_user","current_time","localtime","current_timestamp","localtimestamp"],x=["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"],v=b,E=[...m,...h].filter($=>!b.includes($)),w={scope:"variable",match:/@[a-z0-9][a-z0-9_]*/},k={scope:"operator",match:/[-+*/=%^~]|&&?|\|\|?|!=?|<(?:=>?|<|>)?|>[>=]?/,relevance:0},_={match:t.concat(/\b/,t.either(...v),/\s*\(/),relevance:0,keywords:{built_in:v}};function A($){return t.concat(/\b/,t.either(...$.map(M=>M.replace(/\s+/,"\\s+"))),/\b/)}const T={scope:"keyword",match:A(x),relevance:0};function j($,{exceptions:M,when:F}={}){const H=F;return M=M||[],$.map(ee=>ee.match(/\|\d+$/)||M.includes(ee)?ee:H(ee)?`${ee}|0`:ee)}return{name:"SQL",case_insensitive:!0,illegal:/[{}]|<\//,keywords:{$pattern:/\b[\w\.]+/,keyword:j(E,{when:$=>$.length<3}),literal:o,type:f,built_in:g},contains:[{scope:"type",match:A(c)},T,_,w,a,s,e.C_NUMBER_MODE,e.C_BLOCK_COMMENT_MODE,n,k]}}function Aw(e){return e?typeof e=="string"?e:e.source:null}function Vo(e){return yt("(?=",e,")")}function yt(...e){return e.map(n=>Aw(n)).join("")}function Y4(e){const t=e[e.length-1];return typeof t=="object"&&t.constructor===Object?(e.splice(e.length-1,1),t):{}}function _n(...e){return"("+(Y4(e).capture?"":"?:")+e.map(a=>Aw(a)).join("|")+")"}const Ig=e=>yt(/\b/,e,/\w$/.test(e)?/\b/:/\B/),V4=["Protocol","Type"].map(Ig),i1=["init","self"].map(Ig),W4=["Any","Self"],qm=["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"],a1=["false","nil","true"],X4=["assignment","associativity","higherThan","left","lowerThan","none","right"],Z4=["#colorLiteral","#column","#dsohandle","#else","#elseif","#endif","#error","#file","#fileID","#fileLiteral","#filePath","#function","#if","#imageLiteral","#keyPath","#line","#selector","#sourceLocation","#warning"],r1=["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"],Ow=_n(/[/=\-+!*%<>&|^~?]/,/[\u00A1-\u00A7]/,/[\u00A9\u00AB]/,/[\u00AC\u00AE]/,/[\u00B0\u00B1]/,/[\u00B6\u00BB\u00BF\u00D7\u00F7]/,/[\u2016-\u2017]/,/[\u2020-\u2027]/,/[\u2030-\u203E]/,/[\u2041-\u2053]/,/[\u2055-\u205E]/,/[\u2190-\u23FF]/,/[\u2500-\u2775]/,/[\u2794-\u2BFF]/,/[\u2E00-\u2E7F]/,/[\u3001-\u3003]/,/[\u3008-\u3020]/,/[\u3030]/),Rw=_n(Ow,/[\u0300-\u036F]/,/[\u1DC0-\u1DFF]/,/[\u20D0-\u20FF]/,/[\uFE00-\uFE0F]/,/[\uFE20-\uFE2F]/),Hm=yt(Ow,Rw,"*"),Mw=_n(/[a-zA-Z_]/,/[\u00A8\u00AA\u00AD\u00AF\u00B2-\u00B5\u00B7-\u00BA]/,/[\u00BC-\u00BE\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u00FF]/,/[\u0100-\u02FF\u0370-\u167F\u1681-\u180D\u180F-\u1DBF]/,/[\u1E00-\u1FFF]/,/[\u200B-\u200D\u202A-\u202E\u203F-\u2040\u2054\u2060-\u206F]/,/[\u2070-\u20CF\u2100-\u218F\u2460-\u24FF\u2776-\u2793]/,/[\u2C00-\u2DFF\u2E80-\u2FFF]/,/[\u3004-\u3007\u3021-\u302F\u3031-\u303F\u3040-\uD7FF]/,/[\uF900-\uFD3D\uFD40-\uFDCF\uFDF0-\uFE1F\uFE30-\uFE44]/,/[\uFE47-\uFEFE\uFF00-\uFFFD]/),Rf=_n(Mw,/\d/,/[\u0300-\u036F\u1DC0-\u1DFF\u20D0-\u20FF\uFE20-\uFE2F]/),Gi=yt(Mw,Rf,"*"),cf=yt(/[A-Z]/,Rf,"*"),J4=["attached","autoclosure",yt(/convention\(/,_n("swift","block","c"),/\)/),"discardableResult","dynamicCallable","dynamicMemberLookup","escaping","freestanding","frozen","GKInspectable","IBAction","IBDesignable","IBInspectable","IBOutlet","IBSegueAction","inlinable","main","nonobjc","NSApplicationMain","NSCopying","NSManaged",yt(/objc\(/,Gi,/\)/),"objc","objcMembers","propertyWrapper","requires_stored_property_inits","resultBuilder","Sendable","testable","UIApplicationMain","unchecked","unknown","usableFromInline","warn_unqualified_access"],eB=["iOS","iOSApplicationExtension","macOS","macOSApplicationExtension","macCatalyst","macCatalystApplicationExtension","watchOS","watchOSApplicationExtension","tvOS","tvOSApplicationExtension","swift"];function tB(e){const t={match:/\s+/,relevance:0},n=e.COMMENT("/\\*","\\*/",{contains:["self"]}),a=[e.C_LINE_COMMENT_MODE,n],s={match:[/\./,_n(...V4,...i1)],className:{2:"keyword"}},o={match:yt(/\./,_n(...qm)),relevance:0},c=qm.filter(Je=>typeof Je=="string").concat(["_|0"]),f=qm.filter(Je=>typeof Je!="string").concat(W4).map(Ig),h={variants:[{className:"keyword",match:_n(...f,...i1)}]},m={$pattern:_n(/\b\w+/,/#\w+/),keyword:c.concat(Z4),literal:a1},b=[s,o,h],g={match:yt(/\./,_n(...r1)),relevance:0},x={className:"built_in",match:yt(/\b/,_n(...r1),/(?=\()/)},v=[g,x],E={match:/->/,relevance:0},w={className:"operator",relevance:0,variants:[{match:Hm},{match:`\\.(\\.|${Rw})+`}]},k=[E,w],_="([0-9]_*)+",A="([0-9a-fA-F]_*)+",T={className:"number",relevance:0,variants:[{match:`\\b(${_})(\\.(${_}))?([eE][+-]?(${_}))?\\b`},{match:`\\b0x(${A})(\\.(${A}))?([pP][+-]?(${_}))?\\b`},{match:/\b0o([0-7]_*)+\b/},{match:/\b0b([01]_*)+\b/}]},j=(Je="")=>({className:"subst",variants:[{match:yt(/\\/,Je,/[0\\tnr"']/)},{match:yt(/\\/,Je,/u\{[0-9a-fA-F]{1,8}\}/)}]}),$=(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:[j(Je),$(Je),M(Je)]}),H=(Je="")=>({begin:yt(Je,/"/),end:yt(/"/,Je),contains:[j(Je),M(Je)]}),ee={className:"string",variants:[F(),F("#"),F("##"),F("###"),H(),H("#"),H("##"),H("###")]},L=[e.BACKSLASH_ESCAPE,{begin:/\[/,end:/\]/,relevance:0,contains:[e.BACKSLASH_ESCAPE]}],J={begin:/\/[^\s](?=[^/\n]*\/)/,end:/\//,contains:L},ae=Je=>{const Ni=yt(Je,/\//),oi=yt(/\//,Je);return{begin:Ni,end:oi,contains:[...L,{scope:"comment",begin:`#(?!.*${oi})`,end:/$/}]}},ge={scope:"regexp",variants:[ae("###"),ae("##"),ae("#"),J]},fe={match:yt(/`/,Gi,/`/)},te={className:"variable",match:/\$\d+/},q={className:"variable",match:`\\$${Rf}+`},ce=[fe,te,q],V={match:/(@|#(un)?)available/,scope:"keyword",starts:{contains:[{begin:/\(/,end:/\)/,keywords:eB,contains:[...k,T,ee]}]}},be={scope:"keyword",match:yt(/@/,_n(...J4),Vo(_n(/\(/,/\s+/)))},R={scope:"meta",match:yt(/@/,Gi)},D=[V,be,R],X={match:Vo(/\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)/,Rf,"+")},{className:"type",match:cf,relevance:0},{match:/[?!]+/,relevance:0},{match:/\.\.\./,relevance:0},{match:yt(/\s+&\s+/,Vo(cf)),relevance:0}]},C={begin:/</,end:/>/,keywords:m,contains:[...a,...b,...D,E,X]};X.contains.push(C);const G={match:yt(Gi,/\s*:/),keywords:"_|0",relevance:0},de={begin:/\(/,end:/\)/,relevance:0,keywords:m,contains:["self",G,...a,ge,...b,...v,...k,T,ee,...ce,...D,X]},re={begin:/</,end:/>/,keywords:"repeat each",contains:[...a,X]},K={begin:_n(Vo(yt(Gi,/\s*:/)),Vo(yt(Gi,/\s+/,Gi,/\s*:/))),end:/:/,relevance:0,contains:[{className:"keyword",match:/\b_\b/},{className:"params",match:Gi}]},ue={begin:/\(/,end:/\)/,keywords:m,contains:[K,...a,...b,...k,T,ee,...D,X,de],endsParent:!0,illegal:/["']/},Se={match:[/(func|macro)/,/\s+/,_n(fe.match,Gi,Hm)],className:{1:"keyword",3:"title.function"},contains:[re,ue,t],illegal:[/\[/,/%/]},Ze={match:[/\b(?:subscript|init[?!]?)/,/\s*(?=[<(])/],className:{1:"keyword"},contains:[re,ue,t],illegal:/\[|%/},it={match:[/operator/,/\s+/,Hm],className:{1:"keyword",3:"title"}},Kn={begin:[/precedencegroup/,/\s+/,cf],className:{1:"keyword",3:"title"},contains:[X],keywords:[...X4,...a1],end:/}/},Ra={match:[/class\b/,/\s+/,/func\b/,/\s+/,/\b[A-Za-z_][A-Za-z0-9_]*\b/],scope:{1:"keyword",3:"keyword",5:"title.function"}},Gn={match:[/class\b/,/\s+/,/var\b/],scope:{1:"keyword",3:"keyword"}},Bi={begin:[/(struct|protocol|class|extension|enum|actor)/,/\s+/,Gi,/\s*/],beginScope:{1:"keyword",3:"title.class"},keywords:m,contains:[re,...b,{begin:/:/,end:/\{/,keywords:m,contains:[{scope:"title.class.inherited",match:cf},...b],relevance:0}]};for(const Je of ee.variants){const Ni=Je.contains.find(Ui=>Ui.label==="interpol");Ni.keywords=m;const oi=[...b,...v,...k,T,ee,...ce];Ni.contains=[...oi,{begin:/\(/,end:/\)/,contains:["self",...oi]}]}return{name:"Swift",keywords:m,contains:[...a,Se,Ze,Ra,Gn,Bi,it,Kn,{beginKeywords:"import",end:/$/,contains:[...a],relevance:0},ge,...b,...v,...k,T,ee,...ce,...D,X,de]}}const Mf="[A-Za-z$_][0-9A-Za-z$_]*",jw=["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"],Dw=["true","false","null","undefined","NaN","Infinity"],Lw=["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"],zw=["Error","EvalError","InternalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Iw=["setInterval","setTimeout","clearInterval","clearTimeout","require","exports","eval","isFinite","isNaN","parseFloat","parseInt","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","unescape"],Bw=["arguments","this","super","console","window","document","localStorage","sessionStorage","module","global"],Uw=[].concat(Iw,Lw,zw);function nB(e){const t=e.regex,n=(V,{after:be})=>{const R="</"+V[0].slice(1);return V.input.indexOf(R,be)!==-1},a=Mf,s={begin:"<>",end:"</>"},o=/<[A-Za-z0-9\\._:-]+\s*\/>/,c={begin:/<[A-Za-z0-9\\._:-]+/,end:/\/[A-Za-z0-9\\._:-]+>|\/>/,isTrulyOpeningTag:(V,be)=>{const R=V[0].length+V.index,D=V.input[R];if(D==="<"||D===","){be.ignoreMatch();return}D===">"&&(n(V,{after:R})||be.ignoreMatch());let X;const C=V.input.substring(R);if(X=C.match(/^\s*=/)){be.ignoreMatch();return}if((X=C.match(/^\s+extends\s+/))&&X.index===0){be.ignoreMatch();return}}},f={$pattern:Mf,keyword:jw,literal:Dw,built_in:Uw,"variable.language":Bw},h="[0-9](_?[0-9])*",m=`\\.(${h})`,b="0|[1-9](_?[0-9])*|0[0-7]*[89][0-9]*",g={className:"number",variants:[{begin:`(\\b(${b})((${m})|\\.)?|(${m}))[eE][+-]?(${h})\\b`},{begin:`\\b(${b})\\b((${m})\\b|\\.)?|(${m})\\b`},{begin:"\\b(0|[1-9](_?[0-9])*)n\\b"},{begin:"\\b0[xX][0-9a-fA-F](_?[0-9a-fA-F])*n?\\b"},{begin:"\\b0[bB][0-1](_?[0-1])*n?\\b"},{begin:"\\b0[oO][0-7](_?[0-7])*n?\\b"},{begin:"\\b0[0-7]+n?\\b"}],relevance:0},x={className:"subst",begin:"\\$\\{",end:"\\}",keywords:f,contains:[]},v={begin:".?html`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"xml"}},E={begin:".?css`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"css"}},w={begin:".?gql`",end:"",starts:{end:"`",returnEnd:!1,contains:[e.BACKSLASH_ESCAPE,x],subLanguage:"graphql"}},k={className:"string",begin:"`",end:"`",contains:[e.BACKSLASH_ESCAPE,x]},A={className:"comment",variants:[e.COMMENT(/\/\*\*(?!\/)/,"\\*/",{relevance:0,contains:[{begin:"(?=@[A-Za-z]+)",relevance:0,contains:[{className:"doctag",begin:"@[A-Za-z]+"},{className:"type",begin:"\\{",end:"\\}",excludeEnd:!0,excludeBegin:!0,relevance:0},{className:"variable",begin:a+"(?=\\s*(-)|$)",endsParent:!0,relevance:0},{begin:/(?=[^\n])\s/,relevance:0}]}]}),e.C_BLOCK_COMMENT_MODE,e.C_LINE_COMMENT_MODE]},T=[e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,k,{match:/\$\d+/},g];x.contains=T.concat({begin:/\{/,end:/\}/,keywords:f,contains:["self"].concat(T)});const j=[].concat(A,x.contains),$=j.concat([{begin:/(\s*)\(/,end:/\)/,keywords:f,contains:["self"].concat(j)}]),M={className:"params",begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$},F={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"}}]},H={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:{_:[...Lw,...zw]}},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:/%/},J={relevance:0,match:/\b[A-Z][A-Z_0-9]+\b/,className:"variable.constant"};function ae(V){return t.concat("(?!",V.join("|"),")")}const ge={match:t.concat(/\b/,ae([...Iw,"super","import"].map(V=>`${V}\\s*\\(`)),a,t.lookahead(/\s*\(/)),className:"title.function",relevance:0},fe={begin:t.concat(/\./,t.lookahead(t.concat(a,/(?![0-9A-Za-z$_(])/))),end:a,excludeBegin:!0,keywords:"prototype",className:"property",relevance:0},te={match:[/get|set/,/\s+/,a,/(?=\()/],className:{1:"keyword",3:"title.function"},contains:[{begin:/\(\)/},M]},q="(\\([^()]*(\\([^()]*(\\([^()]*\\)[^()]*)*\\)[^()]*)*\\)|"+e.UNDERSCORE_IDENT_RE+")\\s*=>",ce={match:[/const|var|let/,/\s+/,a,/\s*/,/=\s*/,/(async\s*)?/,t.lookahead(q)],keywords:"async",className:{1:"keyword",3:"title.function"},contains:[M]};return{name:"JavaScript",aliases:["js","jsx","mjs","cjs"],keywords:f,exports:{PARAMS_CONTAINS:$,CLASS_REFERENCE:H},illegal:/#(?![$_A-z])/,contains:[e.SHEBANG({label:"shebang",binary:"node",relevance:5}),ee,e.APOS_STRING_MODE,e.QUOTE_STRING_MODE,v,E,w,k,A,{match:/\$\d+/},g,H,{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:[A,e.REGEXP_MODE,{className:"function",begin:q,returnBegin:!0,end:"\\s*=>",contains:[{className:"params",variants:[{begin:e.UNDERSCORE_IDENT_RE,relevance:0},{className:null,begin:/\(\s*\)/,skip:!0},{begin:/(\s*)\(/,end:/\)/,excludeBegin:!0,excludeEnd:!0,keywords:f,contains:$}]}]},{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},fe,{match:"\\$"+a,relevance:0},{match:[/\bconstructor(?=\s*\()/],className:{1:"title.function"},contains:[M]},ge,J,F,te,{match:/\$[(.]/}]}}function iB(e){const t=e.regex,n=nB(e),a=Mf,s=["any","void","number","boolean","string","object","never","symbol","bigint","unknown"],o={begin:[/namespace/,/\s+/,e.IDENT_RE],beginScope:{1:"keyword",3:"title.class"}},c={beginKeywords:"interface",end:/\{/,excludeEnd:!0,keywords:{keyword:"interface extends",built_in:s},contains:[n.exports.CLASS_REFERENCE]},f={className:"meta",relevance:10,begin:/^\s*['"]use strict['"]/},h=["type","interface","public","private","protected","implements","declare","abstract","readonly","enum","override","satisfies"],m={$pattern:Mf,keyword:jw.concat(h),literal:Dw,built_in:Uw.concat(s),"variable.language":Bw},b={className:"meta",begin:"@"+a},g=(w,k,_)=>{const A=w.contains.findIndex(T=>T.label===k);if(A===-1)throw new Error("can not find mode to replace");w.contains.splice(A,1,_)};Object.assign(n.keywords,m),n.exports.PARAMS_CONTAINS.push(b);const x=n.contains.find(w=>w.scope==="attr"),v=Object.assign({},x,{match:t.concat(a,t.lookahead(/\s*\?:/))});n.exports.PARAMS_CONTAINS.push([n.exports.CLASS_REFERENCE,x,v]),n.contains=n.contains.concat([b,o,c,v]),g(n,"shebang",e.SHEBANG()),g(n,"use_strict",f);const E=n.contains.find(w=>w.label==="func.def");return E.relevance=0,Object.assign(n,{name:"TypeScript",aliases:["ts","tsx","mts","cts"]}),n}function aB(e){const t=e.regex,n={className:"string",begin:/"(""|[^/n])"C\b/},a={className:"string",begin:/"/,end:/"/,illegal:/\n/,contains:[{begin:/""/}]},s=/\d{1,2}\/\d{1,2}\/\d{4}/,o=/\d{4}-\d{1,2}-\d{1,2}/,c=/(\d|1[012])(:\d+){0,2} *(AM|PM)/,f=/\d{1,2}(:\d{1,2}){1,2}/,h={className:"literal",variants:[{begin:t.concat(/# */,t.either(o,s),/ *#/)},{begin:t.concat(/# */,f,/ *#/)},{begin:t.concat(/# */,c,/ *#/)},{begin:t.concat(/# */,t.either(o,s),/ +/,t.either(c,f),/ *#/)}]},m={className:"number",relevance:0,variants:[{begin:/\b\d[\d_]*((\.[\d_]+(E[+-]?[\d_]+)?)|(E[+-]?[\d_]+))[RFD@!#]?/},{begin:/\b\d[\d_]*((U?[SIL])|[%&])?/},{begin:/&H[\dA-F_]+((U?[SIL])|[%&])?/},{begin:/&O[0-7_]+((U?[SIL])|[%&])?/},{begin:/&B[01_]+((U?[SIL])|[%&])?/}]},b={className:"label",begin:/^\w+:/},g=e.COMMENT(/'''/,/$/,{contains:[{className:"doctag",begin:/<\/?/,end:/>/}]}),x=e.COMMENT(null,/$/,{variants:[{begin:/'/},{begin:/([\t ]|^)REM(?=\s)/}]});return{name:"Visual Basic .NET",aliases:["vb"],case_insensitive:!0,classNameAliases:{label:"symbol"},keywords:{keyword:"addhandler alias aggregate ansi as async assembly auto binary by byref byval call case catch class compare const continue custom declare default delegate dim distinct do each equals else elseif end enum erase error event exit explicit finally for friend from function get global goto group handles if implements imports in inherits interface into iterator join key let lib loop me mid module mustinherit mustoverride mybase myclass namespace narrowing new next notinheritable notoverridable of off on operator option optional order overloads overridable overrides paramarray partial preserve private property protected public raiseevent readonly redim removehandler resume return select set shadows shared skip static step stop structure strict sub synclock take text then throw to try unicode until using when where while widening with withevents writeonly yield",built_in:"addressof and andalso await directcast gettype getxmlnamespace is isfalse isnot istrue like mod nameof new not or orelse trycast typeof xor cbool cbyte cchar cdate cdbl cdec cint clng cobj csbyte cshort csng cstr cuint culng cushort",type:"boolean byte char date decimal double integer long object sbyte short single string uinteger ulong ushort",literal:"true false nothing"},illegal:"//|\\{|\\}|endif|gosub|variant|wend|^\\$ ",contains:[n,a,h,m,b,g,x,{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:[x]}]}}function rB(e){e.regex;const t=e.COMMENT(/\(;/,/;\)/);t.contains.push("self");const n=e.COMMENT(/;;/,/$/),a=["anyfunc","block","br","br_if","br_table","call","call_indirect","data","drop","elem","else","end","export","func","global.get","global.set","local.get","local.set","local.tee","get_global","get_local","global","if","import","local","loop","memory","memory.grow","memory.size","module","mut","nop","offset","param","result","return","select","set_global","set_local","start","table","tee_local","then","type","unreachable"],s={begin:[/(?:func|call|call_indirect)/,/\s+/,/\$[^\s)]+/],className:{1:"keyword",3:"title.function"}},o={className:"variable",begin:/\$[\w_]+/},c={match:/(\((?!;)|\))+/,className:"punctuation",relevance:0},f={className:"number",relevance:0,match:/[+-]?\b(?:\d(?:_?\d)*(?:\.\d(?:_?\d)*)?(?:[eE][+-]?\d(?:_?\d)*)?|0x[\da-fA-F](?:_?[\da-fA-F])*(?:\.[\da-fA-F](?:_?[\da-fA-D])*)?(?:[pP][+-]?\d(?:_?\d)*)?)\b|\binf\b|\bnan(?::0x[\da-fA-F](?:_?[\da-fA-D])*)?\b/},h={match:/(i32|i64|f32|f64)(?!\.)/,className:"type"},m={className:"keyword",match:/\b(f32|f64|i32|i64)(?:\.(?:abs|add|and|ceil|clz|const|convert_[su]\/i(?:32|64)|copysign|ctz|demote\/f64|div(?:_[su])?|eqz?|extend_[su]\/i32|floor|ge(?:_[su])?|gt(?:_[su])?|le(?:_[su])?|load(?:(?:8|16|32)_[su])?|lt(?:_[su])?|max|min|mul|nearest|neg?|or|popcnt|promote\/f32|reinterpret\/[fi](?:32|64)|rem_[su]|rot[lr]|shl|shr_[su]|store(?:8|16|32)?|sqrt|sub|trunc(?:_[su]\/f(?:32|64))?|wrap\/i64|xor))\b/};return{name:"WebAssembly",keywords:{$pattern:/[\w.]+/,keyword:a},contains:[n,t,{match:[/(?:offset|align)/,/\s*/,/=/],className:{1:"keyword",3:"operator"}},o,c,s,e.QUOTE_STRING_MODE,h,m,f]}}function sB(e){const t=e.regex,n=t.concat(/[\p{L}_]/u,t.optional(/[\p{L}0-9_.-]*:/u),/[\p{L}0-9_.-]*/u),a=/[\p{L}0-9._:-]+/u,s={className:"symbol",begin:/&[a-z]+;|&#[0-9]+;|&#x[a-f0-9]+;/},o={begin:/\s/,contains:[{className:"keyword",begin:/#?[a-z_][a-z1-9_-]+/,illegal:/\n/}]},c=e.inherit(o,{begin:/\(/,end:/\)/}),f=e.inherit(e.APOS_STRING_MODE,{className:"string"}),h=e.inherit(e.QUOTE_STRING_MODE,{className:"string"}),m={endsWithParent:!0,illegal:/</,relevance:0,contains:[{className:"attr",begin:a,relevance:0},{begin:/=\s*/,relevance:0,contains:[{className:"string",endsParent:!0,variants:[{begin:/"/,end:/"/,contains:[s]},{begin:/'/,end:/'/,contains:[s]},{begin:/[^\s"'=<>`]+/}]}]}]};return{name:"HTML, XML",aliases:["html","xhtml","rss","atom","xjb","xsd","xsl","plist","wsf","svg"],case_insensitive:!0,unicodeRegex:!0,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,relevance:10,contains:[o,h,f,c,{begin:/\[/,end:/\]/,contains:[{className:"meta",begin:/<![a-z]/,end:/>/,contains:[o,c,h,f]}]}]},e.COMMENT(/<!--/,/-->/,{relevance:10}),{begin:/<!\[CDATA\[/,end:/\]\]>/,relevance:10},s,{className:"meta",end:/\?>/,variants:[{begin:/<\?xml/,relevance:10,contains:[h]},{begin:/<\?[a-z][a-z0-9]+/}]},{className:"tag",begin:/<style(?=\s|>)/,end:/>/,keywords:{name:"style"},contains:[m],starts:{end:/<\/style>/,returnEnd:!0,subLanguage:["css","xml"]}},{className:"tag",begin:/<script(?=\s|>)/,end:/>/,keywords:{name:"script"},contains:[m],starts:{end:/<\/script>/,returnEnd:!0,subLanguage:["javascript","handlebars","xml"]}},{className:"tag",begin:/<>|<\/>/},{className:"tag",begin:t.concat(/</,t.lookahead(t.concat(n,t.either(/\/>/,/>/,/\s/)))),end:/\/?>/,contains:[{className:"name",begin:n,relevance:0,starts:m}]},{className:"tag",begin:t.concat(/<\//,t.lookahead(t.concat(n,/>/))),contains:[{className:"name",begin:n,relevance:0},{begin:/>/,relevance:0,endsParent:!0}]}]}}function lB(e){const t="true false yes no null",n="[\\w#;/?:@&=+$,.~*'()[\\]]+",a={className:"attr",variants:[{begin:/[\w*@][\w*@ :()\./-]*:(?=[ \t]|$)/},{begin:/"[\w*@][\w*@ :()\./-]*":(?=[ \t]|$)/},{begin:/'[\w*@][\w*@ :()\./-]*':(?=[ \t]|$)/}]},s={className:"template-variable",variants:[{begin:/\{\{/,end:/\}\}/},{begin:/%\{/,end:/\}/}]},o={className:"string",relevance:0,begin:/'/,end:/'/,contains:[{match:/''/,scope:"char.escape",relevance:0}]},c={className:"string",relevance:0,variants:[{begin:/"/,end:/"/},{begin:/\S+/}],contains:[e.BACKSLASH_ESCAPE,s]},f=e.inherit(c,{variants:[{begin:/'/,end:/'/,contains:[{begin:/''/,relevance:0}]},{begin:/"/,end:/"/},{begin:/[^\s,{}[\]]+/}]}),x={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"},v={end:",",endsWithParent:!0,excludeEnd:!0,keywords:t,relevance:0},E={begin:/\{/,end:/\}/,contains:[v],illegal:"\\n",relevance:0},w={begin:"\\[",end:"\\]",contains:[v],illegal:"\\n",relevance:0},k=[a,{className:"meta",begin:"^---\\s*$",relevance:10},{className:"string",begin:"[\\|>]([1-9]?[+-])?[ ]*\\n( +)[^ ][^\\n]*\\n(\\2[^\\n]+\\n?)*"},{begin:"<%[%=-]?",end:"[%-]?%>",subLanguage:"ruby",excludeBegin:!0,excludeEnd:!0,relevance:0},{className:"type",begin:"!\\w+!"+n},{className:"type",begin:"!<"+n+">"},{className:"type",begin:"!"+n},{className:"type",begin:"!!"+n},{className:"meta",begin:"&"+e.UNDERSCORE_IDENT_RE+"$"},{className:"meta",begin:"\\*"+e.UNDERSCORE_IDENT_RE+"$"},{className:"bullet",begin:"-(?=[ ]|$)",relevance:0},e.HASH_COMMENT_MODE,{beginKeywords:t,keywords:{literal:t}},x,{className:"number",begin:e.C_NUMBER_RE+"\\b",relevance:0},E,w,o,c],_=[...k];return _.pop(),_.push(f),v.contains=_,{name:"YAML",case_insensitive:!0,aliases:["yml"],contains:k}}const oB={arduino:qI,bash:HI,c:KI,cpp:GI,csharp:QI,css:n4,diff:i4,go:a4,graphql:r4,ini:s4,java:l4,javascript:d4,json:h4,kotlin:p4,less:w4,lua:_4,makefile:k4,markdown:N4,objectivec:T4,perl:C4,php:A4,"php-template":O4,plaintext:R4,python:M4,"python-repl":j4,r:D4,ruby:L4,rust:z4,scss:K4,shell:G4,sql:Q4,swift:tB,typescript:iB,vbnet:aB,wasm:rB,xml:sB,yaml:lB};var Km,s1;function cB(){if(s1)return Km;s1=1;function e(B){return B instanceof Map?B.clear=B.delete=B.set=function(){throw new Error("map is read-only")}:B instanceof Set&&(B.add=B.clear=B.delete=function(){throw new Error("set is read-only")}),Object.freeze(B),Object.getOwnPropertyNames(B).forEach(se=>{const xe=B[se],ze=typeof xe;(ze==="object"||ze==="function")&&!Object.isFrozen(xe)&&e(xe)}),B}class t{constructor(se){se.data===void 0&&(se.data={}),this.data=se.data,this.isMatchIgnored=!1}ignoreMatch(){this.isMatchIgnored=!0}}function n(B){return B.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function a(B,...se){const xe=Object.create(null);for(const ze in B)xe[ze]=B[ze];return se.forEach(function(ze){for(const kt in ze)xe[kt]=ze[kt]}),xe}const s="</span>",o=B=>!!B.scope,c=(B,{prefix:se})=>{if(B.startsWith("language:"))return B.replace("language:","language-");if(B.includes(".")){const xe=B.split(".");return[`${se}${xe.shift()}`,...xe.map((ze,kt)=>`${ze}${"_".repeat(kt+1)}`)].join(" ")}return`${se}${B}`};class f{constructor(se,xe){this.buffer="",this.classPrefix=xe.classPrefix,se.walk(this)}addText(se){this.buffer+=n(se)}openNode(se){if(!o(se))return;const xe=c(se.scope,{prefix:this.classPrefix});this.span(xe)}closeNode(se){o(se)&&(this.buffer+=s)}value(){return this.buffer}span(se){this.buffer+=`<span class="${se}">`}}const h=(B={})=>{const se={children:[]};return Object.assign(se,B),se};class m{constructor(){this.rootNode=h(),this.stack=[this.rootNode]}get top(){return this.stack[this.stack.length-1]}get root(){return this.rootNode}add(se){this.top.children.push(se)}openNode(se){const xe=h({scope:se});this.add(xe),this.stack.push(xe)}closeNode(){if(this.stack.length>1)return this.stack.pop()}closeAllNodes(){for(;this.closeNode(););}toJSON(){return JSON.stringify(this.rootNode,null,4)}walk(se){return this.constructor._walk(se,this.rootNode)}static _walk(se,xe){return typeof xe=="string"?se.addText(xe):xe.children&&(se.openNode(xe),xe.children.forEach(ze=>this._walk(se,ze)),se.closeNode(xe)),se}static _collapse(se){typeof se!="string"&&se.children&&(se.children.every(xe=>typeof xe=="string")?se.children=[se.children.join("")]:se.children.forEach(xe=>{m._collapse(xe)}))}}class b extends m{constructor(se){super(),this.options=se}addText(se){se!==""&&this.add(se)}startScope(se){this.openNode(se)}endScope(){this.closeNode()}__addSublanguage(se,xe){const ze=se.root;xe&&(ze.scope=`language:${xe}`),this.add(ze)}toHTML(){return new f(this,this.options).value()}finalize(){return this.closeAllNodes(),!0}}function g(B){return B?typeof B=="string"?B:B.source:null}function x(B){return w("(?=",B,")")}function v(B){return w("(?:",B,")*")}function E(B){return w("(?:",B,")?")}function w(...B){return B.map(xe=>g(xe)).join("")}function k(B){const se=B[B.length-1];return typeof se=="object"&&se.constructor===Object?(B.splice(B.length-1,1),se):{}}function _(...B){return"("+(k(B).capture?"":"?:")+B.map(ze=>g(ze)).join("|")+")"}function A(B){return new RegExp(B.toString()+"|").exec("").length-1}function T(B,se){const xe=B&&B.exec(se);return xe&&xe.index===0}const j=/\[(?:[^\\\]]|\\.)*\]|\(\??|\\([1-9][0-9]*)|\\./;function $(B,{joinWith:se}){let xe=0;return B.map(ze=>{xe+=1;const kt=xe;let xt=g(ze),_e="";for(;xt.length>0;){const Ee=j.exec(xt);if(!Ee){_e+=xt;break}_e+=xt.substring(0,Ee.index),xt=xt.substring(Ee.index+Ee[0].length),Ee[0][0]==="\\"&&Ee[1]?_e+="\\"+String(Number(Ee[1])+kt):(_e+=Ee[0],Ee[0]==="("&&xe++)}return _e}).map(ze=>`(${ze})`).join(se)}const M=/\b\B/,F="[a-zA-Z]\\w*",H="[a-zA-Z_]\\w*",ee="\\b\\d+(\\.\\d+)?",L="(-?)(\\b0[xX][a-fA-F0-9]+|(\\b\\d+(\\.\\d*)?|\\.\\d+)([eE][-+]?\\d+)?)",J="\\b(0b[01]+)",ae="!|!=|!==|%|%=|&|&&|&=|\\*|\\*=|\\+|\\+=|,|-|-=|/=|/|:|;|<<|<<=|<=|<|===|==|=|>>>=|>>=|>=|>>>|>>|>|\\?|\\[|\\{|\\(|\\^|\\^=|\\||\\|=|\\|\\||~",ge=(B={})=>{const se=/^#![ ]*\//;return B.binary&&(B.begin=w(se,/.*\b/,B.binary,/\b.*/)),a({scope:"meta",begin:se,end:/$/,relevance:0,"on:begin":(xe,ze)=>{xe.index!==0&&ze.ignoreMatch()}},B)},fe={begin:"\\\\[\\s\\S]",relevance:0},te={scope:"string",begin:"'",end:"'",illegal:"\\n",contains:[fe]},q={scope:"string",begin:'"',end:'"',illegal:"\\n",contains:[fe]},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/},V=function(B,se,xe={}){const ze=a({scope:"comment",begin:B,end:se,contains:[]},xe);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 kt=_("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(/[ ]+/,"(",kt,/[.]?[:]?([.][ ]|[ ])/,"){3}")}),ze},be=V("//","$"),R=V("/\\*","\\*/"),D=V("#","$"),X={scope:"number",begin:ee,relevance:0},C={scope:"number",begin:L,relevance:0},G={scope:"number",begin:J,relevance:0},de={scope:"regexp",begin:/\/(?=[^/\n]*\/)/,end:/\/[gimuy]*/,contains:[fe,{begin:/\[/,end:/\]/,relevance:0,contains:[fe]}]},re={scope:"title",begin:F,relevance:0},K={scope:"title",begin:H,relevance:0},ue={begin:"\\.\\s*"+H,relevance:0};var Ze=Object.freeze({__proto__:null,APOS_STRING_MODE:te,BACKSLASH_ESCAPE:fe,BINARY_NUMBER_MODE:G,BINARY_NUMBER_RE:J,COMMENT:V,C_BLOCK_COMMENT_MODE:R,C_LINE_COMMENT_MODE:be,C_NUMBER_MODE:C,C_NUMBER_RE:L,END_SAME_AS_BEGIN:function(B){return Object.assign(B,{"on:begin":(se,xe)=>{xe.data._beginMatch=se[1]},"on:end":(se,xe)=>{xe.data._beginMatch!==se[1]&&xe.ignoreMatch()}})},HASH_COMMENT_MODE:D,IDENT_RE:F,MATCH_NOTHING_RE:M,METHOD_GUARD:ue,NUMBER_MODE:X,NUMBER_RE:ee,PHRASAL_WORDS_MODE:ce,QUOTE_STRING_MODE:q,REGEXP_MODE:de,RE_STARTERS_RE:ae,SHEBANG:ge,TITLE_MODE:re,UNDERSCORE_IDENT_RE:H,UNDERSCORE_TITLE_MODE:K});function it(B,se){B.input[B.index-1]==="."&&se.ignoreMatch()}function Kn(B,se){B.className!==void 0&&(B.scope=B.className,delete B.className)}function Ra(B,se){se&&B.beginKeywords&&(B.begin="\\b("+B.beginKeywords.split(" ").join("|")+")(?!\\.)(?=\\b|\\s)",B.__beforeBegin=it,B.keywords=B.keywords||B.beginKeywords,delete B.beginKeywords,B.relevance===void 0&&(B.relevance=0))}function Gn(B,se){Array.isArray(B.illegal)&&(B.illegal=_(...B.illegal))}function Bi(B,se){if(B.match){if(B.begin||B.end)throw new Error("begin & end are not supported with match");B.begin=B.match,delete B.match}}function Je(B,se){B.relevance===void 0&&(B.relevance=1)}const Ni=(B,se)=>{if(!B.beforeMatch)return;if(B.starts)throw new Error("beforeMatch cannot be used with starts");const xe=Object.assign({},B);Object.keys(B).forEach(ze=>{delete B[ze]}),B.keywords=xe.keywords,B.begin=w(xe.beforeMatch,x(xe.begin)),B.starts={relevance:0,contains:[Object.assign(xe,{endsParent:!0})]},B.relevance=0,delete xe.beforeMatch},oi=["of","and","for","in","not","or","if","then","parent","list","value"],Ui="keyword";function ea(B,se,xe=Ui){const ze=Object.create(null);return typeof B=="string"?kt(xe,B.split(" ")):Array.isArray(B)?kt(xe,B):Object.keys(B).forEach(function(xt){Object.assign(ze,ea(B[xt],se,xt))}),ze;function kt(xt,_e){se&&(_e=_e.map(Ee=>Ee.toLowerCase())),_e.forEach(function(Ee){const Le=Ee.split("|");ze[Le[0]]=[xt,Tr(Le[0],Le[1])]})}}function Tr(B,se){return se?Number(se):Gl(B)?0:1}function Gl(B){return oi.includes(B.toLowerCase())}const bs={},Mt=B=>{console.error(B)},ys=(B,...se)=>{console.log(`WARN: ${B}`,...se)},ne=(B,se)=>{bs[`${B}/${se}`]||(console.log(`Deprecated as of ${B}. ${se}`),bs[`${B}/${se}`]=!0)},pe=new Error;function Me(B,se,{key:xe}){let ze=0;const kt=B[xe],xt={},_e={};for(let Ee=1;Ee<=se.length;Ee++)_e[Ee+ze]=kt[Ee],xt[Ee+ze]=!0,ze+=A(se[Ee-1]);B[xe]=_e,B[xe]._emit=xt,B[xe]._multi=!0}function He(B){if(Array.isArray(B.begin)){if(B.skip||B.excludeBegin||B.returnBegin)throw Mt("skip, excludeBegin, returnBegin not compatible with beginScope: {}"),pe;if(typeof B.beginScope!="object"||B.beginScope===null)throw Mt("beginScope must be object"),pe;Me(B,B.begin,{key:"beginScope"}),B.begin=$(B.begin,{joinWith:""})}}function at(B){if(Array.isArray(B.end)){if(B.skip||B.excludeEnd||B.returnEnd)throw Mt("skip, excludeEnd, returnEnd not compatible with endScope: {}"),pe;if(typeof B.endScope!="object"||B.endScope===null)throw Mt("endScope must be object"),pe;Me(B,B.end,{key:"endScope"}),B.end=$(B.end,{joinWith:""})}}function xn(B){B.scope&&typeof B.scope=="object"&&B.scope!==null&&(B.beginScope=B.scope,delete B.scope)}function Ti(B){xn(B),typeof B.beginScope=="string"&&(B.beginScope={_wrap:B.beginScope}),typeof B.endScope=="string"&&(B.endScope={_wrap:B.endScope}),He(B),at(B)}function rn(B){function se(_e,Ee){return new RegExp(g(_e),"m"+(B.case_insensitive?"i":"")+(B.unicodeRegex?"u":"")+(Ee?"g":""))}class xe{constructor(){this.matchIndexes={},this.regexes=[],this.matchAt=1,this.position=0}addRule(Ee,Le){Le.position=this.position++,this.matchIndexes[this.matchAt]=Le,this.regexes.push([Le,Ee]),this.matchAt+=A(Ee)+1}compile(){this.regexes.length===0&&(this.exec=()=>null);const Ee=this.regexes.map(Le=>Le[1]);this.matcherRe=se($(Ee,{joinWith:"|"}),!0),this.lastIndex=0}exec(Ee){this.matcherRe.lastIndex=this.lastIndex;const Le=this.matcherRe.exec(Ee);if(!Le)return null;const Pt=Le.findIndex((ta,vs)=>vs>0&&ta!==void 0),Ct=this.matchIndexes[Pt];return Le.splice(0,Pt),Object.assign(Le,Ct)}}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 Le=new xe;return this.rules.slice(Ee).forEach(([Pt,Ct])=>Le.addRule(Pt,Ct)),Le.compile(),this.multiRegexes[Ee]=Le,Le}resumingScanAtSamePosition(){return this.regexIndex!==0}considerAll(){this.regexIndex=0}addRule(Ee,Le){this.rules.push([Ee,Le]),Le.type==="begin"&&this.count++}exec(Ee){const Le=this.getMatcher(this.regexIndex);Le.lastIndex=this.lastIndex;let Pt=Le.exec(Ee);if(this.resumingScanAtSamePosition()&&!(Pt&&Pt.index===this.lastIndex)){const Ct=this.getMatcher(0);Ct.lastIndex=this.lastIndex+1,Pt=Ct.exec(Ee)}return Pt&&(this.regexIndex+=Pt.position+1,this.regexIndex===this.count&&this.considerAll()),Pt}}function kt(_e){const Ee=new ze;return _e.contains.forEach(Le=>Ee.addRule(Le.begin,{rule:Le,type:"begin"})),_e.terminatorEnd&&Ee.addRule(_e.terminatorEnd,{type:"end"}),_e.illegal&&Ee.addRule(_e.illegal,{type:"illegal"}),Ee}function xt(_e,Ee){const Le=_e;if(_e.isCompiled)return Le;[Kn,Bi,Ti,Ni].forEach(Ct=>Ct(_e,Ee)),B.compilerExtensions.forEach(Ct=>Ct(_e,Ee)),_e.__beforeBegin=null,[Ra,Gn,Je].forEach(Ct=>Ct(_e,Ee)),_e.isCompiled=!0;let Pt=null;return typeof _e.keywords=="object"&&_e.keywords.$pattern&&(_e.keywords=Object.assign({},_e.keywords),Pt=_e.keywords.$pattern,delete _e.keywords.$pattern),Pt=Pt||/\w+/,_e.keywords&&(_e.keywords=ea(_e.keywords,B.case_insensitive)),Le.keywordPatternRe=se(Pt,!0),Ee&&(_e.begin||(_e.begin=/\B|\b/),Le.beginRe=se(Le.begin),!_e.end&&!_e.endsWithParent&&(_e.end=/\B|\b/),_e.end&&(Le.endRe=se(Le.end)),Le.terminatorEnd=g(Le.end)||"",_e.endsWithParent&&Ee.terminatorEnd&&(Le.terminatorEnd+=(_e.end?"|":"")+Ee.terminatorEnd)),_e.illegal&&(Le.illegalRe=se(_e.illegal)),_e.contains||(_e.contains=[]),_e.contains=[].concat(..._e.contains.map(function(Ct){return fn(Ct==="self"?_e:Ct)})),_e.contains.forEach(function(Ct){xt(Ct,Le)}),_e.starts&&xt(_e.starts,Ee),Le.matcher=kt(Le),Le}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||{}),xt(B)}function It(B){return B?B.endsWithParent||It(B.starts):!1}function fn(B){return B.variants&&!B.cachedVariants&&(B.cachedVariants=B.variants.map(function(se){return a(B,{variants:null},se)})),B.cachedVariants?B.cachedVariants:It(B)?a(B,{starts:B.starts?a(B.starts):null}):Object.isFrozen(B)?a(B):B}var ut="11.11.1";class $i extends Error{constructor(se,xe){super(se),this.name="HTMLInjectionError",this.html=xe}}const vn=n,Ac=a,Cr=Symbol("nomatch"),xs=7,Ar=function(B){const se=Object.create(null),xe=Object.create(null),ze=[];let kt=!0;const xt="Could not find the language '{}', did you forget to load/include a language module?",_e={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 Le(he){return Ee.noHighlightRe.test(he)}function Pt(he){let Ce=he.className+" ";Ce+=he.parentNode?he.parentNode.className:"";const Ke=Ee.languageDetectRe.exec(Ce);if(Ke){const ft=En(Ke[1]);return ft||(ys(xt.replace("{}",Ke[1])),ys("Falling back to no-highlight mode for this block.",he)),ft?Ke[1]:"no-highlight"}return Ce.split(/\s+/).find(ft=>Le(ft)||En(ft))}function Ct(he,Ce,Ke){let ft="",Ht="";typeof Ce=="object"?(ft=he,Ke=Ce.ignoreIllegals,Ht=Ce.language):(ne("10.7.0","highlight(lang, code, ...args) has been deprecated."),ne("10.7.0",`Please use highlight(code, options) instead.
|
|
543
|
-
https://github.com/highlightjs/highlight.js/issues/2277`),Ht=he,ft=Ce),Ke===void 0&&(Ke=!0);const hn={code:ft,language:Ht};Rr("before:highlight",hn);const Qn=hn.result?hn.result:ta(hn.language,hn.code,Ke);return Qn.code=hn.code,Rr("after:highlight",Qn),Qn}function ta(he,Ce,Ke,ft){const Ht=Object.create(null);function hn(ye,ke){return ye.keywords[ke]}function Qn(){if(!De.keywords){Yt.addText(dt);return}let ye=0;De.keywordPatternRe.lastIndex=0;let ke=De.keywordPatternRe.exec(dt),Ue="";for(;ke;){Ue+=dt.substring(ye,ke.index);const Ve=sn.case_insensitive?ke[0].toLowerCase():ke[0],jt=hn(De,Ve);if(jt){const[ci,Zl]=jt;if(Yt.addText(Ue),Ue="",Ht[Ve]=(Ht[Ve]||0)+1,Ht[Ve]<=xs&&(La+=Zl),ci.startsWith("_"))Ue+=ke[0];else{const zc=sn.classNameAliases[ci]||ci;Yn(ke[0],zc)}}else Ue+=ke[0];ye=De.keywordPatternRe.lastIndex,ke=De.keywordPatternRe.exec(dt)}Ue+=dt.substring(ye),Yt.addText(Ue)}function An(){if(dt==="")return;let ye=null;if(typeof De.subLanguage=="string"){if(!se[De.subLanguage]){Yt.addText(dt);return}ye=ta(De.subLanguage,dt,!0,Lc[De.subLanguage]),Lc[De.subLanguage]=ye._top}else ye=Es(dt,De.subLanguage.length?De.subLanguage:null);De.relevance>0&&(La+=ye.relevance),Yt.__addSublanguage(ye._emitter,ye.language)}function wt(){De.subLanguage!=null?An():Qn(),dt=""}function Yn(ye,ke){ye!==""&&(Yt.startScope(ke),Yt.addText(ye),Yt.endScope())}function jc(ye,ke){let Ue=1;const Ve=ke.length-1;for(;Ue<=Ve;){if(!ye._emit[Ue]){Ue++;continue}const jt=sn.classNameAliases[ye[Ue]]||ye[Ue],ci=ke[Ue];jt?Yn(ci,jt):(dt=ci,Qn(),dt=""),Ue++}}function ws(ye,ke){return ye.scope&&typeof ye.scope=="string"&&Yt.openNode(sn.classNameAliases[ye.scope]||ye.scope),ye.beginScope&&(ye.beginScope._wrap?(Yn(dt,sn.classNameAliases[ye.beginScope._wrap]||ye.beginScope._wrap),dt=""):ye.beginScope._multi&&(jc(ye.beginScope,ke),dt="")),De=Object.create(ye,{parent:{value:De}}),De}function Vl(ye,ke,Ue){let Ve=T(ye.endRe,Ue);if(Ve){if(ye["on:end"]){const jt=new t(ye);ye["on:end"](ke,jt),jt.isMatchIgnored&&(Ve=!1)}if(Ve){for(;ye.endsParent&&ye.parent;)ye=ye.parent;return ye}}if(ye.endsWithParent)return Vl(ye.parent,ke,Ue)}function _s(ye){return De.matcher.regexIndex===0?(dt+=ye[0],1):(za=!0,0)}function rd(ye){const ke=ye[0],Ue=ye.rule,Ve=new t(Ue),jt=[Ue.__beforeBegin,Ue["on:begin"]];for(const ci of jt)if(ci&&(ci(ye,Ve),Ve.isMatchIgnored))return _s(ke);return Ue.skip?dt+=ke:(Ue.excludeBegin&&(dt+=ke),wt(),!Ue.returnBegin&&!Ue.excludeBegin&&(dt=ke)),ws(Ue,ye),Ue.returnBegin?0:ke.length}function On(ye){const ke=ye[0],Ue=Ce.substring(ye.index),Ve=Vl(De,ye,Ue);if(!Ve)return Cr;const jt=De;De.endScope&&De.endScope._wrap?(wt(),Yn(ke,De.endScope._wrap)):De.endScope&&De.endScope._multi?(wt(),jc(De.endScope,ye)):jt.skip?dt+=ke:(jt.returnEnd||jt.excludeEnd||(dt+=ke),wt(),jt.excludeEnd&&(dt=ke));do De.scope&&Yt.closeNode(),!De.skip&&!De.subLanguage&&(La+=De.relevance),De=De.parent;while(De!==Ve.parent);return Ve.starts&&ws(Ve.starts,ye),jt.returnEnd?0:ke.length}function Wl(){const ye=[];for(let ke=De;ke!==sn;ke=ke.parent)ke.scope&&ye.unshift(ke.scope);ye.forEach(ke=>Yt.openNode(ke))}let Mr={};function ks(ye,ke){const Ue=ke&&ke[0];if(dt+=ye,Ue==null)return wt(),0;if(Mr.type==="begin"&&ke.type==="end"&&Mr.index===ke.index&&Ue===""){if(dt+=Ce.slice(ke.index,ke.index+1),!kt){const Ve=new Error(`0 width match regex (${he})`);throw Ve.languageName=he,Ve.badRule=Mr.rule,Ve}return 1}if(Mr=ke,ke.type==="begin")return rd(ke);if(ke.type==="illegal"&&!Ke){const Ve=new Error('Illegal lexeme "'+Ue+'" for mode "'+(De.scope||"<unnamed>")+'"');throw Ve.mode=De,Ve}else if(ke.type==="end"){const Ve=On(ke);if(Ve!==Cr)return Ve}if(ke.type==="illegal"&&Ue==="")return dt+=`
|
|
544
|
-
`,1;if(Xl>1e5&&Xl>ke.index*3)throw new Error("potential infinite loop, way more iterations than matches");return dt+=Ue,Ue.length}const sn=En(he);if(!sn)throw Mt(xt.replace("{}",he)),new Error('Unknown language: "'+he+'"');const Dc=rn(sn);let Ns="",De=ft||Dc;const Lc={},Yt=new Ee.__emitter(Ee);Wl();let dt="",La=0,aa=0,Xl=0,za=!1;try{if(sn.__emitTokens)sn.__emitTokens(Ce,Yt);else{for(De.matcher.considerAll();;){Xl++,za?za=!1:De.matcher.considerAll(),De.matcher.lastIndex=aa;const ye=De.matcher.exec(Ce);if(!ye)break;const ke=Ce.substring(aa,ye.index),Ue=ks(ke,ye);aa=ye.index+Ue}ks(Ce.substring(aa))}return Yt.finalize(),Ns=Yt.toHTML(),{language:he,value:Ns,relevance:La,illegal:!1,_emitter:Yt,_top:De}}catch(ye){if(ye.message&&ye.message.includes("Illegal"))return{language:he,value:vn(Ce),illegal:!0,relevance:0,_illegalBy:{message:ye.message,index:aa,context:Ce.slice(aa-100,aa+100),mode:ye.mode,resultSoFar:Ns},_emitter:Yt};if(kt)return{language:he,value:vn(Ce),illegal:!1,relevance:0,errorRaised:ye,_emitter:Yt,_top:De};throw ye}}function vs(he){const Ce={value:vn(he),illegal:!1,relevance:0,_top:_e,_emitter:new Ee.__emitter(Ee)};return Ce._emitter.addText(he),Ce}function Es(he,Ce){Ce=Ce||Ee.languages||Object.keys(se);const Ke=vs(he),ft=Ce.filter(En).filter(ja).map(wt=>ta(wt,he,!1));ft.unshift(Ke);const Ht=ft.sort((wt,Yn)=>{if(wt.relevance!==Yn.relevance)return Yn.relevance-wt.relevance;if(wt.language&&Yn.language){if(En(wt.language).supersetOf===Yn.language)return 1;if(En(Yn.language).supersetOf===wt.language)return-1}return 0}),[hn,Qn]=Ht,An=hn;return An.secondBest=Qn,An}function Fi(he,Ce,Ke){const ft=Ce&&xe[Ce]||Ke;he.classList.add("hljs"),he.classList.add(`language-${ft}`)}function qt(he){let Ce=null;const Ke=Pt(he);if(Le(Ke))return;if(Rr("before:highlightElement",{el:he,language:Ke}),he.dataset.highlighted){console.log("Element previously highlighted. To highlight again, first unset `dataset.highlighted`.",he);return}if(he.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(he)),Ee.throwUnescapedHTML))throw new $i("One of your code blocks includes unescaped HTML.",he.innerHTML);Ce=he;const ft=Ce.textContent,Ht=Ke?Ct(ft,{language:Ke,ignoreIllegals:!0}):Es(ft);he.innerHTML=Ht.value,he.dataset.highlighted="yes",Fi(he,Ke,Ht.language),he.result={language:Ht.language,re:Ht.relevance,relevance:Ht.relevance},Ht.secondBest&&(he.secondBest={language:Ht.secondBest.language,relevance:Ht.secondBest.relevance}),Rr("after:highlightElement",{el:he,result:Ht,text:ft})}function dn(he){Ee=Ac(Ee,he)}const Ma=()=>{Ss(),ne("10.6.0","initHighlighting() deprecated. Use highlightAll() now.")};function Ql(){Ss(),ne("10.6.0","initHighlightingOnLoad() deprecated. Use highlightAll() now.")}let Oc=!1;function Ss(){function he(){Ss()}if(document.readyState==="loading"){Oc||window.addEventListener("DOMContentLoaded",he,!1),Oc=!0;return}document.querySelectorAll(Ee.cssSelector).forEach(qt)}function Rc(he,Ce){let Ke=null;try{Ke=Ce(B)}catch(ft){if(Mt("Language definition for '{}' could not be registered.".replace("{}",he)),kt)Mt(ft);else throw ft;Ke=_e}Ke.name||(Ke.name=he),se[he]=Ke,Ke.rawDefinition=Ce.bind(null,B),Ke.aliases&&na(Ke.aliases,{languageName:he})}function Or(he){delete se[he];for(const Ce of Object.keys(xe))xe[Ce]===he&&delete xe[Ce]}function Yl(){return Object.keys(se)}function En(he){return he=(he||"").toLowerCase(),se[he]||se[xe[he]]}function na(he,{languageName:Ce}){typeof he=="string"&&(he=[he]),he.forEach(Ke=>{xe[Ke.toLowerCase()]=Ce})}function ja(he){const Ce=En(he);return Ce&&!Ce.disableAutodetect}function Da(he){he["before:highlightBlock"]&&!he["before:highlightElement"]&&(he["before:highlightElement"]=Ce=>{he["before:highlightBlock"](Object.assign({block:Ce.el},Ce))}),he["after:highlightBlock"]&&!he["after:highlightElement"]&&(he["after:highlightElement"]=Ce=>{he["after:highlightBlock"](Object.assign({block:Ce.el},Ce))})}function Qt(he){Da(he),ze.push(he)}function Mc(he){const Ce=ze.indexOf(he);Ce!==-1&&ze.splice(Ce,1)}function Rr(he,Ce){const Ke=he;ze.forEach(function(ft){ft[Ke]&&ft[Ke](Ce)})}function ia(he){return ne("10.7.0","highlightBlock will be removed entirely in v12.0"),ne("10.7.0","Please use highlightElement now."),qt(he)}Object.assign(B,{highlight:Ct,highlightAuto:Es,highlightAll:Ss,highlightElement:qt,highlightBlock:ia,configure:dn,initHighlighting:Ma,initHighlightingOnLoad:Ql,registerLanguage:Rc,unregisterLanguage:Or,listLanguages:Yl,getLanguage:En,registerAliases:na,autoDetection:ja,inherit:Ac,addPlugin:Qt,removePlugin:Mc}),B.debugMode=function(){kt=!1},B.safeMode=function(){kt=!0},B.versionString=ut,B.regex={concat:w,lookahead:x,either:_,optional:E,anyNumberOfTimes:v};for(const he in Ze)typeof Ze[he]=="object"&&e(Ze[he]);return Object.assign(B,Ze),B},Cn=Ar({});return Cn.newInstance=()=>Ar({}),Km=Cn,Cn.HighlightJS=Cn,Cn.default=Cn,Km}var uB=cB();const fB=Dp(uB),l1={},dB="hljs-";function hB(e){const t=fB.newInstance();return e&&o(e),{highlight:n,highlightAuto:a,listLanguages:s,register:o,registerAlias:c,registered:f};function n(h,m,b){const g=b||l1,x=typeof g.prefix=="string"?g.prefix:dB;if(!t.getLanguage(h))throw new Error("Unknown language: `"+h+"` is not registered");t.configure({__emitter:mB,classPrefix:x});const v=t.highlight(m,{ignoreIllegals:!0,language:h});if(v.errorRaised)throw new Error("Could not highlight with `Highlight.js`",{cause:v.errorRaised});const E=v._emitter.root,w=E.data;return w.language=v.language,w.relevance=v.relevance,E}function a(h,m){const g=(m||l1).subset||s();let x=-1,v=0,E;for(;++x<g.length;){const w=g[x];if(!t.getLanguage(w))continue;const k=n(w,h,m);k.data&&k.data.relevance!==void 0&&k.data.relevance>v&&(v=k.data.relevance,E=k)}return E||{type:"root",children:[],data:{language:void 0,relevance:v}}}function s(){return t.listLanguages()}function o(h,m){if(typeof h=="string")t.registerLanguage(h,m);else{let b;for(b in h)Object.hasOwn(h,b)&&t.registerLanguage(b,h[b])}}function c(h,m){if(typeof h=="string")t.registerAliases(typeof m=="string"?m:[...m],{languageName:h});else{let b;for(b in h)if(Object.hasOwn(h,b)){const g=h[b];t.registerAliases(typeof g=="string"?g:[...g],{languageName:b})}}}function f(h){return!!t.getLanguage(h)}}class mB{constructor(t){this.options=t,this.root={type:"root",children:[],data:{language:void 0,relevance:0}},this.stack=[this.root]}addText(t){if(t==="")return;const n=this.stack[this.stack.length-1],a=n.children[n.children.length-1];a&&a.type==="text"?a.value+=t:n.children.push({type:"text",value:t})}startScope(t){this.openNode(String(t))}endScope(){this.closeNode()}__addSublanguage(t,n){const a=this.stack[this.stack.length-1],s=t.root.children;n?a.children.push({type:"element",tagName:"span",properties:{className:[n]},children:s}):a.children.push(...s)}openNode(t){const n=this,a=t.split(".").map(function(c,f){return f?c+"_".repeat(f):n.options.classPrefix+c}),s=this.stack[this.stack.length-1],o={type:"element",tagName:"span",properties:{className:a},children:[]};s.children.push(o),this.stack.push(o)}closeNode(){this.stack.pop()}finalize(){}toHTML(){return""}}const pB={};function Bg(e){const t=e||pB,n=t.aliases,a=t.detect||!1,s=t.languages||oB,o=t.plainText,c=t.prefix,f=t.subset;let h="hljs";const m=hB(s);if(n&&m.registerAlias(n),c){const b=c.indexOf("-");h=b===-1?c:c.slice(0,b)}return function(b,g){ad(b,"element",function(x,v,E){if(x.tagName!=="code"||!E||E.type!=="element"||E.tagName!=="pre")return;const w=gB(x);if(w===!1||!w&&!a||w&&o&&o.includes(w))return;Array.isArray(x.properties.className)||(x.properties.className=[]),x.properties.className.includes(h)||x.properties.className.unshift(h);const k=LI(x,{whitespace:"pre"});let _;try{_=w?m.highlight(w,k,{prefix:c}):m.highlightAuto(k,{prefix:c,subset:f})}catch(A){const T=A;if(w&&/Unknown language/.test(T.message)){g.message("Cannot highlight as `"+w+"`, it’s not registered",{ancestors:[E,x],cause:T,place:x.position,ruleId:"missing-language",source:"rehype-highlight"});return}throw T}!w&&_.data&&_.data.language&&x.properties.className.push("language-"+_.data.language),_.children.length>0&&(x.children=_.children)})}}function gB(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 bB({name:e,projects:t,onClose:n,onChange:a}){const{confirm:s,alert:o}=li(),{data:c,isLoading:f,isError:h,error:m,refetch:b}=ot({queryKey:["skill",e],queryFn:()=>iR(e)});O.useEffect(()=>{const _=A=>{A.key==="Escape"&&n()};return window.addEventListener("keydown",_),()=>window.removeEventListener("keydown",_)},[n]);const g=async(_,A)=>{try{await A(),await b(),a()}catch(T){o({title:`${_}失败`,body:T instanceof Error?T.message:String(T)})}},x=_=>g("link",()=>rR(e,_)),v=async _=>{await s({title:`从 ${_} 移除 ${e}`,body:"skill 链接会被解除,项目后续运行时将无法使用该 skill。",confirm:"移除",danger:!0})&&await g("unlink",()=>sR(e,_))},E=_=>g("freeze",()=>lR(e,_)),w=async _=>{await s({title:`解冻 ${e} @ ${_}`,body:"本地对这个 skill 的改动会被覆盖,回到最新共享版本。",confirm:"解冻",danger:!0})&&await g("unfreeze",()=>oR(e,_))},k=new Map(((c==null?void 0:c.linkedProjects)??[]).map(_=>[_.project,_.state]));return d.jsx("div",{role:"dialog","aria-modal":"true",className:"fixed inset-0 z-40 flex items-start justify-center p-6 bg-black/30 overflow-auto",children:d.jsxs("div",{className:"nb-card mt-8 w-full max-w-4xl",children:[d.jsxs("header",{className:"flex items-start justify-between gap-4 mb-4",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-3xl font-bold",children:e}),c&&d.jsxs("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:[c.category," · ",c.origin||"local"]})]}),d.jsx("button",{onClick:n,className:"nb-btn nb-btn-mint p-2","aria-label":"关闭",type:"button",children:d.jsx(wi,{size:16,strokeWidth:3})})]}),f&&d.jsx("p",{children:"加载中…"}),h&&d.jsxs("p",{className:"text-[var(--color-crashed)]",children:["加载失败: ",m instanceof Error?m.message:String(m)]}),c&&d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{className:"nb-card bg-[var(--color-bg-cream)] p-4",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-3 uppercase tracking-wider",children:"项目链接状态"}),d.jsxs("div",{className:"flex flex-col gap-2",children:[t.map(_=>{const A=k.get(_);return d.jsxs("div",{className:"flex items-center justify-between gap-3 p-2 bg-[var(--color-bg)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-3",children:[d.jsx("span",{className:"font-[family-name:var(--font-mono)] font-bold text-sm",children:_}),A==="linked"&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"linked"}),A==="frozen"&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"frozen"}),!A&&d.jsx("span",{className:"nb-status",style:{background:"var(--color-idle-bg)",color:"var(--color-idle)"},children:"absent"})]}),d.jsxs("div",{className:"flex gap-2",children:[!A&&d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>x(_),type:"button",children:[d.jsx(xC,{size:11})," link"]}),A==="linked"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>E(_),type:"button",children:[d.jsx(PC,{size:11})," freeze"]}),d.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:"unlink"})]}),A==="frozen"&&d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>w(_),type:"button",children:[d.jsx(XT,{size:11})," unfreeze"]}),d.jsx("button",{className:"nb-btn nb-btn-danger",style:{padding:"4px 10px",fontSize:11},onClick:()=>v(_),type:"button",children:"unlink"})]})]})]},_)}),t.length===0&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"还没有任何项目。先去创建一个项目。"})]})]}),d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"SKILL.md 预览"}),d.jsx("div",{className:"prose-chat bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-4 max-h-80 overflow-auto text-sm",children:c.body?d.jsx(Rg,{remarkPlugins:[Lg],rehypePlugins:[Bg],children:c.body}):d.jsx("p",{className:"text-[var(--color-text-muted)] italic",children:"(empty)"})})]}),c.references.length>0&&d.jsxs("div",{children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] text-sm font-bold mb-2 uppercase tracking-wider",children:"References"}),d.jsx("ul",{className:"flex flex-col gap-2",children:c.references.map(_=>d.jsx(yB,{skillName:e,file:_.name,lines:_.lines},_.name))})]})]})]})})}function yB({skillName:e,file:t,lines:n}){const[a,s]=O.useState(!1),{data:o,isLoading:c,isError:f,error:h}=ot({queryKey:["skill-ref",e,t],queryFn:()=>aR(e,t),enabled:a,staleTime:1/0});return d.jsxs("li",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[d.jsxs("button",{type:"button",onClick:()=>s(m=>!m),"aria-label":`${a?"收起":"展开"} ${t}`,"aria-expanded":a,className:"w-full flex items-center gap-2 px-3 py-2 text-sm font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[d.jsx(Bf,{size:12,strokeWidth:3,className:["transition-transform",a?"rotate-90":""].join(" ")}),d.jsx(Ec,{size:12,strokeWidth:2.5}),d.jsx("span",{className:"flex-1 text-left font-bold",children:t}),d.jsxs("span",{className:"text-xs text-[var(--color-text-subtle)]",children:[n," lines"]})]}),a&&d.jsxs("div",{className:"px-4 py-3 border-t-2 border-[var(--color-text)] bg-[var(--color-bg)] max-h-96 overflow-auto",children:[c&&d.jsx("p",{className:"text-xs text-[var(--color-text-muted)]",children:"加载中…"}),f&&d.jsxs("p",{className:"text-xs text-[var(--color-crashed)]",children:["加载失败: ",h instanceof Error?h.message:String(h)]}),o&&d.jsx("div",{className:"prose-chat text-sm",children:d.jsx(Rg,{remarkPlugins:[Lg],rehypePlugins:[Bg],children:o.content})})]})]})}const xB=[{value:"all",label:"全部"},{value:"language",label:"language"},{value:"end",label:"end"},{value:"persona",label:"persona"},{value:"workflow",label:"workflow"},{value:"other",label:"other"}],vB={language:"var(--color-accent-purple)",end:"var(--color-secondary)",persona:"var(--color-primary)",workflow:"var(--color-accent-mint)",other:"var(--color-bg-cream)"};function EB(){var x;const[e,t]=O.useState("all"),[n,a]=O.useState(""),[s,o]=O.useState(null),c=qn(),{data:f,isLoading:h}=ot({queryKey:["skills"],queryFn:()=>hg()}),m=ot({queryKey:["projects"],queryFn:_r}),b=O.useMemo(()=>((f==null?void 0:f.data)??[]).filter(E=>!(e!=="all"&&E.category!==e||n&&!E.name.toLowerCase().includes(n.toLowerCase()))),[f,e,n]),g=O.useMemo(()=>{const v=(f==null?void 0:f.data)??[],E={all:v.length};for(const w of v)E[w.category]=(E[w.category]??0)+1;return E},[f]);return d.jsxs("div",{className:"flex flex-col gap-4 max-w-full",children:[d.jsxs("header",{className:"flex items-center justify-between flex-wrap gap-3",children:[d.jsxs("div",{children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"Skills 🎯"}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mt-1",children:h?"加载中…":`${(f==null?void 0:f.data.length)??0} 个 user-level skill`})]}),d.jsx("div",{className:"flex gap-3 items-center",children:d.jsxs("button",{className:"nb-btn nb-btn-mint",onClick:async()=>{await cR(),c.invalidateQueries({queryKey:["skills"]})},type:"button",children:[d.jsx(Cl,{size:14,strokeWidth:2.5}),"Sync bundled"]})})]}),d.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[d.jsxs("div",{className:"relative flex-1 max-w-md",children:[d.jsx(Sf,{size:14,className:"absolute left-3 top-1/2 -translate-y-1/2 text-[var(--color-text-subtle)]"}),d.jsx("input",{className:"nb-input pl-9 w-full",placeholder:"搜索 skill…",value:n,onChange:v=>a(v.target.value),"aria-label":"搜索 skill"})]}),d.jsx("div",{className:"flex gap-1 p-1 bg-[var(--color-bg)] border-[2px] border-[var(--color-text)] rounded-full shadow-[2px_2px_0_var(--color-text)]",children:xB.map(v=>d.jsxs("button",{type:"button",onClick:()=>t(v.value),className:["px-3 py-1 rounded-full text-xs font-bold font-[family-name:var(--font-body)]",e===v.value?"bg-[var(--color-text)] text-[var(--color-bg)]":"text-[var(--color-text-muted)] hover:text-[var(--color-text)]"].join(" "),children:[v.label," ",g[v.value]]},v.value))})]}),d.jsx("div",{className:"grid gap-4 grid-cols-[repeat(auto-fill,minmax(280px,1fr))]",children:b.map(v=>{var E;return d.jsx(SB,{skill:v,projectCount:((E=m.data)==null?void 0:E.data.length)??0,onOpen:()=>o(v.name)},v.name)})}),s&&d.jsx(bB,{name:s,projects:((x=m.data)==null?void 0:x.data.map(v=>v.name))??[],onClose:()=>o(null),onChange:()=>c.invalidateQueries({queryKey:["skills"]})})]})}function SB({skill:e,projectCount:t,onOpen:n}){const a=vB[e.category];return d.jsxs("article",{onClick:n,onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),n())},tabIndex:0,role:"button","aria-label":`Open ${e.name}`,className:"nb-card nb-card-interactive flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:e.name}),d.jsx("span",{className:"nb-badge text-[10px]",style:{background:a},children:e.category})]}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] leading-5 line-clamp-3",children:e.description||"(no description)"}),d.jsxs("div",{className:"flex items-center justify-between text-xs font-[family-name:var(--font-mono)] pt-2 border-t-[1.5px] border-dashed border-[var(--color-border-light)]",children:[d.jsx("span",{className:"font-bold",children:e.linkedProjects.length>0?`● linked in ${e.linkedProjects.length}`:"○ not linked"}),d.jsxs("span",{className:"text-[var(--color-text-subtle)]",children:[t," projects"]})]})]})}function wB(){var s;const e=ot({queryKey:["system-info"],queryFn:dE}),t=ot({queryKey:["system-env"],queryFn:rA}),[n,a]=O.useState(!1);return d.jsxs("div",{className:"flex flex-col gap-6 max-w-4xl",children:[d.jsx("header",{children:d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold",children:"系统 ⚙️"})}),d.jsx(_B,{current:(s=e.data)==null?void 0:s.version}),d.jsxs("section",{className:"nb-card",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold mb-3",children:"运行时"}),e.data?d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"Node"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.nodeVersion}),d.jsx("dt",{className:"font-bold",children:"Platform"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.platform}),d.jsx("dt",{className:"font-bold",children:"PID"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e.data.pid??"—"}),d.jsx("dt",{className:"font-bold",children:"Uptime"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:CB(e.data.uptimeMs)})]}):d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"})]}),d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsxs("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:["全局配置 ",d.jsx("code",{className:"text-sm font-[family-name:var(--font-mono)] font-normal bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded",children:"~/.coral/env"})]}),n?d.jsx("span",{className:"text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 编辑模式"}):d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>a(!0),type:"button","aria-label":"编辑 env 文件",children:[d.jsx(Vp,{size:12,strokeWidth:2.5})," 编辑"]})]}),n?d.jsx(kB,{onClose:()=>{a(!1),t.refetch()}}):t.data&&t.data.exists?d.jsx("dl",{className:"grid grid-cols-[220px_1fr] gap-y-1 text-sm font-[family-name:var(--font-mono)]",children:t.data.entries.map(o=>d.jsxs("div",{className:"contents",children:[d.jsxs("dt",{className:"font-bold flex items-center gap-2",children:[o.masked&&d.jsx("span",{className:"text-[var(--color-stuck)]",children:"🔒"}),o.key]}),d.jsx("dd",{className:"text-[var(--color-text-muted)] truncate",children:o.value})]},o.key))}):d.jsxs("p",{className:"text-[var(--color-text-muted)] text-sm",children:['env 文件不存在。点"编辑"或者终端运行 ',d.jsx("code",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] px-2 py-0.5 rounded font-[family-name:var(--font-mono)]",children:"sps setup"}),"。"]})]}),d.jsx(NB,{})]})}function _B({current:e}){var E;const{confirm:t,alert:n}=li(),[a,s]=O.useState(!1),[o,c]=O.useState(null),f=ot({queryKey:["latest-version"],queryFn:oA,enabled:!1}),[h,m]=O.useState(null),[b,g]=O.useState("npm i -g @coralai/sps-cli@latest"),x=async()=>{var k;if(await t({title:"升级 sps-cli",body:`当前 ${e},升级到 ${(k=f.data)==null?void 0:k.latest}。要求所有 pipeline 已停止。升级后请重启 sps console 生效。`,confirm:"升级"})){s(!0),c(null),m(null);try{const _=await cA();if(c(_.output),m(_.installedVersion),g(_.command),_.ok)n({title:"升级完成",body:`装上了 v${_.installedVersion}。请 \`pkill -f "sps console"\` 再重启以生效。`});else{const A=_.installedVersion&&_.installedVersion===e?`npm 执行完毕但版本没变(仍 ${_.installedVersion})——多半是权限或 registry 问题。可复制下面的命令在终端手动跑。`:"npm 没装上新版本。可复制命令手动跑,或看下面日志定位。";n({title:"升级未生效",body:A})}}catch(_){c(_.message),n({title:"升级失败",body:_.message})}finally{s(!1)}}},v=async()=>{const w=f.data&&!f.data.upToDate?`npm i -g @coralai/sps-cli@${f.data.latest}`:b;try{await navigator.clipboard.writeText(w),n({title:"命令已复制",body:`粘贴到终端运行即可:
|
|
545
|
-
${w}`})}catch{n({title:"复制失败",body:`请手动复制:
|
|
546
|
-
${w}`})}};return d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"版本"}),d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px",fontSize:12},onClick:()=>f.refetch(),disabled:f.isFetching||!e,type:"button","aria-label":"检查最新版本",children:[f.isFetching?d.jsx(Lt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Cl,{size:12,strokeWidth:2.5}),"检查更新"]})]}),d.jsxs("dl",{className:"grid grid-cols-[160px_1fr] gap-y-2 text-sm",children:[d.jsx("dt",{className:"font-bold",children:"sps-cli (当前)"}),d.jsx("dd",{className:"font-[family-name:var(--font-mono)]",children:e??"—"}),f.data&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:"npm (最新)"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2 flex-wrap",children:[f.data.latest,f.data.upToDate?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"最新"}):d.jsxs(d.Fragment,{children:[d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"3px 10px",fontSize:11},onClick:x,disabled:a,type:"button","aria-label":"升级到最新版本",children:[a?d.jsx(Lt,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(nE,{size:11,strokeWidth:2.5}),"升级"]}),d.jsxs("button",{className:"nb-btn",style:{padding:"3px 10px",fontSize:11},onClick:v,type:"button","aria-label":"复制升级命令",title:"自动升级失败时手动跑",children:[d.jsx(HT,{size:11,strokeWidth:2.5})," 复制命令"]})]})]})]}),h&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:"已安装"}),d.jsxs("dd",{className:"font-[family-name:var(--font-mono)] flex items-center gap-2",children:[h,h===((E=f.data)==null?void 0:E.latest)?d.jsx("span",{className:"nb-status",style:{background:"var(--color-running-bg)",color:"var(--color-running)"},children:"已生效(重启 console 后可见)"}):h===e?d.jsx("span",{className:"nb-status",style:{background:"var(--color-stuck-bg)",color:"var(--color-stuck)"},children:"未升级成功"}):null]})]}),f.isError&&d.jsxs(d.Fragment,{children:[d.jsx("dt",{className:"font-bold",children:"检查"}),d.jsx("dd",{className:"text-[var(--color-crashed)] text-xs",children:f.error instanceof Error?f.error.message:String(f.error)})]})]}),o&&d.jsx("pre",{className:"mt-3 text-xs font-[family-name:var(--font-mono)] bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg p-3 max-h-40 overflow-auto whitespace-pre-wrap",children:o})]})}function kB({onClose:e}){const t=qn(),{alert:n}=li(),a=ot({queryKey:["system-env-raw"],queryFn:sA}),[s,o]=O.useState(null),[c,f]=O.useState(null);O.useEffect(()=>{a.data&&s===null&&(o(a.data.content),f(a.data.etag))},[a.data,s]);const h=s!==null&&a.data&&s!==a.data.content,m=Pn({mutationFn:()=>{if(s===null)throw new Error("no draft");return lA(s,c??"")},onSuccess:()=>{t.invalidateQueries({queryKey:["system-env"]}),t.invalidateQueries({queryKey:["system-env-raw"]}),e()},onError:b=>{const g=b.status;n({title:g===409?"env 被其他地方修改了":"保存失败",body:g===409?"请点取消后重开编辑。":b instanceof Error?b.message:String(b)})}});return a.isLoading?d.jsx("p",{className:"text-[var(--color-text-muted)]",children:"加载中…"}):d.jsxs("div",{children:[d.jsx("p",{className:"text-xs text-[var(--color-stuck)] font-bold mb-2",children:"⚠ 文件包含凭证明文。保存时保持 0600 权限。"}),d.jsx("textarea",{className:"nb-input w-full font-[family-name:var(--font-mono)] text-xs",style:{minHeight:320,resize:"vertical"},value:s??"",onChange:b=>o(b.target.value),spellCheck:!1,"aria-label":"env 文件编辑器"}),d.jsxs("div",{className:"flex items-center justify-between mt-3",children:[d.jsxs("span",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:[c?`etag: ${c}`:"",h?" · ● 未保存":""]}),d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("button",{className:"nb-btn",style:{padding:"6px 12px"},onClick:e,disabled:m.isPending,type:"button",children:[d.jsx(wi,{size:12,strokeWidth:3})," 取消"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"6px 12px"},onClick:()=>m.mutate(),disabled:!h||m.isPending,type:"button","aria-label":"保存 env",children:[m.isPending?d.jsx(Lt,{size:12,strokeWidth:3,className:"animate-spin"}):d.jsx(Uf,{size:12,strokeWidth:3}),"保存"]})]})]})]})}function NB(){var g;const{alert:e}=li(),t=ot({queryKey:["projects"],queryFn:_r}),[n,a]=O.useState({}),[s,o]=O.useState({}),[c,f]=O.useState({}),h=(((g=t.data)==null?void 0:g.data)??[]).map(x=>({project:x.name})),m=async(x,v)=>{o(E=>({...E,[x]:v?"fix":"check"}));try{const E=await uA(x,v);a(w=>({...w,[x]:E})),f(w=>({...w,[x]:!0}))}catch(E){e({title:`doctor ${v?"修复":"检查"}失败`,body:E instanceof Error?E.message:String(E)})}finally{o(E=>({...E,[x]:null}))}},b=async()=>{for(const x of h)await m(x.project,!1)};return d.jsxs("section",{className:"nb-card",children:[d.jsxs("div",{className:"flex items-center justify-between mb-3",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] text-xl font-bold",children:"项目健康检查"}),d.jsxs("button",{className:"nb-btn nb-btn-mint",style:{padding:"6px 12px",fontSize:12},onClick:()=>{b()},disabled:h.length===0||Object.values(s).some(Boolean),type:"button",children:[d.jsx(Cl,{size:12,strokeWidth:2.5}),"检查全部"]})]}),h.length===0?d.jsx("p",{className:"text-[var(--color-text-muted)] text-sm",children:"还没有项目。"}):d.jsx("ul",{className:"flex flex-col gap-2",children:h.map(x=>{const v=n[x.project],E=s[x.project],w=v?v.checks.filter(T=>T.status==="fail").length:0,k=v?v.checks.filter(T=>T.status==="warn").length:0,_=c[x.project]??!1,A=v!=null;return d.jsxs("li",{className:"bg-[var(--color-bg-cream)] border-2 border-[var(--color-text)] rounded-lg",children:[d.jsxs("div",{className:"flex items-center gap-3 px-3 py-2",children:[d.jsxs("button",{type:"button",onClick:()=>f(T=>({...T,[x.project]:!_})),disabled:!A,className:"flex items-center gap-2 flex-1 text-left min-w-0","aria-label":_?"折叠":"展开",children:[A&&v.ok?d.jsx(fp,{size:16,className:"text-[var(--color-running)] shrink-0",strokeWidth:2.5}):A?d.jsx(rc,{size:16,className:"text-[var(--color-stuck)] shrink-0",strokeWidth:2.5}):d.jsx(fp,{size:16,className:"text-[var(--color-text-subtle)] shrink-0",strokeWidth:2.5}),A&&(_?d.jsx(vc,{size:12}):d.jsx(Bf,{size:12})),d.jsx("span",{className:"font-bold font-[family-name:var(--font-mono)]",children:x.project}),A?v.ok?d.jsx("span",{className:"text-xs text-[var(--color-running)] font-semibold",children:"OK"}):d.jsxs("span",{className:"text-xs text-[var(--color-stuck)] font-semibold",children:[w," fail · ",k," warn"]}):d.jsx("span",{className:"text-xs text-[var(--color-text-muted)]",children:'点 "检查" 运行 sps doctor'})]}),d.jsxs("button",{className:"nb-btn",style:{padding:"4px 10px",fontSize:11},onClick:()=>{m(x.project,!1)},disabled:!!E,type:"button","aria-label":"检查",children:[E==="check"?d.jsx(Lt,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(Cl,{size:11,strokeWidth:2.5}),"检查"]}),d.jsxs("button",{className:"nb-btn nb-btn-primary",style:{padding:"4px 10px",fontSize:11},onClick:()=>{m(x.project,!0)},disabled:!!E||A&&v.ok,type:"button","aria-label":"自动修复",title:A&&v.ok?"已无可修问题":"调 sps doctor <proj> --fix:自动创建 .claude/hooks/stop.sh、state.json 等",children:[E==="fix"?d.jsx(Lt,{size:11,strokeWidth:3,className:"animate-spin"}):d.jsx(fE,{size:11,strokeWidth:2.5}),"修复"]})]}),_&&A&&d.jsxs("div",{className:"border-t-2 border-dashed border-[var(--color-text)] px-3 py-2",children:[d.jsx("ul",{className:"flex flex-col gap-1 text-xs font-[family-name:var(--font-mono)]",children:v.checks.map((T,j)=>d.jsx(TB,{check:T},`${T.name}-${j}`))}),v.fixes.length>0&&d.jsxs("div",{className:"mt-3 bg-[var(--color-running-bg)] border-2 border-[var(--color-running)] rounded p-2",children:[d.jsx("div",{className:"text-xs font-bold text-[var(--color-running)] mb-1",children:"已修复"}),d.jsx("ul",{className:"text-xs list-disc pl-4",children:v.fixes.map((T,j)=>d.jsx("li",{children:T},j))})]})]})]},x.project)})})]})}function TB({check:e}){const t=e.status==="pass"?d.jsx(fp,{size:12,className:"text-[var(--color-running)]",strokeWidth:2.5}):e.status==="fail"?d.jsx(rc,{size:12,className:"text-[var(--color-crashed)]",strokeWidth:2.5}):e.status==="warn"?d.jsx(rc,{size:12,className:"text-[var(--color-stuck)]",strokeWidth:2.5}):d.jsx("span",{className:"w-3 h-3 rounded-full bg-[var(--color-text-subtle)] inline-block"});return d.jsxs("li",{className:"flex items-start gap-2",children:[d.jsx("span",{className:"pt-0.5 shrink-0",children:t}),d.jsx("span",{className:"font-bold w-32 shrink-0",children:e.name}),d.jsx("span",{className:"text-[var(--color-text-muted)] break-words",children:e.message})]})}function CB(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 AB(){return Ft("/api/chat/sessions")}function OB(e){return Ft(`/api/chat/sessions/${e}`)}async function Gm(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 RB(e){const t=await fetch(`/api/chat/sessions/${e}`,{method:"DELETE"});if(!t.ok)throw new Error(`${t.status}`)}async function MB(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 jB(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 DB(e,t){const n=t?`?since=${encodeURIComponent(t)}`:"";return Ft(`/api/chat/sessions/${e}/messages${n}`)}function o1(){var q,ce,V,be,R,D,X,C;const{sessionId:e}=K1(),t=wr(),n=qn(),{confirm:a,alert:s}=li(),o=ot({queryKey:["chat-sessions"],queryFn:AB}),c=ot({queryKey:["chat-session",e],queryFn:()=>OB(e??""),enabled:!!e}),[f,h]=O.useState(null),[m,b]=O.useState(""),[g,x]=O.useState(!1),v=O.useRef(null),[E,w]=O.useState(!1),[k,_]=O.useState([]),[A,T]=O.useState(!1),[j,$]=O.useState(!1),[M,F]=O.useState(!1),[H,ee]=O.useState(null);O.useEffect(()=>{if(!e)return;const G=new EventSource(`/stream/chat/${encodeURIComponent(e)}`);let de=!0;return G.addEventListener("open",()=>{if(de){de=!1;return}const re=n.getQueryData(["chat-session",e]),K=re!=null&&re.messages.length?re.messages[re.messages.length-1].ts:void 0;DB(e,K).then(ue=>{ue.data.length!==0&&n.setQueryData(["chat-session",e],Se=>{if(!Se)return Se;const Ze=new Set(Se.messages.map(Kn=>Kn.id)),it=ue.data.filter(Kn=>!Ze.has(Kn.id));return it.length===0?Se:{...Se,messages:[...Se.messages,...it],lastMessageAt:it[it.length-1].ts,messageCount:Se.messageCount+it.length}})}).catch(()=>{})}),G.addEventListener("chat.message",re=>{try{const K=JSON.parse(re.data);n.setQueryData(["chat-session",e],ue=>{if(!ue||ue.messages.some(it=>it.id===K.message.id))return ue;const Ze=ue.messages.findIndex(it=>it.role==="user"&&it.id.startsWith("optim-")&&it.content===K.message.content);if(Ze>=0){const it=[...ue.messages];return it[Ze]=K.message,{...ue,messages:it}}return{...ue,messages:[...ue.messages,K.message]}})}catch{}}),G.addEventListener("chat.message.pending",re=>{try{const K=JSON.parse(re.data);h({id:K.assistantId,blocks:[],done:!1,finalMessage:null})}catch{}}),G.addEventListener("chat.message.chunk.text",re=>{try{const K=JSON.parse(re.data);h(ue=>{if(!ue||ue.id!==K.assistantId)return ue;const Se=[...ue.blocks],Ze=Se[Se.length-1];return Ze&&Ze.type==="text"?Se[Se.length-1]={...Ze,target:Ze.target+K.text}:Se.push({type:"text",target:K.text,displayed:""}),{...ue,blocks:Se}})}catch{}}),G.addEventListener("chat.message.chunk.tool_use",re=>{try{const K=JSON.parse(re.data);h(ue=>!ue||ue.id!==K.assistantId?ue:{...ue,blocks:[...ue.blocks,{type:"tool_use",id:K.id,title:K.title,kind:K.kind,status:K.status}]})}catch{}}),G.addEventListener("chat.message.chunk.tool_update",re=>{try{const K=JSON.parse(re.data);h(ue=>!ue||ue.id!==K.assistantId?ue:{...ue,blocks:ue.blocks.map(Se=>Se.type==="tool_use"&&Se.id===K.id?{...Se,status:K.status}:Se)})}catch{}}),G.addEventListener("chat.message.complete",re=>{try{const K=JSON.parse(re.data);h(ue=>ue&&ue.id===K.assistantId?{...ue,done:!0,finalMessage:K.message}:ue)}catch{}}),()=>G.close()},[e,n]),O.useEffect(()=>{if(!f)return;const G=f.blocks.reduce((re,K)=>K.type==="text"?re+(K.target.length-K.displayed.length):re,0);if(G<=0){if(f.done&&f.finalMessage){const re=f.finalMessage;n.setQueryData(["chat-session",e],K=>!K||K.messages.some(ue=>ue.id===re.id)?K:{...K,messages:[...K.messages,re],lastMessageAt:re.ts,messageCount:K.messageCount+1}),n.invalidateQueries({queryKey:["chat-sessions"]}),h(null),x(!1)}return}const de=setTimeout(()=>{h(re=>{if(!re)return re;let K=Math.max(1,Math.ceil(G/40));const ue=re.blocks.map(Se=>{if(Se.type!=="text"||K<=0)return Se;const Ze=Se.target.length-Se.displayed.length;if(Ze<=0)return Se;const it=Math.min(Ze,K);return K-=it,{...Se,displayed:Se.target.slice(0,Se.displayed.length+it)}});return{...re,blocks:ue}})},25);return()=>clearTimeout(de)},[f,n,e]),O.useEffect(()=>{const G=v.current;G&&(G.scrollTop=G.scrollHeight)},[c.data,f]);const L=O.useCallback(async(G={})=>{var de,re;try{const K=await Gm({cwd:((de=G.cwd)==null?void 0:de.trim())||void 0,title:((re=G.title)==null?void 0:re.trim())||void 0});n.invalidateQueries({queryKey:["chat-sessions"]}),t(`/chat/${K.id}`),w(!1)}catch(K){s({title:"新建对话失败",body:K instanceof Error?K.message:String(K)})}},[n,t,s]),J=O.useCallback(async()=>{const G=m.trim();if(!G&&k.length===0||g)return;let de=e;if(!de){const ue=await Gm();n.invalidateQueries({queryKey:["chat-sessions"]}),de=ue.id,t(`/chat/${de}`,{replace:!0})}const re=k.map(ue=>ue.path),K={id:`optim-${Date.now()}`,role:"user",content:G||"(附件)",ts:new Date().toISOString(),status:"complete",attachments:re.length>0?re:void 0};n.setQueryData(["chat-session",de],ue=>ue?{...ue,messages:[...ue.messages,K],lastMessageAt:K.ts,messageCount:ue.messageCount+1}:{id:de,createdAt:K.ts,lastMessageAt:K.ts,title:G.slice(0,60)||"附件",project:null,messageCount:1,messages:[K]}),b(""),_([]),x(!0);try{await MB(de,G||"(请查看附件)",re.length>0?re:void 0)}catch(ue){x(!1),console.error("sendMessage failed",ue),s({title:"发送失败",body:ue instanceof Error?ue.message:String(ue)})}},[m,k,g,e,n,t,s]),ae=O.useCallback(async G=>{if(G.size>hE){s({title:"文件超过上限",body:`单文件上限 50 MB;当前 ${(G.size/1024/1024).toFixed(2)} MB(${G.name})`});return}let de=e;if(!de){const re=await Gm();n.invalidateQueries({queryKey:["chat-sessions"]}),de=re.id,t(`/chat/${de}`,{replace:!0})}T(!0);try{const re=await DA(de,G);_(K=>[...K,{path:re.path,name:re.name}])}catch(re){s({title:"附件上传失败",body:re instanceof Error?re.message:String(re)})}finally{T(!1)}},[e,n,t,s]),ge=O.useCallback(G=>{_(de=>de.filter(re=>re.path!==G))},[]),fe=O.useCallback(async G=>{await a({title:"删除对话",body:"对话记录会永久删除,不可恢复。",confirm:"删除",danger:!0})&&(await RB(G),n.invalidateQueries({queryKey:["chat-sessions"]}),e===G&&t("/chat"))},[n,e,t,a]),te=O.useCallback(async()=>{if(e)try{await jB(e)}catch(G){s({title:"中断失败",body:G instanceof Error?G.message:String(G)})}},[e,s]);return d.jsxs("div",{className:"grid grid-cols-[260px_1fr] gap-4 h-[calc(100vh-140px)]",children:[d.jsxs("aside",{className:"nb-card p-3 overflow-auto flex flex-col gap-2",children:[d.jsxs("button",{className:"nb-btn nb-btn-primary w-full justify-center",onClick:()=>w(!0),type:"button",children:[d.jsx(zi,{size:14,strokeWidth:3}),"新建对话"]}),d.jsxs("div",{className:"mt-2 text-xs font-[family-name:var(--font-heading)] uppercase tracking-wider text-[var(--color-text-muted)] px-2",children:["历史 ",((q=o.data)==null?void 0:q.data.length)??0]}),d.jsxs("div",{className:"flex flex-col gap-1.5 mt-1",children:[(((ce=o.data)==null?void 0:ce.data)??[]).map(G=>d.jsxs("div",{className:["group flex items-start gap-2 p-2 rounded-lg border-2 border-transparent",e===G.id?"bg-[var(--color-accent-mint)] border-[var(--color-text)] shadow-[2px_2px_0_var(--color-text)]":"hover:bg-[var(--color-bg-cream)] hover:border-[var(--color-text)]"].join(" "),children:[d.jsxs("button",{type:"button","aria-label":`打开对话 ${G.title}${G.cwd?`(工作目录 ${G.cwd})`:""}`,onClick:()=>t(`/chat/${G.id}`),className:"flex items-start gap-2 flex-1 min-w-0 text-left",children:[d.jsx(Qv,{size:14,strokeWidth:2.5,className:"mt-0.5 flex-shrink-0"}),d.jsxs("div",{className:"flex-1 min-w-0",children:[d.jsx("p",{className:"text-sm font-semibold truncate",children:G.title}),d.jsxs("p",{className:"text-[10px] text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] truncate",children:[G.messageCount," msg · ",Pw(G.lastMessageAt??G.createdAt)]}),G.cwd&&d.jsxs("p",{className:"text-[10px] text-[var(--color-text-subtle)] font-[family-name:var(--font-mono)] truncate flex items-center gap-1",title:G.cwd,children:[d.jsx(lc,{size:9,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",dir:"rtl",children:G.cwd})]})]})]}),d.jsx("button",{type:"button","aria-label":"删除对话",className:"opacity-0 group-hover:opacity-100 p-1 hover:text-[var(--color-crashed)]",onClick:de=>{de.stopPropagation(),fe(G.id)},children:d.jsx(zl,{size:12})})]},G.id)),(((V=o.data)==null?void 0:V.data)??[]).length===0&&d.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic text-center py-4",children:"还没对话。点上面新建。"})]})]}),d.jsx("div",{className:"nb-card p-0 flex flex-col overflow-hidden",children:e?d.jsxs(d.Fragment,{children:[d.jsxs("header",{className:"px-4 py-3 border-b-2 border-[var(--color-text)] bg-[var(--color-bg-cream)]",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:((be=c.data)==null?void 0:be.title)??"新对话"}),d.jsx("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)]",children:e}),((R=c.data)==null?void 0:R.cwd)&&d.jsxs("p",{className:"text-xs text-[var(--color-text-muted)] font-[family-name:var(--font-mono)] flex items-center gap-1 mt-1",title:c.data.cwd,children:[d.jsx(lc,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate",children:c.data.cwd})]})]}),d.jsxs("div",{ref:v,className:"flex-1 overflow-auto p-4 flex flex-col gap-4",children:[(((D=c.data)==null?void 0:D.messages)??[]).map(G=>d.jsx(IB,{msg:G,sessionId:e??null,onPreviewAttachment:de=>ee(de)},G.id)),f&&d.jsx(UB,{pending:f}),!c.isLoading&&(((X=c.data)==null?void 0:X.messages)??[]).length===0&&!f&&!g&&d.jsx("p",{className:"text-center text-[var(--color-text-subtle)] italic mt-12",children:"下方输入问题开始对话 · Enter 发送 · Shift+Enter 换行"})]}),d.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:G=>{G.dataTransfer.types.includes("Files")&&(G.preventDefault(),G.dataTransfer.dropEffect="copy",M||F(!0))},onDragLeave:()=>F(!1),onDrop:G=>{if(!G.dataTransfer.types.includes("Files"))return;G.preventDefault(),F(!1);const de=Array.from(G.dataTransfer.files??[]);for(const re of de)ae(re)},children:[(k.length>0||A)&&d.jsxs("div",{className:"flex flex-wrap gap-2 mb-2",children:[k.map(G=>d.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(G.path),title:`${G.name}
|
|
547
|
-
${G.path}
|
|
548
|
-
点击预览`,children:[jf(G.path)?d.jsx(hC,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}):d.jsx(Ec,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate max-w-[180px]",children:G.name}),d.jsx("span",{role:"button","aria-label":`移除 ${G.name}`,className:"ml-1 hover:text-[var(--color-crashed)] cursor-pointer",onClick:de=>{de.stopPropagation(),ge(G.path)},children:d.jsx(wi,{size:11,strokeWidth:3})})]},G.path)),A&&d.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:[d.jsx(Lt,{size:11,strokeWidth:2.5,className:"animate-spin"}),"上传中..."]})]}),d.jsxs("div",{className:"flex gap-2 items-end",children:[d.jsx("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>$(!0),disabled:g,"aria-label":"附加本地文件",title:"附加本地文件(也可拖拽 / 粘贴图片)",children:d.jsx(kC,{size:14,strokeWidth:2.5})}),d.jsx("textarea",{className:"nb-input flex-1 resize-none",placeholder:M?"松开鼠标以附加文件…":"说点什么… (Enter 发送,Shift+Enter 换行,可拖入文件 / 粘贴图片)",rows:2,value:m,onChange:G=>b(G.target.value),onKeyDown:G=>{G.key==="Enter"&&!G.shiftKey&&!G.nativeEvent.isComposing&&(G.preventDefault(),J())},onPaste:G=>{const re=Array.from(G.clipboardData.items??[]).filter(K=>K.kind==="file"&&K.type.startsWith("image/"));if(re.length!==0){G.preventDefault();for(const K of re){const ue=K.getAsFile();ue&&ae(ue)}}},"aria-label":"消息输入"}),f?d.jsxs("button",{className:"nb-btn nb-btn-danger",onClick:te,type:"button","aria-label":"中断生成",children:[d.jsx(lE,{size:14,strokeWidth:3}),"中断"]}):d.jsxs("button",{className:"nb-btn nb-btn-primary",onClick:J,disabled:!m.trim()&&k.length===0||g,type:"button","aria-label":"发送",children:[g?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(IC,{size:14,strokeWidth:3}),"发送"]})]})]})]}):d.jsx("div",{className:"flex-1 flex items-center justify-center p-8",children:d.jsxs("div",{className:"text-center max-w-md",children:[d.jsx("div",{className:"w-20 h-20 rounded-2xl bg-[var(--color-accent-mint)] border-[3px] border-[var(--color-text)] shadow-[3px_3px_0_var(--color-text)] flex items-center justify-center mx-auto mb-4",children:d.jsx(Qv,{size:32,strokeWidth:2.5})}),d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-2xl font-bold mb-2",children:"对话 💬"}),d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] mb-4",children:'点左上角"新建对话"开始一个 session。或直接在下方输入,会自动建 session。'}),d.jsx("p",{className:"text-xs text-[var(--color-text-subtle)] italic",children:"Enter 发送 · Shift+Enter 换行 · 内容流式返回"})]})})}),E&&d.jsx(zB,{onCancel:()=>w(!1),onCreate:G=>L(G)}),j&&d.jsx(Xp,{mode:"file",title:"选择附件文件",initialPath:((C=c.data)==null?void 0:C.cwd)??void 0,onCancel:()=>$(!1),onSelect:G=>{_(de=>{if(de.some(K=>K.path===G))return de;const re=G.split(/[\\/]/).pop()||G;return[...de,{path:G,name:re}]}),$(!1)}}),H&&e&&d.jsx(LB,{sessionId:e,path:H,onClose:()=>ee(null)})]})}function jf(e){return/\.(png|jpe?g|gif|webp|svg|avif)$/i.test(e)}function c1(e){return/\.pdf$/i.test(e)}function Qm(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 LB({sessionId:e,path:t,onClose:n}){const[a,s]=O.useState(null),[o,c]=O.useState(null);O.useEffect(()=>{const m=b=>{b.key==="Escape"&&(b.preventDefault(),n())};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[n]),O.useEffect(()=>{if(!Qm(t))return;let m=!1;return fetch(hp(e,t)).then(async b=>{if(!b.ok)throw new Error(`${b.status}`);return b.text()}).then(b=>{m||s(b.length>2e5?b.slice(0,2e5)+`
|
|
549
|
-
|
|
550
|
-
…(truncated)`:b)}).catch(b=>{m||c(b instanceof Error?b.message:String(b))}),()=>{m=!0}},[e,t]);const f=hp(e,t),h=t.split(/[\\/]/).pop()??t;return d.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:d.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":`预览 ${h}`,children:[d.jsxs("header",{className:"flex items-center justify-between mb-3 shrink-0",children:[d.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[d.jsx(QT,{size:16,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("h3",{className:"font-[family-name:var(--font-heading)] font-bold text-base truncate",children:h})]}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded flex-shrink-0",onClick:n,"aria-label":"关闭",children:d.jsx(wi,{size:16,strokeWidth:3})})]}),d.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}),d.jsxs("div",{className:"flex-1 overflow-auto border-2 border-[var(--color-text)] rounded-lg bg-[var(--color-bg-cream)] min-h-0",children:[jf(t)&&d.jsx("div",{className:"flex items-center justify-center p-4",children:d.jsx("img",{src:f,alt:`Preview: ${h}`,className:"max-w-full max-h-[60vh] object-contain"})}),c1(t)&&d.jsx("iframe",{src:f,title:`PDF: ${h}`,className:"w-full",style:{height:"60vh",border:0}}),Qm(t)&&d.jsx("pre",{className:"p-3 text-xs font-[family-name:var(--font-mono)] whitespace-pre-wrap break-words",children:o?d.jsxs("span",{className:"text-[var(--color-crashed)]",children:["读取失败: ",o]}):a===null?d.jsx("span",{className:"text-[var(--color-text-muted)]",children:"加载中..."}):a}),!jf(t)&&!c1(t)&&!Qm(t)&&d.jsxs("div",{className:"p-6 text-center text-sm text-[var(--color-text-muted)]",children:[d.jsx("p",{className:"mb-3",children:"此文件类型不支持内联预览。"}),d.jsx("a",{href:f,download:h,className:"nb-btn nb-btn-primary inline-flex",children:"下载"})]})]})]})})}function zB({onCancel:e,onCreate:t}){const[n,a]=O.useState(""),[s,o]=O.useState(""),[c,f]=O.useState(!1),[h,m]=O.useState(!1);O.useEffect(()=>{if(h)return;const g=x=>{x.key==="Escape"&&(x.preventDefault(),e())};return window.addEventListener("keydown",g),()=>window.removeEventListener("keydown",g)},[e,h]);const b=async()=>{if(!c){f(!0);try{t({title:n.trim()||void 0,cwd:s.trim()||void 0})}finally{f(!1)}}};return d.jsxs("div",{className:"fixed inset-0 z-40 flex items-center justify-center bg-[rgba(45,55,72,0.4)] p-4",role:"presentation",children:[d.jsxs("div",{className:"nb-card bg-[var(--color-bg)] max-w-md w-full p-5",role:"dialog","aria-modal":"true","aria-label":"新建对话",children:[d.jsxs("header",{className:"flex items-center justify-between mb-4",children:[d.jsx("h2",{className:"font-[family-name:var(--font-heading)] font-bold text-lg",children:"新建对话"}),d.jsx("button",{type:"button",className:"p-1 hover:bg-[var(--color-bg-cream)] rounded",onClick:e,"aria-label":"关闭",children:d.jsx(wi,{size:16,strokeWidth:3})})]}),d.jsxs("div",{className:"flex flex-col gap-4",children:[d.jsxs("div",{children:[d.jsx("label",{htmlFor:"new-session-title",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"标题(可选)"}),d.jsx("input",{id:"new-session-title",type:"text",className:"nb-input w-full",placeholder:"留空 = 自动用首条消息生成",value:n,onChange:g=>a(g.target.value),autoFocus:!0})]}),d.jsxs("div",{children:[d.jsx("label",{htmlFor:"new-session-cwd",className:"block text-xs font-bold mb-1.5 uppercase tracking-wider",children:"工作目录(可选)"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:"new-session-cwd",type:"text",className:"nb-input flex-1 font-[family-name:var(--font-mono)] text-sm",placeholder:"/home/coral/projects/my-app",value:s,onChange:g=>o(g.target.value)}),d.jsxs("button",{type:"button",className:"nb-btn flex-shrink-0",onClick:()=>m(!0),"aria-label":"浏览选择目录",title:"浏览选择目录",children:[d.jsx(iE,{size:14,strokeWidth:2.5}),"浏览"]})]}),d.jsxs("p",{className:"text-[11px] text-[var(--color-text-muted)] mt-1.5 leading-relaxed",children:[d.jsx(lc,{size:10,strokeWidth:2.5,className:"inline mr-1 -mt-0.5"}),"Agent 在该目录下读写文件。绝对路径,必须存在。 留空则用 daemon 启动时的目录。"]})]}),d.jsxs("div",{className:"flex gap-2 justify-end pt-2",children:[d.jsx("button",{type:"button",className:"nb-btn",onClick:e,children:"取消"}),d.jsxs("button",{type:"button",className:"nb-btn nb-btn-primary",onClick:b,disabled:c,children:[c?d.jsx(Lt,{size:14,strokeWidth:3,className:"animate-spin"}):d.jsx(zi,{size:14,strokeWidth:3}),"创建"]})]})]})]}),h&&d.jsx(Xp,{initialPath:s.trim()||void 0,onCancel:()=>m(!1),onSelect:g=>{o(g),m(!1)}})]})}function IB({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 d.jsx("div",{className:a?"self-end max-w-3xl":"self-start max-w-3xl",children:d.jsxs("div",{className:["nb-card",a?"bg-[var(--color-secondary)]":s?"bg-[var(--color-crashed-bg)]":"bg-[var(--color-bg)]"].join(" "),children:[d.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:[a?"你":s?"错误":"assistant",d.jsx("span",{className:"font-normal",children:"·"}),d.jsx("span",{className:"font-normal",children:Pw(e.ts)})]}),d.jsx("div",{className:"flex flex-col gap-2",children:o.map((f,h)=>d.jsx($B,{block:f},h))}),c.length>0&&t&&d.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(f=>d.jsx(BB,{sessionId:t,path:f,onPreview:()=>n(f)},f))}),e.truncated&&d.jsx("p",{className:"mt-3 px-3 py-2 bg-[var(--color-stuck-bg)] border-2 border-[var(--color-stuck)] rounded-lg text-xs text-[var(--color-stuck)] font-bold",children:"⚠ 输出超过 10MB,已截断"})]})})}function BB({sessionId:e,path:t,onPreview:n}){const a=t.split(/[\\/]/).pop()??t;return jf(t)?d.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}
|
|
551
|
-
点击放大`,children:d.jsx("img",{src:hp(e,t),alt:a,className:"block max-h-40 max-w-[12rem] object-cover",loading:"lazy"})}):d.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}
|
|
552
|
-
${t}
|
|
553
|
-
点击预览`,children:[d.jsx(Ec,{size:11,strokeWidth:2.5,className:"flex-shrink-0"}),d.jsx("span",{className:"truncate max-w-[200px]",children:a})]})}function UB({pending:e}){const t=(()=>{for(let n=e.blocks.length-1;n>=0;n--)if(e.blocks[n].type==="text")return n;return-1})();return d.jsx("div",{className:"self-start max-w-3xl",children:d.jsxs("div",{className:"nb-card bg-[var(--color-bg)]",children:[d.jsxs("p",{className:"text-xs font-bold uppercase tracking-wider text-[var(--color-text-muted)] mb-2 flex items-center gap-2",children:["assistant",d.jsx("span",{className:"font-normal",children:"·"}),d.jsxs("span",{className:"flex items-center gap-1 font-normal text-[var(--color-running)]",children:[d.jsx(Lt,{size:10,strokeWidth:3,className:"animate-spin"}),"streaming"]})]}),d.jsxs("div",{className:"flex flex-col gap-2",children:[e.blocks.length===0&&d.jsx("p",{className:"text-sm text-[var(--color-text-muted)] italic",children:"…"}),e.blocks.map((n,a)=>{if(n.type==="text"){const s=a===t;return d.jsxs("div",{className:"relative",children:[d.jsx($w,{text:n.displayed}),s&&d.jsx("span",{className:"inline-block w-2 h-4 ml-1 bg-[var(--color-text)] animate-pulse align-middle"})]},a)}return d.jsx(Fw,{tool:n},a)})]})]})})}function $B({block:e}){return e.type==="text"?d.jsx($w,{text:e.text}):d.jsx(Fw,{tool:e})}function $w({text:e}){return e?d.jsx("div",{className:"text-sm font-[family-name:var(--font-body)] break-words prose-chat",children:d.jsx(Rg,{remarkPlugins:[Lg],rehypePlugins:[Bg],children:e})}):null}function Fw({tool:e}){const[t,n]=O.useState(!1),a=e.status==="completed",s=e.status==="failed",o=!a&&!s;return d.jsxs("div",{className:"border-2 border-[var(--color-text)] rounded-lg overflow-hidden bg-[var(--color-bg-cream)]",children:[d.jsxs("button",{type:"button",onClick:()=>n(c=>!c),className:"w-full flex items-center gap-2 px-3 py-2 text-xs font-[family-name:var(--font-mono)] hover:bg-[var(--color-accent-yellow)] transition-colors",children:[d.jsx(Bf,{size:12,strokeWidth:3,className:["transition-transform",t?"rotate-90":""].join(" ")}),d.jsx(fE,{size:12,strokeWidth:2.5}),d.jsx("span",{className:"font-bold",children:e.kind}),d.jsx("span",{className:"flex-1 text-left text-[var(--color-text-muted)] truncate",children:e.title}),o&&d.jsx(Lt,{size:12,strokeWidth:3,className:"animate-spin text-[var(--color-running)]"}),a&&d.jsx(sc,{size:12,strokeWidth:2.5,className:"text-[var(--color-running)]"}),s&&d.jsx($T,{size:12,strokeWidth:2.5,className:"text-[var(--color-crashed)]"})]}),t&&d.jsxs("div",{className:"px-3 py-2 text-xs font-[family-name:var(--font-mono)] text-[var(--color-text-muted)] border-t-2 border-[var(--color-text)]",children:[d.jsxs("div",{children:["id: ",d.jsx("span",{className:"text-[var(--color-text)]",children:e.id})]}),d.jsxs("div",{children:["status: ",d.jsx("span",{className:"text-[var(--color-text)]",children:e.status})]})]})]})}function Pw(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 FB(){return d.jsxs("div",{className:"nb-card max-w-2xl mt-12",children:[d.jsx("h1",{className:"font-[family-name:var(--font-heading)] text-4xl font-bold mb-2",children:"404 · 页面不存在"}),d.jsx("p",{className:"text-[var(--color-text-muted)] mb-6",children:"没找到这个页面。可能是链接过期了。"}),d.jsx(ds,{to:"/",className:"nb-btn nb-btn-mint inline-flex",children:"返回首页"})]})}function PB(){return d.jsx(TA,{children:d.jsx(F2,{children:d.jsxs(In,{element:d.jsx(kA,{}),children:[d.jsx(In,{index:!0,element:d.jsx(B2,{to:"/projects",replace:!0})}),d.jsx(In,{path:"/projects",element:d.jsx(CA,{})}),d.jsx(In,{path:"/projects/new",element:d.jsx(UA,{})}),d.jsx(In,{path:"/projects/:name",element:d.jsx(ZO,{})}),d.jsx(In,{path:"/board",element:d.jsx(BR,{})}),d.jsx(In,{path:"/workers",element:d.jsx(JR,{})}),d.jsx(In,{path:"/logs",element:d.jsx(aM,{})}),d.jsx(In,{path:"/skills",element:d.jsx(EB,{})}),d.jsx(In,{path:"/system",element:d.jsx(wB,{})}),d.jsx(In,{path:"/chat",element:d.jsx(o1,{})}),d.jsx(In,{path:"/chat/:sessionId",element:d.jsx(o1,{})}),d.jsx(In,{path:"*",element:d.jsx(FB,{})})]})})})}NA();const qB=new CN({defaultOptions:{queries:{staleTime:3e4,refetchOnWindowFocus:!1}}}),qw=document.getElementById("root");if(!qw)throw new Error("#root not found");iN.createRoot(qw).render(d.jsx(O.StrictMode,{children:d.jsx(AN,{client:qB,children:d.jsx(dT,{children:d.jsx(zA,{children:d.jsx(PB,{})})})})}));
|