vibe-coding-master 0.5.3 → 0.5.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/backend/services/session-service.js +20 -6
- package/dist-frontend/assets/index-BM6nSKae.css +32 -0
- package/dist-frontend/assets/{index-C9M91JWD.js → index-C0CdYJxv.js} +32 -32
- package/dist-frontend/index.html +2 -2
- package/package.json +1 -1
- package/dist-frontend/assets/index-7OGOxmjw.css +0 -32
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var
|
|
1
|
+
var T0=Object.defineProperty;var R0=(n,r,s)=>r in n?T0(n,r,{enumerable:!0,configurable:!0,writable:!0,value:s}):n[r]=s;var Em=(n,r,s)=>R0(n,typeof r!="symbol"?r+"":r,s);(function(){const r=document.createElement("link").relList;if(r&&r.supports&&r.supports("modulepreload"))return;for(const d of document.querySelectorAll('link[rel="modulepreload"]'))l(d);new MutationObserver(d=>{for(const m of d)if(m.type==="childList")for(const f of m.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function s(d){const m={};return d.integrity&&(m.integrity=d.integrity),d.referrerPolicy&&(m.referrerPolicy=d.referrerPolicy),d.crossOrigin==="use-credentials"?m.credentials="include":d.crossOrigin==="anonymous"?m.credentials="omit":m.credentials="same-origin",m}function l(d){if(d.ep)return;d.ep=!0;const m=s(d);fetch(d.href,m)}})();function Yg(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Hu={exports:{}},Ba={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@ var R0=Object.defineProperty;var D0=(n,r,s)=>r in n?R0(n,r,{enumerable:!0,config
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var km;function
|
|
9
|
+
*/var km;function D0(){if(km)return Ba;km=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.fragment");function s(l,d,m){var f=null;if(m!==void 0&&(f=""+m),d.key!==void 0&&(f=""+d.key),"key"in d){m={};for(var o in d)o!=="key"&&(m[o]=d[o])}else m=d;return d=m.ref,{$$typeof:n,type:l,key:f,ref:d!==void 0?d:null,props:m}}return Ba.Fragment=r,Ba.jsx=s,Ba.jsxs=s,Ba}var Am;function M0(){return Am||(Am=1,Hu.exports=D0()),Hu.exports}var x=M0(),zu={exports:{}},Be={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react.production.js
|
|
12
12
|
*
|
|
@@ -14,7 +14,7 @@ var R0=Object.defineProperty;var D0=(n,r,s)=>r in n?R0(n,r,{enumerable:!0,config
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Tm;function
|
|
17
|
+
*/var Tm;function L0(){if(Tm)return Be;Tm=1;var n=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),m=Symbol.for("react.consumer"),f=Symbol.for("react.context"),o=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),u=Symbol.for("react.activity"),b=Symbol.iterator;function C(N){return N===null||typeof N!="object"?null:(N=b&&N[b]||N["@@iterator"],typeof N=="function"?N:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function v(N,$,I){this.props=N,this.context=$,this.refs=S,this.updater=I||T}v.prototype.isReactComponent={},v.prototype.setState=function(N,$){if(typeof N!="object"&&typeof N!="function"&&N!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,N,$,"setState")},v.prototype.forceUpdate=function(N){this.updater.enqueueForceUpdate(this,N,"forceUpdate")};function _(){}_.prototype=v.prototype;function y(N,$,I){this.props=N,this.context=$,this.refs=S,this.updater=I||T}var A=y.prototype=new _;A.constructor=y,E(A,v.prototype),A.isPureReactComponent=!0;var L=Array.isArray;function D(){}var R={H:null,A:null,T:null,S:null},k=Object.prototype.hasOwnProperty;function M(N,$,I){var re=I.ref;return{$$typeof:n,type:N,key:$,ref:re!==void 0?re:null,props:I}}function j(N,$){return M(N.type,$,N.props)}function H(N){return typeof N=="object"&&N!==null&&N.$$typeof===n}function U(N){var $={"=":"=0",":":"=2"};return"$"+N.replace(/[=:]/g,function(I){return $[I]})}var F=/\/+/g;function K(N,$){return typeof N=="object"&&N!==null&&N.key!=null?U(""+N.key):$.toString(36)}function Y(N){switch(N.status){case"fulfilled":return N.value;case"rejected":throw N.reason;default:switch(typeof N.status=="string"?N.then(D,D):(N.status="pending",N.then(function($){N.status==="pending"&&(N.status="fulfilled",N.value=$)},function($){N.status==="pending"&&(N.status="rejected",N.reason=$)})),N.status){case"fulfilled":return N.value;case"rejected":throw N.reason}}throw N}function G(N,$,I,re,ve){var pe=typeof N;(pe==="undefined"||pe==="boolean")&&(N=null);var Q=!1;if(N===null)Q=!0;else switch(pe){case"bigint":case"string":case"number":Q=!0;break;case"object":switch(N.$$typeof){case n:case r:Q=!0;break;case p:return Q=N._init,G(Q(N._payload),$,I,re,ve)}}if(Q)return ve=ve(N),Q=re===""?"."+K(N,0):re,L(ve)?(I="",Q!=null&&(I=Q.replace(F,"$&/")+"/"),G(ve,$,I,"",function(ae){return ae})):ve!=null&&(H(ve)&&(ve=j(ve,I+(ve.key==null||N&&N.key===ve.key?"":(""+ve.key).replace(F,"$&/")+"/")+Q)),$.push(ve)),1;Q=0;var q=re===""?".":re+":";if(L(N))for(var ee=0;ee<N.length;ee++)re=N[ee],pe=q+K(re,ee),Q+=G(re,$,I,pe,ve);else if(ee=C(N),typeof ee=="function")for(N=ee.call(N),ee=0;!(re=N.next()).done;)re=re.value,pe=q+K(re,ee++),Q+=G(re,$,I,pe,ve);else if(pe==="object"){if(typeof N.then=="function")return G(Y(N),$,I,re,ve);throw $=String(N),Error("Objects are not valid as a React child (found: "+($==="[object Object]"?"object with keys {"+Object.keys(N).join(", ")+"}":$)+"). If you meant to render a collection of children, use an array instead.")}return Q}function W(N,$,I){if(N==null)return N;var re=[],ve=0;return G(N,re,"","",function(pe){return $.call(I,pe,ve++)}),re}function Z(N){if(N._status===-1){var $=N._result;$=$(),$.then(function(I){(N._status===0||N._status===-1)&&(N._status=1,N._result=I)},function(I){(N._status===0||N._status===-1)&&(N._status=2,N._result=I)}),N._status===-1&&(N._status=0,N._result=$)}if(N._status===1)return N._result.default;throw N._result}var z=typeof reportError=="function"?reportError:function(N){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var $=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof N=="object"&&N!==null&&typeof N.message=="string"?String(N.message):String(N),error:N});if(!window.dispatchEvent($))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",N);return}console.error(N)},O={map:W,forEach:function(N,$,I){W(N,function(){$.apply(this,arguments)},I)},count:function(N){var $=0;return W(N,function(){$++}),$},toArray:function(N){return W(N,function($){return $})||[]},only:function(N){if(!H(N))throw Error("React.Children.only expected to receive a single React element child.");return N}};return Be.Activity=u,Be.Children=O,Be.Component=v,Be.Fragment=s,Be.Profiler=d,Be.PureComponent=y,Be.StrictMode=l,Be.Suspense=c,Be.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=R,Be.__COMPILER_RUNTIME={__proto__:null,c:function(N){return R.H.useMemoCache(N)}},Be.cache=function(N){return function(){return N.apply(null,arguments)}},Be.cacheSignal=function(){return null},Be.cloneElement=function(N,$,I){if(N==null)throw Error("The argument must be a React element, but you passed "+N+".");var re=E({},N.props),ve=N.key;if($!=null)for(pe in $.key!==void 0&&(ve=""+$.key),$)!k.call($,pe)||pe==="key"||pe==="__self"||pe==="__source"||pe==="ref"&&$.ref===void 0||(re[pe]=$[pe]);var pe=arguments.length-2;if(pe===1)re.children=I;else if(1<pe){for(var Q=Array(pe),q=0;q<pe;q++)Q[q]=arguments[q+2];re.children=Q}return M(N.type,ve,re)},Be.createContext=function(N){return N={$$typeof:f,_currentValue:N,_currentValue2:N,_threadCount:0,Provider:null,Consumer:null},N.Provider=N,N.Consumer={$$typeof:m,_context:N},N},Be.createElement=function(N,$,I){var re,ve={},pe=null;if($!=null)for(re in $.key!==void 0&&(pe=""+$.key),$)k.call($,re)&&re!=="key"&&re!=="__self"&&re!=="__source"&&(ve[re]=$[re]);var Q=arguments.length-2;if(Q===1)ve.children=I;else if(1<Q){for(var q=Array(Q),ee=0;ee<Q;ee++)q[ee]=arguments[ee+2];ve.children=q}if(N&&N.defaultProps)for(re in Q=N.defaultProps,Q)ve[re]===void 0&&(ve[re]=Q[re]);return M(N,pe,ve)},Be.createRef=function(){return{current:null}},Be.forwardRef=function(N){return{$$typeof:o,render:N}},Be.isValidElement=H,Be.lazy=function(N){return{$$typeof:p,_payload:{_status:-1,_result:N},_init:Z}},Be.memo=function(N,$){return{$$typeof:h,type:N,compare:$===void 0?null:$}},Be.startTransition=function(N){var $=R.T,I={};R.T=I;try{var re=N(),ve=R.S;ve!==null&&ve(I,re),typeof re=="object"&&re!==null&&typeof re.then=="function"&&re.then(D,z)}catch(pe){z(pe)}finally{$!==null&&I.types!==null&&($.types=I.types),R.T=$}},Be.unstable_useCacheRefresh=function(){return R.H.useCacheRefresh()},Be.use=function(N){return R.H.use(N)},Be.useActionState=function(N,$,I){return R.H.useActionState(N,$,I)},Be.useCallback=function(N,$){return R.H.useCallback(N,$)},Be.useContext=function(N){return R.H.useContext(N)},Be.useDebugValue=function(){},Be.useDeferredValue=function(N,$){return R.H.useDeferredValue(N,$)},Be.useEffect=function(N,$){return R.H.useEffect(N,$)},Be.useEffectEvent=function(N){return R.H.useEffectEvent(N)},Be.useId=function(){return R.H.useId()},Be.useImperativeHandle=function(N,$,I){return R.H.useImperativeHandle(N,$,I)},Be.useInsertionEffect=function(N,$){return R.H.useInsertionEffect(N,$)},Be.useLayoutEffect=function(N,$){return R.H.useLayoutEffect(N,$)},Be.useMemo=function(N,$){return R.H.useMemo(N,$)},Be.useOptimistic=function(N,$){return R.H.useOptimistic(N,$)},Be.useReducer=function(N,$,I){return R.H.useReducer(N,$,I)},Be.useRef=function(N){return R.H.useRef(N)},Be.useState=function(N){return R.H.useState(N)},Be.useSyncExternalStore=function(N,$,I){return R.H.useSyncExternalStore(N,$,I)},Be.useTransition=function(){return R.H.useTransition()},Be.version="19.2.6",Be}var Rm;function Rh(){return Rm||(Rm=1,zu.exports=L0()),zu.exports}var te=Rh(),Iu={exports:{}},ja={},Uu={exports:{}},Pu={};/**
|
|
18
18
|
* @license React
|
|
19
19
|
* scheduler.production.js
|
|
20
20
|
*
|
|
@@ -22,7 +22,7 @@ var R0=Object.defineProperty;var D0=(n,r,s)=>r in n?R0(n,r,{enumerable:!0,config
|
|
|
22
22
|
*
|
|
23
23
|
* This source code is licensed under the MIT license found in the
|
|
24
24
|
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Dm;function
|
|
25
|
+
*/var Dm;function O0(){return Dm||(Dm=1,(function(n){function r(G,W){var Z=G.length;G.push(W);e:for(;0<Z;){var z=Z-1>>>1,O=G[z];if(0<d(O,W))G[z]=W,G[Z]=O,Z=z;else break e}}function s(G){return G.length===0?null:G[0]}function l(G){if(G.length===0)return null;var W=G[0],Z=G.pop();if(Z!==W){G[0]=Z;e:for(var z=0,O=G.length,N=O>>>1;z<N;){var $=2*(z+1)-1,I=G[$],re=$+1,ve=G[re];if(0>d(I,Z))re<O&&0>d(ve,I)?(G[z]=ve,G[re]=Z,z=re):(G[z]=I,G[$]=Z,z=$);else if(re<O&&0>d(ve,Z))G[z]=ve,G[re]=Z,z=re;else break e}}return W}function d(G,W){var Z=G.sortIndex-W.sortIndex;return Z!==0?Z:G.id-W.id}if(n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var m=performance;n.unstable_now=function(){return m.now()}}else{var f=Date,o=f.now();n.unstable_now=function(){return f.now()-o}}var c=[],h=[],p=1,u=null,b=3,C=!1,T=!1,E=!1,S=!1,v=typeof setTimeout=="function"?setTimeout:null,_=typeof clearTimeout=="function"?clearTimeout:null,y=typeof setImmediate<"u"?setImmediate:null;function A(G){for(var W=s(h);W!==null;){if(W.callback===null)l(h);else if(W.startTime<=G)l(h),W.sortIndex=W.expirationTime,r(c,W);else break;W=s(h)}}function L(G){if(E=!1,A(G),!T)if(s(c)!==null)T=!0,D||(D=!0,U());else{var W=s(h);W!==null&&Y(L,W.startTime-G)}}var D=!1,R=-1,k=5,M=-1;function j(){return S?!0:!(n.unstable_now()-M<k)}function H(){if(S=!1,D){var G=n.unstable_now();M=G;var W=!0;try{e:{T=!1,E&&(E=!1,_(R),R=-1),C=!0;var Z=b;try{t:{for(A(G),u=s(c);u!==null&&!(u.expirationTime>G&&j());){var z=u.callback;if(typeof z=="function"){u.callback=null,b=u.priorityLevel;var O=z(u.expirationTime<=G);if(G=n.unstable_now(),typeof O=="function"){u.callback=O,A(G),W=!0;break t}u===s(c)&&l(c),A(G)}else l(c);u=s(c)}if(u!==null)W=!0;else{var N=s(h);N!==null&&Y(L,N.startTime-G),W=!1}}break e}finally{u=null,b=Z,C=!1}W=void 0}}finally{W?U():D=!1}}}var U;if(typeof y=="function")U=function(){y(H)};else if(typeof MessageChannel<"u"){var F=new MessageChannel,K=F.port2;F.port1.onmessage=H,U=function(){K.postMessage(null)}}else U=function(){v(H,0)};function Y(G,W){R=v(function(){G(n.unstable_now())},W)}n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(G){G.callback=null},n.unstable_forceFrameRate=function(G){0>G||125<G?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):k=0<G?Math.floor(1e3/G):5},n.unstable_getCurrentPriorityLevel=function(){return b},n.unstable_next=function(G){switch(b){case 1:case 2:case 3:var W=3;break;default:W=b}var Z=b;b=W;try{return G()}finally{b=Z}},n.unstable_requestPaint=function(){S=!0},n.unstable_runWithPriority=function(G,W){switch(G){case 1:case 2:case 3:case 4:case 5:break;default:G=3}var Z=b;b=G;try{return W()}finally{b=Z}},n.unstable_scheduleCallback=function(G,W,Z){var z=n.unstable_now();switch(typeof Z=="object"&&Z!==null?(Z=Z.delay,Z=typeof Z=="number"&&0<Z?z+Z:z):Z=z,G){case 1:var O=-1;break;case 2:O=250;break;case 5:O=1073741823;break;case 4:O=1e4;break;default:O=5e3}return O=Z+O,G={id:p++,callback:W,priorityLevel:G,startTime:Z,expirationTime:O,sortIndex:-1},Z>z?(G.sortIndex=Z,r(h,G),s(c)===null&&G===s(h)&&(E?(_(R),R=-1):E=!0,Y(L,Z-z))):(G.sortIndex=O,r(c,G),T||C||(T=!0,D||(D=!0,U()))),G},n.unstable_shouldYield=j,n.unstable_wrapCallback=function(G){var W=b;return function(){var Z=b;b=W;try{return G.apply(this,arguments)}finally{b=Z}}}})(Pu)),Pu}var Mm;function B0(){return Mm||(Mm=1,Uu.exports=O0()),Uu.exports}var Fu={exports:{}},Yt={};/**
|
|
26
26
|
* @license React
|
|
27
27
|
* react-dom.production.js
|
|
28
28
|
*
|
|
@@ -30,7 +30,7 @@ var R0=Object.defineProperty;var D0=(n,r,s)=>r in n?R0(n,r,{enumerable:!0,config
|
|
|
30
30
|
*
|
|
31
31
|
* This source code is licensed under the MIT license found in the
|
|
32
32
|
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Lm;function
|
|
33
|
+
*/var Lm;function j0(){if(Lm)return Yt;Lm=1;var n=Rh();function r(c){var h="https://react.dev/errors/"+c;if(1<arguments.length){h+="?args[]="+encodeURIComponent(arguments[1]);for(var p=2;p<arguments.length;p++)h+="&args[]="+encodeURIComponent(arguments[p])}return"Minified React error #"+c+"; visit "+h+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(){}var l={d:{f:s,r:function(){throw Error(r(522))},D:s,C:s,L:s,m:s,X:s,S:s,M:s},p:0,findDOMNode:null},d=Symbol.for("react.portal");function m(c,h,p){var u=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:d,key:u==null?null:""+u,children:c,containerInfo:h,implementation:p}}var f=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(c,h){if(c==="font")return"";if(typeof h=="string")return h==="use-credentials"?h:""}return Yt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,Yt.createPortal=function(c,h){var p=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!h||h.nodeType!==1&&h.nodeType!==9&&h.nodeType!==11)throw Error(r(299));return m(c,h,null,p)},Yt.flushSync=function(c){var h=f.T,p=l.p;try{if(f.T=null,l.p=2,c)return c()}finally{f.T=h,l.p=p,l.d.f()}},Yt.preconnect=function(c,h){typeof c=="string"&&(h?(h=h.crossOrigin,h=typeof h=="string"?h==="use-credentials"?h:"":void 0):h=null,l.d.C(c,h))},Yt.prefetchDNS=function(c){typeof c=="string"&&l.d.D(c)},Yt.preinit=function(c,h){if(typeof c=="string"&&h&&typeof h.as=="string"){var p=h.as,u=o(p,h.crossOrigin),b=typeof h.integrity=="string"?h.integrity:void 0,C=typeof h.fetchPriority=="string"?h.fetchPriority:void 0;p==="style"?l.d.S(c,typeof h.precedence=="string"?h.precedence:void 0,{crossOrigin:u,integrity:b,fetchPriority:C}):p==="script"&&l.d.X(c,{crossOrigin:u,integrity:b,fetchPriority:C,nonce:typeof h.nonce=="string"?h.nonce:void 0})}},Yt.preinitModule=function(c,h){if(typeof c=="string")if(typeof h=="object"&&h!==null){if(h.as==null||h.as==="script"){var p=o(h.as,h.crossOrigin);l.d.M(c,{crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0})}}else h==null&&l.d.M(c)},Yt.preload=function(c,h){if(typeof c=="string"&&typeof h=="object"&&h!==null&&typeof h.as=="string"){var p=h.as,u=o(p,h.crossOrigin);l.d.L(c,p,{crossOrigin:u,integrity:typeof h.integrity=="string"?h.integrity:void 0,nonce:typeof h.nonce=="string"?h.nonce:void 0,type:typeof h.type=="string"?h.type:void 0,fetchPriority:typeof h.fetchPriority=="string"?h.fetchPriority:void 0,referrerPolicy:typeof h.referrerPolicy=="string"?h.referrerPolicy:void 0,imageSrcSet:typeof h.imageSrcSet=="string"?h.imageSrcSet:void 0,imageSizes:typeof h.imageSizes=="string"?h.imageSizes:void 0,media:typeof h.media=="string"?h.media:void 0})}},Yt.preloadModule=function(c,h){if(typeof c=="string")if(h){var p=o(h.as,h.crossOrigin);l.d.m(c,{as:typeof h.as=="string"&&h.as!=="script"?h.as:void 0,crossOrigin:p,integrity:typeof h.integrity=="string"?h.integrity:void 0})}else l.d.m(c)},Yt.requestFormReset=function(c){l.d.r(c)},Yt.unstable_batchedUpdates=function(c,h){return c(h)},Yt.useFormState=function(c,h,p){return f.H.useFormState(c,h,p)},Yt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Yt.version="19.2.6",Yt}var Om;function N0(){if(Om)return Fu.exports;Om=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Fu.exports=j0(),Fu.exports}/**
|
|
34
34
|
* @license React
|
|
35
35
|
* react-dom-client.production.js
|
|
36
36
|
*
|
|
@@ -38,17 +38,17 @@ var R0=Object.defineProperty;var D0=(n,r,s)=>r in n?R0(n,r,{enumerable:!0,config
|
|
|
38
38
|
*
|
|
39
39
|
* This source code is licensed under the MIT license found in the
|
|
40
40
|
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Bm;function
|
|
41
|
+
*/var Bm;function H0(){if(Bm)return ja;Bm=1;var n=B0(),r=Rh(),s=N0();function l(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var i=2;i<arguments.length;i++)t+="&args[]="+encodeURIComponent(arguments[i])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function d(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function m(e){var t=e,i=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(i=t.return),e=t.return;while(e)}return t.tag===3?i:null}function f(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function o(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function c(e){if(m(e)!==e)throw Error(l(188))}function h(e){var t=e.alternate;if(!t){if(t=m(e),t===null)throw Error(l(188));return t!==e?null:e}for(var i=e,a=t;;){var g=i.return;if(g===null)break;var w=g.alternate;if(w===null){if(a=g.return,a!==null){i=a;continue}break}if(g.child===w.child){for(w=g.child;w;){if(w===i)return c(g),e;if(w===a)return c(g),t;w=w.sibling}throw Error(l(188))}if(i.return!==a.return)i=g,a=w;else{for(var B=!1,P=g.child;P;){if(P===i){B=!0,i=g,a=w;break}if(P===a){B=!0,a=g,i=w;break}P=P.sibling}if(!B){for(P=w.child;P;){if(P===i){B=!0,i=w,a=g;break}if(P===a){B=!0,a=w,i=g;break}P=P.sibling}if(!B)throw Error(l(189))}}if(i.alternate!==a)throw Error(l(190))}if(i.tag!==3)throw Error(l(188));return i.stateNode.current===i?e:t}function p(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=p(e),t!==null)return t;e=e.sibling}return null}var u=Object.assign,b=Symbol.for("react.element"),C=Symbol.for("react.transitional.element"),T=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),v=Symbol.for("react.profiler"),_=Symbol.for("react.consumer"),y=Symbol.for("react.context"),A=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),D=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),k=Symbol.for("react.lazy"),M=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),H=Symbol.iterator;function U(e){return e===null||typeof e!="object"?null:(e=H&&e[H]||e["@@iterator"],typeof e=="function"?e:null)}var F=Symbol.for("react.client.reference");function K(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===F?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case v:return"Profiler";case S:return"StrictMode";case L:return"Suspense";case D:return"SuspenseList";case M:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case T:return"Portal";case y:return e.displayName||"Context";case _:return(e._context.displayName||"Context")+".Consumer";case A:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case R:return t=e.displayName||null,t!==null?t:K(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return K(e(t))}catch{}}return null}var Y=Array.isArray,G=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=s.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Z={pending:!1,data:null,method:null,action:null},z=[],O=-1;function N(e){return{current:e}}function $(e){0>O||(e.current=z[O],z[O]=null,O--)}function I(e,t){O++,z[O]=e.current,e.current=t}var re=N(null),ve=N(null),pe=N(null),Q=N(null);function q(e,t){switch(I(pe,t),I(ve,e),I(re,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?Kp(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=Kp(t),e=Yp(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}$(re),I(re,e)}function ee(){$(re),$(ve),$(pe)}function ae(e){e.memoizedState!==null&&I(Q,e);var t=re.current,i=Yp(t,e.type);t!==i&&(I(ve,e),I(re,i))}function de(e){ve.current===e&&($(re),$(ve)),Q.current===e&&($(Q),Da._currentValue=Z)}var se,we;function je(e){if(se===void 0)try{throw Error()}catch(i){var t=i.stack.trim().match(/\n( *(at )?)/);se=t&&t[1]||"",we=-1<i.stack.indexOf(`
|
|
42
42
|
at`)?" (<anonymous>)":-1<i.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
43
|
`+se+e+we}var He=!1;function Pe(e,t){if(!e||He)return"";He=!0;var i=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(t){var _e=function(){throw Error()};if(Object.defineProperty(_e.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(_e,[])}catch(ue){var ce=ue}Reflect.construct(e,[],_e)}else{try{_e.call()}catch(ue){ce=ue}e.call(_e.prototype)}}else{try{throw Error()}catch(ue){ce=ue}(_e=e())&&typeof _e.catch=="function"&&_e.catch(function(){})}}catch(ue){if(ue&&ce&&typeof ue.stack=="string")return[ue.stack,ce.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var g=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");g&&g.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var w=a.DetermineComponentFrameRoot(),B=w[0],P=w[1];if(B&&P){var X=B.split(`
|
|
44
44
|
`),oe=P.split(`
|
|
45
45
|
`);for(g=a=0;a<X.length&&!X[a].includes("DetermineComponentFrameRoot");)a++;for(;g<oe.length&&!oe[g].includes("DetermineComponentFrameRoot");)g++;if(a===X.length||g===oe.length)for(a=X.length-1,g=oe.length-1;1<=a&&0<=g&&X[a]!==oe[g];)g--;for(;1<=a&&0<=g;a--,g--)if(X[a]!==oe[g]){if(a!==1||g!==1)do if(a--,g--,0>g||X[a]!==oe[g]){var fe=`
|
|
46
46
|
`+X[a].replace(" at new "," at ");return e.displayName&&fe.includes("<anonymous>")&&(fe=fe.replace("<anonymous>",e.displayName)),fe}while(1<=a&&0<=g);break}}}finally{He=!1,Error.prepareStackTrace=i}return(i=e?e.displayName||e.name:"")?je(i):""}function xe(e,t){switch(e.tag){case 26:case 27:case 5:return je(e.type);case 16:return je("Lazy");case 13:return e.child!==t&&t!==null?je("Suspense Fallback"):je("Suspense");case 19:return je("SuspenseList");case 0:case 15:return Pe(e.type,!1);case 11:return Pe(e.type.render,!1);case 1:return Pe(e.type,!0);case 31:return je("Activity");default:return""}}function xt(e){try{var t="",i=null;do t+=xe(e,i),i=e,e=e.return;while(e);return t}catch(a){return`
|
|
47
47
|
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var yt=Object.prototype.hasOwnProperty,Et=n.unstable_scheduleCallback,an=n.unstable_cancelCallback,Cn=n.unstable_shouldYield,St=n.unstable_requestPaint,tt=n.unstable_now,Lt=n.unstable_getCurrentPriorityLevel,he=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,Ae=n.unstable_NormalPriority,Me=n.unstable_LowPriority,Oe=n.unstable_IdlePriority,ft=n.log,Fe=n.unstable_setDisableYieldValue,gt=null,mt=null;function Ot(e){if(typeof ft=="function"&&Fe(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(gt,e)}catch{}}var Qe=Math.clz32?Math.clz32:ln,en=Math.log,Bt=Math.LN2;function ln(e){return e>>>=0,e===0?32:31-(en(e)/Bt|0)|0}var Gn=256,Vn=262144,zt=4194304;function on(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Wn(e,t,i){var a=e.pendingLanes;if(a===0)return 0;var g=0,w=e.suspendedLanes,B=e.pingedLanes;e=e.warmLanes;var P=a&134217727;return P!==0?(a=P&~w,a!==0?g=on(a):(B&=P,B!==0?g=on(B):i||(i=P&~e,i!==0&&(g=on(i))))):(P=a&~w,P!==0?g=on(P):B!==0?g=on(B):i||(i=a&~e,i!==0&&(g=on(i)))),g===0?0:t!==0&&t!==g&&(t&w)===0&&(w=g&-g,i=t&-t,w>=i||w===32&&(i&4194048)!==0)?t:g}function Vt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Is(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Wt(){var e=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),e}function wn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function It(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ii(e,t,i,a,g,w){var B=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var P=e.entanglements,X=e.expirationTimes,oe=e.hiddenUpdates;for(i=B&~i;0<i;){var fe=31-Qe(i),_e=1<<fe;P[fe]=0,X[fe]=-1;var ce=oe[fe];if(ce!==null)for(oe[fe]=null,fe=0;fe<ce.length;fe++){var ue=ce[fe];ue!==null&&(ue.lane&=-536870913)}i&=~_e}a!==0&&ze(e,a,0),w!==0&&g===0&&e.tag!==0&&(e.suspendedLanes|=w&~(B&~t))}function ze(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Qe(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|i&261930}function di(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var a=31-Qe(i),g=1<<a;g&t|e[a]&t&&(e[a]|=t),i&=~g}}function Pr(e,t){var i=t&-t;return i=(i&42)!==0?1:Fr(i),(i&(e.suspendedLanes|t))!==0?0:i}function Fr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Us(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Kn(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:vm(e.type))}function el(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var ii=Math.random().toString(36).slice(2),kt="__reactFiber$"+ii,Ut="__reactProps$"+ii,Yn="__reactContainer$"+ii,Ps="__reactEvents$"+ii,Io="__reactListeners$"+ii,tl="__reactHandles$"+ii,nl="__reactResources$"+ii,Bn="__reactMarker$"+ii;function qr(e){delete e[kt],delete e[Ut],delete e[Ps],delete e[Io],delete e[tl]}function cn(e){var t=e[kt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Yn]||i[kt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=nm(e);e!==null;){if(i=e[kt])return i;e=nm(e)}return t}e=i,i=e.parentNode}return null}function pi(e){if(e=e[kt]||e[Yn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function gi(e){var t=e[nl];return t||(t=e[nl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Bn]=!0}var Fs=new Set,Xn={};function Qn(e,t){ie(e,t),ie(e+"Capture",t)}function ie(e,t){for(Xn[e]=t,e=0;e<t.length;e++)Fs.add(t[e])}var un=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]*$"),$r={},qs={};function Uo(e){return yt.call(qs,e)?!0:yt.call($r,e)?!1:un.test(e)?qs[e]=!0:($r[e]=!0,!1)}function Gr(e,t,i){if(Uo(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function _i(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function jn(e,t,i,a){if(a===null)e.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+a)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function il(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tn(e,t,i){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var g=a.get,w=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return g.call(this)},set:function(B){i=""+B,w.call(this,B)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(B){i=""+B},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nt(e){if(!e._valueTracker){var t=il(e)?"checked":"value";e._valueTracker=tn(e,t,""+e[t])}}function $s(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),a="";return e&&(a=il(e)?e.checked?"true":"false":e.value),e=a,e!==i?(t.setValue(e),!0):!1}function mr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var rl=/[\n"\\]/g;function fn(e){return e.replace(rl,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gs(e,t,i,a,g,w,B,P){e.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.type=B:e.removeAttribute("type"),t!=null?B==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):B!=="submit"&&B!=="reset"||e.removeAttribute("value"),t!=null?Vs(e,B,hn(t)):i!=null?Vs(e,B,hn(i)):a!=null&&e.removeAttribute("value"),g==null&&w!=null&&(e.defaultChecked=!!w),g!=null&&(e.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?e.name=""+hn(P):e.removeAttribute("name")}function sl(e,t,i,a,g,w,B,P){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.type=w),t!=null||i!=null){if(!(w!=="submit"&&w!=="reset"||t!=null)){Nt(e);return}i=i!=null?""+hn(i):"",t=t!=null?""+hn(t):i,P||t===e.value||(e.value=t),e.defaultValue=t}a=a??g,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=P?e.checked:!!a,e.defaultChecked=!!a,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(e.name=B),Nt(e)}function Vs(e,t,i){t==="number"&&mr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ui(e,t,i,a){if(e=e.options,t){t={};for(var g=0;g<i.length;g++)t["$"+i[g]]=!0;for(i=0;i<e.length;i++)g=t.hasOwnProperty("$"+e[i].value),e[i].selected!==g&&(e[i].selected=g),g&&a&&(e[i].defaultSelected=!0)}else{for(i=""+hn(i),t=null,g=0;g<e.length;g++){if(e[g].value===i){e[g].selected=!0,a&&(e[g].defaultSelected=!0);return}t!==null||e[g].disabled||(t=e[g])}t!==null&&(t.selected=!0)}}function al(e,t,i){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+hn(i):""}function vi(e,t,i,a){if(t==null){if(a!=null){if(i!=null)throw Error(l(92));if(Y(a)){if(1<a.length)throw Error(l(93));a=a[0]}i=a}i==null&&(i=""),t=i}i=hn(t),e.defaultValue=i,a=e.textContent,a===i&&a!==""&&a!==null&&(e.value=a),Nt(e)}function ri(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ws=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 yi(e,t,i){var a=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,i):typeof i!="number"||i===0||Ws.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ll(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var a in i)!i.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var g in t)a=t[g],t.hasOwnProperty(g)&&i[g]!==a&&yi(e,g,a)}else for(var w in t)t.hasOwnProperty(w)&&yi(e,w,t[w])}function Vr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Ks=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"]]),ol=/^[\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 gr(e){return ol.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kt(){}var Wr=null;function si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var nn=null,Pi=null;function cl(e){var t=pi(e);if(t&&(e=t.stateNode)){var i=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gs(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+fn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var a=i[t];if(a!==e&&a.form===e.form){var g=a[Ut]||null;if(!g)throw Error(l(90));Gs(a,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(t=0;t<i.length;t++)a=i[t],a.form===e.form&&$s(a)}break e;case"textarea":al(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ui(e,!!i.multiple,t,!1)}}}var Ys=!1;function dn(e,t,i){if(Ys)return e(t,i);Ys=!0;try{var a=e(t);return a}finally{if(Ys=!1,(nn!==null||Pi!==null)&&(Wl(),nn&&(t=nn,e=Pi,Pi=nn=null,cl(t),e)))for(t=0;t<e.length;t++)cl(e[t])}}function Si(e,t){var i=e.stateNode;if(i===null)return null;var a=i[Ut]||null;if(a===null)return null;i=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_r=!1;if(xn)try{var vr={};Object.defineProperty(vr,"passive",{get:function(){_r=!0}}),window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{_r=!1}var ke=null,Xs=null,Kr=null;function ul(){if(Kr)return Kr;var e,t=Xs,i=t.length,a,g="value"in ke?ke.value:ke.textContent,w=g.length;for(e=0;e<i&&t[e]===g[e];e++);var B=i-e;for(a=1;a<=B&&t[i-a]===g[w-a];a++);return Kr=g.slice(e,1<a?1-a:void 0)}function Yr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function Yt(){return!0}function Xr(){return!1}function Pt(e){function t(i,a,g,w,B){this._reactName=i,this._targetInst=g,this.type=a,this.nativeEvent=w,this.target=B,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(i=e[P],this[P]=i?i(w):w[P]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?Yt:Xr,this.isPropagationStopped=Xr,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=Yt)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=Yt)},persist:function(){},isPersistent:Yt}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qr=Pt(Jn),V=u({},Jn,{view:0,detail:0}),me=Pt(V),qe,pn,yr,Jr=u({},V,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yr&&(yr&&e.type==="mousemove"?(qe=e.screenX-yr.screenX,pn=e.screenY-yr.screenY):pn=qe=0,yr=e),qe)},movementY:function(e){return"movementY"in e?e.movementY:pn}}),hl=Pt(Jr),Tv=u({},Jr,{dataTransfer:0}),Rv=Pt(Tv),Dv=u({},V,{relatedTarget:0}),Po=Pt(Dv),Mv=u({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),Lv=Pt(Mv),Ov=u({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Bv=Pt(Ov),jv=u({},Jn,{data:0}),Qh=Pt(jv),Nv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Hv={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"},zv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Iv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=zv[e])?!!t[e]:!1}function Fo(){return Iv}var Uv=u({},V,{key:function(e){if(e.key){var t=Nv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Hv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fo,charCode:function(e){return e.type==="keypress"?Yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Pv=Pt(Uv),Fv=u({},Jr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jh=Pt(Fv),qv=u({},V,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fo}),$v=Pt(qv),Gv=u({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Vv=Pt(Gv),Wv=u({},Jr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Kv=Pt(Wv),Yv=u({},Jn,{newState:0,oldState:0}),Xv=Pt(Yv),Qv=[9,13,27,32],qo=xn&&"CompositionEvent"in window,Qs=null;xn&&"documentMode"in document&&(Qs=document.documentMode);var Jv=xn&&"TextEvent"in window&&!Qs,Zh=xn&&(!qo||Qs&&8<Qs&&11>=Qs),ef=" ",tf=!1;function nf(e,t){switch(e){case"keyup":return Qv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zr=!1;function Zv(e,t){switch(e){case"compositionend":return rf(t);case"keypress":return t.which!==32?null:(tf=!0,ef);case"textInput":return e=t.data,e===ef&&tf?null:e;default:return null}}function ey(e,t){if(Zr)return e==="compositionend"||!qo&&nf(e,t)?(e=ul(),Kr=Xs=ke=null,Zr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zh&&t.locale!=="ko"?null:t.data;default:return null}}var ty={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 sf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ty[e.type]:t==="textarea"}function af(e,t,i,a){nn?Pi?Pi.push(a):Pi=[a]:nn=a,t=eo(t,"onChange"),0<t.length&&(i=new Qr("onChange","change",null,i,a),e.push({event:i,listeners:t}))}var Js=null,Zs=null;function ny(e){Fp(e,0)}function fl(e){var t=mi(e);if($s(t))return e}function lf(e,t){if(e==="change")return t}var of=!1;if(xn){var $o;if(xn){var Go="oninput"in document;if(!Go){var cf=document.createElement("div");cf.setAttribute("oninput","return;"),Go=typeof cf.oninput=="function"}$o=Go}else $o=!1;of=$o&&(!document.documentMode||9<document.documentMode)}function uf(){Js&&(Js.detachEvent("onpropertychange",hf),Zs=Js=null)}function hf(e){if(e.propertyName==="value"&&fl(Zs)){var t=[];af(t,Zs,e,si(e)),dn(ny,t)}}function iy(e,t,i){e==="focusin"?(uf(),Js=t,Zs=i,Js.attachEvent("onpropertychange",hf)):e==="focusout"&&uf()}function ry(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(Zs)}function sy(e,t){if(e==="click")return fl(t)}function ay(e,t){if(e==="input"||e==="change")return fl(t)}function ly(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:ly;function ea(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(a=0;a<i.length;a++){var g=i[a];if(!yt.call(t,g)||!En(e[g],t[g]))return!1}return!0}function ff(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function df(e,t){var i=ff(e);e=0;for(var a;i;){if(i.nodeType===3){if(a=e+i.textContent.length,e<=t&&a>=t)return{node:i,offset:t-e};e=a}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ff(i)}}function pf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=mr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=mr(e.document)}return t}function Vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var oy=xn&&"documentMode"in document&&11>=document.documentMode,es=null,Wo=null,ta=null,Ko=!1;function gf(e,t,i){var a=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ko||es==null||es!==mr(a)||(a=es,"selectionStart"in a&&Vo(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ta&&ea(ta,a)||(ta=a,a=eo(Wo,"onSelect"),0<a.length&&(t=new Qr("onSelect","select",null,t,i),e.push({event:t,listeners:a}),t.target=es)))}function Sr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ts={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionrun:Sr("Transition","TransitionRun"),transitionstart:Sr("Transition","TransitionStart"),transitioncancel:Sr("Transition","TransitionCancel"),transitionend:Sr("Transition","TransitionEnd")},Yo={},_f={};xn&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function br(e){if(Yo[e])return Yo[e];if(!ts[e])return e;var t=ts[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in _f)return Yo[e]=t[i];return e}var vf=br("animationend"),yf=br("animationiteration"),Sf=br("animationstart"),cy=br("transitionrun"),uy=br("transitionstart"),hy=br("transitioncancel"),bf=br("transitionend"),Cf=new Map,Xo="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(" ");Xo.push("scrollEnd");function Zn(e,t){Cf.set(e,t),Qn(t,[e])}var dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Nn=[],ns=0,Qo=0;function pl(){for(var e=ns,t=Qo=ns=0;t<e;){var i=Nn[t];Nn[t++]=null;var a=Nn[t];Nn[t++]=null;var g=Nn[t];Nn[t++]=null;var w=Nn[t];if(Nn[t++]=null,a!==null&&g!==null){var B=a.pending;B===null?g.next=g:(g.next=B.next,B.next=g),a.pending=g}w!==0&&wf(i,g,w)}}function ml(e,t,i,a){Nn[ns++]=e,Nn[ns++]=t,Nn[ns++]=i,Nn[ns++]=a,Qo|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Jo(e,t,i,a){return ml(e,t,i,a),gl(e)}function Cr(e,t){return ml(e,null,null,t),gl(e)}function wf(e,t,i){e.lanes|=i;var a=e.alternate;a!==null&&(a.lanes|=i);for(var g=!1,w=e.return;w!==null;)w.childLanes|=i,a=w.alternate,a!==null&&(a.childLanes|=i),w.tag===22&&(e=w.stateNode,e===null||e._visibility&1||(g=!0)),e=w,w=w.return;return e.tag===3?(w=e.stateNode,g&&t!==null&&(g=31-Qe(i),e=w.hiddenUpdates,a=e[g],a===null?e[g]=[t]:a.push(t),t.lane=i|536870912),w):null}function gl(e){if(50<wa)throw wa=0,lu=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var is={};function fy(e,t,i,a){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kn(e,t,i,a){return new fy(e,t,i,a)}function Zo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bi(e,t){var i=e.alternate;return i===null?(i=kn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function xf(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _l(e,t,i,a,g,w){var B=0;if(a=e,typeof e=="function")Zo(e)&&(B=1);else if(typeof e=="string")B=_0(e,i,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case M:return e=kn(31,i,t,g),e.elementType=M,e.lanes=w,e;case E:return wr(i.children,g,w,t);case S:B=8,g|=24;break;case v:return e=kn(12,i,t,g|2),e.elementType=v,e.lanes=w,e;case L:return e=kn(13,i,t,g),e.elementType=L,e.lanes=w,e;case D:return e=kn(19,i,t,g),e.elementType=D,e.lanes=w,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y:B=10;break e;case _:B=9;break e;case A:B=11;break e;case R:B=14;break e;case k:B=16,a=null;break e}B=29,i=Error(l(130,e===null?"null":typeof e,"")),a=null}return t=kn(B,i,t,g),t.elementType=e,t.type=a,t.lanes=w,t}function wr(e,t,i,a){return e=kn(7,e,a,t),e.lanes=i,e}function ec(e,t,i){return e=kn(6,e,null,t),e.lanes=i,e}function Ef(e){var t=kn(18,null,null,0);return t.stateNode=e,t}function tc(e,t,i){return t=kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kf=new WeakMap;function Hn(e,t){if(typeof e=="object"&&e!==null){var i=kf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:xt(t)},kf.set(e,t),t)}return{value:e,source:t,stack:xt(t)}}var rs=[],ss=0,vl=null,na=0,zn=[],In=0,Fi=null,ai=1,li="";function Ci(e,t){rs[ss++]=na,rs[ss++]=vl,vl=e,na=t}function Af(e,t,i){zn[In++]=ai,zn[In++]=li,zn[In++]=Fi,Fi=e;var a=ai;e=li;var g=32-Qe(a)-1;a&=~(1<<g),i+=1;var w=32-Qe(t)+g;if(30<w){var B=g-g%5;w=(a&(1<<B)-1).toString(32),a>>=B,g-=B,ai=1<<32-Qe(t)+g|i<<g|a,li=w+e}else ai=1<<w|i<<g|a,li=e}function nc(e){e.return!==null&&(Ci(e,1),Af(e,1,0))}function ic(e){for(;e===vl;)vl=rs[--ss],rs[ss]=null,na=rs[--ss],rs[ss]=null;for(;e===Fi;)Fi=zn[--In],zn[In]=null,li=zn[--In],zn[In]=null,ai=zn[--In],zn[In]=null}function Tf(e,t){zn[In++]=ai,zn[In++]=li,zn[In++]=Fi,ai=t.id,li=t.overflow,Fi=e}var Ft=null,ut=null,Ye=!1,qi=null,Un=!1,rc=Error(l(519));function $i(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ia(Hn(t,e)),rc}function Rf(e){var t=e.stateNode,i=e.type,a=e.memoizedProps;switch(t[kt]=e,t[Ut]=a,i){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(i=0;i<Ea.length;i++)Ge(Ea[i],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),sl(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),vi(t,a.value,a.defaultValue,a.children)}i=a.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||a.suppressHydrationWarning===!0||Vp(t.textContent,i)?(a.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),a.onScroll!=null&&Ge("scroll",t),a.onScrollEnd!=null&&Ge("scrollend",t),a.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||$i(e,!0)}function Df(e){for(Ft=e.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Ft=Ft.return}}function as(e){if(e!==Ft)return!1;if(!Ye)return Df(e),Ye=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Cu(e.type,e.memoizedProps)),i=!i),i&&ut&&$i(e),Df(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ut=tm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ut=tm(e)}else t===27?(t=ut,rr(e.type)?(e=Au,Au=null,ut=e):ut=t):ut=Ft?Fn(e.stateNode.nextSibling):null;return!0}function xr(){ut=Ft=null,Ye=!1}function sc(){var e=qi;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),qi=null),e}function ia(e){qi===null?qi=[e]:qi.push(e)}var ac=N(null),Er=null,wi=null;function Gi(e,t,i){I(ac,t._currentValue),t._currentValue=i}function xi(e){e._currentValue=ac.current,$(ac)}function lc(e,t,i){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===i)break;e=e.return}}function oc(e,t,i,a){var g=e.child;for(g!==null&&(g.return=e);g!==null;){var w=g.dependencies;if(w!==null){var B=g.child;w=w.firstContext;e:for(;w!==null;){var P=w;w=g;for(var X=0;X<t.length;X++)if(P.context===t[X]){w.lanes|=i,P=w.alternate,P!==null&&(P.lanes|=i),lc(w.return,i,e),a||(B=null);break e}w=P.next}}else if(g.tag===18){if(B=g.return,B===null)throw Error(l(341));B.lanes|=i,w=B.alternate,w!==null&&(w.lanes|=i),lc(B,i,e),B=null}else B=g.child;if(B!==null)B.return=g;else for(B=g;B!==null;){if(B===e){B=null;break}if(g=B.sibling,g!==null){g.return=B.return,B=g;break}B=B.return}g=B}}function ls(e,t,i,a){e=null;for(var g=t,w=!1;g!==null;){if(!w){if((g.flags&524288)!==0)w=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var B=g.alternate;if(B===null)throw Error(l(387));if(B=B.memoizedProps,B!==null){var P=g.type;En(g.pendingProps.value,B.value)||(e!==null?e.push(P):e=[P])}}else if(g===Q.current){if(B=g.alternate,B===null)throw Error(l(387));B.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(e!==null?e.push(Da):e=[Da])}g=g.return}e!==null&&oc(t,e,i,a),t.flags|=262144}function yl(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kr(e){Er=e,wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Mf(Er,e)}function Sl(e,t){return Er===null&&kr(e),Mf(e,t)}function Mf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},wi===null){if(e===null)throw Error(l(308));wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wi=wi.next=t;return i}var dy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},py=n.unstable_scheduleCallback,my=n.unstable_NormalPriority,At={$$typeof:y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cc(){return{controller:new dy,data:new Map,refCount:0}}function ra(e){e.refCount--,e.refCount===0&&py(my,function(){e.controller.abort()})}var sa=null,uc=0,os=0,cs=null;function gy(e,t){if(sa===null){var i=sa=[];uc=0,os=du(),cs={status:"pending",value:void 0,then:function(a){i.push(a)}}}return uc++,t.then(Lf,Lf),t}function Lf(){if(--uc===0&&sa!==null){cs!==null&&(cs.status="fulfilled");var e=sa;sa=null,os=0,cs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function _y(e,t){var i=[],a={status:"pending",value:null,reason:null,then:function(g){i.push(g)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var g=0;g<i.length;g++)(0,i[g])(t)},function(g){for(a.status="rejected",a.reason=g,g=0;g<i.length;g++)(0,i[g])(void 0)}),a}var Of=G.S;G.S=function(e,t){gp=tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&gy(e,t),Of!==null&&Of(e,t)};var Ar=N(null);function hc(){var e=Ar.current;return e!==null?e:lt.pooledCache}function bl(e,t){t===null?I(Ar,Ar.current):I(Ar,t.pool)}function Bf(){var e=hc();return e===null?null:{parent:At._currentValue,pool:e}}var us=Error(l(460)),fc=Error(l(474)),Cl=Error(l(542)),wl={then:function(){}};function jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Nf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Kt,Kt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zf(e),e;default:if(typeof t.status=="string")t.then(Kt,Kt);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var g=t;g.status="fulfilled",g.value=a}},function(a){if(t.status==="pending"){var g=t;g.status="rejected",g.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zf(e),e}throw Rr=t,us}}function Tr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Rr=i,us):i}}var Rr=null;function Hf(){if(Rr===null)throw Error(l(459));var e=Rr;return Rr=null,e}function zf(e){if(e===us||e===Cl)throw Error(l(483))}var hs=null,aa=0;function xl(e){var t=aa;return aa+=1,hs===null&&(hs=[]),Nf(hs,e,t)}function la(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function El(e,t){throw t.$$typeof===b?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function If(e){function t(ne,J){if(e){var le=ne.deletions;le===null?(ne.deletions=[J],ne.flags|=16):le.push(J)}}function i(ne,J){if(!e)return null;for(;J!==null;)t(ne,J),J=J.sibling;return null}function a(ne){for(var J=new Map;ne!==null;)ne.key!==null?J.set(ne.key,ne):J.set(ne.index,ne),ne=ne.sibling;return J}function g(ne,J){return ne=bi(ne,J),ne.index=0,ne.sibling=null,ne}function w(ne,J,le){return ne.index=le,e?(le=ne.alternate,le!==null?(le=le.index,le<J?(ne.flags|=67108866,J):le):(ne.flags|=67108866,J)):(ne.flags|=1048576,J)}function B(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function P(ne,J,le,ge){return J===null||J.tag!==6?(J=ec(le,ne.mode,ge),J.return=ne,J):(J=g(J,le),J.return=ne,J)}function X(ne,J,le,ge){var Re=le.type;return Re===E?fe(ne,J,le.props.children,ge,le.key):J!==null&&(J.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&Tr(Re)===J.type)?(J=g(J,le.props),la(J,le),J.return=ne,J):(J=_l(le.type,le.key,le.props,null,ne.mode,ge),la(J,le),J.return=ne,J)}function oe(ne,J,le,ge){return J===null||J.tag!==4||J.stateNode.containerInfo!==le.containerInfo||J.stateNode.implementation!==le.implementation?(J=tc(le,ne.mode,ge),J.return=ne,J):(J=g(J,le.children||[]),J.return=ne,J)}function fe(ne,J,le,ge,Re){return J===null||J.tag!==7?(J=wr(le,ne.mode,ge,Re),J.return=ne,J):(J=g(J,le),J.return=ne,J)}function _e(ne,J,le){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=ec(""+J,ne.mode,le),J.return=ne,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case C:return le=_l(J.type,J.key,J.props,null,ne.mode,le),la(le,J),le.return=ne,le;case T:return J=tc(J,ne.mode,le),J.return=ne,J;case k:return J=Tr(J),_e(ne,J,le)}if(Y(J)||U(J))return J=wr(J,ne.mode,le,null),J.return=ne,J;if(typeof J.then=="function")return _e(ne,xl(J),le);if(J.$$typeof===y)return _e(ne,Sl(ne,J),le);El(ne,J)}return null}function ce(ne,J,le,ge){var Re=J!==null?J.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Re!==null?null:P(ne,J,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case C:return le.key===Re?X(ne,J,le,ge):null;case T:return le.key===Re?oe(ne,J,le,ge):null;case k:return le=Tr(le),ce(ne,J,le,ge)}if(Y(le)||U(le))return Re!==null?null:fe(ne,J,le,ge,null);if(typeof le.then=="function")return ce(ne,J,xl(le),ge);if(le.$$typeof===y)return ce(ne,J,Sl(ne,le),ge);El(ne,le)}return null}function ue(ne,J,le,ge,Re){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ne=ne.get(le)||null,P(J,ne,""+ge,Re);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case C:return ne=ne.get(ge.key===null?le:ge.key)||null,X(J,ne,ge,Re);case T:return ne=ne.get(ge.key===null?le:ge.key)||null,oe(J,ne,ge,Re);case k:return ge=Tr(ge),ue(ne,J,le,ge,Re)}if(Y(ge)||U(ge))return ne=ne.get(le)||null,fe(J,ne,ge,Re,null);if(typeof ge.then=="function")return ue(ne,J,le,xl(ge),Re);if(ge.$$typeof===y)return ue(ne,J,le,Sl(J,ge),Re);El(J,ge)}return null}function Ee(ne,J,le,ge){for(var Re=null,Je=null,Te=J,Ie=J=0,Ke=null;Te!==null&&Ie<le.length;Ie++){Te.index>Ie?(Ke=Te,Te=null):Ke=Te.sibling;var Ze=ce(ne,Te,le[Ie],ge);if(Ze===null){Te===null&&(Te=Ke);break}e&&Te&&Ze.alternate===null&&t(ne,Te),J=w(Ze,J,Ie),Je===null?Re=Ze:Je.sibling=Ze,Je=Ze,Te=Ke}if(Ie===le.length)return i(ne,Te),Ye&&Ci(ne,Ie),Re;if(Te===null){for(;Ie<le.length;Ie++)Te=_e(ne,le[Ie],ge),Te!==null&&(J=w(Te,J,Ie),Je===null?Re=Te:Je.sibling=Te,Je=Te);return Ye&&Ci(ne,Ie),Re}for(Te=a(Te);Ie<le.length;Ie++)Ke=ue(Te,ne,Ie,le[Ie],ge),Ke!==null&&(e&&Ke.alternate!==null&&Te.delete(Ke.key===null?Ie:Ke.key),J=w(Ke,J,Ie),Je===null?Re=Ke:Je.sibling=Ke,Je=Ke);return e&&Te.forEach(function(cr){return t(ne,cr)}),Ye&&Ci(ne,Ie),Re}function Le(ne,J,le,ge){if(le==null)throw Error(l(151));for(var Re=null,Je=null,Te=J,Ie=J=0,Ke=null,Ze=le.next();Te!==null&&!Ze.done;Ie++,Ze=le.next()){Te.index>Ie?(Ke=Te,Te=null):Ke=Te.sibling;var cr=ce(ne,Te,Ze.value,ge);if(cr===null){Te===null&&(Te=Ke);break}e&&Te&&cr.alternate===null&&t(ne,Te),J=w(cr,J,Ie),Je===null?Re=cr:Je.sibling=cr,Je=cr,Te=Ke}if(Ze.done)return i(ne,Te),Ye&&Ci(ne,Ie),Re;if(Te===null){for(;!Ze.done;Ie++,Ze=le.next())Ze=_e(ne,Ze.value,ge),Ze!==null&&(J=w(Ze,J,Ie),Je===null?Re=Ze:Je.sibling=Ze,Je=Ze);return Ye&&Ci(ne,Ie),Re}for(Te=a(Te);!Ze.done;Ie++,Ze=le.next())Ze=ue(Te,ne,Ie,Ze.value,ge),Ze!==null&&(e&&Ze.alternate!==null&&Te.delete(Ze.key===null?Ie:Ze.key),J=w(Ze,J,Ie),Je===null?Re=Ze:Je.sibling=Ze,Je=Ze);return e&&Te.forEach(function(T0){return t(ne,T0)}),Ye&&Ci(ne,Ie),Re}function at(ne,J,le,ge){if(typeof le=="object"&&le!==null&&le.type===E&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case C:e:{for(var Re=le.key;J!==null;){if(J.key===Re){if(Re=le.type,Re===E){if(J.tag===7){i(ne,J.sibling),ge=g(J,le.props.children),ge.return=ne,ne=ge;break e}}else if(J.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&Tr(Re)===J.type){i(ne,J.sibling),ge=g(J,le.props),la(ge,le),ge.return=ne,ne=ge;break e}i(ne,J);break}else t(ne,J);J=J.sibling}le.type===E?(ge=wr(le.props.children,ne.mode,ge,le.key),ge.return=ne,ne=ge):(ge=_l(le.type,le.key,le.props,null,ne.mode,ge),la(ge,le),ge.return=ne,ne=ge)}return B(ne);case T:e:{for(Re=le.key;J!==null;){if(J.key===Re)if(J.tag===4&&J.stateNode.containerInfo===le.containerInfo&&J.stateNode.implementation===le.implementation){i(ne,J.sibling),ge=g(J,le.children||[]),ge.return=ne,ne=ge;break e}else{i(ne,J);break}else t(ne,J);J=J.sibling}ge=tc(le,ne.mode,ge),ge.return=ne,ne=ge}return B(ne);case k:return le=Tr(le),at(ne,J,le,ge)}if(Y(le))return Ee(ne,J,le,ge);if(U(le)){if(Re=U(le),typeof Re!="function")throw Error(l(150));return le=Re.call(le),Le(ne,J,le,ge)}if(typeof le.then=="function")return at(ne,J,xl(le),ge);if(le.$$typeof===y)return at(ne,J,Sl(ne,le),ge);El(ne,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,J!==null&&J.tag===6?(i(ne,J.sibling),ge=g(J,le),ge.return=ne,ne=ge):(i(ne,J),ge=ec(le,ne.mode,ge),ge.return=ne,ne=ge),B(ne)):i(ne,J)}return function(ne,J,le,ge){try{aa=0;var Re=at(ne,J,le,ge);return hs=null,Re}catch(Te){if(Te===us||Te===Cl)throw Te;var Je=kn(29,Te,null,ne.mode);return Je.lanes=ge,Je.return=ne,Je}finally{}}}var Dr=If(!0),Uf=If(!1),Vi=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ki(e,t,i){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(et&2)!==0){var g=a.pending;return g===null?t.next=t:(t.next=g.next,g.next=t),a.pending=t,t=gl(e),wf(e,null,i),t}return ml(e,a,t,i),gl(e)}function oa(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,i|=a,t.lanes=i,di(e,i)}}function mc(e,t){var i=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,i===a)){var g=null,w=null;if(i=i.firstBaseUpdate,i!==null){do{var B={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};w===null?g=w=B:w=w.next=B,i=i.next}while(i!==null);w===null?g=w=t:w=w.next=t}else g=w=t;i={baseState:a.baseState,firstBaseUpdate:g,lastBaseUpdate:w,shared:a.shared,callbacks:a.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var gc=!1;function ca(){if(gc){var e=cs;if(e!==null)throw e}}function ua(e,t,i,a){gc=!1;var g=e.updateQueue;Vi=!1;var w=g.firstBaseUpdate,B=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var X=P,oe=X.next;X.next=null,B===null?w=oe:B.next=oe,B=X;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,P=fe.lastBaseUpdate,P!==B&&(P===null?fe.firstBaseUpdate=oe:P.next=oe,fe.lastBaseUpdate=X))}if(w!==null){var _e=g.baseState;B=0,fe=oe=X=null,P=w;do{var ce=P.lane&-536870913,ue=ce!==P.lane;if(ue?(We&ce)===ce:(a&ce)===ce){ce!==0&&ce===os&&(gc=!0),fe!==null&&(fe=fe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ee=e,Le=P;ce=t;var at=i;switch(Le.tag){case 1:if(Ee=Le.payload,typeof Ee=="function"){_e=Ee.call(at,_e,ce);break e}_e=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Le.payload,ce=typeof Ee=="function"?Ee.call(at,_e,ce):Ee,ce==null)break e;_e=u({},_e,ce);break e;case 2:Vi=!0}}ce=P.callback,ce!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=g.callbacks,ue===null?g.callbacks=[ce]:ue.push(ce))}else ue={lane:ce,tag:P.tag,payload:P.payload,callback:P.callback,next:null},fe===null?(oe=fe=ue,X=_e):fe=fe.next=ue,B|=ce;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;ue=P,P=ue.next,ue.next=null,g.lastBaseUpdate=ue,g.shared.pending=null}}while(!0);fe===null&&(X=_e),g.baseState=X,g.firstBaseUpdate=oe,g.lastBaseUpdate=fe,w===null&&(g.shared.lanes=0),Zi|=B,e.lanes=B,e.memoizedState=_e}}function Pf(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function Ff(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Pf(i[e],t)}var fs=N(null),kl=N(0);function qf(e,t){e=Oi,I(kl,e),I(fs,t),Oi=e|t.baseLanes}function _c(){I(kl,Oi),I(fs,fs.current)}function vc(){Oi=kl.current,$(fs),$(kl)}var An=N(null),Pn=null;function Yi(e){var t=e.alternate;I(Ct,Ct.current&1),I(An,e),Pn===null&&(t===null||fs.current!==null||t.memoizedState!==null)&&(Pn=e)}function yc(e){I(Ct,Ct.current),I(An,e),Pn===null&&(Pn=e)}function $f(e){e.tag===22?(I(Ct,Ct.current),I(An,e),Pn===null&&(Pn=e)):Xi()}function Xi(){I(Ct,Ct.current),I(An,An.current)}function Tn(e){$(An),Pn===e&&(Pn=null),$(Ct)}var Ct=N(0);function Al(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Eu(i)||ku(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ei=0,Ne=null,rt=null,Tt=null,Tl=!1,ds=!1,Mr=!1,Rl=0,ha=0,ps=null,vy=0;function _t(){throw Error(l(321))}function Sc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!En(e[i],t[i]))return!1;return!0}function bc(e,t,i,a,g,w){return Ei=w,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Ad:Nc,Mr=!1,w=i(a,g),Mr=!1,ds&&(w=Vf(t,i,a,g)),Gf(e),w}function Gf(e){G.H=pa;var t=rt!==null&&rt.next!==null;if(Ei=0,Tt=rt=Ne=null,Tl=!1,ha=0,ps=null,t)throw Error(l(300));e===null||Rt||(e=e.dependencies,e!==null&&yl(e)&&(Rt=!0))}function Vf(e,t,i,a){Ne=e;var g=0;do{if(ds&&(ps=null),ha=0,ds=!1,25<=g)throw Error(l(301));if(g+=1,Tt=rt=null,e.updateQueue!=null){var w=e.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}G.H=Td,w=t(i,a)}while(ds);return w}function yy(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?fa(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Cc(){var e=Rl!==0;return Rl=0,e}function wc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function xc(e){if(Tl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Tl=!1}Ei=0,Tt=rt=Ne=null,ds=!1,ha=Rl=0,ps=null}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ne.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function wt(){if(rt===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Tt===null?Ne.memoizedState:Tt.next;if(t!==null)Tt=t,rt=e;else{if(e===null)throw Ne.alternate===null?Error(l(467)):Error(l(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Tt===null?Ne.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Dl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fa(e){var t=ha;return ha+=1,ps===null&&(ps=[]),e=Nf(ps,e,t),t=Ne,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Ad:Nc),e}function Ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fa(e);if(e.$$typeof===y)return qt(e)}throw Error(l(438,String(e)))}function Ec(e){var t=null,i=Ne.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(g){return g.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Dl(),Ne.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),a=0;a<e;a++)i[a]=j;return t.index++,i}function ki(e,t){return typeof t=="function"?t(e):t}function Ll(e){var t=wt();return kc(t,rt,e)}function kc(e,t,i){var a=e.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=i;var g=e.baseQueue,w=a.pending;if(w!==null){if(g!==null){var B=g.next;g.next=w.next,w.next=B}t.baseQueue=g=w,a.pending=null}if(w=e.baseState,g===null)e.memoizedState=w;else{t=g.next;var P=B=null,X=null,oe=t,fe=!1;do{var _e=oe.lane&-536870913;if(_e!==oe.lane?(We&_e)===_e:(Ei&_e)===_e){var ce=oe.revertLane;if(ce===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),_e===os&&(fe=!0);else if((Ei&ce)===ce){oe=oe.next,ce===os&&(fe=!0);continue}else _e={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},X===null?(P=X=_e,B=w):X=X.next=_e,Ne.lanes|=ce,Zi|=ce;_e=oe.action,Mr&&i(w,_e),w=oe.hasEagerState?oe.eagerState:i(w,_e)}else ce={lane:_e,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},X===null?(P=X=ce,B=w):X=X.next=ce,Ne.lanes|=_e,Zi|=_e;oe=oe.next}while(oe!==null&&oe!==t);if(X===null?B=w:X.next=P,!En(w,e.memoizedState)&&(Rt=!0,fe&&(i=cs,i!==null)))throw i;e.memoizedState=w,e.baseState=B,e.baseQueue=X,a.lastRenderedState=w}return g===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ac(e){var t=wt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var a=i.dispatch,g=i.pending,w=t.memoizedState;if(g!==null){i.pending=null;var B=g=g.next;do w=e(w,B.action),B=B.next;while(B!==g);En(w,t.memoizedState)||(Rt=!0),t.memoizedState=w,t.baseQueue===null&&(t.baseState=w),i.lastRenderedState=w}return[w,a]}function Wf(e,t,i){var a=Ne,g=wt(),w=Ye;if(w){if(i===void 0)throw Error(l(407));i=i()}else i=t();var B=!En((rt||g).memoizedState,i);if(B&&(g.memoizedState=i,Rt=!0),g=g.queue,Dc(Xf.bind(null,a,g,e),[e]),g.getSnapshot!==t||B||Tt!==null&&Tt.memoizedState.tag&1){if(a.flags|=2048,ms(9,{destroy:void 0},Yf.bind(null,a,g,i,t),null),lt===null)throw Error(l(349));w||(Ei&127)!==0||Kf(a,t,i)}return i}function Kf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ne.updateQueue,t===null?(t=Dl(),Ne.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Yf(e,t,i,a){t.value=i,t.getSnapshot=a,Qf(t)&&Jf(e)}function Xf(e,t,i){return i(function(){Qf(t)&&Jf(e)})}function Qf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!En(e,i)}catch{return!0}}function Jf(e){var t=Cr(e,2);t!==null&&yn(t,e,2)}function Tc(e){var t=rn();if(typeof e=="function"){var i=e;if(e=i(),Mr){Ot(!0);try{i()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:e},t}function Zf(e,t,i,a){return e.baseState=i,kc(e,rt,typeof a=="function"?a:ki)}function Sy(e,t,i,a,g){if(jl(e))throw Error(l(485));if(e=t.action,e!==null){var w={payload:g,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){w.listeners.push(B)}};G.T!==null?i(!0):w.isTransition=!1,a(w),i=t.pending,i===null?(w.next=t.pending=w,ed(t,w)):(w.next=i.next,t.pending=i.next=w)}}function ed(e,t){var i=t.action,a=t.payload,g=e.state;if(t.isTransition){var w=G.T,B={};G.T=B;try{var P=i(g,a),X=G.S;X!==null&&X(B,P),td(e,t,P)}catch(oe){Rc(e,t,oe)}finally{w!==null&&B.types!==null&&(w.types=B.types),G.T=w}}else try{w=i(g,a),td(e,t,w)}catch(oe){Rc(e,t,oe)}}function td(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(a){nd(e,t,a)},function(a){return Rc(e,t,a)}):nd(e,t,i)}function nd(e,t,i){t.status="fulfilled",t.value=i,id(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,ed(e,i)))}function Rc(e,t,i){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=i,id(t),t=t.next;while(t!==a)}e.action=null}function id(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rd(e,t){return t}function sd(e,t){if(Ye){var i=lt.formState;if(i!==null){e:{var a=Ne;if(Ye){if(ut){t:{for(var g=ut,w=Un;g.nodeType!==8;){if(!w){g=null;break t}if(g=Fn(g.nextSibling),g===null){g=null;break t}}w=g.data,g=w==="F!"||w==="F"?g:null}if(g){ut=Fn(g.nextSibling),a=g.data==="F!";break e}}$i(a)}a=!1}a&&(t=i[0])}}return i=rn(),i.memoizedState=i.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rd,lastRenderedState:t},i.queue=a,i=xd.bind(null,Ne,a),a.dispatch=i,a=Tc(!1),w=jc.bind(null,Ne,!1,a.queue),a=rn(),g={state:t,dispatch:null,action:e,pending:null},a.queue=g,i=Sy.bind(null,Ne,g,w,i),g.dispatch=i,a.memoizedState=e,[t,i,!1]}function ad(e){var t=wt();return ld(t,rt,e)}function ld(e,t,i){if(t=kc(e,t,rd)[0],e=Ll(ki)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=fa(t)}catch(B){throw B===us?Cl:B}else a=t;t=wt();var g=t.queue,w=g.dispatch;return i!==t.memoizedState&&(Ne.flags|=2048,ms(9,{destroy:void 0},by.bind(null,g,i),null)),[a,w,e]}function by(e,t){e.action=t}function od(e){var t=wt(),i=rt;if(i!==null)return ld(t,i,e);wt(),t=t.memoizedState,i=wt();var a=i.queue.dispatch;return i.memoizedState=e,[t,a,!1]}function ms(e,t,i,a){return e={tag:e,create:i,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Dl(),Ne.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(a=i.next,i.next=e,e.next=a,t.lastEffect=e),e}function cd(){return wt().memoizedState}function Ol(e,t,i,a){var g=rn();Ne.flags|=e,g.memoizedState=ms(1|t,{destroy:void 0},i,a===void 0?null:a)}function Bl(e,t,i,a){var g=wt();a=a===void 0?null:a;var w=g.memoizedState.inst;rt!==null&&a!==null&&Sc(a,rt.memoizedState.deps)?g.memoizedState=ms(t,w,i,a):(Ne.flags|=e,g.memoizedState=ms(1|t,w,i,a))}function ud(e,t){Ol(8390656,8,e,t)}function Dc(e,t){Bl(2048,8,e,t)}function Cy(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Dl(),Ne.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function hd(e){var t=wt().memoizedState;return Cy({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function fd(e,t){return Bl(4,2,e,t)}function dd(e,t){return Bl(4,4,e,t)}function pd(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function md(e,t,i){i=i!=null?i.concat([e]):null,Bl(4,4,pd.bind(null,t,e),i)}function Mc(){}function gd(e,t){var i=wt();t=t===void 0?null:t;var a=i.memoizedState;return t!==null&&Sc(t,a[1])?a[0]:(i.memoizedState=[e,t],e)}function _d(e,t){var i=wt();t=t===void 0?null:t;var a=i.memoizedState;if(t!==null&&Sc(t,a[1]))return a[0];if(a=e(),Mr){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[a,t],a}function Lc(e,t,i){return i===void 0||(Ei&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=vp(),Ne.lanes|=e,Zi|=e,i)}function vd(e,t,i,a){return En(i,t)?i:fs.current!==null?(e=Lc(e,i,a),En(e,t)||(Rt=!0),e):(Ei&42)===0||(Ei&1073741824)!==0&&(We&261930)===0?(Rt=!0,e.memoizedState=i):(e=vp(),Ne.lanes|=e,Zi|=e,t)}function yd(e,t,i,a,g){var w=W.p;W.p=w!==0&&8>w?w:8;var B=G.T,P={};G.T=P,jc(e,!1,t,i);try{var X=g(),oe=G.S;if(oe!==null&&oe(P,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=_y(X,a);da(e,t,fe,Mn(e))}else da(e,t,a,Mn(e))}catch(_e){da(e,t,{then:function(){},status:"rejected",reason:_e},Mn())}finally{W.p=w,B!==null&&P.types!==null&&(B.types=P.types),G.T=B}}function wy(){}function Oc(e,t,i,a){if(e.tag!==5)throw Error(l(476));var g=Sd(e).queue;yd(e,g,t,Z,i===null?wy:function(){return bd(e),i(a)})}function Sd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:Z},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bd(e){var t=Sd(e);t.next===null&&(t=e.alternate.memoizedState),da(e,t.next.queue,{},Mn())}function Bc(){return qt(Da)}function Cd(){return wt().memoizedState}function wd(){return wt().memoizedState}function xy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Mn();e=Wi(i);var a=Ki(t,e,i);a!==null&&(yn(a,t,i),oa(a,t,i)),t={cache:cc()},e.payload=t;return}t=t.return}}function Ey(e,t,i){var a=Mn();i={lane:a,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},jl(e)?Ed(t,i):(i=Jo(e,t,i,a),i!==null&&(yn(i,e,a),kd(i,t,a)))}function xd(e,t,i){var a=Mn();da(e,t,i,a)}function da(e,t,i,a){var g={lane:a,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(jl(e))Ed(t,g);else{var w=e.alternate;if(e.lanes===0&&(w===null||w.lanes===0)&&(w=t.lastRenderedReducer,w!==null))try{var B=t.lastRenderedState,P=w(B,i);if(g.hasEagerState=!0,g.eagerState=P,En(P,B))return ml(e,t,g,0),lt===null&&pl(),!1}catch{}finally{}if(i=Jo(e,t,g,a),i!==null)return yn(i,e,a),kd(i,t,a),!0}return!1}function jc(e,t,i,a){if(a={lane:2,revertLane:du(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},jl(e)){if(t)throw Error(l(479))}else t=Jo(e,i,a,2),t!==null&&yn(t,e,2)}function jl(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Ed(e,t){ds=Tl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function kd(e,t,i){if((i&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,i|=a,t.lanes=i,di(e,i)}}var pa={readContext:qt,use:Ml,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};pa.useEffectEvent=_t;var Ad={readContext:qt,use:Ml,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:ud,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ol(4194308,4,pd.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ol(4194308,4,e,t)},useInsertionEffect:function(e,t){Ol(4,2,e,t)},useMemo:function(e,t){var i=rn();t=t===void 0?null:t;var a=e();if(Mr){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[a,t],a},useReducer:function(e,t,i){var a=rn();if(i!==void 0){var g=i(t);if(Mr){Ot(!0);try{i(t)}finally{Ot(!1)}}}else g=t;return a.memoizedState=a.baseState=g,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:g},a.queue=e,e=e.dispatch=Ey.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,i=xd.bind(null,Ne,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Mc,useDeferredValue:function(e,t){var i=rn();return Lc(i,e,t)},useTransition:function(){var e=Tc(!1);return e=yd.bind(null,Ne,e.queue,!0,!1),rn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var a=Ne,g=rn();if(Ye){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),lt===null)throw Error(l(349));(We&127)!==0||Kf(a,t,i)}g.memoizedState=i;var w={value:i,getSnapshot:t};return g.queue=w,ud(Xf.bind(null,a,w,e),[e]),a.flags|=2048,ms(9,{destroy:void 0},Yf.bind(null,a,w,i,t),null),i},useId:function(){var e=rn(),t=lt.identifierPrefix;if(Ye){var i=li,a=ai;i=(a&~(1<<32-Qe(a)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Rl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=vy++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bc,useFormState:sd,useActionState:sd,useOptimistic:function(e){var t=rn();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=jc.bind(null,Ne,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ec,useCacheRefresh:function(){return rn().memoizedState=xy.bind(null,Ne)},useEffectEvent:function(e){var t=rn(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Nc={readContext:qt,use:Ml,useCallback:gd,useContext:qt,useEffect:Dc,useImperativeHandle:md,useInsertionEffect:fd,useLayoutEffect:dd,useMemo:_d,useReducer:Ll,useRef:cd,useState:function(){return Ll(ki)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=wt();return vd(i,rt.memoizedState,e,t)},useTransition:function(){var e=Ll(ki)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:fa(e),t]},useSyncExternalStore:Wf,useId:Cd,useHostTransitionStatus:Bc,useFormState:ad,useActionState:ad,useOptimistic:function(e,t){var i=wt();return Zf(i,rt,e,t)},useMemoCache:Ec,useCacheRefresh:wd};Nc.useEffectEvent=hd;var Td={readContext:qt,use:Ml,useCallback:gd,useContext:qt,useEffect:Dc,useImperativeHandle:md,useInsertionEffect:fd,useLayoutEffect:dd,useMemo:_d,useReducer:Ac,useRef:cd,useState:function(){return Ac(ki)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=wt();return rt===null?Lc(i,e,t):vd(i,rt.memoizedState,e,t)},useTransition:function(){var e=Ac(ki)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:fa(e),t]},useSyncExternalStore:Wf,useId:Cd,useHostTransitionStatus:Bc,useFormState:od,useActionState:od,useOptimistic:function(e,t){var i=wt();return rt!==null?Zf(i,rt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ec,useCacheRefresh:wd};Td.useEffectEvent=hd;function Hc(e,t,i,a){t=e.memoizedState,i=i(a,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var zc={enqueueSetState:function(e,t,i){e=e._reactInternals;var a=Mn(),g=Wi(a);g.payload=t,i!=null&&(g.callback=i),t=Ki(e,g,a),t!==null&&(yn(t,e,a),oa(t,e,a))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var a=Mn(),g=Wi(a);g.tag=1,g.payload=t,i!=null&&(g.callback=i),t=Ki(e,g,a),t!==null&&(yn(t,e,a),oa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Mn(),a=Wi(i);a.tag=2,t!=null&&(a.callback=t),t=Ki(e,a,i),t!==null&&(yn(t,e,i),oa(t,e,i))}};function Rd(e,t,i,a,g,w,B){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,w,B):t.prototype&&t.prototype.isPureReactComponent?!ea(i,a)||!ea(g,w):!0}function Dd(e,t,i,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,a),t.state!==e&&zc.enqueueReplaceState(t,t.state,null)}function Lr(e,t){var i=t;if("ref"in t){i={};for(var a in t)a!=="ref"&&(i[a]=t[a])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var g in e)i[g]===void 0&&(i[g]=e[g])}return i}function Md(e){dl(e)}function Ld(e){console.error(e)}function Od(e){dl(e)}function Nl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Bd(e,t,i){try{var a=e.onCaughtError;a(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Ic(e,t,i){return i=Wi(i),i.tag=3,i.payload={element:null},i.callback=function(){Nl(e,t)},i}function jd(e){return e=Wi(e),e.tag=3,e}function Nd(e,t,i,a){var g=i.type.getDerivedStateFromError;if(typeof g=="function"){var w=a.value;e.payload=function(){return g(w)},e.callback=function(){Bd(t,i,a)}}var B=i.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(e.callback=function(){Bd(t,i,a),typeof g!="function"&&(er===null?er=new Set([this]):er.add(this));var P=a.stack;this.componentDidCatch(a.value,{componentStack:P!==null?P:""})})}function ky(e,t,i,a,g){if(i.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=i.alternate,t!==null&&ls(t,i,g,!0),i=An.current,i!==null){switch(i.tag){case 31:case 13:return Pn===null?Kl():i.alternate===null&&vt===0&&(vt=3),i.flags&=-257,i.flags|=65536,i.lanes=g,a===wl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([a]):t.add(a),uu(e,a,g)),!1;case 22:return i.flags|=65536,a===wl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([a]):i.add(a)),uu(e,a,g)),!1}throw Error(l(435,i.tag))}return uu(e,a,g),Kl(),!1}if(Ye)return t=An.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=g,a!==rc&&(e=Error(l(422),{cause:a}),ia(Hn(e,i)))):(a!==rc&&(t=Error(l(423),{cause:a}),ia(Hn(t,i))),e=e.current.alternate,e.flags|=65536,g&=-g,e.lanes|=g,a=Hn(a,i),g=Ic(e.stateNode,a,g),mc(e,g),vt!==4&&(vt=2)),!1;var w=Error(l(520),{cause:a});if(w=Hn(w,i),Ca===null?Ca=[w]:Ca.push(w),vt!==4&&(vt=2),t===null)return!0;a=Hn(a,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=g&-g,i.lanes|=e,e=Ic(i.stateNode,a,e),mc(i,e),!1;case 1:if(t=i.type,w=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(er===null||!er.has(w))))return i.flags|=65536,g&=-g,i.lanes|=g,g=jd(g),Nd(g,e,i,a),mc(i,g),!1}i=i.return}while(i!==null);return!1}var Uc=Error(l(461)),Rt=!1;function $t(e,t,i,a){t.child=e===null?Uf(t,null,i,a):Dr(t,e.child,i,a)}function Hd(e,t,i,a,g){i=i.render;var w=t.ref;if("ref"in a){var B={};for(var P in a)P!=="ref"&&(B[P]=a[P])}else B=a;return kr(t),a=bc(e,t,i,B,w,g),P=Cc(),e!==null&&!Rt?(wc(e,t,g),Ai(e,t,g)):(Ye&&P&&nc(t),t.flags|=1,$t(e,t,a,g),t.child)}function zd(e,t,i,a,g){if(e===null){var w=i.type;return typeof w=="function"&&!Zo(w)&&w.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=w,Id(e,t,w,a,g)):(e=_l(i.type,null,a,t,t.mode,g),e.ref=t.ref,e.return=t,t.child=e)}if(w=e.child,!Kc(e,g)){var B=w.memoizedProps;if(i=i.compare,i=i!==null?i:ea,i(B,a)&&e.ref===t.ref)return Ai(e,t,g)}return t.flags|=1,e=bi(w,a),e.ref=t.ref,e.return=t,t.child=e}function Id(e,t,i,a,g){if(e!==null){var w=e.memoizedProps;if(ea(w,a)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=a=w,Kc(e,g))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,Ai(e,t,g)}return Pc(e,t,i,a,g)}function Ud(e,t,i,a){var g=a.children,w=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(w=w!==null?w.baseLanes|i:i,e!==null){for(a=t.child=e.child,g=0;a!==null;)g=g|a.lanes|a.childLanes,a=a.sibling;a=g&~w}else a=0,t.child=null;return Pd(e,t,w,i,a)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bl(t,w!==null?w.cachePool:null),w!==null?qf(t,w):_c(),$f(t);else return a=t.lanes=536870912,Pd(e,t,w!==null?w.baseLanes|i:i,i,a)}else w!==null?(bl(t,w.cachePool),qf(t,w),Xi(),t.memoizedState=null):(e!==null&&bl(t,null),_c(),Xi());return $t(e,t,g,i),t.child}function ma(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pd(e,t,i,a,g){var w=hc();return w=w===null?null:{parent:At._currentValue,pool:w},t.memoizedState={baseLanes:i,cachePool:w},e!==null&&bl(t,null),_c(),$f(t),e!==null&&ls(e,t,a,!0),t.childLanes=g,null}function Hl(e,t){return t=Il({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fd(e,t,i){return Dr(t,e.child,null,i),e=Hl(t,t.pendingProps),e.flags|=2,Tn(t),t.memoizedState=null,e}function Ay(e,t,i){var a=t.pendingProps,g=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ye){if(a.mode==="hidden")return e=Hl(t,a),t.lanes=536870912,ma(null,e);if(yc(t),(e=ut)?(e=em(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi!==null?{id:ai,overflow:li}:null,retryLane:536870912,hydrationErrors:null},i=Ef(e),i.return=t,t.child=i,Ft=t,ut=null)):e=null,e===null)throw $i(t);return t.lanes=536870912,null}return Hl(t,a)}var w=e.memoizedState;if(w!==null){var B=w.dehydrated;if(yc(t),g)if(t.flags&256)t.flags&=-257,t=Fd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Rt||ls(e,t,i,!1),g=(i&e.childLanes)!==0,Rt||g){if(a=lt,a!==null&&(B=Pr(a,i),B!==0&&B!==w.retryLane))throw w.retryLane=B,Cr(e,B),yn(a,e,B),Uc;Kl(),t=Fd(e,t,i)}else e=w.treeContext,ut=Fn(B.nextSibling),Ft=t,Ye=!0,qi=null,Un=!1,e!==null&&Tf(t,e),t=Hl(t,a),t.flags|=4096;return t}return e=bi(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Pc(e,t,i,a,g){return kr(t),i=bc(e,t,i,a,void 0,g),a=Cc(),e!==null&&!Rt?(wc(e,t,g),Ai(e,t,g)):(Ye&&a&&nc(t),t.flags|=1,$t(e,t,i,g),t.child)}function qd(e,t,i,a,g,w){return kr(t),t.updateQueue=null,i=Vf(t,a,i,g),Gf(e),a=Cc(),e!==null&&!Rt?(wc(e,t,w),Ai(e,t,w)):(Ye&&a&&nc(t),t.flags|=1,$t(e,t,i,w),t.child)}function $d(e,t,i,a,g){if(kr(t),t.stateNode===null){var w=is,B=i.contextType;typeof B=="object"&&B!==null&&(w=qt(B)),w=new i(a,w),t.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=zc,t.stateNode=w,w._reactInternals=t,w=t.stateNode,w.props=a,w.state=t.memoizedState,w.refs={},dc(t),B=i.contextType,w.context=typeof B=="object"&&B!==null?qt(B):is,w.state=t.memoizedState,B=i.getDerivedStateFromProps,typeof B=="function"&&(Hc(t,i,B,a),w.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(B=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),B!==w.state&&zc.enqueueReplaceState(w,w.state,null),ua(t,a,w,g),ca(),w.state=t.memoizedState),typeof w.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){w=t.stateNode;var P=t.memoizedProps,X=Lr(i,P);w.props=X;var oe=w.context,fe=i.contextType;B=is,typeof fe=="object"&&fe!==null&&(B=qt(fe));var _e=i.getDerivedStateFromProps;fe=typeof _e=="function"||typeof w.getSnapshotBeforeUpdate=="function",P=t.pendingProps!==P,fe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P||oe!==B)&&Dd(t,w,a,B),Vi=!1;var ce=t.memoizedState;w.state=ce,ua(t,a,w,g),ca(),oe=t.memoizedState,P||ce!==oe||Vi?(typeof _e=="function"&&(Hc(t,i,_e,a),oe=t.memoizedState),(X=Vi||Rd(t,i,X,a,ce,oe,B))?(fe||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(t.flags|=4194308)):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=oe),w.props=a,w.state=oe,w.context=B,a=X):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{w=t.stateNode,pc(e,t),B=t.memoizedProps,fe=Lr(i,B),w.props=fe,_e=t.pendingProps,ce=w.context,oe=i.contextType,X=is,typeof oe=="object"&&oe!==null&&(X=qt(oe)),P=i.getDerivedStateFromProps,(oe=typeof P=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(B!==_e||ce!==X)&&Dd(t,w,a,X),Vi=!1,ce=t.memoizedState,w.state=ce,ua(t,a,w,g),ca();var ue=t.memoizedState;B!==_e||ce!==ue||Vi||e!==null&&e.dependencies!==null&&yl(e.dependencies)?(typeof P=="function"&&(Hc(t,i,P,a),ue=t.memoizedState),(fe=Vi||Rd(t,i,fe,a,ce,ue,X)||e!==null&&e.dependencies!==null&&yl(e.dependencies))?(oe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(a,ue,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(a,ue,X)),typeof w.componentDidUpdate=="function"&&(t.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof w.componentDidUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=ue),w.props=a,w.state=ue,w.context=X,a=fe):(typeof w.componentDidUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=1024),a=!1)}return w=a,zl(e,t),a=(t.flags&128)!==0,w||a?(w=t.stateNode,i=a&&typeof i.getDerivedStateFromError!="function"?null:w.render(),t.flags|=1,e!==null&&a?(t.child=Dr(t,e.child,null,g),t.child=Dr(t,null,i,g)):$t(e,t,i,g),t.memoizedState=w.state,e=t.child):e=Ai(e,t,g),e}function Gd(e,t,i,a){return xr(),t.flags|=256,$t(e,t,i,a),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(e){return{baseLanes:e,cachePool:Bf()}}function $c(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Dn),e}function Vd(e,t,i){var a=t.pendingProps,g=!1,w=(t.flags&128)!==0,B;if((B=w)||(B=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),B&&(g=!0,t.flags&=-129),B=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ye){if(g?Yi(t):Xi(),(e=ut)?(e=em(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi!==null?{id:ai,overflow:li}:null,retryLane:536870912,hydrationErrors:null},i=Ef(e),i.return=t,t.child=i,Ft=t,ut=null)):e=null,e===null)throw $i(t);return ku(e)?t.lanes=32:t.lanes=536870912,null}var P=a.children;return a=a.fallback,g?(Xi(),g=t.mode,P=Il({mode:"hidden",children:P},g),a=wr(a,g,i,null),P.return=t,a.return=t,P.sibling=a,t.child=P,a=t.child,a.memoizedState=qc(i),a.childLanes=$c(e,B,i),t.memoizedState=Fc,ma(null,a)):(Yi(t),Gc(t,P))}var X=e.memoizedState;if(X!==null&&(P=X.dehydrated,P!==null)){if(w)t.flags&256?(Yi(t),t.flags&=-257,t=Vc(e,t,i)):t.memoizedState!==null?(Xi(),t.child=e.child,t.flags|=128,t=null):(Xi(),P=a.fallback,g=t.mode,a=Il({mode:"visible",children:a.children},g),P=wr(P,g,i,null),P.flags|=2,a.return=t,P.return=t,a.sibling=P,t.child=a,Dr(t,e.child,null,i),a=t.child,a.memoizedState=qc(i),a.childLanes=$c(e,B,i),t.memoizedState=Fc,t=ma(null,a));else if(Yi(t),ku(P)){if(B=P.nextSibling&&P.nextSibling.dataset,B)var oe=B.dgst;B=oe,a=Error(l(419)),a.stack="",a.digest=B,ia({value:a,source:null,stack:null}),t=Vc(e,t,i)}else if(Rt||ls(e,t,i,!1),B=(i&e.childLanes)!==0,Rt||B){if(B=lt,B!==null&&(a=Pr(B,i),a!==0&&a!==X.retryLane))throw X.retryLane=a,Cr(e,a),yn(B,e,a),Uc;Eu(P)||Kl(),t=Vc(e,t,i)}else Eu(P)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ut=Fn(P.nextSibling),Ft=t,Ye=!0,qi=null,Un=!1,e!==null&&Tf(t,e),t=Gc(t,a.children),t.flags|=4096);return t}return g?(Xi(),P=a.fallback,g=t.mode,X=e.child,oe=X.sibling,a=bi(X,{mode:"hidden",children:a.children}),a.subtreeFlags=X.subtreeFlags&65011712,oe!==null?P=bi(oe,P):(P=wr(P,g,i,null),P.flags|=2),P.return=t,a.return=t,a.sibling=P,t.child=a,ma(null,a),a=t.child,P=e.child.memoizedState,P===null?P=qc(i):(g=P.cachePool,g!==null?(X=At._currentValue,g=g.parent!==X?{parent:X,pool:X}:g):g=Bf(),P={baseLanes:P.baseLanes|i,cachePool:g}),a.memoizedState=P,a.childLanes=$c(e,B,i),t.memoizedState=Fc,ma(e.child,a)):(Yi(t),i=e.child,e=i.sibling,i=bi(i,{mode:"visible",children:a.children}),i.return=t,i.sibling=null,e!==null&&(B=t.deletions,B===null?(t.deletions=[e],t.flags|=16):B.push(e)),t.child=i,t.memoizedState=null,i)}function Gc(e,t){return t=Il({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Il(e,t){return e=kn(22,e,null,t),e.lanes=0,e}function Vc(e,t,i){return Dr(t,e.child,null,i),e=Gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wd(e,t,i){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),lc(e.return,t,i)}function Wc(e,t,i,a,g,w){var B=e.memoizedState;B===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:i,tailMode:g,treeForkCount:w}:(B.isBackwards=t,B.rendering=null,B.renderingStartTime=0,B.last=a,B.tail=i,B.tailMode=g,B.treeForkCount=w)}function Kd(e,t,i){var a=t.pendingProps,g=a.revealOrder,w=a.tail;a=a.children;var B=Ct.current,P=(B&2)!==0;if(P?(B=B&1|2,t.flags|=128):B&=1,I(Ct,B),$t(e,t,a,i),a=Ye?na:0,!P&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wd(e,i,t);else if(e.tag===19)Wd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(g){case"forwards":for(i=t.child,g=null;i!==null;)e=i.alternate,e!==null&&Al(e)===null&&(g=i),i=i.sibling;i=g,i===null?(g=t.child,t.child=null):(g=i.sibling,i.sibling=null),Wc(t,!1,g,i,w,a);break;case"backwards":case"unstable_legacy-backwards":for(i=null,g=t.child,t.child=null;g!==null;){if(e=g.alternate,e!==null&&Al(e)===null){t.child=g;break}e=g.sibling,g.sibling=i,i=g,g=e}Wc(t,!0,i,null,w,a);break;case"together":Wc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ai(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Zi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ls(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=bi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Kc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yl(e)))}function Ty(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),Gi(t,At,e.memoizedState.cache),xr();break;case 27:case 5:ae(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Yi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Vd(e,t,i):(Yi(t),e=Ai(e,t,i),e!==null?e.sibling:null);Yi(t);break;case 19:var g=(e.flags&128)!==0;if(a=(i&t.childLanes)!==0,a||(ls(e,t,i,!1),a=(i&t.childLanes)!==0),g){if(a)return Kd(e,t,i);t.flags|=128}if(g=t.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),I(Ct,Ct.current),a)break;return null;case 22:return t.lanes=0,Ud(e,t,i,t.pendingProps);case 24:Gi(t,At,e.memoizedState.cache)}return Ai(e,t,i)}function Yd(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!Kc(e,i)&&(t.flags&128)===0)return Rt=!1,Ty(e,t,i);Rt=(e.flags&131072)!==0}else Rt=!1,Ye&&(t.flags&1048576)!==0&&Af(t,na,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Tr(t.elementType),t.type=e,typeof e=="function")Zo(e)?(a=Lr(e,a),t.tag=1,t=$d(null,t,e,a,i)):(t.tag=0,t=Pc(null,t,e,a,i));else{if(e!=null){var g=e.$$typeof;if(g===A){t.tag=11,t=Hd(null,t,e,a,i);break e}else if(g===R){t.tag=14,t=zd(null,t,e,a,i);break e}}throw t=K(e)||e,Error(l(306,t,""))}}return t;case 0:return Pc(e,t,t.type,t.pendingProps,i);case 1:return a=t.type,g=Lr(a,t.pendingProps),$d(e,t,a,g,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(l(387));a=t.pendingProps;var w=t.memoizedState;g=w.element,pc(e,t),ua(t,a,null,i);var B=t.memoizedState;if(a=B.cache,Gi(t,At,a),a!==w.cache&&oc(t,[At],i,!0),ca(),a=B.element,w.isDehydrated)if(w={element:a,isDehydrated:!1,cache:B.cache},t.updateQueue.baseState=w,t.memoizedState=w,t.flags&256){t=Gd(e,t,a,i);break e}else if(a!==g){g=Hn(Error(l(424)),t),ia(g),t=Gd(e,t,a,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ut=Fn(e.firstChild),Ft=t,Ye=!0,qi=null,Un=!0,i=Uf(t,null,a,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(xr(),a===g){t=Ai(e,t,i);break e}$t(e,t,a,i)}t=t.child}return t;case 26:return zl(e,t),e===null?(i=am(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ye||(i=t.type,e=t.pendingProps,a=to(pe.current).createElement(i),a[kt]=t,a[Ut]=e,Gt(a,i,e),bt(a),t.stateNode=a):t.memoizedState=am(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Ye&&(a=t.stateNode=im(t.type,t.pendingProps,pe.current),Ft=t,Un=!0,g=ut,rr(t.type)?(Au=g,ut=Fn(a.firstChild)):ut=g),$t(e,t,t.pendingProps.children,i),zl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ye&&((g=a=ut)&&(a=r0(a,t.type,t.pendingProps,Un),a!==null?(t.stateNode=a,Ft=t,ut=Fn(a.firstChild),Un=!1,g=!0):g=!1),g||$i(t)),ae(t),g=t.type,w=t.pendingProps,B=e!==null?e.memoizedProps:null,a=w.children,Cu(g,w)?a=null:B!==null&&Cu(g,B)&&(t.flags|=32),t.memoizedState!==null&&(g=bc(e,t,yy,null,null,i),Da._currentValue=g),zl(e,t),$t(e,t,a,i),t.child;case 6:return e===null&&Ye&&((e=i=ut)&&(i=s0(i,t.pendingProps,Un),i!==null?(t.stateNode=i,Ft=t,ut=null,e=!0):e=!1),e||$i(t)),null;case 13:return Vd(e,t,i);case 4:return q(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Dr(t,null,a,i):$t(e,t,a,i),t.child;case 11:return Hd(e,t,t.type,t.pendingProps,i);case 7:return $t(e,t,t.pendingProps,i),t.child;case 8:return $t(e,t,t.pendingProps.children,i),t.child;case 12:return $t(e,t,t.pendingProps.children,i),t.child;case 10:return a=t.pendingProps,Gi(t,t.type,a.value),$t(e,t,a.children,i),t.child;case 9:return g=t.type._context,a=t.pendingProps.children,kr(t),g=qt(g),a=a(g),t.flags|=1,$t(e,t,a,i),t.child;case 14:return zd(e,t,t.type,t.pendingProps,i);case 15:return Id(e,t,t.type,t.pendingProps,i);case 19:return Kd(e,t,i);case 31:return Ay(e,t,i);case 22:return Ud(e,t,i,t.pendingProps);case 24:return kr(t),a=qt(At),e===null?(g=hc(),g===null&&(g=lt,w=cc(),g.pooledCache=w,w.refCount++,w!==null&&(g.pooledCacheLanes|=i),g=w),t.memoizedState={parent:a,cache:g},dc(t),Gi(t,At,g)):((e.lanes&i)!==0&&(pc(e,t),ua(t,null,null,i),ca()),g=e.memoizedState,w=t.memoizedState,g.parent!==a?(g={parent:a,cache:a},t.memoizedState=g,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=g),Gi(t,At,a)):(a=w.cache,Gi(t,At,a),a!==g.cache&&oc(t,[At],i,!0))),$t(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Ti(e){e.flags|=4}function Yc(e,t,i,a,g){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(g&335544128)===g)if(e.stateNode.complete)e.flags|=8192;else if(Cp())e.flags|=8192;else throw Rr=wl,fc}else e.flags&=-16777217}function Xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hm(t))if(Cp())e.flags|=8192;else throw Rr=wl,fc}function Ul(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wt():536870912,e.lanes|=t,ys|=t)}function ga(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,a=0;if(t)for(var g=e.child;g!==null;)i|=g.lanes|g.childLanes,a|=g.subtreeFlags&65011712,a|=g.flags&65011712,g.return=e,g=g.sibling;else for(g=e.child;g!==null;)i|=g.lanes|g.childLanes,a|=g.subtreeFlags,a|=g.flags,g.return=e,g=g.sibling;return e.subtreeFlags|=a,e.childLanes=i,t}function Ry(e,t,i){var a=t.pendingProps;switch(ic(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return i=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xi(At),ee(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(as(t)?Ti(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sc())),ht(t),null;case 26:var g=t.type,w=t.memoizedState;return e===null?(Ti(t),w!==null?(ht(t),Xd(t,w)):(ht(t),Yc(t,g,null,a,i))):w?w!==e.memoizedState?(Ti(t),ht(t),Xd(t,w)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ti(t),ht(t),Yc(t,g,e,a,i)),null;case 27:if(de(t),i=pe.current,g=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ti(t);else{if(!a){if(t.stateNode===null)throw Error(l(166));return ht(t),null}e=re.current,as(t)?Rf(t):(e=im(g,a,i),t.stateNode=e,Ti(t))}return ht(t),null;case 5:if(de(t),g=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ti(t);else{if(!a){if(t.stateNode===null)throw Error(l(166));return ht(t),null}if(w=re.current,as(t))Rf(t);else{var B=to(pe.current);switch(w){case 1:w=B.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:w=B.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":w=B.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":w=B.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":w=B.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof a.is=="string"?B.createElement("select",{is:a.is}):B.createElement("select"),a.multiple?w.multiple=!0:a.size&&(w.size=a.size);break;default:w=typeof a.is=="string"?B.createElement(g,{is:a.is}):B.createElement(g)}}w[kt]=t,w[Ut]=a;e:for(B=t.child;B!==null;){if(B.tag===5||B.tag===6)w.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===t)break e;for(;B.sibling===null;){if(B.return===null||B.return===t)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}t.stateNode=w;e:switch(Gt(w,g,a),g){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Ti(t)}}return ht(t),Yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Ti(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(l(166));if(e=pe.current,as(t)){if(e=t.stateNode,i=t.memoizedProps,a=null,g=Ft,g!==null)switch(g.tag){case 27:case 5:a=g.memoizedProps}e[kt]=t,e=!!(e.nodeValue===i||a!==null&&a.suppressHydrationWarning===!0||Vp(e.nodeValue,i)),e||$i(t,!0)}else e=to(e).createTextNode(a),e[kt]=t,t.stateNode=e}return ht(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(a=as(t),i!==null){if(e===null){if(!a)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[kt]=t}else xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else i=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Tn(t),t):(Tn(t),null);if((t.flags&128)!==0)throw Error(l(558))}return ht(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(g=as(t),a!==null&&a.dehydrated!==null){if(e===null){if(!g)throw Error(l(318));if(g=t.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(l(317));g[kt]=t}else xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),g=!1}else g=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=g),g=!0;if(!g)return t.flags&256?(Tn(t),t):(Tn(t),null)}return Tn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=a!==null,e=e!==null&&e.memoizedState!==null,i&&(a=t.child,g=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(g=a.alternate.memoizedState.cachePool.pool),w=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(w=a.memoizedState.cachePool.pool),w!==g&&(a.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Ul(t,t.updateQueue),ht(t),null);case 4:return ee(),e===null&&_u(t.stateNode.containerInfo),ht(t),null;case 10:return xi(t.type),ht(t),null;case 19:if($(Ct),a=t.memoizedState,a===null)return ht(t),null;if(g=(t.flags&128)!==0,w=a.rendering,w===null)if(g)ga(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=Al(e),w!==null){for(t.flags|=128,ga(a,!1),e=w.updateQueue,t.updateQueue=e,Ul(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)xf(i,e),i=i.sibling;return I(Ct,Ct.current&1|2),Ye&&Ci(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&tt()>Gl&&(t.flags|=128,g=!0,ga(a,!1),t.lanes=4194304)}else{if(!g)if(e=Al(w),e!==null){if(t.flags|=128,g=!0,e=e.updateQueue,t.updateQueue=e,Ul(t,e),ga(a,!0),a.tail===null&&a.tailMode==="hidden"&&!w.alternate&&!Ye)return ht(t),null}else 2*tt()-a.renderingStartTime>Gl&&i!==536870912&&(t.flags|=128,g=!0,ga(a,!1),t.lanes=4194304);a.isBackwards?(w.sibling=t.child,t.child=w):(e=a.last,e!==null?e.sibling=w:t.child=w,a.last=w)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=tt(),e.sibling=null,i=Ct.current,I(Ct,g?i&1|2:i&1),Ye&&Ci(t,a.treeForkCount),e):(ht(t),null);case 22:case 23:return Tn(t),vc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(i&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),i=t.updateQueue,i!==null&&Ul(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==i&&(t.flags|=2048),e!==null&&$(Ar),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),xi(At),ht(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function Dy(e,t){switch(ic(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(At),ee(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(Tn(t),t.alternate===null)throw Error(l(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $(Ct),null;case 4:return ee(),null;case 10:return xi(t.type),null;case 22:case 23:return Tn(t),vc(),e!==null&&$(Ar),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xi(At),null;case 25:return null;default:return null}}function Qd(e,t){switch(ic(t),t.tag){case 3:xi(At),ee();break;case 26:case 27:case 5:de(t);break;case 4:ee();break;case 31:t.memoizedState!==null&&Tn(t);break;case 13:Tn(t);break;case 19:$(Ct);break;case 10:xi(t.type);break;case 22:case 23:Tn(t),vc(),e!==null&&$(Ar);break;case 24:xi(At)}}function _a(e,t){try{var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var g=a.next;i=g;do{if((i.tag&e)===e){a=void 0;var w=i.create,B=i.inst;a=w(),B.destroy=a}i=i.next}while(i!==g)}}catch(P){it(t,t.return,P)}}function Qi(e,t,i){try{var a=t.updateQueue,g=a!==null?a.lastEffect:null;if(g!==null){var w=g.next;a=w;do{if((a.tag&e)===e){var B=a.inst,P=B.destroy;if(P!==void 0){B.destroy=void 0,g=t;var X=i,oe=P;try{oe()}catch(fe){it(g,X,fe)}}}a=a.next}while(a!==w)}}catch(fe){it(t,t.return,fe)}}function Jd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Ff(t,i)}catch(a){it(e,e.return,a)}}}function Zd(e,t,i){i.props=Lr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(a){it(e,t,a)}}function va(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof i=="function"?e.refCleanup=i(a):i.current=a}}catch(g){it(e,t,g)}}function oi(e,t){var i=e.ref,a=e.refCleanup;if(i!==null)if(typeof a=="function")try{a()}catch(g){it(e,t,g)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(g){it(e,t,g)}else i.current=null}function ep(e){var t=e.type,i=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&a.focus();break e;case"img":i.src?a.src=i.src:i.srcSet&&(a.srcset=i.srcSet)}}catch(g){it(e,e.return,g)}}function Xc(e,t,i){try{var a=e.stateNode;Jy(a,e.type,i,t),a[Ut]=t}catch(g){it(e,e.return,g)}}function tp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rr(e.type)||e.tag===4}function Qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Kt));else if(a!==4&&(a===27&&rr(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,i),e=e.sibling;e!==null;)Jc(e,t,i),e=e.sibling}function Pl(e,t,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(a!==4&&(a===27&&rr(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Pl(e,t,i),e=e.sibling;e!==null;)Pl(e,t,i),e=e.sibling}function np(e){var t=e.stateNode,i=e.memoizedProps;try{for(var a=e.type,g=t.attributes;g.length;)t.removeAttributeNode(g[0]);Gt(t,a,i),t[kt]=e,t[Ut]=i}catch(w){it(e,e.return,w)}}var Ri=!1,Dt=!1,Zc=!1,ip=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function My(e,t){if(e=e.containerInfo,Su=oo,e=mf(e),Vo(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var a=i.getSelection&&i.getSelection();if(a&&a.rangeCount!==0){i=a.anchorNode;var g=a.anchorOffset,w=a.focusNode;a=a.focusOffset;try{i.nodeType,w.nodeType}catch{i=null;break e}var B=0,P=-1,X=-1,oe=0,fe=0,_e=e,ce=null;t:for(;;){for(var ue;_e!==i||g!==0&&_e.nodeType!==3||(P=B+g),_e!==w||a!==0&&_e.nodeType!==3||(X=B+a),_e.nodeType===3&&(B+=_e.nodeValue.length),(ue=_e.firstChild)!==null;)ce=_e,_e=ue;for(;;){if(_e===e)break t;if(ce===i&&++oe===g&&(P=B),ce===w&&++fe===a&&(X=B),(ue=_e.nextSibling)!==null)break;_e=ce,ce=_e.parentNode}_e=ue}i=P===-1||X===-1?null:{start:P,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(bu={focusedElem:e,selectionRange:i},oo=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,w=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)g=e[i],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&w!==null){e=void 0,i=t,g=w.memoizedProps,w=w.memoizedState,a=i.stateNode;try{var Ee=Lr(i.type,g);e=a.getSnapshotBeforeUpdate(Ee,w),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){it(i,i.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)xu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,Ht=e;break}Ht=t.return}}function rp(e,t,i){var a=i.flags;switch(i.tag){case 0:case 11:case 15:Mi(e,i),a&4&&_a(5,i);break;case 1:if(Mi(e,i),a&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(B){it(i,i.return,B)}else{var g=Lr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(g,t,e.__reactInternalSnapshotBeforeUpdate)}catch(B){it(i,i.return,B)}}a&64&&Jd(i),a&512&&va(i,i.return);break;case 3:if(Mi(e,i),a&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Ff(e,t)}catch(B){it(i,i.return,B)}}break;case 27:t===null&&a&4&&np(i);case 26:case 5:Mi(e,i),t===null&&a&4&&ep(i),a&512&&va(i,i.return);break;case 12:Mi(e,i);break;case 31:Mi(e,i),a&4&&lp(e,i);break;case 13:Mi(e,i),a&4&&op(e,i),a&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Uy.bind(null,i),a0(e,i))));break;case 22:if(a=i.memoizedState!==null||Ri,!a){t=t!==null&&t.memoizedState!==null||Dt,g=Ri;var w=Dt;Ri=a,(Dt=t)&&!w?Li(e,i,(i.subtreeFlags&8772)!==0):Mi(e,i),Ri=g,Dt=w}break;case 30:break;default:Mi(e,i)}}function sp(e){var t=e.alternate;t!==null&&(e.alternate=null,sp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dt=null,mn=!1;function Di(e,t,i){for(i=i.child;i!==null;)ap(e,t,i),i=i.sibling}function ap(e,t,i){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(gt,i)}catch{}switch(i.tag){case 26:Dt||oi(i,t),Di(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Dt||oi(i,t);var a=dt,g=mn;rr(i.type)&&(dt=i.stateNode,mn=!1),Di(e,t,i),Aa(i.stateNode),dt=a,mn=g;break;case 5:Dt||oi(i,t);case 6:if(a=dt,g=mn,dt=null,Di(e,t,i),dt=a,mn=g,dt!==null)if(mn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(i.stateNode)}catch(w){it(i,t,w)}else try{dt.removeChild(i.stateNode)}catch(w){it(i,t,w)}break;case 18:dt!==null&&(mn?(e=dt,Jp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),As(e)):Jp(dt,i.stateNode));break;case 4:a=dt,g=mn,dt=i.stateNode.containerInfo,mn=!0,Di(e,t,i),dt=a,mn=g;break;case 0:case 11:case 14:case 15:Qi(2,i,t),Dt||Qi(4,i,t),Di(e,t,i);break;case 1:Dt||(oi(i,t),a=i.stateNode,typeof a.componentWillUnmount=="function"&&Zd(i,t,a)),Di(e,t,i);break;case 21:Di(e,t,i);break;case 22:Dt=(a=Dt)||i.memoizedState!==null,Di(e,t,i),Dt=a;break;default:Di(e,t,i)}}function lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{As(e)}catch(i){it(t,t.return,i)}}}function op(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{As(e)}catch(i){it(t,t.return,i)}}function Ly(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ip),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ip),t;default:throw Error(l(435,e.tag))}}function Fl(e,t){var i=Ly(e);t.forEach(function(a){if(!i.has(a)){i.add(a);var g=Py.bind(null,e,a);a.then(g,g)}})}function gn(e,t){var i=t.deletions;if(i!==null)for(var a=0;a<i.length;a++){var g=i[a],w=e,B=t,P=B;e:for(;P!==null;){switch(P.tag){case 27:if(rr(P.type)){dt=P.stateNode,mn=!1;break e}break;case 5:dt=P.stateNode,mn=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,mn=!0;break e}P=P.return}if(dt===null)throw Error(l(160));ap(w,B,g),dt=null,mn=!1,w=g.alternate,w!==null&&(w.return=null),g.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)cp(t,e),t=t.sibling}var ei=null;function cp(e,t){var i=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(t,e),_n(e),a&4&&(Qi(3,e,e.return),_a(3,e),Qi(5,e,e.return));break;case 1:gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),a&64&&Ri&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?a:i.concat(a))));break;case 26:var g=ei;if(gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),a&4){var w=i!==null?i.memoizedState:null;if(a=e.memoizedState,i===null)if(a===null)if(e.stateNode===null){e:{a=e.type,i=e.memoizedProps,g=g.ownerDocument||g;t:switch(a){case"title":w=g.getElementsByTagName("title")[0],(!w||w[Bn]||w[kt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=g.createElement(a),g.head.insertBefore(w,g.querySelector("head > title"))),Gt(w,a,i),w[kt]=e,bt(w),a=w;break e;case"link":var B=cm("link","href",g).get(a+(i.href||""));if(B){for(var P=0;P<B.length;P++)if(w=B[P],w.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&w.getAttribute("rel")===(i.rel==null?null:i.rel)&&w.getAttribute("title")===(i.title==null?null:i.title)&&w.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){B.splice(P,1);break t}}w=g.createElement(a),Gt(w,a,i),g.head.appendChild(w);break;case"meta":if(B=cm("meta","content",g).get(a+(i.content||""))){for(P=0;P<B.length;P++)if(w=B[P],w.getAttribute("content")===(i.content==null?null:""+i.content)&&w.getAttribute("name")===(i.name==null?null:i.name)&&w.getAttribute("property")===(i.property==null?null:i.property)&&w.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&w.getAttribute("charset")===(i.charSet==null?null:i.charSet)){B.splice(P,1);break t}}w=g.createElement(a),Gt(w,a,i),g.head.appendChild(w);break;default:throw Error(l(468,a))}w[kt]=e,bt(w),a=w}e.stateNode=a}else um(g,e.type,e.stateNode);else e.stateNode=om(g,a,e.memoizedProps);else w!==a?(w===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):w.count--,a===null?um(g,e.type,e.stateNode):om(g,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,i.memoizedProps)}break;case 27:gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),i!==null&&a&4&&Xc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),e.flags&32){g=e.stateNode;try{ri(g,"")}catch(Ee){it(e,e.return,Ee)}}a&4&&e.stateNode!=null&&(g=e.memoizedProps,Xc(e,g,i!==null?i.memoizedProps:g)),a&1024&&(Zc=!0);break;case 6:if(gn(t,e),_n(e),a&4){if(e.stateNode===null)throw Error(l(162));a=e.memoizedProps,i=e.stateNode;try{i.nodeValue=a}catch(Ee){it(e,e.return,Ee)}}break;case 3:if(ro=null,g=ei,ei=no(t.containerInfo),gn(t,e),ei=g,_n(e),a&4&&i!==null&&i.memoizedState.isDehydrated)try{As(t.containerInfo)}catch(Ee){it(e,e.return,Ee)}Zc&&(Zc=!1,up(e));break;case 4:a=ei,ei=no(e.stateNode.containerInfo),gn(t,e),_n(e),ei=a;break;case 12:gn(t,e),_n(e);break;case 31:gn(t,e),_n(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fl(e,a)));break;case 13:gn(t,e),_n(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&($l=tt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fl(e,a)));break;case 22:g=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,oe=Ri,fe=Dt;if(Ri=oe||g,Dt=fe||X,gn(t,e),Dt=fe,Ri=oe,_n(e),a&8192)e:for(t=e.stateNode,t._visibility=g?t._visibility&-2:t._visibility|1,g&&(i===null||X||Ri||Dt||Or(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(w=X.stateNode,g)B=w.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{P=X.stateNode;var _e=X.memoizedProps.style,ce=_e!=null&&_e.hasOwnProperty("display")?_e.display:null;P.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ee){it(X,X.return,Ee)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=g?"":X.memoizedProps}catch(Ee){it(X,X.return,Ee)}}}else if(t.tag===18){if(i===null){X=t;try{var ue=X.stateNode;g?Zp(ue,!0):Zp(X.stateNode,!1)}catch(Ee){it(X,X.return,Ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(i=a.retryQueue,i!==null&&(a.retryQueue=null,Fl(e,i))));break;case 19:gn(t,e),_n(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fl(e,a)));break;case 30:break;case 21:break;default:gn(t,e),_n(e)}}function _n(e){var t=e.flags;if(t&2){try{for(var i,a=e.return;a!==null;){if(tp(a)){i=a;break}a=a.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var g=i.stateNode,w=Qc(e);Pl(e,w,g);break;case 5:var B=i.stateNode;i.flags&32&&(ri(B,""),i.flags&=-33);var P=Qc(e);Pl(e,P,B);break;case 3:case 4:var X=i.stateNode.containerInfo,oe=Qc(e);Jc(e,oe,X);break;default:throw Error(l(161))}}catch(fe){it(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function up(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;up(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Mi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rp(e,t.alternate,t),t=t.sibling}function Or(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qi(4,t,t.return),Or(t);break;case 1:oi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Zd(t,t.return,i),Or(t);break;case 27:Aa(t.stateNode);case 26:case 5:oi(t,t.return),Or(t);break;case 22:t.memoizedState===null&&Or(t);break;case 30:Or(t);break;default:Or(t)}e=e.sibling}}function Li(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,g=e,w=t,B=w.flags;switch(w.tag){case 0:case 11:case 15:Li(g,w,i),_a(4,w);break;case 1:if(Li(g,w,i),a=w,g=a.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(oe){it(a,a.return,oe)}if(a=w,g=a.updateQueue,g!==null){var P=a.stateNode;try{var X=g.shared.hiddenCallbacks;if(X!==null)for(g.shared.hiddenCallbacks=null,g=0;g<X.length;g++)Pf(X[g],P)}catch(oe){it(a,a.return,oe)}}i&&B&64&&Jd(w),va(w,w.return);break;case 27:np(w);case 26:case 5:Li(g,w,i),i&&a===null&&B&4&&ep(w),va(w,w.return);break;case 12:Li(g,w,i);break;case 31:Li(g,w,i),i&&B&4&&lp(g,w);break;case 13:Li(g,w,i),i&&B&4&&op(g,w);break;case 22:w.memoizedState===null&&Li(g,w,i),va(w,w.return);break;case 30:break;default:Li(g,w,i)}t=t.sibling}}function eu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ra(i))}function tu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e))}function ti(e,t,i,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hp(e,t,i,a),t=t.sibling}function hp(e,t,i,a){var g=t.flags;switch(t.tag){case 0:case 11:case 15:ti(e,t,i,a),g&2048&&_a(9,t);break;case 1:ti(e,t,i,a);break;case 3:ti(e,t,i,a),g&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e)));break;case 12:if(g&2048){ti(e,t,i,a),e=t.stateNode;try{var w=t.memoizedProps,B=w.id,P=w.onPostCommit;typeof P=="function"&&P(B,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){it(t,t.return,X)}}else ti(e,t,i,a);break;case 31:ti(e,t,i,a);break;case 13:ti(e,t,i,a);break;case 23:break;case 22:w=t.stateNode,B=t.alternate,t.memoizedState!==null?w._visibility&2?ti(e,t,i,a):ya(e,t):w._visibility&2?ti(e,t,i,a):(w._visibility|=2,gs(e,t,i,a,(t.subtreeFlags&10256)!==0||!1)),g&2048&&eu(B,t);break;case 24:ti(e,t,i,a),g&2048&&tu(t.alternate,t);break;default:ti(e,t,i,a)}}function gs(e,t,i,a,g){for(g=g&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var w=e,B=t,P=i,X=a,oe=B.flags;switch(B.tag){case 0:case 11:case 15:gs(w,B,P,X,g),_a(8,B);break;case 23:break;case 22:var fe=B.stateNode;B.memoizedState!==null?fe._visibility&2?gs(w,B,P,X,g):ya(w,B):(fe._visibility|=2,gs(w,B,P,X,g)),g&&oe&2048&&eu(B.alternate,B);break;case 24:gs(w,B,P,X,g),g&&oe&2048&&tu(B.alternate,B);break;default:gs(w,B,P,X,g)}t=t.sibling}}function ya(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,a=t,g=a.flags;switch(a.tag){case 22:ya(i,a),g&2048&&eu(a.alternate,a);break;case 24:ya(i,a),g&2048&&tu(a.alternate,a);break;default:ya(i,a)}t=t.sibling}}var Sa=8192;function _s(e,t,i){if(e.subtreeFlags&Sa)for(e=e.child;e!==null;)fp(e,t,i),e=e.sibling}function fp(e,t,i){switch(e.tag){case 26:_s(e,t,i),e.flags&Sa&&e.memoizedState!==null&&v0(i,ei,e.memoizedState,e.memoizedProps);break;case 5:_s(e,t,i);break;case 3:case 4:var a=ei;ei=no(e.stateNode.containerInfo),_s(e,t,i),ei=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Sa,Sa=16777216,_s(e,t,i),Sa=a):_s(e,t,i));break;default:_s(e,t,i)}}function dp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ba(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var a=t[i];Ht=a,mp(a,e)}dp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pp(e),e=e.sibling}function pp(e){switch(e.tag){case 0:case 11:case 15:ba(e),e.flags&2048&&Qi(9,e,e.return);break;case 3:ba(e);break;case 12:ba(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ql(e)):ba(e);break;default:ba(e)}}function ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var a=t[i];Ht=a,mp(a,e)}dp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qi(8,t,t.return),ql(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ql(t));break;default:ql(t)}e=e.sibling}}function mp(e,t){for(;Ht!==null;){var i=Ht;switch(i.tag){case 0:case 11:case 15:Qi(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var a=i.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ra(i.memoizedState.cache)}if(a=i.child,a!==null)a.return=i,Ht=a;else e:for(i=e;Ht!==null;){a=Ht;var g=a.sibling,w=a.return;if(sp(a),a===i){Ht=null;break e}if(g!==null){g.return=w,Ht=g;break e}Ht=w}}}var Oy={getCacheForType:function(e){var t=qt(At),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return qt(At).controller.signal}},By=typeof WeakMap=="function"?WeakMap:Map,et=0,lt=null,$e=null,We=0,nt=0,Rn=null,Ji=!1,vs=!1,nu=!1,Oi=0,vt=0,Zi=0,Br=0,iu=0,Dn=0,ys=0,Ca=null,vn=null,ru=!1,$l=0,gp=0,Gl=1/0,Vl=null,er=null,jt=0,tr=null,Ss=null,Bi=0,su=0,au=null,_p=null,wa=0,lu=null;function Mn(){return(et&2)!==0&&We!==0?We&-We:G.T!==null?du():Kn()}function vp(){if(Dn===0)if((We&536870912)===0||Ye){var e=Vn;Vn<<=1,(Vn&3932160)===0&&(Vn=262144),Dn=e}else Dn=536870912;return e=An.current,e!==null&&(e.flags|=32),Dn}function yn(e,t,i){(e===lt&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(bs(e,0),nr(e,We,Dn,!1)),It(e,i),((et&2)===0||e!==lt)&&(e===lt&&((et&2)===0&&(Br|=i),vt===4&&nr(e,We,Dn,!1)),ci(e))}function yp(e,t,i){if((et&6)!==0)throw Error(l(327));var a=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Vt(e,t),g=a?Hy(e,t):cu(e,t,!0),w=a;do{if(g===0){vs&&!a&&nr(e,t,0,!1);break}else{if(i=e.current.alternate,w&&!jy(i)){g=cu(e,t,!1),w=!1;continue}if(g===2){if(w=t,e.errorRecoveryDisabledLanes&w)var B=0;else B=e.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){t=B;e:{var P=e;g=Ca;var X=P.current.memoizedState.isDehydrated;if(X&&(bs(P,B).flags|=256),B=cu(P,B,!1),B!==2){if(nu&&!X){P.errorRecoveryDisabledLanes|=w,Br|=w,g=4;break e}w=vn,vn=g,w!==null&&(vn===null?vn=w:vn.push.apply(vn,w))}g=B}if(w=!1,g!==2)continue}}if(g===1){bs(e,0),nr(e,t,0,!0);break}e:{switch(a=e,w=g,w){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:nr(a,t,Dn,!Ji);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(g=$l+300-tt(),10<g)){if(nr(a,t,Dn,!Ji),Wn(a,0,!0)!==0)break e;Bi=t,a.timeoutHandle=Xp(Sp.bind(null,a,i,vn,Vl,ru,t,Dn,Br,ys,Ji,w,"Throttled",-0,0),g);break e}Sp(a,i,vn,Vl,ru,t,Dn,Br,ys,Ji,w,null,-0,0)}}break}while(!0);ci(e)}function Sp(e,t,i,a,g,w,B,P,X,oe,fe,_e,ce,ue){if(e.timeoutHandle=-1,_e=t.subtreeFlags,_e&8192||(_e&16785408)===16785408){_e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},fp(t,w,_e);var Ee=(w&62914560)===w?$l-tt():(w&4194048)===w?gp-tt():0;if(Ee=y0(_e,Ee),Ee!==null){Bi=w,e.cancelPendingCommit=Ee(Tp.bind(null,e,t,w,i,a,g,B,P,X,fe,_e,null,ce,ue)),nr(e,w,B,!oe);return}}Tp(e,t,w,i,a,g,B,P,X)}function jy(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var a=0;a<i.length;a++){var g=i[a],w=g.getSnapshot;g=g.value;try{if(!En(w(),g))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nr(e,t,i,a){t&=~iu,t&=~Br,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var g=t;0<g;){var w=31-Qe(g),B=1<<w;a[w]=-1,g&=~B}i!==0&&ze(e,i,t)}function Wl(){return(et&6)===0?(xa(0),!1):!0}function ou(){if($e!==null){if(nt===0)var e=$e.return;else e=$e,wi=Er=null,xc(e),hs=null,aa=0,e=$e;for(;e!==null;)Qd(e.alternate,e),e=e.return;$e=null}}function bs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,t0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Bi=0,ou(),lt=e,$e=i=bi(e.current,null),We=t,nt=0,Rn=null,Ji=!1,vs=Vt(e,t),nu=!1,ys=Dn=iu=Br=Zi=vt=0,vn=Ca=null,ru=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var g=31-Qe(a),w=1<<g;t|=e[g],a&=~w}return Oi=t,pl(),i}function bp(e,t){Ne=null,G.H=pa,t===us||t===Cl?(t=Hf(),nt=3):t===fc?(t=Hf(),nt=4):nt=t===Uc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Rn=t,$e===null&&(vt=1,Nl(e,Hn(t,e.current)))}function Cp(){var e=An.current;return e===null?!0:(We&4194048)===We?Pn===null:(We&62914560)===We||(We&536870912)!==0?e===Pn:!1}function wp(){var e=G.H;return G.H=pa,e===null?pa:e}function xp(){var e=G.A;return G.A=Oy,e}function Kl(){vt=4,Ji||(We&4194048)!==We&&An.current!==null||(vs=!0),(Zi&134217727)===0&&(Br&134217727)===0||lt===null||nr(lt,We,Dn,!1)}function cu(e,t,i){var a=et;et|=2;var g=wp(),w=xp();(lt!==e||We!==t)&&(Vl=null,bs(e,t)),t=!1;var B=vt;e:do try{if(nt!==0&&$e!==null){var P=$e,X=Rn;switch(nt){case 8:ou(),B=6;break e;case 3:case 2:case 9:case 6:An.current===null&&(t=!0);var oe=nt;if(nt=0,Rn=null,Cs(e,P,X,oe),i&&vs){B=0;break e}break;default:oe=nt,nt=0,Rn=null,Cs(e,P,X,oe)}}Ny(),B=vt;break}catch(fe){bp(e,fe)}while(!0);return t&&e.shellSuspendCounter++,wi=Er=null,et=a,G.H=g,G.A=w,$e===null&&(lt=null,We=0,pl()),B}function Ny(){for(;$e!==null;)Ep($e)}function Hy(e,t){var i=et;et|=2;var a=wp(),g=xp();lt!==e||We!==t?(Vl=null,Gl=tt()+500,bs(e,t)):vs=Vt(e,t);e:do try{if(nt!==0&&$e!==null){t=$e;var w=Rn;t:switch(nt){case 1:nt=0,Rn=null,Cs(e,t,w,1);break;case 2:case 9:if(jf(w)){nt=0,Rn=null,kp(t);break}t=function(){nt!==2&&nt!==9||lt!==e||(nt=7),ci(e)},w.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:jf(w)?(nt=0,Rn=null,kp(t)):(nt=0,Rn=null,Cs(e,t,w,7));break;case 5:var B=null;switch($e.tag){case 26:B=$e.memoizedState;case 5:case 27:var P=$e;if(B?hm(B):P.stateNode.complete){nt=0,Rn=null;var X=P.sibling;if(X!==null)$e=X;else{var oe=P.return;oe!==null?($e=oe,Yl(oe)):$e=null}break t}}nt=0,Rn=null,Cs(e,t,w,5);break;case 6:nt=0,Rn=null,Cs(e,t,w,6);break;case 8:ou(),vt=6;break e;default:throw Error(l(462))}}zy();break}catch(fe){bp(e,fe)}while(!0);return wi=Er=null,G.H=a,G.A=g,et=i,$e!==null?0:(lt=null,We=0,pl(),vt)}function zy(){for(;$e!==null&&!Cn();)Ep($e)}function Ep(e){var t=Yd(e.alternate,e,Oi);e.memoizedProps=e.pendingProps,t===null?Yl(e):$e=t}function kp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=qd(i,t,t.pendingProps,t.type,void 0,We);break;case 11:t=qd(i,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:xc(t);default:Qd(i,t),t=$e=xf(t,Oi),t=Yd(i,t,Oi)}e.memoizedProps=e.pendingProps,t===null?Yl(e):$e=t}function Cs(e,t,i,a){wi=Er=null,xc(t),hs=null,aa=0;var g=t.return;try{if(ky(e,g,t,i,We)){vt=1,Nl(e,Hn(i,e.current)),$e=null;return}}catch(w){if(g!==null)throw $e=g,w;vt=1,Nl(e,Hn(i,e.current)),$e=null;return}t.flags&32768?(Ye||a===1?e=!0:vs||(We&536870912)!==0?e=!1:(Ji=e=!0,(a===2||a===9||a===3||a===6)&&(a=An.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ap(t,e)):Yl(t)}function Yl(e){var t=e;do{if((t.flags&32768)!==0){Ap(t,Ji);return}e=t.return;var i=Ry(t.alternate,t,Oi);if(i!==null){$e=i;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);vt===0&&(vt=5)}function Ap(e,t){do{var i=Dy(e.alternate,e);if(i!==null){i.flags&=32767,$e=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=i}while(e!==null);vt=6,$e=null}function Tp(e,t,i,a,g,w,B,P,X){e.cancelPendingCommit=null;do Xl();while(jt!==0);if((et&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(w=t.lanes|t.childLanes,w|=Qo,Ii(e,i,w,B,P,X),e===lt&&($e=lt=null,We=0),Ss=t,tr=e,Bi=i,su=w,au=g,_p=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Fy(Ae,function(){return Op(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null,g=W.p,W.p=2,B=et,et|=4;try{My(e,t,i)}finally{et=B,W.p=g,G.T=a}}jt=1,Rp(),Dp(),Mp()}}function Rp(){if(jt===1){jt=0;var e=tr,t=Ss,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var a=W.p;W.p=2;var g=et;et|=4;try{cp(t,e);var w=bu,B=mf(e.containerInfo),P=w.focusedElem,X=w.selectionRange;if(B!==P&&P&&P.ownerDocument&&pf(P.ownerDocument.documentElement,P)){if(X!==null&&Vo(P)){var oe=X.start,fe=X.end;if(fe===void 0&&(fe=oe),"selectionStart"in P)P.selectionStart=oe,P.selectionEnd=Math.min(fe,P.value.length);else{var _e=P.ownerDocument||document,ce=_e&&_e.defaultView||window;if(ce.getSelection){var ue=ce.getSelection(),Ee=P.textContent.length,Le=Math.min(X.start,Ee),at=X.end===void 0?Le:Math.min(X.end,Ee);!ue.extend&&Le>at&&(B=at,at=Le,Le=B);var ne=df(P,Le),J=df(P,at);if(ne&&J&&(ue.rangeCount!==1||ue.anchorNode!==ne.node||ue.anchorOffset!==ne.offset||ue.focusNode!==J.node||ue.focusOffset!==J.offset)){var le=_e.createRange();le.setStart(ne.node,ne.offset),ue.removeAllRanges(),Le>at?(ue.addRange(le),ue.extend(J.node,J.offset)):(le.setEnd(J.node,J.offset),ue.addRange(le))}}}}for(_e=[],ue=P;ue=ue.parentNode;)ue.nodeType===1&&_e.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<_e.length;P++){var ge=_e[P];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}oo=!!Su,bu=Su=null}finally{et=g,W.p=a,G.T=i}}e.current=t,jt=2}}function Dp(){if(jt===2){jt=0;var e=tr,t=Ss,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var a=W.p;W.p=2;var g=et;et|=4;try{rp(e,t.alternate,t)}finally{et=g,W.p=a,G.T=i}}jt=3}}function Mp(){if(jt===4||jt===3){jt=0,St();var e=tr,t=Ss,i=Bi,a=_p;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?jt=5:(jt=0,Ss=tr=null,Lp(e,e.pendingLanes));var g=e.pendingLanes;if(g===0&&(er=null),Us(i),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(gt,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=G.T,g=W.p,W.p=2,G.T=null;try{for(var w=e.onRecoverableError,B=0;B<a.length;B++){var P=a[B];w(P.value,{componentStack:P.stack})}}finally{G.T=t,W.p=g}}(Bi&3)!==0&&Xl(),ci(e),g=e.pendingLanes,(i&261930)!==0&&(g&42)!==0?e===lu?wa++:(wa=0,lu=e):wa=0,xa(0)}}function Lp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ra(t)))}function Xl(){return Rp(),Dp(),Mp(),Op()}function Op(){if(jt!==5)return!1;var e=tr,t=su;su=0;var i=Us(Bi),a=G.T,g=W.p;try{W.p=32>i?32:i,G.T=null,i=au,au=null;var w=tr,B=Bi;if(jt=0,Ss=tr=null,Bi=0,(et&6)!==0)throw Error(l(331));var P=et;if(et|=4,pp(w.current),hp(w,w.current,B,i),et=P,xa(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(gt,w)}catch{}return!0}finally{W.p=g,G.T=a,Lp(e,t)}}function Bp(e,t,i){t=Hn(i,t),t=Ic(e.stateNode,t,2),e=Ki(e,t,2),e!==null&&(It(e,2),ci(e))}function it(e,t,i){if(e.tag===3)Bp(e,e,i);else for(;t!==null;){if(t.tag===3){Bp(t,e,i);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(er===null||!er.has(a))){e=Hn(i,e),i=jd(2),a=Ki(t,i,2),a!==null&&(Nd(i,a,t,e),It(a,2),ci(a));break}}t=t.return}}function uu(e,t,i){var a=e.pingCache;if(a===null){a=e.pingCache=new By;var g=new Set;a.set(t,g)}else g=a.get(t),g===void 0&&(g=new Set,a.set(t,g));g.has(i)||(nu=!0,g.add(i),e=Iy.bind(null,e,t,i),t.then(e,e))}function Iy(e,t,i){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lt===e&&(We&i)===i&&(vt===4||vt===3&&(We&62914560)===We&&300>tt()-$l?(et&2)===0&&bs(e,0):iu|=i,ys===We&&(ys=0)),ci(e)}function jp(e,t){t===0&&(t=Wt()),e=Cr(e,t),e!==null&&(It(e,t),ci(e))}function Uy(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),jp(e,i)}function Py(e,t){var i=0;switch(e.tag){case 31:case 13:var a=e.stateNode,g=e.memoizedState;g!==null&&(i=g.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(l(314))}a!==null&&a.delete(t),jp(e,i)}function Fy(e,t){return Et(e,t)}var Ql=null,ws=null,hu=!1,Jl=!1,fu=!1,ir=0;function ci(e){e!==ws&&e.next===null&&(ws===null?Ql=ws=e:ws=ws.next=e),Jl=!0,hu||(hu=!0,$y())}function xa(e,t){if(!fu&&Jl){fu=!0;do for(var i=!1,a=Ql;a!==null;){if(e!==0){var g=a.pendingLanes;if(g===0)var w=0;else{var B=a.suspendedLanes,P=a.pingedLanes;w=(1<<31-Qe(42|e)+1)-1,w&=g&~(B&~P),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(i=!0,Ip(a,w))}else w=We,w=Wn(a,a===lt?w:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(w&3)===0||Vt(a,w)||(i=!0,Ip(a,w));a=a.next}while(i);fu=!1}}function qy(){Np()}function Np(){Jl=hu=!1;var e=0;ir!==0&&e0()&&(e=ir);for(var t=tt(),i=null,a=Ql;a!==null;){var g=a.next,w=Hp(a,t);w===0?(a.next=null,i===null?Ql=g:i.next=g,g===null&&(ws=i)):(i=a,(e!==0||(w&3)!==0)&&(Jl=!0)),a=g}jt!==0&&jt!==5||xa(e),ir!==0&&(ir=0)}function Hp(e,t){for(var i=e.suspendedLanes,a=e.pingedLanes,g=e.expirationTimes,w=e.pendingLanes&-62914561;0<w;){var B=31-Qe(w),P=1<<B,X=g[B];X===-1?((P&i)===0||(P&a)!==0)&&(g[B]=Is(P,t)):X<=t&&(e.expiredLanes|=P),w&=~P}if(t=lt,i=We,i=Wn(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,i===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&an(a),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Vt(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(a!==null&&an(a),Us(i)){case 2:case 8:i=ye;break;case 32:i=Ae;break;case 268435456:i=Oe;break;default:i=Ae}return a=zp.bind(null,e),i=Et(i,a),e.callbackPriority=t,e.callbackNode=i,t}return a!==null&&a!==null&&an(a),e.callbackPriority=2,e.callbackNode=null,2}function zp(e,t){if(jt!==0&&jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Xl()&&e.callbackNode!==i)return null;var a=We;return a=Wn(e,e===lt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(yp(e,a,t),Hp(e,tt()),e.callbackNode!=null&&e.callbackNode===i?zp.bind(null,e):null)}function Ip(e,t){if(Xl())return null;yp(e,t,!0)}function $y(){n0(function(){(et&6)!==0?Et(he,qy):Np()})}function du(){if(ir===0){var e=os;e===0&&(e=Gn,Gn<<=1,(Gn&261888)===0&&(Gn=256)),ir=e}return ir}function Up(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gr(""+e)}function Pp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function Gy(e,t,i,a,g){if(t==="submit"&&i&&i.stateNode===g){var w=Up((g[Ut]||null).action),B=a.submitter;B&&(t=(t=B[Ut]||null)?Up(t.formAction):B.getAttribute("formAction"),t!==null&&(w=t,B=null));var P=new Qr("action","action",null,a,g);e.push({event:P,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ir!==0){var X=B?Pp(g,B):new FormData(g);Oc(i,{pending:!0,data:X,method:g.method,action:w},null,X)}}else typeof w=="function"&&(P.preventDefault(),X=B?Pp(g,B):new FormData(g),Oc(i,{pending:!0,data:X,method:g.method,action:w},w,X))},currentTarget:g}]})}}for(var pu=0;pu<Xo.length;pu++){var mu=Xo[pu],Vy=mu.toLowerCase(),Wy=mu[0].toUpperCase()+mu.slice(1);Zn(Vy,"on"+Wy)}Zn(vf,"onAnimationEnd"),Zn(yf,"onAnimationIteration"),Zn(Sf,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(cy,"onTransitionRun"),Zn(uy,"onTransitionStart"),Zn(hy,"onTransitionCancel"),Zn(bf,"onTransitionEnd"),ie("onMouseEnter",["mouseout","mouseover"]),ie("onMouseLeave",["mouseout","mouseover"]),ie("onPointerEnter",["pointerout","pointerover"]),ie("onPointerLeave",["pointerout","pointerover"]),Qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ea="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(" "),Ky=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ea));function Fp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var a=e[i],g=a.event;a=a.listeners;e:{var w=void 0;if(t)for(var B=a.length-1;0<=B;B--){var P=a[B],X=P.instance,oe=P.currentTarget;if(P=P.listener,X!==w&&g.isPropagationStopped())break e;w=P,g.currentTarget=oe;try{w(g)}catch(fe){dl(fe)}g.currentTarget=null,w=X}else for(B=0;B<a.length;B++){if(P=a[B],X=P.instance,oe=P.currentTarget,P=P.listener,X!==w&&g.isPropagationStopped())break e;w=P,g.currentTarget=oe;try{w(g)}catch(fe){dl(fe)}g.currentTarget=null,w=X}}}}function Ge(e,t){var i=t[Ps];i===void 0&&(i=t[Ps]=new Set);var a=e+"__bubble";i.has(a)||(qp(t,e,2,!1),i.add(a))}function gu(e,t,i){var a=0;t&&(a|=4),qp(i,e,a,t)}var Zl="_reactListening"+Math.random().toString(36).slice(2);function _u(e){if(!e[Zl]){e[Zl]=!0,Fs.forEach(function(i){i!=="selectionchange"&&(Ky.has(i)||gu(i,!1,e),gu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zl]||(t[Zl]=!0,gu("selectionchange",!1,t))}}function qp(e,t,i,a){switch(vm(t)){case 2:var g=C0;break;case 8:g=w0;break;default:g=Lu}i=g.bind(null,t,i,e),g=void 0,!_r||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(g=!0),a?g!==void 0?e.addEventListener(t,i,{capture:!0,passive:g}):e.addEventListener(t,i,!0):g!==void 0?e.addEventListener(t,i,{passive:g}):e.addEventListener(t,i,!1)}function vu(e,t,i,a,g){var w=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var B=a.tag;if(B===3||B===4){var P=a.stateNode.containerInfo;if(P===g)break;if(B===4)for(B=a.return;B!==null;){var X=B.tag;if((X===3||X===4)&&B.stateNode.containerInfo===g)return;B=B.return}for(;P!==null;){if(B=cn(P),B===null)return;if(X=B.tag,X===5||X===6||X===26||X===27){a=w=B;continue e}P=P.parentNode}}a=a.return}dn(function(){var oe=w,fe=si(i),_e=[];e:{var ce=Cf.get(e);if(ce!==void 0){var ue=Qr,Ee=e;switch(e){case"keypress":if(Yr(i)===0)break e;case"keydown":case"keyup":ue=Pv;break;case"focusin":Ee="focus",ue=Po;break;case"focusout":Ee="blur",ue=Po;break;case"beforeblur":case"afterblur":ue=Po;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=hl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=Rv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=$v;break;case vf:case yf:case Sf:ue=Lv;break;case bf:ue=Vv;break;case"scroll":case"scrollend":ue=me;break;case"wheel":ue=Kv;break;case"copy":case"cut":case"paste":ue=Bv;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=Jh;break;case"toggle":case"beforetoggle":ue=Xv}var Le=(t&4)!==0,at=!Le&&(e==="scroll"||e==="scrollend"),ne=Le?ce!==null?ce+"Capture":null:ce;Le=[];for(var J=oe,le;J!==null;){var ge=J;if(le=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||le===null||ne===null||(ge=Si(J,ne),ge!=null&&Le.push(ka(J,ge,le))),at)break;J=J.return}0<Le.length&&(ce=new ue(ce,Ee,null,i,fe),_e.push({event:ce,listeners:Le}))}}if((t&7)===0){e:{if(ce=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",ce&&i!==Wr&&(Ee=i.relatedTarget||i.fromElement)&&(cn(Ee)||Ee[Yn]))break e;if((ue||ce)&&(ce=fe.window===fe?fe:(ce=fe.ownerDocument)?ce.defaultView||ce.parentWindow:window,ue?(Ee=i.relatedTarget||i.toElement,ue=oe,Ee=Ee?cn(Ee):null,Ee!==null&&(at=m(Ee),Le=Ee.tag,Ee!==at||Le!==5&&Le!==27&&Le!==6)&&(Ee=null)):(ue=null,Ee=oe),ue!==Ee)){if(Le=hl,ge="onMouseLeave",ne="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Jh,ge="onPointerLeave",ne="onPointerEnter",J="pointer"),at=ue==null?ce:mi(ue),le=Ee==null?ce:mi(Ee),ce=new Le(ge,J+"leave",ue,i,fe),ce.target=at,ce.relatedTarget=le,ge=null,cn(fe)===oe&&(Le=new Le(ne,J+"enter",Ee,i,fe),Le.target=le,Le.relatedTarget=at,ge=Le),at=ge,ue&&Ee)t:{for(Le=Yy,ne=ue,J=Ee,le=0,ge=ne;ge;ge=Le(ge))le++;ge=0;for(var Re=J;Re;Re=Le(Re))ge++;for(;0<le-ge;)ne=Le(ne),le--;for(;0<ge-le;)J=Le(J),ge--;for(;le--;){if(ne===J||J!==null&&ne===J.alternate){Le=ne;break t}ne=Le(ne),J=Le(J)}Le=null}else Le=null;ue!==null&&$p(_e,ce,ue,Le,!1),Ee!==null&&at!==null&&$p(_e,at,Ee,Le,!0)}}e:{if(ce=oe?mi(oe):window,ue=ce.nodeName&&ce.nodeName.toLowerCase(),ue==="select"||ue==="input"&&ce.type==="file")var Je=lf;else if(sf(ce))if(of)Je=ay;else{Je=ry;var Te=iy}else ue=ce.nodeName,!ue||ue.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?oe&&Vr(oe.elementType)&&(Je=lf):Je=sy;if(Je&&(Je=Je(e,oe))){af(_e,Je,i,fe);break e}Te&&Te(e,ce,oe),e==="focusout"&&oe&&ce.type==="number"&&oe.memoizedProps.value!=null&&Vs(ce,"number",ce.value)}switch(Te=oe?mi(oe):window,e){case"focusin":(sf(Te)||Te.contentEditable==="true")&&(es=Te,Wo=oe,ta=null);break;case"focusout":ta=Wo=es=null;break;case"mousedown":Ko=!0;break;case"contextmenu":case"mouseup":case"dragend":Ko=!1,gf(_e,i,fe);break;case"selectionchange":if(oy)break;case"keydown":case"keyup":gf(_e,i,fe)}var Ie;if(qo)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Zr?nf(e,i)&&(Ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(Zh&&i.locale!=="ko"&&(Zr||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Zr&&(Ie=ul()):(ke=fe,Xs="value"in ke?ke.value:ke.textContent,Zr=!0)),Te=eo(oe,Ke),0<Te.length&&(Ke=new Qh(Ke,e,null,i,fe),_e.push({event:Ke,listeners:Te}),Ie?Ke.data=Ie:(Ie=rf(i),Ie!==null&&(Ke.data=Ie)))),(Ie=Jv?Zv(e,i):ey(e,i))&&(Ke=eo(oe,"onBeforeInput"),0<Ke.length&&(Te=new Qh("onBeforeInput","beforeinput",null,i,fe),_e.push({event:Te,listeners:Ke}),Te.data=Ie)),Gy(_e,e,oe,i,fe)}Fp(_e,t)})}function ka(e,t,i){return{instance:e,listener:t,currentTarget:i}}function eo(e,t){for(var i=t+"Capture",a=[];e!==null;){var g=e,w=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||w===null||(g=Si(e,i),g!=null&&a.unshift(ka(e,g,w)),g=Si(e,t),g!=null&&a.push(ka(e,g,w))),e.tag===3)return a;e=e.return}return[]}function Yy(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $p(e,t,i,a,g){for(var w=t._reactName,B=[];i!==null&&i!==a;){var P=i,X=P.alternate,oe=P.stateNode;if(P=P.tag,X!==null&&X===a)break;P!==5&&P!==26&&P!==27||oe===null||(X=oe,g?(oe=Si(i,w),oe!=null&&B.unshift(ka(i,oe,X))):g||(oe=Si(i,w),oe!=null&&B.push(ka(i,oe,X)))),i=i.return}B.length!==0&&e.push({event:t,listeners:B})}var Xy=/\r\n?/g,Qy=/\u0000|\uFFFD/g;function Gp(e){return(typeof e=="string"?e:""+e).replace(Xy,`
|
|
49
|
-
`).replace(Qy,"")}function Vp(e,t){return t=Gp(t),Gp(e)===t}function st(e,t,i,a,g,w){switch(i){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ri(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ri(e,""+a);break;case"className":_i(e,"class",a);break;case"tabIndex":_i(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":_i(e,i,a);break;case"style":ll(e,a,w);break;case"data":if(t!=="object"){_i(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(i);break}a=gr(""+a),e.setAttribute(i,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(i,"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 w=="function"&&(i==="formAction"?(t!=="input"&&st(e,t,"name",g.name,g,null),st(e,t,"formEncType",g.formEncType,g,null),st(e,t,"formMethod",g.formMethod,g,null),st(e,t,"formTarget",g.formTarget,g,null)):(st(e,t,"encType",g.encType,g,null),st(e,t,"method",g.method,g,null),st(e,t,"target",g.target,g,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(i);break}a=gr(""+a),e.setAttribute(i,a);break;case"onClick":a!=null&&(e.onclick=Kt);break;case"onScroll":a!=null&&Ge("scroll",e);break;case"onScrollEnd":a!=null&&Ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(l(61));if(i=a.__html,i!=null){if(g.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}i=gr(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(i,""+a):e.removeAttribute(i);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":a===!0?e.setAttribute(i,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(i,a):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(i,a):e.removeAttribute(i);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(i):e.setAttribute(i,a);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),Gr(e,"popover",a);break;case"xlinkActuate":jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":jn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":jn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":jn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":jn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Gr(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Ks.get(i)||i,Gr(e,i,a))}}function yu(e,t,i,a,g,w){switch(i){case"style":ll(e,a,w);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(l(61));if(i=a.__html,i!=null){if(g.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof a=="string"?ri(e,a):(typeof a=="number"||typeof a=="bigint")&&ri(e,""+a);break;case"onScroll":a!=null&&Ge("scroll",e);break;case"onScrollEnd":a!=null&&Ge("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Kt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(g=i.endsWith("Capture"),t=i.slice(2,g?i.length-7:void 0),w=e[Ut]||null,w=w!=null?w[i]:null,typeof w=="function"&&e.removeEventListener(t,w,g),typeof a=="function")){typeof w!="function"&&w!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,a,g);break e}i in e?e[i]=a:a===!0?e.setAttribute(i,""):Gr(e,i,a)}}}function Gt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var a=!1,g=!1,w;for(w in i)if(i.hasOwnProperty(w)){var B=i[w];if(B!=null)switch(w){case"src":a=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:st(e,t,w,B,i,null)}}g&&st(e,t,"srcSet",i.srcSet,i,null),a&&st(e,t,"src",i.src,i,null);return;case"input":Ge("invalid",e);var P=w=B=g=null,X=null,oe=null;for(a in i)if(i.hasOwnProperty(a)){var fe=i[a];if(fe!=null)switch(a){case"name":g=fe;break;case"type":B=fe;break;case"checked":X=fe;break;case"defaultChecked":oe=fe;break;case"value":w=fe;break;case"defaultValue":P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(l(137,t));break;default:st(e,t,a,fe,i,null)}}sl(e,w,P,X,oe,B,g,!1);return;case"select":Ge("invalid",e),a=B=w=null;for(g in i)if(i.hasOwnProperty(g)&&(P=i[g],P!=null))switch(g){case"value":w=P;break;case"defaultValue":B=P;break;case"multiple":a=P;default:st(e,t,g,P,i,null)}t=w,i=B,e.multiple=!!a,t!=null?Ui(e,!!a,t,!1):i!=null&&Ui(e,!!a,i,!0);return;case"textarea":Ge("invalid",e),w=g=a=null;for(B in i)if(i.hasOwnProperty(B)&&(P=i[B],P!=null))switch(B){case"value":a=P;break;case"defaultValue":g=P;break;case"children":w=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(91));break;default:st(e,t,B,P,i,null)}vi(e,a,g,w);return;case"option":for(X in i)if(i.hasOwnProperty(X)&&(a=i[X],a!=null))switch(X){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:st(e,t,X,a,i,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(a=0;a<Ea.length;a++)Ge(Ea[a],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in i)if(i.hasOwnProperty(oe)&&(a=i[oe],a!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:st(e,t,oe,a,i,null)}return;default:if(Vr(t)){for(fe in i)i.hasOwnProperty(fe)&&(a=i[fe],a!==void 0&&yu(e,t,fe,a,i,void 0));return}}for(P in i)i.hasOwnProperty(P)&&(a=i[P],a!=null&&st(e,t,P,a,i,null))}function Jy(e,t,i,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,w=null,B=null,P=null,X=null,oe=null,fe=null;for(ue in i){var _e=i[ue];if(i.hasOwnProperty(ue)&&_e!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":X=_e;default:a.hasOwnProperty(ue)||st(e,t,ue,null,a,_e)}}for(var ce in a){var ue=a[ce];if(_e=i[ce],a.hasOwnProperty(ce)&&(ue!=null||_e!=null))switch(ce){case"type":w=ue;break;case"name":g=ue;break;case"checked":oe=ue;break;case"defaultChecked":fe=ue;break;case"value":B=ue;break;case"defaultValue":P=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(l(137,t));break;default:ue!==_e&&st(e,t,ce,ue,a,_e)}}Gs(e,B,P,X,oe,fe,w,g);return;case"select":ue=B=P=ce=null;for(w in i)if(X=i[w],i.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":ue=X;default:a.hasOwnProperty(w)||st(e,t,w,null,a,X)}for(g in a)if(w=a[g],X=i[g],a.hasOwnProperty(g)&&(w!=null||X!=null))switch(g){case"value":ce=w;break;case"defaultValue":P=w;break;case"multiple":B=w;default:w!==X&&st(e,t,g,w,a,X)}t=P,i=B,a=ue,ce!=null?Ui(e,!!i,ce,!1):!!a!=!!i&&(t!=null?Ui(e,!!i,t,!0):Ui(e,!!i,i?[]:"",!1));return;case"textarea":ue=ce=null;for(P in i)if(g=i[P],i.hasOwnProperty(P)&&g!=null&&!a.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:st(e,t,P,null,a,g)}for(B in a)if(g=a[B],w=i[B],a.hasOwnProperty(B)&&(g!=null||w!=null))switch(B){case"value":ce=g;break;case"defaultValue":ue=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(l(91));break;default:g!==w&&st(e,t,B,g,a,w)}al(e,ce,ue);return;case"option":for(var Ee in i)if(ce=i[Ee],i.hasOwnProperty(Ee)&&ce!=null&&!a.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:st(e,t,Ee,null,a,ce)}for(X in a)if(ce=a[X],ue=i[X],a.hasOwnProperty(X)&&ce!==ue&&(ce!=null||ue!=null))switch(X){case"selected":e.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:st(e,t,X,ce,a,ue)}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 Le in i)ce=i[Le],i.hasOwnProperty(Le)&&ce!=null&&!a.hasOwnProperty(Le)&&st(e,t,Le,null,a,ce);for(oe in a)if(ce=a[oe],ue=i[oe],a.hasOwnProperty(oe)&&ce!==ue&&(ce!=null||ue!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(l(137,t));break;default:st(e,t,oe,ce,a,ue)}return;default:if(Vr(t)){for(var at in i)ce=i[at],i.hasOwnProperty(at)&&ce!==void 0&&!a.hasOwnProperty(at)&&yu(e,t,at,void 0,a,ce);for(fe in a)ce=a[fe],ue=i[fe],!a.hasOwnProperty(fe)||ce===ue||ce===void 0&&ue===void 0||yu(e,t,fe,ce,a,ue);return}}for(var ne in i)ce=i[ne],i.hasOwnProperty(ne)&&ce!=null&&!a.hasOwnProperty(ne)&&st(e,t,ne,null,a,ce);for(_e in a)ce=a[_e],ue=i[_e],!a.hasOwnProperty(_e)||ce===ue||ce==null&&ue==null||st(e,t,_e,ce,a,ue)}function Wp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Zy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),a=0;a<i.length;a++){var g=i[a],w=g.transferSize,B=g.initiatorType,P=g.duration;if(w&&P&&Wp(B)){for(B=0,P=g.responseEnd,a+=1;a<i.length;a++){var X=i[a],oe=X.startTime;if(oe>P)break;var fe=X.transferSize,_e=X.initiatorType;fe&&Wp(_e)&&(X=X.responseEnd,B+=fe*(X<P?1:(P-oe)/(X-oe)))}if(--a,t+=8*(w+B)/(g.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Su=null,bu=null;function to(e){return e.nodeType===9?e:e.ownerDocument}function Kp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Cu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=null;function e0(){var e=window.event;return e&&e.type==="popstate"?e===wu?!1:(wu=e,!0):(wu=null,!1)}var Xp=typeof setTimeout=="function"?setTimeout:void 0,t0=typeof clearTimeout=="function"?clearTimeout:void 0,Qp=typeof Promise=="function"?Promise:void 0,n0=typeof queueMicrotask=="function"?queueMicrotask:typeof Qp<"u"?function(e){return Qp.resolve(null).then(e).catch(i0)}:Xp;function i0(e){setTimeout(function(){throw e})}function rr(e){return e==="head"}function Jp(e,t){var i=t,a=0;do{var g=i.nextSibling;if(e.removeChild(i),g&&g.nodeType===8)if(i=g.data,i==="/$"||i==="/&"){if(a===0){e.removeChild(g),As(t);return}a--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")a++;else if(i==="html")Aa(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Aa(i);for(var w=i.firstChild;w;){var B=w.nextSibling,P=w.nodeName;w[Bn]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&w.rel.toLowerCase()==="stylesheet"||i.removeChild(w),w=B}}else i==="body"&&Aa(e.ownerDocument.body);i=g}while(i);As(t)}function Zp(e,t){var i=e;e=0;do{var a=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),a&&a.nodeType===8)if(i=a.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=a}while(i)}function xu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":xu(i),qr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function r0(e,t,i,a){for(;e.nodeType===1;){var g=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Bn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(w=e.getAttribute("rel"),w==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(w!==g.rel||e.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||e.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||e.getAttribute("title")!==(g.title==null?null:g.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(w=e.getAttribute("src"),(w!==(g.src==null?null:g.src)||e.getAttribute("type")!==(g.type==null?null:g.type)||e.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&w&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var w=g.name==null?null:""+g.name;if(g.type==="hidden"&&e.getAttribute("name")===w)return e}else return e;if(e=Fn(e.nextSibling),e===null)break}return null}function s0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Fn(e.nextSibling),e===null))return null;return e}function em(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Fn(e.nextSibling),e===null))return null;return e}function Eu(e){return e.data==="$?"||e.data==="$~"}function ku(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function a0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var a=function(){t(),i.removeEventListener("DOMContentLoaded",a)};i.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Fn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Au=null;function tm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Fn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function nm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function im(e,t,i){switch(t=to(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Aa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qr(e)}var qn=new Map,rm=new Set;function no(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ji=W.d;W.d={f:l0,r:o0,D:c0,C:u0,L:h0,m:f0,X:p0,S:d0,M:m0};function l0(){var e=ji.f(),t=Wl();return e||t}function o0(e){var t=pi(e);t!==null&&t.tag===5&&t.type==="form"?bd(t):ji.r(e)}var xs=typeof document>"u"?null:document;function sm(e,t,i){var a=xs;if(a&&typeof t=="string"&&t){var g=fn(t);g='link[rel="'+e+'"][href="'+g+'"]',typeof i=="string"&&(g+='[crossorigin="'+i+'"]'),rm.has(g)||(rm.add(g),e={rel:e,crossOrigin:i,href:t},a.querySelector(g)===null&&(t=a.createElement("link"),Gt(t,"link",e),bt(t),a.head.appendChild(t)))}}function c0(e){ji.D(e),sm("dns-prefetch",e,null)}function u0(e,t){ji.C(e,t),sm("preconnect",e,t)}function h0(e,t,i){ji.L(e,t,i);var a=xs;if(a&&e&&t){var g='link[rel="preload"][as="'+fn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(g+='[imagesrcset="'+fn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(g+='[imagesizes="'+fn(i.imageSizes)+'"]')):g+='[href="'+fn(e)+'"]';var w=g;switch(t){case"style":w=Es(e);break;case"script":w=ks(e)}qn.has(w)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),qn.set(w,e),a.querySelector(g)!==null||t==="style"&&a.querySelector(Ta(w))||t==="script"&&a.querySelector(Ra(w))||(t=a.createElement("link"),Gt(t,"link",e),bt(t),a.head.appendChild(t)))}}function f0(e,t){ji.m(e,t);var i=xs;if(i&&e){var a=t&&typeof t.as=="string"?t.as:"script",g='link[rel="modulepreload"][as="'+fn(a)+'"][href="'+fn(e)+'"]',w=g;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=ks(e)}if(!qn.has(w)&&(e=u({rel:"modulepreload",href:e},t),qn.set(w,e),i.querySelector(g)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ra(w)))return}a=i.createElement("link"),Gt(a,"link",e),bt(a),i.head.appendChild(a)}}}function d0(e,t,i){ji.S(e,t,i);var a=xs;if(a&&e){var g=gi(a).hoistableStyles,w=Es(e);t=t||"default";var B=g.get(w);if(!B){var P={loading:0,preload:null};if(B=a.querySelector(Ta(w)))P.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=qn.get(w))&&Tu(e,i);var X=B=a.createElement("link");bt(X),Gt(X,"link",e),X._p=new Promise(function(oe,fe){X.onload=oe,X.onerror=fe}),X.addEventListener("load",function(){P.loading|=1}),X.addEventListener("error",function(){P.loading|=2}),P.loading|=4,io(B,t,a)}B={type:"stylesheet",instance:B,count:1,state:P},g.set(w,B)}}}function p0(e,t){ji.X(e,t);var i=xs;if(i&&e){var a=gi(i).hoistableScripts,g=ks(e),w=a.get(g);w||(w=i.querySelector(Ra(g)),w||(e=u({src:e,async:!0},t),(t=qn.get(g))&&Ru(e,t),w=i.createElement("script"),bt(w),Gt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},a.set(g,w))}}function m0(e,t){ji.M(e,t);var i=xs;if(i&&e){var a=gi(i).hoistableScripts,g=ks(e),w=a.get(g);w||(w=i.querySelector(Ra(g)),w||(e=u({src:e,async:!0,type:"module"},t),(t=qn.get(g))&&Ru(e,t),w=i.createElement("script"),bt(w),Gt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},a.set(g,w))}}function am(e,t,i,a){var g=(g=pe.current)?no(g):null;if(!g)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Es(i.href),i=gi(g).hoistableStyles,a=i.get(t),a||(a={type:"style",instance:null,count:0,state:null},i.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Es(i.href);var w=gi(g).hoistableStyles,B=w.get(e);if(B||(g=g.ownerDocument||g,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(e,B),(w=g.querySelector(Ta(e)))&&!w._p&&(B.instance=w,B.state.loading=5),qn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},qn.set(e,i),w||g0(g,e,i,B.state))),t&&a===null)throw Error(l(528,""));return B}if(t&&a!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ks(i),i=gi(g).hoistableScripts,a=i.get(t),a||(a={type:"script",instance:null,count:0,state:null},i.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Es(e){return'href="'+fn(e)+'"'}function Ta(e){return'link[rel="stylesheet"]['+e+"]"}function lm(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function g0(e,t,i,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Gt(t,"link",i),bt(t),e.head.appendChild(t))}function ks(e){return'[src="'+fn(e)+'"]'}function Ra(e){return"script[async]"+e}function om(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+fn(i.href)+'"]');if(a)return t.instance=a,bt(a),a;var g=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),bt(a),Gt(a,"style",g),io(a,i.precedence,e),t.instance=a;case"stylesheet":g=Es(i.href);var w=e.querySelector(Ta(g));if(w)return t.state.loading|=4,t.instance=w,bt(w),w;a=lm(i),(g=qn.get(g))&&Tu(a,g),w=(e.ownerDocument||e).createElement("link"),bt(w);var B=w;return B._p=new Promise(function(P,X){B.onload=P,B.onerror=X}),Gt(w,"link",a),t.state.loading|=4,io(w,i.precedence,e),t.instance=w;case"script":return w=ks(i.src),(g=e.querySelector(Ra(w)))?(t.instance=g,bt(g),g):(a=i,(g=qn.get(w))&&(a=u({},i),Ru(a,g)),e=e.ownerDocument||e,g=e.createElement("script"),bt(g),Gt(g,"link",a),e.head.appendChild(g),t.instance=g);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,io(a,i.precedence,e));return t.instance}function io(e,t,i){for(var a=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=a.length?a[a.length-1]:null,w=g,B=0;B<a.length;B++){var P=a[B];if(P.dataset.precedence===t)w=P;else if(w!==g)break}w?w.parentNode.insertBefore(e,w.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Tu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ro=null;function cm(e,t,i){if(ro===null){var a=new Map,g=ro=new Map;g.set(i,a)}else g=ro,a=g.get(i),a||(a=new Map,g.set(i,a));if(a.has(e))return a;for(a.set(e,null),i=i.getElementsByTagName(e),g=0;g<i.length;g++){var w=i[g];if(!(w[Bn]||w[kt]||e==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var B=w.getAttribute(t)||"";B=e+B;var P=a.get(B);P?P.push(w):a.set(B,[w])}}return a}function um(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function _0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function v0(e,t,i,a){if(i.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var g=Es(a.href),w=t.querySelector(Ta(g));if(w){t=w._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=so.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=w,bt(w);return}w=t.ownerDocument||t,a=lm(a),(g=qn.get(g))&&Tu(a,g),w=w.createElement("link"),bt(w);var B=w;B._p=new Promise(function(P,X){B.onload=P,B.onerror=X}),Gt(w,"link",a),i.instance=w}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=so.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Du=0;function y0(e,t){return e.stylesheets&&e.count===0&&lo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var a=setTimeout(function(){if(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend){var w=e.unsuspend;e.unsuspend=null,w()}},6e4+t);0<e.imgBytes&&Du===0&&(Du=62500*Zy());var g=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend)){var w=e.unsuspend;e.unsuspend=null,w()}},(e.imgBytes>Du?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(g)}}:null}function so(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ao=null;function lo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ao=new Map,t.forEach(S0,e),ao=null,so.call(e))}function S0(e,t){if(!(t.state.loading&4)){var i=ao.get(e);if(i)var a=i.get(null);else{i=new Map,ao.set(e,i);for(var g=e.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<g.length;w++){var B=g[w];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(i.set(B.dataset.precedence,B),a=B)}a&&i.set(null,a)}g=t.instance,B=g.getAttribute("data-precedence"),w=i.get(B)||a,w===a&&i.set(null,g),i.set(B,g),this.count++,a=so.bind(this),g.addEventListener("load",a),g.addEventListener("error",a),w?w.parentNode.insertBefore(g,w.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(g,e.firstChild)),t.state.loading|=4}}var Da={$$typeof:y,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function b0(e,t,i,a,g,w,B,P,X){this.tag=1,this.containerInfo=e,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=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=a,this.onUncaughtError=g,this.onCaughtError=w,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function fm(e,t,i,a,g,w,B,P,X,oe,fe,_e){return e=new b0(e,t,i,B,X,oe,fe,_e,P),t=1,w===!0&&(t|=24),w=kn(3,null,null,t),e.current=w,w.stateNode=e,t=cc(),t.refCount++,e.pooledCache=t,t.refCount++,w.memoizedState={element:a,isDehydrated:i,cache:t},dc(w),e}function dm(e){return e?(e=is,e):is}function pm(e,t,i,a,g,w){g=dm(g),a.context===null?a.context=g:a.pendingContext=g,a=Wi(t),a.payload={element:i},w=w===void 0?null:w,w!==null&&(a.callback=w),i=Ki(e,a,t),i!==null&&(yn(i,e,t),oa(i,e,t))}function mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Mu(e,t){mm(e,t),(e=e.alternate)&&mm(e,t)}function gm(e){if(e.tag===13||e.tag===31){var t=Cr(e,67108864);t!==null&&yn(t,e,67108864),Mu(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var t=Mn();t=Fr(t);var i=Cr(e,t);i!==null&&yn(i,e,t),Mu(e,t)}}var oo=!0;function C0(e,t,i,a){var g=G.T;G.T=null;var w=W.p;try{W.p=2,Lu(e,t,i,a)}finally{W.p=w,G.T=g}}function w0(e,t,i,a){var g=G.T;G.T=null;var w=W.p;try{W.p=8,Lu(e,t,i,a)}finally{W.p=w,G.T=g}}function Lu(e,t,i,a){if(oo){var g=Ou(a);if(g===null)vu(e,t,a,co,i),ym(e,a);else if(E0(g,e,t,i,a))a.stopPropagation();else if(ym(e,a),t&4&&-1<x0.indexOf(e)){for(;g!==null;){var w=pi(g);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var B=on(w.pendingLanes);if(B!==0){var P=w;for(P.pendingLanes|=2,P.entangledLanes|=2;B;){var X=1<<31-Qe(B);P.entanglements[1]|=X,B&=~X}ci(w),(et&6)===0&&(Gl=tt()+500,xa(0))}}break;case 31:case 13:P=Cr(w,2),P!==null&&yn(P,w,2),Wl(),Mu(w,2)}if(w=Ou(a),w===null&&vu(e,t,a,co,i),w===g)break;g=w}g!==null&&a.stopPropagation()}else vu(e,t,a,null,i)}}function Ou(e){return e=si(e),Bu(e)}var co=null;function Bu(e){if(co=null,e=cn(e),e!==null){var t=m(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=o(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return co=e,null}function vm(e){switch(e){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(Lt()){case he:return 2;case ye:return 8;case Ae:case Me:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var ju=!1,sr=null,ar=null,lr=null,Ma=new Map,La=new Map,or=[],x0="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 ym(e,t){switch(e){case"focusin":case"focusout":sr=null;break;case"dragenter":case"dragleave":ar=null;break;case"mouseover":case"mouseout":lr=null;break;case"pointerover":case"pointerout":Ma.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":La.delete(t.pointerId)}}function Oa(e,t,i,a,g,w){return e===null||e.nativeEvent!==w?(e={blockedOn:t,domEventName:i,eventSystemFlags:a,nativeEvent:w,targetContainers:[g]},t!==null&&(t=pi(t),t!==null&&gm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,g!==null&&t.indexOf(g)===-1&&t.push(g),e)}function E0(e,t,i,a,g){switch(t){case"focusin":return sr=Oa(sr,e,t,i,a,g),!0;case"dragenter":return ar=Oa(ar,e,t,i,a,g),!0;case"mouseover":return lr=Oa(lr,e,t,i,a,g),!0;case"pointerover":var w=g.pointerId;return Ma.set(w,Oa(Ma.get(w)||null,e,t,i,a,g)),!0;case"gotpointercapture":return w=g.pointerId,La.set(w,Oa(La.get(w)||null,e,t,i,a,g)),!0}return!1}function Sm(e){var t=cn(e.target);if(t!==null){var i=m(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,el(e.priority,function(){_m(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,el(e.priority,function(){_m(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Ou(e.nativeEvent);if(i===null){i=e.nativeEvent;var a=new i.constructor(i.type,i);Wr=a,i.target.dispatchEvent(a),Wr=null}else return t=pi(i),t!==null&&gm(t),e.blockedOn=i,!1;t.shift()}return!0}function bm(e,t,i){uo(e)&&i.delete(t)}function k0(){ju=!1,sr!==null&&uo(sr)&&(sr=null),ar!==null&&uo(ar)&&(ar=null),lr!==null&&uo(lr)&&(lr=null),Ma.forEach(bm),La.forEach(bm)}function ho(e,t){e.blockedOn===t&&(e.blockedOn=null,ju||(ju=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,k0)))}var fo=null;function Cm(e){fo!==e&&(fo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){fo===e&&(fo=null);for(var t=0;t<e.length;t+=3){var i=e[t],a=e[t+1],g=e[t+2];if(typeof a!="function"){if(Bu(a||i)===null)continue;break}var w=pi(i);w!==null&&(e.splice(t,3),t-=3,Oc(w,{pending:!0,data:g,method:i.method,action:a},a,g))}}))}function As(e){function t(X){return ho(X,e)}sr!==null&&ho(sr,e),ar!==null&&ho(ar,e),lr!==null&&ho(lr,e),Ma.forEach(t),La.forEach(t);for(var i=0;i<or.length;i++){var a=or[i];a.blockedOn===e&&(a.blockedOn=null)}for(;0<or.length&&(i=or[0],i.blockedOn===null);)Sm(i),i.blockedOn===null&&or.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(a=0;a<i.length;a+=3){var g=i[a],w=i[a+1],B=g[Ut]||null;if(typeof w=="function")B||Cm(i);else if(B){var P=null;if(w&&w.hasAttribute("formAction")){if(g=w,B=w[Ut]||null)P=B.formAction;else if(Bu(g)!==null)continue}else P=B.action;typeof P=="function"?i[a+1]=P:(i.splice(a,3),a-=3),Cm(i)}}}function wm(){function e(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(B){return g=B})},focusReset:"manual",scroll:"manual"})}function t(){g!==null&&(g(),g=null),a||setTimeout(i,20)}function i(){if(!a&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,g=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),g!==null&&(g(),g=null)}}}function Nu(e){this._internalRoot=e}po.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,a=Mn();pm(i,a,e,t,null,null)},po.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pm(e.current,2,null,e,null,null),Wl(),t[Yn]=null}};function po(e){this._internalRoot=e}po.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kn();e={blockedOn:null,target:e,priority:t};for(var i=0;i<or.length&&t!==0&&t<or[i].priority;i++);or.splice(i,0,e),i===0&&Sm(e)}};var xm=r.version;if(xm!=="19.2.6")throw Error(l(527,xm,"19.2.6"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=h(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var A0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mo.isDisabled&&mo.supportsFiber)try{gt=mo.inject(A0),mt=mo}catch{}}return ja.createRoot=function(e,t){if(!d(e))throw Error(l(299));var i=!1,a="",g=Md,w=Ld,B=Od;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(g=t.onUncaughtError),t.onCaughtError!==void 0&&(w=t.onCaughtError),t.onRecoverableError!==void 0&&(B=t.onRecoverableError)),t=fm(e,1,!1,null,null,i,a,null,g,w,B,wm),e[Yn]=t.current,_u(e),new Nu(t)},ja.hydrateRoot=function(e,t,i){if(!d(e))throw Error(l(299));var a=!1,g="",w=Md,B=Ld,P=Od,X=null;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(g=i.identifierPrefix),i.onUncaughtError!==void 0&&(w=i.onUncaughtError),i.onCaughtError!==void 0&&(B=i.onCaughtError),i.onRecoverableError!==void 0&&(P=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=fm(e,1,!0,t,i??null,a,g,X,w,B,P,wm),t.context=dm(null),i=t.current,a=Mn(),a=Fr(a),g=Wi(a),g.callback=null,Ki(i,g,a),i=a,t.current.lanes=i,It(t,i),ci(t),e[Yn]=t.current,_u(e),new po(t)},ja.version="19.2.6",ja}var jm;function I0(){if(jm)return Iu.exports;jm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Iu.exports=z0(),Iu.exports}var U0=I0();const Ir=function(n,r){let d=n;const m=Pa[r];let f=null,o=0,c=null;const h=[],p={},u=function(R,k){o=d*4+17,f=(function(M){const j=new Array(M);for(let H=0;H<M;H+=1){j[H]=new Array(M);for(let U=0;U<M;U+=1)j[H][U]=null}return j})(o),b(0,0),b(o-7,0),b(0,o-7),E(),T(),v(R,k),d>=7&&S(R),c==null&&(c=A(d,m,h)),_(c,k)},b=function(R,k){for(let M=-1;M<=7;M+=1)if(!(R+M<=-1||o<=R+M))for(let j=-1;j<=7;j+=1)k+j<=-1||o<=k+j||(0<=M&&M<=6&&(j==0||j==6)||0<=j&&j<=6&&(M==0||M==6)||2<=M&&M<=4&&2<=j&&j<=4?f[R+M][k+j]=!0:f[R+M][k+j]=!1)},C=function(){let R=0,k=0;for(let M=0;M<8;M+=1){u(!0,M);const j=hr.getLostPoint(p);(M==0||R>j)&&(R=j,k=M)}return k},T=function(){for(let R=8;R<o-8;R+=1)f[R][6]==null&&(f[R][6]=R%2==0);for(let R=8;R<o-8;R+=1)f[6][R]==null&&(f[6][R]=R%2==0)},E=function(){const R=hr.getPatternPosition(d);for(let k=0;k<R.length;k+=1)for(let M=0;M<R.length;M+=1){const j=R[k],H=R[M];if(f[j][H]==null)for(let U=-2;U<=2;U+=1)for(let F=-2;F<=2;F+=1)U==-2||U==2||F==-2||F==2||U==0&&F==0?f[j+U][H+F]=!0:f[j+U][H+F]=!1}},S=function(R){const k=hr.getBCHTypeNumber(d);for(let M=0;M<18;M+=1){const j=!R&&(k>>M&1)==1;f[Math.floor(M/3)][M%3+o-8-3]=j}for(let M=0;M<18;M+=1){const j=!R&&(k>>M&1)==1;f[M%3+o-8-3][Math.floor(M/3)]=j}},v=function(R,k){const M=m<<3|k,j=hr.getBCHTypeInfo(M);for(let H=0;H<15;H+=1){const U=!R&&(j>>H&1)==1;H<6?f[H][8]=U:H<8?f[H+1][8]=U:f[o-15+H][8]=U}for(let H=0;H<15;H+=1){const U=!R&&(j>>H&1)==1;H<8?f[8][o-H-1]=U:H<9?f[8][15-H-1+1]=U:f[8][15-H-1]=U}f[o-8][8]=!R},_=function(R,k){let M=-1,j=o-1,H=7,U=0;const F=hr.getMaskFunction(k);for(let K=o-1;K>0;K-=2)for(K==6&&(K-=1);;){for(let Y=0;Y<2;Y+=1)if(f[j][K-Y]==null){let G=!1;U<R.length&&(G=(R[U]>>>H&1)==1),F(j,K-Y)&&(G=!G),f[j][K-Y]=G,H-=1,H==-1&&(U+=1,H=7)}if(j+=M,j<0||o<=j){j-=M,M=-M;break}}},y=function(R,k){let M=0,j=0,H=0;const U=new Array(k.length),F=new Array(k.length);for(let W=0;W<k.length;W+=1){const Z=k[W].dataCount,z=k[W].totalCount-Z;j=Math.max(j,Z),H=Math.max(H,z),U[W]=new Array(Z);for(let I=0;I<U[W].length;I+=1)U[W][I]=255&R.getBuffer()[I+M];M+=Z;const O=hr.getErrorCorrectPolynomial(z),$=Va(U[W],O.getLength()-1).mod(O);F[W]=new Array(O.getLength()-1);for(let I=0;I<F[W].length;I+=1){const re=I+$.getLength()-F[W].length;F[W][I]=re>=0?$.getAt(re):0}}let K=0;for(let W=0;W<k.length;W+=1)K+=k[W].totalCount;const Y=new Array(K);let G=0;for(let W=0;W<j;W+=1)for(let Z=0;Z<k.length;Z+=1)W<U[Z].length&&(Y[G]=U[Z][W],G+=1);for(let W=0;W<H;W+=1)for(let Z=0;Z<k.length;Z+=1)W<F[Z].length&&(Y[G]=F[Z][W],G+=1);return Y},A=function(R,k,M){const j=Nm.getRSBlocks(R,k),H=Hm();for(let F=0;F<M.length;F+=1){const K=M[F];H.put(K.getMode(),4),H.put(K.getLength(),hr.getLengthInBits(K.getMode(),R)),K.write(H)}let U=0;for(let F=0;F<j.length;F+=1)U+=j[F].dataCount;if(H.getLengthInBits()>U*8)throw"code length overflow. ("+H.getLengthInBits()+">"+U*8+")";for(H.getLengthInBits()+4<=U*8&&H.put(0,4);H.getLengthInBits()%8!=0;)H.putBit(!1);for(;!(H.getLengthInBits()>=U*8||(H.put(236,8),H.getLengthInBits()>=U*8));)H.put(17,8);return y(H,j)};p.addData=function(R,k){k=k||"Byte";let M=null;switch(k){case"Numeric":M=P0(R);break;case"Alphanumeric":M=F0(R);break;case"Byte":M=q0(R);break;case"Kanji":M=$0(R);break;default:throw"mode:"+k}h.push(M),c=null},p.isDark=function(R,k){if(R<0||o<=R||k<0||o<=k)throw R+","+k;return f[R][k]},p.getModuleCount=function(){return o},p.make=function(){if(d<1){let R=1;for(;R<40;R++){const k=Nm.getRSBlocks(R,m),M=Hm();for(let H=0;H<h.length;H++){const U=h[H];M.put(U.getMode(),4),M.put(U.getLength(),hr.getLengthInBits(U.getMode(),R)),U.write(M)}let j=0;for(let H=0;H<k.length;H++)j+=k[H].dataCount;if(M.getLengthInBits()<=j*8)break}d=R}u(!1,C())},p.createTableTag=function(R,k){R=R||2,k=typeof k>"u"?R*4:k;let M="";M+='<table style="',M+=" border-width: 0px; border-style: none;",M+=" border-collapse: collapse;",M+=" padding: 0px; margin: "+k+"px;",M+='">',M+="<tbody>";for(let j=0;j<p.getModuleCount();j+=1){M+="<tr>";for(let H=0;H<p.getModuleCount();H+=1)M+='<td style="',M+=" border-width: 0px; border-style: none;",M+=" border-collapse: collapse;",M+=" padding: 0px; margin: 0px;",M+=" width: "+R+"px;",M+=" height: "+R+"px;",M+=" background-color: ",M+=p.isDark(j,H)?"#000000":"#ffffff",M+=";",M+='"/>';M+="</tr>"}return M+="</tbody>",M+="</table>",M},p.createSvgTag=function(R,k,M,j){let H={};typeof arguments[0]=="object"&&(H=arguments[0],R=H.cellSize,k=H.margin,M=H.alt,j=H.title),R=R||2,k=typeof k>"u"?R*4:k,M=typeof M=="string"?{text:M}:M||{},M.text=M.text||null,M.id=M.text?M.id||"qrcode-description":null,j=typeof j=="string"?{text:j}:j||{},j.text=j.text||null,j.id=j.text?j.id||"qrcode-title":null;const U=p.getModuleCount()*R+k*2;let F,K,Y,G,W="",Z;for(Z="l"+R+",0 0,"+R+" -"+R+",0 0,-"+R+"z ",W+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',W+=H.scalable?"":' width="'+U+'px" height="'+U+'px"',W+=' viewBox="0 0 '+U+" "+U+'" ',W+=' preserveAspectRatio="xMinYMin meet"',W+=j.text||M.text?' role="img" aria-labelledby="'+L([j.id,M.id].join(" ").trim())+'"':"",W+=">",W+=j.text?'<title id="'+L(j.id)+'">'+L(j.text)+"</title>":"",W+=M.text?'<description id="'+L(M.id)+'">'+L(M.text)+"</description>":"",W+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',W+='<path d="',Y=0;Y<p.getModuleCount();Y+=1)for(G=Y*R+k,F=0;F<p.getModuleCount();F+=1)p.isDark(Y,F)&&(K=F*R+k,W+="M"+K+","+G+Z);return W+='" stroke="transparent" fill="black"/>',W+="</svg>",W},p.createDataURL=function(R,k){R=R||2,k=typeof k>"u"?R*4:k;const M=p.getModuleCount()*R+k*2,j=k,H=M-k;return K0(M,M,function(U,F){if(j<=U&&U<H&&j<=F&&F<H){const K=Math.floor((U-j)/R),Y=Math.floor((F-j)/R);return p.isDark(Y,K)?0:1}else return 1})},p.createImgTag=function(R,k,M){R=R||2,k=typeof k>"u"?R*4:k;const j=p.getModuleCount()*R+k*2;let H="";return H+="<img",H+=' src="',H+=p.createDataURL(R,k),H+='"',H+=' width="',H+=j,H+='"',H+=' height="',H+=j,H+='"',M&&(H+=' alt="',H+=L(M),H+='"'),H+="/>",H};const L=function(R){let k="";for(let M=0;M<R.length;M+=1){const j=R.charAt(M);switch(j){case"<":k+="<";break;case">":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=j;break}}return k},D=function(R){R=typeof R>"u"?2:R;const M=p.getModuleCount()*1+R*2,j=R,H=M-R;let U,F,K,Y,G;const W={"██":"█","█ ":"▀"," █":"▄"," ":" "},Z={"██":"▀","█ ":"▀"," █":" "," ":" "};let z="";for(U=0;U<M;U+=2){for(K=Math.floor((U-j)/1),Y=Math.floor((U+1-j)/1),F=0;F<M;F+=1)G="█",j<=F&&F<H&&j<=U&&U<H&&p.isDark(K,Math.floor((F-j)/1))&&(G=" "),j<=F&&F<H&&j<=U+1&&U+1<H&&p.isDark(Y,Math.floor((F-j)/1))?G+=" ":G+="█",z+=R<1&&U+1>=H?Z[G]:W[G];z+=`
|
|
48
|
+
`+a.stack}}var yt=Object.prototype.hasOwnProperty,Et=n.unstable_scheduleCallback,an=n.unstable_cancelCallback,Cn=n.unstable_shouldYield,St=n.unstable_requestPaint,tt=n.unstable_now,Lt=n.unstable_getCurrentPriorityLevel,he=n.unstable_ImmediatePriority,ye=n.unstable_UserBlockingPriority,Ae=n.unstable_NormalPriority,Me=n.unstable_LowPriority,Oe=n.unstable_IdlePriority,ft=n.log,Fe=n.unstable_setDisableYieldValue,gt=null,mt=null;function Ot(e){if(typeof ft=="function"&&Fe(e),mt&&typeof mt.setStrictMode=="function")try{mt.setStrictMode(gt,e)}catch{}}var Qe=Math.clz32?Math.clz32:ln,Zt=Math.log,Bt=Math.LN2;function ln(e){return e>>>=0,e===0?32:31-(Zt(e)/Bt|0)|0}var Gn=256,Vn=262144,zt=4194304;function on(e){var t=e&42;if(t!==0)return t;switch(e&-e){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 e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Wn(e,t,i){var a=e.pendingLanes;if(a===0)return 0;var g=0,w=e.suspendedLanes,B=e.pingedLanes;e=e.warmLanes;var P=a&134217727;return P!==0?(a=P&~w,a!==0?g=on(a):(B&=P,B!==0?g=on(B):i||(i=P&~e,i!==0&&(g=on(i))))):(P=a&~w,P!==0?g=on(P):B!==0?g=on(B):i||(i=a&~e,i!==0&&(g=on(i)))),g===0?0:t!==0&&t!==g&&(t&w)===0&&(w=g&-g,i=t&-t,w>=i||w===32&&(i&4194048)!==0)?t:g}function Vt(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Is(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+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 t+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 Wt(){var e=zt;return zt<<=1,(zt&62914560)===0&&(zt=4194304),e}function wn(e){for(var t=[],i=0;31>i;i++)t.push(e);return t}function It(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ii(e,t,i,a,g,w){var B=e.pendingLanes;e.pendingLanes=i,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=i,e.entangledLanes&=i,e.errorRecoveryDisabledLanes&=i,e.shellSuspendCounter=0;var P=e.entanglements,X=e.expirationTimes,oe=e.hiddenUpdates;for(i=B&~i;0<i;){var fe=31-Qe(i),_e=1<<fe;P[fe]=0,X[fe]=-1;var ce=oe[fe];if(ce!==null)for(oe[fe]=null,fe=0;fe<ce.length;fe++){var ue=ce[fe];ue!==null&&(ue.lane&=-536870913)}i&=~_e}a!==0&&ze(e,a,0),w!==0&&g===0&&e.tag!==0&&(e.suspendedLanes|=w&~(B&~t))}function ze(e,t,i){e.pendingLanes|=t,e.suspendedLanes&=~t;var a=31-Qe(t);e.entangledLanes|=t,e.entanglements[a]=e.entanglements[a]|1073741824|i&261930}function di(e,t){var i=e.entangledLanes|=t;for(e=e.entanglements;i;){var a=31-Qe(i),g=1<<a;g&t|e[a]&t&&(e[a]|=t),i&=~g}}function Pr(e,t){var i=t&-t;return i=(i&42)!==0?1:Fr(i),(i&(e.suspendedLanes|t))!==0?0:i}function Fr(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=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:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function Us(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Kn(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:vm(e.type))}function el(e,t){var i=W.p;try{return W.p=e,t()}finally{W.p=i}}var ii=Math.random().toString(36).slice(2),kt="__reactFiber$"+ii,Ut="__reactProps$"+ii,Yn="__reactContainer$"+ii,Ps="__reactEvents$"+ii,Io="__reactListeners$"+ii,tl="__reactHandles$"+ii,nl="__reactResources$"+ii,Bn="__reactMarker$"+ii;function qr(e){delete e[kt],delete e[Ut],delete e[Ps],delete e[Io],delete e[tl]}function cn(e){var t=e[kt];if(t)return t;for(var i=e.parentNode;i;){if(t=i[Yn]||i[kt]){if(i=t.alternate,t.child!==null||i!==null&&i.child!==null)for(e=nm(e);e!==null;){if(i=e[kt])return i;e=nm(e)}return t}e=i,i=e.parentNode}return null}function pi(e){if(e=e[kt]||e[Yn]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function mi(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(l(33))}function gi(e){var t=e[nl];return t||(t=e[nl]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function bt(e){e[Bn]=!0}var Fs=new Set,Xn={};function Qn(e,t){ie(e,t),ie(e+"Capture",t)}function ie(e,t){for(Xn[e]=t,e=0;e<t.length;e++)Fs.add(t[e])}var un=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]*$"),$r={},qs={};function Uo(e){return yt.call(qs,e)?!0:yt.call($r,e)?!1:un.test(e)?qs[e]=!0:($r[e]=!0,!1)}function Gr(e,t,i){if(Uo(t))if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var a=t.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+i)}}function _i(e,t,i){if(i===null)e.removeAttribute(t);else{switch(typeof i){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+i)}}function jn(e,t,i,a){if(a===null)e.removeAttribute(i);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttributeNS(t,i,""+a)}}function hn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function il(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function en(e,t,i){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var g=a.get,w=a.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return g.call(this)},set:function(B){i=""+B,w.call(this,B)}}),Object.defineProperty(e,t,{enumerable:a.enumerable}),{getValue:function(){return i},setValue:function(B){i=""+B},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Nt(e){if(!e._valueTracker){var t=il(e)?"checked":"value";e._valueTracker=en(e,t,""+e[t])}}function $s(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var i=t.getValue(),a="";return e&&(a=il(e)?e.checked?"true":"false":e.value),e=a,e!==i?(t.setValue(e),!0):!1}function mr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var rl=/[\n"\\]/g;function fn(e){return e.replace(rl,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Gs(e,t,i,a,g,w,B,P){e.name="",B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"?e.type=B:e.removeAttribute("type"),t!=null?B==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+hn(t)):e.value!==""+hn(t)&&(e.value=""+hn(t)):B!=="submit"&&B!=="reset"||e.removeAttribute("value"),t!=null?Vs(e,B,hn(t)):i!=null?Vs(e,B,hn(i)):a!=null&&e.removeAttribute("value"),g==null&&w!=null&&(e.defaultChecked=!!w),g!=null&&(e.checked=g&&typeof g!="function"&&typeof g!="symbol"),P!=null&&typeof P!="function"&&typeof P!="symbol"&&typeof P!="boolean"?e.name=""+hn(P):e.removeAttribute("name")}function sl(e,t,i,a,g,w,B,P){if(w!=null&&typeof w!="function"&&typeof w!="symbol"&&typeof w!="boolean"&&(e.type=w),t!=null||i!=null){if(!(w!=="submit"&&w!=="reset"||t!=null)){Nt(e);return}i=i!=null?""+hn(i):"",t=t!=null?""+hn(t):i,P||t===e.value||(e.value=t),e.defaultValue=t}a=a??g,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=P?e.checked:!!a,e.defaultChecked=!!a,B!=null&&typeof B!="function"&&typeof B!="symbol"&&typeof B!="boolean"&&(e.name=B),Nt(e)}function Vs(e,t,i){t==="number"&&mr(e.ownerDocument)===e||e.defaultValue===""+i||(e.defaultValue=""+i)}function Ui(e,t,i,a){if(e=e.options,t){t={};for(var g=0;g<i.length;g++)t["$"+i[g]]=!0;for(i=0;i<e.length;i++)g=t.hasOwnProperty("$"+e[i].value),e[i].selected!==g&&(e[i].selected=g),g&&a&&(e[i].defaultSelected=!0)}else{for(i=""+hn(i),t=null,g=0;g<e.length;g++){if(e[g].value===i){e[g].selected=!0,a&&(e[g].defaultSelected=!0);return}t!==null||e[g].disabled||(t=e[g])}t!==null&&(t.selected=!0)}}function al(e,t,i){if(t!=null&&(t=""+hn(t),t!==e.value&&(e.value=t),i==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=i!=null?""+hn(i):""}function vi(e,t,i,a){if(t==null){if(a!=null){if(i!=null)throw Error(l(92));if(Y(a)){if(1<a.length)throw Error(l(93));a=a[0]}i=a}i==null&&(i=""),t=i}i=hn(t),e.defaultValue=i,a=e.textContent,a===i&&a!==""&&a!==null&&(e.value=a),Nt(e)}function ri(e,t){if(t){var i=e.firstChild;if(i&&i===e.lastChild&&i.nodeType===3){i.nodeValue=t;return}}e.textContent=t}var Ws=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 yi(e,t,i){var a=t.indexOf("--")===0;i==null||typeof i=="boolean"||i===""?a?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":a?e.setProperty(t,i):typeof i!="number"||i===0||Ws.has(t)?t==="float"?e.cssFloat=i:e[t]=(""+i).trim():e[t]=i+"px"}function ll(e,t,i){if(t!=null&&typeof t!="object")throw Error(l(62));if(e=e.style,i!=null){for(var a in i)!i.hasOwnProperty(a)||t!=null&&t.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var g in t)a=t[g],t.hasOwnProperty(g)&&i[g]!==a&&yi(e,g,a)}else for(var w in t)t.hasOwnProperty(w)&&yi(e,w,t[w])}function Vr(e){if(e.indexOf("-")===-1)return!1;switch(e){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 Ks=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"]]),ol=/^[\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 gr(e){return ol.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Kt(){}var Wr=null;function si(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var tn=null,Pi=null;function cl(e){var t=pi(e);if(t&&(e=t.stateNode)){var i=e[Ut]||null;e:switch(e=t.stateNode,t.type){case"input":if(Gs(e,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name),t=i.name,i.type==="radio"&&t!=null){for(i=e;i.parentNode;)i=i.parentNode;for(i=i.querySelectorAll('input[name="'+fn(""+t)+'"][type="radio"]'),t=0;t<i.length;t++){var a=i[t];if(a!==e&&a.form===e.form){var g=a[Ut]||null;if(!g)throw Error(l(90));Gs(a,g.value,g.defaultValue,g.defaultValue,g.checked,g.defaultChecked,g.type,g.name)}}for(t=0;t<i.length;t++)a=i[t],a.form===e.form&&$s(a)}break e;case"textarea":al(e,i.value,i.defaultValue);break e;case"select":t=i.value,t!=null&&Ui(e,!!i.multiple,t,!1)}}}var Ys=!1;function dn(e,t,i){if(Ys)return e(t,i);Ys=!0;try{var a=e(t);return a}finally{if(Ys=!1,(tn!==null||Pi!==null)&&(Wl(),tn&&(t=tn,e=Pi,Pi=tn=null,cl(t),e)))for(t=0;t<e.length;t++)cl(e[t])}}function Si(e,t){var i=e.stateNode;if(i===null)return null;var a=i[Ut]||null;if(a===null)return null;i=a[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(a=!a.disabled)||(e=e.type,a=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!a;break e;default:e=!1}if(e)return null;if(i&&typeof i!="function")throw Error(l(231,t,typeof i));return i}var xn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_r=!1;if(xn)try{var vr={};Object.defineProperty(vr,"passive",{get:function(){_r=!0}}),window.addEventListener("test",vr,vr),window.removeEventListener("test",vr,vr)}catch{_r=!1}var ke=null,Xs=null,Kr=null;function ul(){if(Kr)return Kr;var e,t=Xs,i=t.length,a,g="value"in ke?ke.value:ke.textContent,w=g.length;for(e=0;e<i&&t[e]===g[e];e++);var B=i-e;for(a=1;a<=B&&t[i-a]===g[w-a];a++);return Kr=g.slice(e,1<a?1-a:void 0)}function Yr(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function nn(){return!0}function Xr(){return!1}function Pt(e){function t(i,a,g,w,B){this._reactName=i,this._targetInst=g,this.type=a,this.nativeEvent=w,this.target=B,this.currentTarget=null;for(var P in e)e.hasOwnProperty(P)&&(i=e[P],this[P]=i?i(w):w[P]);return this.isDefaultPrevented=(w.defaultPrevented!=null?w.defaultPrevented:w.returnValue===!1)?nn:Xr,this.isPropagationStopped=Xr,this}return u(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var i=this.nativeEvent;i&&(i.preventDefault?i.preventDefault():typeof i.returnValue!="unknown"&&(i.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var i=this.nativeEvent;i&&(i.stopPropagation?i.stopPropagation():typeof i.cancelBubble!="unknown"&&(i.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var Jn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Qr=Pt(Jn),V=u({},Jn,{view:0,detail:0}),me=Pt(V),qe,pn,yr,Jr=u({},V,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fo,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==yr&&(yr&&e.type==="mousemove"?(qe=e.screenX-yr.screenX,pn=e.screenY-yr.screenY):pn=qe=0,yr=e),qe)},movementY:function(e){return"movementY"in e?e.movementY:pn}}),hl=Pt(Jr),Av=u({},Jr,{dataTransfer:0}),Tv=Pt(Av),Rv=u({},V,{relatedTarget:0}),Po=Pt(Rv),Dv=u({},Jn,{animationName:0,elapsedTime:0,pseudoElement:0}),Mv=Pt(Dv),Lv=u({},Jn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Ov=Pt(Lv),Bv=u({},Jn,{data:0}),Qh=Pt(Bv),jv={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Nv={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"},Hv={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function zv(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=Hv[e])?!!t[e]:!1}function Fo(){return zv}var Iv=u({},V,{key:function(e){if(e.key){var t=jv[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Yr(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Nv[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fo,charCode:function(e){return e.type==="keypress"?Yr(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Yr(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Uv=Pt(Iv),Pv=u({},Jr,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Jh=Pt(Pv),Fv=u({},V,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fo}),qv=Pt(Fv),$v=u({},Jn,{propertyName:0,elapsedTime:0,pseudoElement:0}),Gv=Pt($v),Vv=u({},Jr,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Wv=Pt(Vv),Kv=u({},Jn,{newState:0,oldState:0}),Yv=Pt(Kv),Xv=[9,13,27,32],qo=xn&&"CompositionEvent"in window,Qs=null;xn&&"documentMode"in document&&(Qs=document.documentMode);var Qv=xn&&"TextEvent"in window&&!Qs,Zh=xn&&(!qo||Qs&&8<Qs&&11>=Qs),ef=" ",tf=!1;function nf(e,t){switch(e){case"keyup":return Xv.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function rf(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zr=!1;function Jv(e,t){switch(e){case"compositionend":return rf(t);case"keypress":return t.which!==32?null:(tf=!0,ef);case"textInput":return e=t.data,e===ef&&tf?null:e;default:return null}}function Zv(e,t){if(Zr)return e==="compositionend"||!qo&&nf(e,t)?(e=ul(),Kr=Xs=ke=null,Zr=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Zh&&t.locale!=="ko"?null:t.data;default:return null}}var ey={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 sf(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!ey[e.type]:t==="textarea"}function af(e,t,i,a){tn?Pi?Pi.push(a):Pi=[a]:tn=a,t=eo(t,"onChange"),0<t.length&&(i=new Qr("onChange","change",null,i,a),e.push({event:i,listeners:t}))}var Js=null,Zs=null;function ty(e){Fp(e,0)}function fl(e){var t=mi(e);if($s(t))return e}function lf(e,t){if(e==="change")return t}var of=!1;if(xn){var $o;if(xn){var Go="oninput"in document;if(!Go){var cf=document.createElement("div");cf.setAttribute("oninput","return;"),Go=typeof cf.oninput=="function"}$o=Go}else $o=!1;of=$o&&(!document.documentMode||9<document.documentMode)}function uf(){Js&&(Js.detachEvent("onpropertychange",hf),Zs=Js=null)}function hf(e){if(e.propertyName==="value"&&fl(Zs)){var t=[];af(t,Zs,e,si(e)),dn(ty,t)}}function ny(e,t,i){e==="focusin"?(uf(),Js=t,Zs=i,Js.attachEvent("onpropertychange",hf)):e==="focusout"&&uf()}function iy(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return fl(Zs)}function ry(e,t){if(e==="click")return fl(t)}function sy(e,t){if(e==="input"||e==="change")return fl(t)}function ay(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var En=typeof Object.is=="function"?Object.is:ay;function ea(e,t){if(En(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var i=Object.keys(e),a=Object.keys(t);if(i.length!==a.length)return!1;for(a=0;a<i.length;a++){var g=i[a];if(!yt.call(t,g)||!En(e[g],t[g]))return!1}return!0}function ff(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function df(e,t){var i=ff(e);e=0;for(var a;i;){if(i.nodeType===3){if(a=e+i.textContent.length,e<=t&&a>=t)return{node:i,offset:t-e};e=a}e:{for(;i;){if(i.nextSibling){i=i.nextSibling;break e}i=i.parentNode}i=void 0}i=ff(i)}}function pf(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?pf(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function mf(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=mr(e.document);t instanceof e.HTMLIFrameElement;){try{var i=typeof t.contentWindow.location.href=="string"}catch{i=!1}if(i)e=t.contentWindow;else break;t=mr(e.document)}return t}function Vo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var ly=xn&&"documentMode"in document&&11>=document.documentMode,es=null,Wo=null,ta=null,Ko=!1;function gf(e,t,i){var a=i.window===i?i.document:i.nodeType===9?i:i.ownerDocument;Ko||es==null||es!==mr(a)||(a=es,"selectionStart"in a&&Vo(a)?a={start:a.selectionStart,end:a.selectionEnd}:(a=(a.ownerDocument&&a.ownerDocument.defaultView||window).getSelection(),a={anchorNode:a.anchorNode,anchorOffset:a.anchorOffset,focusNode:a.focusNode,focusOffset:a.focusOffset}),ta&&ea(ta,a)||(ta=a,a=eo(Wo,"onSelect"),0<a.length&&(t=new Qr("onSelect","select",null,t,i),e.push({event:t,listeners:a}),t.target=es)))}function Sr(e,t){var i={};return i[e.toLowerCase()]=t.toLowerCase(),i["Webkit"+e]="webkit"+t,i["Moz"+e]="moz"+t,i}var ts={animationend:Sr("Animation","AnimationEnd"),animationiteration:Sr("Animation","AnimationIteration"),animationstart:Sr("Animation","AnimationStart"),transitionrun:Sr("Transition","TransitionRun"),transitionstart:Sr("Transition","TransitionStart"),transitioncancel:Sr("Transition","TransitionCancel"),transitionend:Sr("Transition","TransitionEnd")},Yo={},_f={};xn&&(_f=document.createElement("div").style,"AnimationEvent"in window||(delete ts.animationend.animation,delete ts.animationiteration.animation,delete ts.animationstart.animation),"TransitionEvent"in window||delete ts.transitionend.transition);function br(e){if(Yo[e])return Yo[e];if(!ts[e])return e;var t=ts[e],i;for(i in t)if(t.hasOwnProperty(i)&&i in _f)return Yo[e]=t[i];return e}var vf=br("animationend"),yf=br("animationiteration"),Sf=br("animationstart"),oy=br("transitionrun"),cy=br("transitionstart"),uy=br("transitioncancel"),bf=br("transitionend"),Cf=new Map,Xo="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(" ");Xo.push("scrollEnd");function Zn(e,t){Cf.set(e,t),Qn(t,[e])}var dl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},Nn=[],ns=0,Qo=0;function pl(){for(var e=ns,t=Qo=ns=0;t<e;){var i=Nn[t];Nn[t++]=null;var a=Nn[t];Nn[t++]=null;var g=Nn[t];Nn[t++]=null;var w=Nn[t];if(Nn[t++]=null,a!==null&&g!==null){var B=a.pending;B===null?g.next=g:(g.next=B.next,B.next=g),a.pending=g}w!==0&&wf(i,g,w)}}function ml(e,t,i,a){Nn[ns++]=e,Nn[ns++]=t,Nn[ns++]=i,Nn[ns++]=a,Qo|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Jo(e,t,i,a){return ml(e,t,i,a),gl(e)}function Cr(e,t){return ml(e,null,null,t),gl(e)}function wf(e,t,i){e.lanes|=i;var a=e.alternate;a!==null&&(a.lanes|=i);for(var g=!1,w=e.return;w!==null;)w.childLanes|=i,a=w.alternate,a!==null&&(a.childLanes|=i),w.tag===22&&(e=w.stateNode,e===null||e._visibility&1||(g=!0)),e=w,w=w.return;return e.tag===3?(w=e.stateNode,g&&t!==null&&(g=31-Qe(i),e=w.hiddenUpdates,a=e[g],a===null?e[g]=[t]:a.push(t),t.lane=i|536870912),w):null}function gl(e){if(50<wa)throw wa=0,lu=null,Error(l(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var is={};function hy(e,t,i,a){this.tag=e,this.key=i,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=a,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function kn(e,t,i,a){return new hy(e,t,i,a)}function Zo(e){return e=e.prototype,!(!e||!e.isReactComponent)}function bi(e,t){var i=e.alternate;return i===null?(i=kn(e.tag,t,e.key,e.mode),i.elementType=e.elementType,i.type=e.type,i.stateNode=e.stateNode,i.alternate=e,e.alternate=i):(i.pendingProps=t,i.type=e.type,i.flags=0,i.subtreeFlags=0,i.deletions=null),i.flags=e.flags&65011712,i.childLanes=e.childLanes,i.lanes=e.lanes,i.child=e.child,i.memoizedProps=e.memoizedProps,i.memoizedState=e.memoizedState,i.updateQueue=e.updateQueue,t=e.dependencies,i.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},i.sibling=e.sibling,i.index=e.index,i.ref=e.ref,i.refCleanup=e.refCleanup,i}function xf(e,t){e.flags&=65011714;var i=e.alternate;return i===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=i.childLanes,e.lanes=i.lanes,e.child=i.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=i.memoizedProps,e.memoizedState=i.memoizedState,e.updateQueue=i.updateQueue,e.type=i.type,t=i.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function _l(e,t,i,a,g,w){var B=0;if(a=e,typeof e=="function")Zo(e)&&(B=1);else if(typeof e=="string")B=g0(e,i,re.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case M:return e=kn(31,i,t,g),e.elementType=M,e.lanes=w,e;case E:return wr(i.children,g,w,t);case S:B=8,g|=24;break;case v:return e=kn(12,i,t,g|2),e.elementType=v,e.lanes=w,e;case L:return e=kn(13,i,t,g),e.elementType=L,e.lanes=w,e;case D:return e=kn(19,i,t,g),e.elementType=D,e.lanes=w,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case y:B=10;break e;case _:B=9;break e;case A:B=11;break e;case R:B=14;break e;case k:B=16,a=null;break e}B=29,i=Error(l(130,e===null?"null":typeof e,"")),a=null}return t=kn(B,i,t,g),t.elementType=e,t.type=a,t.lanes=w,t}function wr(e,t,i,a){return e=kn(7,e,a,t),e.lanes=i,e}function ec(e,t,i){return e=kn(6,e,null,t),e.lanes=i,e}function Ef(e){var t=kn(18,null,null,0);return t.stateNode=e,t}function tc(e,t,i){return t=kn(4,e.children!==null?e.children:[],e.key,t),t.lanes=i,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var kf=new WeakMap;function Hn(e,t){if(typeof e=="object"&&e!==null){var i=kf.get(e);return i!==void 0?i:(t={value:e,source:t,stack:xt(t)},kf.set(e,t),t)}return{value:e,source:t,stack:xt(t)}}var rs=[],ss=0,vl=null,na=0,zn=[],In=0,Fi=null,ai=1,li="";function Ci(e,t){rs[ss++]=na,rs[ss++]=vl,vl=e,na=t}function Af(e,t,i){zn[In++]=ai,zn[In++]=li,zn[In++]=Fi,Fi=e;var a=ai;e=li;var g=32-Qe(a)-1;a&=~(1<<g),i+=1;var w=32-Qe(t)+g;if(30<w){var B=g-g%5;w=(a&(1<<B)-1).toString(32),a>>=B,g-=B,ai=1<<32-Qe(t)+g|i<<g|a,li=w+e}else ai=1<<w|i<<g|a,li=e}function nc(e){e.return!==null&&(Ci(e,1),Af(e,1,0))}function ic(e){for(;e===vl;)vl=rs[--ss],rs[ss]=null,na=rs[--ss],rs[ss]=null;for(;e===Fi;)Fi=zn[--In],zn[In]=null,li=zn[--In],zn[In]=null,ai=zn[--In],zn[In]=null}function Tf(e,t){zn[In++]=ai,zn[In++]=li,zn[In++]=Fi,ai=t.id,li=t.overflow,Fi=e}var Ft=null,ut=null,Ye=!1,qi=null,Un=!1,rc=Error(l(519));function $i(e){var t=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw ia(Hn(t,e)),rc}function Rf(e){var t=e.stateNode,i=e.type,a=e.memoizedProps;switch(t[kt]=e,t[Ut]=a,i){case"dialog":Ge("cancel",t),Ge("close",t);break;case"iframe":case"object":case"embed":Ge("load",t);break;case"video":case"audio":for(i=0;i<Ea.length;i++)Ge(Ea[i],t);break;case"source":Ge("error",t);break;case"img":case"image":case"link":Ge("error",t),Ge("load",t);break;case"details":Ge("toggle",t);break;case"input":Ge("invalid",t),sl(t,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Ge("invalid",t);break;case"textarea":Ge("invalid",t),vi(t,a.value,a.defaultValue,a.children)}i=a.children,typeof i!="string"&&typeof i!="number"&&typeof i!="bigint"||t.textContent===""+i||a.suppressHydrationWarning===!0||Vp(t.textContent,i)?(a.popover!=null&&(Ge("beforetoggle",t),Ge("toggle",t)),a.onScroll!=null&&Ge("scroll",t),a.onScrollEnd!=null&&Ge("scrollend",t),a.onClick!=null&&(t.onclick=Kt),t=!0):t=!1,t||$i(e,!0)}function Df(e){for(Ft=e.return;Ft;)switch(Ft.tag){case 5:case 31:case 13:Un=!1;return;case 27:case 3:Un=!0;return;default:Ft=Ft.return}}function as(e){if(e!==Ft)return!1;if(!Ye)return Df(e),Ye=!0,!1;var t=e.tag,i;if((i=t!==3&&t!==27)&&((i=t===5)&&(i=e.type,i=!(i!=="form"&&i!=="button")||Cu(e.type,e.memoizedProps)),i=!i),i&&ut&&$i(e),Df(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ut=tm(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));ut=tm(e)}else t===27?(t=ut,rr(e.type)?(e=Au,Au=null,ut=e):ut=t):ut=Ft?Fn(e.stateNode.nextSibling):null;return!0}function xr(){ut=Ft=null,Ye=!1}function sc(){var e=qi;return e!==null&&(vn===null?vn=e:vn.push.apply(vn,e),qi=null),e}function ia(e){qi===null?qi=[e]:qi.push(e)}var ac=N(null),Er=null,wi=null;function Gi(e,t,i){I(ac,t._currentValue),t._currentValue=i}function xi(e){e._currentValue=ac.current,$(ac)}function lc(e,t,i){for(;e!==null;){var a=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,a!==null&&(a.childLanes|=t)):a!==null&&(a.childLanes&t)!==t&&(a.childLanes|=t),e===i)break;e=e.return}}function oc(e,t,i,a){var g=e.child;for(g!==null&&(g.return=e);g!==null;){var w=g.dependencies;if(w!==null){var B=g.child;w=w.firstContext;e:for(;w!==null;){var P=w;w=g;for(var X=0;X<t.length;X++)if(P.context===t[X]){w.lanes|=i,P=w.alternate,P!==null&&(P.lanes|=i),lc(w.return,i,e),a||(B=null);break e}w=P.next}}else if(g.tag===18){if(B=g.return,B===null)throw Error(l(341));B.lanes|=i,w=B.alternate,w!==null&&(w.lanes|=i),lc(B,i,e),B=null}else B=g.child;if(B!==null)B.return=g;else for(B=g;B!==null;){if(B===e){B=null;break}if(g=B.sibling,g!==null){g.return=B.return,B=g;break}B=B.return}g=B}}function ls(e,t,i,a){e=null;for(var g=t,w=!1;g!==null;){if(!w){if((g.flags&524288)!==0)w=!0;else if((g.flags&262144)!==0)break}if(g.tag===10){var B=g.alternate;if(B===null)throw Error(l(387));if(B=B.memoizedProps,B!==null){var P=g.type;En(g.pendingProps.value,B.value)||(e!==null?e.push(P):e=[P])}}else if(g===Q.current){if(B=g.alternate,B===null)throw Error(l(387));B.memoizedState.memoizedState!==g.memoizedState.memoizedState&&(e!==null?e.push(Da):e=[Da])}g=g.return}e!==null&&oc(t,e,i,a),t.flags|=262144}function yl(e){for(e=e.firstContext;e!==null;){if(!En(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function kr(e){Er=e,wi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function qt(e){return Mf(Er,e)}function Sl(e,t){return Er===null&&kr(e),Mf(e,t)}function Mf(e,t){var i=t._currentValue;if(t={context:t,memoizedValue:i,next:null},wi===null){if(e===null)throw Error(l(308));wi=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else wi=wi.next=t;return i}var fy=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(i,a){e.push(a)}};this.abort=function(){t.aborted=!0,e.forEach(function(i){return i()})}},dy=n.unstable_scheduleCallback,py=n.unstable_NormalPriority,At={$$typeof:y,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function cc(){return{controller:new fy,data:new Map,refCount:0}}function ra(e){e.refCount--,e.refCount===0&&dy(py,function(){e.controller.abort()})}var sa=null,uc=0,os=0,cs=null;function my(e,t){if(sa===null){var i=sa=[];uc=0,os=du(),cs={status:"pending",value:void 0,then:function(a){i.push(a)}}}return uc++,t.then(Lf,Lf),t}function Lf(){if(--uc===0&&sa!==null){cs!==null&&(cs.status="fulfilled");var e=sa;sa=null,os=0,cs=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function gy(e,t){var i=[],a={status:"pending",value:null,reason:null,then:function(g){i.push(g)}};return e.then(function(){a.status="fulfilled",a.value=t;for(var g=0;g<i.length;g++)(0,i[g])(t)},function(g){for(a.status="rejected",a.reason=g,g=0;g<i.length;g++)(0,i[g])(void 0)}),a}var Of=G.S;G.S=function(e,t){gp=tt(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&my(e,t),Of!==null&&Of(e,t)};var Ar=N(null);function hc(){var e=Ar.current;return e!==null?e:lt.pooledCache}function bl(e,t){t===null?I(Ar,Ar.current):I(Ar,t.pool)}function Bf(){var e=hc();return e===null?null:{parent:At._currentValue,pool:e}}var us=Error(l(460)),fc=Error(l(474)),Cl=Error(l(542)),wl={then:function(){}};function jf(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Nf(e,t,i){switch(i=e[i],i===void 0?e.push(t):i!==t&&(t.then(Kt,Kt),t=i),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zf(e),e;default:if(typeof t.status=="string")t.then(Kt,Kt);else{if(e=lt,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=t,e.status="pending",e.then(function(a){if(t.status==="pending"){var g=t;g.status="fulfilled",g.value=a}},function(a){if(t.status==="pending"){var g=t;g.status="rejected",g.reason=a}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,zf(e),e}throw Rr=t,us}}function Tr(e){try{var t=e._init;return t(e._payload)}catch(i){throw i!==null&&typeof i=="object"&&typeof i.then=="function"?(Rr=i,us):i}}var Rr=null;function Hf(){if(Rr===null)throw Error(l(459));var e=Rr;return Rr=null,e}function zf(e){if(e===us||e===Cl)throw Error(l(483))}var hs=null,aa=0;function xl(e){var t=aa;return aa+=1,hs===null&&(hs=[]),Nf(hs,e,t)}function la(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function El(e,t){throw t.$$typeof===b?Error(l(525)):(e=Object.prototype.toString.call(t),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function If(e){function t(ne,J){if(e){var le=ne.deletions;le===null?(ne.deletions=[J],ne.flags|=16):le.push(J)}}function i(ne,J){if(!e)return null;for(;J!==null;)t(ne,J),J=J.sibling;return null}function a(ne){for(var J=new Map;ne!==null;)ne.key!==null?J.set(ne.key,ne):J.set(ne.index,ne),ne=ne.sibling;return J}function g(ne,J){return ne=bi(ne,J),ne.index=0,ne.sibling=null,ne}function w(ne,J,le){return ne.index=le,e?(le=ne.alternate,le!==null?(le=le.index,le<J?(ne.flags|=67108866,J):le):(ne.flags|=67108866,J)):(ne.flags|=1048576,J)}function B(ne){return e&&ne.alternate===null&&(ne.flags|=67108866),ne}function P(ne,J,le,ge){return J===null||J.tag!==6?(J=ec(le,ne.mode,ge),J.return=ne,J):(J=g(J,le),J.return=ne,J)}function X(ne,J,le,ge){var Re=le.type;return Re===E?fe(ne,J,le.props.children,ge,le.key):J!==null&&(J.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&Tr(Re)===J.type)?(J=g(J,le.props),la(J,le),J.return=ne,J):(J=_l(le.type,le.key,le.props,null,ne.mode,ge),la(J,le),J.return=ne,J)}function oe(ne,J,le,ge){return J===null||J.tag!==4||J.stateNode.containerInfo!==le.containerInfo||J.stateNode.implementation!==le.implementation?(J=tc(le,ne.mode,ge),J.return=ne,J):(J=g(J,le.children||[]),J.return=ne,J)}function fe(ne,J,le,ge,Re){return J===null||J.tag!==7?(J=wr(le,ne.mode,ge,Re),J.return=ne,J):(J=g(J,le),J.return=ne,J)}function _e(ne,J,le){if(typeof J=="string"&&J!==""||typeof J=="number"||typeof J=="bigint")return J=ec(""+J,ne.mode,le),J.return=ne,J;if(typeof J=="object"&&J!==null){switch(J.$$typeof){case C:return le=_l(J.type,J.key,J.props,null,ne.mode,le),la(le,J),le.return=ne,le;case T:return J=tc(J,ne.mode,le),J.return=ne,J;case k:return J=Tr(J),_e(ne,J,le)}if(Y(J)||U(J))return J=wr(J,ne.mode,le,null),J.return=ne,J;if(typeof J.then=="function")return _e(ne,xl(J),le);if(J.$$typeof===y)return _e(ne,Sl(ne,J),le);El(ne,J)}return null}function ce(ne,J,le,ge){var Re=J!==null?J.key:null;if(typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint")return Re!==null?null:P(ne,J,""+le,ge);if(typeof le=="object"&&le!==null){switch(le.$$typeof){case C:return le.key===Re?X(ne,J,le,ge):null;case T:return le.key===Re?oe(ne,J,le,ge):null;case k:return le=Tr(le),ce(ne,J,le,ge)}if(Y(le)||U(le))return Re!==null?null:fe(ne,J,le,ge,null);if(typeof le.then=="function")return ce(ne,J,xl(le),ge);if(le.$$typeof===y)return ce(ne,J,Sl(ne,le),ge);El(ne,le)}return null}function ue(ne,J,le,ge,Re){if(typeof ge=="string"&&ge!==""||typeof ge=="number"||typeof ge=="bigint")return ne=ne.get(le)||null,P(J,ne,""+ge,Re);if(typeof ge=="object"&&ge!==null){switch(ge.$$typeof){case C:return ne=ne.get(ge.key===null?le:ge.key)||null,X(J,ne,ge,Re);case T:return ne=ne.get(ge.key===null?le:ge.key)||null,oe(J,ne,ge,Re);case k:return ge=Tr(ge),ue(ne,J,le,ge,Re)}if(Y(ge)||U(ge))return ne=ne.get(le)||null,fe(J,ne,ge,Re,null);if(typeof ge.then=="function")return ue(ne,J,le,xl(ge),Re);if(ge.$$typeof===y)return ue(ne,J,le,Sl(J,ge),Re);El(J,ge)}return null}function Ee(ne,J,le,ge){for(var Re=null,Je=null,Te=J,Ie=J=0,Ke=null;Te!==null&&Ie<le.length;Ie++){Te.index>Ie?(Ke=Te,Te=null):Ke=Te.sibling;var Ze=ce(ne,Te,le[Ie],ge);if(Ze===null){Te===null&&(Te=Ke);break}e&&Te&&Ze.alternate===null&&t(ne,Te),J=w(Ze,J,Ie),Je===null?Re=Ze:Je.sibling=Ze,Je=Ze,Te=Ke}if(Ie===le.length)return i(ne,Te),Ye&&Ci(ne,Ie),Re;if(Te===null){for(;Ie<le.length;Ie++)Te=_e(ne,le[Ie],ge),Te!==null&&(J=w(Te,J,Ie),Je===null?Re=Te:Je.sibling=Te,Je=Te);return Ye&&Ci(ne,Ie),Re}for(Te=a(Te);Ie<le.length;Ie++)Ke=ue(Te,ne,Ie,le[Ie],ge),Ke!==null&&(e&&Ke.alternate!==null&&Te.delete(Ke.key===null?Ie:Ke.key),J=w(Ke,J,Ie),Je===null?Re=Ke:Je.sibling=Ke,Je=Ke);return e&&Te.forEach(function(cr){return t(ne,cr)}),Ye&&Ci(ne,Ie),Re}function Le(ne,J,le,ge){if(le==null)throw Error(l(151));for(var Re=null,Je=null,Te=J,Ie=J=0,Ke=null,Ze=le.next();Te!==null&&!Ze.done;Ie++,Ze=le.next()){Te.index>Ie?(Ke=Te,Te=null):Ke=Te.sibling;var cr=ce(ne,Te,Ze.value,ge);if(cr===null){Te===null&&(Te=Ke);break}e&&Te&&cr.alternate===null&&t(ne,Te),J=w(cr,J,Ie),Je===null?Re=cr:Je.sibling=cr,Je=cr,Te=Ke}if(Ze.done)return i(ne,Te),Ye&&Ci(ne,Ie),Re;if(Te===null){for(;!Ze.done;Ie++,Ze=le.next())Ze=_e(ne,Ze.value,ge),Ze!==null&&(J=w(Ze,J,Ie),Je===null?Re=Ze:Je.sibling=Ze,Je=Ze);return Ye&&Ci(ne,Ie),Re}for(Te=a(Te);!Ze.done;Ie++,Ze=le.next())Ze=ue(Te,ne,Ie,Ze.value,ge),Ze!==null&&(e&&Ze.alternate!==null&&Te.delete(Ze.key===null?Ie:Ze.key),J=w(Ze,J,Ie),Je===null?Re=Ze:Je.sibling=Ze,Je=Ze);return e&&Te.forEach(function(A0){return t(ne,A0)}),Ye&&Ci(ne,Ie),Re}function at(ne,J,le,ge){if(typeof le=="object"&&le!==null&&le.type===E&&le.key===null&&(le=le.props.children),typeof le=="object"&&le!==null){switch(le.$$typeof){case C:e:{for(var Re=le.key;J!==null;){if(J.key===Re){if(Re=le.type,Re===E){if(J.tag===7){i(ne,J.sibling),ge=g(J,le.props.children),ge.return=ne,ne=ge;break e}}else if(J.elementType===Re||typeof Re=="object"&&Re!==null&&Re.$$typeof===k&&Tr(Re)===J.type){i(ne,J.sibling),ge=g(J,le.props),la(ge,le),ge.return=ne,ne=ge;break e}i(ne,J);break}else t(ne,J);J=J.sibling}le.type===E?(ge=wr(le.props.children,ne.mode,ge,le.key),ge.return=ne,ne=ge):(ge=_l(le.type,le.key,le.props,null,ne.mode,ge),la(ge,le),ge.return=ne,ne=ge)}return B(ne);case T:e:{for(Re=le.key;J!==null;){if(J.key===Re)if(J.tag===4&&J.stateNode.containerInfo===le.containerInfo&&J.stateNode.implementation===le.implementation){i(ne,J.sibling),ge=g(J,le.children||[]),ge.return=ne,ne=ge;break e}else{i(ne,J);break}else t(ne,J);J=J.sibling}ge=tc(le,ne.mode,ge),ge.return=ne,ne=ge}return B(ne);case k:return le=Tr(le),at(ne,J,le,ge)}if(Y(le))return Ee(ne,J,le,ge);if(U(le)){if(Re=U(le),typeof Re!="function")throw Error(l(150));return le=Re.call(le),Le(ne,J,le,ge)}if(typeof le.then=="function")return at(ne,J,xl(le),ge);if(le.$$typeof===y)return at(ne,J,Sl(ne,le),ge);El(ne,le)}return typeof le=="string"&&le!==""||typeof le=="number"||typeof le=="bigint"?(le=""+le,J!==null&&J.tag===6?(i(ne,J.sibling),ge=g(J,le),ge.return=ne,ne=ge):(i(ne,J),ge=ec(le,ne.mode,ge),ge.return=ne,ne=ge),B(ne)):i(ne,J)}return function(ne,J,le,ge){try{aa=0;var Re=at(ne,J,le,ge);return hs=null,Re}catch(Te){if(Te===us||Te===Cl)throw Te;var Je=kn(29,Te,null,ne.mode);return Je.lanes=ge,Je.return=ne,Je}finally{}}}var Dr=If(!0),Uf=If(!1),Vi=!1;function dc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function pc(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function Wi(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function Ki(e,t,i){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(et&2)!==0){var g=a.pending;return g===null?t.next=t:(t.next=g.next,g.next=t),a.pending=t,t=gl(e),wf(e,null,i),t}return ml(e,a,t,i),gl(e)}function oa(e,t,i){if(t=t.updateQueue,t!==null&&(t=t.shared,(i&4194048)!==0)){var a=t.lanes;a&=e.pendingLanes,i|=a,t.lanes=i,di(e,i)}}function mc(e,t){var i=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,i===a)){var g=null,w=null;if(i=i.firstBaseUpdate,i!==null){do{var B={lane:i.lane,tag:i.tag,payload:i.payload,callback:null,next:null};w===null?g=w=B:w=w.next=B,i=i.next}while(i!==null);w===null?g=w=t:w=w.next=t}else g=w=t;i={baseState:a.baseState,firstBaseUpdate:g,lastBaseUpdate:w,shared:a.shared,callbacks:a.callbacks},e.updateQueue=i;return}e=i.lastBaseUpdate,e===null?i.firstBaseUpdate=t:e.next=t,i.lastBaseUpdate=t}var gc=!1;function ca(){if(gc){var e=cs;if(e!==null)throw e}}function ua(e,t,i,a){gc=!1;var g=e.updateQueue;Vi=!1;var w=g.firstBaseUpdate,B=g.lastBaseUpdate,P=g.shared.pending;if(P!==null){g.shared.pending=null;var X=P,oe=X.next;X.next=null,B===null?w=oe:B.next=oe,B=X;var fe=e.alternate;fe!==null&&(fe=fe.updateQueue,P=fe.lastBaseUpdate,P!==B&&(P===null?fe.firstBaseUpdate=oe:P.next=oe,fe.lastBaseUpdate=X))}if(w!==null){var _e=g.baseState;B=0,fe=oe=X=null,P=w;do{var ce=P.lane&-536870913,ue=ce!==P.lane;if(ue?(We&ce)===ce:(a&ce)===ce){ce!==0&&ce===os&&(gc=!0),fe!==null&&(fe=fe.next={lane:0,tag:P.tag,payload:P.payload,callback:null,next:null});e:{var Ee=e,Le=P;ce=t;var at=i;switch(Le.tag){case 1:if(Ee=Le.payload,typeof Ee=="function"){_e=Ee.call(at,_e,ce);break e}_e=Ee;break e;case 3:Ee.flags=Ee.flags&-65537|128;case 0:if(Ee=Le.payload,ce=typeof Ee=="function"?Ee.call(at,_e,ce):Ee,ce==null)break e;_e=u({},_e,ce);break e;case 2:Vi=!0}}ce=P.callback,ce!==null&&(e.flags|=64,ue&&(e.flags|=8192),ue=g.callbacks,ue===null?g.callbacks=[ce]:ue.push(ce))}else ue={lane:ce,tag:P.tag,payload:P.payload,callback:P.callback,next:null},fe===null?(oe=fe=ue,X=_e):fe=fe.next=ue,B|=ce;if(P=P.next,P===null){if(P=g.shared.pending,P===null)break;ue=P,P=ue.next,ue.next=null,g.lastBaseUpdate=ue,g.shared.pending=null}}while(!0);fe===null&&(X=_e),g.baseState=X,g.firstBaseUpdate=oe,g.lastBaseUpdate=fe,w===null&&(g.shared.lanes=0),Zi|=B,e.lanes=B,e.memoizedState=_e}}function Pf(e,t){if(typeof e!="function")throw Error(l(191,e));e.call(t)}function Ff(e,t){var i=e.callbacks;if(i!==null)for(e.callbacks=null,e=0;e<i.length;e++)Pf(i[e],t)}var fs=N(null),kl=N(0);function qf(e,t){e=Oi,I(kl,e),I(fs,t),Oi=e|t.baseLanes}function _c(){I(kl,Oi),I(fs,fs.current)}function vc(){Oi=kl.current,$(fs),$(kl)}var An=N(null),Pn=null;function Yi(e){var t=e.alternate;I(Ct,Ct.current&1),I(An,e),Pn===null&&(t===null||fs.current!==null||t.memoizedState!==null)&&(Pn=e)}function yc(e){I(Ct,Ct.current),I(An,e),Pn===null&&(Pn=e)}function $f(e){e.tag===22?(I(Ct,Ct.current),I(An,e),Pn===null&&(Pn=e)):Xi()}function Xi(){I(Ct,Ct.current),I(An,An.current)}function Tn(e){$(An),Pn===e&&(Pn=null),$(Ct)}var Ct=N(0);function Al(e){for(var t=e;t!==null;){if(t.tag===13){var i=t.memoizedState;if(i!==null&&(i=i.dehydrated,i===null||Eu(i)||ku(i)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Ei=0,Ne=null,rt=null,Tt=null,Tl=!1,ds=!1,Mr=!1,Rl=0,ha=0,ps=null,_y=0;function _t(){throw Error(l(321))}function Sc(e,t){if(t===null)return!1;for(var i=0;i<t.length&&i<e.length;i++)if(!En(e[i],t[i]))return!1;return!0}function bc(e,t,i,a,g,w){return Ei=w,Ne=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e===null||e.memoizedState===null?Ad:Nc,Mr=!1,w=i(a,g),Mr=!1,ds&&(w=Vf(t,i,a,g)),Gf(e),w}function Gf(e){G.H=pa;var t=rt!==null&&rt.next!==null;if(Ei=0,Tt=rt=Ne=null,Tl=!1,ha=0,ps=null,t)throw Error(l(300));e===null||Rt||(e=e.dependencies,e!==null&&yl(e)&&(Rt=!0))}function Vf(e,t,i,a){Ne=e;var g=0;do{if(ds&&(ps=null),ha=0,ds=!1,25<=g)throw Error(l(301));if(g+=1,Tt=rt=null,e.updateQueue!=null){var w=e.updateQueue;w.lastEffect=null,w.events=null,w.stores=null,w.memoCache!=null&&(w.memoCache.index=0)}G.H=Td,w=t(i,a)}while(ds);return w}function vy(){var e=G.H,t=e.useState()[0];return t=typeof t.then=="function"?fa(t):t,e=e.useState()[0],(rt!==null?rt.memoizedState:null)!==e&&(Ne.flags|=1024),t}function Cc(){var e=Rl!==0;return Rl=0,e}function wc(e,t,i){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i}function xc(e){if(Tl){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Tl=!1}Ei=0,Tt=rt=Ne=null,ds=!1,ha=Rl=0,ps=null}function rn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Tt===null?Ne.memoizedState=Tt=e:Tt=Tt.next=e,Tt}function wt(){if(rt===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=rt.next;var t=Tt===null?Ne.memoizedState:Tt.next;if(t!==null)Tt=t,rt=e;else{if(e===null)throw Ne.alternate===null?Error(l(467)):Error(l(310));rt=e,e={memoizedState:rt.memoizedState,baseState:rt.baseState,baseQueue:rt.baseQueue,queue:rt.queue,next:null},Tt===null?Ne.memoizedState=Tt=e:Tt=Tt.next=e}return Tt}function Dl(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function fa(e){var t=ha;return ha+=1,ps===null&&(ps=[]),e=Nf(ps,e,t),t=Ne,(Tt===null?t.memoizedState:Tt.next)===null&&(t=t.alternate,G.H=t===null||t.memoizedState===null?Ad:Nc),e}function Ml(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return fa(e);if(e.$$typeof===y)return qt(e)}throw Error(l(438,String(e)))}function Ec(e){var t=null,i=Ne.updateQueue;if(i!==null&&(t=i.memoCache),t==null){var a=Ne.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(t={data:a.data.map(function(g){return g.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),i===null&&(i=Dl(),Ne.updateQueue=i),i.memoCache=t,i=t.data[t.index],i===void 0)for(i=t.data[t.index]=Array(e),a=0;a<e;a++)i[a]=j;return t.index++,i}function ki(e,t){return typeof t=="function"?t(e):t}function Ll(e){var t=wt();return kc(t,rt,e)}function kc(e,t,i){var a=e.queue;if(a===null)throw Error(l(311));a.lastRenderedReducer=i;var g=e.baseQueue,w=a.pending;if(w!==null){if(g!==null){var B=g.next;g.next=w.next,w.next=B}t.baseQueue=g=w,a.pending=null}if(w=e.baseState,g===null)e.memoizedState=w;else{t=g.next;var P=B=null,X=null,oe=t,fe=!1;do{var _e=oe.lane&-536870913;if(_e!==oe.lane?(We&_e)===_e:(Ei&_e)===_e){var ce=oe.revertLane;if(ce===0)X!==null&&(X=X.next={lane:0,revertLane:0,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),_e===os&&(fe=!0);else if((Ei&ce)===ce){oe=oe.next,ce===os&&(fe=!0);continue}else _e={lane:0,revertLane:oe.revertLane,gesture:null,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},X===null?(P=X=_e,B=w):X=X.next=_e,Ne.lanes|=ce,Zi|=ce;_e=oe.action,Mr&&i(w,_e),w=oe.hasEagerState?oe.eagerState:i(w,_e)}else ce={lane:_e,revertLane:oe.revertLane,gesture:oe.gesture,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null},X===null?(P=X=ce,B=w):X=X.next=ce,Ne.lanes|=_e,Zi|=_e;oe=oe.next}while(oe!==null&&oe!==t);if(X===null?B=w:X.next=P,!En(w,e.memoizedState)&&(Rt=!0,fe&&(i=cs,i!==null)))throw i;e.memoizedState=w,e.baseState=B,e.baseQueue=X,a.lastRenderedState=w}return g===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ac(e){var t=wt(),i=t.queue;if(i===null)throw Error(l(311));i.lastRenderedReducer=e;var a=i.dispatch,g=i.pending,w=t.memoizedState;if(g!==null){i.pending=null;var B=g=g.next;do w=e(w,B.action),B=B.next;while(B!==g);En(w,t.memoizedState)||(Rt=!0),t.memoizedState=w,t.baseQueue===null&&(t.baseState=w),i.lastRenderedState=w}return[w,a]}function Wf(e,t,i){var a=Ne,g=wt(),w=Ye;if(w){if(i===void 0)throw Error(l(407));i=i()}else i=t();var B=!En((rt||g).memoizedState,i);if(B&&(g.memoizedState=i,Rt=!0),g=g.queue,Dc(Xf.bind(null,a,g,e),[e]),g.getSnapshot!==t||B||Tt!==null&&Tt.memoizedState.tag&1){if(a.flags|=2048,ms(9,{destroy:void 0},Yf.bind(null,a,g,i,t),null),lt===null)throw Error(l(349));w||(Ei&127)!==0||Kf(a,t,i)}return i}function Kf(e,t,i){e.flags|=16384,e={getSnapshot:t,value:i},t=Ne.updateQueue,t===null?(t=Dl(),Ne.updateQueue=t,t.stores=[e]):(i=t.stores,i===null?t.stores=[e]:i.push(e))}function Yf(e,t,i,a){t.value=i,t.getSnapshot=a,Qf(t)&&Jf(e)}function Xf(e,t,i){return i(function(){Qf(t)&&Jf(e)})}function Qf(e){var t=e.getSnapshot;e=e.value;try{var i=t();return!En(e,i)}catch{return!0}}function Jf(e){var t=Cr(e,2);t!==null&&yn(t,e,2)}function Tc(e){var t=rn();if(typeof e=="function"){var i=e;if(e=i(),Mr){Ot(!0);try{i()}finally{Ot(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:e},t}function Zf(e,t,i,a){return e.baseState=i,kc(e,rt,typeof a=="function"?a:ki)}function yy(e,t,i,a,g){if(jl(e))throw Error(l(485));if(e=t.action,e!==null){var w={payload:g,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(B){w.listeners.push(B)}};G.T!==null?i(!0):w.isTransition=!1,a(w),i=t.pending,i===null?(w.next=t.pending=w,ed(t,w)):(w.next=i.next,t.pending=i.next=w)}}function ed(e,t){var i=t.action,a=t.payload,g=e.state;if(t.isTransition){var w=G.T,B={};G.T=B;try{var P=i(g,a),X=G.S;X!==null&&X(B,P),td(e,t,P)}catch(oe){Rc(e,t,oe)}finally{w!==null&&B.types!==null&&(w.types=B.types),G.T=w}}else try{w=i(g,a),td(e,t,w)}catch(oe){Rc(e,t,oe)}}function td(e,t,i){i!==null&&typeof i=="object"&&typeof i.then=="function"?i.then(function(a){nd(e,t,a)},function(a){return Rc(e,t,a)}):nd(e,t,i)}function nd(e,t,i){t.status="fulfilled",t.value=i,id(t),e.state=i,t=e.pending,t!==null&&(i=t.next,i===t?e.pending=null:(i=i.next,t.next=i,ed(e,i)))}function Rc(e,t,i){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do t.status="rejected",t.reason=i,id(t),t=t.next;while(t!==a)}e.action=null}function id(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function rd(e,t){return t}function sd(e,t){if(Ye){var i=lt.formState;if(i!==null){e:{var a=Ne;if(Ye){if(ut){t:{for(var g=ut,w=Un;g.nodeType!==8;){if(!w){g=null;break t}if(g=Fn(g.nextSibling),g===null){g=null;break t}}w=g.data,g=w==="F!"||w==="F"?g:null}if(g){ut=Fn(g.nextSibling),a=g.data==="F!";break e}}$i(a)}a=!1}a&&(t=i[0])}}return i=rn(),i.memoizedState=i.baseState=t,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:rd,lastRenderedState:t},i.queue=a,i=xd.bind(null,Ne,a),a.dispatch=i,a=Tc(!1),w=jc.bind(null,Ne,!1,a.queue),a=rn(),g={state:t,dispatch:null,action:e,pending:null},a.queue=g,i=yy.bind(null,Ne,g,w,i),g.dispatch=i,a.memoizedState=e,[t,i,!1]}function ad(e){var t=wt();return ld(t,rt,e)}function ld(e,t,i){if(t=kc(e,t,rd)[0],e=Ll(ki)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var a=fa(t)}catch(B){throw B===us?Cl:B}else a=t;t=wt();var g=t.queue,w=g.dispatch;return i!==t.memoizedState&&(Ne.flags|=2048,ms(9,{destroy:void 0},Sy.bind(null,g,i),null)),[a,w,e]}function Sy(e,t){e.action=t}function od(e){var t=wt(),i=rt;if(i!==null)return ld(t,i,e);wt(),t=t.memoizedState,i=wt();var a=i.queue.dispatch;return i.memoizedState=e,[t,a,!1]}function ms(e,t,i,a){return e={tag:e,create:i,deps:a,inst:t,next:null},t=Ne.updateQueue,t===null&&(t=Dl(),Ne.updateQueue=t),i=t.lastEffect,i===null?t.lastEffect=e.next=e:(a=i.next,i.next=e,e.next=a,t.lastEffect=e),e}function cd(){return wt().memoizedState}function Ol(e,t,i,a){var g=rn();Ne.flags|=e,g.memoizedState=ms(1|t,{destroy:void 0},i,a===void 0?null:a)}function Bl(e,t,i,a){var g=wt();a=a===void 0?null:a;var w=g.memoizedState.inst;rt!==null&&a!==null&&Sc(a,rt.memoizedState.deps)?g.memoizedState=ms(t,w,i,a):(Ne.flags|=e,g.memoizedState=ms(1|t,w,i,a))}function ud(e,t){Ol(8390656,8,e,t)}function Dc(e,t){Bl(2048,8,e,t)}function by(e){Ne.flags|=4;var t=Ne.updateQueue;if(t===null)t=Dl(),Ne.updateQueue=t,t.events=[e];else{var i=t.events;i===null?t.events=[e]:i.push(e)}}function hd(e){var t=wt().memoizedState;return by({ref:t,nextImpl:e}),function(){if((et&2)!==0)throw Error(l(440));return t.impl.apply(void 0,arguments)}}function fd(e,t){return Bl(4,2,e,t)}function dd(e,t){return Bl(4,4,e,t)}function pd(e,t){if(typeof t=="function"){e=e();var i=t(e);return function(){typeof i=="function"?i():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function md(e,t,i){i=i!=null?i.concat([e]):null,Bl(4,4,pd.bind(null,t,e),i)}function Mc(){}function gd(e,t){var i=wt();t=t===void 0?null:t;var a=i.memoizedState;return t!==null&&Sc(t,a[1])?a[0]:(i.memoizedState=[e,t],e)}function _d(e,t){var i=wt();t=t===void 0?null:t;var a=i.memoizedState;if(t!==null&&Sc(t,a[1]))return a[0];if(a=e(),Mr){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[a,t],a}function Lc(e,t,i){return i===void 0||(Ei&1073741824)!==0&&(We&261930)===0?e.memoizedState=t:(e.memoizedState=i,e=vp(),Ne.lanes|=e,Zi|=e,i)}function vd(e,t,i,a){return En(i,t)?i:fs.current!==null?(e=Lc(e,i,a),En(e,t)||(Rt=!0),e):(Ei&42)===0||(Ei&1073741824)!==0&&(We&261930)===0?(Rt=!0,e.memoizedState=i):(e=vp(),Ne.lanes|=e,Zi|=e,t)}function yd(e,t,i,a,g){var w=W.p;W.p=w!==0&&8>w?w:8;var B=G.T,P={};G.T=P,jc(e,!1,t,i);try{var X=g(),oe=G.S;if(oe!==null&&oe(P,X),X!==null&&typeof X=="object"&&typeof X.then=="function"){var fe=gy(X,a);da(e,t,fe,Mn(e))}else da(e,t,a,Mn(e))}catch(_e){da(e,t,{then:function(){},status:"rejected",reason:_e},Mn())}finally{W.p=w,B!==null&&P.types!==null&&(B.types=P.types),G.T=B}}function Cy(){}function Oc(e,t,i,a){if(e.tag!==5)throw Error(l(476));var g=Sd(e).queue;yd(e,g,t,Z,i===null?Cy:function(){return bd(e),i(a)})}function Sd(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Z,baseState:Z,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:Z},next:null};var i={};return t.next={memoizedState:i,baseState:i,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:ki,lastRenderedState:i},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function bd(e){var t=Sd(e);t.next===null&&(t=e.alternate.memoizedState),da(e,t.next.queue,{},Mn())}function Bc(){return qt(Da)}function Cd(){return wt().memoizedState}function wd(){return wt().memoizedState}function wy(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var i=Mn();e=Wi(i);var a=Ki(t,e,i);a!==null&&(yn(a,t,i),oa(a,t,i)),t={cache:cc()},e.payload=t;return}t=t.return}}function xy(e,t,i){var a=Mn();i={lane:a,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null},jl(e)?Ed(t,i):(i=Jo(e,t,i,a),i!==null&&(yn(i,e,a),kd(i,t,a)))}function xd(e,t,i){var a=Mn();da(e,t,i,a)}function da(e,t,i,a){var g={lane:a,revertLane:0,gesture:null,action:i,hasEagerState:!1,eagerState:null,next:null};if(jl(e))Ed(t,g);else{var w=e.alternate;if(e.lanes===0&&(w===null||w.lanes===0)&&(w=t.lastRenderedReducer,w!==null))try{var B=t.lastRenderedState,P=w(B,i);if(g.hasEagerState=!0,g.eagerState=P,En(P,B))return ml(e,t,g,0),lt===null&&pl(),!1}catch{}finally{}if(i=Jo(e,t,g,a),i!==null)return yn(i,e,a),kd(i,t,a),!0}return!1}function jc(e,t,i,a){if(a={lane:2,revertLane:du(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},jl(e)){if(t)throw Error(l(479))}else t=Jo(e,i,a,2),t!==null&&yn(t,e,2)}function jl(e){var t=e.alternate;return e===Ne||t!==null&&t===Ne}function Ed(e,t){ds=Tl=!0;var i=e.pending;i===null?t.next=t:(t.next=i.next,i.next=t),e.pending=t}function kd(e,t,i){if((i&4194048)!==0){var a=t.lanes;a&=e.pendingLanes,i|=a,t.lanes=i,di(e,i)}}var pa={readContext:qt,use:Ml,useCallback:_t,useContext:_t,useEffect:_t,useImperativeHandle:_t,useLayoutEffect:_t,useInsertionEffect:_t,useMemo:_t,useReducer:_t,useRef:_t,useState:_t,useDebugValue:_t,useDeferredValue:_t,useTransition:_t,useSyncExternalStore:_t,useId:_t,useHostTransitionStatus:_t,useFormState:_t,useActionState:_t,useOptimistic:_t,useMemoCache:_t,useCacheRefresh:_t};pa.useEffectEvent=_t;var Ad={readContext:qt,use:Ml,useCallback:function(e,t){return rn().memoizedState=[e,t===void 0?null:t],e},useContext:qt,useEffect:ud,useImperativeHandle:function(e,t,i){i=i!=null?i.concat([e]):null,Ol(4194308,4,pd.bind(null,t,e),i)},useLayoutEffect:function(e,t){return Ol(4194308,4,e,t)},useInsertionEffect:function(e,t){Ol(4,2,e,t)},useMemo:function(e,t){var i=rn();t=t===void 0?null:t;var a=e();if(Mr){Ot(!0);try{e()}finally{Ot(!1)}}return i.memoizedState=[a,t],a},useReducer:function(e,t,i){var a=rn();if(i!==void 0){var g=i(t);if(Mr){Ot(!0);try{i(t)}finally{Ot(!1)}}}else g=t;return a.memoizedState=a.baseState=g,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:g},a.queue=e,e=e.dispatch=xy.bind(null,Ne,e),[a.memoizedState,e]},useRef:function(e){var t=rn();return e={current:e},t.memoizedState=e},useState:function(e){e=Tc(e);var t=e.queue,i=xd.bind(null,Ne,t);return t.dispatch=i,[e.memoizedState,i]},useDebugValue:Mc,useDeferredValue:function(e,t){var i=rn();return Lc(i,e,t)},useTransition:function(){var e=Tc(!1);return e=yd.bind(null,Ne,e.queue,!0,!1),rn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,i){var a=Ne,g=rn();if(Ye){if(i===void 0)throw Error(l(407));i=i()}else{if(i=t(),lt===null)throw Error(l(349));(We&127)!==0||Kf(a,t,i)}g.memoizedState=i;var w={value:i,getSnapshot:t};return g.queue=w,ud(Xf.bind(null,a,w,e),[e]),a.flags|=2048,ms(9,{destroy:void 0},Yf.bind(null,a,w,i,t),null),i},useId:function(){var e=rn(),t=lt.identifierPrefix;if(Ye){var i=li,a=ai;i=(a&~(1<<32-Qe(a)-1)).toString(32)+i,t="_"+t+"R_"+i,i=Rl++,0<i&&(t+="H"+i.toString(32)),t+="_"}else i=_y++,t="_"+t+"r_"+i.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:Bc,useFormState:sd,useActionState:sd,useOptimistic:function(e){var t=rn();t.memoizedState=t.baseState=e;var i={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=i,t=jc.bind(null,Ne,!0,i),i.dispatch=t,[e,t]},useMemoCache:Ec,useCacheRefresh:function(){return rn().memoizedState=wy.bind(null,Ne)},useEffectEvent:function(e){var t=rn(),i={impl:e};return t.memoizedState=i,function(){if((et&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}},Nc={readContext:qt,use:Ml,useCallback:gd,useContext:qt,useEffect:Dc,useImperativeHandle:md,useInsertionEffect:fd,useLayoutEffect:dd,useMemo:_d,useReducer:Ll,useRef:cd,useState:function(){return Ll(ki)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=wt();return vd(i,rt.memoizedState,e,t)},useTransition:function(){var e=Ll(ki)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:fa(e),t]},useSyncExternalStore:Wf,useId:Cd,useHostTransitionStatus:Bc,useFormState:ad,useActionState:ad,useOptimistic:function(e,t){var i=wt();return Zf(i,rt,e,t)},useMemoCache:Ec,useCacheRefresh:wd};Nc.useEffectEvent=hd;var Td={readContext:qt,use:Ml,useCallback:gd,useContext:qt,useEffect:Dc,useImperativeHandle:md,useInsertionEffect:fd,useLayoutEffect:dd,useMemo:_d,useReducer:Ac,useRef:cd,useState:function(){return Ac(ki)},useDebugValue:Mc,useDeferredValue:function(e,t){var i=wt();return rt===null?Lc(i,e,t):vd(i,rt.memoizedState,e,t)},useTransition:function(){var e=Ac(ki)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:fa(e),t]},useSyncExternalStore:Wf,useId:Cd,useHostTransitionStatus:Bc,useFormState:od,useActionState:od,useOptimistic:function(e,t){var i=wt();return rt!==null?Zf(i,rt,e,t):(i.baseState=e,[e,i.queue.dispatch])},useMemoCache:Ec,useCacheRefresh:wd};Td.useEffectEvent=hd;function Hc(e,t,i,a){t=e.memoizedState,i=i(a,t),i=i==null?t:u({},t,i),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}var zc={enqueueSetState:function(e,t,i){e=e._reactInternals;var a=Mn(),g=Wi(a);g.payload=t,i!=null&&(g.callback=i),t=Ki(e,g,a),t!==null&&(yn(t,e,a),oa(t,e,a))},enqueueReplaceState:function(e,t,i){e=e._reactInternals;var a=Mn(),g=Wi(a);g.tag=1,g.payload=t,i!=null&&(g.callback=i),t=Ki(e,g,a),t!==null&&(yn(t,e,a),oa(t,e,a))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var i=Mn(),a=Wi(i);a.tag=2,t!=null&&(a.callback=t),t=Ki(e,a,i),t!==null&&(yn(t,e,i),oa(t,e,i))}};function Rd(e,t,i,a,g,w,B){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,w,B):t.prototype&&t.prototype.isPureReactComponent?!ea(i,a)||!ea(g,w):!0}function Dd(e,t,i,a){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(i,a),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(i,a),t.state!==e&&zc.enqueueReplaceState(t,t.state,null)}function Lr(e,t){var i=t;if("ref"in t){i={};for(var a in t)a!=="ref"&&(i[a]=t[a])}if(e=e.defaultProps){i===t&&(i=u({},i));for(var g in e)i[g]===void 0&&(i[g]=e[g])}return i}function Md(e){dl(e)}function Ld(e){console.error(e)}function Od(e){dl(e)}function Nl(e,t){try{var i=e.onUncaughtError;i(t.value,{componentStack:t.stack})}catch(a){setTimeout(function(){throw a})}}function Bd(e,t,i){try{var a=e.onCaughtError;a(i.value,{componentStack:i.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(g){setTimeout(function(){throw g})}}function Ic(e,t,i){return i=Wi(i),i.tag=3,i.payload={element:null},i.callback=function(){Nl(e,t)},i}function jd(e){return e=Wi(e),e.tag=3,e}function Nd(e,t,i,a){var g=i.type.getDerivedStateFromError;if(typeof g=="function"){var w=a.value;e.payload=function(){return g(w)},e.callback=function(){Bd(t,i,a)}}var B=i.stateNode;B!==null&&typeof B.componentDidCatch=="function"&&(e.callback=function(){Bd(t,i,a),typeof g!="function"&&(er===null?er=new Set([this]):er.add(this));var P=a.stack;this.componentDidCatch(a.value,{componentStack:P!==null?P:""})})}function Ey(e,t,i,a,g){if(i.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(t=i.alternate,t!==null&&ls(t,i,g,!0),i=An.current,i!==null){switch(i.tag){case 31:case 13:return Pn===null?Kl():i.alternate===null&&vt===0&&(vt=3),i.flags&=-257,i.flags|=65536,i.lanes=g,a===wl?i.flags|=16384:(t=i.updateQueue,t===null?i.updateQueue=new Set([a]):t.add(a),uu(e,a,g)),!1;case 22:return i.flags|=65536,a===wl?i.flags|=16384:(t=i.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([a])},i.updateQueue=t):(i=t.retryQueue,i===null?t.retryQueue=new Set([a]):i.add(a)),uu(e,a,g)),!1}throw Error(l(435,i.tag))}return uu(e,a,g),Kl(),!1}if(Ye)return t=An.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=g,a!==rc&&(e=Error(l(422),{cause:a}),ia(Hn(e,i)))):(a!==rc&&(t=Error(l(423),{cause:a}),ia(Hn(t,i))),e=e.current.alternate,e.flags|=65536,g&=-g,e.lanes|=g,a=Hn(a,i),g=Ic(e.stateNode,a,g),mc(e,g),vt!==4&&(vt=2)),!1;var w=Error(l(520),{cause:a});if(w=Hn(w,i),Ca===null?Ca=[w]:Ca.push(w),vt!==4&&(vt=2),t===null)return!0;a=Hn(a,i),i=t;do{switch(i.tag){case 3:return i.flags|=65536,e=g&-g,i.lanes|=e,e=Ic(i.stateNode,a,e),mc(i,e),!1;case 1:if(t=i.type,w=i.stateNode,(i.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||w!==null&&typeof w.componentDidCatch=="function"&&(er===null||!er.has(w))))return i.flags|=65536,g&=-g,i.lanes|=g,g=jd(g),Nd(g,e,i,a),mc(i,g),!1}i=i.return}while(i!==null);return!1}var Uc=Error(l(461)),Rt=!1;function $t(e,t,i,a){t.child=e===null?Uf(t,null,i,a):Dr(t,e.child,i,a)}function Hd(e,t,i,a,g){i=i.render;var w=t.ref;if("ref"in a){var B={};for(var P in a)P!=="ref"&&(B[P]=a[P])}else B=a;return kr(t),a=bc(e,t,i,B,w,g),P=Cc(),e!==null&&!Rt?(wc(e,t,g),Ai(e,t,g)):(Ye&&P&&nc(t),t.flags|=1,$t(e,t,a,g),t.child)}function zd(e,t,i,a,g){if(e===null){var w=i.type;return typeof w=="function"&&!Zo(w)&&w.defaultProps===void 0&&i.compare===null?(t.tag=15,t.type=w,Id(e,t,w,a,g)):(e=_l(i.type,null,a,t,t.mode,g),e.ref=t.ref,e.return=t,t.child=e)}if(w=e.child,!Kc(e,g)){var B=w.memoizedProps;if(i=i.compare,i=i!==null?i:ea,i(B,a)&&e.ref===t.ref)return Ai(e,t,g)}return t.flags|=1,e=bi(w,a),e.ref=t.ref,e.return=t,t.child=e}function Id(e,t,i,a,g){if(e!==null){var w=e.memoizedProps;if(ea(w,a)&&e.ref===t.ref)if(Rt=!1,t.pendingProps=a=w,Kc(e,g))(e.flags&131072)!==0&&(Rt=!0);else return t.lanes=e.lanes,Ai(e,t,g)}return Pc(e,t,i,a,g)}function Ud(e,t,i,a){var g=a.children,w=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((t.flags&128)!==0){if(w=w!==null?w.baseLanes|i:i,e!==null){for(a=t.child=e.child,g=0;a!==null;)g=g|a.lanes|a.childLanes,a=a.sibling;a=g&~w}else a=0,t.child=null;return Pd(e,t,w,i,a)}if((i&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&bl(t,w!==null?w.cachePool:null),w!==null?qf(t,w):_c(),$f(t);else return a=t.lanes=536870912,Pd(e,t,w!==null?w.baseLanes|i:i,i,a)}else w!==null?(bl(t,w.cachePool),qf(t,w),Xi(),t.memoizedState=null):(e!==null&&bl(t,null),_c(),Xi());return $t(e,t,g,i),t.child}function ma(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function Pd(e,t,i,a,g){var w=hc();return w=w===null?null:{parent:At._currentValue,pool:w},t.memoizedState={baseLanes:i,cachePool:w},e!==null&&bl(t,null),_c(),$f(t),e!==null&&ls(e,t,a,!0),t.childLanes=g,null}function Hl(e,t){return t=Il({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function Fd(e,t,i){return Dr(t,e.child,null,i),e=Hl(t,t.pendingProps),e.flags|=2,Tn(t),t.memoizedState=null,e}function ky(e,t,i){var a=t.pendingProps,g=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Ye){if(a.mode==="hidden")return e=Hl(t,a),t.lanes=536870912,ma(null,e);if(yc(t),(e=ut)?(e=em(e,Un),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi!==null?{id:ai,overflow:li}:null,retryLane:536870912,hydrationErrors:null},i=Ef(e),i.return=t,t.child=i,Ft=t,ut=null)):e=null,e===null)throw $i(t);return t.lanes=536870912,null}return Hl(t,a)}var w=e.memoizedState;if(w!==null){var B=w.dehydrated;if(yc(t),g)if(t.flags&256)t.flags&=-257,t=Fd(e,t,i);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(l(558));else if(Rt||ls(e,t,i,!1),g=(i&e.childLanes)!==0,Rt||g){if(a=lt,a!==null&&(B=Pr(a,i),B!==0&&B!==w.retryLane))throw w.retryLane=B,Cr(e,B),yn(a,e,B),Uc;Kl(),t=Fd(e,t,i)}else e=w.treeContext,ut=Fn(B.nextSibling),Ft=t,Ye=!0,qi=null,Un=!1,e!==null&&Tf(t,e),t=Hl(t,a),t.flags|=4096;return t}return e=bi(e.child,{mode:a.mode,children:a.children}),e.ref=t.ref,t.child=e,e.return=t,e}function zl(e,t){var i=t.ref;if(i===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof i!="function"&&typeof i!="object")throw Error(l(284));(e===null||e.ref!==i)&&(t.flags|=4194816)}}function Pc(e,t,i,a,g){return kr(t),i=bc(e,t,i,a,void 0,g),a=Cc(),e!==null&&!Rt?(wc(e,t,g),Ai(e,t,g)):(Ye&&a&&nc(t),t.flags|=1,$t(e,t,i,g),t.child)}function qd(e,t,i,a,g,w){return kr(t),t.updateQueue=null,i=Vf(t,a,i,g),Gf(e),a=Cc(),e!==null&&!Rt?(wc(e,t,w),Ai(e,t,w)):(Ye&&a&&nc(t),t.flags|=1,$t(e,t,i,w),t.child)}function $d(e,t,i,a,g){if(kr(t),t.stateNode===null){var w=is,B=i.contextType;typeof B=="object"&&B!==null&&(w=qt(B)),w=new i(a,w),t.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,w.updater=zc,t.stateNode=w,w._reactInternals=t,w=t.stateNode,w.props=a,w.state=t.memoizedState,w.refs={},dc(t),B=i.contextType,w.context=typeof B=="object"&&B!==null?qt(B):is,w.state=t.memoizedState,B=i.getDerivedStateFromProps,typeof B=="function"&&(Hc(t,i,B,a),w.state=t.memoizedState),typeof i.getDerivedStateFromProps=="function"||typeof w.getSnapshotBeforeUpdate=="function"||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(B=w.state,typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount(),B!==w.state&&zc.enqueueReplaceState(w,w.state,null),ua(t,a,w,g),ca(),w.state=t.memoizedState),typeof w.componentDidMount=="function"&&(t.flags|=4194308),a=!0}else if(e===null){w=t.stateNode;var P=t.memoizedProps,X=Lr(i,P);w.props=X;var oe=w.context,fe=i.contextType;B=is,typeof fe=="object"&&fe!==null&&(B=qt(fe));var _e=i.getDerivedStateFromProps;fe=typeof _e=="function"||typeof w.getSnapshotBeforeUpdate=="function",P=t.pendingProps!==P,fe||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(P||oe!==B)&&Dd(t,w,a,B),Vi=!1;var ce=t.memoizedState;w.state=ce,ua(t,a,w,g),ca(),oe=t.memoizedState,P||ce!==oe||Vi?(typeof _e=="function"&&(Hc(t,i,_e,a),oe=t.memoizedState),(X=Vi||Rd(t,i,X,a,ce,oe,B))?(fe||typeof w.UNSAFE_componentWillMount!="function"&&typeof w.componentWillMount!="function"||(typeof w.componentWillMount=="function"&&w.componentWillMount(),typeof w.UNSAFE_componentWillMount=="function"&&w.UNSAFE_componentWillMount()),typeof w.componentDidMount=="function"&&(t.flags|=4194308)):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=a,t.memoizedState=oe),w.props=a,w.state=oe,w.context=B,a=X):(typeof w.componentDidMount=="function"&&(t.flags|=4194308),a=!1)}else{w=t.stateNode,pc(e,t),B=t.memoizedProps,fe=Lr(i,B),w.props=fe,_e=t.pendingProps,ce=w.context,oe=i.contextType,X=is,typeof oe=="object"&&oe!==null&&(X=qt(oe)),P=i.getDerivedStateFromProps,(oe=typeof P=="function"||typeof w.getSnapshotBeforeUpdate=="function")||typeof w.UNSAFE_componentWillReceiveProps!="function"&&typeof w.componentWillReceiveProps!="function"||(B!==_e||ce!==X)&&Dd(t,w,a,X),Vi=!1,ce=t.memoizedState,w.state=ce,ua(t,a,w,g),ca();var ue=t.memoizedState;B!==_e||ce!==ue||Vi||e!==null&&e.dependencies!==null&&yl(e.dependencies)?(typeof P=="function"&&(Hc(t,i,P,a),ue=t.memoizedState),(fe=Vi||Rd(t,i,fe,a,ce,ue,X)||e!==null&&e.dependencies!==null&&yl(e.dependencies))?(oe||typeof w.UNSAFE_componentWillUpdate!="function"&&typeof w.componentWillUpdate!="function"||(typeof w.componentWillUpdate=="function"&&w.componentWillUpdate(a,ue,X),typeof w.UNSAFE_componentWillUpdate=="function"&&w.UNSAFE_componentWillUpdate(a,ue,X)),typeof w.componentDidUpdate=="function"&&(t.flags|=4),typeof w.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof w.componentDidUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=1024),t.memoizedProps=a,t.memoizedState=ue),w.props=a,w.state=ue,w.context=X,a=fe):(typeof w.componentDidUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=4),typeof w.getSnapshotBeforeUpdate!="function"||B===e.memoizedProps&&ce===e.memoizedState||(t.flags|=1024),a=!1)}return w=a,zl(e,t),a=(t.flags&128)!==0,w||a?(w=t.stateNode,i=a&&typeof i.getDerivedStateFromError!="function"?null:w.render(),t.flags|=1,e!==null&&a?(t.child=Dr(t,e.child,null,g),t.child=Dr(t,null,i,g)):$t(e,t,i,g),t.memoizedState=w.state,e=t.child):e=Ai(e,t,g),e}function Gd(e,t,i,a){return xr(),t.flags|=256,$t(e,t,i,a),t.child}var Fc={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function qc(e){return{baseLanes:e,cachePool:Bf()}}function $c(e,t,i){return e=e!==null?e.childLanes&~i:0,t&&(e|=Dn),e}function Vd(e,t,i){var a=t.pendingProps,g=!1,w=(t.flags&128)!==0,B;if((B=w)||(B=e!==null&&e.memoizedState===null?!1:(Ct.current&2)!==0),B&&(g=!0,t.flags&=-129),B=(t.flags&32)!==0,t.flags&=-33,e===null){if(Ye){if(g?Yi(t):Xi(),(e=ut)?(e=em(e,Un),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:Fi!==null?{id:ai,overflow:li}:null,retryLane:536870912,hydrationErrors:null},i=Ef(e),i.return=t,t.child=i,Ft=t,ut=null)):e=null,e===null)throw $i(t);return ku(e)?t.lanes=32:t.lanes=536870912,null}var P=a.children;return a=a.fallback,g?(Xi(),g=t.mode,P=Il({mode:"hidden",children:P},g),a=wr(a,g,i,null),P.return=t,a.return=t,P.sibling=a,t.child=P,a=t.child,a.memoizedState=qc(i),a.childLanes=$c(e,B,i),t.memoizedState=Fc,ma(null,a)):(Yi(t),Gc(t,P))}var X=e.memoizedState;if(X!==null&&(P=X.dehydrated,P!==null)){if(w)t.flags&256?(Yi(t),t.flags&=-257,t=Vc(e,t,i)):t.memoizedState!==null?(Xi(),t.child=e.child,t.flags|=128,t=null):(Xi(),P=a.fallback,g=t.mode,a=Il({mode:"visible",children:a.children},g),P=wr(P,g,i,null),P.flags|=2,a.return=t,P.return=t,a.sibling=P,t.child=a,Dr(t,e.child,null,i),a=t.child,a.memoizedState=qc(i),a.childLanes=$c(e,B,i),t.memoizedState=Fc,t=ma(null,a));else if(Yi(t),ku(P)){if(B=P.nextSibling&&P.nextSibling.dataset,B)var oe=B.dgst;B=oe,a=Error(l(419)),a.stack="",a.digest=B,ia({value:a,source:null,stack:null}),t=Vc(e,t,i)}else if(Rt||ls(e,t,i,!1),B=(i&e.childLanes)!==0,Rt||B){if(B=lt,B!==null&&(a=Pr(B,i),a!==0&&a!==X.retryLane))throw X.retryLane=a,Cr(e,a),yn(B,e,a),Uc;Eu(P)||Kl(),t=Vc(e,t,i)}else Eu(P)?(t.flags|=192,t.child=e.child,t=null):(e=X.treeContext,ut=Fn(P.nextSibling),Ft=t,Ye=!0,qi=null,Un=!1,e!==null&&Tf(t,e),t=Gc(t,a.children),t.flags|=4096);return t}return g?(Xi(),P=a.fallback,g=t.mode,X=e.child,oe=X.sibling,a=bi(X,{mode:"hidden",children:a.children}),a.subtreeFlags=X.subtreeFlags&65011712,oe!==null?P=bi(oe,P):(P=wr(P,g,i,null),P.flags|=2),P.return=t,a.return=t,a.sibling=P,t.child=a,ma(null,a),a=t.child,P=e.child.memoizedState,P===null?P=qc(i):(g=P.cachePool,g!==null?(X=At._currentValue,g=g.parent!==X?{parent:X,pool:X}:g):g=Bf(),P={baseLanes:P.baseLanes|i,cachePool:g}),a.memoizedState=P,a.childLanes=$c(e,B,i),t.memoizedState=Fc,ma(e.child,a)):(Yi(t),i=e.child,e=i.sibling,i=bi(i,{mode:"visible",children:a.children}),i.return=t,i.sibling=null,e!==null&&(B=t.deletions,B===null?(t.deletions=[e],t.flags|=16):B.push(e)),t.child=i,t.memoizedState=null,i)}function Gc(e,t){return t=Il({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function Il(e,t){return e=kn(22,e,null,t),e.lanes=0,e}function Vc(e,t,i){return Dr(t,e.child,null,i),e=Gc(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Wd(e,t,i){e.lanes|=t;var a=e.alternate;a!==null&&(a.lanes|=t),lc(e.return,t,i)}function Wc(e,t,i,a,g,w){var B=e.memoizedState;B===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:a,tail:i,tailMode:g,treeForkCount:w}:(B.isBackwards=t,B.rendering=null,B.renderingStartTime=0,B.last=a,B.tail=i,B.tailMode=g,B.treeForkCount=w)}function Kd(e,t,i){var a=t.pendingProps,g=a.revealOrder,w=a.tail;a=a.children;var B=Ct.current,P=(B&2)!==0;if(P?(B=B&1|2,t.flags|=128):B&=1,I(Ct,B),$t(e,t,a,i),a=Ye?na:0,!P&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Wd(e,i,t);else if(e.tag===19)Wd(e,i,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(g){case"forwards":for(i=t.child,g=null;i!==null;)e=i.alternate,e!==null&&Al(e)===null&&(g=i),i=i.sibling;i=g,i===null?(g=t.child,t.child=null):(g=i.sibling,i.sibling=null),Wc(t,!1,g,i,w,a);break;case"backwards":case"unstable_legacy-backwards":for(i=null,g=t.child,t.child=null;g!==null;){if(e=g.alternate,e!==null&&Al(e)===null){t.child=g;break}e=g.sibling,g.sibling=i,i=g,g=e}Wc(t,!0,i,null,w,a);break;case"together":Wc(t,!1,null,null,void 0,a);break;default:t.memoizedState=null}return t.child}function Ai(e,t,i){if(e!==null&&(t.dependencies=e.dependencies),Zi|=t.lanes,(i&t.childLanes)===0)if(e!==null){if(ls(e,t,i,!1),(i&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(l(153));if(t.child!==null){for(e=t.child,i=bi(e,e.pendingProps),t.child=i,i.return=t;e.sibling!==null;)e=e.sibling,i=i.sibling=bi(e,e.pendingProps),i.return=t;i.sibling=null}return t.child}function Kc(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&yl(e)))}function Ay(e,t,i){switch(t.tag){case 3:q(t,t.stateNode.containerInfo),Gi(t,At,e.memoizedState.cache),xr();break;case 27:case 5:ae(t);break;case 4:q(t,t.stateNode.containerInfo);break;case 10:Gi(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,yc(t),null;break;case 13:var a=t.memoizedState;if(a!==null)return a.dehydrated!==null?(Yi(t),t.flags|=128,null):(i&t.child.childLanes)!==0?Vd(e,t,i):(Yi(t),e=Ai(e,t,i),e!==null?e.sibling:null);Yi(t);break;case 19:var g=(e.flags&128)!==0;if(a=(i&t.childLanes)!==0,a||(ls(e,t,i,!1),a=(i&t.childLanes)!==0),g){if(a)return Kd(e,t,i);t.flags|=128}if(g=t.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),I(Ct,Ct.current),a)break;return null;case 22:return t.lanes=0,Ud(e,t,i,t.pendingProps);case 24:Gi(t,At,e.memoizedState.cache)}return Ai(e,t,i)}function Yd(e,t,i){if(e!==null)if(e.memoizedProps!==t.pendingProps)Rt=!0;else{if(!Kc(e,i)&&(t.flags&128)===0)return Rt=!1,Ay(e,t,i);Rt=(e.flags&131072)!==0}else Rt=!1,Ye&&(t.flags&1048576)!==0&&Af(t,na,t.index);switch(t.lanes=0,t.tag){case 16:e:{var a=t.pendingProps;if(e=Tr(t.elementType),t.type=e,typeof e=="function")Zo(e)?(a=Lr(e,a),t.tag=1,t=$d(null,t,e,a,i)):(t.tag=0,t=Pc(null,t,e,a,i));else{if(e!=null){var g=e.$$typeof;if(g===A){t.tag=11,t=Hd(null,t,e,a,i);break e}else if(g===R){t.tag=14,t=zd(null,t,e,a,i);break e}}throw t=K(e)||e,Error(l(306,t,""))}}return t;case 0:return Pc(e,t,t.type,t.pendingProps,i);case 1:return a=t.type,g=Lr(a,t.pendingProps),$d(e,t,a,g,i);case 3:e:{if(q(t,t.stateNode.containerInfo),e===null)throw Error(l(387));a=t.pendingProps;var w=t.memoizedState;g=w.element,pc(e,t),ua(t,a,null,i);var B=t.memoizedState;if(a=B.cache,Gi(t,At,a),a!==w.cache&&oc(t,[At],i,!0),ca(),a=B.element,w.isDehydrated)if(w={element:a,isDehydrated:!1,cache:B.cache},t.updateQueue.baseState=w,t.memoizedState=w,t.flags&256){t=Gd(e,t,a,i);break e}else if(a!==g){g=Hn(Error(l(424)),t),ia(g),t=Gd(e,t,a,i);break e}else{switch(e=t.stateNode.containerInfo,e.nodeType){case 9:e=e.body;break;default:e=e.nodeName==="HTML"?e.ownerDocument.body:e}for(ut=Fn(e.firstChild),Ft=t,Ye=!0,qi=null,Un=!0,i=Uf(t,null,a,i),t.child=i;i;)i.flags=i.flags&-3|4096,i=i.sibling}else{if(xr(),a===g){t=Ai(e,t,i);break e}$t(e,t,a,i)}t=t.child}return t;case 26:return zl(e,t),e===null?(i=am(t.type,null,t.pendingProps,null))?t.memoizedState=i:Ye||(i=t.type,e=t.pendingProps,a=to(pe.current).createElement(i),a[kt]=t,a[Ut]=e,Gt(a,i,e),bt(a),t.stateNode=a):t.memoizedState=am(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ae(t),e===null&&Ye&&(a=t.stateNode=im(t.type,t.pendingProps,pe.current),Ft=t,Un=!0,g=ut,rr(t.type)?(Au=g,ut=Fn(a.firstChild)):ut=g),$t(e,t,t.pendingProps.children,i),zl(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Ye&&((g=a=ut)&&(a=i0(a,t.type,t.pendingProps,Un),a!==null?(t.stateNode=a,Ft=t,ut=Fn(a.firstChild),Un=!1,g=!0):g=!1),g||$i(t)),ae(t),g=t.type,w=t.pendingProps,B=e!==null?e.memoizedProps:null,a=w.children,Cu(g,w)?a=null:B!==null&&Cu(g,B)&&(t.flags|=32),t.memoizedState!==null&&(g=bc(e,t,vy,null,null,i),Da._currentValue=g),zl(e,t),$t(e,t,a,i),t.child;case 6:return e===null&&Ye&&((e=i=ut)&&(i=r0(i,t.pendingProps,Un),i!==null?(t.stateNode=i,Ft=t,ut=null,e=!0):e=!1),e||$i(t)),null;case 13:return Vd(e,t,i);case 4:return q(t,t.stateNode.containerInfo),a=t.pendingProps,e===null?t.child=Dr(t,null,a,i):$t(e,t,a,i),t.child;case 11:return Hd(e,t,t.type,t.pendingProps,i);case 7:return $t(e,t,t.pendingProps,i),t.child;case 8:return $t(e,t,t.pendingProps.children,i),t.child;case 12:return $t(e,t,t.pendingProps.children,i),t.child;case 10:return a=t.pendingProps,Gi(t,t.type,a.value),$t(e,t,a.children,i),t.child;case 9:return g=t.type._context,a=t.pendingProps.children,kr(t),g=qt(g),a=a(g),t.flags|=1,$t(e,t,a,i),t.child;case 14:return zd(e,t,t.type,t.pendingProps,i);case 15:return Id(e,t,t.type,t.pendingProps,i);case 19:return Kd(e,t,i);case 31:return ky(e,t,i);case 22:return Ud(e,t,i,t.pendingProps);case 24:return kr(t),a=qt(At),e===null?(g=hc(),g===null&&(g=lt,w=cc(),g.pooledCache=w,w.refCount++,w!==null&&(g.pooledCacheLanes|=i),g=w),t.memoizedState={parent:a,cache:g},dc(t),Gi(t,At,g)):((e.lanes&i)!==0&&(pc(e,t),ua(t,null,null,i),ca()),g=e.memoizedState,w=t.memoizedState,g.parent!==a?(g={parent:a,cache:a},t.memoizedState=g,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=g),Gi(t,At,a)):(a=w.cache,Gi(t,At,a),a!==g.cache&&oc(t,[At],i,!0))),$t(e,t,t.pendingProps.children,i),t.child;case 29:throw t.pendingProps}throw Error(l(156,t.tag))}function Ti(e){e.flags|=4}function Yc(e,t,i,a,g){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(g&335544128)===g)if(e.stateNode.complete)e.flags|=8192;else if(Cp())e.flags|=8192;else throw Rr=wl,fc}else e.flags&=-16777217}function Xd(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!hm(t))if(Cp())e.flags|=8192;else throw Rr=wl,fc}function Ul(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?Wt():536870912,e.lanes|=t,ys|=t)}function ga(e,t){if(!Ye)switch(e.tailMode){case"hidden":t=e.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e.tail=null:i.sibling=null;break;case"collapsed":i=e.tail;for(var a=null;i!==null;)i.alternate!==null&&(a=i),i=i.sibling;a===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,i=0,a=0;if(t)for(var g=e.child;g!==null;)i|=g.lanes|g.childLanes,a|=g.subtreeFlags&65011712,a|=g.flags&65011712,g.return=e,g=g.sibling;else for(g=e.child;g!==null;)i|=g.lanes|g.childLanes,a|=g.subtreeFlags,a|=g.flags,g.return=e,g=g.sibling;return e.subtreeFlags|=a,e.childLanes=i,t}function Ty(e,t,i){var a=t.pendingProps;switch(ic(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return i=t.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),xi(At),ee(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(e===null||e.child===null)&&(as(t)?Ti(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,sc())),ht(t),null;case 26:var g=t.type,w=t.memoizedState;return e===null?(Ti(t),w!==null?(ht(t),Xd(t,w)):(ht(t),Yc(t,g,null,a,i))):w?w!==e.memoizedState?(Ti(t),ht(t),Xd(t,w)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==a&&Ti(t),ht(t),Yc(t,g,e,a,i)),null;case 27:if(de(t),i=pe.current,g=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ti(t);else{if(!a){if(t.stateNode===null)throw Error(l(166));return ht(t),null}e=re.current,as(t)?Rf(t):(e=im(g,a,i),t.stateNode=e,Ti(t))}return ht(t),null;case 5:if(de(t),g=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==a&&Ti(t);else{if(!a){if(t.stateNode===null)throw Error(l(166));return ht(t),null}if(w=re.current,as(t))Rf(t);else{var B=to(pe.current);switch(w){case 1:w=B.createElementNS("http://www.w3.org/2000/svg",g);break;case 2:w=B.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;default:switch(g){case"svg":w=B.createElementNS("http://www.w3.org/2000/svg",g);break;case"math":w=B.createElementNS("http://www.w3.org/1998/Math/MathML",g);break;case"script":w=B.createElement("div"),w.innerHTML="<script><\/script>",w=w.removeChild(w.firstChild);break;case"select":w=typeof a.is=="string"?B.createElement("select",{is:a.is}):B.createElement("select"),a.multiple?w.multiple=!0:a.size&&(w.size=a.size);break;default:w=typeof a.is=="string"?B.createElement(g,{is:a.is}):B.createElement(g)}}w[kt]=t,w[Ut]=a;e:for(B=t.child;B!==null;){if(B.tag===5||B.tag===6)w.appendChild(B.stateNode);else if(B.tag!==4&&B.tag!==27&&B.child!==null){B.child.return=B,B=B.child;continue}if(B===t)break e;for(;B.sibling===null;){if(B.return===null||B.return===t)break e;B=B.return}B.sibling.return=B.return,B=B.sibling}t.stateNode=w;e:switch(Gt(w,g,a),g){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Ti(t)}}return ht(t),Yc(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,i),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==a&&Ti(t);else{if(typeof a!="string"&&t.stateNode===null)throw Error(l(166));if(e=pe.current,as(t)){if(e=t.stateNode,i=t.memoizedProps,a=null,g=Ft,g!==null)switch(g.tag){case 27:case 5:a=g.memoizedProps}e[kt]=t,e=!!(e.nodeValue===i||a!==null&&a.suppressHydrationWarning===!0||Vp(e.nodeValue,i)),e||$i(t,!0)}else e=to(e).createTextNode(a),e[kt]=t,t.stateNode=e}return ht(t),null;case 31:if(i=t.memoizedState,e===null||e.memoizedState!==null){if(a=as(t),i!==null){if(e===null){if(!a)throw Error(l(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[kt]=t}else xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else i=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),e=!0;if(!e)return t.flags&256?(Tn(t),t):(Tn(t),null);if((t.flags&128)!==0)throw Error(l(558))}return ht(t),null;case 13:if(a=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(g=as(t),a!==null&&a.dehydrated!==null){if(e===null){if(!g)throw Error(l(318));if(g=t.memoizedState,g=g!==null?g.dehydrated:null,!g)throw Error(l(317));g[kt]=t}else xr(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),g=!1}else g=sc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=g),g=!0;if(!g)return t.flags&256?(Tn(t),t):(Tn(t),null)}return Tn(t),(t.flags&128)!==0?(t.lanes=i,t):(i=a!==null,e=e!==null&&e.memoizedState!==null,i&&(a=t.child,g=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(g=a.alternate.memoizedState.cachePool.pool),w=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(w=a.memoizedState.cachePool.pool),w!==g&&(a.flags|=2048)),i!==e&&i&&(t.child.flags|=8192),Ul(t,t.updateQueue),ht(t),null);case 4:return ee(),e===null&&_u(t.stateNode.containerInfo),ht(t),null;case 10:return xi(t.type),ht(t),null;case 19:if($(Ct),a=t.memoizedState,a===null)return ht(t),null;if(g=(t.flags&128)!==0,w=a.rendering,w===null)if(g)ga(a,!1);else{if(vt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(w=Al(e),w!==null){for(t.flags|=128,ga(a,!1),e=w.updateQueue,t.updateQueue=e,Ul(t,e),t.subtreeFlags=0,e=i,i=t.child;i!==null;)xf(i,e),i=i.sibling;return I(Ct,Ct.current&1|2),Ye&&Ci(t,a.treeForkCount),t.child}e=e.sibling}a.tail!==null&&tt()>Gl&&(t.flags|=128,g=!0,ga(a,!1),t.lanes=4194304)}else{if(!g)if(e=Al(w),e!==null){if(t.flags|=128,g=!0,e=e.updateQueue,t.updateQueue=e,Ul(t,e),ga(a,!0),a.tail===null&&a.tailMode==="hidden"&&!w.alternate&&!Ye)return ht(t),null}else 2*tt()-a.renderingStartTime>Gl&&i!==536870912&&(t.flags|=128,g=!0,ga(a,!1),t.lanes=4194304);a.isBackwards?(w.sibling=t.child,t.child=w):(e=a.last,e!==null?e.sibling=w:t.child=w,a.last=w)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=tt(),e.sibling=null,i=Ct.current,I(Ct,g?i&1|2:i&1),Ye&&Ci(t,a.treeForkCount),e):(ht(t),null);case 22:case 23:return Tn(t),vc(),a=t.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(t.flags|=8192):a&&(t.flags|=8192),a?(i&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),i=t.updateQueue,i!==null&&Ul(t,i.retryQueue),i=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),a=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(a=t.memoizedState.cachePool.pool),a!==i&&(t.flags|=2048),e!==null&&$(Ar),null;case 24:return i=null,e!==null&&(i=e.memoizedState.cache),t.memoizedState.cache!==i&&(t.flags|=2048),xi(At),ht(t),null;case 25:return null;case 30:return null}throw Error(l(156,t.tag))}function Ry(e,t){switch(ic(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xi(At),ee(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return de(t),null;case 31:if(t.memoizedState!==null){if(Tn(t),t.alternate===null)throw Error(l(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Tn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(l(340));xr()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return $(Ct),null;case 4:return ee(),null;case 10:return xi(t.type),null;case 22:case 23:return Tn(t),vc(),e!==null&&$(Ar),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xi(At),null;case 25:return null;default:return null}}function Qd(e,t){switch(ic(t),t.tag){case 3:xi(At),ee();break;case 26:case 27:case 5:de(t);break;case 4:ee();break;case 31:t.memoizedState!==null&&Tn(t);break;case 13:Tn(t);break;case 19:$(Ct);break;case 10:xi(t.type);break;case 22:case 23:Tn(t),vc(),e!==null&&$(Ar);break;case 24:xi(At)}}function _a(e,t){try{var i=t.updateQueue,a=i!==null?i.lastEffect:null;if(a!==null){var g=a.next;i=g;do{if((i.tag&e)===e){a=void 0;var w=i.create,B=i.inst;a=w(),B.destroy=a}i=i.next}while(i!==g)}}catch(P){it(t,t.return,P)}}function Qi(e,t,i){try{var a=t.updateQueue,g=a!==null?a.lastEffect:null;if(g!==null){var w=g.next;a=w;do{if((a.tag&e)===e){var B=a.inst,P=B.destroy;if(P!==void 0){B.destroy=void 0,g=t;var X=i,oe=P;try{oe()}catch(fe){it(g,X,fe)}}}a=a.next}while(a!==w)}}catch(fe){it(t,t.return,fe)}}function Jd(e){var t=e.updateQueue;if(t!==null){var i=e.stateNode;try{Ff(t,i)}catch(a){it(e,e.return,a)}}}function Zd(e,t,i){i.props=Lr(e.type,e.memoizedProps),i.state=e.memoizedState;try{i.componentWillUnmount()}catch(a){it(e,t,a)}}function va(e,t){try{var i=e.ref;if(i!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}typeof i=="function"?e.refCleanup=i(a):i.current=a}}catch(g){it(e,t,g)}}function oi(e,t){var i=e.ref,a=e.refCleanup;if(i!==null)if(typeof a=="function")try{a()}catch(g){it(e,t,g)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof i=="function")try{i(null)}catch(g){it(e,t,g)}else i.current=null}function ep(e){var t=e.type,i=e.memoizedProps,a=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":i.autoFocus&&a.focus();break e;case"img":i.src?a.src=i.src:i.srcSet&&(a.srcset=i.srcSet)}}catch(g){it(e,e.return,g)}}function Xc(e,t,i){try{var a=e.stateNode;Qy(a,e.type,i,t),a[Ut]=t}catch(g){it(e,e.return,g)}}function tp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&rr(e.type)||e.tag===4}function Qc(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||tp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&rr(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Jc(e,t,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?(i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i).insertBefore(e,t):(t=i.nodeType===9?i.body:i.nodeName==="HTML"?i.ownerDocument.body:i,t.appendChild(e),i=i._reactRootContainer,i!=null||t.onclick!==null||(t.onclick=Kt));else if(a!==4&&(a===27&&rr(e.type)&&(i=e.stateNode,t=null),e=e.child,e!==null))for(Jc(e,t,i),e=e.sibling;e!==null;)Jc(e,t,i),e=e.sibling}function Pl(e,t,i){var a=e.tag;if(a===5||a===6)e=e.stateNode,t?i.insertBefore(e,t):i.appendChild(e);else if(a!==4&&(a===27&&rr(e.type)&&(i=e.stateNode),e=e.child,e!==null))for(Pl(e,t,i),e=e.sibling;e!==null;)Pl(e,t,i),e=e.sibling}function np(e){var t=e.stateNode,i=e.memoizedProps;try{for(var a=e.type,g=t.attributes;g.length;)t.removeAttributeNode(g[0]);Gt(t,a,i),t[kt]=e,t[Ut]=i}catch(w){it(e,e.return,w)}}var Ri=!1,Dt=!1,Zc=!1,ip=typeof WeakSet=="function"?WeakSet:Set,Ht=null;function Dy(e,t){if(e=e.containerInfo,Su=oo,e=mf(e),Vo(e)){if("selectionStart"in e)var i={start:e.selectionStart,end:e.selectionEnd};else e:{i=(i=e.ownerDocument)&&i.defaultView||window;var a=i.getSelection&&i.getSelection();if(a&&a.rangeCount!==0){i=a.anchorNode;var g=a.anchorOffset,w=a.focusNode;a=a.focusOffset;try{i.nodeType,w.nodeType}catch{i=null;break e}var B=0,P=-1,X=-1,oe=0,fe=0,_e=e,ce=null;t:for(;;){for(var ue;_e!==i||g!==0&&_e.nodeType!==3||(P=B+g),_e!==w||a!==0&&_e.nodeType!==3||(X=B+a),_e.nodeType===3&&(B+=_e.nodeValue.length),(ue=_e.firstChild)!==null;)ce=_e,_e=ue;for(;;){if(_e===e)break t;if(ce===i&&++oe===g&&(P=B),ce===w&&++fe===a&&(X=B),(ue=_e.nextSibling)!==null)break;_e=ce,ce=_e.parentNode}_e=ue}i=P===-1||X===-1?null:{start:P,end:X}}else i=null}i=i||{start:0,end:0}}else i=null;for(bu={focusedElem:e,selectionRange:i},oo=!1,Ht=t;Ht!==null;)if(t=Ht,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ht=e;else for(;Ht!==null;){switch(t=Ht,w=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(i=0;i<e.length;i++)g=e[i],g.ref.impl=g.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&w!==null){e=void 0,i=t,g=w.memoizedProps,w=w.memoizedState,a=i.stateNode;try{var Ee=Lr(i.type,g);e=a.getSnapshotBeforeUpdate(Ee,w),a.__reactInternalSnapshotBeforeUpdate=e}catch(Le){it(i,i.return,Le)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,i=e.nodeType,i===9)xu(e);else if(i===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":xu(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=t.sibling,e!==null){e.return=t.return,Ht=e;break}Ht=t.return}}function rp(e,t,i){var a=i.flags;switch(i.tag){case 0:case 11:case 15:Mi(e,i),a&4&&_a(5,i);break;case 1:if(Mi(e,i),a&4)if(e=i.stateNode,t===null)try{e.componentDidMount()}catch(B){it(i,i.return,B)}else{var g=Lr(i.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(g,t,e.__reactInternalSnapshotBeforeUpdate)}catch(B){it(i,i.return,B)}}a&64&&Jd(i),a&512&&va(i,i.return);break;case 3:if(Mi(e,i),a&64&&(e=i.updateQueue,e!==null)){if(t=null,i.child!==null)switch(i.child.tag){case 27:case 5:t=i.child.stateNode;break;case 1:t=i.child.stateNode}try{Ff(e,t)}catch(B){it(i,i.return,B)}}break;case 27:t===null&&a&4&&np(i);case 26:case 5:Mi(e,i),t===null&&a&4&&ep(i),a&512&&va(i,i.return);break;case 12:Mi(e,i);break;case 31:Mi(e,i),a&4&&lp(e,i);break;case 13:Mi(e,i),a&4&&op(e,i),a&64&&(e=i.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(i=Iy.bind(null,i),s0(e,i))));break;case 22:if(a=i.memoizedState!==null||Ri,!a){t=t!==null&&t.memoizedState!==null||Dt,g=Ri;var w=Dt;Ri=a,(Dt=t)&&!w?Li(e,i,(i.subtreeFlags&8772)!==0):Mi(e,i),Ri=g,Dt=w}break;case 30:break;default:Mi(e,i)}}function sp(e){var t=e.alternate;t!==null&&(e.alternate=null,sp(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&qr(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var dt=null,mn=!1;function Di(e,t,i){for(i=i.child;i!==null;)ap(e,t,i),i=i.sibling}function ap(e,t,i){if(mt&&typeof mt.onCommitFiberUnmount=="function")try{mt.onCommitFiberUnmount(gt,i)}catch{}switch(i.tag){case 26:Dt||oi(i,t),Di(e,t,i),i.memoizedState?i.memoizedState.count--:i.stateNode&&(i=i.stateNode,i.parentNode.removeChild(i));break;case 27:Dt||oi(i,t);var a=dt,g=mn;rr(i.type)&&(dt=i.stateNode,mn=!1),Di(e,t,i),Aa(i.stateNode),dt=a,mn=g;break;case 5:Dt||oi(i,t);case 6:if(a=dt,g=mn,dt=null,Di(e,t,i),dt=a,mn=g,dt!==null)if(mn)try{(dt.nodeType===9?dt.body:dt.nodeName==="HTML"?dt.ownerDocument.body:dt).removeChild(i.stateNode)}catch(w){it(i,t,w)}else try{dt.removeChild(i.stateNode)}catch(w){it(i,t,w)}break;case 18:dt!==null&&(mn?(e=dt,Jp(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,i.stateNode),As(e)):Jp(dt,i.stateNode));break;case 4:a=dt,g=mn,dt=i.stateNode.containerInfo,mn=!0,Di(e,t,i),dt=a,mn=g;break;case 0:case 11:case 14:case 15:Qi(2,i,t),Dt||Qi(4,i,t),Di(e,t,i);break;case 1:Dt||(oi(i,t),a=i.stateNode,typeof a.componentWillUnmount=="function"&&Zd(i,t,a)),Di(e,t,i);break;case 21:Di(e,t,i);break;case 22:Dt=(a=Dt)||i.memoizedState!==null,Di(e,t,i),Dt=a;break;default:Di(e,t,i)}}function lp(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{As(e)}catch(i){it(t,t.return,i)}}}function op(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{As(e)}catch(i){it(t,t.return,i)}}function My(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new ip),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new ip),t;default:throw Error(l(435,e.tag))}}function Fl(e,t){var i=My(e);t.forEach(function(a){if(!i.has(a)){i.add(a);var g=Uy.bind(null,e,a);a.then(g,g)}})}function gn(e,t){var i=t.deletions;if(i!==null)for(var a=0;a<i.length;a++){var g=i[a],w=e,B=t,P=B;e:for(;P!==null;){switch(P.tag){case 27:if(rr(P.type)){dt=P.stateNode,mn=!1;break e}break;case 5:dt=P.stateNode,mn=!1;break e;case 3:case 4:dt=P.stateNode.containerInfo,mn=!0;break e}P=P.return}if(dt===null)throw Error(l(160));ap(w,B,g),dt=null,mn=!1,w=g.alternate,w!==null&&(w.return=null),g.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)cp(t,e),t=t.sibling}var ei=null;function cp(e,t){var i=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:gn(t,e),_n(e),a&4&&(Qi(3,e,e.return),_a(3,e),Qi(5,e,e.return));break;case 1:gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),a&64&&Ri&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(i=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=i===null?a:i.concat(a))));break;case 26:var g=ei;if(gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),a&4){var w=i!==null?i.memoizedState:null;if(a=e.memoizedState,i===null)if(a===null)if(e.stateNode===null){e:{a=e.type,i=e.memoizedProps,g=g.ownerDocument||g;t:switch(a){case"title":w=g.getElementsByTagName("title")[0],(!w||w[Bn]||w[kt]||w.namespaceURI==="http://www.w3.org/2000/svg"||w.hasAttribute("itemprop"))&&(w=g.createElement(a),g.head.insertBefore(w,g.querySelector("head > title"))),Gt(w,a,i),w[kt]=e,bt(w),a=w;break e;case"link":var B=cm("link","href",g).get(a+(i.href||""));if(B){for(var P=0;P<B.length;P++)if(w=B[P],w.getAttribute("href")===(i.href==null||i.href===""?null:i.href)&&w.getAttribute("rel")===(i.rel==null?null:i.rel)&&w.getAttribute("title")===(i.title==null?null:i.title)&&w.getAttribute("crossorigin")===(i.crossOrigin==null?null:i.crossOrigin)){B.splice(P,1);break t}}w=g.createElement(a),Gt(w,a,i),g.head.appendChild(w);break;case"meta":if(B=cm("meta","content",g).get(a+(i.content||""))){for(P=0;P<B.length;P++)if(w=B[P],w.getAttribute("content")===(i.content==null?null:""+i.content)&&w.getAttribute("name")===(i.name==null?null:i.name)&&w.getAttribute("property")===(i.property==null?null:i.property)&&w.getAttribute("http-equiv")===(i.httpEquiv==null?null:i.httpEquiv)&&w.getAttribute("charset")===(i.charSet==null?null:i.charSet)){B.splice(P,1);break t}}w=g.createElement(a),Gt(w,a,i),g.head.appendChild(w);break;default:throw Error(l(468,a))}w[kt]=e,bt(w),a=w}e.stateNode=a}else um(g,e.type,e.stateNode);else e.stateNode=om(g,a,e.memoizedProps);else w!==a?(w===null?i.stateNode!==null&&(i=i.stateNode,i.parentNode.removeChild(i)):w.count--,a===null?um(g,e.type,e.stateNode):om(g,a,e.memoizedProps)):a===null&&e.stateNode!==null&&Xc(e,e.memoizedProps,i.memoizedProps)}break;case 27:gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),i!==null&&a&4&&Xc(e,e.memoizedProps,i.memoizedProps);break;case 5:if(gn(t,e),_n(e),a&512&&(Dt||i===null||oi(i,i.return)),e.flags&32){g=e.stateNode;try{ri(g,"")}catch(Ee){it(e,e.return,Ee)}}a&4&&e.stateNode!=null&&(g=e.memoizedProps,Xc(e,g,i!==null?i.memoizedProps:g)),a&1024&&(Zc=!0);break;case 6:if(gn(t,e),_n(e),a&4){if(e.stateNode===null)throw Error(l(162));a=e.memoizedProps,i=e.stateNode;try{i.nodeValue=a}catch(Ee){it(e,e.return,Ee)}}break;case 3:if(ro=null,g=ei,ei=no(t.containerInfo),gn(t,e),ei=g,_n(e),a&4&&i!==null&&i.memoizedState.isDehydrated)try{As(t.containerInfo)}catch(Ee){it(e,e.return,Ee)}Zc&&(Zc=!1,up(e));break;case 4:a=ei,ei=no(e.stateNode.containerInfo),gn(t,e),_n(e),ei=a;break;case 12:gn(t,e),_n(e);break;case 31:gn(t,e),_n(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fl(e,a)));break;case 13:gn(t,e),_n(e),e.child.flags&8192&&e.memoizedState!==null!=(i!==null&&i.memoizedState!==null)&&($l=tt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fl(e,a)));break;case 22:g=e.memoizedState!==null;var X=i!==null&&i.memoizedState!==null,oe=Ri,fe=Dt;if(Ri=oe||g,Dt=fe||X,gn(t,e),Dt=fe,Ri=oe,_n(e),a&8192)e:for(t=e.stateNode,t._visibility=g?t._visibility&-2:t._visibility|1,g&&(i===null||X||Ri||Dt||Or(e)),i=null,t=e;;){if(t.tag===5||t.tag===26){if(i===null){X=i=t;try{if(w=X.stateNode,g)B=w.style,typeof B.setProperty=="function"?B.setProperty("display","none","important"):B.display="none";else{P=X.stateNode;var _e=X.memoizedProps.style,ce=_e!=null&&_e.hasOwnProperty("display")?_e.display:null;P.style.display=ce==null||typeof ce=="boolean"?"":(""+ce).trim()}}catch(Ee){it(X,X.return,Ee)}}}else if(t.tag===6){if(i===null){X=t;try{X.stateNode.nodeValue=g?"":X.memoizedProps}catch(Ee){it(X,X.return,Ee)}}}else if(t.tag===18){if(i===null){X=t;try{var ue=X.stateNode;g?Zp(ue,!0):Zp(X.stateNode,!1)}catch(Ee){it(X,X.return,Ee)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;i===t&&(i=null),t=t.return}i===t&&(i=null),t.sibling.return=t.return,t=t.sibling}a&4&&(a=e.updateQueue,a!==null&&(i=a.retryQueue,i!==null&&(a.retryQueue=null,Fl(e,i))));break;case 19:gn(t,e),_n(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Fl(e,a)));break;case 30:break;case 21:break;default:gn(t,e),_n(e)}}function _n(e){var t=e.flags;if(t&2){try{for(var i,a=e.return;a!==null;){if(tp(a)){i=a;break}a=a.return}if(i==null)throw Error(l(160));switch(i.tag){case 27:var g=i.stateNode,w=Qc(e);Pl(e,w,g);break;case 5:var B=i.stateNode;i.flags&32&&(ri(B,""),i.flags&=-33);var P=Qc(e);Pl(e,P,B);break;case 3:case 4:var X=i.stateNode.containerInfo,oe=Qc(e);Jc(e,oe,X);break;default:throw Error(l(161))}}catch(fe){it(e,e.return,fe)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function up(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;up(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Mi(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)rp(e,t.alternate,t),t=t.sibling}function Or(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:Qi(4,t,t.return),Or(t);break;case 1:oi(t,t.return);var i=t.stateNode;typeof i.componentWillUnmount=="function"&&Zd(t,t.return,i),Or(t);break;case 27:Aa(t.stateNode);case 26:case 5:oi(t,t.return),Or(t);break;case 22:t.memoizedState===null&&Or(t);break;case 30:Or(t);break;default:Or(t)}e=e.sibling}}function Li(e,t,i){for(i=i&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var a=t.alternate,g=e,w=t,B=w.flags;switch(w.tag){case 0:case 11:case 15:Li(g,w,i),_a(4,w);break;case 1:if(Li(g,w,i),a=w,g=a.stateNode,typeof g.componentDidMount=="function")try{g.componentDidMount()}catch(oe){it(a,a.return,oe)}if(a=w,g=a.updateQueue,g!==null){var P=a.stateNode;try{var X=g.shared.hiddenCallbacks;if(X!==null)for(g.shared.hiddenCallbacks=null,g=0;g<X.length;g++)Pf(X[g],P)}catch(oe){it(a,a.return,oe)}}i&&B&64&&Jd(w),va(w,w.return);break;case 27:np(w);case 26:case 5:Li(g,w,i),i&&a===null&&B&4&&ep(w),va(w,w.return);break;case 12:Li(g,w,i);break;case 31:Li(g,w,i),i&&B&4&&lp(g,w);break;case 13:Li(g,w,i),i&&B&4&&op(g,w);break;case 22:w.memoizedState===null&&Li(g,w,i),va(w,w.return);break;case 30:break;default:Li(g,w,i)}t=t.sibling}}function eu(e,t){var i=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(i=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==i&&(e!=null&&e.refCount++,i!=null&&ra(i))}function tu(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e))}function ti(e,t,i,a){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)hp(e,t,i,a),t=t.sibling}function hp(e,t,i,a){var g=t.flags;switch(t.tag){case 0:case 11:case 15:ti(e,t,i,a),g&2048&&_a(9,t);break;case 1:ti(e,t,i,a);break;case 3:ti(e,t,i,a),g&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&ra(e)));break;case 12:if(g&2048){ti(e,t,i,a),e=t.stateNode;try{var w=t.memoizedProps,B=w.id,P=w.onPostCommit;typeof P=="function"&&P(B,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(X){it(t,t.return,X)}}else ti(e,t,i,a);break;case 31:ti(e,t,i,a);break;case 13:ti(e,t,i,a);break;case 23:break;case 22:w=t.stateNode,B=t.alternate,t.memoizedState!==null?w._visibility&2?ti(e,t,i,a):ya(e,t):w._visibility&2?ti(e,t,i,a):(w._visibility|=2,gs(e,t,i,a,(t.subtreeFlags&10256)!==0||!1)),g&2048&&eu(B,t);break;case 24:ti(e,t,i,a),g&2048&&tu(t.alternate,t);break;default:ti(e,t,i,a)}}function gs(e,t,i,a,g){for(g=g&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var w=e,B=t,P=i,X=a,oe=B.flags;switch(B.tag){case 0:case 11:case 15:gs(w,B,P,X,g),_a(8,B);break;case 23:break;case 22:var fe=B.stateNode;B.memoizedState!==null?fe._visibility&2?gs(w,B,P,X,g):ya(w,B):(fe._visibility|=2,gs(w,B,P,X,g)),g&&oe&2048&&eu(B.alternate,B);break;case 24:gs(w,B,P,X,g),g&&oe&2048&&tu(B.alternate,B);break;default:gs(w,B,P,X,g)}t=t.sibling}}function ya(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var i=e,a=t,g=a.flags;switch(a.tag){case 22:ya(i,a),g&2048&&eu(a.alternate,a);break;case 24:ya(i,a),g&2048&&tu(a.alternate,a);break;default:ya(i,a)}t=t.sibling}}var Sa=8192;function _s(e,t,i){if(e.subtreeFlags&Sa)for(e=e.child;e!==null;)fp(e,t,i),e=e.sibling}function fp(e,t,i){switch(e.tag){case 26:_s(e,t,i),e.flags&Sa&&e.memoizedState!==null&&_0(i,ei,e.memoizedState,e.memoizedProps);break;case 5:_s(e,t,i);break;case 3:case 4:var a=ei;ei=no(e.stateNode.containerInfo),_s(e,t,i),ei=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Sa,Sa=16777216,_s(e,t,i),Sa=a):_s(e,t,i));break;default:_s(e,t,i)}}function dp(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ba(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var a=t[i];Ht=a,mp(a,e)}dp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)pp(e),e=e.sibling}function pp(e){switch(e.tag){case 0:case 11:case 15:ba(e),e.flags&2048&&Qi(9,e,e.return);break;case 3:ba(e);break;case 12:ba(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,ql(e)):ba(e);break;default:ba(e)}}function ql(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var i=0;i<t.length;i++){var a=t[i];Ht=a,mp(a,e)}dp(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:Qi(8,t,t.return),ql(t);break;case 22:i=t.stateNode,i._visibility&2&&(i._visibility&=-3,ql(t));break;default:ql(t)}e=e.sibling}}function mp(e,t){for(;Ht!==null;){var i=Ht;switch(i.tag){case 0:case 11:case 15:Qi(8,i,t);break;case 23:case 22:if(i.memoizedState!==null&&i.memoizedState.cachePool!==null){var a=i.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:ra(i.memoizedState.cache)}if(a=i.child,a!==null)a.return=i,Ht=a;else e:for(i=e;Ht!==null;){a=Ht;var g=a.sibling,w=a.return;if(sp(a),a===i){Ht=null;break e}if(g!==null){g.return=w,Ht=g;break e}Ht=w}}}var Ly={getCacheForType:function(e){var t=qt(At),i=t.data.get(e);return i===void 0&&(i=e(),t.data.set(e,i)),i},cacheSignal:function(){return qt(At).controller.signal}},Oy=typeof WeakMap=="function"?WeakMap:Map,et=0,lt=null,$e=null,We=0,nt=0,Rn=null,Ji=!1,vs=!1,nu=!1,Oi=0,vt=0,Zi=0,Br=0,iu=0,Dn=0,ys=0,Ca=null,vn=null,ru=!1,$l=0,gp=0,Gl=1/0,Vl=null,er=null,jt=0,tr=null,Ss=null,Bi=0,su=0,au=null,_p=null,wa=0,lu=null;function Mn(){return(et&2)!==0&&We!==0?We&-We:G.T!==null?du():Kn()}function vp(){if(Dn===0)if((We&536870912)===0||Ye){var e=Vn;Vn<<=1,(Vn&3932160)===0&&(Vn=262144),Dn=e}else Dn=536870912;return e=An.current,e!==null&&(e.flags|=32),Dn}function yn(e,t,i){(e===lt&&(nt===2||nt===9)||e.cancelPendingCommit!==null)&&(bs(e,0),nr(e,We,Dn,!1)),It(e,i),((et&2)===0||e!==lt)&&(e===lt&&((et&2)===0&&(Br|=i),vt===4&&nr(e,We,Dn,!1)),ci(e))}function yp(e,t,i){if((et&6)!==0)throw Error(l(327));var a=!i&&(t&127)===0&&(t&e.expiredLanes)===0||Vt(e,t),g=a?Ny(e,t):cu(e,t,!0),w=a;do{if(g===0){vs&&!a&&nr(e,t,0,!1);break}else{if(i=e.current.alternate,w&&!By(i)){g=cu(e,t,!1),w=!1;continue}if(g===2){if(w=t,e.errorRecoveryDisabledLanes&w)var B=0;else B=e.pendingLanes&-536870913,B=B!==0?B:B&536870912?536870912:0;if(B!==0){t=B;e:{var P=e;g=Ca;var X=P.current.memoizedState.isDehydrated;if(X&&(bs(P,B).flags|=256),B=cu(P,B,!1),B!==2){if(nu&&!X){P.errorRecoveryDisabledLanes|=w,Br|=w,g=4;break e}w=vn,vn=g,w!==null&&(vn===null?vn=w:vn.push.apply(vn,w))}g=B}if(w=!1,g!==2)continue}}if(g===1){bs(e,0),nr(e,t,0,!0);break}e:{switch(a=e,w=g,w){case 0:case 1:throw Error(l(345));case 4:if((t&4194048)!==t)break;case 6:nr(a,t,Dn,!Ji);break e;case 2:vn=null;break;case 3:case 5:break;default:throw Error(l(329))}if((t&62914560)===t&&(g=$l+300-tt(),10<g)){if(nr(a,t,Dn,!Ji),Wn(a,0,!0)!==0)break e;Bi=t,a.timeoutHandle=Xp(Sp.bind(null,a,i,vn,Vl,ru,t,Dn,Br,ys,Ji,w,"Throttled",-0,0),g);break e}Sp(a,i,vn,Vl,ru,t,Dn,Br,ys,Ji,w,null,-0,0)}}break}while(!0);ci(e)}function Sp(e,t,i,a,g,w,B,P,X,oe,fe,_e,ce,ue){if(e.timeoutHandle=-1,_e=t.subtreeFlags,_e&8192||(_e&16785408)===16785408){_e={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Kt},fp(t,w,_e);var Ee=(w&62914560)===w?$l-tt():(w&4194048)===w?gp-tt():0;if(Ee=v0(_e,Ee),Ee!==null){Bi=w,e.cancelPendingCommit=Ee(Tp.bind(null,e,t,w,i,a,g,B,P,X,fe,_e,null,ce,ue)),nr(e,w,B,!oe);return}}Tp(e,t,w,i,a,g,B,P,X)}function By(e){for(var t=e;;){var i=t.tag;if((i===0||i===11||i===15)&&t.flags&16384&&(i=t.updateQueue,i!==null&&(i=i.stores,i!==null)))for(var a=0;a<i.length;a++){var g=i[a],w=g.getSnapshot;g=g.value;try{if(!En(w(),g))return!1}catch{return!1}}if(i=t.child,t.subtreeFlags&16384&&i!==null)i.return=t,t=i;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function nr(e,t,i,a){t&=~iu,t&=~Br,e.suspendedLanes|=t,e.pingedLanes&=~t,a&&(e.warmLanes|=t),a=e.expirationTimes;for(var g=t;0<g;){var w=31-Qe(g),B=1<<w;a[w]=-1,g&=~B}i!==0&&ze(e,i,t)}function Wl(){return(et&6)===0?(xa(0),!1):!0}function ou(){if($e!==null){if(nt===0)var e=$e.return;else e=$e,wi=Er=null,xc(e),hs=null,aa=0,e=$e;for(;e!==null;)Qd(e.alternate,e),e=e.return;$e=null}}function bs(e,t){var i=e.timeoutHandle;i!==-1&&(e.timeoutHandle=-1,e0(i)),i=e.cancelPendingCommit,i!==null&&(e.cancelPendingCommit=null,i()),Bi=0,ou(),lt=e,$e=i=bi(e.current,null),We=t,nt=0,Rn=null,Ji=!1,vs=Vt(e,t),nu=!1,ys=Dn=iu=Br=Zi=vt=0,vn=Ca=null,ru=!1,(t&8)!==0&&(t|=t&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=t;0<a;){var g=31-Qe(a),w=1<<g;t|=e[g],a&=~w}return Oi=t,pl(),i}function bp(e,t){Ne=null,G.H=pa,t===us||t===Cl?(t=Hf(),nt=3):t===fc?(t=Hf(),nt=4):nt=t===Uc?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Rn=t,$e===null&&(vt=1,Nl(e,Hn(t,e.current)))}function Cp(){var e=An.current;return e===null?!0:(We&4194048)===We?Pn===null:(We&62914560)===We||(We&536870912)!==0?e===Pn:!1}function wp(){var e=G.H;return G.H=pa,e===null?pa:e}function xp(){var e=G.A;return G.A=Ly,e}function Kl(){vt=4,Ji||(We&4194048)!==We&&An.current!==null||(vs=!0),(Zi&134217727)===0&&(Br&134217727)===0||lt===null||nr(lt,We,Dn,!1)}function cu(e,t,i){var a=et;et|=2;var g=wp(),w=xp();(lt!==e||We!==t)&&(Vl=null,bs(e,t)),t=!1;var B=vt;e:do try{if(nt!==0&&$e!==null){var P=$e,X=Rn;switch(nt){case 8:ou(),B=6;break e;case 3:case 2:case 9:case 6:An.current===null&&(t=!0);var oe=nt;if(nt=0,Rn=null,Cs(e,P,X,oe),i&&vs){B=0;break e}break;default:oe=nt,nt=0,Rn=null,Cs(e,P,X,oe)}}jy(),B=vt;break}catch(fe){bp(e,fe)}while(!0);return t&&e.shellSuspendCounter++,wi=Er=null,et=a,G.H=g,G.A=w,$e===null&&(lt=null,We=0,pl()),B}function jy(){for(;$e!==null;)Ep($e)}function Ny(e,t){var i=et;et|=2;var a=wp(),g=xp();lt!==e||We!==t?(Vl=null,Gl=tt()+500,bs(e,t)):vs=Vt(e,t);e:do try{if(nt!==0&&$e!==null){t=$e;var w=Rn;t:switch(nt){case 1:nt=0,Rn=null,Cs(e,t,w,1);break;case 2:case 9:if(jf(w)){nt=0,Rn=null,kp(t);break}t=function(){nt!==2&&nt!==9||lt!==e||(nt=7),ci(e)},w.then(t,t);break e;case 3:nt=7;break e;case 4:nt=5;break e;case 7:jf(w)?(nt=0,Rn=null,kp(t)):(nt=0,Rn=null,Cs(e,t,w,7));break;case 5:var B=null;switch($e.tag){case 26:B=$e.memoizedState;case 5:case 27:var P=$e;if(B?hm(B):P.stateNode.complete){nt=0,Rn=null;var X=P.sibling;if(X!==null)$e=X;else{var oe=P.return;oe!==null?($e=oe,Yl(oe)):$e=null}break t}}nt=0,Rn=null,Cs(e,t,w,5);break;case 6:nt=0,Rn=null,Cs(e,t,w,6);break;case 8:ou(),vt=6;break e;default:throw Error(l(462))}}Hy();break}catch(fe){bp(e,fe)}while(!0);return wi=Er=null,G.H=a,G.A=g,et=i,$e!==null?0:(lt=null,We=0,pl(),vt)}function Hy(){for(;$e!==null&&!Cn();)Ep($e)}function Ep(e){var t=Yd(e.alternate,e,Oi);e.memoizedProps=e.pendingProps,t===null?Yl(e):$e=t}function kp(e){var t=e,i=t.alternate;switch(t.tag){case 15:case 0:t=qd(i,t,t.pendingProps,t.type,void 0,We);break;case 11:t=qd(i,t,t.pendingProps,t.type.render,t.ref,We);break;case 5:xc(t);default:Qd(i,t),t=$e=xf(t,Oi),t=Yd(i,t,Oi)}e.memoizedProps=e.pendingProps,t===null?Yl(e):$e=t}function Cs(e,t,i,a){wi=Er=null,xc(t),hs=null,aa=0;var g=t.return;try{if(Ey(e,g,t,i,We)){vt=1,Nl(e,Hn(i,e.current)),$e=null;return}}catch(w){if(g!==null)throw $e=g,w;vt=1,Nl(e,Hn(i,e.current)),$e=null;return}t.flags&32768?(Ye||a===1?e=!0:vs||(We&536870912)!==0?e=!1:(Ji=e=!0,(a===2||a===9||a===3||a===6)&&(a=An.current,a!==null&&a.tag===13&&(a.flags|=16384))),Ap(t,e)):Yl(t)}function Yl(e){var t=e;do{if((t.flags&32768)!==0){Ap(t,Ji);return}e=t.return;var i=Ty(t.alternate,t,Oi);if(i!==null){$e=i;return}if(t=t.sibling,t!==null){$e=t;return}$e=t=e}while(t!==null);vt===0&&(vt=5)}function Ap(e,t){do{var i=Ry(e.alternate,e);if(i!==null){i.flags&=32767,$e=i;return}if(i=e.return,i!==null&&(i.flags|=32768,i.subtreeFlags=0,i.deletions=null),!t&&(e=e.sibling,e!==null)){$e=e;return}$e=e=i}while(e!==null);vt=6,$e=null}function Tp(e,t,i,a,g,w,B,P,X){e.cancelPendingCommit=null;do Xl();while(jt!==0);if((et&6)!==0)throw Error(l(327));if(t!==null){if(t===e.current)throw Error(l(177));if(w=t.lanes|t.childLanes,w|=Qo,Ii(e,i,w,B,P,X),e===lt&&($e=lt=null,We=0),Ss=t,tr=e,Bi=i,su=w,au=g,_p=a,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Py(Ae,function(){return Op(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||a){a=G.T,G.T=null,g=W.p,W.p=2,B=et,et|=4;try{Dy(e,t,i)}finally{et=B,W.p=g,G.T=a}}jt=1,Rp(),Dp(),Mp()}}function Rp(){if(jt===1){jt=0;var e=tr,t=Ss,i=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||i){i=G.T,G.T=null;var a=W.p;W.p=2;var g=et;et|=4;try{cp(t,e);var w=bu,B=mf(e.containerInfo),P=w.focusedElem,X=w.selectionRange;if(B!==P&&P&&P.ownerDocument&&pf(P.ownerDocument.documentElement,P)){if(X!==null&&Vo(P)){var oe=X.start,fe=X.end;if(fe===void 0&&(fe=oe),"selectionStart"in P)P.selectionStart=oe,P.selectionEnd=Math.min(fe,P.value.length);else{var _e=P.ownerDocument||document,ce=_e&&_e.defaultView||window;if(ce.getSelection){var ue=ce.getSelection(),Ee=P.textContent.length,Le=Math.min(X.start,Ee),at=X.end===void 0?Le:Math.min(X.end,Ee);!ue.extend&&Le>at&&(B=at,at=Le,Le=B);var ne=df(P,Le),J=df(P,at);if(ne&&J&&(ue.rangeCount!==1||ue.anchorNode!==ne.node||ue.anchorOffset!==ne.offset||ue.focusNode!==J.node||ue.focusOffset!==J.offset)){var le=_e.createRange();le.setStart(ne.node,ne.offset),ue.removeAllRanges(),Le>at?(ue.addRange(le),ue.extend(J.node,J.offset)):(le.setEnd(J.node,J.offset),ue.addRange(le))}}}}for(_e=[],ue=P;ue=ue.parentNode;)ue.nodeType===1&&_e.push({element:ue,left:ue.scrollLeft,top:ue.scrollTop});for(typeof P.focus=="function"&&P.focus(),P=0;P<_e.length;P++){var ge=_e[P];ge.element.scrollLeft=ge.left,ge.element.scrollTop=ge.top}}oo=!!Su,bu=Su=null}finally{et=g,W.p=a,G.T=i}}e.current=t,jt=2}}function Dp(){if(jt===2){jt=0;var e=tr,t=Ss,i=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||i){i=G.T,G.T=null;var a=W.p;W.p=2;var g=et;et|=4;try{rp(e,t.alternate,t)}finally{et=g,W.p=a,G.T=i}}jt=3}}function Mp(){if(jt===4||jt===3){jt=0,St();var e=tr,t=Ss,i=Bi,a=_p;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?jt=5:(jt=0,Ss=tr=null,Lp(e,e.pendingLanes));var g=e.pendingLanes;if(g===0&&(er=null),Us(i),t=t.stateNode,mt&&typeof mt.onCommitFiberRoot=="function")try{mt.onCommitFiberRoot(gt,t,void 0,(t.current.flags&128)===128)}catch{}if(a!==null){t=G.T,g=W.p,W.p=2,G.T=null;try{for(var w=e.onRecoverableError,B=0;B<a.length;B++){var P=a[B];w(P.value,{componentStack:P.stack})}}finally{G.T=t,W.p=g}}(Bi&3)!==0&&Xl(),ci(e),g=e.pendingLanes,(i&261930)!==0&&(g&42)!==0?e===lu?wa++:(wa=0,lu=e):wa=0,xa(0)}}function Lp(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,ra(t)))}function Xl(){return Rp(),Dp(),Mp(),Op()}function Op(){if(jt!==5)return!1;var e=tr,t=su;su=0;var i=Us(Bi),a=G.T,g=W.p;try{W.p=32>i?32:i,G.T=null,i=au,au=null;var w=tr,B=Bi;if(jt=0,Ss=tr=null,Bi=0,(et&6)!==0)throw Error(l(331));var P=et;if(et|=4,pp(w.current),hp(w,w.current,B,i),et=P,xa(0,!1),mt&&typeof mt.onPostCommitFiberRoot=="function")try{mt.onPostCommitFiberRoot(gt,w)}catch{}return!0}finally{W.p=g,G.T=a,Lp(e,t)}}function Bp(e,t,i){t=Hn(i,t),t=Ic(e.stateNode,t,2),e=Ki(e,t,2),e!==null&&(It(e,2),ci(e))}function it(e,t,i){if(e.tag===3)Bp(e,e,i);else for(;t!==null;){if(t.tag===3){Bp(t,e,i);break}else if(t.tag===1){var a=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(er===null||!er.has(a))){e=Hn(i,e),i=jd(2),a=Ki(t,i,2),a!==null&&(Nd(i,a,t,e),It(a,2),ci(a));break}}t=t.return}}function uu(e,t,i){var a=e.pingCache;if(a===null){a=e.pingCache=new Oy;var g=new Set;a.set(t,g)}else g=a.get(t),g===void 0&&(g=new Set,a.set(t,g));g.has(i)||(nu=!0,g.add(i),e=zy.bind(null,e,t,i),t.then(e,e))}function zy(e,t,i){var a=e.pingCache;a!==null&&a.delete(t),e.pingedLanes|=e.suspendedLanes&i,e.warmLanes&=~i,lt===e&&(We&i)===i&&(vt===4||vt===3&&(We&62914560)===We&&300>tt()-$l?(et&2)===0&&bs(e,0):iu|=i,ys===We&&(ys=0)),ci(e)}function jp(e,t){t===0&&(t=Wt()),e=Cr(e,t),e!==null&&(It(e,t),ci(e))}function Iy(e){var t=e.memoizedState,i=0;t!==null&&(i=t.retryLane),jp(e,i)}function Uy(e,t){var i=0;switch(e.tag){case 31:case 13:var a=e.stateNode,g=e.memoizedState;g!==null&&(i=g.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(l(314))}a!==null&&a.delete(t),jp(e,i)}function Py(e,t){return Et(e,t)}var Ql=null,ws=null,hu=!1,Jl=!1,fu=!1,ir=0;function ci(e){e!==ws&&e.next===null&&(ws===null?Ql=ws=e:ws=ws.next=e),Jl=!0,hu||(hu=!0,qy())}function xa(e,t){if(!fu&&Jl){fu=!0;do for(var i=!1,a=Ql;a!==null;){if(e!==0){var g=a.pendingLanes;if(g===0)var w=0;else{var B=a.suspendedLanes,P=a.pingedLanes;w=(1<<31-Qe(42|e)+1)-1,w&=g&~(B&~P),w=w&201326741?w&201326741|1:w?w|2:0}w!==0&&(i=!0,Ip(a,w))}else w=We,w=Wn(a,a===lt?w:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(w&3)===0||Vt(a,w)||(i=!0,Ip(a,w));a=a.next}while(i);fu=!1}}function Fy(){Np()}function Np(){Jl=hu=!1;var e=0;ir!==0&&Zy()&&(e=ir);for(var t=tt(),i=null,a=Ql;a!==null;){var g=a.next,w=Hp(a,t);w===0?(a.next=null,i===null?Ql=g:i.next=g,g===null&&(ws=i)):(i=a,(e!==0||(w&3)!==0)&&(Jl=!0)),a=g}jt!==0&&jt!==5||xa(e),ir!==0&&(ir=0)}function Hp(e,t){for(var i=e.suspendedLanes,a=e.pingedLanes,g=e.expirationTimes,w=e.pendingLanes&-62914561;0<w;){var B=31-Qe(w),P=1<<B,X=g[B];X===-1?((P&i)===0||(P&a)!==0)&&(g[B]=Is(P,t)):X<=t&&(e.expiredLanes|=P),w&=~P}if(t=lt,i=We,i=Wn(e,e===t?i:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,i===0||e===t&&(nt===2||nt===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&an(a),e.callbackNode=null,e.callbackPriority=0;if((i&3)===0||Vt(e,i)){if(t=i&-i,t===e.callbackPriority)return t;switch(a!==null&&an(a),Us(i)){case 2:case 8:i=ye;break;case 32:i=Ae;break;case 268435456:i=Oe;break;default:i=Ae}return a=zp.bind(null,e),i=Et(i,a),e.callbackPriority=t,e.callbackNode=i,t}return a!==null&&a!==null&&an(a),e.callbackPriority=2,e.callbackNode=null,2}function zp(e,t){if(jt!==0&&jt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var i=e.callbackNode;if(Xl()&&e.callbackNode!==i)return null;var a=We;return a=Wn(e,e===lt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(yp(e,a,t),Hp(e,tt()),e.callbackNode!=null&&e.callbackNode===i?zp.bind(null,e):null)}function Ip(e,t){if(Xl())return null;yp(e,t,!0)}function qy(){t0(function(){(et&6)!==0?Et(he,Fy):Np()})}function du(){if(ir===0){var e=os;e===0&&(e=Gn,Gn<<=1,(Gn&261888)===0&&(Gn=256)),ir=e}return ir}function Up(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:gr(""+e)}function Pp(e,t){var i=t.ownerDocument.createElement("input");return i.name=t.name,i.value=t.value,e.id&&i.setAttribute("form",e.id),t.parentNode.insertBefore(i,t),e=new FormData(e),i.parentNode.removeChild(i),e}function $y(e,t,i,a,g){if(t==="submit"&&i&&i.stateNode===g){var w=Up((g[Ut]||null).action),B=a.submitter;B&&(t=(t=B[Ut]||null)?Up(t.formAction):B.getAttribute("formAction"),t!==null&&(w=t,B=null));var P=new Qr("action","action",null,a,g);e.push({event:P,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(ir!==0){var X=B?Pp(g,B):new FormData(g);Oc(i,{pending:!0,data:X,method:g.method,action:w},null,X)}}else typeof w=="function"&&(P.preventDefault(),X=B?Pp(g,B):new FormData(g),Oc(i,{pending:!0,data:X,method:g.method,action:w},w,X))},currentTarget:g}]})}}for(var pu=0;pu<Xo.length;pu++){var mu=Xo[pu],Gy=mu.toLowerCase(),Vy=mu[0].toUpperCase()+mu.slice(1);Zn(Gy,"on"+Vy)}Zn(vf,"onAnimationEnd"),Zn(yf,"onAnimationIteration"),Zn(Sf,"onAnimationStart"),Zn("dblclick","onDoubleClick"),Zn("focusin","onFocus"),Zn("focusout","onBlur"),Zn(oy,"onTransitionRun"),Zn(cy,"onTransitionStart"),Zn(uy,"onTransitionCancel"),Zn(bf,"onTransitionEnd"),ie("onMouseEnter",["mouseout","mouseover"]),ie("onMouseLeave",["mouseout","mouseover"]),ie("onPointerEnter",["pointerout","pointerover"]),ie("onPointerLeave",["pointerout","pointerover"]),Qn("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Qn("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Qn("onBeforeInput",["compositionend","keypress","textInput","paste"]),Qn("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Qn("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Qn("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ea="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(" "),Wy=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Ea));function Fp(e,t){t=(t&4)!==0;for(var i=0;i<e.length;i++){var a=e[i],g=a.event;a=a.listeners;e:{var w=void 0;if(t)for(var B=a.length-1;0<=B;B--){var P=a[B],X=P.instance,oe=P.currentTarget;if(P=P.listener,X!==w&&g.isPropagationStopped())break e;w=P,g.currentTarget=oe;try{w(g)}catch(fe){dl(fe)}g.currentTarget=null,w=X}else for(B=0;B<a.length;B++){if(P=a[B],X=P.instance,oe=P.currentTarget,P=P.listener,X!==w&&g.isPropagationStopped())break e;w=P,g.currentTarget=oe;try{w(g)}catch(fe){dl(fe)}g.currentTarget=null,w=X}}}}function Ge(e,t){var i=t[Ps];i===void 0&&(i=t[Ps]=new Set);var a=e+"__bubble";i.has(a)||(qp(t,e,2,!1),i.add(a))}function gu(e,t,i){var a=0;t&&(a|=4),qp(i,e,a,t)}var Zl="_reactListening"+Math.random().toString(36).slice(2);function _u(e){if(!e[Zl]){e[Zl]=!0,Fs.forEach(function(i){i!=="selectionchange"&&(Wy.has(i)||gu(i,!1,e),gu(i,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Zl]||(t[Zl]=!0,gu("selectionchange",!1,t))}}function qp(e,t,i,a){switch(vm(t)){case 2:var g=b0;break;case 8:g=C0;break;default:g=Lu}i=g.bind(null,t,i,e),g=void 0,!_r||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(g=!0),a?g!==void 0?e.addEventListener(t,i,{capture:!0,passive:g}):e.addEventListener(t,i,!0):g!==void 0?e.addEventListener(t,i,{passive:g}):e.addEventListener(t,i,!1)}function vu(e,t,i,a,g){var w=a;if((t&1)===0&&(t&2)===0&&a!==null)e:for(;;){if(a===null)return;var B=a.tag;if(B===3||B===4){var P=a.stateNode.containerInfo;if(P===g)break;if(B===4)for(B=a.return;B!==null;){var X=B.tag;if((X===3||X===4)&&B.stateNode.containerInfo===g)return;B=B.return}for(;P!==null;){if(B=cn(P),B===null)return;if(X=B.tag,X===5||X===6||X===26||X===27){a=w=B;continue e}P=P.parentNode}}a=a.return}dn(function(){var oe=w,fe=si(i),_e=[];e:{var ce=Cf.get(e);if(ce!==void 0){var ue=Qr,Ee=e;switch(e){case"keypress":if(Yr(i)===0)break e;case"keydown":case"keyup":ue=Uv;break;case"focusin":Ee="focus",ue=Po;break;case"focusout":Ee="blur",ue=Po;break;case"beforeblur":case"afterblur":ue=Po;break;case"click":if(i.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ue=hl;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ue=Tv;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ue=qv;break;case vf:case yf:case Sf:ue=Mv;break;case bf:ue=Gv;break;case"scroll":case"scrollend":ue=me;break;case"wheel":ue=Wv;break;case"copy":case"cut":case"paste":ue=Ov;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ue=Jh;break;case"toggle":case"beforetoggle":ue=Yv}var Le=(t&4)!==0,at=!Le&&(e==="scroll"||e==="scrollend"),ne=Le?ce!==null?ce+"Capture":null:ce;Le=[];for(var J=oe,le;J!==null;){var ge=J;if(le=ge.stateNode,ge=ge.tag,ge!==5&&ge!==26&&ge!==27||le===null||ne===null||(ge=Si(J,ne),ge!=null&&Le.push(ka(J,ge,le))),at)break;J=J.return}0<Le.length&&(ce=new ue(ce,Ee,null,i,fe),_e.push({event:ce,listeners:Le}))}}if((t&7)===0){e:{if(ce=e==="mouseover"||e==="pointerover",ue=e==="mouseout"||e==="pointerout",ce&&i!==Wr&&(Ee=i.relatedTarget||i.fromElement)&&(cn(Ee)||Ee[Yn]))break e;if((ue||ce)&&(ce=fe.window===fe?fe:(ce=fe.ownerDocument)?ce.defaultView||ce.parentWindow:window,ue?(Ee=i.relatedTarget||i.toElement,ue=oe,Ee=Ee?cn(Ee):null,Ee!==null&&(at=m(Ee),Le=Ee.tag,Ee!==at||Le!==5&&Le!==27&&Le!==6)&&(Ee=null)):(ue=null,Ee=oe),ue!==Ee)){if(Le=hl,ge="onMouseLeave",ne="onMouseEnter",J="mouse",(e==="pointerout"||e==="pointerover")&&(Le=Jh,ge="onPointerLeave",ne="onPointerEnter",J="pointer"),at=ue==null?ce:mi(ue),le=Ee==null?ce:mi(Ee),ce=new Le(ge,J+"leave",ue,i,fe),ce.target=at,ce.relatedTarget=le,ge=null,cn(fe)===oe&&(Le=new Le(ne,J+"enter",Ee,i,fe),Le.target=le,Le.relatedTarget=at,ge=Le),at=ge,ue&&Ee)t:{for(Le=Ky,ne=ue,J=Ee,le=0,ge=ne;ge;ge=Le(ge))le++;ge=0;for(var Re=J;Re;Re=Le(Re))ge++;for(;0<le-ge;)ne=Le(ne),le--;for(;0<ge-le;)J=Le(J),ge--;for(;le--;){if(ne===J||J!==null&&ne===J.alternate){Le=ne;break t}ne=Le(ne),J=Le(J)}Le=null}else Le=null;ue!==null&&$p(_e,ce,ue,Le,!1),Ee!==null&&at!==null&&$p(_e,at,Ee,Le,!0)}}e:{if(ce=oe?mi(oe):window,ue=ce.nodeName&&ce.nodeName.toLowerCase(),ue==="select"||ue==="input"&&ce.type==="file")var Je=lf;else if(sf(ce))if(of)Je=sy;else{Je=iy;var Te=ny}else ue=ce.nodeName,!ue||ue.toLowerCase()!=="input"||ce.type!=="checkbox"&&ce.type!=="radio"?oe&&Vr(oe.elementType)&&(Je=lf):Je=ry;if(Je&&(Je=Je(e,oe))){af(_e,Je,i,fe);break e}Te&&Te(e,ce,oe),e==="focusout"&&oe&&ce.type==="number"&&oe.memoizedProps.value!=null&&Vs(ce,"number",ce.value)}switch(Te=oe?mi(oe):window,e){case"focusin":(sf(Te)||Te.contentEditable==="true")&&(es=Te,Wo=oe,ta=null);break;case"focusout":ta=Wo=es=null;break;case"mousedown":Ko=!0;break;case"contextmenu":case"mouseup":case"dragend":Ko=!1,gf(_e,i,fe);break;case"selectionchange":if(ly)break;case"keydown":case"keyup":gf(_e,i,fe)}var Ie;if(qo)e:{switch(e){case"compositionstart":var Ke="onCompositionStart";break e;case"compositionend":Ke="onCompositionEnd";break e;case"compositionupdate":Ke="onCompositionUpdate";break e}Ke=void 0}else Zr?nf(e,i)&&(Ke="onCompositionEnd"):e==="keydown"&&i.keyCode===229&&(Ke="onCompositionStart");Ke&&(Zh&&i.locale!=="ko"&&(Zr||Ke!=="onCompositionStart"?Ke==="onCompositionEnd"&&Zr&&(Ie=ul()):(ke=fe,Xs="value"in ke?ke.value:ke.textContent,Zr=!0)),Te=eo(oe,Ke),0<Te.length&&(Ke=new Qh(Ke,e,null,i,fe),_e.push({event:Ke,listeners:Te}),Ie?Ke.data=Ie:(Ie=rf(i),Ie!==null&&(Ke.data=Ie)))),(Ie=Qv?Jv(e,i):Zv(e,i))&&(Ke=eo(oe,"onBeforeInput"),0<Ke.length&&(Te=new Qh("onBeforeInput","beforeinput",null,i,fe),_e.push({event:Te,listeners:Ke}),Te.data=Ie)),$y(_e,e,oe,i,fe)}Fp(_e,t)})}function ka(e,t,i){return{instance:e,listener:t,currentTarget:i}}function eo(e,t){for(var i=t+"Capture",a=[];e!==null;){var g=e,w=g.stateNode;if(g=g.tag,g!==5&&g!==26&&g!==27||w===null||(g=Si(e,i),g!=null&&a.unshift(ka(e,g,w)),g=Si(e,t),g!=null&&a.push(ka(e,g,w))),e.tag===3)return a;e=e.return}return[]}function Ky(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function $p(e,t,i,a,g){for(var w=t._reactName,B=[];i!==null&&i!==a;){var P=i,X=P.alternate,oe=P.stateNode;if(P=P.tag,X!==null&&X===a)break;P!==5&&P!==26&&P!==27||oe===null||(X=oe,g?(oe=Si(i,w),oe!=null&&B.unshift(ka(i,oe,X))):g||(oe=Si(i,w),oe!=null&&B.push(ka(i,oe,X)))),i=i.return}B.length!==0&&e.push({event:t,listeners:B})}var Yy=/\r\n?/g,Xy=/\u0000|\uFFFD/g;function Gp(e){return(typeof e=="string"?e:""+e).replace(Yy,`
|
|
49
|
+
`).replace(Xy,"")}function Vp(e,t){return t=Gp(t),Gp(e)===t}function st(e,t,i,a,g,w){switch(i){case"children":typeof a=="string"?t==="body"||t==="textarea"&&a===""||ri(e,a):(typeof a=="number"||typeof a=="bigint")&&t!=="body"&&ri(e,""+a);break;case"className":_i(e,"class",a);break;case"tabIndex":_i(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":_i(e,i,a);break;case"style":ll(e,a,w);break;case"data":if(t!=="object"){_i(e,"data",a);break}case"src":case"href":if(a===""&&(t!=="a"||i!=="href")){e.removeAttribute(i);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(i);break}a=gr(""+a),e.setAttribute(i,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(i,"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 w=="function"&&(i==="formAction"?(t!=="input"&&st(e,t,"name",g.name,g,null),st(e,t,"formEncType",g.formEncType,g,null),st(e,t,"formMethod",g.formMethod,g,null),st(e,t,"formTarget",g.formTarget,g,null)):(st(e,t,"encType",g.encType,g,null),st(e,t,"method",g.method,g,null),st(e,t,"target",g.target,g,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(i);break}a=gr(""+a),e.setAttribute(i,a);break;case"onClick":a!=null&&(e.onclick=Kt);break;case"onScroll":a!=null&&Ge("scroll",e);break;case"onScrollEnd":a!=null&&Ge("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(l(61));if(i=a.__html,i!=null){if(g.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"multiple":e.multiple=a&&typeof a!="function"&&typeof a!="symbol";break;case"muted":e.muted=a&&typeof a!="function"&&typeof a!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(a==null||typeof a=="function"||typeof a=="boolean"||typeof a=="symbol"){e.removeAttribute("xlink:href");break}i=gr(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(i,""+a):e.removeAttribute(i);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":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(i,""):e.removeAttribute(i);break;case"capture":case"download":a===!0?e.setAttribute(i,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(i,a):e.removeAttribute(i);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(i,a):e.removeAttribute(i);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(i):e.setAttribute(i,a);break;case"popover":Ge("beforetoggle",e),Ge("toggle",e),Gr(e,"popover",a);break;case"xlinkActuate":jn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":jn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":jn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":jn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":jn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":jn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":jn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":jn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":jn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":Gr(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<i.length)||i[0]!=="o"&&i[0]!=="O"||i[1]!=="n"&&i[1]!=="N")&&(i=Ks.get(i)||i,Gr(e,i,a))}}function yu(e,t,i,a,g,w){switch(i){case"style":ll(e,a,w);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(l(61));if(i=a.__html,i!=null){if(g.children!=null)throw Error(l(60));e.innerHTML=i}}break;case"children":typeof a=="string"?ri(e,a):(typeof a=="number"||typeof a=="bigint")&&ri(e,""+a);break;case"onScroll":a!=null&&Ge("scroll",e);break;case"onScrollEnd":a!=null&&Ge("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Kt);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Xn.hasOwnProperty(i))e:{if(i[0]==="o"&&i[1]==="n"&&(g=i.endsWith("Capture"),t=i.slice(2,g?i.length-7:void 0),w=e[Ut]||null,w=w!=null?w[i]:null,typeof w=="function"&&e.removeEventListener(t,w,g),typeof a=="function")){typeof w!="function"&&w!==null&&(i in e?e[i]=null:e.hasAttribute(i)&&e.removeAttribute(i)),e.addEventListener(t,a,g);break e}i in e?e[i]=a:a===!0?e.setAttribute(i,""):Gr(e,i,a)}}}function Gt(e,t,i){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ge("error",e),Ge("load",e);var a=!1,g=!1,w;for(w in i)if(i.hasOwnProperty(w)){var B=i[w];if(B!=null)switch(w){case"src":a=!0;break;case"srcSet":g=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:st(e,t,w,B,i,null)}}g&&st(e,t,"srcSet",i.srcSet,i,null),a&&st(e,t,"src",i.src,i,null);return;case"input":Ge("invalid",e);var P=w=B=g=null,X=null,oe=null;for(a in i)if(i.hasOwnProperty(a)){var fe=i[a];if(fe!=null)switch(a){case"name":g=fe;break;case"type":B=fe;break;case"checked":X=fe;break;case"defaultChecked":oe=fe;break;case"value":w=fe;break;case"defaultValue":P=fe;break;case"children":case"dangerouslySetInnerHTML":if(fe!=null)throw Error(l(137,t));break;default:st(e,t,a,fe,i,null)}}sl(e,w,P,X,oe,B,g,!1);return;case"select":Ge("invalid",e),a=B=w=null;for(g in i)if(i.hasOwnProperty(g)&&(P=i[g],P!=null))switch(g){case"value":w=P;break;case"defaultValue":B=P;break;case"multiple":a=P;default:st(e,t,g,P,i,null)}t=w,i=B,e.multiple=!!a,t!=null?Ui(e,!!a,t,!1):i!=null&&Ui(e,!!a,i,!0);return;case"textarea":Ge("invalid",e),w=g=a=null;for(B in i)if(i.hasOwnProperty(B)&&(P=i[B],P!=null))switch(B){case"value":a=P;break;case"defaultValue":g=P;break;case"children":w=P;break;case"dangerouslySetInnerHTML":if(P!=null)throw Error(l(91));break;default:st(e,t,B,P,i,null)}vi(e,a,g,w);return;case"option":for(X in i)if(i.hasOwnProperty(X)&&(a=i[X],a!=null))switch(X){case"selected":e.selected=a&&typeof a!="function"&&typeof a!="symbol";break;default:st(e,t,X,a,i,null)}return;case"dialog":Ge("beforetoggle",e),Ge("toggle",e),Ge("cancel",e),Ge("close",e);break;case"iframe":case"object":Ge("load",e);break;case"video":case"audio":for(a=0;a<Ea.length;a++)Ge(Ea[a],e);break;case"image":Ge("error",e),Ge("load",e);break;case"details":Ge("toggle",e);break;case"embed":case"source":case"link":Ge("error",e),Ge("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(oe in i)if(i.hasOwnProperty(oe)&&(a=i[oe],a!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,t));default:st(e,t,oe,a,i,null)}return;default:if(Vr(t)){for(fe in i)i.hasOwnProperty(fe)&&(a=i[fe],a!==void 0&&yu(e,t,fe,a,i,void 0));return}}for(P in i)i.hasOwnProperty(P)&&(a=i[P],a!=null&&st(e,t,P,a,i,null))}function Qy(e,t,i,a){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var g=null,w=null,B=null,P=null,X=null,oe=null,fe=null;for(ue in i){var _e=i[ue];if(i.hasOwnProperty(ue)&&_e!=null)switch(ue){case"checked":break;case"value":break;case"defaultValue":X=_e;default:a.hasOwnProperty(ue)||st(e,t,ue,null,a,_e)}}for(var ce in a){var ue=a[ce];if(_e=i[ce],a.hasOwnProperty(ce)&&(ue!=null||_e!=null))switch(ce){case"type":w=ue;break;case"name":g=ue;break;case"checked":oe=ue;break;case"defaultChecked":fe=ue;break;case"value":B=ue;break;case"defaultValue":P=ue;break;case"children":case"dangerouslySetInnerHTML":if(ue!=null)throw Error(l(137,t));break;default:ue!==_e&&st(e,t,ce,ue,a,_e)}}Gs(e,B,P,X,oe,fe,w,g);return;case"select":ue=B=P=ce=null;for(w in i)if(X=i[w],i.hasOwnProperty(w)&&X!=null)switch(w){case"value":break;case"multiple":ue=X;default:a.hasOwnProperty(w)||st(e,t,w,null,a,X)}for(g in a)if(w=a[g],X=i[g],a.hasOwnProperty(g)&&(w!=null||X!=null))switch(g){case"value":ce=w;break;case"defaultValue":P=w;break;case"multiple":B=w;default:w!==X&&st(e,t,g,w,a,X)}t=P,i=B,a=ue,ce!=null?Ui(e,!!i,ce,!1):!!a!=!!i&&(t!=null?Ui(e,!!i,t,!0):Ui(e,!!i,i?[]:"",!1));return;case"textarea":ue=ce=null;for(P in i)if(g=i[P],i.hasOwnProperty(P)&&g!=null&&!a.hasOwnProperty(P))switch(P){case"value":break;case"children":break;default:st(e,t,P,null,a,g)}for(B in a)if(g=a[B],w=i[B],a.hasOwnProperty(B)&&(g!=null||w!=null))switch(B){case"value":ce=g;break;case"defaultValue":ue=g;break;case"children":break;case"dangerouslySetInnerHTML":if(g!=null)throw Error(l(91));break;default:g!==w&&st(e,t,B,g,a,w)}al(e,ce,ue);return;case"option":for(var Ee in i)if(ce=i[Ee],i.hasOwnProperty(Ee)&&ce!=null&&!a.hasOwnProperty(Ee))switch(Ee){case"selected":e.selected=!1;break;default:st(e,t,Ee,null,a,ce)}for(X in a)if(ce=a[X],ue=i[X],a.hasOwnProperty(X)&&ce!==ue&&(ce!=null||ue!=null))switch(X){case"selected":e.selected=ce&&typeof ce!="function"&&typeof ce!="symbol";break;default:st(e,t,X,ce,a,ue)}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 Le in i)ce=i[Le],i.hasOwnProperty(Le)&&ce!=null&&!a.hasOwnProperty(Le)&&st(e,t,Le,null,a,ce);for(oe in a)if(ce=a[oe],ue=i[oe],a.hasOwnProperty(oe)&&ce!==ue&&(ce!=null||ue!=null))switch(oe){case"children":case"dangerouslySetInnerHTML":if(ce!=null)throw Error(l(137,t));break;default:st(e,t,oe,ce,a,ue)}return;default:if(Vr(t)){for(var at in i)ce=i[at],i.hasOwnProperty(at)&&ce!==void 0&&!a.hasOwnProperty(at)&&yu(e,t,at,void 0,a,ce);for(fe in a)ce=a[fe],ue=i[fe],!a.hasOwnProperty(fe)||ce===ue||ce===void 0&&ue===void 0||yu(e,t,fe,ce,a,ue);return}}for(var ne in i)ce=i[ne],i.hasOwnProperty(ne)&&ce!=null&&!a.hasOwnProperty(ne)&&st(e,t,ne,null,a,ce);for(_e in a)ce=a[_e],ue=i[_e],!a.hasOwnProperty(_e)||ce===ue||ce==null&&ue==null||st(e,t,_e,ce,a,ue)}function Wp(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Jy(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,i=performance.getEntriesByType("resource"),a=0;a<i.length;a++){var g=i[a],w=g.transferSize,B=g.initiatorType,P=g.duration;if(w&&P&&Wp(B)){for(B=0,P=g.responseEnd,a+=1;a<i.length;a++){var X=i[a],oe=X.startTime;if(oe>P)break;var fe=X.transferSize,_e=X.initiatorType;fe&&Wp(_e)&&(X=X.responseEnd,B+=fe*(X<P?1:(P-oe)/(X-oe)))}if(--a,t+=8*(w+B)/(g.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Su=null,bu=null;function to(e){return e.nodeType===9?e:e.ownerDocument}function Kp(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function Yp(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function Cu(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var wu=null;function Zy(){var e=window.event;return e&&e.type==="popstate"?e===wu?!1:(wu=e,!0):(wu=null,!1)}var Xp=typeof setTimeout=="function"?setTimeout:void 0,e0=typeof clearTimeout=="function"?clearTimeout:void 0,Qp=typeof Promise=="function"?Promise:void 0,t0=typeof queueMicrotask=="function"?queueMicrotask:typeof Qp<"u"?function(e){return Qp.resolve(null).then(e).catch(n0)}:Xp;function n0(e){setTimeout(function(){throw e})}function rr(e){return e==="head"}function Jp(e,t){var i=t,a=0;do{var g=i.nextSibling;if(e.removeChild(i),g&&g.nodeType===8)if(i=g.data,i==="/$"||i==="/&"){if(a===0){e.removeChild(g),As(t);return}a--}else if(i==="$"||i==="$?"||i==="$~"||i==="$!"||i==="&")a++;else if(i==="html")Aa(e.ownerDocument.documentElement);else if(i==="head"){i=e.ownerDocument.head,Aa(i);for(var w=i.firstChild;w;){var B=w.nextSibling,P=w.nodeName;w[Bn]||P==="SCRIPT"||P==="STYLE"||P==="LINK"&&w.rel.toLowerCase()==="stylesheet"||i.removeChild(w),w=B}}else i==="body"&&Aa(e.ownerDocument.body);i=g}while(i);As(t)}function Zp(e,t){var i=e;e=0;do{var a=i.nextSibling;if(i.nodeType===1?t?(i._stashedDisplay=i.style.display,i.style.display="none"):(i.style.display=i._stashedDisplay||"",i.getAttribute("style")===""&&i.removeAttribute("style")):i.nodeType===3&&(t?(i._stashedText=i.nodeValue,i.nodeValue=""):i.nodeValue=i._stashedText||""),a&&a.nodeType===8)if(i=a.data,i==="/$"){if(e===0)break;e--}else i!=="$"&&i!=="$?"&&i!=="$~"&&i!=="$!"||e++;i=a}while(i)}function xu(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var i=t;switch(t=t.nextSibling,i.nodeName){case"HTML":case"HEAD":case"BODY":xu(i),qr(i);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(i.rel.toLowerCase()==="stylesheet")continue}e.removeChild(i)}}function i0(e,t,i,a){for(;e.nodeType===1;){var g=i;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[Bn])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(w=e.getAttribute("rel"),w==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(w!==g.rel||e.getAttribute("href")!==(g.href==null||g.href===""?null:g.href)||e.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin)||e.getAttribute("title")!==(g.title==null?null:g.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(w=e.getAttribute("src"),(w!==(g.src==null?null:g.src)||e.getAttribute("type")!==(g.type==null?null:g.type)||e.getAttribute("crossorigin")!==(g.crossOrigin==null?null:g.crossOrigin))&&w&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var w=g.name==null?null:""+g.name;if(g.type==="hidden"&&e.getAttribute("name")===w)return e}else return e;if(e=Fn(e.nextSibling),e===null)break}return null}function r0(e,t,i){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=Fn(e.nextSibling),e===null))return null;return e}function em(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=Fn(e.nextSibling),e===null))return null;return e}function Eu(e){return e.data==="$?"||e.data==="$~"}function ku(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function s0(e,t){var i=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||i.readyState!=="loading")t();else{var a=function(){t(),i.removeEventListener("DOMContentLoaded",a)};i.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function Fn(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var Au=null;function tm(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="/$"||i==="/&"){if(t===0)return Fn(e.nextSibling);t--}else i!=="$"&&i!=="$!"&&i!=="$?"&&i!=="$~"&&i!=="&"||t++}e=e.nextSibling}return null}function nm(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var i=e.data;if(i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"){if(t===0)return e;t--}else i!=="/$"&&i!=="/&"||t++}e=e.previousSibling}return null}function im(e,t,i){switch(t=to(i),e){case"html":if(e=t.documentElement,!e)throw Error(l(452));return e;case"head":if(e=t.head,!e)throw Error(l(453));return e;case"body":if(e=t.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function Aa(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);qr(e)}var qn=new Map,rm=new Set;function no(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var ji=W.d;W.d={f:a0,r:l0,D:o0,C:c0,L:u0,m:h0,X:d0,S:f0,M:p0};function a0(){var e=ji.f(),t=Wl();return e||t}function l0(e){var t=pi(e);t!==null&&t.tag===5&&t.type==="form"?bd(t):ji.r(e)}var xs=typeof document>"u"?null:document;function sm(e,t,i){var a=xs;if(a&&typeof t=="string"&&t){var g=fn(t);g='link[rel="'+e+'"][href="'+g+'"]',typeof i=="string"&&(g+='[crossorigin="'+i+'"]'),rm.has(g)||(rm.add(g),e={rel:e,crossOrigin:i,href:t},a.querySelector(g)===null&&(t=a.createElement("link"),Gt(t,"link",e),bt(t),a.head.appendChild(t)))}}function o0(e){ji.D(e),sm("dns-prefetch",e,null)}function c0(e,t){ji.C(e,t),sm("preconnect",e,t)}function u0(e,t,i){ji.L(e,t,i);var a=xs;if(a&&e&&t){var g='link[rel="preload"][as="'+fn(t)+'"]';t==="image"&&i&&i.imageSrcSet?(g+='[imagesrcset="'+fn(i.imageSrcSet)+'"]',typeof i.imageSizes=="string"&&(g+='[imagesizes="'+fn(i.imageSizes)+'"]')):g+='[href="'+fn(e)+'"]';var w=g;switch(t){case"style":w=Es(e);break;case"script":w=ks(e)}qn.has(w)||(e=u({rel:"preload",href:t==="image"&&i&&i.imageSrcSet?void 0:e,as:t},i),qn.set(w,e),a.querySelector(g)!==null||t==="style"&&a.querySelector(Ta(w))||t==="script"&&a.querySelector(Ra(w))||(t=a.createElement("link"),Gt(t,"link",e),bt(t),a.head.appendChild(t)))}}function h0(e,t){ji.m(e,t);var i=xs;if(i&&e){var a=t&&typeof t.as=="string"?t.as:"script",g='link[rel="modulepreload"][as="'+fn(a)+'"][href="'+fn(e)+'"]',w=g;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":w=ks(e)}if(!qn.has(w)&&(e=u({rel:"modulepreload",href:e},t),qn.set(w,e),i.querySelector(g)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(i.querySelector(Ra(w)))return}a=i.createElement("link"),Gt(a,"link",e),bt(a),i.head.appendChild(a)}}}function f0(e,t,i){ji.S(e,t,i);var a=xs;if(a&&e){var g=gi(a).hoistableStyles,w=Es(e);t=t||"default";var B=g.get(w);if(!B){var P={loading:0,preload:null};if(B=a.querySelector(Ta(w)))P.loading=5;else{e=u({rel:"stylesheet",href:e,"data-precedence":t},i),(i=qn.get(w))&&Tu(e,i);var X=B=a.createElement("link");bt(X),Gt(X,"link",e),X._p=new Promise(function(oe,fe){X.onload=oe,X.onerror=fe}),X.addEventListener("load",function(){P.loading|=1}),X.addEventListener("error",function(){P.loading|=2}),P.loading|=4,io(B,t,a)}B={type:"stylesheet",instance:B,count:1,state:P},g.set(w,B)}}}function d0(e,t){ji.X(e,t);var i=xs;if(i&&e){var a=gi(i).hoistableScripts,g=ks(e),w=a.get(g);w||(w=i.querySelector(Ra(g)),w||(e=u({src:e,async:!0},t),(t=qn.get(g))&&Ru(e,t),w=i.createElement("script"),bt(w),Gt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},a.set(g,w))}}function p0(e,t){ji.M(e,t);var i=xs;if(i&&e){var a=gi(i).hoistableScripts,g=ks(e),w=a.get(g);w||(w=i.querySelector(Ra(g)),w||(e=u({src:e,async:!0,type:"module"},t),(t=qn.get(g))&&Ru(e,t),w=i.createElement("script"),bt(w),Gt(w,"link",e),i.head.appendChild(w)),w={type:"script",instance:w,count:1,state:null},a.set(g,w))}}function am(e,t,i,a){var g=(g=pe.current)?no(g):null;if(!g)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof i.precedence=="string"&&typeof i.href=="string"?(t=Es(i.href),i=gi(g).hoistableStyles,a=i.get(t),a||(a={type:"style",instance:null,count:0,state:null},i.set(t,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(i.rel==="stylesheet"&&typeof i.href=="string"&&typeof i.precedence=="string"){e=Es(i.href);var w=gi(g).hoistableStyles,B=w.get(e);if(B||(g=g.ownerDocument||g,B={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},w.set(e,B),(w=g.querySelector(Ta(e)))&&!w._p&&(B.instance=w,B.state.loading=5),qn.has(e)||(i={rel:"preload",as:"style",href:i.href,crossOrigin:i.crossOrigin,integrity:i.integrity,media:i.media,hrefLang:i.hrefLang,referrerPolicy:i.referrerPolicy},qn.set(e,i),w||m0(g,e,i,B.state))),t&&a===null)throw Error(l(528,""));return B}if(t&&a!==null)throw Error(l(529,""));return null;case"script":return t=i.async,i=i.src,typeof i=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=ks(i),i=gi(g).hoistableScripts,a=i.get(t),a||(a={type:"script",instance:null,count:0,state:null},i.set(t,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Es(e){return'href="'+fn(e)+'"'}function Ta(e){return'link[rel="stylesheet"]['+e+"]"}function lm(e){return u({},e,{"data-precedence":e.precedence,precedence:null})}function m0(e,t,i,a){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?a.loading=1:(t=e.createElement("link"),a.preload=t,t.addEventListener("load",function(){return a.loading|=1}),t.addEventListener("error",function(){return a.loading|=2}),Gt(t,"link",i),bt(t),e.head.appendChild(t))}function ks(e){return'[src="'+fn(e)+'"]'}function Ra(e){return"script[async]"+e}function om(e,t,i){if(t.count++,t.instance===null)switch(t.type){case"style":var a=e.querySelector('style[data-href~="'+fn(i.href)+'"]');if(a)return t.instance=a,bt(a),a;var g=u({},i,{"data-href":i.href,"data-precedence":i.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),bt(a),Gt(a,"style",g),io(a,i.precedence,e),t.instance=a;case"stylesheet":g=Es(i.href);var w=e.querySelector(Ta(g));if(w)return t.state.loading|=4,t.instance=w,bt(w),w;a=lm(i),(g=qn.get(g))&&Tu(a,g),w=(e.ownerDocument||e).createElement("link"),bt(w);var B=w;return B._p=new Promise(function(P,X){B.onload=P,B.onerror=X}),Gt(w,"link",a),t.state.loading|=4,io(w,i.precedence,e),t.instance=w;case"script":return w=ks(i.src),(g=e.querySelector(Ra(w)))?(t.instance=g,bt(g),g):(a=i,(g=qn.get(w))&&(a=u({},i),Ru(a,g)),e=e.ownerDocument||e,g=e.createElement("script"),bt(g),Gt(g,"link",a),e.head.appendChild(g),t.instance=g);case"void":return null;default:throw Error(l(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(a=t.instance,t.state.loading|=4,io(a,i.precedence,e));return t.instance}function io(e,t,i){for(var a=i.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),g=a.length?a[a.length-1]:null,w=g,B=0;B<a.length;B++){var P=a[B];if(P.dataset.precedence===t)w=P;else if(w!==g)break}w?w.parentNode.insertBefore(e,w.nextSibling):(t=i.nodeType===9?i.head:i,t.insertBefore(e,t.firstChild))}function Tu(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Ru(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var ro=null;function cm(e,t,i){if(ro===null){var a=new Map,g=ro=new Map;g.set(i,a)}else g=ro,a=g.get(i),a||(a=new Map,g.set(i,a));if(a.has(e))return a;for(a.set(e,null),i=i.getElementsByTagName(e),g=0;g<i.length;g++){var w=i[g];if(!(w[Bn]||w[kt]||e==="link"&&w.getAttribute("rel")==="stylesheet")&&w.namespaceURI!=="http://www.w3.org/2000/svg"){var B=w.getAttribute(t)||"";B=e+B;var P=a.get(B);P?P.push(w):a.set(B,[w])}}return a}function um(e,t,i){e=e.ownerDocument||e,e.head.insertBefore(i,t==="title"?e.querySelector("head > title"):null)}function g0(e,t,i){if(i===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;switch(t.rel){case"stylesheet":return e=t.disabled,typeof t.precedence=="string"&&e==null;default:return!0}case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function hm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function _0(e,t,i,a){if(i.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(i.state.loading&4)===0){if(i.instance===null){var g=Es(a.href),w=t.querySelector(Ta(g));if(w){t=w._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=so.bind(e),t.then(e,e)),i.state.loading|=4,i.instance=w,bt(w);return}w=t.ownerDocument||t,a=lm(a),(g=qn.get(g))&&Tu(a,g),w=w.createElement("link"),bt(w);var B=w;B._p=new Promise(function(P,X){B.onload=P,B.onerror=X}),Gt(w,"link",a),i.instance=w}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(i,t),(t=i.state.preload)&&(i.state.loading&3)===0&&(e.count++,i=so.bind(e),t.addEventListener("load",i),t.addEventListener("error",i))}}var Du=0;function v0(e,t){return e.stylesheets&&e.count===0&&lo(e,e.stylesheets),0<e.count||0<e.imgCount?function(i){var a=setTimeout(function(){if(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend){var w=e.unsuspend;e.unsuspend=null,w()}},6e4+t);0<e.imgBytes&&Du===0&&(Du=62500*Jy());var g=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&lo(e,e.stylesheets),e.unsuspend)){var w=e.unsuspend;e.unsuspend=null,w()}},(e.imgBytes>Du?50:800)+t);return e.unsuspend=i,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(g)}}:null}function so(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)lo(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var ao=null;function lo(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,ao=new Map,t.forEach(y0,e),ao=null,so.call(e))}function y0(e,t){if(!(t.state.loading&4)){var i=ao.get(e);if(i)var a=i.get(null);else{i=new Map,ao.set(e,i);for(var g=e.querySelectorAll("link[data-precedence],style[data-precedence]"),w=0;w<g.length;w++){var B=g[w];(B.nodeName==="LINK"||B.getAttribute("media")!=="not all")&&(i.set(B.dataset.precedence,B),a=B)}a&&i.set(null,a)}g=t.instance,B=g.getAttribute("data-precedence"),w=i.get(B)||a,w===a&&i.set(null,g),i.set(B,g),this.count++,a=so.bind(this),g.addEventListener("load",a),g.addEventListener("error",a),w?w.parentNode.insertBefore(g,w.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(g,e.firstChild)),t.state.loading|=4}}var Da={$$typeof:y,Provider:null,Consumer:null,_currentValue:Z,_currentValue2:Z,_threadCount:0};function S0(e,t,i,a,g,w,B,P,X){this.tag=1,this.containerInfo=e,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=wn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=wn(0),this.hiddenUpdates=wn(null),this.identifierPrefix=a,this.onUncaughtError=g,this.onCaughtError=w,this.onRecoverableError=B,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=X,this.incompleteTransitions=new Map}function fm(e,t,i,a,g,w,B,P,X,oe,fe,_e){return e=new S0(e,t,i,B,X,oe,fe,_e,P),t=1,w===!0&&(t|=24),w=kn(3,null,null,t),e.current=w,w.stateNode=e,t=cc(),t.refCount++,e.pooledCache=t,t.refCount++,w.memoizedState={element:a,isDehydrated:i,cache:t},dc(w),e}function dm(e){return e?(e=is,e):is}function pm(e,t,i,a,g,w){g=dm(g),a.context===null?a.context=g:a.pendingContext=g,a=Wi(t),a.payload={element:i},w=w===void 0?null:w,w!==null&&(a.callback=w),i=Ki(e,a,t),i!==null&&(yn(i,e,t),oa(i,e,t))}function mm(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var i=e.retryLane;e.retryLane=i!==0&&i<t?i:t}}function Mu(e,t){mm(e,t),(e=e.alternate)&&mm(e,t)}function gm(e){if(e.tag===13||e.tag===31){var t=Cr(e,67108864);t!==null&&yn(t,e,67108864),Mu(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var t=Mn();t=Fr(t);var i=Cr(e,t);i!==null&&yn(i,e,t),Mu(e,t)}}var oo=!0;function b0(e,t,i,a){var g=G.T;G.T=null;var w=W.p;try{W.p=2,Lu(e,t,i,a)}finally{W.p=w,G.T=g}}function C0(e,t,i,a){var g=G.T;G.T=null;var w=W.p;try{W.p=8,Lu(e,t,i,a)}finally{W.p=w,G.T=g}}function Lu(e,t,i,a){if(oo){var g=Ou(a);if(g===null)vu(e,t,a,co,i),ym(e,a);else if(x0(g,e,t,i,a))a.stopPropagation();else if(ym(e,a),t&4&&-1<w0.indexOf(e)){for(;g!==null;){var w=pi(g);if(w!==null)switch(w.tag){case 3:if(w=w.stateNode,w.current.memoizedState.isDehydrated){var B=on(w.pendingLanes);if(B!==0){var P=w;for(P.pendingLanes|=2,P.entangledLanes|=2;B;){var X=1<<31-Qe(B);P.entanglements[1]|=X,B&=~X}ci(w),(et&6)===0&&(Gl=tt()+500,xa(0))}}break;case 31:case 13:P=Cr(w,2),P!==null&&yn(P,w,2),Wl(),Mu(w,2)}if(w=Ou(a),w===null&&vu(e,t,a,co,i),w===g)break;g=w}g!==null&&a.stopPropagation()}else vu(e,t,a,null,i)}}function Ou(e){return e=si(e),Bu(e)}var co=null;function Bu(e){if(co=null,e=cn(e),e!==null){var t=m(e);if(t===null)e=null;else{var i=t.tag;if(i===13){if(e=f(t),e!==null)return e;e=null}else if(i===31){if(e=o(t),e!==null)return e;e=null}else if(i===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return co=e,null}function vm(e){switch(e){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(Lt()){case he:return 2;case ye:return 8;case Ae:case Me:return 32;case Oe:return 268435456;default:return 32}default:return 32}}var ju=!1,sr=null,ar=null,lr=null,Ma=new Map,La=new Map,or=[],w0="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 ym(e,t){switch(e){case"focusin":case"focusout":sr=null;break;case"dragenter":case"dragleave":ar=null;break;case"mouseover":case"mouseout":lr=null;break;case"pointerover":case"pointerout":Ma.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":La.delete(t.pointerId)}}function Oa(e,t,i,a,g,w){return e===null||e.nativeEvent!==w?(e={blockedOn:t,domEventName:i,eventSystemFlags:a,nativeEvent:w,targetContainers:[g]},t!==null&&(t=pi(t),t!==null&&gm(t)),e):(e.eventSystemFlags|=a,t=e.targetContainers,g!==null&&t.indexOf(g)===-1&&t.push(g),e)}function x0(e,t,i,a,g){switch(t){case"focusin":return sr=Oa(sr,e,t,i,a,g),!0;case"dragenter":return ar=Oa(ar,e,t,i,a,g),!0;case"mouseover":return lr=Oa(lr,e,t,i,a,g),!0;case"pointerover":var w=g.pointerId;return Ma.set(w,Oa(Ma.get(w)||null,e,t,i,a,g)),!0;case"gotpointercapture":return w=g.pointerId,La.set(w,Oa(La.get(w)||null,e,t,i,a,g)),!0}return!1}function Sm(e){var t=cn(e.target);if(t!==null){var i=m(t);if(i!==null){if(t=i.tag,t===13){if(t=f(i),t!==null){e.blockedOn=t,el(e.priority,function(){_m(i)});return}}else if(t===31){if(t=o(i),t!==null){e.blockedOn=t,el(e.priority,function(){_m(i)});return}}else if(t===3&&i.stateNode.current.memoizedState.isDehydrated){e.blockedOn=i.tag===3?i.stateNode.containerInfo:null;return}}}e.blockedOn=null}function uo(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var i=Ou(e.nativeEvent);if(i===null){i=e.nativeEvent;var a=new i.constructor(i.type,i);Wr=a,i.target.dispatchEvent(a),Wr=null}else return t=pi(i),t!==null&&gm(t),e.blockedOn=i,!1;t.shift()}return!0}function bm(e,t,i){uo(e)&&i.delete(t)}function E0(){ju=!1,sr!==null&&uo(sr)&&(sr=null),ar!==null&&uo(ar)&&(ar=null),lr!==null&&uo(lr)&&(lr=null),Ma.forEach(bm),La.forEach(bm)}function ho(e,t){e.blockedOn===t&&(e.blockedOn=null,ju||(ju=!0,n.unstable_scheduleCallback(n.unstable_NormalPriority,E0)))}var fo=null;function Cm(e){fo!==e&&(fo=e,n.unstable_scheduleCallback(n.unstable_NormalPriority,function(){fo===e&&(fo=null);for(var t=0;t<e.length;t+=3){var i=e[t],a=e[t+1],g=e[t+2];if(typeof a!="function"){if(Bu(a||i)===null)continue;break}var w=pi(i);w!==null&&(e.splice(t,3),t-=3,Oc(w,{pending:!0,data:g,method:i.method,action:a},a,g))}}))}function As(e){function t(X){return ho(X,e)}sr!==null&&ho(sr,e),ar!==null&&ho(ar,e),lr!==null&&ho(lr,e),Ma.forEach(t),La.forEach(t);for(var i=0;i<or.length;i++){var a=or[i];a.blockedOn===e&&(a.blockedOn=null)}for(;0<or.length&&(i=or[0],i.blockedOn===null);)Sm(i),i.blockedOn===null&&or.shift();if(i=(e.ownerDocument||e).$$reactFormReplay,i!=null)for(a=0;a<i.length;a+=3){var g=i[a],w=i[a+1],B=g[Ut]||null;if(typeof w=="function")B||Cm(i);else if(B){var P=null;if(w&&w.hasAttribute("formAction")){if(g=w,B=w[Ut]||null)P=B.formAction;else if(Bu(g)!==null)continue}else P=B.action;typeof P=="function"?i[a+1]=P:(i.splice(a,3),a-=3),Cm(i)}}}function wm(){function e(w){w.canIntercept&&w.info==="react-transition"&&w.intercept({handler:function(){return new Promise(function(B){return g=B})},focusReset:"manual",scroll:"manual"})}function t(){g!==null&&(g(),g=null),a||setTimeout(i,20)}function i(){if(!a&&!navigation.transition){var w=navigation.currentEntry;w&&w.url!=null&&navigation.navigate(w.url,{state:w.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,g=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(i,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),g!==null&&(g(),g=null)}}}function Nu(e){this._internalRoot=e}po.prototype.render=Nu.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(l(409));var i=t.current,a=Mn();pm(i,a,e,t,null,null)},po.prototype.unmount=Nu.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;pm(e.current,2,null,e,null,null),Wl(),t[Yn]=null}};function po(e){this._internalRoot=e}po.prototype.unstable_scheduleHydration=function(e){if(e){var t=Kn();e={blockedOn:null,target:e,priority:t};for(var i=0;i<or.length&&t!==0&&t<or[i].priority;i++);or.splice(i,0,e),i===0&&Sm(e)}};var xm=r.version;if(xm!=="19.2.6")throw Error(l(527,xm,"19.2.6"));W.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=h(t),e=e!==null?p(e):null,e=e===null?null:e.stateNode,e};var k0={bundleType:0,version:"19.2.6",rendererPackageName:"react-dom",currentDispatcherRef:G,reconcilerVersion:"19.2.6"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var mo=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!mo.isDisabled&&mo.supportsFiber)try{gt=mo.inject(k0),mt=mo}catch{}}return ja.createRoot=function(e,t){if(!d(e))throw Error(l(299));var i=!1,a="",g=Md,w=Ld,B=Od;return t!=null&&(t.unstable_strictMode===!0&&(i=!0),t.identifierPrefix!==void 0&&(a=t.identifierPrefix),t.onUncaughtError!==void 0&&(g=t.onUncaughtError),t.onCaughtError!==void 0&&(w=t.onCaughtError),t.onRecoverableError!==void 0&&(B=t.onRecoverableError)),t=fm(e,1,!1,null,null,i,a,null,g,w,B,wm),e[Yn]=t.current,_u(e),new Nu(t)},ja.hydrateRoot=function(e,t,i){if(!d(e))throw Error(l(299));var a=!1,g="",w=Md,B=Ld,P=Od,X=null;return i!=null&&(i.unstable_strictMode===!0&&(a=!0),i.identifierPrefix!==void 0&&(g=i.identifierPrefix),i.onUncaughtError!==void 0&&(w=i.onUncaughtError),i.onCaughtError!==void 0&&(B=i.onCaughtError),i.onRecoverableError!==void 0&&(P=i.onRecoverableError),i.formState!==void 0&&(X=i.formState)),t=fm(e,1,!0,t,i??null,a,g,X,w,B,P,wm),t.context=dm(null),i=t.current,a=Mn(),a=Fr(a),g=Wi(a),g.callback=null,Ki(i,g,a),i=a,t.current.lanes=i,It(t,i),ci(t),e[Yn]=t.current,_u(e),new po(t)},ja.version="19.2.6",ja}var jm;function z0(){if(jm)return Iu.exports;jm=1;function n(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(n)}catch(r){console.error(r)}}return n(),Iu.exports=H0(),Iu.exports}var I0=z0();const Ir=function(n,r){let d=n;const m=Pa[r];let f=null,o=0,c=null;const h=[],p={},u=function(R,k){o=d*4+17,f=(function(M){const j=new Array(M);for(let H=0;H<M;H+=1){j[H]=new Array(M);for(let U=0;U<M;U+=1)j[H][U]=null}return j})(o),b(0,0),b(o-7,0),b(0,o-7),E(),T(),v(R,k),d>=7&&S(R),c==null&&(c=A(d,m,h)),_(c,k)},b=function(R,k){for(let M=-1;M<=7;M+=1)if(!(R+M<=-1||o<=R+M))for(let j=-1;j<=7;j+=1)k+j<=-1||o<=k+j||(0<=M&&M<=6&&(j==0||j==6)||0<=j&&j<=6&&(M==0||M==6)||2<=M&&M<=4&&2<=j&&j<=4?f[R+M][k+j]=!0:f[R+M][k+j]=!1)},C=function(){let R=0,k=0;for(let M=0;M<8;M+=1){u(!0,M);const j=hr.getLostPoint(p);(M==0||R>j)&&(R=j,k=M)}return k},T=function(){for(let R=8;R<o-8;R+=1)f[R][6]==null&&(f[R][6]=R%2==0);for(let R=8;R<o-8;R+=1)f[6][R]==null&&(f[6][R]=R%2==0)},E=function(){const R=hr.getPatternPosition(d);for(let k=0;k<R.length;k+=1)for(let M=0;M<R.length;M+=1){const j=R[k],H=R[M];if(f[j][H]==null)for(let U=-2;U<=2;U+=1)for(let F=-2;F<=2;F+=1)U==-2||U==2||F==-2||F==2||U==0&&F==0?f[j+U][H+F]=!0:f[j+U][H+F]=!1}},S=function(R){const k=hr.getBCHTypeNumber(d);for(let M=0;M<18;M+=1){const j=!R&&(k>>M&1)==1;f[Math.floor(M/3)][M%3+o-8-3]=j}for(let M=0;M<18;M+=1){const j=!R&&(k>>M&1)==1;f[M%3+o-8-3][Math.floor(M/3)]=j}},v=function(R,k){const M=m<<3|k,j=hr.getBCHTypeInfo(M);for(let H=0;H<15;H+=1){const U=!R&&(j>>H&1)==1;H<6?f[H][8]=U:H<8?f[H+1][8]=U:f[o-15+H][8]=U}for(let H=0;H<15;H+=1){const U=!R&&(j>>H&1)==1;H<8?f[8][o-H-1]=U:H<9?f[8][15-H-1+1]=U:f[8][15-H-1]=U}f[o-8][8]=!R},_=function(R,k){let M=-1,j=o-1,H=7,U=0;const F=hr.getMaskFunction(k);for(let K=o-1;K>0;K-=2)for(K==6&&(K-=1);;){for(let Y=0;Y<2;Y+=1)if(f[j][K-Y]==null){let G=!1;U<R.length&&(G=(R[U]>>>H&1)==1),F(j,K-Y)&&(G=!G),f[j][K-Y]=G,H-=1,H==-1&&(U+=1,H=7)}if(j+=M,j<0||o<=j){j-=M,M=-M;break}}},y=function(R,k){let M=0,j=0,H=0;const U=new Array(k.length),F=new Array(k.length);for(let W=0;W<k.length;W+=1){const Z=k[W].dataCount,z=k[W].totalCount-Z;j=Math.max(j,Z),H=Math.max(H,z),U[W]=new Array(Z);for(let I=0;I<U[W].length;I+=1)U[W][I]=255&R.getBuffer()[I+M];M+=Z;const O=hr.getErrorCorrectPolynomial(z),$=Va(U[W],O.getLength()-1).mod(O);F[W]=new Array(O.getLength()-1);for(let I=0;I<F[W].length;I+=1){const re=I+$.getLength()-F[W].length;F[W][I]=re>=0?$.getAt(re):0}}let K=0;for(let W=0;W<k.length;W+=1)K+=k[W].totalCount;const Y=new Array(K);let G=0;for(let W=0;W<j;W+=1)for(let Z=0;Z<k.length;Z+=1)W<U[Z].length&&(Y[G]=U[Z][W],G+=1);for(let W=0;W<H;W+=1)for(let Z=0;Z<k.length;Z+=1)W<F[Z].length&&(Y[G]=F[Z][W],G+=1);return Y},A=function(R,k,M){const j=Nm.getRSBlocks(R,k),H=Hm();for(let F=0;F<M.length;F+=1){const K=M[F];H.put(K.getMode(),4),H.put(K.getLength(),hr.getLengthInBits(K.getMode(),R)),K.write(H)}let U=0;for(let F=0;F<j.length;F+=1)U+=j[F].dataCount;if(H.getLengthInBits()>U*8)throw"code length overflow. ("+H.getLengthInBits()+">"+U*8+")";for(H.getLengthInBits()+4<=U*8&&H.put(0,4);H.getLengthInBits()%8!=0;)H.putBit(!1);for(;!(H.getLengthInBits()>=U*8||(H.put(236,8),H.getLengthInBits()>=U*8));)H.put(17,8);return y(H,j)};p.addData=function(R,k){k=k||"Byte";let M=null;switch(k){case"Numeric":M=U0(R);break;case"Alphanumeric":M=P0(R);break;case"Byte":M=F0(R);break;case"Kanji":M=q0(R);break;default:throw"mode:"+k}h.push(M),c=null},p.isDark=function(R,k){if(R<0||o<=R||k<0||o<=k)throw R+","+k;return f[R][k]},p.getModuleCount=function(){return o},p.make=function(){if(d<1){let R=1;for(;R<40;R++){const k=Nm.getRSBlocks(R,m),M=Hm();for(let H=0;H<h.length;H++){const U=h[H];M.put(U.getMode(),4),M.put(U.getLength(),hr.getLengthInBits(U.getMode(),R)),U.write(M)}let j=0;for(let H=0;H<k.length;H++)j+=k[H].dataCount;if(M.getLengthInBits()<=j*8)break}d=R}u(!1,C())},p.createTableTag=function(R,k){R=R||2,k=typeof k>"u"?R*4:k;let M="";M+='<table style="',M+=" border-width: 0px; border-style: none;",M+=" border-collapse: collapse;",M+=" padding: 0px; margin: "+k+"px;",M+='">',M+="<tbody>";for(let j=0;j<p.getModuleCount();j+=1){M+="<tr>";for(let H=0;H<p.getModuleCount();H+=1)M+='<td style="',M+=" border-width: 0px; border-style: none;",M+=" border-collapse: collapse;",M+=" padding: 0px; margin: 0px;",M+=" width: "+R+"px;",M+=" height: "+R+"px;",M+=" background-color: ",M+=p.isDark(j,H)?"#000000":"#ffffff",M+=";",M+='"/>';M+="</tr>"}return M+="</tbody>",M+="</table>",M},p.createSvgTag=function(R,k,M,j){let H={};typeof arguments[0]=="object"&&(H=arguments[0],R=H.cellSize,k=H.margin,M=H.alt,j=H.title),R=R||2,k=typeof k>"u"?R*4:k,M=typeof M=="string"?{text:M}:M||{},M.text=M.text||null,M.id=M.text?M.id||"qrcode-description":null,j=typeof j=="string"?{text:j}:j||{},j.text=j.text||null,j.id=j.text?j.id||"qrcode-title":null;const U=p.getModuleCount()*R+k*2;let F,K,Y,G,W="",Z;for(Z="l"+R+",0 0,"+R+" -"+R+",0 0,-"+R+"z ",W+='<svg version="1.1" xmlns="http://www.w3.org/2000/svg"',W+=H.scalable?"":' width="'+U+'px" height="'+U+'px"',W+=' viewBox="0 0 '+U+" "+U+'" ',W+=' preserveAspectRatio="xMinYMin meet"',W+=j.text||M.text?' role="img" aria-labelledby="'+L([j.id,M.id].join(" ").trim())+'"':"",W+=">",W+=j.text?'<title id="'+L(j.id)+'">'+L(j.text)+"</title>":"",W+=M.text?'<description id="'+L(M.id)+'">'+L(M.text)+"</description>":"",W+='<rect width="100%" height="100%" fill="white" cx="0" cy="0"/>',W+='<path d="',Y=0;Y<p.getModuleCount();Y+=1)for(G=Y*R+k,F=0;F<p.getModuleCount();F+=1)p.isDark(Y,F)&&(K=F*R+k,W+="M"+K+","+G+Z);return W+='" stroke="transparent" fill="black"/>',W+="</svg>",W},p.createDataURL=function(R,k){R=R||2,k=typeof k>"u"?R*4:k;const M=p.getModuleCount()*R+k*2,j=k,H=M-k;return W0(M,M,function(U,F){if(j<=U&&U<H&&j<=F&&F<H){const K=Math.floor((U-j)/R),Y=Math.floor((F-j)/R);return p.isDark(Y,K)?0:1}else return 1})},p.createImgTag=function(R,k,M){R=R||2,k=typeof k>"u"?R*4:k;const j=p.getModuleCount()*R+k*2;let H="";return H+="<img",H+=' src="',H+=p.createDataURL(R,k),H+='"',H+=' width="',H+=j,H+='"',H+=' height="',H+=j,H+='"',M&&(H+=' alt="',H+=L(M),H+='"'),H+="/>",H};const L=function(R){let k="";for(let M=0;M<R.length;M+=1){const j=R.charAt(M);switch(j){case"<":k+="<";break;case">":k+=">";break;case"&":k+="&";break;case'"':k+=""";break;default:k+=j;break}}return k},D=function(R){R=typeof R>"u"?2:R;const M=p.getModuleCount()*1+R*2,j=R,H=M-R;let U,F,K,Y,G;const W={"██":"█","█ ":"▀"," █":"▄"," ":" "},Z={"██":"▀","█ ":"▀"," █":" "," ":" "};let z="";for(U=0;U<M;U+=2){for(K=Math.floor((U-j)/1),Y=Math.floor((U+1-j)/1),F=0;F<M;F+=1)G="█",j<=F&&F<H&&j<=U&&U<H&&p.isDark(K,Math.floor((F-j)/1))&&(G=" "),j<=F&&F<H&&j<=U+1&&U+1<H&&p.isDark(Y,Math.floor((F-j)/1))?G+=" ":G+="█",z+=R<1&&U+1>=H?Z[G]:W[G];z+=`
|
|
50
50
|
`}return M%2&&R>0?z.substring(0,z.length-M-1)+Array(M+1).join("▀"):z.substring(0,z.length-1)};return p.createASCII=function(R,k){if(R=R||1,R<2)return D(k);R-=1,k=typeof k>"u"?R*2:k;const M=p.getModuleCount()*R+k*2,j=k,H=M-k;let U,F,K,Y;const G=Array(R+1).join("██"),W=Array(R+1).join(" ");let Z="",z="";for(U=0;U<M;U+=1){for(K=Math.floor((U-j)/R),z="",F=0;F<M;F+=1)Y=1,j<=F&&F<H&&j<=U&&U<H&&p.isDark(K,Math.floor((F-j)/R))&&(Y=0),z+=Y?G:W;for(K=0;K<R;K+=1)Z+=z+`
|
|
51
|
-
`}return Z.substring(0,Z.length-1)},p.renderTo2dContext=function(R,k){k=k||2;const M=p.getModuleCount();for(let j=0;j<M;j++)for(let H=0;H<M;H++)R.fillStyle=p.isDark(j,H)?"black":"white",R.fillRect(H*k,j*k,k,k)},p};Ir.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const l=n.charCodeAt(s);r.push(l&255)}return r};Ir.createStringToBytes=function(n,r){const s=(function(){const d=V0(n),m=function(){const c=d.read();if(c==-1)throw"eof";return c};let f=0;const o={};for(;;){const c=d.read();if(c==-1)break;const h=m(),p=m(),u=m(),b=String.fromCharCode(c<<8|h),C=p<<8|u;o[b]=C,f+=1}if(f!=r)throw f+" != "+r;return o})(),l=63;return function(d){const m=[];for(let f=0;f<d.length;f+=1){const o=d.charCodeAt(f);if(o<128)m.push(o);else{const c=s[d.charAt(f)];typeof c=="number"?(c&255)==c?m.push(c):(m.push(c>>>8),m.push(c&255)):m.push(l)}}return m}};const Qt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Pa={L:1,M:0,Q:3,H:2},ur={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},hr=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,l=21522,d={},m=function(f){let o=0;for(;f!=0;)o+=1,f>>>=1;return o};return d.getBCHTypeInfo=function(f){let o=f<<10;for(;m(o)-m(r)>=0;)o^=r<<m(o)-m(r);return(f<<10|o)^l},d.getBCHTypeNumber=function(f){let o=f<<12;for(;m(o)-m(s)>=0;)o^=s<<m(o)-m(s);return f<<12|o},d.getPatternPosition=function(f){return n[f-1]},d.getMaskFunction=function(f){switch(f){case ur.PATTERN000:return function(o,c){return(o+c)%2==0};case ur.PATTERN001:return function(o,c){return o%2==0};case ur.PATTERN010:return function(o,c){return c%3==0};case ur.PATTERN011:return function(o,c){return(o+c)%3==0};case ur.PATTERN100:return function(o,c){return(Math.floor(o/2)+Math.floor(c/3))%2==0};case ur.PATTERN101:return function(o,c){return o*c%2+o*c%3==0};case ur.PATTERN110:return function(o,c){return(o*c%2+o*c%3)%2==0};case ur.PATTERN111:return function(o,c){return(o*c%3+(o+c)%2)%2==0};default:throw"bad maskPattern:"+f}},d.getErrorCorrectPolynomial=function(f){let o=Va([1],0);for(let c=0;c<f;c+=1)o=o.multiply(Va([1,dr.gexp(c)],0));return o},d.getLengthInBits=function(f,o){if(1<=o&&o<10)switch(f){case Qt.MODE_NUMBER:return 10;case Qt.MODE_ALPHA_NUM:return 9;case Qt.MODE_8BIT_BYTE:return 8;case Qt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(o<27)switch(f){case Qt.MODE_NUMBER:return 12;case Qt.MODE_ALPHA_NUM:return 11;case Qt.MODE_8BIT_BYTE:return 16;case Qt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(o<41)switch(f){case Qt.MODE_NUMBER:return 14;case Qt.MODE_ALPHA_NUM:return 13;case Qt.MODE_8BIT_BYTE:return 16;case Qt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+o},d.getLostPoint=function(f){const o=f.getModuleCount();let c=0;for(let u=0;u<o;u+=1)for(let b=0;b<o;b+=1){let C=0;const T=f.isDark(u,b);for(let E=-1;E<=1;E+=1)if(!(u+E<0||o<=u+E))for(let S=-1;S<=1;S+=1)b+S<0||o<=b+S||E==0&&S==0||T==f.isDark(u+E,b+S)&&(C+=1);C>5&&(c+=3+C-5)}for(let u=0;u<o-1;u+=1)for(let b=0;b<o-1;b+=1){let C=0;f.isDark(u,b)&&(C+=1),f.isDark(u+1,b)&&(C+=1),f.isDark(u,b+1)&&(C+=1),f.isDark(u+1,b+1)&&(C+=1),(C==0||C==4)&&(c+=3)}for(let u=0;u<o;u+=1)for(let b=0;b<o-6;b+=1)f.isDark(u,b)&&!f.isDark(u,b+1)&&f.isDark(u,b+2)&&f.isDark(u,b+3)&&f.isDark(u,b+4)&&!f.isDark(u,b+5)&&f.isDark(u,b+6)&&(c+=40);for(let u=0;u<o;u+=1)for(let b=0;b<o-6;b+=1)f.isDark(b,u)&&!f.isDark(b+1,u)&&f.isDark(b+2,u)&&f.isDark(b+3,u)&&f.isDark(b+4,u)&&!f.isDark(b+5,u)&&f.isDark(b+6,u)&&(c+=40);let h=0;for(let u=0;u<o;u+=1)for(let b=0;b<o;b+=1)f.isDark(b,u)&&(h+=1);const p=Math.abs(100*h/o/o-50)/5;return c+=p*10,c},d})(),dr=(function(){const n=new Array(256),r=new Array(256);for(let l=0;l<8;l+=1)n[l]=1<<l;for(let l=8;l<256;l+=1)n[l]=n[l-4]^n[l-5]^n[l-6]^n[l-8];for(let l=0;l<255;l+=1)r[n[l]]=l;const s={};return s.glog=function(l){if(l<1)throw"glog("+l+")";return r[l]},s.gexp=function(l){for(;l<0;)l+=255;for(;l>=256;)l-=255;return n[l]},s})(),Va=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let d=0;for(;d<n.length&&n[d]==0;)d+=1;const m=new Array(n.length-d+r);for(let f=0;f<n.length-d;f+=1)m[f]=n[f+d];return m})(),l={};return l.getAt=function(d){return s[d]},l.getLength=function(){return s.length},l.multiply=function(d){const m=new Array(l.getLength()+d.getLength()-1);for(let f=0;f<l.getLength();f+=1)for(let o=0;o<d.getLength();o+=1)m[f+o]^=dr.gexp(dr.glog(l.getAt(f))+dr.glog(d.getAt(o)));return Va(m,0)},l.mod=function(d){if(l.getLength()-d.getLength()<0)return l;const m=dr.glog(l.getAt(0))-dr.glog(d.getAt(0)),f=new Array(l.getLength());for(let o=0;o<l.getLength();o+=1)f[o]=l.getAt(o);for(let o=0;o<d.getLength();o+=1)f[o]^=dr.gexp(dr.glog(d.getAt(o))+m);return Va(f,0).mod(d)},l},Nm=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(d,m){const f={};return f.totalCount=d,f.dataCount=m,f},s={},l=function(d,m){switch(m){case Pa.L:return n[(d-1)*4+0];case Pa.M:return n[(d-1)*4+1];case Pa.Q:return n[(d-1)*4+2];case Pa.H:return n[(d-1)*4+3];default:return}};return s.getRSBlocks=function(d,m){const f=l(d,m);if(typeof f>"u")throw"bad rs block @ typeNumber:"+d+"/errorCorrectionLevel:"+m;const o=f.length/3,c=[];for(let h=0;h<o;h+=1){const p=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let C=0;C<p;C+=1)c.push(r(u,b))}return c},s})(),Hm=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(l){const d=Math.floor(l/8);return(n[d]>>>7-l%8&1)==1},s.put=function(l,d){for(let m=0;m<d;m+=1)s.putBit((l>>>d-m-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(l){const d=Math.floor(r/8);n.length<=d&&n.push(0),l&&(n[d]|=128>>>r%8),r+=1},s},P0=function(n){const r=Qt.MODE_NUMBER,s=n,l={};l.getMode=function(){return r},l.getLength=function(f){return s.length},l.write=function(f){const o=s;let c=0;for(;c+2<o.length;)f.put(d(o.substring(c,c+3)),10),c+=3;c<o.length&&(o.length-c==1?f.put(d(o.substring(c,c+1)),4):o.length-c==2&&f.put(d(o.substring(c,c+2)),7))};const d=function(f){let o=0;for(let c=0;c<f.length;c+=1)o=o*10+m(f.charAt(c));return o},m=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return l},F0=function(n){const r=Qt.MODE_ALPHA_NUM,s=n,l={};l.getMode=function(){return r},l.getLength=function(m){return s.length},l.write=function(m){const f=s;let o=0;for(;o+1<f.length;)m.put(d(f.charAt(o))*45+d(f.charAt(o+1)),11),o+=2;o<f.length&&m.put(d(f.charAt(o)),6)};const d=function(m){if("0"<=m&&m<="9")return m.charCodeAt(0)-48;if("A"<=m&&m<="Z")return m.charCodeAt(0)-65+10;switch(m){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+m}};return l},q0=function(n){const r=Qt.MODE_8BIT_BYTE,s=Ir.stringToBytes(n),l={};return l.getMode=function(){return r},l.getLength=function(d){return s.length},l.write=function(d){for(let m=0;m<s.length;m+=1)d.put(s[m],8)},l},$0=function(n){const r=Qt.MODE_KANJI,s=Ir.stringToBytes;(function(m,f){const o=s(m);if(o.length!=2||(o[0]<<8|o[1])!=f)throw"sjis not supported."})("友",38726);const l=s(n),d={};return d.getMode=function(){return r},d.getLength=function(m){return~~(l.length/2)},d.write=function(m){const f=l;let o=0;for(;o+1<f.length;){let c=(255&f[o])<<8|255&f[o+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(o+1)+"/"+c;c=(c>>>8&255)*192+(c&255),m.put(c,13),o+=2}if(o<f.length)throw"illegal char at "+(o+1)},d},Xg=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,l,d){l=l||0,d=d||s.length;for(let m=0;m<d;m+=1)r.writeByte(s[m+l])},r.writeString=function(s){for(let l=0;l<s.length;l+=1)r.writeByte(s.charCodeAt(l))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let l=0;l<n.length;l+=1)l>0&&(s+=","),s+=n[l];return s+="]",s},r},G0=function(){let n=0,r=0,s=0,l="";const d={},m=function(o){l+=String.fromCharCode(f(o&63))},f=function(o){if(o<0)throw"n:"+o;if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47;throw"n:"+o};return d.writeByte=function(o){for(n=n<<8|o&255,r+=8,s+=1;r>=6;)m(n>>>r-6),r-=6},d.flush=function(){if(r>0&&(m(n<<6-r),n=0,r=0),s%3!=0){const o=3-s%3;for(let c=0;c<o;c+=1)l+="="}},d.toString=function(){return l},d},V0=function(n){const r=n;let s=0,l=0,d=0;const m={};m.read=function(){for(;d<8;){if(s>=r.length){if(d==0)return-1;throw"unexpected end of file./"+d}const c=r.charAt(s);if(s+=1,c=="=")return d=0,-1;if(c.match(/^\s$/))continue;l=l<<6|f(c.charCodeAt(0)),d+=6}const o=l>>>d-8&255;return d-=8,o};const f=function(o){if(65<=o&&o<=90)return o-65;if(97<=o&&o<=122)return o-97+26;if(48<=o&&o<=57)return o-48+52;if(o==43)return 62;if(o==47)return 63;throw"c:"+o};return m},W0=function(n,r){const s=n,l=r,d=new Array(n*r),m={};m.setPixel=function(h,p,u){d[p*s+h]=u},m.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(l),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(l),h.writeByte(0);const p=2,u=o(p);h.writeByte(p);let b=0;for(;u.length-b>255;)h.writeByte(255),h.writeBytes(u,b,255),b+=255;h.writeByte(u.length-b),h.writeBytes(u,b,u.length-b),h.writeByte(0),h.writeString(";")};const f=function(h){const p=h;let u=0,b=0;const C={};return C.write=function(T,E){if(T>>>E)throw"length over";for(;u+E>=8;)p.writeByte(255&(T<<u|b)),E-=8-u,T>>>=8-u,b=0,u=0;b=T<<u|b,u=u+E},C.flush=function(){u>0&&p.writeByte(b)},C},o=function(h){const p=1<<h,u=(1<<h)+1;let b=h+1;const C=c();for(let _=0;_<p;_+=1)C.add(String.fromCharCode(_));C.add(String.fromCharCode(p)),C.add(String.fromCharCode(u));const T=Xg(),E=f(T);E.write(p,b);let S=0,v=String.fromCharCode(d[S]);for(S+=1;S<d.length;){const _=String.fromCharCode(d[S]);S+=1,C.contains(v+_)?v=v+_:(E.write(C.indexOf(v),b),C.size()<4095&&(C.size()==1<<b&&(b+=1),C.add(v+_)),v=_)}return E.write(C.indexOf(v),b),E.write(u,b),E.flush(),T.toByteArray()},c=function(){const h={};let p=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=p,p+=1},u.size=function(){return p},u.indexOf=function(b){return h[b]},u.contains=function(b){return typeof h[b]<"u"},u};return m},K0=function(n,r,s){const l=W0(n,r);for(let o=0;o<r;o+=1)for(let c=0;c<n;c+=1)l.setPixel(c,o,s(c,o));const d=Xg();l.write(d);const m=G0(),f=d.toByteArray();for(let o=0;o<f.length;o+=1)m.writeByte(f[o]);return m.flush(),"data:image/gif;base64,"+m};Ir.stringToBytes;const Wa=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],Qg={name:"gate-reviewer",label:"Gate Reviewer",commandAgent:"gate-reviewer",dispatchable:!1},Ns=[...Wa,Qg],Y0={name:"translator",label:"Translator",commandAgent:"translator",dispatchable:!1},X0={name:"harness-engineer",label:"Harness Engineer",commandAgent:"harness-engineer",dispatchable:!1},Jg=[Y0,X0],Dh=[...Ns,...Jg];Wa.map(n=>n.name);const Zg=Ns.map(n=>n.name);Jg.map(n=>n.name);Dh.map(n=>n.name);Dh.filter(n=>n.dispatchable).map(n=>n.name);function Q0(n){return Zg.includes(n)}const J0="zh-CN",Z0="pm-final-only",e_=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}],e1=[{value:"pm-final-only",label:"PM final reply"},{value:"final-only",label:"Each role final reply"},{value:"all",label:"All replies"}];function t1(){const n={};for(const r of Zg)n[r]={permissionMode:"bypassPermissions",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function n1({sidebar:n,children:r}){const[s,l]=te.useState(!1);return x.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[x.jsxs("aside",{className:"app-sidebar",children:[x.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>l(d=>!d)}),x.jsx("div",{className:"sidebar-content",children:n})]}),x.jsx("main",{className:"app-main",children:r})]})}function i1({busy:n,state:r,onApprove:s,onCancel:l,onComment:d,onReject:m}){var _;const[f,o]=te.useState(!1),[c,h]=te.useState(""),[p,u]=te.useState(null);if(!r||r.status==="idle")return null;const b=r.active,C=r1(r);if(p===C)return null;const T=r.status==="awaiting_user_approval",E=(b==null?void 0:b.title)??((_=r.pending[0])==null?void 0:_.title)??"Harness feedback",S=(b==null?void 0:b.source)==="task-retrospective"?"Task Harness Review":"Harness Feedback",v=()=>{o(!1),u(C)};return x.jsxs(x.Fragment,{children:[x.jsxs("section",{className:T?"harness-feedback-float needs-review":"harness-feedback-float",children:[x.jsxs("div",{children:[x.jsx("strong",{children:T?`${S} needed`:S}),x.jsx("span",{children:s1(r)})]}),x.jsx("p",{title:E,children:E}),x.jsxs("div",{className:"harness-feedback-float-actions",children:[x.jsx("button",{type:"button",disabled:n,onClick:v,children:"Close"}),x.jsx("button",{type:"button",disabled:n||!b,onClick:()=>o(!0),children:T?"Review":"Open"})]})]}),f&&b?x.jsx("div",{className:"modal-backdrop harness-feedback-backdrop",children:x.jsxs("section",{className:"harness-feedback-modal",role:"dialog","aria-modal":"true","aria-label":"Harness feedback review",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:S}),x.jsxs("p",{className:"muted",children:[r.status.replaceAll("_"," ")," · queued ",r.queuedCount]})]}),x.jsx("button",{type:"button",onClick:()=>o(!1),children:"Close"})]}),x.jsxs("div",{className:"harness-feedback-modal-body",children:[x.jsxs("section",{children:[x.jsx("h3",{children:b.source==="task-retrospective"?"Task Retrospective Request":"Feedback"}),x.jsx("pre",{children:b.feedbackContent||"No feedback content found."})]}),x.jsxs("section",{children:[x.jsx("h3",{children:"Harness Engineer Analysis"}),x.jsx("pre",{children:b.analysisContent||"Analysis is not available yet."})]})]}),T?x.jsxs("footer",{className:"harness-feedback-review-actions",children:[x.jsx("textarea",{value:c,placeholder:"Optional note for Harness Engineer...",onChange:y=>h(y.target.value)}),x.jsxs("div",{children:[x.jsx("button",{type:"button",disabled:n,onClick:()=>d(c),children:"Send Feedback"}),x.jsx("button",{type:"button",disabled:n,onClick:()=>m(c),children:"Reject"}),x.jsx("button",{type:"button",disabled:n,onClick:()=>s(c),children:"Approve"})]})]}):b?x.jsxs("footer",{className:"harness-feedback-review-actions",children:[x.jsx("textarea",{value:c,placeholder:"Optional cancellation note...",onChange:y=>h(y.target.value)}),x.jsx("div",{children:x.jsx("button",{type:"button",disabled:n,onClick:()=>l(c),children:"Cancel"})})]}):null]})}):null]})}function r1(n){if(n.active)return["active",n.status,n.active.id,n.active.path,n.active.updatedAt??"",n.active.analysisPath??"",n.active.applyReportPath??""].join(":");const r=n.pending[0];return r?["pending",n.status,r.id,r.path,n.queuedCount].join(":"):[n.status,n.queuedCount].join(":")}function s1(n){return n.status==="queued"?`${n.queuedCount} queued`:n.status==="awaiting_user_approval"?"waiting for approval":n.status==="analyzing"?"Harness Engineer analyzing":n.status==="applying"?"Harness Engineer applying":n.status}function Lo(n,r="Unknown error."){if(n instanceof Error)return n.message||r;if(typeof n=="string"&&n.trim())return n;if(n===void 0)return r;try{return JSON.stringify(n)}catch{return String(n)}}function pt(n,r,s){return`${n} failed. Reason: ${Lo(r,s)}`}function xo(n,r){return r.some(s=>n.startsWith(`${s} failed.`))?"":n}const Se={getAppPreferences(){return Ce("/api/settings/preferences")},updateAppPreferences(n){return Ce("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Ce("/api/diagnostics/runtime")},getCurrentProject(){return Ce("/api/projects/current")},pullCurrentProject(){return Ce("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Ce("/api/projects/recent")},connectProject(n){return Ce("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Ce("/api/tasks")},createTask(n){return Ce("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(n){const r=new URLSearchParams({taskSlug:n});return Ce(`/api/projects/harness?${r.toString()}`)},applyHarness(n){return Ce("/api/projects/harness/apply",{method:"POST",body:JSON.stringify(n)})},getHarnessFileContent(n,r){const s=new URLSearchParams({path:r,taskSlug:n});return Ce(`/api/projects/harness/file?${s.toString()}`)},updateHarnessFileContent(n,r,s){const l=new URLSearchParams({path:r,taskSlug:n});return Ce(`/api/projects/harness/file?${l.toString()}`,{method:"PUT",body:JSON.stringify(s)})},getRepositoryDiff(n,r){const s=new URLSearchParams({taskSlug:n});return r&&s.set("commit",r),Ce(`/api/projects/harness/repository-diff?${s.toString()}`)},getRepositoryFileDiff(n,r){const s=new URLSearchParams({taskSlug:n,path:r});return Ce(`/api/projects/harness/repository-diff/file?${s.toString()}`)},mergeRepositoryDiffToCurrentBranch(n){return Ce("/api/projects/harness/repository-diff/merge-to-current-branch",{method:"POST",body:JSON.stringify({taskSlug:n})})},getHarnessBootstrapStatus(n){const r=new URLSearchParams({taskSlug:n});return Ce(`/api/projects/harness/bootstrap?${r.toString()}`)},startHarnessBootstrap(n={}){return Ce("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},restartHarnessBootstrap(n={}){return Ce("/api/projects/harness/bootstrap/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessBootstrap(){return Ce("/api/projects/harness/bootstrap/stop",{method:"POST"})},runHarnessBootstrap(n){return Ce("/api/projects/harness/bootstrap/run",{method:"POST",body:JSON.stringify(n)})},getHarnessEngineerSession(){return Ce("/api/projects/harness/engineer/session")},ensureHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/ensure",{method:"POST",body:JSON.stringify(n)})},startHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/start",{method:"POST",body:JSON.stringify(n)})},resumeHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/resume",{method:"POST",body:JSON.stringify(n)})},restartHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessEngineerSession(){return Ce("/api/projects/harness/engineer/session/stop",{method:"POST"})},notifyHarnessEngineerHarnessUpdated(){return Ce("/api/projects/harness/engineer/session/notify-harness",{method:"POST"})},getHarnessFeedbackState(n){const r=new URLSearchParams;n&&r.set("taskSlug",n);const s=r.toString();return Ce(`/api/projects/harness/feedback${s?`?${s}`:""}`)},decideHarnessFeedback(n){return Ce("/api/projects/harness/feedback/decision",{method:"POST",body:JSON.stringify(n)})},startTaskHarnessRetrospective(n){return Ce("/api/projects/harness/task-retrospective",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/status`)},oneClickStart(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/one-click-start`,{method:"POST"})},getTaskWorkspaceState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/workspace-state`)},getProjectRuntimeState(n){const r=new URLSearchParams;n&&r.set("taskSlug",n);const s=r.toString();return Ce(`/api/projects/runtime-state${s?`?${s}`:""}`)},listSessions(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},notifyRoleHarnessUpdated(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/notify-harness`,{method:"POST"})},dispatchRoleCommand(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/round`)},getGateReviewState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review`)},updateGateReviewSettings(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestGateReviewGate(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/request`,{method:"POST"})},retryGateReviewGate(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/retry`,{method:"POST"})},skipGateReviewGate(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideGateReviewGate(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getGateReviewReport(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/report`)},startTranslationSession(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const l=new URLSearchParams({after:String(r)});return s!==void 0&&l.set("limit",String(s)),Ce(`/api/translation/sessions/${encodeURIComponent(n)}/events?${l.toString()}`)},pollTranslationTaskFeed(n,r,s){const l=new URLSearchParams({after:String(r)});return s!==void 0&&l.set("limit",String(s)),Ce(`/api/tasks/${encodeURIComponent(n)}/translation/feed?${l.toString()}`)},translateUserInput(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},translateManualOutput(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/manual-output`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},notifyTranslatorHarnessUpdated(){return Ce("/api/projects/translation/session/notify-harness",{method:"POST"})},retryTranslation(n,r){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getTranslationState(){return Ce("/api/translation/state")},getTranslatorSession(){return Ce("/api/translation/session")},ensureTranslatorSession(n={}){return Ce("/api/translation/session/ensure",{method:"POST",body:JSON.stringify(n)})},startTranslatorSession(n={}){return Ce("/api/translation/session/start",{method:"POST",body:JSON.stringify(n)})},resumeTranslatorSession(n={}){return Ce("/api/translation/session/resume",{method:"POST",body:JSON.stringify(n)})},restartTranslatorSession(n={}){return Ce("/api/translation/session/restart",{method:"POST",body:JSON.stringify(n)})},stopTranslatorSession(){return Ce("/api/translation/session/stop",{method:"POST"})},browseTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return Ce(`/api/translation/source-files${s}`)},createFileTranslation(n){return Ce("/api/translation/files",{method:"POST",body:JSON.stringify(n)})},readFileTranslation(n){return Ce(`/api/translation/files/${encodeURIComponent(n)}`)},createTranslationBootstrap(n){return Ce("/api/translation/bootstrap",{method:"POST",body:JSON.stringify(n)})},createTranslationMemoryUpdate(n){return Ce("/api/translation/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteTranslation(n,r){return Ce(`/api/translation/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Ce("/api/gateway/status")},updateGatewaySettings(n){return Ce("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Ce("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Ce("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},startGatewayLarkRegistration(){return Ce("/api/gateway/lark-registration/start",{method:"POST"})},checkGatewayLarkRegistration(){return Ce("/api/gateway/lark-registration/check",{method:"POST"})},bindGatewayLarkApp(n){return Ce("/api/gateway/lark-registration/bind",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Ce("/api/gateway/binding/reset",{method:"POST"})}};async function Ce(n,r={}){var m,f,o;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const l=(r.method??"GET").toUpperCase();let d;try{d=await fetch(n,{...r,headers:s})}catch(c){throw new Error(`${l} ${n} could not reach the VCM backend. Reason: ${Lo(c)}`)}if(!d.ok){const c=await d.text().catch(()=>""),h=a1(c),p=d.statusText?`${d.status} ${d.statusText}`:String(d.status),b=((m=h==null?void 0:h.error)!=null&&m.hint?`${h.error.message??"Backend error."} ${h.error.hint}`:(f=h==null?void 0:h.error)==null?void 0:f.message)??l1(c),C=(o=h==null?void 0:h.error)==null?void 0:o.runtime,T=C?` [backend ${C.version??"unknown"} pid=${C.pid??"unknown"} cwd=${C.cwd??"unknown"}]`:"";throw new Error(`${l} ${n} returned HTTP ${p}. ${b}${T}`)}return d.json()}function a1(n){if(!n.trim())return null;try{return JSON.parse(n)}catch{return null}}function l1(n){const r=n.trim();return r?`Non-JSON response body: ${r.slice(0,500)}`:"The response body was empty."}const uh="vcm:ui-error-report",hh="vcm:ui-error-clear-actions",fh="vcm:ui-error-clear-message";function o1(n){const r=n.trim();!r||typeof window>"u"||window.dispatchEvent(new CustomEvent(uh,{detail:{message:r}}))}function c1(n){const r=n.trim();!r||typeof window>"u"||window.dispatchEvent(new CustomEvent(fh,{detail:{message:r}}))}function u1(n){n.length===0||typeof window>"u"||window.dispatchEvent(new CustomEvent(hh,{detail:{actions:n}}))}function Hi(n){const[r,s]=te.useState(n),l=te.useRef(n),d=te.useCallback(m=>{const f=l.current,o=typeof m=="function"?m(f):m;l.current=o,typeof o=="string"&&o.trim()?o1(o):typeof f=="string"&&f.trim()&&c1(f),s(o)},[]);return[r,d]}var qu={exports:{}},zm;function h1(){return zm||(zm=1,(function(n,r){(function(s,l){n.exports=l()})(self,(()=>(()=>{var s={};return(()=>{var l=s;Object.defineProperty(l,"__esModule",{value:!0}),l.FitAddon=void 0,l.FitAddon=class{activate(d){this._terminal=d}dispose(){}fit(){const d=this.proposeDimensions();if(!d||!this._terminal||isNaN(d.cols)||isNaN(d.rows))return;const m=this._terminal._core;this._terminal.rows===d.rows&&this._terminal.cols===d.cols||(m._renderService.clear(),this._terminal.resize(d.cols,d.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const d=this._terminal._core,m=d._renderService.dimensions;if(m.css.cell.width===0||m.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:d.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),h=Math.max(0,parseInt(o.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),u=c-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),b=h-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(b/m.css.cell.width)),rows:Math.max(1,Math.floor(u/m.css.cell.height))}}}})(),s})()))})(qu)),qu.exports}var f1=h1(),$u={exports:{}},Im;function d1(){return Im||(Im=1,(function(n,r){(function(s,l){n.exports=l()})(self,(()=>(()=>{var s={6:(f,o)=>{function c(p){try{const u=new URL(p),b=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return p.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(p,u,b,C={}){this._terminal=p,this._regex=u,this._handler=b,this._options=C}provideLinks(p,u){const b=h.computeLink(p,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(p){return p.map((u=>(u.leave=this._options.leave,u.hover=(b,C)=>{if(this._options.hover){const{range:T}=u;this._options.hover(b,C,T)}},u)))}};class h{static computeLink(u,b,C,T){const E=new RegExp(b.source,(b.flags||"")+"g"),[S,v]=h._getWindowedLineStrings(u-1,C),_=S.join("");let y;const A=[];for(;y=E.exec(_);){const L=y[0];if(!c(L))continue;const[D,R]=h._mapStrIdx(C,v,0,y.index),[k,M]=h._mapStrIdx(C,D,R,L.length);if(D===-1||R===-1||k===-1||M===-1)continue;const j={start:{x:R+1,y:D+1},end:{x:M,y:k+1}};A.push({range:j,text:L,activate:T})}return A}static _getWindowedLineStrings(u,b){let C,T=u,E=u,S=0,v="";const _=[];if(C=b.buffer.active.getLine(u)){const y=C.translateToString(!0);if(C.isWrapped&&y[0]!==" "){for(S=0;(C=b.buffer.active.getLine(--T))&&S<2048&&(v=C.translateToString(!0),S+=v.length,_.push(v),C.isWrapped&&v.indexOf(" ")===-1););_.reverse()}for(_.push(y),S=0;(C=b.buffer.active.getLine(++E))&&C.isWrapped&&S<2048&&(v=C.translateToString(!0),S+=v.length,_.push(v),v.indexOf(" ")===-1););}return[_,T]}static _mapStrIdx(u,b,C,T){const E=u.buffer.active,S=E.getNullCell();let v=C;for(;T;){const _=E.getLine(b);if(!_)return[-1,-1];for(let y=v;y<_.length;++y){_.getCell(y,S);const A=S.getChars();if(S.getWidth()&&(T-=A.length||1,y===_.length-1&&A==="")){const L=E.getLine(b+1);L&&L.isWrapped&&(L.getCell(0,S),S.getWidth()===2&&(T+=1))}if(T<0)return[b,y]}b++,v=0}return[b,v]}}o.LinkComputer=h}},l={};function d(f){var o=l[f];if(o!==void 0)return o.exports;var c=l[f]={exports:{}};return s[f](c,c.exports,d),c.exports}var m={};return(()=>{var f=m;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const o=d(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(p,u){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(p=h,u={}){this._handler=p,this._options=u}activate(p){this._terminal=p;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),m})()))})($u)),$u.exports}var p1=d1(),Gu={exports:{}},Um;function m1(){return Um||(Um=1,(function(n,r){(function(s,l){n.exports=l()})(globalThis,(()=>(()=>{var s={4567:function(f,o,c){var h=this&&this.__decorate||function(_,y,A,L){var D,R=arguments.length,k=R<3?y:L===null?L=Object.getOwnPropertyDescriptor(y,A):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,A,L);else for(var M=_.length-1;M>=0;M--)(D=_[M])&&(k=(R<3?D(k):R>3?D(y,A,k):D(y,A))||k);return R>3&&k&&Object.defineProperty(y,A,k),k},p=this&&this.__param||function(_,y){return function(A,L){y(A,L,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const u=c(9042),b=c(9924),C=c(844),T=c(4725),E=c(2585),S=c(3656);let v=o.AccessibilityManager=class extends C.Disposable{constructor(_,y,A,L){super(),this._terminal=_,this._coreBrowserService=A,this._renderService=L,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new b.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
51
|
+
`}return Z.substring(0,Z.length-1)},p.renderTo2dContext=function(R,k){k=k||2;const M=p.getModuleCount();for(let j=0;j<M;j++)for(let H=0;H<M;H++)R.fillStyle=p.isDark(j,H)?"black":"white",R.fillRect(H*k,j*k,k,k)},p};Ir.stringToBytes=function(n){const r=[];for(let s=0;s<n.length;s+=1){const l=n.charCodeAt(s);r.push(l&255)}return r};Ir.createStringToBytes=function(n,r){const s=(function(){const d=G0(n),m=function(){const c=d.read();if(c==-1)throw"eof";return c};let f=0;const o={};for(;;){const c=d.read();if(c==-1)break;const h=m(),p=m(),u=m(),b=String.fromCharCode(c<<8|h),C=p<<8|u;o[b]=C,f+=1}if(f!=r)throw f+" != "+r;return o})(),l=63;return function(d){const m=[];for(let f=0;f<d.length;f+=1){const o=d.charCodeAt(f);if(o<128)m.push(o);else{const c=s[d.charAt(f)];typeof c=="number"?(c&255)==c?m.push(c):(m.push(c>>>8),m.push(c&255)):m.push(l)}}return m}};const Xt={MODE_NUMBER:1,MODE_ALPHA_NUM:2,MODE_8BIT_BYTE:4,MODE_KANJI:8},Pa={L:1,M:0,Q:3,H:2},ur={PATTERN000:0,PATTERN001:1,PATTERN010:2,PATTERN011:3,PATTERN100:4,PATTERN101:5,PATTERN110:6,PATTERN111:7},hr=(function(){const n=[[],[6,18],[6,22],[6,26],[6,30],[6,34],[6,22,38],[6,24,42],[6,26,46],[6,28,50],[6,30,54],[6,32,58],[6,34,62],[6,26,46,66],[6,26,48,70],[6,26,50,74],[6,30,54,78],[6,30,56,82],[6,30,58,86],[6,34,62,90],[6,28,50,72,94],[6,26,50,74,98],[6,30,54,78,102],[6,28,54,80,106],[6,32,58,84,110],[6,30,58,86,114],[6,34,62,90,118],[6,26,50,74,98,122],[6,30,54,78,102,126],[6,26,52,78,104,130],[6,30,56,82,108,134],[6,34,60,86,112,138],[6,30,58,86,114,142],[6,34,62,90,118,146],[6,30,54,78,102,126,150],[6,24,50,76,102,128,154],[6,28,54,80,106,132,158],[6,32,58,84,110,136,162],[6,26,54,82,110,138,166],[6,30,58,86,114,142,170]],r=1335,s=7973,l=21522,d={},m=function(f){let o=0;for(;f!=0;)o+=1,f>>>=1;return o};return d.getBCHTypeInfo=function(f){let o=f<<10;for(;m(o)-m(r)>=0;)o^=r<<m(o)-m(r);return(f<<10|o)^l},d.getBCHTypeNumber=function(f){let o=f<<12;for(;m(o)-m(s)>=0;)o^=s<<m(o)-m(s);return f<<12|o},d.getPatternPosition=function(f){return n[f-1]},d.getMaskFunction=function(f){switch(f){case ur.PATTERN000:return function(o,c){return(o+c)%2==0};case ur.PATTERN001:return function(o,c){return o%2==0};case ur.PATTERN010:return function(o,c){return c%3==0};case ur.PATTERN011:return function(o,c){return(o+c)%3==0};case ur.PATTERN100:return function(o,c){return(Math.floor(o/2)+Math.floor(c/3))%2==0};case ur.PATTERN101:return function(o,c){return o*c%2+o*c%3==0};case ur.PATTERN110:return function(o,c){return(o*c%2+o*c%3)%2==0};case ur.PATTERN111:return function(o,c){return(o*c%3+(o+c)%2)%2==0};default:throw"bad maskPattern:"+f}},d.getErrorCorrectPolynomial=function(f){let o=Va([1],0);for(let c=0;c<f;c+=1)o=o.multiply(Va([1,dr.gexp(c)],0));return o},d.getLengthInBits=function(f,o){if(1<=o&&o<10)switch(f){case Xt.MODE_NUMBER:return 10;case Xt.MODE_ALPHA_NUM:return 9;case Xt.MODE_8BIT_BYTE:return 8;case Xt.MODE_KANJI:return 8;default:throw"mode:"+f}else if(o<27)switch(f){case Xt.MODE_NUMBER:return 12;case Xt.MODE_ALPHA_NUM:return 11;case Xt.MODE_8BIT_BYTE:return 16;case Xt.MODE_KANJI:return 10;default:throw"mode:"+f}else if(o<41)switch(f){case Xt.MODE_NUMBER:return 14;case Xt.MODE_ALPHA_NUM:return 13;case Xt.MODE_8BIT_BYTE:return 16;case Xt.MODE_KANJI:return 12;default:throw"mode:"+f}else throw"type:"+o},d.getLostPoint=function(f){const o=f.getModuleCount();let c=0;for(let u=0;u<o;u+=1)for(let b=0;b<o;b+=1){let C=0;const T=f.isDark(u,b);for(let E=-1;E<=1;E+=1)if(!(u+E<0||o<=u+E))for(let S=-1;S<=1;S+=1)b+S<0||o<=b+S||E==0&&S==0||T==f.isDark(u+E,b+S)&&(C+=1);C>5&&(c+=3+C-5)}for(let u=0;u<o-1;u+=1)for(let b=0;b<o-1;b+=1){let C=0;f.isDark(u,b)&&(C+=1),f.isDark(u+1,b)&&(C+=1),f.isDark(u,b+1)&&(C+=1),f.isDark(u+1,b+1)&&(C+=1),(C==0||C==4)&&(c+=3)}for(let u=0;u<o;u+=1)for(let b=0;b<o-6;b+=1)f.isDark(u,b)&&!f.isDark(u,b+1)&&f.isDark(u,b+2)&&f.isDark(u,b+3)&&f.isDark(u,b+4)&&!f.isDark(u,b+5)&&f.isDark(u,b+6)&&(c+=40);for(let u=0;u<o;u+=1)for(let b=0;b<o-6;b+=1)f.isDark(b,u)&&!f.isDark(b+1,u)&&f.isDark(b+2,u)&&f.isDark(b+3,u)&&f.isDark(b+4,u)&&!f.isDark(b+5,u)&&f.isDark(b+6,u)&&(c+=40);let h=0;for(let u=0;u<o;u+=1)for(let b=0;b<o;b+=1)f.isDark(b,u)&&(h+=1);const p=Math.abs(100*h/o/o-50)/5;return c+=p*10,c},d})(),dr=(function(){const n=new Array(256),r=new Array(256);for(let l=0;l<8;l+=1)n[l]=1<<l;for(let l=8;l<256;l+=1)n[l]=n[l-4]^n[l-5]^n[l-6]^n[l-8];for(let l=0;l<255;l+=1)r[n[l]]=l;const s={};return s.glog=function(l){if(l<1)throw"glog("+l+")";return r[l]},s.gexp=function(l){for(;l<0;)l+=255;for(;l>=256;)l-=255;return n[l]},s})(),Va=function(n,r){if(typeof n.length>"u")throw n.length+"/"+r;const s=(function(){let d=0;for(;d<n.length&&n[d]==0;)d+=1;const m=new Array(n.length-d+r);for(let f=0;f<n.length-d;f+=1)m[f]=n[f+d];return m})(),l={};return l.getAt=function(d){return s[d]},l.getLength=function(){return s.length},l.multiply=function(d){const m=new Array(l.getLength()+d.getLength()-1);for(let f=0;f<l.getLength();f+=1)for(let o=0;o<d.getLength();o+=1)m[f+o]^=dr.gexp(dr.glog(l.getAt(f))+dr.glog(d.getAt(o)));return Va(m,0)},l.mod=function(d){if(l.getLength()-d.getLength()<0)return l;const m=dr.glog(l.getAt(0))-dr.glog(d.getAt(0)),f=new Array(l.getLength());for(let o=0;o<l.getLength();o+=1)f[o]=l.getAt(o);for(let o=0;o<d.getLength();o+=1)f[o]^=dr.gexp(dr.glog(d.getAt(o))+m);return Va(f,0).mod(d)},l},Nm=(function(){const n=[[1,26,19],[1,26,16],[1,26,13],[1,26,9],[1,44,34],[1,44,28],[1,44,22],[1,44,16],[1,70,55],[1,70,44],[2,35,17],[2,35,13],[1,100,80],[2,50,32],[2,50,24],[4,25,9],[1,134,108],[2,67,43],[2,33,15,2,34,16],[2,33,11,2,34,12],[2,86,68],[4,43,27],[4,43,19],[4,43,15],[2,98,78],[4,49,31],[2,32,14,4,33,15],[4,39,13,1,40,14],[2,121,97],[2,60,38,2,61,39],[4,40,18,2,41,19],[4,40,14,2,41,15],[2,146,116],[3,58,36,2,59,37],[4,36,16,4,37,17],[4,36,12,4,37,13],[2,86,68,2,87,69],[4,69,43,1,70,44],[6,43,19,2,44,20],[6,43,15,2,44,16],[4,101,81],[1,80,50,4,81,51],[4,50,22,4,51,23],[3,36,12,8,37,13],[2,116,92,2,117,93],[6,58,36,2,59,37],[4,46,20,6,47,21],[7,42,14,4,43,15],[4,133,107],[8,59,37,1,60,38],[8,44,20,4,45,21],[12,33,11,4,34,12],[3,145,115,1,146,116],[4,64,40,5,65,41],[11,36,16,5,37,17],[11,36,12,5,37,13],[5,109,87,1,110,88],[5,65,41,5,66,42],[5,54,24,7,55,25],[11,36,12,7,37,13],[5,122,98,1,123,99],[7,73,45,3,74,46],[15,43,19,2,44,20],[3,45,15,13,46,16],[1,135,107,5,136,108],[10,74,46,1,75,47],[1,50,22,15,51,23],[2,42,14,17,43,15],[5,150,120,1,151,121],[9,69,43,4,70,44],[17,50,22,1,51,23],[2,42,14,19,43,15],[3,141,113,4,142,114],[3,70,44,11,71,45],[17,47,21,4,48,22],[9,39,13,16,40,14],[3,135,107,5,136,108],[3,67,41,13,68,42],[15,54,24,5,55,25],[15,43,15,10,44,16],[4,144,116,4,145,117],[17,68,42],[17,50,22,6,51,23],[19,46,16,6,47,17],[2,139,111,7,140,112],[17,74,46],[7,54,24,16,55,25],[34,37,13],[4,151,121,5,152,122],[4,75,47,14,76,48],[11,54,24,14,55,25],[16,45,15,14,46,16],[6,147,117,4,148,118],[6,73,45,14,74,46],[11,54,24,16,55,25],[30,46,16,2,47,17],[8,132,106,4,133,107],[8,75,47,13,76,48],[7,54,24,22,55,25],[22,45,15,13,46,16],[10,142,114,2,143,115],[19,74,46,4,75,47],[28,50,22,6,51,23],[33,46,16,4,47,17],[8,152,122,4,153,123],[22,73,45,3,74,46],[8,53,23,26,54,24],[12,45,15,28,46,16],[3,147,117,10,148,118],[3,73,45,23,74,46],[4,54,24,31,55,25],[11,45,15,31,46,16],[7,146,116,7,147,117],[21,73,45,7,74,46],[1,53,23,37,54,24],[19,45,15,26,46,16],[5,145,115,10,146,116],[19,75,47,10,76,48],[15,54,24,25,55,25],[23,45,15,25,46,16],[13,145,115,3,146,116],[2,74,46,29,75,47],[42,54,24,1,55,25],[23,45,15,28,46,16],[17,145,115],[10,74,46,23,75,47],[10,54,24,35,55,25],[19,45,15,35,46,16],[17,145,115,1,146,116],[14,74,46,21,75,47],[29,54,24,19,55,25],[11,45,15,46,46,16],[13,145,115,6,146,116],[14,74,46,23,75,47],[44,54,24,7,55,25],[59,46,16,1,47,17],[12,151,121,7,152,122],[12,75,47,26,76,48],[39,54,24,14,55,25],[22,45,15,41,46,16],[6,151,121,14,152,122],[6,75,47,34,76,48],[46,54,24,10,55,25],[2,45,15,64,46,16],[17,152,122,4,153,123],[29,74,46,14,75,47],[49,54,24,10,55,25],[24,45,15,46,46,16],[4,152,122,18,153,123],[13,74,46,32,75,47],[48,54,24,14,55,25],[42,45,15,32,46,16],[20,147,117,4,148,118],[40,75,47,7,76,48],[43,54,24,22,55,25],[10,45,15,67,46,16],[19,148,118,6,149,119],[18,75,47,31,76,48],[34,54,24,34,55,25],[20,45,15,61,46,16]],r=function(d,m){const f={};return f.totalCount=d,f.dataCount=m,f},s={},l=function(d,m){switch(m){case Pa.L:return n[(d-1)*4+0];case Pa.M:return n[(d-1)*4+1];case Pa.Q:return n[(d-1)*4+2];case Pa.H:return n[(d-1)*4+3];default:return}};return s.getRSBlocks=function(d,m){const f=l(d,m);if(typeof f>"u")throw"bad rs block @ typeNumber:"+d+"/errorCorrectionLevel:"+m;const o=f.length/3,c=[];for(let h=0;h<o;h+=1){const p=f[h*3+0],u=f[h*3+1],b=f[h*3+2];for(let C=0;C<p;C+=1)c.push(r(u,b))}return c},s})(),Hm=function(){const n=[];let r=0;const s={};return s.getBuffer=function(){return n},s.getAt=function(l){const d=Math.floor(l/8);return(n[d]>>>7-l%8&1)==1},s.put=function(l,d){for(let m=0;m<d;m+=1)s.putBit((l>>>d-m-1&1)==1)},s.getLengthInBits=function(){return r},s.putBit=function(l){const d=Math.floor(r/8);n.length<=d&&n.push(0),l&&(n[d]|=128>>>r%8),r+=1},s},U0=function(n){const r=Xt.MODE_NUMBER,s=n,l={};l.getMode=function(){return r},l.getLength=function(f){return s.length},l.write=function(f){const o=s;let c=0;for(;c+2<o.length;)f.put(d(o.substring(c,c+3)),10),c+=3;c<o.length&&(o.length-c==1?f.put(d(o.substring(c,c+1)),4):o.length-c==2&&f.put(d(o.substring(c,c+2)),7))};const d=function(f){let o=0;for(let c=0;c<f.length;c+=1)o=o*10+m(f.charAt(c));return o},m=function(f){if("0"<=f&&f<="9")return f.charCodeAt(0)-48;throw"illegal char :"+f};return l},P0=function(n){const r=Xt.MODE_ALPHA_NUM,s=n,l={};l.getMode=function(){return r},l.getLength=function(m){return s.length},l.write=function(m){const f=s;let o=0;for(;o+1<f.length;)m.put(d(f.charAt(o))*45+d(f.charAt(o+1)),11),o+=2;o<f.length&&m.put(d(f.charAt(o)),6)};const d=function(m){if("0"<=m&&m<="9")return m.charCodeAt(0)-48;if("A"<=m&&m<="Z")return m.charCodeAt(0)-65+10;switch(m){case" ":return 36;case"$":return 37;case"%":return 38;case"*":return 39;case"+":return 40;case"-":return 41;case".":return 42;case"/":return 43;case":":return 44;default:throw"illegal char :"+m}};return l},F0=function(n){const r=Xt.MODE_8BIT_BYTE,s=Ir.stringToBytes(n),l={};return l.getMode=function(){return r},l.getLength=function(d){return s.length},l.write=function(d){for(let m=0;m<s.length;m+=1)d.put(s[m],8)},l},q0=function(n){const r=Xt.MODE_KANJI,s=Ir.stringToBytes;(function(m,f){const o=s(m);if(o.length!=2||(o[0]<<8|o[1])!=f)throw"sjis not supported."})("友",38726);const l=s(n),d={};return d.getMode=function(){return r},d.getLength=function(m){return~~(l.length/2)},d.write=function(m){const f=l;let o=0;for(;o+1<f.length;){let c=(255&f[o])<<8|255&f[o+1];if(33088<=c&&c<=40956)c-=33088;else if(57408<=c&&c<=60351)c-=49472;else throw"illegal char at "+(o+1)+"/"+c;c=(c>>>8&255)*192+(c&255),m.put(c,13),o+=2}if(o<f.length)throw"illegal char at "+(o+1)},d},Xg=function(){const n=[],r={};return r.writeByte=function(s){n.push(s&255)},r.writeShort=function(s){r.writeByte(s),r.writeByte(s>>>8)},r.writeBytes=function(s,l,d){l=l||0,d=d||s.length;for(let m=0;m<d;m+=1)r.writeByte(s[m+l])},r.writeString=function(s){for(let l=0;l<s.length;l+=1)r.writeByte(s.charCodeAt(l))},r.toByteArray=function(){return n},r.toString=function(){let s="";s+="[";for(let l=0;l<n.length;l+=1)l>0&&(s+=","),s+=n[l];return s+="]",s},r},$0=function(){let n=0,r=0,s=0,l="";const d={},m=function(o){l+=String.fromCharCode(f(o&63))},f=function(o){if(o<0)throw"n:"+o;if(o<26)return 65+o;if(o<52)return 97+(o-26);if(o<62)return 48+(o-52);if(o==62)return 43;if(o==63)return 47;throw"n:"+o};return d.writeByte=function(o){for(n=n<<8|o&255,r+=8,s+=1;r>=6;)m(n>>>r-6),r-=6},d.flush=function(){if(r>0&&(m(n<<6-r),n=0,r=0),s%3!=0){const o=3-s%3;for(let c=0;c<o;c+=1)l+="="}},d.toString=function(){return l},d},G0=function(n){const r=n;let s=0,l=0,d=0;const m={};m.read=function(){for(;d<8;){if(s>=r.length){if(d==0)return-1;throw"unexpected end of file./"+d}const c=r.charAt(s);if(s+=1,c=="=")return d=0,-1;if(c.match(/^\s$/))continue;l=l<<6|f(c.charCodeAt(0)),d+=6}const o=l>>>d-8&255;return d-=8,o};const f=function(o){if(65<=o&&o<=90)return o-65;if(97<=o&&o<=122)return o-97+26;if(48<=o&&o<=57)return o-48+52;if(o==43)return 62;if(o==47)return 63;throw"c:"+o};return m},V0=function(n,r){const s=n,l=r,d=new Array(n*r),m={};m.setPixel=function(h,p,u){d[p*s+h]=u},m.write=function(h){h.writeString("GIF87a"),h.writeShort(s),h.writeShort(l),h.writeByte(128),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(0),h.writeByte(255),h.writeByte(255),h.writeByte(255),h.writeString(","),h.writeShort(0),h.writeShort(0),h.writeShort(s),h.writeShort(l),h.writeByte(0);const p=2,u=o(p);h.writeByte(p);let b=0;for(;u.length-b>255;)h.writeByte(255),h.writeBytes(u,b,255),b+=255;h.writeByte(u.length-b),h.writeBytes(u,b,u.length-b),h.writeByte(0),h.writeString(";")};const f=function(h){const p=h;let u=0,b=0;const C={};return C.write=function(T,E){if(T>>>E)throw"length over";for(;u+E>=8;)p.writeByte(255&(T<<u|b)),E-=8-u,T>>>=8-u,b=0,u=0;b=T<<u|b,u=u+E},C.flush=function(){u>0&&p.writeByte(b)},C},o=function(h){const p=1<<h,u=(1<<h)+1;let b=h+1;const C=c();for(let _=0;_<p;_+=1)C.add(String.fromCharCode(_));C.add(String.fromCharCode(p)),C.add(String.fromCharCode(u));const T=Xg(),E=f(T);E.write(p,b);let S=0,v=String.fromCharCode(d[S]);for(S+=1;S<d.length;){const _=String.fromCharCode(d[S]);S+=1,C.contains(v+_)?v=v+_:(E.write(C.indexOf(v),b),C.size()<4095&&(C.size()==1<<b&&(b+=1),C.add(v+_)),v=_)}return E.write(C.indexOf(v),b),E.write(u,b),E.flush(),T.toByteArray()},c=function(){const h={};let p=0;const u={};return u.add=function(b){if(u.contains(b))throw"dup key:"+b;h[b]=p,p+=1},u.size=function(){return p},u.indexOf=function(b){return h[b]},u.contains=function(b){return typeof h[b]<"u"},u};return m},W0=function(n,r,s){const l=V0(n,r);for(let o=0;o<r;o+=1)for(let c=0;c<n;c+=1)l.setPixel(c,o,s(c,o));const d=Xg();l.write(d);const m=$0(),f=d.toByteArray();for(let o=0;o<f.length;o+=1)m.writeByte(f[o]);return m.flush(),"data:image/gif;base64,"+m};Ir.stringToBytes;const Wa=[{name:"project-manager",label:"Project Manager",commandAgent:"project-manager",dispatchable:!1},{name:"architect",label:"Architect",commandAgent:"architect",dispatchable:!0},{name:"coder",label:"Coder",commandAgent:"coder",dispatchable:!0},{name:"reviewer",label:"Reviewer",commandAgent:"reviewer",dispatchable:!0}],Qg={name:"gate-reviewer",label:"Gate Reviewer",commandAgent:"gate-reviewer",dispatchable:!1},Ns=[...Wa,Qg],K0={name:"translator",label:"Translator",commandAgent:"translator",dispatchable:!1},Y0={name:"harness-engineer",label:"Harness Engineer",commandAgent:"harness-engineer",dispatchable:!1},Jg=[K0,Y0],Dh=[...Ns,...Jg];Wa.map(n=>n.name);const Zg=Ns.map(n=>n.name);Jg.map(n=>n.name);Dh.map(n=>n.name);Dh.filter(n=>n.dispatchable).map(n=>n.name);function X0(n){return Zg.includes(n)}const Q0="zh-CN",J0="pm-final-only",e_=[{value:"zh-CN",label:"Chinese"},{value:"ja",label:"Japanese"},{value:"ko",label:"Korean"},{value:"fr",label:"French"},{value:"de",label:"German"},{value:"es",label:"Spanish"}],Z0=[{value:"pm-final-only",label:"PM final reply"},{value:"final-only",label:"Each role final reply"},{value:"all",label:"All replies"}];function e1(){const n={};for(const r of Zg)n[r]={permissionMode:"bypassPermissions",model:"default",effort:"default"};return{version:1,roles:n,autoOrchestration:!0}}function t1({sidebar:n,children:r}){const[s,l]=te.useState(!1);return x.jsxs("div",{className:s?"app-shell is-sidebar-collapsed":"app-shell",children:[x.jsxs("aside",{className:"app-sidebar",children:[x.jsx("button",{className:"sidebar-toggle",type:"button","aria-label":s?"Expand sidebar":"Collapse sidebar",title:s?"Expand sidebar":"Collapse sidebar",onClick:()=>l(d=>!d)}),x.jsx("div",{className:"sidebar-content",children:n})]}),x.jsx("main",{className:"app-main",children:r})]})}function n1({busy:n,state:r,onApprove:s,onCancel:l,onComment:d,onReject:m}){var _;const[f,o]=te.useState(!1),[c,h]=te.useState(""),[p,u]=te.useState(null);if(!r||r.status==="idle")return null;const b=r.active,C=i1(r);if(p===C)return null;const T=r.status==="awaiting_user_approval",E=(b==null?void 0:b.title)??((_=r.pending[0])==null?void 0:_.title)??"Harness feedback",S=(b==null?void 0:b.source)==="task-retrospective"?"Task Harness Review":"Harness Feedback",v=()=>{o(!1),u(C)};return x.jsxs(x.Fragment,{children:[x.jsxs("section",{className:T?"harness-feedback-float needs-review":"harness-feedback-float",children:[x.jsxs("div",{children:[x.jsx("strong",{children:T?`${S} needed`:S}),x.jsx("span",{children:r1(r)})]}),x.jsx("p",{title:E,children:E}),x.jsxs("div",{className:"harness-feedback-float-actions",children:[x.jsx("button",{type:"button",disabled:n,onClick:v,children:"Close"}),x.jsx("button",{type:"button",disabled:n||!b,onClick:()=>o(!0),children:T?"Review":"Open"})]})]}),f&&b?x.jsx("div",{className:"modal-backdrop harness-feedback-backdrop",children:x.jsxs("section",{className:"harness-feedback-modal",role:"dialog","aria-modal":"true","aria-label":"Harness feedback review",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:S}),x.jsxs("p",{className:"muted",children:[r.status.replaceAll("_"," ")," · queued ",r.queuedCount]})]}),x.jsx("button",{type:"button",onClick:()=>o(!1),children:"Close"})]}),x.jsxs("div",{className:"harness-feedback-modal-body",children:[x.jsxs("section",{children:[x.jsx("h3",{children:b.source==="task-retrospective"?"Task Retrospective Request":"Feedback"}),x.jsx("pre",{children:b.feedbackContent||"No feedback content found."})]}),x.jsxs("section",{children:[x.jsx("h3",{children:"Harness Engineer Analysis"}),x.jsx("pre",{children:b.analysisContent||"Analysis is not available yet."})]})]}),T?x.jsxs("footer",{className:"harness-feedback-review-actions",children:[x.jsx("textarea",{value:c,placeholder:"Optional note for Harness Engineer...",onChange:y=>h(y.target.value)}),x.jsxs("div",{children:[x.jsx("button",{type:"button",disabled:n,onClick:()=>d(c),children:"Send Feedback"}),x.jsx("button",{type:"button",disabled:n,onClick:()=>m(c),children:"Reject"}),x.jsx("button",{type:"button",disabled:n,onClick:()=>s(c),children:"Approve"})]})]}):b?x.jsxs("footer",{className:"harness-feedback-review-actions",children:[x.jsx("textarea",{value:c,placeholder:"Optional cancellation note...",onChange:y=>h(y.target.value)}),x.jsx("div",{children:x.jsx("button",{type:"button",disabled:n,onClick:()=>l(c),children:"Cancel"})})]}):null]})}):null]})}function i1(n){if(n.active)return["active",n.status,n.active.id,n.active.path,n.active.updatedAt??"",n.active.analysisPath??"",n.active.applyReportPath??""].join(":");const r=n.pending[0];return r?["pending",n.status,r.id,r.path,n.queuedCount].join(":"):[n.status,n.queuedCount].join(":")}function r1(n){return n.status==="queued"?`${n.queuedCount} queued`:n.status==="awaiting_user_approval"?"waiting for approval":n.status==="analyzing"?"Harness Engineer analyzing":n.status==="applying"?"Harness Engineer applying":n.status}function Lo(n,r="Unknown error."){if(n instanceof Error)return n.message||r;if(typeof n=="string"&&n.trim())return n;if(n===void 0)return r;try{return JSON.stringify(n)}catch{return String(n)}}function pt(n,r,s){return`${n} failed. Reason: ${Lo(r,s)}`}function xo(n,r){return r.some(s=>n.startsWith(`${s} failed.`))?"":n}const Se={getAppPreferences(){return Ce("/api/settings/preferences")},updateAppPreferences(n){return Ce("/api/settings/preferences",{method:"PUT",body:JSON.stringify(n)})},getRuntimeDiagnostics(){return Ce("/api/diagnostics/runtime")},getCurrentProject(){return Ce("/api/projects/current")},pullCurrentProject(){return Ce("/api/projects/current/pull",{method:"POST"})},getRecentRepositoryPaths(){return Ce("/api/projects/recent")},connectProject(n){return Ce("/api/projects/connect",{method:"POST",body:JSON.stringify(n)})},listTasks(){return Ce("/api/tasks")},createTask(n){return Ce("/api/tasks",{method:"POST",body:JSON.stringify(n)})},cleanupTask(n,r={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/cleanup`,{method:"POST",body:JSON.stringify(r)})},getHarnessStatus(n){const r=new URLSearchParams({taskSlug:n});return Ce(`/api/projects/harness?${r.toString()}`)},applyHarness(n){return Ce("/api/projects/harness/apply",{method:"POST",body:JSON.stringify(n)})},getHarnessFileContent(n,r){const s=new URLSearchParams({path:r,taskSlug:n});return Ce(`/api/projects/harness/file?${s.toString()}`)},updateHarnessFileContent(n,r,s){const l=new URLSearchParams({path:r,taskSlug:n});return Ce(`/api/projects/harness/file?${l.toString()}`,{method:"PUT",body:JSON.stringify(s)})},getRepositoryDiff(n,r){const s=new URLSearchParams({taskSlug:n});return r&&s.set("commit",r),Ce(`/api/projects/harness/repository-diff?${s.toString()}`)},getRepositoryFileDiff(n,r){const s=new URLSearchParams({taskSlug:n,path:r});return Ce(`/api/projects/harness/repository-diff/file?${s.toString()}`)},mergeRepositoryDiffToCurrentBranch(n){return Ce("/api/projects/harness/repository-diff/merge-to-current-branch",{method:"POST",body:JSON.stringify({taskSlug:n})})},getHarnessBootstrapStatus(n){const r=new URLSearchParams({taskSlug:n});return Ce(`/api/projects/harness/bootstrap?${r.toString()}`)},startHarnessBootstrap(n={}){return Ce("/api/projects/harness/bootstrap/start",{method:"POST",body:JSON.stringify(n)})},restartHarnessBootstrap(n={}){return Ce("/api/projects/harness/bootstrap/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessBootstrap(){return Ce("/api/projects/harness/bootstrap/stop",{method:"POST"})},runHarnessBootstrap(n){return Ce("/api/projects/harness/bootstrap/run",{method:"POST",body:JSON.stringify(n)})},getHarnessEngineerSession(){return Ce("/api/projects/harness/engineer/session")},ensureHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/ensure",{method:"POST",body:JSON.stringify(n)})},startHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/start",{method:"POST",body:JSON.stringify(n)})},resumeHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/resume",{method:"POST",body:JSON.stringify(n)})},restartHarnessEngineerSession(n={}){return Ce("/api/projects/harness/engineer/session/restart",{method:"POST",body:JSON.stringify(n)})},stopHarnessEngineerSession(){return Ce("/api/projects/harness/engineer/session/stop",{method:"POST"})},notifyHarnessEngineerHarnessUpdated(){return Ce("/api/projects/harness/engineer/session/notify-harness",{method:"POST"})},getHarnessFeedbackState(n){const r=new URLSearchParams;n&&r.set("taskSlug",n);const s=r.toString();return Ce(`/api/projects/harness/feedback${s?`?${s}`:""}`)},decideHarnessFeedback(n){return Ce("/api/projects/harness/feedback/decision",{method:"POST",body:JSON.stringify(n)})},startTaskHarnessRetrospective(n){return Ce("/api/projects/harness/task-retrospective",{method:"POST",body:JSON.stringify(n)})},getTaskStatus(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/status`)},oneClickStart(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/one-click-start`,{method:"POST"})},getTaskWorkspaceState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/workspace-state`)},getProjectRuntimeState(n){const r=new URLSearchParams;n&&r.set("taskSlug",n);const s=r.toString();return Ce(`/api/projects/runtime-state${s?`?${s}`:""}`)},listSessions(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions`)},startRoleSession(n,r,s={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/start`,{method:"POST",body:JSON.stringify(s)})},stopRoleSession(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/stop`,{method:"POST"})},restartRoleSession(n,r,s={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/restart`,{method:"POST",body:JSON.stringify(s)})},resumeRoleSession(n,r,s={}){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/resume`,{method:"POST",body:JSON.stringify(s)})},notifyRoleHarnessUpdated(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/notify-harness`,{method:"POST"})},dispatchRoleCommand(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/dispatch`,{method:"POST"})},listMessages(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/messages`)},markAllMessagesDone(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/messages/mark-all-done`,{method:"POST"})},deleteMessageHistory(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/messages/history`,{method:"DELETE"})},getOrchestrationState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/orchestration`)},updateOrchestrationState(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/orchestration`,{method:"PUT",body:JSON.stringify(r)})},getSessionRoundState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/round`)},getGateReviewState(n){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review`)},updateGateReviewSettings(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/settings`,{method:"PUT",body:JSON.stringify(r)})},requestGateReviewGate(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/request`,{method:"POST"})},retryGateReviewGate(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/retry`,{method:"POST"})},skipGateReviewGate(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/skip`,{method:"POST",body:JSON.stringify(s)})},overrideGateReviewGate(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/override`,{method:"POST",body:JSON.stringify(s)})},getGateReviewReport(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/gate-review/${r}/report`)},startTranslationSession(n,r){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/start`,{method:"POST"})},pollTranslationSession(n,r,s){const l=new URLSearchParams({after:String(r)});return s!==void 0&&l.set("limit",String(s)),Ce(`/api/translation/sessions/${encodeURIComponent(n)}/events?${l.toString()}`)},pollTranslationTaskFeed(n,r,s){const l=new URLSearchParams({after:String(r)});return s!==void 0&&l.set("limit",String(s)),Ce(`/api/tasks/${encodeURIComponent(n)}/translation/feed?${l.toString()}`)},translateUserInput(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/input`,{method:"POST",body:JSON.stringify(s)})},translateManualOutput(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/manual-output`,{method:"POST",body:JSON.stringify(s)})},sendTranslatedInput(n,r,s){return Ce(`/api/tasks/${encodeURIComponent(n)}/sessions/${r}/translation/send`,{method:"POST",body:JSON.stringify(s)})},clearTranslationSession(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/clear`,{method:"POST"})},stopTranslationSession(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/stop`,{method:"POST"})},notifyTranslatorHarnessUpdated(){return Ce("/api/projects/translation/session/notify-harness",{method:"POST"})},retryTranslation(n,r){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/retry/${encodeURIComponent(r)}`,{method:"POST"})},ignoreTranslationFailures(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/failures/ignore`,{method:"POST"})},retryTranslationFailures(n){return Ce(`/api/translation/sessions/${encodeURIComponent(n)}/failures/retry`,{method:"POST"})},getTranslationState(){return Ce("/api/translation/state")},getTranslatorSession(){return Ce("/api/translation/session")},ensureTranslatorSession(n={}){return Ce("/api/translation/session/ensure",{method:"POST",body:JSON.stringify(n)})},startTranslatorSession(n={}){return Ce("/api/translation/session/start",{method:"POST",body:JSON.stringify(n)})},resumeTranslatorSession(n={}){return Ce("/api/translation/session/resume",{method:"POST",body:JSON.stringify(n)})},restartTranslatorSession(n={}){return Ce("/api/translation/session/restart",{method:"POST",body:JSON.stringify(n)})},stopTranslatorSession(){return Ce("/api/translation/session/stop",{method:"POST"})},browseTranslationSourceFiles(n={}){const r=new URLSearchParams;n.path&&r.set("path",n.path),n.query&&r.set("query",n.query),n.limit!==void 0&&r.set("limit",String(n.limit));const s=r.toString()?`?${r.toString()}`:"";return Ce(`/api/translation/source-files${s}`)},createFileTranslation(n){return Ce("/api/translation/files",{method:"POST",body:JSON.stringify(n)})},readFileTranslation(n){return Ce(`/api/translation/files/${encodeURIComponent(n)}`)},createTranslationBootstrap(n){return Ce("/api/translation/bootstrap",{method:"POST",body:JSON.stringify(n)})},createTranslationMemoryUpdate(n){return Ce("/api/translation/memory-update",{method:"POST",body:JSON.stringify(n)})},promoteTranslation(n,r){return Ce(`/api/translation/files/${encodeURIComponent(n)}/promote`,{method:"POST",body:JSON.stringify({targetPath:r})})},getGatewayStatus(){return Ce("/api/gateway/status")},updateGatewaySettings(n){return Ce("/api/gateway/settings",{method:"PUT",body:JSON.stringify(n)})},startGatewayQrLogin(){return Ce("/api/gateway/qr/start",{method:"POST"})},checkGatewayQrLogin(n={}){return Ce("/api/gateway/qr/check",{method:"POST",body:JSON.stringify(n)})},startGatewayLarkRegistration(){return Ce("/api/gateway/lark-registration/start",{method:"POST"})},checkGatewayLarkRegistration(){return Ce("/api/gateway/lark-registration/check",{method:"POST"})},bindGatewayLarkApp(n){return Ce("/api/gateway/lark-registration/bind",{method:"POST",body:JSON.stringify(n)})},resetGatewayBinding(){return Ce("/api/gateway/binding/reset",{method:"POST"})}};async function Ce(n,r={}){var m,f,o;const s=new Headers(r.headers);r.body!==void 0&&r.body!==null&&!s.has("content-type")&&s.set("content-type","application/json");const l=(r.method??"GET").toUpperCase();let d;try{d=await fetch(n,{...r,headers:s})}catch(c){throw new Error(`${l} ${n} could not reach the VCM backend. Reason: ${Lo(c)}`)}if(!d.ok){const c=await d.text().catch(()=>""),h=s1(c),p=d.statusText?`${d.status} ${d.statusText}`:String(d.status),b=((m=h==null?void 0:h.error)!=null&&m.hint?`${h.error.message??"Backend error."} ${h.error.hint}`:(f=h==null?void 0:h.error)==null?void 0:f.message)??a1(c),C=(o=h==null?void 0:h.error)==null?void 0:o.runtime,T=C?` [backend ${C.version??"unknown"} pid=${C.pid??"unknown"} cwd=${C.cwd??"unknown"}]`:"";throw new Error(`${l} ${n} returned HTTP ${p}. ${b}${T}`)}return d.json()}function s1(n){if(!n.trim())return null;try{return JSON.parse(n)}catch{return null}}function a1(n){const r=n.trim();return r?`Non-JSON response body: ${r.slice(0,500)}`:"The response body was empty."}const uh="vcm:ui-error-report",hh="vcm:ui-error-clear-actions",fh="vcm:ui-error-clear-message";function l1(n){const r=n.trim();!r||typeof window>"u"||window.dispatchEvent(new CustomEvent(uh,{detail:{message:r}}))}function o1(n){const r=n.trim();!r||typeof window>"u"||window.dispatchEvent(new CustomEvent(fh,{detail:{message:r}}))}function c1(n){n.length===0||typeof window>"u"||window.dispatchEvent(new CustomEvent(hh,{detail:{actions:n}}))}function Hi(n){const[r,s]=te.useState(n),l=te.useRef(n),d=te.useCallback(m=>{const f=l.current,o=typeof m=="function"?m(f):m;l.current=o,typeof o=="string"&&o.trim()?l1(o):typeof f=="string"&&f.trim()&&o1(f),s(o)},[]);return[r,d]}var qu={exports:{}},zm;function u1(){return zm||(zm=1,(function(n,r){(function(s,l){n.exports=l()})(self,(()=>(()=>{var s={};return(()=>{var l=s;Object.defineProperty(l,"__esModule",{value:!0}),l.FitAddon=void 0,l.FitAddon=class{activate(d){this._terminal=d}dispose(){}fit(){const d=this.proposeDimensions();if(!d||!this._terminal||isNaN(d.cols)||isNaN(d.rows))return;const m=this._terminal._core;this._terminal.rows===d.rows&&this._terminal.cols===d.cols||(m._renderService.clear(),this._terminal.resize(d.cols,d.rows))}proposeDimensions(){if(!this._terminal||!this._terminal.element||!this._terminal.element.parentElement)return;const d=this._terminal._core,m=d._renderService.dimensions;if(m.css.cell.width===0||m.css.cell.height===0)return;const f=this._terminal.options.scrollback===0?0:d.viewport.scrollBarWidth,o=window.getComputedStyle(this._terminal.element.parentElement),c=parseInt(o.getPropertyValue("height")),h=Math.max(0,parseInt(o.getPropertyValue("width"))),p=window.getComputedStyle(this._terminal.element),u=c-(parseInt(p.getPropertyValue("padding-top"))+parseInt(p.getPropertyValue("padding-bottom"))),b=h-(parseInt(p.getPropertyValue("padding-right"))+parseInt(p.getPropertyValue("padding-left")))-f;return{cols:Math.max(2,Math.floor(b/m.css.cell.width)),rows:Math.max(1,Math.floor(u/m.css.cell.height))}}}})(),s})()))})(qu)),qu.exports}var h1=u1(),$u={exports:{}},Im;function f1(){return Im||(Im=1,(function(n,r){(function(s,l){n.exports=l()})(self,(()=>(()=>{var s={6:(f,o)=>{function c(p){try{const u=new URL(p),b=u.password&&u.username?`${u.protocol}//${u.username}:${u.password}@${u.host}`:u.username?`${u.protocol}//${u.username}@${u.host}`:`${u.protocol}//${u.host}`;return p.toLocaleLowerCase().startsWith(b.toLocaleLowerCase())}catch{return!1}}Object.defineProperty(o,"__esModule",{value:!0}),o.LinkComputer=o.WebLinkProvider=void 0,o.WebLinkProvider=class{constructor(p,u,b,C={}){this._terminal=p,this._regex=u,this._handler=b,this._options=C}provideLinks(p,u){const b=h.computeLink(p,this._regex,this._terminal,this._handler);u(this._addCallbacks(b))}_addCallbacks(p){return p.map((u=>(u.leave=this._options.leave,u.hover=(b,C)=>{if(this._options.hover){const{range:T}=u;this._options.hover(b,C,T)}},u)))}};class h{static computeLink(u,b,C,T){const E=new RegExp(b.source,(b.flags||"")+"g"),[S,v]=h._getWindowedLineStrings(u-1,C),_=S.join("");let y;const A=[];for(;y=E.exec(_);){const L=y[0];if(!c(L))continue;const[D,R]=h._mapStrIdx(C,v,0,y.index),[k,M]=h._mapStrIdx(C,D,R,L.length);if(D===-1||R===-1||k===-1||M===-1)continue;const j={start:{x:R+1,y:D+1},end:{x:M,y:k+1}};A.push({range:j,text:L,activate:T})}return A}static _getWindowedLineStrings(u,b){let C,T=u,E=u,S=0,v="";const _=[];if(C=b.buffer.active.getLine(u)){const y=C.translateToString(!0);if(C.isWrapped&&y[0]!==" "){for(S=0;(C=b.buffer.active.getLine(--T))&&S<2048&&(v=C.translateToString(!0),S+=v.length,_.push(v),C.isWrapped&&v.indexOf(" ")===-1););_.reverse()}for(_.push(y),S=0;(C=b.buffer.active.getLine(++E))&&C.isWrapped&&S<2048&&(v=C.translateToString(!0),S+=v.length,_.push(v),v.indexOf(" ")===-1););}return[_,T]}static _mapStrIdx(u,b,C,T){const E=u.buffer.active,S=E.getNullCell();let v=C;for(;T;){const _=E.getLine(b);if(!_)return[-1,-1];for(let y=v;y<_.length;++y){_.getCell(y,S);const A=S.getChars();if(S.getWidth()&&(T-=A.length||1,y===_.length-1&&A==="")){const L=E.getLine(b+1);L&&L.isWrapped&&(L.getCell(0,S),S.getWidth()===2&&(T+=1))}if(T<0)return[b,y]}b++,v=0}return[b,v]}}o.LinkComputer=h}},l={};function d(f){var o=l[f];if(o!==void 0)return o.exports;var c=l[f]={exports:{}};return s[f](c,c.exports,d),c.exports}var m={};return(()=>{var f=m;Object.defineProperty(f,"__esModule",{value:!0}),f.WebLinksAddon=void 0;const o=d(6),c=/(https?|HTTPS?):[/]{2}[^\s"'!*(){}|\\\^<>`]*[^\s"':,.!?{}|\\\^~\[\]`()<>]/;function h(p,u){const b=window.open();if(b){try{b.opener=null}catch{}b.location.href=u}else console.warn("Opening link blocked as opener could not be cleared")}f.WebLinksAddon=class{constructor(p=h,u={}){this._handler=p,this._options=u}activate(p){this._terminal=p;const u=this._options,b=u.urlRegex||c;this._linkProvider=this._terminal.registerLinkProvider(new o.WebLinkProvider(this._terminal,b,this._handler,u))}dispose(){var p;(p=this._linkProvider)==null||p.dispose()}}})(),m})()))})($u)),$u.exports}var d1=f1(),Gu={exports:{}},Um;function p1(){return Um||(Um=1,(function(n,r){(function(s,l){n.exports=l()})(globalThis,(()=>(()=>{var s={4567:function(f,o,c){var h=this&&this.__decorate||function(_,y,A,L){var D,R=arguments.length,k=R<3?y:L===null?L=Object.getOwnPropertyDescriptor(y,A):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,A,L);else for(var M=_.length-1;M>=0;M--)(D=_[M])&&(k=(R<3?D(k):R>3?D(y,A,k):D(y,A))||k);return R>3&&k&&Object.defineProperty(y,A,k),k},p=this&&this.__param||function(_,y){return function(A,L){y(A,L,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.AccessibilityManager=void 0;const u=c(9042),b=c(9924),C=c(844),T=c(4725),E=c(2585),S=c(3656);let v=o.AccessibilityManager=class extends C.Disposable{constructor(_,y,A,L){super(),this._terminal=_,this._coreBrowserService=A,this._renderService=L,this._rowColumns=new WeakMap,this._liveRegionLineCount=0,this._charsToConsume=[],this._charsToAnnounce="",this._accessibilityContainer=this._coreBrowserService.mainDocument.createElement("div"),this._accessibilityContainer.classList.add("xterm-accessibility"),this._rowContainer=this._coreBrowserService.mainDocument.createElement("div"),this._rowContainer.setAttribute("role","list"),this._rowContainer.classList.add("xterm-accessibility-tree"),this._rowElements=[];for(let D=0;D<this._terminal.rows;D++)this._rowElements[D]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[D]);if(this._topBoundaryFocusListener=D=>this._handleBoundaryFocus(D,0),this._bottomBoundaryFocusListener=D=>this._handleBoundaryFocus(D,1),this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions(),this._accessibilityContainer.appendChild(this._rowContainer),this._liveRegion=this._coreBrowserService.mainDocument.createElement("div"),this._liveRegion.classList.add("live-region"),this._liveRegion.setAttribute("aria-live","assertive"),this._accessibilityContainer.appendChild(this._liveRegion),this._liveRegionDebouncer=this.register(new b.TimeBasedDebouncer(this._renderRows.bind(this))),!this._terminal.element)throw new Error("Cannot enable accessibility before Terminal.open");this._terminal.element.insertAdjacentElement("afterbegin",this._accessibilityContainer),this.register(this._terminal.onResize((D=>this._handleResize(D.rows)))),this.register(this._terminal.onRender((D=>this._refreshRows(D.start,D.end)))),this.register(this._terminal.onScroll((()=>this._refreshRows()))),this.register(this._terminal.onA11yChar((D=>this._handleChar(D)))),this.register(this._terminal.onLineFeed((()=>this._handleChar(`
|
|
52
52
|
`)))),this.register(this._terminal.onA11yTab((D=>this._handleTab(D)))),this.register(this._terminal.onKey((D=>this._handleKey(D.key)))),this.register(this._terminal.onBlur((()=>this._clearLiveRegion()))),this.register(this._renderService.onDimensionsChange((()=>this._refreshRowsDimensions()))),this.register((0,S.addDisposableDomListener)(document,"selectionchange",(()=>this._handleSelectionChange()))),this.register(this._coreBrowserService.onDprChange((()=>this._refreshRowsDimensions()))),this._refreshRows(),this.register((0,C.toDisposable)((()=>{this._accessibilityContainer.remove(),this._rowElements.length=0})))}_handleTab(_){for(let y=0;y<_;y++)this._handleChar(" ")}_handleChar(_){this._liveRegionLineCount<21&&(this._charsToConsume.length>0?this._charsToConsume.shift()!==_&&(this._charsToAnnounce+=_):this._charsToAnnounce+=_,_===`
|
|
53
53
|
`&&(this._liveRegionLineCount++,this._liveRegionLineCount===21&&(this._liveRegion.textContent+=u.tooMuchOutput)))}_clearLiveRegion(){this._liveRegion.textContent="",this._liveRegionLineCount=0}_handleKey(_){this._clearLiveRegion(),new RegExp("\\p{Control}","u").test(_)||this._charsToConsume.push(_)}_refreshRows(_,y){this._liveRegionDebouncer.refresh(_,y,this._terminal.rows)}_renderRows(_,y){const A=this._terminal.buffer,L=A.lines.length.toString();for(let D=_;D<=y;D++){const R=A.lines.get(A.ydisp+D),k=[],M=(R==null?void 0:R.translateToString(!0,void 0,void 0,k))||"",j=(A.ydisp+D+1).toString(),H=this._rowElements[D];H&&(M.length===0?(H.innerText=" ",this._rowColumns.set(H,[0,1])):(H.textContent=M,this._rowColumns.set(H,k)),H.setAttribute("aria-posinset",j),H.setAttribute("aria-setsize",L))}this._announceCharacters()}_announceCharacters(){this._charsToAnnounce.length!==0&&(this._liveRegion.textContent+=this._charsToAnnounce,this._charsToAnnounce="")}_handleBoundaryFocus(_,y){const A=_.target,L=this._rowElements[y===0?1:this._rowElements.length-2];if(A.getAttribute("aria-posinset")===(y===0?"1":`${this._terminal.buffer.lines.length}`)||_.relatedTarget!==L)return;let D,R;if(y===0?(D=A,R=this._rowElements.pop(),this._rowContainer.removeChild(R)):(D=this._rowElements.shift(),R=A,this._rowContainer.removeChild(D)),D.removeEventListener("focus",this._topBoundaryFocusListener),R.removeEventListener("focus",this._bottomBoundaryFocusListener),y===0){const k=this._createAccessibilityTreeNode();this._rowElements.unshift(k),this._rowContainer.insertAdjacentElement("afterbegin",k)}else{const k=this._createAccessibilityTreeNode();this._rowElements.push(k),this._rowContainer.appendChild(k)}this._rowElements[0].addEventListener("focus",this._topBoundaryFocusListener),this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._terminal.scrollLines(y===0?-1:1),this._rowElements[y===0?1:this._rowElements.length-2].focus(),_.preventDefault(),_.stopImmediatePropagation()}_handleSelectionChange(){var M;if(this._rowElements.length===0)return;const _=document.getSelection();if(!_)return;if(_.isCollapsed)return void(this._rowContainer.contains(_.anchorNode)&&this._terminal.clearSelection());if(!_.anchorNode||!_.focusNode)return void console.error("anchorNode and/or focusNode are null");let y={node:_.anchorNode,offset:_.anchorOffset},A={node:_.focusNode,offset:_.focusOffset};if((y.node.compareDocumentPosition(A.node)&Node.DOCUMENT_POSITION_PRECEDING||y.node===A.node&&y.offset>A.offset)&&([y,A]=[A,y]),y.node.compareDocumentPosition(this._rowElements[0])&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_FOLLOWING)&&(y={node:this._rowElements[0].childNodes[0],offset:0}),!this._rowContainer.contains(y.node))return;const L=this._rowElements.slice(-1)[0];if(A.node.compareDocumentPosition(L)&(Node.DOCUMENT_POSITION_CONTAINED_BY|Node.DOCUMENT_POSITION_PRECEDING)&&(A={node:L,offset:((M=L.textContent)==null?void 0:M.length)??0}),!this._rowContainer.contains(A.node))return;const D=({node:j,offset:H})=>{const U=j instanceof Text?j.parentNode:j;let F=parseInt(U==null?void 0:U.getAttribute("aria-posinset"),10)-1;if(isNaN(F))return console.warn("row is invalid. Race condition?"),null;const K=this._rowColumns.get(U);if(!K)return console.warn("columns is null. Race condition?"),null;let Y=H<K.length?K[H]:K.slice(-1)[0]+1;return Y>=this._terminal.cols&&(++F,Y=0),{row:F,column:Y}},R=D(y),k=D(A);if(R&&k){if(R.row>k.row||R.row===k.row&&R.column>=k.column)throw new Error("invalid range");this._terminal.select(R.column,R.row,(k.row-R.row)*this._terminal.cols-R.column+k.column)}}_handleResize(_){this._rowElements[this._rowElements.length-1].removeEventListener("focus",this._bottomBoundaryFocusListener);for(let y=this._rowContainer.children.length;y<this._terminal.rows;y++)this._rowElements[y]=this._createAccessibilityTreeNode(),this._rowContainer.appendChild(this._rowElements[y]);for(;this._rowElements.length>_;)this._rowContainer.removeChild(this._rowElements.pop());this._rowElements[this._rowElements.length-1].addEventListener("focus",this._bottomBoundaryFocusListener),this._refreshRowsDimensions()}_createAccessibilityTreeNode(){const _=this._coreBrowserService.mainDocument.createElement("div");return _.setAttribute("role","listitem"),_.tabIndex=-1,this._refreshRowDimensions(_),_}_refreshRowsDimensions(){if(this._renderService.dimensions.css.cell.height){this._accessibilityContainer.style.width=`${this._renderService.dimensions.css.canvas.width}px`,this._rowElements.length!==this._terminal.rows&&this._handleResize(this._terminal.rows);for(let _=0;_<this._terminal.rows;_++)this._refreshRowDimensions(this._rowElements[_])}}_refreshRowDimensions(_){_.style.height=`${this._renderService.dimensions.css.cell.height}px`}};o.AccessibilityManager=v=h([p(1,E.IInstantiationService),p(2,T.ICoreBrowserService),p(3,T.IRenderService)],v)},3614:(f,o)=>{function c(b){return b.replace(/\r?\n/g,"\r")}function h(b,C){return C?"\x1B[200~"+b+"\x1B[201~":b}function p(b,C,T,E){b=h(b=c(b),T.decPrivateModes.bracketedPasteMode&&E.rawOptions.ignoreBracketedPasteMode!==!0),T.triggerDataEvent(b,!0),C.value=""}function u(b,C,T){const E=T.getBoundingClientRect(),S=b.clientX-E.left-10,v=b.clientY-E.top-10;C.style.width="20px",C.style.height="20px",C.style.left=`${S}px`,C.style.top=`${v}px`,C.style.zIndex="1000",C.focus()}Object.defineProperty(o,"__esModule",{value:!0}),o.rightClickHandler=o.moveTextAreaUnderMouseCursor=o.paste=o.handlePasteEvent=o.copyHandler=o.bracketTextForPaste=o.prepareTextForTerminal=void 0,o.prepareTextForTerminal=c,o.bracketTextForPaste=h,o.copyHandler=function(b,C){b.clipboardData&&b.clipboardData.setData("text/plain",C.selectionText),b.preventDefault()},o.handlePasteEvent=function(b,C,T,E){b.stopPropagation(),b.clipboardData&&p(b.clipboardData.getData("text/plain"),C,T,E)},o.paste=p,o.moveTextAreaUnderMouseCursor=u,o.rightClickHandler=function(b,C,T,E,S){u(b,C,T),S&&E.rightClickSelect(b),C.value=E.selectionText,C.select()}},7239:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ColorContrastCache=void 0;const h=c(1505);o.ColorContrastCache=class{constructor(){this._color=new h.TwoKeyMap,this._css=new h.TwoKeyMap}setCss(p,u,b){this._css.set(p,u,b)}getCss(p,u){return this._css.get(p,u)}setColor(p,u,b){this._color.set(p,u,b)}getColor(p,u){return this._color.get(p,u)}clear(){this._color.clear(),this._css.clear()}}},3656:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.addDisposableDomListener=void 0,o.addDisposableDomListener=function(c,h,p,u){c.addEventListener(h,p,u);let b=!1;return{dispose:()=>{b||(b=!0,c.removeEventListener(h,p,u))}}}},3551:function(f,o,c){var h=this&&this.__decorate||function(v,_,y,A){var L,D=arguments.length,R=D<3?_:A===null?A=Object.getOwnPropertyDescriptor(_,y):A;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")R=Reflect.decorate(v,_,y,A);else for(var k=v.length-1;k>=0;k--)(L=v[k])&&(R=(D<3?L(R):D>3?L(_,y,R):L(_,y))||R);return D>3&&R&&Object.defineProperty(_,y,R),R},p=this&&this.__param||function(v,_){return function(y,A){_(y,A,v)}};Object.defineProperty(o,"__esModule",{value:!0}),o.Linkifier=void 0;const u=c(3656),b=c(8460),C=c(844),T=c(2585),E=c(4725);let S=o.Linkifier=class extends C.Disposable{get currentLink(){return this._currentLink}constructor(v,_,y,A,L){super(),this._element=v,this._mouseService=_,this._renderService=y,this._bufferService=A,this._linkProviderService=L,this._linkCacheDisposables=[],this._isMouseOut=!0,this._wasResized=!1,this._activeLine=-1,this._onShowLinkUnderline=this.register(new b.EventEmitter),this.onShowLinkUnderline=this._onShowLinkUnderline.event,this._onHideLinkUnderline=this.register(new b.EventEmitter),this.onHideLinkUnderline=this._onHideLinkUnderline.event,this.register((0,C.getDisposeArrayDisposable)(this._linkCacheDisposables)),this.register((0,C.toDisposable)((()=>{var D;this._lastMouseEvent=void 0,(D=this._activeProviderReplies)==null||D.clear()}))),this.register(this._bufferService.onResize((()=>{this._clearCurrentLink(),this._wasResized=!0}))),this.register((0,u.addDisposableDomListener)(this._element,"mouseleave",(()=>{this._isMouseOut=!0,this._clearCurrentLink()}))),this.register((0,u.addDisposableDomListener)(this._element,"mousemove",this._handleMouseMove.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mousedown",this._handleMouseDown.bind(this))),this.register((0,u.addDisposableDomListener)(this._element,"mouseup",this._handleMouseUp.bind(this)))}_handleMouseMove(v){this._lastMouseEvent=v;const _=this._positionFromMouseEvent(v,this._element,this._mouseService);if(!_)return;this._isMouseOut=!1;const y=v.composedPath();for(let A=0;A<y.length;A++){const L=y[A];if(L.classList.contains("xterm"))break;if(L.classList.contains("xterm-hover"))return}this._lastBufferCell&&_.x===this._lastBufferCell.x&&_.y===this._lastBufferCell.y||(this._handleHover(_),this._lastBufferCell=_)}_handleHover(v){if(this._activeLine!==v.y||this._wasResized)return this._clearCurrentLink(),this._askForLink(v,!1),void(this._wasResized=!1);this._currentLink&&this._linkAtPosition(this._currentLink.link,v)||(this._clearCurrentLink(),this._askForLink(v,!0))}_askForLink(v,_){var A,L;this._activeProviderReplies&&_||((A=this._activeProviderReplies)==null||A.forEach((D=>{D==null||D.forEach((R=>{R.link.dispose&&R.link.dispose()}))})),this._activeProviderReplies=new Map,this._activeLine=v.y);let y=!1;for(const[D,R]of this._linkProviderService.linkProviders.entries())_?(L=this._activeProviderReplies)!=null&&L.get(D)&&(y=this._checkLinkProviderResult(D,v,y)):R.provideLinks(v.y,(k=>{var j,H;if(this._isMouseOut)return;const M=k==null?void 0:k.map((U=>({link:U})));(j=this._activeProviderReplies)==null||j.set(D,M),y=this._checkLinkProviderResult(D,v,y),((H=this._activeProviderReplies)==null?void 0:H.size)===this._linkProviderService.linkProviders.length&&this._removeIntersectingLinks(v.y,this._activeProviderReplies)}))}_removeIntersectingLinks(v,_){const y=new Set;for(let A=0;A<_.size;A++){const L=_.get(A);if(L)for(let D=0;D<L.length;D++){const R=L[D],k=R.link.range.start.y<v?0:R.link.range.start.x,M=R.link.range.end.y>v?this._bufferService.cols:R.link.range.end.x;for(let j=k;j<=M;j++){if(y.has(j)){L.splice(D--,1);break}y.add(j)}}}}_checkLinkProviderResult(v,_,y){var D;if(!this._activeProviderReplies)return y;const A=this._activeProviderReplies.get(v);let L=!1;for(let R=0;R<v;R++)this._activeProviderReplies.has(R)&&!this._activeProviderReplies.get(R)||(L=!0);if(!L&&A){const R=A.find((k=>this._linkAtPosition(k.link,_)));R&&(y=!0,this._handleNewLink(R))}if(this._activeProviderReplies.size===this._linkProviderService.linkProviders.length&&!y)for(let R=0;R<this._activeProviderReplies.size;R++){const k=(D=this._activeProviderReplies.get(R))==null?void 0:D.find((M=>this._linkAtPosition(M.link,_)));if(k){y=!0,this._handleNewLink(k);break}}return y}_handleMouseDown(){this._mouseDownLink=this._currentLink}_handleMouseUp(v){if(!this._currentLink)return;const _=this._positionFromMouseEvent(v,this._element,this._mouseService);_&&this._mouseDownLink===this._currentLink&&this._linkAtPosition(this._currentLink.link,_)&&this._currentLink.link.activate(v,this._currentLink.link.text)}_clearCurrentLink(v,_){this._currentLink&&this._lastMouseEvent&&(!v||!_||this._currentLink.link.range.start.y>=v&&this._currentLink.link.range.end.y<=_)&&(this._linkLeave(this._element,this._currentLink.link,this._lastMouseEvent),this._currentLink=void 0,(0,C.disposeArray)(this._linkCacheDisposables))}_handleNewLink(v){if(!this._lastMouseEvent)return;const _=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);_&&this._linkAtPosition(v.link,_)&&(this._currentLink=v,this._currentLink.state={decorations:{underline:v.link.decorations===void 0||v.link.decorations.underline,pointerCursor:v.link.decorations===void 0||v.link.decorations.pointerCursor},isHovered:!0},this._linkHover(this._element,v.link,this._lastMouseEvent),v.link.decorations={},Object.defineProperties(v.link.decorations,{pointerCursor:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.pointerCursor},set:y=>{var A;(A=this._currentLink)!=null&&A.state&&this._currentLink.state.decorations.pointerCursor!==y&&(this._currentLink.state.decorations.pointerCursor=y,this._currentLink.state.isHovered&&this._element.classList.toggle("xterm-cursor-pointer",y))}},underline:{get:()=>{var y,A;return(A=(y=this._currentLink)==null?void 0:y.state)==null?void 0:A.decorations.underline},set:y=>{var A,L,D;(A=this._currentLink)!=null&&A.state&&((D=(L=this._currentLink)==null?void 0:L.state)==null?void 0:D.decorations.underline)!==y&&(this._currentLink.state.decorations.underline=y,this._currentLink.state.isHovered&&this._fireUnderlineEvent(v.link,y))}}}),this._linkCacheDisposables.push(this._renderService.onRenderedViewportChange((y=>{if(!this._currentLink)return;const A=y.start===0?0:y.start+1+this._bufferService.buffer.ydisp,L=this._bufferService.buffer.ydisp+1+y.end;if(this._currentLink.link.range.start.y>=A&&this._currentLink.link.range.end.y<=L&&(this._clearCurrentLink(A,L),this._lastMouseEvent)){const D=this._positionFromMouseEvent(this._lastMouseEvent,this._element,this._mouseService);D&&this._askForLink(D,!1)}}))))}_linkHover(v,_,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!0,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!0),this._currentLink.state.decorations.pointerCursor&&v.classList.add("xterm-cursor-pointer")),_.hover&&_.hover(y,_.text)}_fireUnderlineEvent(v,_){const y=v.range,A=this._bufferService.buffer.ydisp,L=this._createLinkUnderlineEvent(y.start.x-1,y.start.y-A-1,y.end.x,y.end.y-A-1,void 0);(_?this._onShowLinkUnderline:this._onHideLinkUnderline).fire(L)}_linkLeave(v,_,y){var A;(A=this._currentLink)!=null&&A.state&&(this._currentLink.state.isHovered=!1,this._currentLink.state.decorations.underline&&this._fireUnderlineEvent(_,!1),this._currentLink.state.decorations.pointerCursor&&v.classList.remove("xterm-cursor-pointer")),_.leave&&_.leave(y,_.text)}_linkAtPosition(v,_){const y=v.range.start.y*this._bufferService.cols+v.range.start.x,A=v.range.end.y*this._bufferService.cols+v.range.end.x,L=_.y*this._bufferService.cols+_.x;return y<=L&&L<=A}_positionFromMouseEvent(v,_,y){const A=y.getCoords(v,_,this._bufferService.cols,this._bufferService.rows);if(A)return{x:A[0],y:A[1]+this._bufferService.buffer.ydisp}}_createLinkUnderlineEvent(v,_,y,A,L){return{x1:v,y1:_,x2:y,y2:A,cols:this._bufferService.cols,fg:L}}};o.Linkifier=S=h([p(1,E.IMouseService),p(2,E.IRenderService),p(3,T.IBufferService),p(4,E.ILinkProviderService)],S)},9042:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.tooMuchOutput=o.promptLabel=void 0,o.promptLabel="Terminal input",o.tooMuchOutput="Too much output to announce, navigate to rows manually to read"},3730:function(f,o,c){var h=this&&this.__decorate||function(E,S,v,_){var y,A=arguments.length,L=A<3?S:_===null?_=Object.getOwnPropertyDescriptor(S,v):_;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")L=Reflect.decorate(E,S,v,_);else for(var D=E.length-1;D>=0;D--)(y=E[D])&&(L=(A<3?y(L):A>3?y(S,v,L):y(S,v))||L);return A>3&&L&&Object.defineProperty(S,v,L),L},p=this&&this.__param||function(E,S){return function(v,_){S(v,_,E)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkProvider=void 0;const u=c(511),b=c(2585);let C=o.OscLinkProvider=class{constructor(E,S,v){this._bufferService=E,this._optionsService=S,this._oscLinkService=v}provideLinks(E,S){var M;const v=this._bufferService.buffer.lines.get(E-1);if(!v)return void S(void 0);const _=[],y=this._optionsService.rawOptions.linkHandler,A=new u.CellData,L=v.getTrimmedLength();let D=-1,R=-1,k=!1;for(let j=0;j<L;j++)if(R!==-1||v.hasContent(j)){if(v.loadCell(j,A),A.hasExtendedAttrs()&&A.extended.urlId){if(R===-1){R=j,D=A.extended.urlId;continue}k=A.extended.urlId!==D}else R!==-1&&(k=!0);if(k||R!==-1&&j===L-1){const H=(M=this._oscLinkService.getLinkData(D))==null?void 0:M.uri;if(H){const U={start:{x:R+1,y:E},end:{x:j+(k||j!==L-1?0:1),y:E}};let F=!1;if(!(y!=null&&y.allowNonHttpProtocols))try{const K=new URL(H);["http:","https:"].includes(K.protocol)||(F=!0)}catch{F=!0}F||_.push({text:H,range:U,activate:(K,Y)=>y?y.activate(K,Y,U):T(0,Y),hover:(K,Y)=>{var G;return(G=y==null?void 0:y.hover)==null?void 0:G.call(y,K,Y,U)},leave:(K,Y)=>{var G;return(G=y==null?void 0:y.leave)==null?void 0:G.call(y,K,Y,U)}})}k=!1,A.hasExtendedAttrs()&&A.extended.urlId?(R=j,D=A.extended.urlId):(R=-1,D=-1)}}S(_)}};function T(E,S){if(confirm(`Do you want to navigate to ${S}?
|
|
54
54
|
|
|
@@ -56,41 +56,41 @@ WARNING: This link could potentially be dangerous`)){const v=window.open();if(v)
|
|
|
56
56
|
`:`
|
|
57
57
|
`)}clearSelection(){this._model.clearSelection(),this._removeMouseDownListeners(),this.refresh(),this._onSelectionChange.fire()}refresh(k){this._refreshAnimationFrame||(this._refreshAnimationFrame=this._coreBrowserService.window.requestAnimationFrame((()=>this._refresh()))),v.isLinux&&k&&this.selectionText.length&&this._onLinuxMouseSelection.fire(this.selectionText)}_refresh(){this._refreshAnimationFrame=void 0,this._onRedrawRequest.fire({start:this._model.finalSelectionStart,end:this._model.finalSelectionEnd,columnSelectMode:this._activeSelectionMode===3})}_isClickInSelection(k){const M=this._getMouseBufferCoords(k),j=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!!(j&&H&&M)&&this._areCoordsInSelection(M,j,H)}isCellInSelection(k,M){const j=this._model.finalSelectionStart,H=this._model.finalSelectionEnd;return!(!j||!H)&&this._areCoordsInSelection([k,M],j,H)}_areCoordsInSelection(k,M,j){return k[1]>M[1]&&k[1]<j[1]||M[1]===j[1]&&k[1]===M[1]&&k[0]>=M[0]&&k[0]<j[0]||M[1]<j[1]&&k[1]===j[1]&&k[0]<j[0]||M[1]<j[1]&&k[1]===M[1]&&k[0]>=M[0]}_selectWordAtCursor(k,M){var U,F;const j=(F=(U=this._linkifier.currentLink)==null?void 0:U.link)==null?void 0:F.range;if(j)return this._model.selectionStart=[j.start.x-1,j.start.y-1],this._model.selectionStartLength=(0,_.getRangeLength)(j,this._bufferService.cols),this._model.selectionEnd=void 0,!0;const H=this._getMouseBufferCoords(k);return!!H&&(this._selectWordAt(H,M),this._model.selectionEnd=void 0,!0)}selectAll(){this._model.isSelectAllActive=!0,this.refresh(),this._onSelectionChange.fire()}selectLines(k,M){this._model.clearSelection(),k=Math.max(k,0),M=Math.min(M,this._bufferService.buffer.lines.length-1),this._model.selectionStart=[0,k],this._model.selectionEnd=[this._bufferService.cols,M],this.refresh(),this._onSelectionChange.fire()}_handleTrim(k){this._model.handleTrim(k)&&this.refresh()}_getMouseBufferCoords(k){const M=this._mouseService.getCoords(k,this._screenElement,this._bufferService.cols,this._bufferService.rows,!0);if(M)return M[0]--,M[1]--,M[1]+=this._bufferService.buffer.ydisp,M}_getMouseEventScrollAmount(k){let M=(0,u.getCoordsRelativeToElement)(this._coreBrowserService.window,k,this._screenElement)[1];const j=this._renderService.dimensions.css.canvas.height;return M>=0&&M<=j?0:(M>j&&(M-=j),M=Math.min(Math.max(M,-50),50),M/=50,M/Math.abs(M)+Math.round(14*M))}shouldForceSelection(k){return v.isMac?k.altKey&&this._optionsService.rawOptions.macOptionClickForcesSelection:k.shiftKey}handleMouseDown(k){if(this._mouseDownTimeStamp=k.timeStamp,(k.button!==2||!this.hasSelection)&&k.button===0){if(!this._enabled){if(!this.shouldForceSelection(k))return;k.stopPropagation()}k.preventDefault(),this._dragScrollAmount=0,this._enabled&&k.shiftKey?this._handleIncrementalClick(k):k.detail===1?this._handleSingleClick(k):k.detail===2?this._handleDoubleClick(k):k.detail===3&&this._handleTripleClick(k),this._addMouseDownListeners(),this.refresh(!0)}}_addMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.addEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.addEventListener("mouseup",this._mouseUpListener)),this._dragScrollIntervalTimer=this._coreBrowserService.window.setInterval((()=>this._dragScroll()),50)}_removeMouseDownListeners(){this._screenElement.ownerDocument&&(this._screenElement.ownerDocument.removeEventListener("mousemove",this._mouseMoveListener),this._screenElement.ownerDocument.removeEventListener("mouseup",this._mouseUpListener)),this._coreBrowserService.window.clearInterval(this._dragScrollIntervalTimer),this._dragScrollIntervalTimer=void 0}_handleIncrementalClick(k){this._model.selectionStart&&(this._model.selectionEnd=this._getMouseBufferCoords(k))}_handleSingleClick(k){if(this._model.selectionStartLength=0,this._model.isSelectAllActive=!1,this._activeSelectionMode=this.shouldColumnSelect(k)?3:0,this._model.selectionStart=this._getMouseBufferCoords(k),!this._model.selectionStart)return;this._model.selectionEnd=void 0;const M=this._bufferService.buffer.lines.get(this._model.selectionStart[1]);M&&M.length!==this._model.selectionStart[0]&&M.hasWidth(this._model.selectionStart[0])===0&&this._model.selectionStart[0]++}_handleDoubleClick(k){this._selectWordAtCursor(k,!0)&&(this._activeSelectionMode=1)}_handleTripleClick(k){const M=this._getMouseBufferCoords(k);M&&(this._activeSelectionMode=2,this._selectLineAt(M[1]))}shouldColumnSelect(k){return k.altKey&&!(v.isMac&&this._optionsService.rawOptions.macOptionClickForcesSelection)}_handleMouseMove(k){if(k.stopImmediatePropagation(),!this._model.selectionStart)return;const M=this._model.selectionEnd?[this._model.selectionEnd[0],this._model.selectionEnd[1]]:null;if(this._model.selectionEnd=this._getMouseBufferCoords(k),!this._model.selectionEnd)return void this.refresh(!0);this._activeSelectionMode===2?this._model.selectionEnd[1]<this._model.selectionStart[1]?this._model.selectionEnd[0]=0:this._model.selectionEnd[0]=this._bufferService.cols:this._activeSelectionMode===1&&this._selectToWordAt(this._model.selectionEnd),this._dragScrollAmount=this._getMouseEventScrollAmount(k),this._activeSelectionMode!==3&&(this._dragScrollAmount>0?this._model.selectionEnd[0]=this._bufferService.cols:this._dragScrollAmount<0&&(this._model.selectionEnd[0]=0));const j=this._bufferService.buffer;if(this._model.selectionEnd[1]<j.lines.length){const H=j.lines.get(this._model.selectionEnd[1]);H&&H.hasWidth(this._model.selectionEnd[0])===0&&this._model.selectionEnd[0]<this._bufferService.cols&&this._model.selectionEnd[0]++}M&&M[0]===this._model.selectionEnd[0]&&M[1]===this._model.selectionEnd[1]||this.refresh(!0)}_dragScroll(){if(this._model.selectionEnd&&this._model.selectionStart&&this._dragScrollAmount){this._onRequestScrollLines.fire({amount:this._dragScrollAmount,suppressScrollEvent:!1});const k=this._bufferService.buffer;this._dragScrollAmount>0?(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=this._bufferService.cols),this._model.selectionEnd[1]=Math.min(k.ydisp+this._bufferService.rows,k.lines.length-1)):(this._activeSelectionMode!==3&&(this._model.selectionEnd[0]=0),this._model.selectionEnd[1]=k.ydisp),this.refresh()}}_handleMouseUp(k){const M=k.timeStamp-this._mouseDownTimeStamp;if(this._removeMouseDownListeners(),this.selectionText.length<=1&&M<500&&k.altKey&&this._optionsService.rawOptions.altClickMovesCursor){if(this._bufferService.buffer.ybase===this._bufferService.buffer.ydisp){const j=this._mouseService.getCoords(k,this._element,this._bufferService.cols,this._bufferService.rows,!1);if(j&&j[0]!==void 0&&j[1]!==void 0){const H=(0,b.moveToCellSequence)(j[0]-1,j[1]-1,this._bufferService,this._coreService.decPrivateModes.applicationCursorKeys);this._coreService.triggerDataEvent(H,!0)}}}else this._fireEventIfSelectionChanged()}_fireEventIfSelectionChanged(){const k=this._model.finalSelectionStart,M=this._model.finalSelectionEnd,j=!(!k||!M||k[0]===M[0]&&k[1]===M[1]);j?k&&M&&(this._oldSelectionStart&&this._oldSelectionEnd&&k[0]===this._oldSelectionStart[0]&&k[1]===this._oldSelectionStart[1]&&M[0]===this._oldSelectionEnd[0]&&M[1]===this._oldSelectionEnd[1]||this._fireOnSelectionChange(k,M,j)):this._oldHasSelection&&this._fireOnSelectionChange(k,M,j)}_fireOnSelectionChange(k,M,j){this._oldSelectionStart=k,this._oldSelectionEnd=M,this._oldHasSelection=j,this._onSelectionChange.fire()}_handleBufferActivate(k){this.clearSelection(),this._trimListener.dispose(),this._trimListener=k.activeBuffer.lines.onTrim((M=>this._handleTrim(M)))}_convertViewportColToCharacterIndex(k,M){let j=M;for(let H=0;M>=H;H++){const U=k.loadCell(H,this._workCell).getChars().length;this._workCell.getWidth()===0?j--:U>1&&M!==H&&(j+=U-1)}return j}setSelection(k,M,j){this._model.clearSelection(),this._removeMouseDownListeners(),this._model.selectionStart=[k,M],this._model.selectionStartLength=j,this.refresh(),this._fireEventIfSelectionChanged()}rightClickSelect(k){this._isClickInSelection(k)||(this._selectWordAtCursor(k,!1)&&this.refresh(!0),this._fireEventIfSelectionChanged())}_getWordAt(k,M,j=!0,H=!0){if(k[0]>=this._bufferService.cols)return;const U=this._bufferService.buffer,F=U.lines.get(k[1]);if(!F)return;const K=U.translateBufferLineToString(k[1],!1);let Y=this._convertViewportColToCharacterIndex(F,k[0]),G=Y;const W=k[0]-Y;let Z=0,z=0,O=0,N=0;if(K.charAt(Y)===" "){for(;Y>0&&K.charAt(Y-1)===" ";)Y--;for(;G<K.length&&K.charAt(G+1)===" ";)G++}else{let re=k[0],ve=k[0];F.getWidth(re)===0&&(Z++,re--),F.getWidth(ve)===2&&(z++,ve++);const pe=F.getString(ve).length;for(pe>1&&(N+=pe-1,G+=pe-1);re>0&&Y>0&&!this._isCharWordSeparator(F.loadCell(re-1,this._workCell));){F.loadCell(re-1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===0?(Z++,re--):Q>1&&(O+=Q-1,Y-=Q-1),Y--,re--}for(;ve<F.length&&G+1<K.length&&!this._isCharWordSeparator(F.loadCell(ve+1,this._workCell));){F.loadCell(ve+1,this._workCell);const Q=this._workCell.getChars().length;this._workCell.getWidth()===2?(z++,ve++):Q>1&&(N+=Q-1,G+=Q-1),G++,ve++}}G++;let $=Y+W-Z+O,I=Math.min(this._bufferService.cols,G-Y+Z+z-O-N);if(M||K.slice(Y,G).trim()!==""){if(j&&$===0&&F.getCodePoint(0)!==32){const re=U.lines.get(k[1]-1);if(re&&F.isWrapped&&re.getCodePoint(this._bufferService.cols-1)!==32){const ve=this._getWordAt([this._bufferService.cols-1,k[1]-1],!1,!0,!1);if(ve){const pe=this._bufferService.cols-ve.start;$-=pe,I+=pe}}}if(H&&$+I===this._bufferService.cols&&F.getCodePoint(this._bufferService.cols-1)!==32){const re=U.lines.get(k[1]+1);if(re!=null&&re.isWrapped&&re.getCodePoint(0)!==32){const ve=this._getWordAt([0,k[1]+1],!1,!1,!0);ve&&(I+=ve.length)}}return{start:$,length:I}}}_selectWordAt(k,M){const j=this._getWordAt(k,M);if(j){for(;j.start<0;)j.start+=this._bufferService.cols,k[1]--;this._model.selectionStart=[j.start,k[1]],this._model.selectionStartLength=j.length}}_selectToWordAt(k){const M=this._getWordAt(k,!0);if(M){let j=k[1];for(;M.start<0;)M.start+=this._bufferService.cols,j--;if(!this._model.areSelectionValuesReversed())for(;M.start+M.length>this._bufferService.cols;)M.length-=this._bufferService.cols,j++;this._model.selectionEnd=[this._model.areSelectionValuesReversed()?M.start:M.start+M.length,j]}}_isCharWordSeparator(k){return k.getWidth()!==0&&this._optionsService.rawOptions.wordSeparator.indexOf(k.getChars())>=0}_selectLineAt(k){const M=this._bufferService.buffer.getWrappedRangeForLine(k),j={start:{x:0,y:M.first},end:{x:this._bufferService.cols-1,y:M.last}};this._model.selectionStart=[0,M.first],this._model.selectionEnd=void 0,this._model.selectionStartLength=(0,_.getRangeLength)(j,this._bufferService.cols)}};o.SelectionService=R=h([p(3,A.IBufferService),p(4,A.ICoreService),p(5,T.IMouseService),p(6,A.IOptionsService),p(7,T.IRenderService),p(8,T.ICoreBrowserService)],R)},4725:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ILinkProviderService=o.IThemeService=o.ICharacterJoinerService=o.ISelectionService=o.IRenderService=o.IMouseService=o.ICoreBrowserService=o.ICharSizeService=void 0;const h=c(8343);o.ICharSizeService=(0,h.createDecorator)("CharSizeService"),o.ICoreBrowserService=(0,h.createDecorator)("CoreBrowserService"),o.IMouseService=(0,h.createDecorator)("MouseService"),o.IRenderService=(0,h.createDecorator)("RenderService"),o.ISelectionService=(0,h.createDecorator)("SelectionService"),o.ICharacterJoinerService=(0,h.createDecorator)("CharacterJoinerService"),o.IThemeService=(0,h.createDecorator)("ThemeService"),o.ILinkProviderService=(0,h.createDecorator)("LinkProviderService")},6731:function(f,o,c){var h=this&&this.__decorate||function(R,k,M,j){var H,U=arguments.length,F=U<3?k:j===null?j=Object.getOwnPropertyDescriptor(k,M):j;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")F=Reflect.decorate(R,k,M,j);else for(var K=R.length-1;K>=0;K--)(H=R[K])&&(F=(U<3?H(F):U>3?H(k,M,F):H(k,M))||F);return U>3&&F&&Object.defineProperty(k,M,F),F},p=this&&this.__param||function(R,k){return function(M,j){k(M,j,R)}};Object.defineProperty(o,"__esModule",{value:!0}),o.ThemeService=o.DEFAULT_ANSI_COLORS=void 0;const u=c(7239),b=c(8055),C=c(8460),T=c(844),E=c(2585),S=b.css.toColor("#ffffff"),v=b.css.toColor("#000000"),_=b.css.toColor("#ffffff"),y=b.css.toColor("#000000"),A={css:"rgba(255, 255, 255, 0.3)",rgba:4294967117};o.DEFAULT_ANSI_COLORS=Object.freeze((()=>{const R=[b.css.toColor("#2e3436"),b.css.toColor("#cc0000"),b.css.toColor("#4e9a06"),b.css.toColor("#c4a000"),b.css.toColor("#3465a4"),b.css.toColor("#75507b"),b.css.toColor("#06989a"),b.css.toColor("#d3d7cf"),b.css.toColor("#555753"),b.css.toColor("#ef2929"),b.css.toColor("#8ae234"),b.css.toColor("#fce94f"),b.css.toColor("#729fcf"),b.css.toColor("#ad7fa8"),b.css.toColor("#34e2e2"),b.css.toColor("#eeeeec")],k=[0,95,135,175,215,255];for(let M=0;M<216;M++){const j=k[M/36%6|0],H=k[M/6%6|0],U=k[M%6];R.push({css:b.channels.toCss(j,H,U),rgba:b.channels.toRgba(j,H,U)})}for(let M=0;M<24;M++){const j=8+10*M;R.push({css:b.channels.toCss(j,j,j),rgba:b.channels.toRgba(j,j,j)})}return R})());let L=o.ThemeService=class extends T.Disposable{get colors(){return this._colors}constructor(R){super(),this._optionsService=R,this._contrastCache=new u.ColorContrastCache,this._halfContrastCache=new u.ColorContrastCache,this._onChangeColors=this.register(new C.EventEmitter),this.onChangeColors=this._onChangeColors.event,this._colors={foreground:S,background:v,cursor:_,cursorAccent:y,selectionForeground:void 0,selectionBackgroundTransparent:A,selectionBackgroundOpaque:b.color.blend(v,A),selectionInactiveBackgroundTransparent:A,selectionInactiveBackgroundOpaque:b.color.blend(v,A),ansi:o.DEFAULT_ANSI_COLORS.slice(),contrastCache:this._contrastCache,halfContrastCache:this._halfContrastCache},this._updateRestoreColors(),this._setTheme(this._optionsService.rawOptions.theme),this.register(this._optionsService.onSpecificOptionChange("minimumContrastRatio",(()=>this._contrastCache.clear()))),this.register(this._optionsService.onSpecificOptionChange("theme",(()=>this._setTheme(this._optionsService.rawOptions.theme))))}_setTheme(R={}){const k=this._colors;if(k.foreground=D(R.foreground,S),k.background=D(R.background,v),k.cursor=D(R.cursor,_),k.cursorAccent=D(R.cursorAccent,y),k.selectionBackgroundTransparent=D(R.selectionBackground,A),k.selectionBackgroundOpaque=b.color.blend(k.background,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundTransparent=D(R.selectionInactiveBackground,k.selectionBackgroundTransparent),k.selectionInactiveBackgroundOpaque=b.color.blend(k.background,k.selectionInactiveBackgroundTransparent),k.selectionForeground=R.selectionForeground?D(R.selectionForeground,b.NULL_COLOR):void 0,k.selectionForeground===b.NULL_COLOR&&(k.selectionForeground=void 0),b.color.isOpaque(k.selectionBackgroundTransparent)&&(k.selectionBackgroundTransparent=b.color.opacity(k.selectionBackgroundTransparent,.3)),b.color.isOpaque(k.selectionInactiveBackgroundTransparent)&&(k.selectionInactiveBackgroundTransparent=b.color.opacity(k.selectionInactiveBackgroundTransparent,.3)),k.ansi=o.DEFAULT_ANSI_COLORS.slice(),k.ansi[0]=D(R.black,o.DEFAULT_ANSI_COLORS[0]),k.ansi[1]=D(R.red,o.DEFAULT_ANSI_COLORS[1]),k.ansi[2]=D(R.green,o.DEFAULT_ANSI_COLORS[2]),k.ansi[3]=D(R.yellow,o.DEFAULT_ANSI_COLORS[3]),k.ansi[4]=D(R.blue,o.DEFAULT_ANSI_COLORS[4]),k.ansi[5]=D(R.magenta,o.DEFAULT_ANSI_COLORS[5]),k.ansi[6]=D(R.cyan,o.DEFAULT_ANSI_COLORS[6]),k.ansi[7]=D(R.white,o.DEFAULT_ANSI_COLORS[7]),k.ansi[8]=D(R.brightBlack,o.DEFAULT_ANSI_COLORS[8]),k.ansi[9]=D(R.brightRed,o.DEFAULT_ANSI_COLORS[9]),k.ansi[10]=D(R.brightGreen,o.DEFAULT_ANSI_COLORS[10]),k.ansi[11]=D(R.brightYellow,o.DEFAULT_ANSI_COLORS[11]),k.ansi[12]=D(R.brightBlue,o.DEFAULT_ANSI_COLORS[12]),k.ansi[13]=D(R.brightMagenta,o.DEFAULT_ANSI_COLORS[13]),k.ansi[14]=D(R.brightCyan,o.DEFAULT_ANSI_COLORS[14]),k.ansi[15]=D(R.brightWhite,o.DEFAULT_ANSI_COLORS[15]),R.extendedAnsi){const M=Math.min(k.ansi.length-16,R.extendedAnsi.length);for(let j=0;j<M;j++)k.ansi[j+16]=D(R.extendedAnsi[j],o.DEFAULT_ANSI_COLORS[j+16])}this._contrastCache.clear(),this._halfContrastCache.clear(),this._updateRestoreColors(),this._onChangeColors.fire(this.colors)}restoreColor(R){this._restoreColor(R),this._onChangeColors.fire(this.colors)}_restoreColor(R){if(R!==void 0)switch(R){case 256:this._colors.foreground=this._restoreColors.foreground;break;case 257:this._colors.background=this._restoreColors.background;break;case 258:this._colors.cursor=this._restoreColors.cursor;break;default:this._colors.ansi[R]=this._restoreColors.ansi[R]}else for(let k=0;k<this._restoreColors.ansi.length;++k)this._colors.ansi[k]=this._restoreColors.ansi[k]}modifyColors(R){R(this._colors),this._onChangeColors.fire(this.colors)}_updateRestoreColors(){this._restoreColors={foreground:this._colors.foreground,background:this._colors.background,cursor:this._colors.cursor,ansi:this._colors.ansi.slice()}}};function D(R,k){if(R!==void 0)try{return b.css.toColor(R)}catch{}return k}o.ThemeService=L=h([p(0,E.IOptionsService)],L)},6349:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CircularList=void 0;const h=c(8460),p=c(844);class u extends p.Disposable{constructor(C){super(),this._maxLength=C,this.onDeleteEmitter=this.register(new h.EventEmitter),this.onDelete=this.onDeleteEmitter.event,this.onInsertEmitter=this.register(new h.EventEmitter),this.onInsert=this.onInsertEmitter.event,this.onTrimEmitter=this.register(new h.EventEmitter),this.onTrim=this.onTrimEmitter.event,this._array=new Array(this._maxLength),this._startIndex=0,this._length=0}get maxLength(){return this._maxLength}set maxLength(C){if(this._maxLength===C)return;const T=new Array(C);for(let E=0;E<Math.min(C,this.length);E++)T[E]=this._array[this._getCyclicIndex(E)];this._array=T,this._maxLength=C,this._startIndex=0}get length(){return this._length}set length(C){if(C>this._length)for(let T=this._length;T<C;T++)this._array[T]=void 0;this._length=C}get(C){return this._array[this._getCyclicIndex(C)]}set(C,T){this._array[this._getCyclicIndex(C)]=T}push(C){this._array[this._getCyclicIndex(this._length)]=C,this._length===this._maxLength?(this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1)):this._length++}recycle(){if(this._length!==this._maxLength)throw new Error("Can only recycle when the buffer is full");return this._startIndex=++this._startIndex%this._maxLength,this.onTrimEmitter.fire(1),this._array[this._getCyclicIndex(this._length-1)]}get isFull(){return this._length===this._maxLength}pop(){return this._array[this._getCyclicIndex(this._length---1)]}splice(C,T,...E){if(T){for(let S=C;S<this._length-T;S++)this._array[this._getCyclicIndex(S)]=this._array[this._getCyclicIndex(S+T)];this._length-=T,this.onDeleteEmitter.fire({index:C,amount:T})}for(let S=this._length-1;S>=C;S--)this._array[this._getCyclicIndex(S+E.length)]=this._array[this._getCyclicIndex(S)];for(let S=0;S<E.length;S++)this._array[this._getCyclicIndex(C+S)]=E[S];if(E.length&&this.onInsertEmitter.fire({index:C,amount:E.length}),this._length+E.length>this._maxLength){const S=this._length+E.length-this._maxLength;this._startIndex+=S,this._length=this._maxLength,this.onTrimEmitter.fire(S)}else this._length+=E.length}trimStart(C){C>this._length&&(C=this._length),this._startIndex+=C,this._length-=C,this.onTrimEmitter.fire(C)}shiftElements(C,T,E){if(!(T<=0)){if(C<0||C>=this._length)throw new Error("start argument out of range");if(C+E<0)throw new Error("Cannot shift elements in list beyond index 0");if(E>0){for(let v=T-1;v>=0;v--)this.set(C+v+E,this.get(C+v));const S=C+T+E-this._length;if(S>0)for(this._length+=S;this._length>this._maxLength;)this._length--,this._startIndex++,this.onTrimEmitter.fire(1)}else for(let S=0;S<T;S++)this.set(C+S+E,this.get(C+S))}}_getCyclicIndex(C){return(this._startIndex+C)%this._maxLength}}o.CircularList=u},1439:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.clone=void 0,o.clone=function c(h,p=5){if(typeof h!="object")return h;const u=Array.isArray(h)?[]:{};for(const b in h)u[b]=p<=1?h[b]:h[b]&&c(h[b],p-1);return u}},8055:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.contrastRatio=o.toPaddedHex=o.rgba=o.rgb=o.css=o.color=o.channels=o.NULL_COLOR=void 0;let c=0,h=0,p=0,u=0;var b,C,T,E,S;function v(y){const A=y.toString(16);return A.length<2?"0"+A:A}function _(y,A){return y<A?(A+.05)/(y+.05):(y+.05)/(A+.05)}o.NULL_COLOR={css:"#00000000",rgba:0},(function(y){y.toCss=function(A,L,D,R){return R!==void 0?`#${v(A)}${v(L)}${v(D)}${v(R)}`:`#${v(A)}${v(L)}${v(D)}`},y.toRgba=function(A,L,D,R=255){return(A<<24|L<<16|D<<8|R)>>>0},y.toColor=function(A,L,D,R){return{css:y.toCss(A,L,D,R),rgba:y.toRgba(A,L,D,R)}}})(b||(o.channels=b={})),(function(y){function A(L,D){return u=Math.round(255*D),[c,h,p]=S.toChannels(L.rgba),{css:b.toCss(c,h,p,u),rgba:b.toRgba(c,h,p,u)}}y.blend=function(L,D){if(u=(255&D.rgba)/255,u===1)return{css:D.css,rgba:D.rgba};const R=D.rgba>>24&255,k=D.rgba>>16&255,M=D.rgba>>8&255,j=L.rgba>>24&255,H=L.rgba>>16&255,U=L.rgba>>8&255;return c=j+Math.round((R-j)*u),h=H+Math.round((k-H)*u),p=U+Math.round((M-U)*u),{css:b.toCss(c,h,p),rgba:b.toRgba(c,h,p)}},y.isOpaque=function(L){return(255&L.rgba)==255},y.ensureContrastRatio=function(L,D,R){const k=S.ensureContrastRatio(L.rgba,D.rgba,R);if(k)return b.toColor(k>>24&255,k>>16&255,k>>8&255)},y.opaque=function(L){const D=(255|L.rgba)>>>0;return[c,h,p]=S.toChannels(D),{css:b.toCss(c,h,p),rgba:D}},y.opacity=A,y.multiplyOpacity=function(L,D){return u=255&L.rgba,A(L,u*D/255)},y.toColorRGB=function(L){return[L.rgba>>24&255,L.rgba>>16&255,L.rgba>>8&255]}})(C||(o.color=C={})),(function(y){let A,L;try{const D=document.createElement("canvas");D.width=1,D.height=1;const R=D.getContext("2d",{willReadFrequently:!0});R&&(A=R,A.globalCompositeOperation="copy",L=A.createLinearGradient(0,0,1,1))}catch{}y.toColor=function(D){if(D.match(/#[\da-f]{3,8}/i))switch(D.length){case 4:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),p=parseInt(D.slice(3,4).repeat(2),16),b.toColor(c,h,p);case 5:return c=parseInt(D.slice(1,2).repeat(2),16),h=parseInt(D.slice(2,3).repeat(2),16),p=parseInt(D.slice(3,4).repeat(2),16),u=parseInt(D.slice(4,5).repeat(2),16),b.toColor(c,h,p,u);case 7:return{css:D,rgba:(parseInt(D.slice(1),16)<<8|255)>>>0};case 9:return{css:D,rgba:parseInt(D.slice(1),16)>>>0}}const R=D.match(/rgba?\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*(,\s*(0|1|\d?\.(\d+))\s*)?\)/);if(R)return c=parseInt(R[1]),h=parseInt(R[2]),p=parseInt(R[3]),u=Math.round(255*(R[5]===void 0?1:parseFloat(R[5]))),b.toColor(c,h,p,u);if(!A||!L)throw new Error("css.toColor: Unsupported css format");if(A.fillStyle=L,A.fillStyle=D,typeof A.fillStyle!="string")throw new Error("css.toColor: Unsupported css format");if(A.fillRect(0,0,1,1),[c,h,p,u]=A.getImageData(0,0,1,1).data,u!==255)throw new Error("css.toColor: Unsupported css format");return{rgba:b.toRgba(c,h,p,u),css:D}}})(T||(o.css=T={})),(function(y){function A(L,D,R){const k=L/255,M=D/255,j=R/255;return .2126*(k<=.03928?k/12.92:Math.pow((k+.055)/1.055,2.4))+.7152*(M<=.03928?M/12.92:Math.pow((M+.055)/1.055,2.4))+.0722*(j<=.03928?j/12.92:Math.pow((j+.055)/1.055,2.4))}y.relativeLuminance=function(L){return A(L>>16&255,L>>8&255,255&L)},y.relativeLuminance2=A})(E||(o.rgb=E={})),(function(y){function A(D,R,k){const M=D>>24&255,j=D>>16&255,H=D>>8&255;let U=R>>24&255,F=R>>16&255,K=R>>8&255,Y=_(E.relativeLuminance2(U,F,K),E.relativeLuminance2(M,j,H));for(;Y<k&&(U>0||F>0||K>0);)U-=Math.max(0,Math.ceil(.1*U)),F-=Math.max(0,Math.ceil(.1*F)),K-=Math.max(0,Math.ceil(.1*K)),Y=_(E.relativeLuminance2(U,F,K),E.relativeLuminance2(M,j,H));return(U<<24|F<<16|K<<8|255)>>>0}function L(D,R,k){const M=D>>24&255,j=D>>16&255,H=D>>8&255;let U=R>>24&255,F=R>>16&255,K=R>>8&255,Y=_(E.relativeLuminance2(U,F,K),E.relativeLuminance2(M,j,H));for(;Y<k&&(U<255||F<255||K<255);)U=Math.min(255,U+Math.ceil(.1*(255-U))),F=Math.min(255,F+Math.ceil(.1*(255-F))),K=Math.min(255,K+Math.ceil(.1*(255-K))),Y=_(E.relativeLuminance2(U,F,K),E.relativeLuminance2(M,j,H));return(U<<24|F<<16|K<<8|255)>>>0}y.blend=function(D,R){if(u=(255&R)/255,u===1)return R;const k=R>>24&255,M=R>>16&255,j=R>>8&255,H=D>>24&255,U=D>>16&255,F=D>>8&255;return c=H+Math.round((k-H)*u),h=U+Math.round((M-U)*u),p=F+Math.round((j-F)*u),b.toRgba(c,h,p)},y.ensureContrastRatio=function(D,R,k){const M=E.relativeLuminance(D>>8),j=E.relativeLuminance(R>>8);if(_(M,j)<k){if(j<M){const F=A(D,R,k),K=_(M,E.relativeLuminance(F>>8));if(K<k){const Y=L(D,R,k);return K>_(M,E.relativeLuminance(Y>>8))?F:Y}return F}const H=L(D,R,k),U=_(M,E.relativeLuminance(H>>8));if(U<k){const F=A(D,R,k);return U>_(M,E.relativeLuminance(F>>8))?H:F}return H}},y.reduceLuminance=A,y.increaseLuminance=L,y.toChannels=function(D){return[D>>24&255,D>>16&255,D>>8&255,255&D]}})(S||(o.rgba=S={})),o.toPaddedHex=v,o.contrastRatio=_},8969:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CoreTerminal=void 0;const h=c(844),p=c(2585),u=c(4348),b=c(7866),C=c(744),T=c(7302),E=c(6975),S=c(8460),v=c(1753),_=c(1480),y=c(7994),A=c(9282),L=c(5435),D=c(5981),R=c(2660);let k=!1;class M extends h.Disposable{get onScroll(){return this._onScrollApi||(this._onScrollApi=this.register(new S.EventEmitter),this._onScroll.event((H=>{var U;(U=this._onScrollApi)==null||U.fire(H.position)}))),this._onScrollApi.event}get cols(){return this._bufferService.cols}get rows(){return this._bufferService.rows}get buffers(){return this._bufferService.buffers}get options(){return this.optionsService.options}set options(H){for(const U in H)this.optionsService.options[U]=H[U]}constructor(H){super(),this._windowsWrappingHeuristics=this.register(new h.MutableDisposable),this._onBinary=this.register(new S.EventEmitter),this.onBinary=this._onBinary.event,this._onData=this.register(new S.EventEmitter),this.onData=this._onData.event,this._onLineFeed=this.register(new S.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onResize=this.register(new S.EventEmitter),this.onResize=this._onResize.event,this._onWriteParsed=this.register(new S.EventEmitter),this.onWriteParsed=this._onWriteParsed.event,this._onScroll=this.register(new S.EventEmitter),this._instantiationService=new u.InstantiationService,this.optionsService=this.register(new T.OptionsService(H)),this._instantiationService.setService(p.IOptionsService,this.optionsService),this._bufferService=this.register(this._instantiationService.createInstance(C.BufferService)),this._instantiationService.setService(p.IBufferService,this._bufferService),this._logService=this.register(this._instantiationService.createInstance(b.LogService)),this._instantiationService.setService(p.ILogService,this._logService),this.coreService=this.register(this._instantiationService.createInstance(E.CoreService)),this._instantiationService.setService(p.ICoreService,this.coreService),this.coreMouseService=this.register(this._instantiationService.createInstance(v.CoreMouseService)),this._instantiationService.setService(p.ICoreMouseService,this.coreMouseService),this.unicodeService=this.register(this._instantiationService.createInstance(_.UnicodeService)),this._instantiationService.setService(p.IUnicodeService,this.unicodeService),this._charsetService=this._instantiationService.createInstance(y.CharsetService),this._instantiationService.setService(p.ICharsetService,this._charsetService),this._oscLinkService=this._instantiationService.createInstance(R.OscLinkService),this._instantiationService.setService(p.IOscLinkService,this._oscLinkService),this._inputHandler=this.register(new L.InputHandler(this._bufferService,this._charsetService,this.coreService,this._logService,this.optionsService,this._oscLinkService,this.coreMouseService,this.unicodeService)),this.register((0,S.forwardEvent)(this._inputHandler.onLineFeed,this._onLineFeed)),this.register(this._inputHandler),this.register((0,S.forwardEvent)(this._bufferService.onResize,this._onResize)),this.register((0,S.forwardEvent)(this.coreService.onData,this._onData)),this.register((0,S.forwardEvent)(this.coreService.onBinary,this._onBinary)),this.register(this.coreService.onRequestScrollToBottom((()=>this.scrollToBottom()))),this.register(this.coreService.onUserInput((()=>this._writeBuffer.handleUserInput()))),this.register(this.optionsService.onMultipleOptionChange(["windowsMode","windowsPty"],(()=>this._handleWindowsPtyOptionChange()))),this.register(this._bufferService.onScroll((U=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this.register(this._inputHandler.onScroll((U=>{this._onScroll.fire({position:this._bufferService.buffer.ydisp,source:0}),this._inputHandler.markRangeDirty(this._bufferService.buffer.scrollTop,this._bufferService.buffer.scrollBottom)}))),this._writeBuffer=this.register(new D.WriteBuffer(((U,F)=>this._inputHandler.parse(U,F)))),this.register((0,S.forwardEvent)(this._writeBuffer.onWriteParsed,this._onWriteParsed))}write(H,U){this._writeBuffer.write(H,U)}writeSync(H,U){this._logService.logLevel<=p.LogLevelEnum.WARN&&!k&&(this._logService.warn("writeSync is unreliable and will be removed soon."),k=!0),this._writeBuffer.writeSync(H,U)}input(H,U=!0){this.coreService.triggerDataEvent(H,U)}resize(H,U){isNaN(H)||isNaN(U)||(H=Math.max(H,C.MINIMUM_COLS),U=Math.max(U,C.MINIMUM_ROWS),this._bufferService.resize(H,U))}scroll(H,U=!1){this._bufferService.scroll(H,U)}scrollLines(H,U,F){this._bufferService.scrollLines(H,U,F)}scrollPages(H){this.scrollLines(H*(this.rows-1))}scrollToTop(){this.scrollLines(-this._bufferService.buffer.ydisp)}scrollToBottom(){this.scrollLines(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp)}scrollToLine(H){const U=H-this._bufferService.buffer.ydisp;U!==0&&this.scrollLines(U)}registerEscHandler(H,U){return this._inputHandler.registerEscHandler(H,U)}registerDcsHandler(H,U){return this._inputHandler.registerDcsHandler(H,U)}registerCsiHandler(H,U){return this._inputHandler.registerCsiHandler(H,U)}registerOscHandler(H,U){return this._inputHandler.registerOscHandler(H,U)}_setup(){this._handleWindowsPtyOptionChange()}reset(){this._inputHandler.reset(),this._bufferService.reset(),this._charsetService.reset(),this.coreService.reset(),this.coreMouseService.reset()}_handleWindowsPtyOptionChange(){let H=!1;const U=this.optionsService.rawOptions.windowsPty;U&&U.buildNumber!==void 0&&U.buildNumber!==void 0?H=U.backend==="conpty"&&U.buildNumber<21376:this.optionsService.rawOptions.windowsMode&&(H=!0),H?this._enableWindowsWrappingHeuristics():this._windowsWrappingHeuristics.clear()}_enableWindowsWrappingHeuristics(){if(!this._windowsWrappingHeuristics.value){const H=[];H.push(this.onLineFeed(A.updateWindowsModeWrappedState.bind(null,this._bufferService))),H.push(this.registerCsiHandler({final:"H"},(()=>((0,A.updateWindowsModeWrappedState)(this._bufferService),!1)))),this._windowsWrappingHeuristics.value=(0,h.toDisposable)((()=>{for(const U of H)U.dispose()}))}}}o.CoreTerminal=M},8460:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.runAndSubscribe=o.forwardEvent=o.EventEmitter=void 0,o.EventEmitter=class{constructor(){this._listeners=[],this._disposed=!1}get event(){return this._event||(this._event=c=>(this._listeners.push(c),{dispose:()=>{if(!this._disposed){for(let h=0;h<this._listeners.length;h++)if(this._listeners[h]===c)return void this._listeners.splice(h,1)}}})),this._event}fire(c,h){const p=[];for(let u=0;u<this._listeners.length;u++)p.push(this._listeners[u]);for(let u=0;u<p.length;u++)p[u].call(void 0,c,h)}dispose(){this.clearListeners(),this._disposed=!0}clearListeners(){this._listeners&&(this._listeners.length=0)}},o.forwardEvent=function(c,h){return c((p=>h.fire(p)))},o.runAndSubscribe=function(c,h){return h(void 0),c((p=>h(p)))}},5435:function(f,o,c){var h=this&&this.__decorate||function(Z,z,O,N){var $,I=arguments.length,re=I<3?z:N===null?N=Object.getOwnPropertyDescriptor(z,O):N;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")re=Reflect.decorate(Z,z,O,N);else for(var ve=Z.length-1;ve>=0;ve--)($=Z[ve])&&(re=(I<3?$(re):I>3?$(z,O,re):$(z,O))||re);return I>3&&re&&Object.defineProperty(z,O,re),re},p=this&&this.__param||function(Z,z){return function(O,N){z(O,N,Z)}};Object.defineProperty(o,"__esModule",{value:!0}),o.InputHandler=o.WindowsOptionsReportType=void 0;const u=c(2584),b=c(7116),C=c(2015),T=c(844),E=c(482),S=c(8437),v=c(8460),_=c(643),y=c(511),A=c(3734),L=c(2585),D=c(1480),R=c(6242),k=c(6351),M=c(5941),j={"(":0,")":1,"*":2,"+":3,"-":1,".":2},H=131072;function U(Z,z){if(Z>24)return z.setWinLines||!1;switch(Z){case 1:return!!z.restoreWin;case 2:return!!z.minimizeWin;case 3:return!!z.setWinPosition;case 4:return!!z.setWinSizePixels;case 5:return!!z.raiseWin;case 6:return!!z.lowerWin;case 7:return!!z.refreshWin;case 8:return!!z.setWinSizeChars;case 9:return!!z.maximizeWin;case 10:return!!z.fullscreenWin;case 11:return!!z.getWinState;case 13:return!!z.getWinPosition;case 14:return!!z.getWinSizePixels;case 15:return!!z.getScreenSizePixels;case 16:return!!z.getCellSizePixels;case 18:return!!z.getWinSizeChars;case 19:return!!z.getScreenSizeChars;case 20:return!!z.getIconTitle;case 21:return!!z.getWinTitle;case 22:return!!z.pushTitle;case 23:return!!z.popTitle;case 24:return!!z.setWinLines}return!1}var F;(function(Z){Z[Z.GET_WIN_SIZE_PIXELS=0]="GET_WIN_SIZE_PIXELS",Z[Z.GET_CELL_SIZE_PIXELS=1]="GET_CELL_SIZE_PIXELS"})(F||(o.WindowsOptionsReportType=F={}));let K=0;class Y extends T.Disposable{getAttrData(){return this._curAttrData}constructor(z,O,N,$,I,re,ve,pe,Q=new C.EscapeSequenceParser){super(),this._bufferService=z,this._charsetService=O,this._coreService=N,this._logService=$,this._optionsService=I,this._oscLinkService=re,this._coreMouseService=ve,this._unicodeService=pe,this._parser=Q,this._parseBuffer=new Uint32Array(4096),this._stringDecoder=new E.StringToUtf32,this._utf8Decoder=new E.Utf8ToUtf32,this._workCell=new y.CellData,this._windowTitle="",this._iconName="",this._windowTitleStack=[],this._iconNameStack=[],this._curAttrData=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone(),this._onRequestBell=this.register(new v.EventEmitter),this.onRequestBell=this._onRequestBell.event,this._onRequestRefreshRows=this.register(new v.EventEmitter),this.onRequestRefreshRows=this._onRequestRefreshRows.event,this._onRequestReset=this.register(new v.EventEmitter),this.onRequestReset=this._onRequestReset.event,this._onRequestSendFocus=this.register(new v.EventEmitter),this.onRequestSendFocus=this._onRequestSendFocus.event,this._onRequestSyncScrollBar=this.register(new v.EventEmitter),this.onRequestSyncScrollBar=this._onRequestSyncScrollBar.event,this._onRequestWindowsOptionsReport=this.register(new v.EventEmitter),this.onRequestWindowsOptionsReport=this._onRequestWindowsOptionsReport.event,this._onA11yChar=this.register(new v.EventEmitter),this.onA11yChar=this._onA11yChar.event,this._onA11yTab=this.register(new v.EventEmitter),this.onA11yTab=this._onA11yTab.event,this._onCursorMove=this.register(new v.EventEmitter),this.onCursorMove=this._onCursorMove.event,this._onLineFeed=this.register(new v.EventEmitter),this.onLineFeed=this._onLineFeed.event,this._onScroll=this.register(new v.EventEmitter),this.onScroll=this._onScroll.event,this._onTitleChange=this.register(new v.EventEmitter),this.onTitleChange=this._onTitleChange.event,this._onColor=this.register(new v.EventEmitter),this.onColor=this._onColor.event,this._parseStack={paused:!1,cursorStartX:0,cursorStartY:0,decodedLength:0,position:0},this._specialColors=[256,257,258],this.register(this._parser),this._dirtyRowTracker=new G(this._bufferService),this._activeBuffer=this._bufferService.buffer,this.register(this._bufferService.buffers.onBufferActivate((q=>this._activeBuffer=q.activeBuffer))),this._parser.setCsiHandlerFallback(((q,ee)=>{this._logService.debug("Unknown CSI code: ",{identifier:this._parser.identToString(q),params:ee.toArray()})})),this._parser.setEscHandlerFallback((q=>{this._logService.debug("Unknown ESC code: ",{identifier:this._parser.identToString(q)})})),this._parser.setExecuteHandlerFallback((q=>{this._logService.debug("Unknown EXECUTE code: ",{code:q})})),this._parser.setOscHandlerFallback(((q,ee,ae)=>{this._logService.debug("Unknown OSC code: ",{identifier:q,action:ee,data:ae})})),this._parser.setDcsHandlerFallback(((q,ee,ae)=>{ee==="HOOK"&&(ae=ae.toArray()),this._logService.debug("Unknown DCS code: ",{identifier:this._parser.identToString(q),action:ee,payload:ae})})),this._parser.setPrintHandler(((q,ee,ae)=>this.print(q,ee,ae))),this._parser.registerCsiHandler({final:"@"},(q=>this.insertChars(q))),this._parser.registerCsiHandler({intermediates:" ",final:"@"},(q=>this.scrollLeft(q))),this._parser.registerCsiHandler({final:"A"},(q=>this.cursorUp(q))),this._parser.registerCsiHandler({intermediates:" ",final:"A"},(q=>this.scrollRight(q))),this._parser.registerCsiHandler({final:"B"},(q=>this.cursorDown(q))),this._parser.registerCsiHandler({final:"C"},(q=>this.cursorForward(q))),this._parser.registerCsiHandler({final:"D"},(q=>this.cursorBackward(q))),this._parser.registerCsiHandler({final:"E"},(q=>this.cursorNextLine(q))),this._parser.registerCsiHandler({final:"F"},(q=>this.cursorPrecedingLine(q))),this._parser.registerCsiHandler({final:"G"},(q=>this.cursorCharAbsolute(q))),this._parser.registerCsiHandler({final:"H"},(q=>this.cursorPosition(q))),this._parser.registerCsiHandler({final:"I"},(q=>this.cursorForwardTab(q))),this._parser.registerCsiHandler({final:"J"},(q=>this.eraseInDisplay(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"J"},(q=>this.eraseInDisplay(q,!0))),this._parser.registerCsiHandler({final:"K"},(q=>this.eraseInLine(q,!1))),this._parser.registerCsiHandler({prefix:"?",final:"K"},(q=>this.eraseInLine(q,!0))),this._parser.registerCsiHandler({final:"L"},(q=>this.insertLines(q))),this._parser.registerCsiHandler({final:"M"},(q=>this.deleteLines(q))),this._parser.registerCsiHandler({final:"P"},(q=>this.deleteChars(q))),this._parser.registerCsiHandler({final:"S"},(q=>this.scrollUp(q))),this._parser.registerCsiHandler({final:"T"},(q=>this.scrollDown(q))),this._parser.registerCsiHandler({final:"X"},(q=>this.eraseChars(q))),this._parser.registerCsiHandler({final:"Z"},(q=>this.cursorBackwardTab(q))),this._parser.registerCsiHandler({final:"`"},(q=>this.charPosAbsolute(q))),this._parser.registerCsiHandler({final:"a"},(q=>this.hPositionRelative(q))),this._parser.registerCsiHandler({final:"b"},(q=>this.repeatPrecedingCharacter(q))),this._parser.registerCsiHandler({final:"c"},(q=>this.sendDeviceAttributesPrimary(q))),this._parser.registerCsiHandler({prefix:">",final:"c"},(q=>this.sendDeviceAttributesSecondary(q))),this._parser.registerCsiHandler({final:"d"},(q=>this.linePosAbsolute(q))),this._parser.registerCsiHandler({final:"e"},(q=>this.vPositionRelative(q))),this._parser.registerCsiHandler({final:"f"},(q=>this.hVPosition(q))),this._parser.registerCsiHandler({final:"g"},(q=>this.tabClear(q))),this._parser.registerCsiHandler({final:"h"},(q=>this.setMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"h"},(q=>this.setModePrivate(q))),this._parser.registerCsiHandler({final:"l"},(q=>this.resetMode(q))),this._parser.registerCsiHandler({prefix:"?",final:"l"},(q=>this.resetModePrivate(q))),this._parser.registerCsiHandler({final:"m"},(q=>this.charAttributes(q))),this._parser.registerCsiHandler({final:"n"},(q=>this.deviceStatus(q))),this._parser.registerCsiHandler({prefix:"?",final:"n"},(q=>this.deviceStatusPrivate(q))),this._parser.registerCsiHandler({intermediates:"!",final:"p"},(q=>this.softReset(q))),this._parser.registerCsiHandler({intermediates:" ",final:"q"},(q=>this.setCursorStyle(q))),this._parser.registerCsiHandler({final:"r"},(q=>this.setScrollRegion(q))),this._parser.registerCsiHandler({final:"s"},(q=>this.saveCursor(q))),this._parser.registerCsiHandler({final:"t"},(q=>this.windowOptions(q))),this._parser.registerCsiHandler({final:"u"},(q=>this.restoreCursor(q))),this._parser.registerCsiHandler({intermediates:"'",final:"}"},(q=>this.insertColumns(q))),this._parser.registerCsiHandler({intermediates:"'",final:"~"},(q=>this.deleteColumns(q))),this._parser.registerCsiHandler({intermediates:'"',final:"q"},(q=>this.selectProtected(q))),this._parser.registerCsiHandler({intermediates:"$",final:"p"},(q=>this.requestMode(q,!0))),this._parser.registerCsiHandler({prefix:"?",intermediates:"$",final:"p"},(q=>this.requestMode(q,!1))),this._parser.setExecuteHandler(u.C0.BEL,(()=>this.bell())),this._parser.setExecuteHandler(u.C0.LF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.VT,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.FF,(()=>this.lineFeed())),this._parser.setExecuteHandler(u.C0.CR,(()=>this.carriageReturn())),this._parser.setExecuteHandler(u.C0.BS,(()=>this.backspace())),this._parser.setExecuteHandler(u.C0.HT,(()=>this.tab())),this._parser.setExecuteHandler(u.C0.SO,(()=>this.shiftOut())),this._parser.setExecuteHandler(u.C0.SI,(()=>this.shiftIn())),this._parser.setExecuteHandler(u.C1.IND,(()=>this.index())),this._parser.setExecuteHandler(u.C1.NEL,(()=>this.nextLine())),this._parser.setExecuteHandler(u.C1.HTS,(()=>this.tabSet())),this._parser.registerOscHandler(0,new R.OscHandler((q=>(this.setTitle(q),this.setIconName(q),!0)))),this._parser.registerOscHandler(1,new R.OscHandler((q=>this.setIconName(q)))),this._parser.registerOscHandler(2,new R.OscHandler((q=>this.setTitle(q)))),this._parser.registerOscHandler(4,new R.OscHandler((q=>this.setOrReportIndexedColor(q)))),this._parser.registerOscHandler(8,new R.OscHandler((q=>this.setHyperlink(q)))),this._parser.registerOscHandler(10,new R.OscHandler((q=>this.setOrReportFgColor(q)))),this._parser.registerOscHandler(11,new R.OscHandler((q=>this.setOrReportBgColor(q)))),this._parser.registerOscHandler(12,new R.OscHandler((q=>this.setOrReportCursorColor(q)))),this._parser.registerOscHandler(104,new R.OscHandler((q=>this.restoreIndexedColor(q)))),this._parser.registerOscHandler(110,new R.OscHandler((q=>this.restoreFgColor(q)))),this._parser.registerOscHandler(111,new R.OscHandler((q=>this.restoreBgColor(q)))),this._parser.registerOscHandler(112,new R.OscHandler((q=>this.restoreCursorColor(q)))),this._parser.registerEscHandler({final:"7"},(()=>this.saveCursor())),this._parser.registerEscHandler({final:"8"},(()=>this.restoreCursor())),this._parser.registerEscHandler({final:"D"},(()=>this.index())),this._parser.registerEscHandler({final:"E"},(()=>this.nextLine())),this._parser.registerEscHandler({final:"H"},(()=>this.tabSet())),this._parser.registerEscHandler({final:"M"},(()=>this.reverseIndex())),this._parser.registerEscHandler({final:"="},(()=>this.keypadApplicationMode())),this._parser.registerEscHandler({final:">"},(()=>this.keypadNumericMode())),this._parser.registerEscHandler({final:"c"},(()=>this.fullReset())),this._parser.registerEscHandler({final:"n"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"o"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"|"},(()=>this.setgLevel(3))),this._parser.registerEscHandler({final:"}"},(()=>this.setgLevel(2))),this._parser.registerEscHandler({final:"~"},(()=>this.setgLevel(1))),this._parser.registerEscHandler({intermediates:"%",final:"@"},(()=>this.selectDefaultCharset())),this._parser.registerEscHandler({intermediates:"%",final:"G"},(()=>this.selectDefaultCharset()));for(const q in b.CHARSETS)this._parser.registerEscHandler({intermediates:"(",final:q},(()=>this.selectCharset("("+q))),this._parser.registerEscHandler({intermediates:")",final:q},(()=>this.selectCharset(")"+q))),this._parser.registerEscHandler({intermediates:"*",final:q},(()=>this.selectCharset("*"+q))),this._parser.registerEscHandler({intermediates:"+",final:q},(()=>this.selectCharset("+"+q))),this._parser.registerEscHandler({intermediates:"-",final:q},(()=>this.selectCharset("-"+q))),this._parser.registerEscHandler({intermediates:".",final:q},(()=>this.selectCharset("."+q))),this._parser.registerEscHandler({intermediates:"/",final:q},(()=>this.selectCharset("/"+q)));this._parser.registerEscHandler({intermediates:"#",final:"8"},(()=>this.screenAlignmentPattern())),this._parser.setErrorHandler((q=>(this._logService.error("Parsing error: ",q),q))),this._parser.registerDcsHandler({intermediates:"$",final:"q"},new k.DcsHandler(((q,ee)=>this.requestStatusString(q,ee))))}_preserveStack(z,O,N,$){this._parseStack.paused=!0,this._parseStack.cursorStartX=z,this._parseStack.cursorStartY=O,this._parseStack.decodedLength=N,this._parseStack.position=$}_logSlowResolvingAsync(z){this._logService.logLevel<=L.LogLevelEnum.WARN&&Promise.race([z,new Promise(((O,N)=>setTimeout((()=>N("#SLOW_TIMEOUT")),5e3)))]).catch((O=>{if(O!=="#SLOW_TIMEOUT")throw O;console.warn("async parser handler taking longer than 5000 ms")}))}_getCurrentLinkId(){return this._curAttrData.extended.urlId}parse(z,O){let N,$=this._activeBuffer.x,I=this._activeBuffer.y,re=0;const ve=this._parseStack.paused;if(ve){if(N=this._parser.parse(this._parseBuffer,this._parseStack.decodedLength,O))return this._logSlowResolvingAsync(N),N;$=this._parseStack.cursorStartX,I=this._parseStack.cursorStartY,this._parseStack.paused=!1,z.length>H&&(re=this._parseStack.position+H)}if(this._logService.logLevel<=L.LogLevelEnum.DEBUG&&this._logService.debug("parsing data"+(typeof z=="string"?` "${z}"`:` "${Array.prototype.map.call(z,(q=>String.fromCharCode(q))).join("")}"`),typeof z=="string"?z.split("").map((q=>q.charCodeAt(0))):z),this._parseBuffer.length<z.length&&this._parseBuffer.length<H&&(this._parseBuffer=new Uint32Array(Math.min(z.length,H))),ve||this._dirtyRowTracker.clearRange(),z.length>H)for(let q=re;q<z.length;q+=H){const ee=q+H<z.length?q+H:z.length,ae=typeof z=="string"?this._stringDecoder.decode(z.substring(q,ee),this._parseBuffer):this._utf8Decoder.decode(z.subarray(q,ee),this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,ae))return this._preserveStack($,I,ae,q),this._logSlowResolvingAsync(N),N}else if(!ve){const q=typeof z=="string"?this._stringDecoder.decode(z,this._parseBuffer):this._utf8Decoder.decode(z,this._parseBuffer);if(N=this._parser.parse(this._parseBuffer,q))return this._preserveStack($,I,q,0),this._logSlowResolvingAsync(N),N}this._activeBuffer.x===$&&this._activeBuffer.y===I||this._onCursorMove.fire();const pe=this._dirtyRowTracker.end+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp),Q=this._dirtyRowTracker.start+(this._bufferService.buffer.ybase-this._bufferService.buffer.ydisp);Q<this._bufferService.rows&&this._onRequestRefreshRows.fire(Math.min(Q,this._bufferService.rows-1),Math.min(pe,this._bufferService.rows-1))}print(z,O,N){let $,I;const re=this._charsetService.charset,ve=this._optionsService.rawOptions.screenReaderMode,pe=this._bufferService.cols,Q=this._coreService.decPrivateModes.wraparound,q=this._coreService.modes.insertMode,ee=this._curAttrData;let ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._activeBuffer.x&&N-O>0&&ae.getWidth(this._activeBuffer.x-1)===2&&ae.setCellFromCodepoint(this._activeBuffer.x-1,0,1,ee);let de=this._parser.precedingJoinState;for(let se=O;se<N;++se){if($=z[se],$<127&&re){const Pe=re[String.fromCharCode($)];Pe&&($=Pe.charCodeAt(0))}const we=this._unicodeService.charProperties($,de);I=D.UnicodeService.extractWidth(we);const je=D.UnicodeService.extractShouldJoin(we),He=je?D.UnicodeService.extractWidth(de):0;if(de=we,ve&&this._onA11yChar.fire((0,E.stringFromCodePoint)($)),this._getCurrentLinkId()&&this._oscLinkService.addLineToLink(this._getCurrentLinkId(),this._activeBuffer.ybase+this._activeBuffer.y),this._activeBuffer.x+I-He>pe){if(Q){const Pe=ae;let xe=this._activeBuffer.x-He;for(this._activeBuffer.x=He,this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData(),!0)):(this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!0),ae=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y),He>0&&ae instanceof S.BufferLine&&ae.copyCellsFrom(Pe,xe,0,He,!1);xe<pe;)Pe.setCellFromCodepoint(xe++,0,1,ee)}else if(this._activeBuffer.x=pe-1,I===2)continue}if(je&&this._activeBuffer.x){const Pe=ae.getWidth(this._activeBuffer.x-1)?1:2;ae.addCodepointToCell(this._activeBuffer.x-Pe,$,I);for(let xe=I-He;--xe>=0;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,ee)}else if(q&&(ae.insertCells(this._activeBuffer.x,I-He,this._activeBuffer.getNullCell(ee)),ae.getWidth(pe-1)===2&&ae.setCellFromCodepoint(pe-1,_.NULL_CELL_CODE,_.NULL_CELL_WIDTH,ee)),ae.setCellFromCodepoint(this._activeBuffer.x++,$,I,ee),I>0)for(;--I;)ae.setCellFromCodepoint(this._activeBuffer.x++,0,0,ee)}this._parser.precedingJoinState=de,this._activeBuffer.x<pe&&N-O>0&&ae.getWidth(this._activeBuffer.x)===0&&!ae.hasContent(this._activeBuffer.x)&&ae.setCellFromCodepoint(this._activeBuffer.x,0,1,ee),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}registerCsiHandler(z,O){return z.final!=="t"||z.prefix||z.intermediates?this._parser.registerCsiHandler(z,O):this._parser.registerCsiHandler(z,(N=>!U(N.params[0],this._optionsService.rawOptions.windowOptions)||O(N)))}registerDcsHandler(z,O){return this._parser.registerDcsHandler(z,new k.DcsHandler(O))}registerEscHandler(z,O){return this._parser.registerEscHandler(z,O)}registerOscHandler(z,O){return this._parser.registerOscHandler(z,new R.OscHandler(O))}bell(){return this._onRequestBell.fire(),!0}lineFeed(){return this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._optionsService.rawOptions.convertEol&&(this._activeBuffer.x=0),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows?this._activeBuffer.y=this._bufferService.rows-1:this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.x>=this._bufferService.cols&&this._activeBuffer.x--,this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._onLineFeed.fire(),!0}carriageReturn(){return this._activeBuffer.x=0,!0}backspace(){var z;if(!this._coreService.decPrivateModes.reverseWraparound)return this._restrictCursor(),this._activeBuffer.x>0&&this._activeBuffer.x--,!0;if(this._restrictCursor(this._bufferService.cols),this._activeBuffer.x>0)this._activeBuffer.x--;else if(this._activeBuffer.x===0&&this._activeBuffer.y>this._activeBuffer.scrollTop&&this._activeBuffer.y<=this._activeBuffer.scrollBottom&&((z=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y))!=null&&z.isWrapped)){this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).isWrapped=!1,this._activeBuffer.y--,this._activeBuffer.x=this._bufferService.cols-1;const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);O.hasWidth(this._activeBuffer.x)&&!O.hasContent(this._activeBuffer.x)&&this._activeBuffer.x--}return this._restrictCursor(),!0}tab(){if(this._activeBuffer.x>=this._bufferService.cols)return!0;const z=this._activeBuffer.x;return this._activeBuffer.x=this._activeBuffer.nextStop(),this._optionsService.rawOptions.screenReaderMode&&this._onA11yTab.fire(this._activeBuffer.x-z),!0}shiftOut(){return this._charsetService.setgLevel(1),!0}shiftIn(){return this._charsetService.setgLevel(0),!0}_restrictCursor(z=this._bufferService.cols-1){this._activeBuffer.x=Math.min(z,Math.max(0,this._activeBuffer.x)),this._activeBuffer.y=this._coreService.decPrivateModes.origin?Math.min(this._activeBuffer.scrollBottom,Math.max(this._activeBuffer.scrollTop,this._activeBuffer.y)):Math.min(this._bufferService.rows-1,Math.max(0,this._activeBuffer.y)),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_setCursor(z,O){this._dirtyRowTracker.markDirty(this._activeBuffer.y),this._coreService.decPrivateModes.origin?(this._activeBuffer.x=z,this._activeBuffer.y=this._activeBuffer.scrollTop+O):(this._activeBuffer.x=z,this._activeBuffer.y=O),this._restrictCursor(),this._dirtyRowTracker.markDirty(this._activeBuffer.y)}_moveCursor(z,O){this._restrictCursor(),this._setCursor(this._activeBuffer.x+z,this._activeBuffer.y+O)}cursorUp(z){const O=this._activeBuffer.y-this._activeBuffer.scrollTop;return O>=0?this._moveCursor(0,-Math.min(O,z.params[0]||1)):this._moveCursor(0,-(z.params[0]||1)),!0}cursorDown(z){const O=this._activeBuffer.scrollBottom-this._activeBuffer.y;return O>=0?this._moveCursor(0,Math.min(O,z.params[0]||1)):this._moveCursor(0,z.params[0]||1),!0}cursorForward(z){return this._moveCursor(z.params[0]||1,0),!0}cursorBackward(z){return this._moveCursor(-(z.params[0]||1),0),!0}cursorNextLine(z){return this.cursorDown(z),this._activeBuffer.x=0,!0}cursorPrecedingLine(z){return this.cursorUp(z),this._activeBuffer.x=0,!0}cursorCharAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}cursorPosition(z){return this._setCursor(z.length>=2?(z.params[1]||1)-1:0,(z.params[0]||1)-1),!0}charPosAbsolute(z){return this._setCursor((z.params[0]||1)-1,this._activeBuffer.y),!0}hPositionRelative(z){return this._moveCursor(z.params[0]||1,0),!0}linePosAbsolute(z){return this._setCursor(this._activeBuffer.x,(z.params[0]||1)-1),!0}vPositionRelative(z){return this._moveCursor(0,z.params[0]||1),!0}hVPosition(z){return this.cursorPosition(z),!0}tabClear(z){const O=z.params[0];return O===0?delete this._activeBuffer.tabs[this._activeBuffer.x]:O===3&&(this._activeBuffer.tabs={}),!0}cursorForwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=z.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.nextStop();return!0}cursorBackwardTab(z){if(this._activeBuffer.x>=this._bufferService.cols)return!0;let O=z.params[0]||1;for(;O--;)this._activeBuffer.x=this._activeBuffer.prevStop();return!0}selectProtected(z){const O=z.params[0];return O===1&&(this._curAttrData.bg|=536870912),O!==2&&O!==0||(this._curAttrData.bg&=-536870913),!0}_eraseInBufferLine(z,O,N,$=!1,I=!1){const re=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);re.replaceCells(O,N,this._activeBuffer.getNullCell(this._eraseAttrData()),I),$&&(re.isWrapped=!1)}_resetBufferLine(z,O=!1){const N=this._activeBuffer.lines.get(this._activeBuffer.ybase+z);N&&(N.fill(this._activeBuffer.getNullCell(this._eraseAttrData()),O),this._bufferService.buffer.clearMarkers(this._activeBuffer.ybase+z),N.isWrapped=!1)}eraseInDisplay(z,O=!1){let N;switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:for(N=this._activeBuffer.y,this._dirtyRowTracker.markDirty(N),this._eraseInBufferLine(N++,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);N<this._bufferService.rows;N++)this._resetBufferLine(N,O);this._dirtyRowTracker.markDirty(N);break;case 1:for(N=this._activeBuffer.y,this._dirtyRowTracker.markDirty(N),this._eraseInBufferLine(N,0,this._activeBuffer.x+1,!0,O),this._activeBuffer.x+1>=this._bufferService.cols&&(this._activeBuffer.lines.get(N+1).isWrapped=!1);N--;)this._resetBufferLine(N,O);this._dirtyRowTracker.markDirty(0);break;case 2:for(N=this._bufferService.rows,this._dirtyRowTracker.markDirty(N-1);N--;)this._resetBufferLine(N,O);this._dirtyRowTracker.markDirty(0);break;case 3:const $=this._activeBuffer.lines.length-this._bufferService.rows;$>0&&(this._activeBuffer.lines.trimStart($),this._activeBuffer.ybase=Math.max(this._activeBuffer.ybase-$,0),this._activeBuffer.ydisp=Math.max(this._activeBuffer.ydisp-$,0),this._onScroll.fire(0))}return!0}eraseInLine(z,O=!1){switch(this._restrictCursor(this._bufferService.cols),z.params[0]){case 0:this._eraseInBufferLine(this._activeBuffer.y,this._activeBuffer.x,this._bufferService.cols,this._activeBuffer.x===0,O);break;case 1:this._eraseInBufferLine(this._activeBuffer.y,0,this._activeBuffer.x+1,!1,O);break;case 2:this._eraseInBufferLine(this._activeBuffer.y,0,this._bufferService.cols,!0,O)}return this._dirtyRowTracker.markDirty(this._activeBuffer.y),!0}insertLines(z){this._restrictCursor();let O=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y,$=this._bufferService.rows-1-this._activeBuffer.scrollBottom,I=this._bufferService.rows-1+this._activeBuffer.ybase-$+1;for(;O--;)this._activeBuffer.lines.splice(I-1,1),this._activeBuffer.lines.splice(N,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}deleteLines(z){this._restrictCursor();let O=z.params[0]||1;if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const N=this._activeBuffer.ybase+this._activeBuffer.y;let $;for($=this._bufferService.rows-1-this._activeBuffer.scrollBottom,$=this._bufferService.rows-1+this._activeBuffer.ybase-$;O--;)this._activeBuffer.lines.splice(N,1),this._activeBuffer.lines.splice($,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.y,this._activeBuffer.scrollBottom),this._activeBuffer.x=0,!0}insertChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.insertCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}deleteChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.deleteCells(this._activeBuffer.x,z.params[0]||1,this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}scrollUp(z){let O=z.params[0]||1;for(;O--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,0,this._activeBuffer.getBlankLine(this._eraseAttrData()));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollDown(z){let O=z.params[0]||1;for(;O--;)this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollBottom,1),this._activeBuffer.lines.splice(this._activeBuffer.ybase+this._activeBuffer.scrollTop,0,this._activeBuffer.getBlankLine(S.DEFAULT_ATTR_DATA));return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollLeft(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);$.deleteCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}scrollRight(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);$.insertCells(0,O,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}insertColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);$.insertCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}deleteColumns(z){if(this._activeBuffer.y>this._activeBuffer.scrollBottom||this._activeBuffer.y<this._activeBuffer.scrollTop)return!0;const O=z.params[0]||1;for(let N=this._activeBuffer.scrollTop;N<=this._activeBuffer.scrollBottom;++N){const $=this._activeBuffer.lines.get(this._activeBuffer.ybase+N);$.deleteCells(this._activeBuffer.x,O,this._activeBuffer.getNullCell(this._eraseAttrData())),$.isWrapped=!1}return this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom),!0}eraseChars(z){this._restrictCursor();const O=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y);return O&&(O.replaceCells(this._activeBuffer.x,this._activeBuffer.x+(z.params[0]||1),this._activeBuffer.getNullCell(this._eraseAttrData())),this._dirtyRowTracker.markDirty(this._activeBuffer.y)),!0}repeatPrecedingCharacter(z){const O=this._parser.precedingJoinState;if(!O)return!0;const N=z.params[0]||1,$=D.UnicodeService.extractWidth(O),I=this._activeBuffer.x-$,re=this._activeBuffer.lines.get(this._activeBuffer.ybase+this._activeBuffer.y).getString(I),ve=new Uint32Array(re.length*N);let pe=0;for(let q=0;q<re.length;){const ee=re.codePointAt(q)||0;ve[pe++]=ee,q+=ee>65535?2:1}let Q=pe;for(let q=1;q<N;++q)ve.copyWithin(Q,0,pe),Q+=pe;return this.print(ve,0,Q),!0}sendDeviceAttributesPrimary(z){return z.params[0]>0||(this._is("xterm")||this._is("rxvt-unicode")||this._is("screen")?this._coreService.triggerDataEvent(u.C0.ESC+"[?1;2c"):this._is("linux")&&this._coreService.triggerDataEvent(u.C0.ESC+"[?6c")),!0}sendDeviceAttributesSecondary(z){return z.params[0]>0||(this._is("xterm")?this._coreService.triggerDataEvent(u.C0.ESC+"[>0;276;0c"):this._is("rxvt-unicode")?this._coreService.triggerDataEvent(u.C0.ESC+"[>85;95;0c"):this._is("linux")?this._coreService.triggerDataEvent(z.params[0]+"c"):this._is("screen")&&this._coreService.triggerDataEvent(u.C0.ESC+"[>83;40003;0c")),!0}_is(z){return(this._optionsService.rawOptions.termName+"").indexOf(z)===0}setMode(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 4:this._coreService.modes.insertMode=!0;break;case 20:this._optionsService.options.convertEol=!0}return!0}setModePrivate(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!0;break;case 2:this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),this._charsetService.setgCharset(1,b.DEFAULT_CHARSET),this._charsetService.setgCharset(2,b.DEFAULT_CHARSET),this._charsetService.setgCharset(3,b.DEFAULT_CHARSET);break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(132,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!0,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!0;break;case 12:this._optionsService.options.cursorBlink=!0;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!0;break;case 66:this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire();break;case 9:this._coreMouseService.activeProtocol="X10";break;case 1e3:this._coreMouseService.activeProtocol="VT200";break;case 1002:this._coreMouseService.activeProtocol="DRAG";break;case 1003:this._coreMouseService.activeProtocol="ANY";break;case 1004:this._coreService.decPrivateModes.sendFocus=!0,this._onRequestSendFocus.fire();break;case 1005:this._logService.debug("DECSET 1005 not supported (see #2507)");break;case 1006:this._coreMouseService.activeEncoding="SGR";break;case 1015:this._logService.debug("DECSET 1015 not supported (see #2507)");break;case 1016:this._coreMouseService.activeEncoding="SGR_PIXELS";break;case 25:this._coreService.isCursorHidden=!1;break;case 1048:this.saveCursor();break;case 1049:this.saveCursor();case 47:case 1047:this._bufferService.buffers.activateAltBuffer(this._eraseAttrData()),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!0}return!0}resetMode(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 4:this._coreService.modes.insertMode=!1;break;case 20:this._optionsService.options.convertEol=!1}return!0}resetModePrivate(z){for(let O=0;O<z.length;O++)switch(z.params[O]){case 1:this._coreService.decPrivateModes.applicationCursorKeys=!1;break;case 3:this._optionsService.rawOptions.windowOptions.setWinLines&&(this._bufferService.resize(80,this._bufferService.rows),this._onRequestReset.fire());break;case 6:this._coreService.decPrivateModes.origin=!1,this._setCursor(0,0);break;case 7:this._coreService.decPrivateModes.wraparound=!1;break;case 12:this._optionsService.options.cursorBlink=!1;break;case 45:this._coreService.decPrivateModes.reverseWraparound=!1;break;case 66:this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire();break;case 9:case 1e3:case 1002:case 1003:this._coreMouseService.activeProtocol="NONE";break;case 1004:this._coreService.decPrivateModes.sendFocus=!1;break;case 1005:this._logService.debug("DECRST 1005 not supported (see #2507)");break;case 1006:case 1016:this._coreMouseService.activeEncoding="DEFAULT";break;case 1015:this._logService.debug("DECRST 1015 not supported (see #2507)");break;case 25:this._coreService.isCursorHidden=!0;break;case 1048:this.restoreCursor();break;case 1049:case 47:case 1047:this._bufferService.buffers.activateNormalBuffer(),z.params[O]===1049&&this.restoreCursor(),this._coreService.isCursorInitialized=!0,this._onRequestRefreshRows.fire(0,this._bufferService.rows-1),this._onRequestSyncScrollBar.fire();break;case 2004:this._coreService.decPrivateModes.bracketedPasteMode=!1}return!0}requestMode(z,O){const N=this._coreService.decPrivateModes,{activeProtocol:$,activeEncoding:I}=this._coreMouseService,re=this._coreService,{buffers:ve,cols:pe}=this._bufferService,{active:Q,alt:q}=ve,ee=this._optionsService.rawOptions,ae=je=>je?1:2,de=z.params[0];return se=de,we=O?de===2?4:de===4?ae(re.modes.insertMode):de===12?3:de===20?ae(ee.convertEol):0:de===1?ae(N.applicationCursorKeys):de===3?ee.windowOptions.setWinLines?pe===80?2:pe===132?1:0:0:de===6?ae(N.origin):de===7?ae(N.wraparound):de===8?3:de===9?ae($==="X10"):de===12?ae(ee.cursorBlink):de===25?ae(!re.isCursorHidden):de===45?ae(N.reverseWraparound):de===66?ae(N.applicationKeypad):de===67?4:de===1e3?ae($==="VT200"):de===1002?ae($==="DRAG"):de===1003?ae($==="ANY"):de===1004?ae(N.sendFocus):de===1005?4:de===1006?ae(I==="SGR"):de===1015?4:de===1016?ae(I==="SGR_PIXELS"):de===1048?1:de===47||de===1047||de===1049?ae(Q===q):de===2004?ae(N.bracketedPasteMode):0,re.triggerDataEvent(`${u.C0.ESC}[${O?"":"?"}${se};${we}$y`),!0;var se,we}_updateAttrColor(z,O,N,$,I){return O===2?(z|=50331648,z&=-16777216,z|=A.AttributeData.fromColorRGB([N,$,I])):O===5&&(z&=-50331904,z|=33554432|255&N),z}_extractColor(z,O,N){const $=[0,0,-1,0,0,0];let I=0,re=0;do{if($[re+I]=z.params[O+re],z.hasSubParams(O+re)){const ve=z.getSubParams(O+re);let pe=0;do $[1]===5&&(I=1),$[re+pe+1+I]=ve[pe];while(++pe<ve.length&&pe+re+1+I<$.length);break}if($[1]===5&&re+I>=2||$[1]===2&&re+I>=5)break;$[1]&&(I=1)}while(++re+O<z.length&&re+I<$.length);for(let ve=2;ve<$.length;++ve)$[ve]===-1&&($[ve]=0);switch($[0]){case 38:N.fg=this._updateAttrColor(N.fg,$[1],$[3],$[4],$[5]);break;case 48:N.bg=this._updateAttrColor(N.bg,$[1],$[3],$[4],$[5]);break;case 58:N.extended=N.extended.clone(),N.extended.underlineColor=this._updateAttrColor(N.extended.underlineColor,$[1],$[3],$[4],$[5])}return re}_processUnderline(z,O){O.extended=O.extended.clone(),(!~z||z>5)&&(z=1),O.extended.underlineStyle=z,O.fg|=268435456,z===0&&(O.fg&=-268435457),O.updateExtended()}_processSGR0(z){z.fg=S.DEFAULT_ATTR_DATA.fg,z.bg=S.DEFAULT_ATTR_DATA.bg,z.extended=z.extended.clone(),z.extended.underlineStyle=0,z.extended.underlineColor&=-67108864,z.updateExtended()}charAttributes(z){if(z.length===1&&z.params[0]===0)return this._processSGR0(this._curAttrData),!0;const O=z.length;let N;const $=this._curAttrData;for(let I=0;I<O;I++)N=z.params[I],N>=30&&N<=37?($.fg&=-50331904,$.fg|=16777216|N-30):N>=40&&N<=47?($.bg&=-50331904,$.bg|=16777216|N-40):N>=90&&N<=97?($.fg&=-50331904,$.fg|=16777224|N-90):N>=100&&N<=107?($.bg&=-50331904,$.bg|=16777224|N-100):N===0?this._processSGR0($):N===1?$.fg|=134217728:N===3?$.bg|=67108864:N===4?($.fg|=268435456,this._processUnderline(z.hasSubParams(I)?z.getSubParams(I)[0]:1,$)):N===5?$.fg|=536870912:N===7?$.fg|=67108864:N===8?$.fg|=1073741824:N===9?$.fg|=2147483648:N===2?$.bg|=134217728:N===21?this._processUnderline(2,$):N===22?($.fg&=-134217729,$.bg&=-134217729):N===23?$.bg&=-67108865:N===24?($.fg&=-268435457,this._processUnderline(0,$)):N===25?$.fg&=-536870913:N===27?$.fg&=-67108865:N===28?$.fg&=-1073741825:N===29?$.fg&=2147483647:N===39?($.fg&=-67108864,$.fg|=16777215&S.DEFAULT_ATTR_DATA.fg):N===49?($.bg&=-67108864,$.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):N===38||N===48||N===58?I+=this._extractColor(z,I,$):N===53?$.bg|=1073741824:N===55?$.bg&=-1073741825:N===59?($.extended=$.extended.clone(),$.extended.underlineColor=-1,$.updateExtended()):N===100?($.fg&=-67108864,$.fg|=16777215&S.DEFAULT_ATTR_DATA.fg,$.bg&=-67108864,$.bg|=16777215&S.DEFAULT_ATTR_DATA.bg):this._logService.debug("Unknown SGR attribute: %d.",N);return!0}deviceStatus(z){switch(z.params[0]){case 5:this._coreService.triggerDataEvent(`${u.C0.ESC}[0n`);break;case 6:const O=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[${O};${N}R`)}return!0}deviceStatusPrivate(z){if(z.params[0]===6){const O=this._activeBuffer.y+1,N=this._activeBuffer.x+1;this._coreService.triggerDataEvent(`${u.C0.ESC}[?${O};${N}R`)}return!0}softReset(z){return this._coreService.isCursorHidden=!1,this._onRequestSyncScrollBar.fire(),this._activeBuffer.scrollTop=0,this._activeBuffer.scrollBottom=this._bufferService.rows-1,this._curAttrData=S.DEFAULT_ATTR_DATA.clone(),this._coreService.reset(),this._charsetService.reset(),this._activeBuffer.savedX=0,this._activeBuffer.savedY=this._activeBuffer.ybase,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,this._coreService.decPrivateModes.origin=!1,!0}setCursorStyle(z){const O=z.params[0]||1;switch(O){case 1:case 2:this._optionsService.options.cursorStyle="block";break;case 3:case 4:this._optionsService.options.cursorStyle="underline";break;case 5:case 6:this._optionsService.options.cursorStyle="bar"}const N=O%2==1;return this._optionsService.options.cursorBlink=N,!0}setScrollRegion(z){const O=z.params[0]||1;let N;return(z.length<2||(N=z.params[1])>this._bufferService.rows||N===0)&&(N=this._bufferService.rows),N>O&&(this._activeBuffer.scrollTop=O-1,this._activeBuffer.scrollBottom=N-1,this._setCursor(0,0)),!0}windowOptions(z){if(!U(z.params[0],this._optionsService.rawOptions.windowOptions))return!0;const O=z.length>1?z.params[1]:0;switch(z.params[0]){case 14:O!==2&&this._onRequestWindowsOptionsReport.fire(F.GET_WIN_SIZE_PIXELS);break;case 16:this._onRequestWindowsOptionsReport.fire(F.GET_CELL_SIZE_PIXELS);break;case 18:this._bufferService&&this._coreService.triggerDataEvent(`${u.C0.ESC}[8;${this._bufferService.rows};${this._bufferService.cols}t`);break;case 22:O!==0&&O!==2||(this._windowTitleStack.push(this._windowTitle),this._windowTitleStack.length>10&&this._windowTitleStack.shift()),O!==0&&O!==1||(this._iconNameStack.push(this._iconName),this._iconNameStack.length>10&&this._iconNameStack.shift());break;case 23:O!==0&&O!==2||this._windowTitleStack.length&&this.setTitle(this._windowTitleStack.pop()),O!==0&&O!==1||this._iconNameStack.length&&this.setIconName(this._iconNameStack.pop())}return!0}saveCursor(z){return this._activeBuffer.savedX=this._activeBuffer.x,this._activeBuffer.savedY=this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.savedCurAttrData.fg=this._curAttrData.fg,this._activeBuffer.savedCurAttrData.bg=this._curAttrData.bg,this._activeBuffer.savedCharset=this._charsetService.charset,!0}restoreCursor(z){return this._activeBuffer.x=this._activeBuffer.savedX||0,this._activeBuffer.y=Math.max(this._activeBuffer.savedY-this._activeBuffer.ybase,0),this._curAttrData.fg=this._activeBuffer.savedCurAttrData.fg,this._curAttrData.bg=this._activeBuffer.savedCurAttrData.bg,this._charsetService.charset=this._savedCharset,this._activeBuffer.savedCharset&&(this._charsetService.charset=this._activeBuffer.savedCharset),this._restrictCursor(),!0}setTitle(z){return this._windowTitle=z,this._onTitleChange.fire(z),!0}setIconName(z){return this._iconName=z,!0}setOrReportIndexedColor(z){const O=[],N=z.split(";");for(;N.length>1;){const $=N.shift(),I=N.shift();if(/^\d+$/.exec($)){const re=parseInt($);if(W(re))if(I==="?")O.push({type:0,index:re});else{const ve=(0,M.parseColor)(I);ve&&O.push({type:1,index:re,color:ve})}}}return O.length&&this._onColor.fire(O),!0}setHyperlink(z){const O=z.split(";");return!(O.length<2)&&(O[1]?this._createHyperlink(O[0],O[1]):!O[0]&&this._finishHyperlink())}_createHyperlink(z,O){this._getCurrentLinkId()&&this._finishHyperlink();const N=z.split(":");let $;const I=N.findIndex((re=>re.startsWith("id=")));return I!==-1&&($=N[I].slice(3)||void 0),this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=this._oscLinkService.registerLink({id:$,uri:O}),this._curAttrData.updateExtended(),!0}_finishHyperlink(){return this._curAttrData.extended=this._curAttrData.extended.clone(),this._curAttrData.extended.urlId=0,this._curAttrData.updateExtended(),!0}_setOrReportSpecialColor(z,O){const N=z.split(";");for(let $=0;$<N.length&&!(O>=this._specialColors.length);++$,++O)if(N[$]==="?")this._onColor.fire([{type:0,index:this._specialColors[O]}]);else{const I=(0,M.parseColor)(N[$]);I&&this._onColor.fire([{type:1,index:this._specialColors[O],color:I}])}return!0}setOrReportFgColor(z){return this._setOrReportSpecialColor(z,0)}setOrReportBgColor(z){return this._setOrReportSpecialColor(z,1)}setOrReportCursorColor(z){return this._setOrReportSpecialColor(z,2)}restoreIndexedColor(z){if(!z)return this._onColor.fire([{type:2}]),!0;const O=[],N=z.split(";");for(let $=0;$<N.length;++$)if(/^\d+$/.exec(N[$])){const I=parseInt(N[$]);W(I)&&O.push({type:2,index:I})}return O.length&&this._onColor.fire(O),!0}restoreFgColor(z){return this._onColor.fire([{type:2,index:256}]),!0}restoreBgColor(z){return this._onColor.fire([{type:2,index:257}]),!0}restoreCursorColor(z){return this._onColor.fire([{type:2,index:258}]),!0}nextLine(){return this._activeBuffer.x=0,this.index(),!0}keypadApplicationMode(){return this._logService.debug("Serial port requested application keypad."),this._coreService.decPrivateModes.applicationKeypad=!0,this._onRequestSyncScrollBar.fire(),!0}keypadNumericMode(){return this._logService.debug("Switching back to normal keypad."),this._coreService.decPrivateModes.applicationKeypad=!1,this._onRequestSyncScrollBar.fire(),!0}selectDefaultCharset(){return this._charsetService.setgLevel(0),this._charsetService.setgCharset(0,b.DEFAULT_CHARSET),!0}selectCharset(z){return z.length!==2?(this.selectDefaultCharset(),!0):(z[0]==="/"||this._charsetService.setgCharset(j[z[0]],b.CHARSETS[z[1]]||b.DEFAULT_CHARSET),!0)}index(){return this._restrictCursor(),this._activeBuffer.y++,this._activeBuffer.y===this._activeBuffer.scrollBottom+1?(this._activeBuffer.y--,this._bufferService.scroll(this._eraseAttrData())):this._activeBuffer.y>=this._bufferService.rows&&(this._activeBuffer.y=this._bufferService.rows-1),this._restrictCursor(),!0}tabSet(){return this._activeBuffer.tabs[this._activeBuffer.x]=!0,!0}reverseIndex(){if(this._restrictCursor(),this._activeBuffer.y===this._activeBuffer.scrollTop){const z=this._activeBuffer.scrollBottom-this._activeBuffer.scrollTop;this._activeBuffer.lines.shiftElements(this._activeBuffer.ybase+this._activeBuffer.y,z,1),this._activeBuffer.lines.set(this._activeBuffer.ybase+this._activeBuffer.y,this._activeBuffer.getBlankLine(this._eraseAttrData())),this._dirtyRowTracker.markRangeDirty(this._activeBuffer.scrollTop,this._activeBuffer.scrollBottom)}else this._activeBuffer.y--,this._restrictCursor();return!0}fullReset(){return this._parser.reset(),this._onRequestReset.fire(),!0}reset(){this._curAttrData=S.DEFAULT_ATTR_DATA.clone(),this._eraseAttrDataInternal=S.DEFAULT_ATTR_DATA.clone()}_eraseAttrData(){return this._eraseAttrDataInternal.bg&=-67108864,this._eraseAttrDataInternal.bg|=67108863&this._curAttrData.bg,this._eraseAttrDataInternal}setgLevel(z){return this._charsetService.setgLevel(z),!0}screenAlignmentPattern(){const z=new y.CellData;z.content=4194373,z.fg=this._curAttrData.fg,z.bg=this._curAttrData.bg,this._setCursor(0,0);for(let O=0;O<this._bufferService.rows;++O){const N=this._activeBuffer.ybase+this._activeBuffer.y+O,$=this._activeBuffer.lines.get(N);$&&($.fill(z),$.isWrapped=!1)}return this._dirtyRowTracker.markAllDirty(),this._setCursor(0,0),!0}requestStatusString(z,O){const N=this._bufferService.buffer,$=this._optionsService.rawOptions;return(I=>(this._coreService.triggerDataEvent(`${u.C0.ESC}${I}${u.C0.ESC}\\`),!0))(z==='"q'?`P1$r${this._curAttrData.isProtected()?1:0}"q`:z==='"p'?'P1$r61;1"p':z==="r"?`P1$r${N.scrollTop+1};${N.scrollBottom+1}r`:z==="m"?"P1$r0m":z===" q"?`P1$r${{block:2,underline:4,bar:6}[$.cursorStyle]-($.cursorBlink?1:0)} q`:"P0$r")}markRangeDirty(z,O){this._dirtyRowTracker.markRangeDirty(z,O)}}o.InputHandler=Y;let G=class{constructor(Z){this._bufferService=Z,this.clearRange()}clearRange(){this.start=this._bufferService.buffer.y,this.end=this._bufferService.buffer.y}markDirty(Z){Z<this.start?this.start=Z:Z>this.end&&(this.end=Z)}markRangeDirty(Z,z){Z>z&&(K=Z,Z=z,z=K),Z<this.start&&(this.start=Z),z>this.end&&(this.end=z)}markAllDirty(){this.markRangeDirty(0,this._bufferService.rows-1)}};function W(Z){return 0<=Z&&Z<256}G=h([p(0,L.IBufferService)],G)},844:(f,o)=>{function c(h){for(const p of h)p.dispose();h.length=0}Object.defineProperty(o,"__esModule",{value:!0}),o.getDisposeArrayDisposable=o.disposeArray=o.toDisposable=o.MutableDisposable=o.Disposable=void 0,o.Disposable=class{constructor(){this._disposables=[],this._isDisposed=!1}dispose(){this._isDisposed=!0;for(const h of this._disposables)h.dispose();this._disposables.length=0}register(h){return this._disposables.push(h),h}unregister(h){const p=this._disposables.indexOf(h);p!==-1&&this._disposables.splice(p,1)}},o.MutableDisposable=class{constructor(){this._isDisposed=!1}get value(){return this._isDisposed?void 0:this._value}set value(h){var p;this._isDisposed||h===this._value||((p=this._value)==null||p.dispose(),this._value=h)}clear(){this.value=void 0}dispose(){var h;this._isDisposed=!0,(h=this._value)==null||h.dispose(),this._value=void 0}},o.toDisposable=function(h){return{dispose:h}},o.disposeArray=c,o.getDisposeArrayDisposable=function(h){return{dispose:()=>c(h)}}},1505:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.FourKeyMap=o.TwoKeyMap=void 0;class c{constructor(){this._data={}}set(p,u,b){this._data[p]||(this._data[p]={}),this._data[p][u]=b}get(p,u){return this._data[p]?this._data[p][u]:void 0}clear(){this._data={}}}o.TwoKeyMap=c,o.FourKeyMap=class{constructor(){this._data=new c}set(h,p,u,b,C){this._data.get(h,p)||this._data.set(h,p,new c),this._data.get(h,p).set(u,b,C)}get(h,p,u,b){var C;return(C=this._data.get(h,p))==null?void 0:C.get(u,b)}clear(){this._data.clear()}}},6114:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.isChromeOS=o.isLinux=o.isWindows=o.isIphone=o.isIpad=o.isMac=o.getSafariVersion=o.isSafari=o.isLegacyEdge=o.isFirefox=o.isNode=void 0,o.isNode=typeof process<"u"&&"title"in process;const c=o.isNode?"node":navigator.userAgent,h=o.isNode?"node":navigator.platform;o.isFirefox=c.includes("Firefox"),o.isLegacyEdge=c.includes("Edge"),o.isSafari=/^((?!chrome|android).)*safari/i.test(c),o.getSafariVersion=function(){if(!o.isSafari)return 0;const p=c.match(/Version\/(\d+)/);return p===null||p.length<2?0:parseInt(p[1])},o.isMac=["Macintosh","MacIntel","MacPPC","Mac68K"].includes(h),o.isIpad=h==="iPad",o.isIphone=h==="iPhone",o.isWindows=["Windows","Win16","Win32","WinCE"].includes(h),o.isLinux=h.indexOf("Linux")>=0,o.isChromeOS=/\bCrOS\b/.test(c)},6106:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.SortedList=void 0;let c=0;o.SortedList=class{constructor(h){this._getKey=h,this._array=[]}clear(){this._array.length=0}insert(h){this._array.length!==0?(c=this._search(this._getKey(h)),this._array.splice(c,0,h)):this._array.push(h)}delete(h){if(this._array.length===0)return!1;const p=this._getKey(h);if(p===void 0||(c=this._search(p),c===-1)||this._getKey(this._array[c])!==p)return!1;do if(this._array[c]===h)return this._array.splice(c,1),!0;while(++c<this._array.length&&this._getKey(this._array[c])===p);return!1}*getKeyIterator(h){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do yield this._array[c];while(++c<this._array.length&&this._getKey(this._array[c])===h)}forEachByKey(h,p){if(this._array.length!==0&&(c=this._search(h),!(c<0||c>=this._array.length)&&this._getKey(this._array[c])===h))do p(this._array[c]);while(++c<this._array.length&&this._getKey(this._array[c])===h)}values(){return[...this._array].values()}_search(h){let p=0,u=this._array.length-1;for(;u>=p;){let b=p+u>>1;const C=this._getKey(this._array[b]);if(C>h)u=b-1;else{if(!(C<h)){for(;b>0&&this._getKey(this._array[b-1])===h;)b--;return b}p=b+1}}return p}}},7226:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DebouncedIdleTask=o.IdleTaskQueue=o.PriorityTaskQueue=void 0;const h=c(6114);class p{constructor(){this._tasks=[],this._i=0}enqueue(C){this._tasks.push(C),this._start()}flush(){for(;this._i<this._tasks.length;)this._tasks[this._i]()||this._i++;this.clear()}clear(){this._idleCallback&&(this._cancelCallback(this._idleCallback),this._idleCallback=void 0),this._i=0,this._tasks.length=0}_start(){this._idleCallback||(this._idleCallback=this._requestCallback(this._process.bind(this)))}_process(C){this._idleCallback=void 0;let T=0,E=0,S=C.timeRemaining(),v=0;for(;this._i<this._tasks.length;){if(T=Date.now(),this._tasks[this._i]()||this._i++,T=Math.max(1,Date.now()-T),E=Math.max(T,E),v=C.timeRemaining(),1.5*E>v)return S-T<-20&&console.warn(`task queue exceeded allotted deadline by ${Math.abs(Math.round(S-T))}ms`),void this._start();S=v}this.clear()}}class u extends p{_requestCallback(C){return setTimeout((()=>C(this._createDeadline(16))))}_cancelCallback(C){clearTimeout(C)}_createDeadline(C){const T=Date.now()+C;return{timeRemaining:()=>Math.max(0,T-Date.now())}}}o.PriorityTaskQueue=u,o.IdleTaskQueue=!h.isNode&&"requestIdleCallback"in window?class extends p{_requestCallback(b){return requestIdleCallback(b)}_cancelCallback(b){cancelIdleCallback(b)}}:u,o.DebouncedIdleTask=class{constructor(){this._queue=new o.IdleTaskQueue}set(b){this._queue.clear(),this._queue.enqueue(b)}flush(){this._queue.flush()}}},9282:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.updateWindowsModeWrappedState=void 0;const h=c(643);o.updateWindowsModeWrappedState=function(p){const u=p.buffer.lines.get(p.buffer.ybase+p.buffer.y-1),b=u==null?void 0:u.get(p.cols-1),C=p.buffer.lines.get(p.buffer.ybase+p.buffer.y);C&&b&&(C.isWrapped=b[h.CHAR_DATA_CODE_INDEX]!==h.NULL_CELL_CODE&&b[h.CHAR_DATA_CODE_INDEX]!==h.WHITESPACE_CELL_CODE)}},3734:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ExtendedAttrs=o.AttributeData=void 0;class c{constructor(){this.fg=0,this.bg=0,this.extended=new h}static toColorRGB(u){return[u>>>16&255,u>>>8&255,255&u]}static fromColorRGB(u){return(255&u[0])<<16|(255&u[1])<<8|255&u[2]}clone(){const u=new c;return u.fg=this.fg,u.bg=this.bg,u.extended=this.extended.clone(),u}isInverse(){return 67108864&this.fg}isBold(){return 134217728&this.fg}isUnderline(){return this.hasExtendedAttrs()&&this.extended.underlineStyle!==0?1:268435456&this.fg}isBlink(){return 536870912&this.fg}isInvisible(){return 1073741824&this.fg}isItalic(){return 67108864&this.bg}isDim(){return 134217728&this.bg}isStrikethrough(){return 2147483648&this.fg}isProtected(){return 536870912&this.bg}isOverline(){return 1073741824&this.bg}getFgColorMode(){return 50331648&this.fg}getBgColorMode(){return 50331648&this.bg}isFgRGB(){return(50331648&this.fg)==50331648}isBgRGB(){return(50331648&this.bg)==50331648}isFgPalette(){return(50331648&this.fg)==16777216||(50331648&this.fg)==33554432}isBgPalette(){return(50331648&this.bg)==16777216||(50331648&this.bg)==33554432}isFgDefault(){return(50331648&this.fg)==0}isBgDefault(){return(50331648&this.bg)==0}isAttributeDefault(){return this.fg===0&&this.bg===0}getFgColor(){switch(50331648&this.fg){case 16777216:case 33554432:return 255&this.fg;case 50331648:return 16777215&this.fg;default:return-1}}getBgColor(){switch(50331648&this.bg){case 16777216:case 33554432:return 255&this.bg;case 50331648:return 16777215&this.bg;default:return-1}}hasExtendedAttrs(){return 268435456&this.bg}updateExtended(){this.extended.isEmpty()?this.bg&=-268435457:this.bg|=268435456}getUnderlineColor(){if(268435456&this.bg&&~this.extended.underlineColor)switch(50331648&this.extended.underlineColor){case 16777216:case 33554432:return 255&this.extended.underlineColor;case 50331648:return 16777215&this.extended.underlineColor;default:return this.getFgColor()}return this.getFgColor()}getUnderlineColorMode(){return 268435456&this.bg&&~this.extended.underlineColor?50331648&this.extended.underlineColor:this.getFgColorMode()}isUnderlineColorRGB(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==50331648:this.isFgRGB()}isUnderlineColorPalette(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==16777216||(50331648&this.extended.underlineColor)==33554432:this.isFgPalette()}isUnderlineColorDefault(){return 268435456&this.bg&&~this.extended.underlineColor?(50331648&this.extended.underlineColor)==0:this.isFgDefault()}getUnderlineStyle(){return 268435456&this.fg?268435456&this.bg?this.extended.underlineStyle:1:0}getUnderlineVariantOffset(){return this.extended.underlineVariantOffset}}o.AttributeData=c;class h{get ext(){return this._urlId?-469762049&this._ext|this.underlineStyle<<26:this._ext}set ext(u){this._ext=u}get underlineStyle(){return this._urlId?5:(469762048&this._ext)>>26}set underlineStyle(u){this._ext&=-469762049,this._ext|=u<<26&469762048}get underlineColor(){return 67108863&this._ext}set underlineColor(u){this._ext&=-67108864,this._ext|=67108863&u}get urlId(){return this._urlId}set urlId(u){this._urlId=u}get underlineVariantOffset(){const u=(3758096384&this._ext)>>29;return u<0?4294967288^u:u}set underlineVariantOffset(u){this._ext&=536870911,this._ext|=u<<29&3758096384}constructor(u=0,b=0){this._ext=0,this._urlId=0,this._ext=u,this._urlId=b}clone(){return new h(this._ext,this._urlId)}isEmpty(){return this.underlineStyle===0&&this._urlId===0}}o.ExtendedAttrs=h},9092:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Buffer=o.MAX_BUFFER_SIZE=void 0;const h=c(6349),p=c(7226),u=c(3734),b=c(8437),C=c(4634),T=c(511),E=c(643),S=c(4863),v=c(7116);o.MAX_BUFFER_SIZE=4294967295,o.Buffer=class{constructor(_,y,A){this._hasScrollback=_,this._optionsService=y,this._bufferService=A,this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.tabs={},this.savedY=0,this.savedX=0,this.savedCurAttrData=b.DEFAULT_ATTR_DATA.clone(),this.savedCharset=v.DEFAULT_CHARSET,this.markers=[],this._nullCell=T.CellData.fromCharData([0,E.NULL_CELL_CHAR,E.NULL_CELL_WIDTH,E.NULL_CELL_CODE]),this._whitespaceCell=T.CellData.fromCharData([0,E.WHITESPACE_CELL_CHAR,E.WHITESPACE_CELL_WIDTH,E.WHITESPACE_CELL_CODE]),this._isClearing=!1,this._memoryCleanupQueue=new p.IdleTaskQueue,this._memoryCleanupPosition=0,this._cols=this._bufferService.cols,this._rows=this._bufferService.rows,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}getNullCell(_){return _?(this._nullCell.fg=_.fg,this._nullCell.bg=_.bg,this._nullCell.extended=_.extended):(this._nullCell.fg=0,this._nullCell.bg=0,this._nullCell.extended=new u.ExtendedAttrs),this._nullCell}getWhitespaceCell(_){return _?(this._whitespaceCell.fg=_.fg,this._whitespaceCell.bg=_.bg,this._whitespaceCell.extended=_.extended):(this._whitespaceCell.fg=0,this._whitespaceCell.bg=0,this._whitespaceCell.extended=new u.ExtendedAttrs),this._whitespaceCell}getBlankLine(_,y){return new b.BufferLine(this._bufferService.cols,this.getNullCell(_),y)}get hasScrollback(){return this._hasScrollback&&this.lines.maxLength>this._rows}get isCursorInViewport(){const _=this.ybase+this.y-this.ydisp;return _>=0&&_<this._rows}_getCorrectBufferLength(_){if(!this._hasScrollback)return _;const y=_+this._optionsService.rawOptions.scrollback;return y>o.MAX_BUFFER_SIZE?o.MAX_BUFFER_SIZE:y}fillViewportRows(_){if(this.lines.length===0){_===void 0&&(_=b.DEFAULT_ATTR_DATA);let y=this._rows;for(;y--;)this.lines.push(this.getBlankLine(_))}}clear(){this.ydisp=0,this.ybase=0,this.y=0,this.x=0,this.lines=new h.CircularList(this._getCorrectBufferLength(this._rows)),this.scrollTop=0,this.scrollBottom=this._rows-1,this.setupTabStops()}resize(_,y){const A=this.getNullCell(b.DEFAULT_ATTR_DATA);let L=0;const D=this._getCorrectBufferLength(y);if(D>this.lines.maxLength&&(this.lines.maxLength=D),this.lines.length>0){if(this._cols<_)for(let k=0;k<this.lines.length;k++)L+=+this.lines.get(k).resize(_,A);let R=0;if(this._rows<y)for(let k=this._rows;k<y;k++)this.lines.length<y+this.ybase&&(this._optionsService.rawOptions.windowsMode||this._optionsService.rawOptions.windowsPty.backend!==void 0||this._optionsService.rawOptions.windowsPty.buildNumber!==void 0?this.lines.push(new b.BufferLine(_,A)):this.ybase>0&&this.lines.length<=this.ybase+this.y+R+1?(this.ybase--,R++,this.ydisp>0&&this.ydisp--):this.lines.push(new b.BufferLine(_,A)));else for(let k=this._rows;k>y;k--)this.lines.length>y+this.ybase&&(this.lines.length>this.ybase+this.y+1?this.lines.pop():(this.ybase++,this.ydisp++));if(D<this.lines.maxLength){const k=this.lines.length-D;k>0&&(this.lines.trimStart(k),this.ybase=Math.max(this.ybase-k,0),this.ydisp=Math.max(this.ydisp-k,0),this.savedY=Math.max(this.savedY-k,0)),this.lines.maxLength=D}this.x=Math.min(this.x,_-1),this.y=Math.min(this.y,y-1),R&&(this.y+=R),this.savedX=Math.min(this.savedX,_-1),this.scrollTop=0}if(this.scrollBottom=y-1,this._isReflowEnabled&&(this._reflow(_,y),this._cols>_))for(let R=0;R<this.lines.length;R++)L+=+this.lines.get(R).resize(_,A);this._cols=_,this._rows=y,this._memoryCleanupQueue.clear(),L>.1*this.lines.length&&(this._memoryCleanupPosition=0,this._memoryCleanupQueue.enqueue((()=>this._batchedMemoryCleanup())))}_batchedMemoryCleanup(){let _=!0;this._memoryCleanupPosition>=this.lines.length&&(this._memoryCleanupPosition=0,_=!1);let y=0;for(;this._memoryCleanupPosition<this.lines.length;)if(y+=this.lines.get(this._memoryCleanupPosition++).cleanupMemory(),y>100)return!0;return _}get _isReflowEnabled(){const _=this._optionsService.rawOptions.windowsPty;return _&&_.buildNumber?this._hasScrollback&&_.backend==="conpty"&&_.buildNumber>=21376:this._hasScrollback&&!this._optionsService.rawOptions.windowsMode}_reflow(_,y){this._cols!==_&&(_>this._cols?this._reflowLarger(_,y):this._reflowSmaller(_,y))}_reflowLarger(_,y){const A=(0,C.reflowLargerGetLinesToRemove)(this.lines,this._cols,_,this.ybase+this.y,this.getNullCell(b.DEFAULT_ATTR_DATA));if(A.length>0){const L=(0,C.reflowLargerCreateNewLayout)(this.lines,A);(0,C.reflowLargerApplyNewLayout)(this.lines,L.layout),this._reflowLargerAdjustViewport(_,y,L.countRemoved)}}_reflowLargerAdjustViewport(_,y,A){const L=this.getNullCell(b.DEFAULT_ATTR_DATA);let D=A;for(;D-- >0;)this.ybase===0?(this.y>0&&this.y--,this.lines.length<y&&this.lines.push(new b.BufferLine(_,L))):(this.ydisp===this.ybase&&this.ydisp--,this.ybase--);this.savedY=Math.max(this.savedY-A,0)}_reflowSmaller(_,y){const A=this.getNullCell(b.DEFAULT_ATTR_DATA),L=[];let D=0;for(let R=this.lines.length-1;R>=0;R--){let k=this.lines.get(R);if(!k||!k.isWrapped&&k.getTrimmedLength()<=_)continue;const M=[k];for(;k.isWrapped&&R>0;)k=this.lines.get(--R),M.unshift(k);const j=this.ybase+this.y;if(j>=R&&j<R+M.length)continue;const H=M[M.length-1].getTrimmedLength(),U=(0,C.reflowSmallerGetNewLineLengths)(M,this._cols,_),F=U.length-M.length;let K;K=this.ybase===0&&this.y!==this.lines.length-1?Math.max(0,this.y-this.lines.maxLength+F):Math.max(0,this.lines.length-this.lines.maxLength+F);const Y=[];for(let N=0;N<F;N++){const $=this.getBlankLine(b.DEFAULT_ATTR_DATA,!0);Y.push($)}Y.length>0&&(L.push({start:R+M.length+D,newLines:Y}),D+=Y.length),M.push(...Y);let G=U.length-1,W=U[G];W===0&&(G--,W=U[G]);let Z=M.length-F-1,z=H;for(;Z>=0;){const N=Math.min(z,W);if(M[G]===void 0)break;if(M[G].copyCellsFrom(M[Z],z-N,W-N,N,!0),W-=N,W===0&&(G--,W=U[G]),z-=N,z===0){Z--;const $=Math.max(Z,0);z=(0,C.getWrappedLineTrimmedLength)(M,$,this._cols)}}for(let N=0;N<M.length;N++)U[N]<_&&M[N].setCell(U[N],A);let O=F-K;for(;O-- >0;)this.ybase===0?this.y<y-1?(this.y++,this.lines.pop()):(this.ybase++,this.ydisp++):this.ybase<Math.min(this.lines.maxLength,this.lines.length+D)-y&&(this.ybase===this.ydisp&&this.ydisp++,this.ybase++);this.savedY=Math.min(this.savedY+F,this.ybase+y-1)}if(L.length>0){const R=[],k=[];for(let G=0;G<this.lines.length;G++)k.push(this.lines.get(G));const M=this.lines.length;let j=M-1,H=0,U=L[H];this.lines.length=Math.min(this.lines.maxLength,this.lines.length+D);let F=0;for(let G=Math.min(this.lines.maxLength-1,M+D-1);G>=0;G--)if(U&&U.start>j+F){for(let W=U.newLines.length-1;W>=0;W--)this.lines.set(G--,U.newLines[W]);G++,R.push({index:j+1,amount:U.newLines.length}),F+=U.newLines.length,U=L[++H]}else this.lines.set(G,k[j--]);let K=0;for(let G=R.length-1;G>=0;G--)R[G].index+=K,this.lines.onInsertEmitter.fire(R[G]),K+=R[G].amount;const Y=Math.max(0,M+D-this.lines.maxLength);Y>0&&this.lines.onTrimEmitter.fire(Y)}}translateBufferLineToString(_,y,A=0,L){const D=this.lines.get(_);return D?D.translateToString(y,A,L):""}getWrappedRangeForLine(_){let y=_,A=_;for(;y>0&&this.lines.get(y).isWrapped;)y--;for(;A+1<this.lines.length&&this.lines.get(A+1).isWrapped;)A++;return{first:y,last:A}}setupTabStops(_){for(_!=null?this.tabs[_]||(_=this.prevStop(_)):(this.tabs={},_=0);_<this._cols;_+=this._optionsService.rawOptions.tabStopWidth)this.tabs[_]=!0}prevStop(_){for(_==null&&(_=this.x);!this.tabs[--_]&&_>0;);return _>=this._cols?this._cols-1:_<0?0:_}nextStop(_){for(_==null&&(_=this.x);!this.tabs[++_]&&_<this._cols;);return _>=this._cols?this._cols-1:_<0?0:_}clearMarkers(_){this._isClearing=!0;for(let y=0;y<this.markers.length;y++)this.markers[y].line===_&&(this.markers[y].dispose(),this.markers.splice(y--,1));this._isClearing=!1}clearAllMarkers(){this._isClearing=!0;for(let _=0;_<this.markers.length;_++)this.markers[_].dispose(),this.markers.splice(_--,1);this._isClearing=!1}addMarker(_){const y=new S.Marker(_);return this.markers.push(y),y.register(this.lines.onTrim((A=>{y.line-=A,y.line<0&&y.dispose()}))),y.register(this.lines.onInsert((A=>{y.line>=A.index&&(y.line+=A.amount)}))),y.register(this.lines.onDelete((A=>{y.line>=A.index&&y.line<A.index+A.amount&&y.dispose(),y.line>A.index&&(y.line-=A.amount)}))),y.register(y.onDispose((()=>this._removeMarker(y)))),y}_removeMarker(_){this._isClearing||this.markers.splice(this.markers.indexOf(_),1)}}},8437:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLine=o.DEFAULT_ATTR_DATA=void 0;const h=c(3734),p=c(511),u=c(643),b=c(482);o.DEFAULT_ATTR_DATA=Object.freeze(new h.AttributeData);let C=0;class T{constructor(S,v,_=!1){this.isWrapped=_,this._combined={},this._extendedAttrs={},this._data=new Uint32Array(3*S);const y=v||p.CellData.fromCharData([0,u.NULL_CELL_CHAR,u.NULL_CELL_WIDTH,u.NULL_CELL_CODE]);for(let A=0;A<S;++A)this.setCell(A,y);this.length=S}get(S){const v=this._data[3*S+0],_=2097151&v;return[this._data[3*S+1],2097152&v?this._combined[S]:_?(0,b.stringFromCodePoint)(_):"",v>>22,2097152&v?this._combined[S].charCodeAt(this._combined[S].length-1):_]}set(S,v){this._data[3*S+1]=v[u.CHAR_DATA_ATTR_INDEX],v[u.CHAR_DATA_CHAR_INDEX].length>1?(this._combined[S]=v[1],this._data[3*S+0]=2097152|S|v[u.CHAR_DATA_WIDTH_INDEX]<<22):this._data[3*S+0]=v[u.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|v[u.CHAR_DATA_WIDTH_INDEX]<<22}getWidth(S){return this._data[3*S+0]>>22}hasWidth(S){return 12582912&this._data[3*S+0]}getFg(S){return this._data[3*S+1]}getBg(S){return this._data[3*S+2]}hasContent(S){return 4194303&this._data[3*S+0]}getCodePoint(S){const v=this._data[3*S+0];return 2097152&v?this._combined[S].charCodeAt(this._combined[S].length-1):2097151&v}isCombined(S){return 2097152&this._data[3*S+0]}getString(S){const v=this._data[3*S+0];return 2097152&v?this._combined[S]:2097151&v?(0,b.stringFromCodePoint)(2097151&v):""}isProtected(S){return 536870912&this._data[3*S+2]}loadCell(S,v){return C=3*S,v.content=this._data[C+0],v.fg=this._data[C+1],v.bg=this._data[C+2],2097152&v.content&&(v.combinedData=this._combined[S]),268435456&v.bg&&(v.extended=this._extendedAttrs[S]),v}setCell(S,v){2097152&v.content&&(this._combined[S]=v.combinedData),268435456&v.bg&&(this._extendedAttrs[S]=v.extended),this._data[3*S+0]=v.content,this._data[3*S+1]=v.fg,this._data[3*S+2]=v.bg}setCellFromCodepoint(S,v,_,y){268435456&y.bg&&(this._extendedAttrs[S]=y.extended),this._data[3*S+0]=v|_<<22,this._data[3*S+1]=y.fg,this._data[3*S+2]=y.bg}addCodepointToCell(S,v,_){let y=this._data[3*S+0];2097152&y?this._combined[S]+=(0,b.stringFromCodePoint)(v):2097151&y?(this._combined[S]=(0,b.stringFromCodePoint)(2097151&y)+(0,b.stringFromCodePoint)(v),y&=-2097152,y|=2097152):y=v|4194304,_&&(y&=-12582913,y|=_<<22),this._data[3*S+0]=y}insertCells(S,v,_){if((S%=this.length)&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,_),v<this.length-S){const y=new p.CellData;for(let A=this.length-S-v-1;A>=0;--A)this.setCell(S+v+A,this.loadCell(S+A,y));for(let A=0;A<v;++A)this.setCell(S+A,_)}else for(let y=S;y<this.length;++y)this.setCell(y,_);this.getWidth(this.length-1)===2&&this.setCellFromCodepoint(this.length-1,0,1,_)}deleteCells(S,v,_){if(S%=this.length,v<this.length-S){const y=new p.CellData;for(let A=0;A<this.length-S-v;++A)this.setCell(S+A,this.loadCell(S+v+A,y));for(let A=this.length-v;A<this.length;++A)this.setCell(A,_)}else for(let y=S;y<this.length;++y)this.setCell(y,_);S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,_),this.getWidth(S)!==0||this.hasContent(S)||this.setCellFromCodepoint(S,0,1,_)}replaceCells(S,v,_,y=!1){if(y)for(S&&this.getWidth(S-1)===2&&!this.isProtected(S-1)&&this.setCellFromCodepoint(S-1,0,1,_),v<this.length&&this.getWidth(v-1)===2&&!this.isProtected(v)&&this.setCellFromCodepoint(v,0,1,_);S<v&&S<this.length;)this.isProtected(S)||this.setCell(S,_),S++;else for(S&&this.getWidth(S-1)===2&&this.setCellFromCodepoint(S-1,0,1,_),v<this.length&&this.getWidth(v-1)===2&&this.setCellFromCodepoint(v,0,1,_);S<v&&S<this.length;)this.setCell(S++,_)}resize(S,v){if(S===this.length)return 4*this._data.length*2<this._data.buffer.byteLength;const _=3*S;if(S>this.length){if(this._data.buffer.byteLength>=4*_)this._data=new Uint32Array(this._data.buffer,0,_);else{const y=new Uint32Array(_);y.set(this._data),this._data=y}for(let y=this.length;y<S;++y)this.setCell(y,v)}else{this._data=this._data.subarray(0,_);const y=Object.keys(this._combined);for(let L=0;L<y.length;L++){const D=parseInt(y[L],10);D>=S&&delete this._combined[D]}const A=Object.keys(this._extendedAttrs);for(let L=0;L<A.length;L++){const D=parseInt(A[L],10);D>=S&&delete this._extendedAttrs[D]}}return this.length=S,4*_*2<this._data.buffer.byteLength}cleanupMemory(){if(4*this._data.length*2<this._data.buffer.byteLength){const S=new Uint32Array(this._data.length);return S.set(this._data),this._data=S,1}return 0}fill(S,v=!1){if(v)for(let _=0;_<this.length;++_)this.isProtected(_)||this.setCell(_,S);else{this._combined={},this._extendedAttrs={};for(let _=0;_<this.length;++_)this.setCell(_,S)}}copyFrom(S){this.length!==S.length?this._data=new Uint32Array(S._data):this._data.set(S._data),this.length=S.length,this._combined={};for(const v in S._combined)this._combined[v]=S._combined[v];this._extendedAttrs={};for(const v in S._extendedAttrs)this._extendedAttrs[v]=S._extendedAttrs[v];this.isWrapped=S.isWrapped}clone(){const S=new T(0);S._data=new Uint32Array(this._data),S.length=this.length;for(const v in this._combined)S._combined[v]=this._combined[v];for(const v in this._extendedAttrs)S._extendedAttrs[v]=this._extendedAttrs[v];return S.isWrapped=this.isWrapped,S}getTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0])return S+(this._data[3*S+0]>>22);return 0}getNoBgTrimmedLength(){for(let S=this.length-1;S>=0;--S)if(4194303&this._data[3*S+0]||50331648&this._data[3*S+2])return S+(this._data[3*S+0]>>22);return 0}copyCellsFrom(S,v,_,y,A){const L=S._data;if(A)for(let R=y-1;R>=0;R--){for(let k=0;k<3;k++)this._data[3*(_+R)+k]=L[3*(v+R)+k];268435456&L[3*(v+R)+2]&&(this._extendedAttrs[_+R]=S._extendedAttrs[v+R])}else for(let R=0;R<y;R++){for(let k=0;k<3;k++)this._data[3*(_+R)+k]=L[3*(v+R)+k];268435456&L[3*(v+R)+2]&&(this._extendedAttrs[_+R]=S._extendedAttrs[v+R])}const D=Object.keys(S._combined);for(let R=0;R<D.length;R++){const k=parseInt(D[R],10);k>=v&&(this._combined[k-v+_]=S._combined[k])}}translateToString(S,v,_,y){v=v??0,_=_??this.length,S&&(_=Math.min(_,this.getTrimmedLength())),y&&(y.length=0);let A="";for(;v<_;){const L=this._data[3*v+0],D=2097151&L,R=2097152&L?this._combined[v]:D?(0,b.stringFromCodePoint)(D):u.WHITESPACE_CELL_CHAR;if(A+=R,y)for(let k=0;k<R.length;++k)y.push(v);v+=L>>22||1}return y&&y.push(v),A}}o.BufferLine=T},4841:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.getRangeLength=void 0,o.getRangeLength=function(c,h){if(c.start.y>c.end.y)throw new Error(`Buffer range end (${c.end.x}, ${c.end.y}) cannot be before start (${c.start.x}, ${c.start.y})`);return h*(c.end.y-c.start.y)+(c.end.x-c.start.x+1)}},4634:(f,o)=>{function c(h,p,u){if(p===h.length-1)return h[p].getTrimmedLength();const b=!h[p].hasContent(u-1)&&h[p].getWidth(u-1)===1,C=h[p+1].getWidth(0)===2;return b&&C?u-1:u}Object.defineProperty(o,"__esModule",{value:!0}),o.getWrappedLineTrimmedLength=o.reflowSmallerGetNewLineLengths=o.reflowLargerApplyNewLayout=o.reflowLargerCreateNewLayout=o.reflowLargerGetLinesToRemove=void 0,o.reflowLargerGetLinesToRemove=function(h,p,u,b,C){const T=[];for(let E=0;E<h.length-1;E++){let S=E,v=h.get(++S);if(!v.isWrapped)continue;const _=[h.get(E)];for(;S<h.length&&v.isWrapped;)_.push(v),v=h.get(++S);if(b>=E&&b<S){E+=_.length-1;continue}let y=0,A=c(_,y,p),L=1,D=0;for(;L<_.length;){const k=c(_,L,p),M=k-D,j=u-A,H=Math.min(M,j);_[y].copyCellsFrom(_[L],D,A,H,!1),A+=H,A===u&&(y++,A=0),D+=H,D===k&&(L++,D=0),A===0&&y!==0&&_[y-1].getWidth(u-1)===2&&(_[y].copyCellsFrom(_[y-1],u-1,A++,1,!1),_[y-1].setCell(u-1,C))}_[y].replaceCells(A,u,C);let R=0;for(let k=_.length-1;k>0&&(k>y||_[k].getTrimmedLength()===0);k--)R++;R>0&&(T.push(E+_.length-R),T.push(R)),E+=_.length-1}return T},o.reflowLargerCreateNewLayout=function(h,p){const u=[];let b=0,C=p[b],T=0;for(let E=0;E<h.length;E++)if(C===E){const S=p[++b];h.onDeleteEmitter.fire({index:E-T,amount:S}),E+=S-1,T+=S,C=p[++b]}else u.push(E);return{layout:u,countRemoved:T}},o.reflowLargerApplyNewLayout=function(h,p){const u=[];for(let b=0;b<p.length;b++)u.push(h.get(p[b]));for(let b=0;b<u.length;b++)h.set(b,u[b]);h.length=p.length},o.reflowSmallerGetNewLineLengths=function(h,p,u){const b=[],C=h.map(((v,_)=>c(h,_,p))).reduce(((v,_)=>v+_));let T=0,E=0,S=0;for(;S<C;){if(C-S<u){b.push(C-S);break}T+=u;const v=c(h,E,p);T>v&&(T-=v,E++);const _=h[E].getWidth(T-1)===2;_&&T--;const y=_?u-1:u;b.push(y),S+=y}return b},o.getWrappedLineTrimmedLength=c},5295:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferSet=void 0;const h=c(8460),p=c(844),u=c(9092);class b extends p.Disposable{constructor(T,E){super(),this._optionsService=T,this._bufferService=E,this._onBufferActivate=this.register(new h.EventEmitter),this.onBufferActivate=this._onBufferActivate.event,this.reset(),this.register(this._optionsService.onSpecificOptionChange("scrollback",(()=>this.resize(this._bufferService.cols,this._bufferService.rows)))),this.register(this._optionsService.onSpecificOptionChange("tabStopWidth",(()=>this.setupTabStops())))}reset(){this._normal=new u.Buffer(!0,this._optionsService,this._bufferService),this._normal.fillViewportRows(),this._alt=new u.Buffer(!1,this._optionsService,this._bufferService),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}),this.setupTabStops()}get alt(){return this._alt}get active(){return this._activeBuffer}get normal(){return this._normal}activateNormalBuffer(){this._activeBuffer!==this._normal&&(this._normal.x=this._alt.x,this._normal.y=this._alt.y,this._alt.clearAllMarkers(),this._alt.clear(),this._activeBuffer=this._normal,this._onBufferActivate.fire({activeBuffer:this._normal,inactiveBuffer:this._alt}))}activateAltBuffer(T){this._activeBuffer!==this._alt&&(this._alt.fillViewportRows(T),this._alt.x=this._normal.x,this._alt.y=this._normal.y,this._activeBuffer=this._alt,this._onBufferActivate.fire({activeBuffer:this._alt,inactiveBuffer:this._normal}))}resize(T,E){this._normal.resize(T,E),this._alt.resize(T,E),this.setupTabStops(T)}setupTabStops(T){this._normal.setupTabStops(T),this._alt.setupTabStops(T)}}o.BufferSet=b},511:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CellData=void 0;const h=c(482),p=c(643),u=c(3734);class b extends u.AttributeData{constructor(){super(...arguments),this.content=0,this.fg=0,this.bg=0,this.extended=new u.ExtendedAttrs,this.combinedData=""}static fromCharData(T){const E=new b;return E.setFromCharData(T),E}isCombined(){return 2097152&this.content}getWidth(){return this.content>>22}getChars(){return 2097152&this.content?this.combinedData:2097151&this.content?(0,h.stringFromCodePoint)(2097151&this.content):""}getCode(){return this.isCombined()?this.combinedData.charCodeAt(this.combinedData.length-1):2097151&this.content}setFromCharData(T){this.fg=T[p.CHAR_DATA_ATTR_INDEX],this.bg=0;let E=!1;if(T[p.CHAR_DATA_CHAR_INDEX].length>2)E=!0;else if(T[p.CHAR_DATA_CHAR_INDEX].length===2){const S=T[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0);if(55296<=S&&S<=56319){const v=T[p.CHAR_DATA_CHAR_INDEX].charCodeAt(1);56320<=v&&v<=57343?this.content=1024*(S-55296)+v-56320+65536|T[p.CHAR_DATA_WIDTH_INDEX]<<22:E=!0}else E=!0}else this.content=T[p.CHAR_DATA_CHAR_INDEX].charCodeAt(0)|T[p.CHAR_DATA_WIDTH_INDEX]<<22;E&&(this.combinedData=T[p.CHAR_DATA_CHAR_INDEX],this.content=2097152|T[p.CHAR_DATA_WIDTH_INDEX]<<22)}getAsCharData(){return[this.fg,this.getChars(),this.getWidth(),this.getCode()]}}o.CellData=b},643:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WHITESPACE_CELL_CODE=o.WHITESPACE_CELL_WIDTH=o.WHITESPACE_CELL_CHAR=o.NULL_CELL_CODE=o.NULL_CELL_WIDTH=o.NULL_CELL_CHAR=o.CHAR_DATA_CODE_INDEX=o.CHAR_DATA_WIDTH_INDEX=o.CHAR_DATA_CHAR_INDEX=o.CHAR_DATA_ATTR_INDEX=o.DEFAULT_EXT=o.DEFAULT_ATTR=o.DEFAULT_COLOR=void 0,o.DEFAULT_COLOR=0,o.DEFAULT_ATTR=256|o.DEFAULT_COLOR<<9,o.DEFAULT_EXT=0,o.CHAR_DATA_ATTR_INDEX=0,o.CHAR_DATA_CHAR_INDEX=1,o.CHAR_DATA_WIDTH_INDEX=2,o.CHAR_DATA_CODE_INDEX=3,o.NULL_CELL_CHAR="",o.NULL_CELL_WIDTH=1,o.NULL_CELL_CODE=0,o.WHITESPACE_CELL_CHAR=" ",o.WHITESPACE_CELL_WIDTH=1,o.WHITESPACE_CELL_CODE=32},4863:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Marker=void 0;const h=c(8460),p=c(844);class u{get id(){return this._id}constructor(C){this.line=C,this.isDisposed=!1,this._disposables=[],this._id=u._nextId++,this._onDispose=this.register(new h.EventEmitter),this.onDispose=this._onDispose.event}dispose(){this.isDisposed||(this.isDisposed=!0,this.line=-1,this._onDispose.fire(),(0,p.disposeArray)(this._disposables),this._disposables.length=0)}register(C){return this._disposables.push(C),C}}o.Marker=u,u._nextId=1},7116:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DEFAULT_CHARSET=o.CHARSETS=void 0,o.CHARSETS={},o.DEFAULT_CHARSET=o.CHARSETS.B,o.CHARSETS[0]={"`":"◆",a:"▒",b:"␉",c:"␌",d:"␍",e:"␊",f:"°",g:"±",h:"",i:"␋",j:"┘",k:"┐",l:"┌",m:"└",n:"┼",o:"⎺",p:"⎻",q:"─",r:"⎼",s:"⎽",t:"├",u:"┤",v:"┴",w:"┬",x:"│",y:"≤",z:"≥","{":"π","|":"≠","}":"£","~":"·"},o.CHARSETS.A={"#":"£"},o.CHARSETS.B=void 0,o.CHARSETS[4]={"#":"£","@":"¾","[":"ij","\\":"½","]":"|","{":"¨","|":"f","}":"¼","~":"´"},o.CHARSETS.C=o.CHARSETS[5]={"[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS.R={"#":"£","@":"à","[":"°","\\":"ç","]":"§","{":"é","|":"ù","}":"è","~":"¨"},o.CHARSETS.Q={"@":"à","[":"â","\\":"ç","]":"ê","^":"î","`":"ô","{":"é","|":"ù","}":"è","~":"û"},o.CHARSETS.K={"@":"§","[":"Ä","\\":"Ö","]":"Ü","{":"ä","|":"ö","}":"ü","~":"ß"},o.CHARSETS.Y={"#":"£","@":"§","[":"°","\\":"ç","]":"é","`":"ù","{":"à","|":"ò","}":"è","~":"ì"},o.CHARSETS.E=o.CHARSETS[6]={"@":"Ä","[":"Æ","\\":"Ø","]":"Å","^":"Ü","`":"ä","{":"æ","|":"ø","}":"å","~":"ü"},o.CHARSETS.Z={"#":"£","@":"§","[":"¡","\\":"Ñ","]":"¿","{":"°","|":"ñ","}":"ç"},o.CHARSETS.H=o.CHARSETS[7]={"@":"É","[":"Ä","\\":"Ö","]":"Å","^":"Ü","`":"é","{":"ä","|":"ö","}":"å","~":"ü"},o.CHARSETS["="]={"#":"ù","@":"à","[":"é","\\":"ç","]":"ê","^":"î",_:"è","`":"ô","{":"ä","|":"ö","}":"ü","~":"û"}},2584:(f,o)=>{var c,h,p;Object.defineProperty(o,"__esModule",{value:!0}),o.C1_ESCAPED=o.C1=o.C0=void 0,(function(u){u.NUL="\0",u.SOH="",u.STX="",u.ETX="",u.EOT="",u.ENQ="",u.ACK="",u.BEL="\x07",u.BS="\b",u.HT=" ",u.LF=`
|
|
58
58
|
`,u.VT="\v",u.FF="\f",u.CR="\r",u.SO="",u.SI="",u.DLE="",u.DC1="",u.DC2="",u.DC3="",u.DC4="",u.NAK="",u.SYN="",u.ETB="",u.CAN="",u.EM="",u.SUB="",u.ESC="\x1B",u.FS="",u.GS="",u.RS="",u.US="",u.SP=" ",u.DEL=""})(c||(o.C0=c={})),(function(u){u.PAD="",u.HOP="",u.BPH="",u.NBH="",u.IND="",u.NEL="
",u.SSA="",u.ESA="",u.HTS="",u.HTJ="",u.VTS="",u.PLD="",u.PLU="",u.RI="",u.SS2="",u.SS3="",u.DCS="",u.PU1="",u.PU2="",u.STS="",u.CCH="",u.MW="",u.SPA="",u.EPA="",u.SOS="",u.SGCI="",u.SCI="",u.CSI="",u.ST="",u.OSC="",u.PM="",u.APC=""})(h||(o.C1=h={})),(function(u){u.ST=`${c.ESC}\\`})(p||(o.C1_ESCAPED=p={}))},7399:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.evaluateKeyboardEvent=void 0;const h=c(2584),p={48:["0",")"],49:["1","!"],50:["2","@"],51:["3","#"],52:["4","$"],53:["5","%"],54:["6","^"],55:["7","&"],56:["8","*"],57:["9","("],186:[";",":"],187:["=","+"],188:[",","<"],189:["-","_"],190:[".",">"],191:["/","?"],192:["`","~"],219:["[","{"],220:["\\","|"],221:["]","}"],222:["'",'"']};o.evaluateKeyboardEvent=function(u,b,C,T){const E={type:0,cancel:!1,key:void 0},S=(u.shiftKey?1:0)|(u.altKey?2:0)|(u.ctrlKey?4:0)|(u.metaKey?8:0);switch(u.keyCode){case 0:u.key==="UIKeyInputUpArrow"?E.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A":u.key==="UIKeyInputLeftArrow"?E.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D":u.key==="UIKeyInputRightArrow"?E.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C":u.key==="UIKeyInputDownArrow"&&(E.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B");break;case 8:E.key=u.ctrlKey?"\b":h.C0.DEL,u.altKey&&(E.key=h.C0.ESC+E.key);break;case 9:if(u.shiftKey){E.key=h.C0.ESC+"[Z";break}E.key=h.C0.HT,E.cancel=!0;break;case 13:E.key=u.altKey?h.C0.ESC+h.C0.CR:h.C0.CR,E.cancel=!0;break;case 27:E.key=h.C0.ESC,u.altKey&&(E.key=h.C0.ESC+h.C0.ESC),E.cancel=!0;break;case 37:if(u.metaKey)break;S?(E.key=h.C0.ESC+"[1;"+(S+1)+"D",E.key===h.C0.ESC+"[1;3D"&&(E.key=h.C0.ESC+(C?"b":"[1;5D"))):E.key=b?h.C0.ESC+"OD":h.C0.ESC+"[D";break;case 39:if(u.metaKey)break;S?(E.key=h.C0.ESC+"[1;"+(S+1)+"C",E.key===h.C0.ESC+"[1;3C"&&(E.key=h.C0.ESC+(C?"f":"[1;5C"))):E.key=b?h.C0.ESC+"OC":h.C0.ESC+"[C";break;case 38:if(u.metaKey)break;S?(E.key=h.C0.ESC+"[1;"+(S+1)+"A",C||E.key!==h.C0.ESC+"[1;3A"||(E.key=h.C0.ESC+"[1;5A")):E.key=b?h.C0.ESC+"OA":h.C0.ESC+"[A";break;case 40:if(u.metaKey)break;S?(E.key=h.C0.ESC+"[1;"+(S+1)+"B",C||E.key!==h.C0.ESC+"[1;3B"||(E.key=h.C0.ESC+"[1;5B")):E.key=b?h.C0.ESC+"OB":h.C0.ESC+"[B";break;case 45:u.shiftKey||u.ctrlKey||(E.key=h.C0.ESC+"[2~");break;case 46:E.key=S?h.C0.ESC+"[3;"+(S+1)+"~":h.C0.ESC+"[3~";break;case 36:E.key=S?h.C0.ESC+"[1;"+(S+1)+"H":b?h.C0.ESC+"OH":h.C0.ESC+"[H";break;case 35:E.key=S?h.C0.ESC+"[1;"+(S+1)+"F":b?h.C0.ESC+"OF":h.C0.ESC+"[F";break;case 33:u.shiftKey?E.type=2:u.ctrlKey?E.key=h.C0.ESC+"[5;"+(S+1)+"~":E.key=h.C0.ESC+"[5~";break;case 34:u.shiftKey?E.type=3:u.ctrlKey?E.key=h.C0.ESC+"[6;"+(S+1)+"~":E.key=h.C0.ESC+"[6~";break;case 112:E.key=S?h.C0.ESC+"[1;"+(S+1)+"P":h.C0.ESC+"OP";break;case 113:E.key=S?h.C0.ESC+"[1;"+(S+1)+"Q":h.C0.ESC+"OQ";break;case 114:E.key=S?h.C0.ESC+"[1;"+(S+1)+"R":h.C0.ESC+"OR";break;case 115:E.key=S?h.C0.ESC+"[1;"+(S+1)+"S":h.C0.ESC+"OS";break;case 116:E.key=S?h.C0.ESC+"[15;"+(S+1)+"~":h.C0.ESC+"[15~";break;case 117:E.key=S?h.C0.ESC+"[17;"+(S+1)+"~":h.C0.ESC+"[17~";break;case 118:E.key=S?h.C0.ESC+"[18;"+(S+1)+"~":h.C0.ESC+"[18~";break;case 119:E.key=S?h.C0.ESC+"[19;"+(S+1)+"~":h.C0.ESC+"[19~";break;case 120:E.key=S?h.C0.ESC+"[20;"+(S+1)+"~":h.C0.ESC+"[20~";break;case 121:E.key=S?h.C0.ESC+"[21;"+(S+1)+"~":h.C0.ESC+"[21~";break;case 122:E.key=S?h.C0.ESC+"[23;"+(S+1)+"~":h.C0.ESC+"[23~";break;case 123:E.key=S?h.C0.ESC+"[24;"+(S+1)+"~":h.C0.ESC+"[24~";break;default:if(!u.ctrlKey||u.shiftKey||u.altKey||u.metaKey)if(C&&!T||!u.altKey||u.metaKey)!C||u.altKey||u.ctrlKey||u.shiftKey||!u.metaKey?u.key&&!u.ctrlKey&&!u.altKey&&!u.metaKey&&u.keyCode>=48&&u.key.length===1?E.key=u.key:u.key&&u.ctrlKey&&(u.key==="_"&&(E.key=h.C0.US),u.key==="@"&&(E.key=h.C0.NUL)):u.keyCode===65&&(E.type=1);else{const v=p[u.keyCode],_=v==null?void 0:v[u.shiftKey?1:0];if(_)E.key=h.C0.ESC+_;else if(u.keyCode>=65&&u.keyCode<=90){const y=u.ctrlKey?u.keyCode-64:u.keyCode+32;let A=String.fromCharCode(y);u.shiftKey&&(A=A.toUpperCase()),E.key=h.C0.ESC+A}else if(u.keyCode===32)E.key=h.C0.ESC+(u.ctrlKey?h.C0.NUL:" ");else if(u.key==="Dead"&&u.code.startsWith("Key")){let y=u.code.slice(3,4);u.shiftKey||(y=y.toLowerCase()),E.key=h.C0.ESC+y,E.cancel=!0}}else u.keyCode>=65&&u.keyCode<=90?E.key=String.fromCharCode(u.keyCode-64):u.keyCode===32?E.key=h.C0.NUL:u.keyCode>=51&&u.keyCode<=55?E.key=String.fromCharCode(u.keyCode-51+27):u.keyCode===56?E.key=h.C0.DEL:u.keyCode===219?E.key=h.C0.ESC:u.keyCode===220?E.key=h.C0.FS:u.keyCode===221&&(E.key=h.C0.GS)}return E}},482:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Utf8ToUtf32=o.StringToUtf32=o.utf32ToString=o.stringFromCodePoint=void 0,o.stringFromCodePoint=function(c){return c>65535?(c-=65536,String.fromCharCode(55296+(c>>10))+String.fromCharCode(c%1024+56320)):String.fromCharCode(c)},o.utf32ToString=function(c,h=0,p=c.length){let u="";for(let b=h;b<p;++b){let C=c[b];C>65535?(C-=65536,u+=String.fromCharCode(55296+(C>>10))+String.fromCharCode(C%1024+56320)):u+=String.fromCharCode(C)}return u},o.StringToUtf32=class{constructor(){this._interim=0}clear(){this._interim=0}decode(c,h){const p=c.length;if(!p)return 0;let u=0,b=0;if(this._interim){const C=c.charCodeAt(b++);56320<=C&&C<=57343?h[u++]=1024*(this._interim-55296)+C-56320+65536:(h[u++]=this._interim,h[u++]=C),this._interim=0}for(let C=b;C<p;++C){const T=c.charCodeAt(C);if(55296<=T&&T<=56319){if(++C>=p)return this._interim=T,u;const E=c.charCodeAt(C);56320<=E&&E<=57343?h[u++]=1024*(T-55296)+E-56320+65536:(h[u++]=T,h[u++]=E)}else T!==65279&&(h[u++]=T)}return u}},o.Utf8ToUtf32=class{constructor(){this.interim=new Uint8Array(3)}clear(){this.interim.fill(0)}decode(c,h){const p=c.length;if(!p)return 0;let u,b,C,T,E=0,S=0,v=0;if(this.interim[0]){let A=!1,L=this.interim[0];L&=(224&L)==192?31:(240&L)==224?15:7;let D,R=0;for(;(D=63&this.interim[++R])&&R<4;)L<<=6,L|=D;const k=(224&this.interim[0])==192?2:(240&this.interim[0])==224?3:4,M=k-R;for(;v<M;){if(v>=p)return 0;if(D=c[v++],(192&D)!=128){v--,A=!0;break}this.interim[R++]=D,L<<=6,L|=63&D}A||(k===2?L<128?v--:h[E++]=L:k===3?L<2048||L>=55296&&L<=57343||L===65279||(h[E++]=L):L<65536||L>1114111||(h[E++]=L)),this.interim.fill(0)}const _=p-4;let y=v;for(;y<p;){for(;!(!(y<_)||128&(u=c[y])||128&(b=c[y+1])||128&(C=c[y+2])||128&(T=c[y+3]));)h[E++]=u,h[E++]=b,h[E++]=C,h[E++]=T,y+=4;if(u=c[y++],u<128)h[E++]=u;else if((224&u)==192){if(y>=p)return this.interim[0]=u,E;if(b=c[y++],(192&b)!=128){y--;continue}if(S=(31&u)<<6|63&b,S<128){y--;continue}h[E++]=S}else if((240&u)==224){if(y>=p)return this.interim[0]=u,E;if(b=c[y++],(192&b)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=b,E;if(C=c[y++],(192&C)!=128){y--;continue}if(S=(15&u)<<12|(63&b)<<6|63&C,S<2048||S>=55296&&S<=57343||S===65279)continue;h[E++]=S}else if((248&u)==240){if(y>=p)return this.interim[0]=u,E;if(b=c[y++],(192&b)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=b,E;if(C=c[y++],(192&C)!=128){y--;continue}if(y>=p)return this.interim[0]=u,this.interim[1]=b,this.interim[2]=C,E;if(T=c[y++],(192&T)!=128){y--;continue}if(S=(7&u)<<18|(63&b)<<12|(63&C)<<6|63&T,S<65536||S>1114111)continue;h[E++]=S}}return E}}},225:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeV6=void 0;const h=c(1480),p=[[768,879],[1155,1158],[1160,1161],[1425,1469],[1471,1471],[1473,1474],[1476,1477],[1479,1479],[1536,1539],[1552,1557],[1611,1630],[1648,1648],[1750,1764],[1767,1768],[1770,1773],[1807,1807],[1809,1809],[1840,1866],[1958,1968],[2027,2035],[2305,2306],[2364,2364],[2369,2376],[2381,2381],[2385,2388],[2402,2403],[2433,2433],[2492,2492],[2497,2500],[2509,2509],[2530,2531],[2561,2562],[2620,2620],[2625,2626],[2631,2632],[2635,2637],[2672,2673],[2689,2690],[2748,2748],[2753,2757],[2759,2760],[2765,2765],[2786,2787],[2817,2817],[2876,2876],[2879,2879],[2881,2883],[2893,2893],[2902,2902],[2946,2946],[3008,3008],[3021,3021],[3134,3136],[3142,3144],[3146,3149],[3157,3158],[3260,3260],[3263,3263],[3270,3270],[3276,3277],[3298,3299],[3393,3395],[3405,3405],[3530,3530],[3538,3540],[3542,3542],[3633,3633],[3636,3642],[3655,3662],[3761,3761],[3764,3769],[3771,3772],[3784,3789],[3864,3865],[3893,3893],[3895,3895],[3897,3897],[3953,3966],[3968,3972],[3974,3975],[3984,3991],[3993,4028],[4038,4038],[4141,4144],[4146,4146],[4150,4151],[4153,4153],[4184,4185],[4448,4607],[4959,4959],[5906,5908],[5938,5940],[5970,5971],[6002,6003],[6068,6069],[6071,6077],[6086,6086],[6089,6099],[6109,6109],[6155,6157],[6313,6313],[6432,6434],[6439,6440],[6450,6450],[6457,6459],[6679,6680],[6912,6915],[6964,6964],[6966,6970],[6972,6972],[6978,6978],[7019,7027],[7616,7626],[7678,7679],[8203,8207],[8234,8238],[8288,8291],[8298,8303],[8400,8431],[12330,12335],[12441,12442],[43014,43014],[43019,43019],[43045,43046],[64286,64286],[65024,65039],[65056,65059],[65279,65279],[65529,65531]],u=[[68097,68099],[68101,68102],[68108,68111],[68152,68154],[68159,68159],[119143,119145],[119155,119170],[119173,119179],[119210,119213],[119362,119364],[917505,917505],[917536,917631],[917760,917999]];let b;o.UnicodeV6=class{constructor(){if(this.version="6",!b){b=new Uint8Array(65536),b.fill(1),b[0]=0,b.fill(0,1,32),b.fill(0,127,160),b.fill(2,4352,4448),b[9001]=2,b[9002]=2,b.fill(2,11904,42192),b[12351]=1,b.fill(2,44032,55204),b.fill(2,63744,64256),b.fill(2,65040,65050),b.fill(2,65072,65136),b.fill(2,65280,65377),b.fill(2,65504,65511);for(let C=0;C<p.length;++C)b.fill(0,p[C][0],p[C][1]+1)}}wcwidth(C){return C<32?0:C<127?1:C<65536?b[C]:(function(T,E){let S,v=0,_=E.length-1;if(T<E[0][0]||T>E[_][1])return!1;for(;_>=v;)if(S=v+_>>1,T>E[S][1])v=S+1;else{if(!(T<E[S][0]))return!0;_=S-1}return!1})(C,u)?0:C>=131072&&C<=196605||C>=196608&&C<=262141?2:1}charProperties(C,T){let E=this.wcwidth(C),S=E===0&&T!==0;if(S){const v=h.UnicodeService.extractWidth(T);v===0?S=!1:v>E&&(E=v)}return h.UnicodeService.createPropertyValue(0,E,S)}}},5981:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.WriteBuffer=void 0;const h=c(8460),p=c(844);class u extends p.Disposable{constructor(C){super(),this._action=C,this._writeBuffer=[],this._callbacks=[],this._pendingData=0,this._bufferOffset=0,this._isSyncWriting=!1,this._syncCalls=0,this._didUserInput=!1,this._onWriteParsed=this.register(new h.EventEmitter),this.onWriteParsed=this._onWriteParsed.event}handleUserInput(){this._didUserInput=!0}writeSync(C,T){if(T!==void 0&&this._syncCalls>T)return void(this._syncCalls=0);if(this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(void 0),this._syncCalls++,this._isSyncWriting)return;let E;for(this._isSyncWriting=!0;E=this._writeBuffer.shift();){this._action(E);const S=this._callbacks.shift();S&&S()}this._pendingData=0,this._bufferOffset=2147483647,this._isSyncWriting=!1,this._syncCalls=0}write(C,T){if(this._pendingData>5e7)throw new Error("write data discarded, use flow control to avoid losing data");if(!this._writeBuffer.length){if(this._bufferOffset=0,this._didUserInput)return this._didUserInput=!1,this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(T),void this._innerWrite();setTimeout((()=>this._innerWrite()))}this._pendingData+=C.length,this._writeBuffer.push(C),this._callbacks.push(T)}_innerWrite(C=0,T=!0){const E=C||Date.now();for(;this._writeBuffer.length>this._bufferOffset;){const S=this._writeBuffer[this._bufferOffset],v=this._action(S,T);if(v){const y=A=>Date.now()-E>=12?setTimeout((()=>this._innerWrite(0,A))):this._innerWrite(E,A);return void v.catch((A=>(queueMicrotask((()=>{throw A})),Promise.resolve(!1)))).then(y)}const _=this._callbacks[this._bufferOffset];if(_&&_(),this._bufferOffset++,this._pendingData-=S.length,Date.now()-E>=12)break}this._writeBuffer.length>this._bufferOffset?(this._bufferOffset>50&&(this._writeBuffer=this._writeBuffer.slice(this._bufferOffset),this._callbacks=this._callbacks.slice(this._bufferOffset),this._bufferOffset=0),setTimeout((()=>this._innerWrite()))):(this._writeBuffer.length=0,this._callbacks.length=0,this._pendingData=0,this._bufferOffset=0),this._onWriteParsed.fire()}}o.WriteBuffer=u},5941:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.toRgbString=o.parseColor=void 0;const c=/^([\da-f])\/([\da-f])\/([\da-f])$|^([\da-f]{2})\/([\da-f]{2})\/([\da-f]{2})$|^([\da-f]{3})\/([\da-f]{3})\/([\da-f]{3})$|^([\da-f]{4})\/([\da-f]{4})\/([\da-f]{4})$/,h=/^[\da-f]+$/;function p(u,b){const C=u.toString(16),T=C.length<2?"0"+C:C;switch(b){case 4:return C[0];case 8:return T;case 12:return(T+T).slice(0,3);default:return T+T}}o.parseColor=function(u){if(!u)return;let b=u.toLowerCase();if(b.indexOf("rgb:")===0){b=b.slice(4);const C=c.exec(b);if(C){const T=C[1]?15:C[4]?255:C[7]?4095:65535;return[Math.round(parseInt(C[1]||C[4]||C[7]||C[10],16)/T*255),Math.round(parseInt(C[2]||C[5]||C[8]||C[11],16)/T*255),Math.round(parseInt(C[3]||C[6]||C[9]||C[12],16)/T*255)]}}else if(b.indexOf("#")===0&&(b=b.slice(1),h.exec(b)&&[3,6,9,12].includes(b.length))){const C=b.length/3,T=[0,0,0];for(let E=0;E<3;++E){const S=parseInt(b.slice(C*E,C*E+C),16);T[E]=C===1?S<<4:C===2?S:C===3?S>>4:S>>8}return T}},o.toRgbString=function(u,b=16){const[C,T,E]=u;return`rgb:${p(C,b)}/${p(T,b)}/${p(E,b)}`}},5770:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.PAYLOAD_LIMIT=void 0,o.PAYLOAD_LIMIT=1e7},6351:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DcsHandler=o.DcsParser=void 0;const h=c(482),p=c(8742),u=c(5770),b=[];o.DcsParser=class{constructor(){this._handlers=Object.create(null),this._active=b,this._ident=0,this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=b}registerHandler(T,E){this._handlers[T]===void 0&&(this._handlers[T]=[]);const S=this._handlers[T];return S.push(E),{dispose:()=>{const v=S.indexOf(E);v!==-1&&S.splice(v,1)}}}clearHandler(T){this._handlers[T]&&delete this._handlers[T]}setHandlerFallback(T){this._handlerFb=T}reset(){if(this._active.length)for(let T=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;T>=0;--T)this._active[T].unhook(!1);this._stack.paused=!1,this._active=b,this._ident=0}hook(T,E){if(this.reset(),this._ident=T,this._active=this._handlers[T]||b,this._active.length)for(let S=this._active.length-1;S>=0;S--)this._active[S].hook(E);else this._handlerFb(this._ident,"HOOK",E)}put(T,E,S){if(this._active.length)for(let v=this._active.length-1;v>=0;v--)this._active[v].put(T,E,S);else this._handlerFb(this._ident,"PUT",(0,h.utf32ToString)(T,E,S))}unhook(T,E=!0){if(this._active.length){let S=!1,v=this._active.length-1,_=!1;if(this._stack.paused&&(v=this._stack.loopPosition-1,S=E,_=this._stack.fallThrough,this._stack.paused=!1),!_&&S===!1){for(;v>=0&&(S=this._active[v].unhook(T),S!==!0);v--)if(S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!1,S;v--}for(;v>=0;v--)if(S=this._active[v].unhook(!1),S instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=v,this._stack.fallThrough=!0,S}else this._handlerFb(this._ident,"UNHOOK",T);this._active=b,this._ident=0}};const C=new p.Params;C.addParam(0),o.DcsHandler=class{constructor(T){this._handler=T,this._data="",this._params=C,this._hitLimit=!1}hook(T){this._params=T.length>1||T.params[0]?T.clone():C,this._data="",this._hitLimit=!1}put(T,E,S){this._hitLimit||(this._data+=(0,h.utf32ToString)(T,E,S),this._data.length>u.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}unhook(T){let E=!1;if(this._hitLimit)E=!1;else if(T&&(E=this._handler(this._data,this._params),E instanceof Promise))return E.then((S=>(this._params=C,this._data="",this._hitLimit=!1,S)));return this._params=C,this._data="",this._hitLimit=!1,E}}},2015:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.EscapeSequenceParser=o.VT500_TRANSITION_TABLE=o.TransitionTable=void 0;const h=c(844),p=c(8742),u=c(6242),b=c(6351);class C{constructor(v){this.table=new Uint8Array(v)}setDefault(v,_){this.table.fill(v<<4|_)}add(v,_,y,A){this.table[_<<8|v]=y<<4|A}addMany(v,_,y,A){for(let L=0;L<v.length;L++)this.table[_<<8|v[L]]=y<<4|A}}o.TransitionTable=C;const T=160;o.VT500_TRANSITION_TABLE=(function(){const S=new C(4095),v=Array.apply(null,Array(256)).map(((R,k)=>k)),_=(R,k)=>v.slice(R,k),y=_(32,127),A=_(0,24);A.push(25),A.push.apply(A,_(28,32));const L=_(0,14);let D;for(D in S.setDefault(1,0),S.addMany(y,0,2,0),L)S.addMany([24,26,153,154],D,3,0),S.addMany(_(128,144),D,3,0),S.addMany(_(144,152),D,3,0),S.add(156,D,0,0),S.add(27,D,11,1),S.add(157,D,4,8),S.addMany([152,158,159],D,0,7),S.add(155,D,11,3),S.add(144,D,11,9);return S.addMany(A,0,3,0),S.addMany(A,1,3,1),S.add(127,1,0,1),S.addMany(A,8,0,8),S.addMany(A,3,3,3),S.add(127,3,0,3),S.addMany(A,4,3,4),S.add(127,4,0,4),S.addMany(A,6,3,6),S.addMany(A,5,3,5),S.add(127,5,0,5),S.addMany(A,2,3,2),S.add(127,2,0,2),S.add(93,1,4,8),S.addMany(y,8,5,8),S.add(127,8,5,8),S.addMany([156,27,24,26,7],8,6,0),S.addMany(_(28,32),8,0,8),S.addMany([88,94,95],1,0,7),S.addMany(y,7,0,7),S.addMany(A,7,0,7),S.add(156,7,0,0),S.add(127,7,0,7),S.add(91,1,11,3),S.addMany(_(64,127),3,7,0),S.addMany(_(48,60),3,8,4),S.addMany([60,61,62,63],3,9,4),S.addMany(_(48,60),4,8,4),S.addMany(_(64,127),4,7,0),S.addMany([60,61,62,63],4,0,6),S.addMany(_(32,64),6,0,6),S.add(127,6,0,6),S.addMany(_(64,127),6,0,0),S.addMany(_(32,48),3,9,5),S.addMany(_(32,48),5,9,5),S.addMany(_(48,64),5,0,6),S.addMany(_(64,127),5,7,0),S.addMany(_(32,48),4,9,5),S.addMany(_(32,48),1,9,2),S.addMany(_(32,48),2,9,2),S.addMany(_(48,127),2,10,0),S.addMany(_(48,80),1,10,0),S.addMany(_(81,88),1,10,0),S.addMany([89,90,92],1,10,0),S.addMany(_(96,127),1,10,0),S.add(80,1,11,9),S.addMany(A,9,0,9),S.add(127,9,0,9),S.addMany(_(28,32),9,0,9),S.addMany(_(32,48),9,9,12),S.addMany(_(48,60),9,8,10),S.addMany([60,61,62,63],9,9,10),S.addMany(A,11,0,11),S.addMany(_(32,128),11,0,11),S.addMany(_(28,32),11,0,11),S.addMany(A,10,0,10),S.add(127,10,0,10),S.addMany(_(28,32),10,0,10),S.addMany(_(48,60),10,8,10),S.addMany([60,61,62,63],10,0,11),S.addMany(_(32,48),10,9,12),S.addMany(A,12,0,12),S.add(127,12,0,12),S.addMany(_(28,32),12,0,12),S.addMany(_(32,48),12,9,12),S.addMany(_(48,64),12,0,11),S.addMany(_(64,127),12,12,13),S.addMany(_(64,127),10,12,13),S.addMany(_(64,127),9,12,13),S.addMany(A,13,13,13),S.addMany(y,13,13,13),S.add(127,13,0,13),S.addMany([27,156,24,26],13,14,0),S.add(T,0,2,0),S.add(T,8,5,8),S.add(T,6,0,6),S.add(T,11,0,11),S.add(T,13,13,13),S})();class E extends h.Disposable{constructor(v=o.VT500_TRANSITION_TABLE){super(),this._transitions=v,this._parseStack={state:0,handlers:[],handlerPos:0,transition:0,chunkPos:0},this.initialState=0,this.currentState=this.initialState,this._params=new p.Params,this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._printHandlerFb=(_,y,A)=>{},this._executeHandlerFb=_=>{},this._csiHandlerFb=(_,y)=>{},this._escHandlerFb=_=>{},this._errorHandlerFb=_=>_,this._printHandler=this._printHandlerFb,this._executeHandlers=Object.create(null),this._csiHandlers=Object.create(null),this._escHandlers=Object.create(null),this.register((0,h.toDisposable)((()=>{this._csiHandlers=Object.create(null),this._executeHandlers=Object.create(null),this._escHandlers=Object.create(null)}))),this._oscParser=this.register(new u.OscParser),this._dcsParser=this.register(new b.DcsParser),this._errorHandler=this._errorHandlerFb,this.registerEscHandler({final:"\\"},(()=>!0))}_identifier(v,_=[64,126]){let y=0;if(v.prefix){if(v.prefix.length>1)throw new Error("only one byte as prefix supported");if(y=v.prefix.charCodeAt(0),y&&60>y||y>63)throw new Error("prefix must be in range 0x3c .. 0x3f")}if(v.intermediates){if(v.intermediates.length>2)throw new Error("only two bytes as intermediates are supported");for(let L=0;L<v.intermediates.length;++L){const D=v.intermediates.charCodeAt(L);if(32>D||D>47)throw new Error("intermediate must be in range 0x20 .. 0x2f");y<<=8,y|=D}}if(v.final.length!==1)throw new Error("final must be a single byte");const A=v.final.charCodeAt(0);if(_[0]>A||A>_[1])throw new Error(`final must be in range ${_[0]} .. ${_[1]}`);return y<<=8,y|=A,y}identToString(v){const _=[];for(;v;)_.push(String.fromCharCode(255&v)),v>>=8;return _.reverse().join("")}setPrintHandler(v){this._printHandler=v}clearPrintHandler(){this._printHandler=this._printHandlerFb}registerEscHandler(v,_){const y=this._identifier(v,[48,126]);this._escHandlers[y]===void 0&&(this._escHandlers[y]=[]);const A=this._escHandlers[y];return A.push(_),{dispose:()=>{const L=A.indexOf(_);L!==-1&&A.splice(L,1)}}}clearEscHandler(v){this._escHandlers[this._identifier(v,[48,126])]&&delete this._escHandlers[this._identifier(v,[48,126])]}setEscHandlerFallback(v){this._escHandlerFb=v}setExecuteHandler(v,_){this._executeHandlers[v.charCodeAt(0)]=_}clearExecuteHandler(v){this._executeHandlers[v.charCodeAt(0)]&&delete this._executeHandlers[v.charCodeAt(0)]}setExecuteHandlerFallback(v){this._executeHandlerFb=v}registerCsiHandler(v,_){const y=this._identifier(v);this._csiHandlers[y]===void 0&&(this._csiHandlers[y]=[]);const A=this._csiHandlers[y];return A.push(_),{dispose:()=>{const L=A.indexOf(_);L!==-1&&A.splice(L,1)}}}clearCsiHandler(v){this._csiHandlers[this._identifier(v)]&&delete this._csiHandlers[this._identifier(v)]}setCsiHandlerFallback(v){this._csiHandlerFb=v}registerDcsHandler(v,_){return this._dcsParser.registerHandler(this._identifier(v),_)}clearDcsHandler(v){this._dcsParser.clearHandler(this._identifier(v))}setDcsHandlerFallback(v){this._dcsParser.setHandlerFallback(v)}registerOscHandler(v,_){return this._oscParser.registerHandler(v,_)}clearOscHandler(v){this._oscParser.clearHandler(v)}setOscHandlerFallback(v){this._oscParser.setHandlerFallback(v)}setErrorHandler(v){this._errorHandler=v}clearErrorHandler(){this._errorHandler=this._errorHandlerFb}reset(){this.currentState=this.initialState,this._oscParser.reset(),this._dcsParser.reset(),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0,this._parseStack.state!==0&&(this._parseStack.state=2,this._parseStack.handlers=[])}_preserveStack(v,_,y,A,L){this._parseStack.state=v,this._parseStack.handlers=_,this._parseStack.handlerPos=y,this._parseStack.transition=A,this._parseStack.chunkPos=L}parse(v,_,y){let A,L=0,D=0,R=0;if(this._parseStack.state)if(this._parseStack.state===2)this._parseStack.state=0,R=this._parseStack.chunkPos+1;else{if(y===void 0||this._parseStack.state===1)throw this._parseStack.state=1,new Error("improper continuation due to previous async handler, giving up parsing");const k=this._parseStack.handlers;let M=this._parseStack.handlerPos-1;switch(this._parseStack.state){case 3:if(y===!1&&M>-1){for(;M>=0&&(A=k[M](this._params),A!==!0);M--)if(A instanceof Promise)return this._parseStack.handlerPos=M,A}this._parseStack.handlers=[];break;case 4:if(y===!1&&M>-1){for(;M>=0&&(A=k[M](),A!==!0);M--)if(A instanceof Promise)return this._parseStack.handlerPos=M,A}this._parseStack.handlers=[];break;case 6:if(L=v[this._parseStack.chunkPos],A=this._dcsParser.unhook(L!==24&&L!==26,y),A)return A;L===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0;break;case 5:if(L=v[this._parseStack.chunkPos],A=this._oscParser.end(L!==24&&L!==26,y),A)return A;L===27&&(this._parseStack.transition|=1),this._params.reset(),this._params.addParam(0),this._collect=0}this._parseStack.state=0,R=this._parseStack.chunkPos+1,this.precedingJoinState=0,this.currentState=15&this._parseStack.transition}for(let k=R;k<_;++k){switch(L=v[k],D=this._transitions.table[this.currentState<<8|(L<160?L:T)],D>>4){case 2:for(let F=k+1;;++F){if(F>=_||(L=v[F])<32||L>126&&L<T){this._printHandler(v,k,F),k=F-1;break}if(++F>=_||(L=v[F])<32||L>126&&L<T){this._printHandler(v,k,F),k=F-1;break}if(++F>=_||(L=v[F])<32||L>126&&L<T){this._printHandler(v,k,F),k=F-1;break}if(++F>=_||(L=v[F])<32||L>126&&L<T){this._printHandler(v,k,F),k=F-1;break}}break;case 3:this._executeHandlers[L]?this._executeHandlers[L]():this._executeHandlerFb(L),this.precedingJoinState=0;break;case 0:break;case 1:if(this._errorHandler({position:k,code:L,currentState:this.currentState,collect:this._collect,params:this._params,abort:!1}).abort)return;break;case 7:const M=this._csiHandlers[this._collect<<8|L];let j=M?M.length-1:-1;for(;j>=0&&(A=M[j](this._params),A!==!0);j--)if(A instanceof Promise)return this._preserveStack(3,M,j,D,k),A;j<0&&this._csiHandlerFb(this._collect<<8|L,this._params),this.precedingJoinState=0;break;case 8:do switch(L){case 59:this._params.addParam(0);break;case 58:this._params.addSubParam(-1);break;default:this._params.addDigit(L-48)}while(++k<_&&(L=v[k])>47&&L<60);k--;break;case 9:this._collect<<=8,this._collect|=L;break;case 10:const H=this._escHandlers[this._collect<<8|L];let U=H?H.length-1:-1;for(;U>=0&&(A=H[U](),A!==!0);U--)if(A instanceof Promise)return this._preserveStack(4,H,U,D,k),A;U<0&&this._escHandlerFb(this._collect<<8|L),this.precedingJoinState=0;break;case 11:this._params.reset(),this._params.addParam(0),this._collect=0;break;case 12:this._dcsParser.hook(this._collect<<8|L,this._params);break;case 13:for(let F=k+1;;++F)if(F>=_||(L=v[F])===24||L===26||L===27||L>127&&L<T){this._dcsParser.put(v,k,F),k=F-1;break}break;case 14:if(A=this._dcsParser.unhook(L!==24&&L!==26),A)return this._preserveStack(6,[],0,D,k),A;L===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0;break;case 4:this._oscParser.start();break;case 5:for(let F=k+1;;F++)if(F>=_||(L=v[F])<32||L>127&&L<T){this._oscParser.put(v,k,F),k=F-1;break}break;case 6:if(A=this._oscParser.end(L!==24&&L!==26),A)return this._preserveStack(5,[],0,D,k),A;L===27&&(D|=1),this._params.reset(),this._params.addParam(0),this._collect=0,this.precedingJoinState=0}this.currentState=15&D}}}o.EscapeSequenceParser=E},6242:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OscHandler=o.OscParser=void 0;const h=c(5770),p=c(482),u=[];o.OscParser=class{constructor(){this._state=0,this._active=u,this._id=-1,this._handlers=Object.create(null),this._handlerFb=()=>{},this._stack={paused:!1,loopPosition:0,fallThrough:!1}}registerHandler(b,C){this._handlers[b]===void 0&&(this._handlers[b]=[]);const T=this._handlers[b];return T.push(C),{dispose:()=>{const E=T.indexOf(C);E!==-1&&T.splice(E,1)}}}clearHandler(b){this._handlers[b]&&delete this._handlers[b]}setHandlerFallback(b){this._handlerFb=b}dispose(){this._handlers=Object.create(null),this._handlerFb=()=>{},this._active=u}reset(){if(this._state===2)for(let b=this._stack.paused?this._stack.loopPosition-1:this._active.length-1;b>=0;--b)this._active[b].end(!1);this._stack.paused=!1,this._active=u,this._id=-1,this._state=0}_start(){if(this._active=this._handlers[this._id]||u,this._active.length)for(let b=this._active.length-1;b>=0;b--)this._active[b].start();else this._handlerFb(this._id,"START")}_put(b,C,T){if(this._active.length)for(let E=this._active.length-1;E>=0;E--)this._active[E].put(b,C,T);else this._handlerFb(this._id,"PUT",(0,p.utf32ToString)(b,C,T))}start(){this.reset(),this._state=1}put(b,C,T){if(this._state!==3){if(this._state===1)for(;C<T;){const E=b[C++];if(E===59){this._state=2,this._start();break}if(E<48||57<E)return void(this._state=3);this._id===-1&&(this._id=0),this._id=10*this._id+E-48}this._state===2&&T-C>0&&this._put(b,C,T)}}end(b,C=!0){if(this._state!==0){if(this._state!==3)if(this._state===1&&this._start(),this._active.length){let T=!1,E=this._active.length-1,S=!1;if(this._stack.paused&&(E=this._stack.loopPosition-1,T=C,S=this._stack.fallThrough,this._stack.paused=!1),!S&&T===!1){for(;E>=0&&(T=this._active[E].end(b),T!==!0);E--)if(T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!1,T;E--}for(;E>=0;E--)if(T=this._active[E].end(!1),T instanceof Promise)return this._stack.paused=!0,this._stack.loopPosition=E,this._stack.fallThrough=!0,T}else this._handlerFb(this._id,"END",b);this._active=u,this._id=-1,this._state=0}}},o.OscHandler=class{constructor(b){this._handler=b,this._data="",this._hitLimit=!1}start(){this._data="",this._hitLimit=!1}put(b,C,T){this._hitLimit||(this._data+=(0,p.utf32ToString)(b,C,T),this._data.length>h.PAYLOAD_LIMIT&&(this._data="",this._hitLimit=!0))}end(b){let C=!1;if(this._hitLimit)C=!1;else if(b&&(C=this._handler(this._data),C instanceof Promise))return C.then((T=>(this._data="",this._hitLimit=!1,T)));return this._data="",this._hitLimit=!1,C}}},8742:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.Params=void 0;const c=2147483647;class h{static fromArray(u){const b=new h;if(!u.length)return b;for(let C=Array.isArray(u[0])?1:0;C<u.length;++C){const T=u[C];if(Array.isArray(T))for(let E=0;E<T.length;++E)b.addSubParam(T[E]);else b.addParam(T)}return b}constructor(u=32,b=32){if(this.maxLength=u,this.maxSubParamsLength=b,b>256)throw new Error("maxSubParamsLength must not be greater than 256");this.params=new Int32Array(u),this.length=0,this._subParams=new Int32Array(b),this._subParamsLength=0,this._subParamsIdx=new Uint16Array(u),this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}clone(){const u=new h(this.maxLength,this.maxSubParamsLength);return u.params.set(this.params),u.length=this.length,u._subParams.set(this._subParams),u._subParamsLength=this._subParamsLength,u._subParamsIdx.set(this._subParamsIdx),u._rejectDigits=this._rejectDigits,u._rejectSubDigits=this._rejectSubDigits,u._digitIsSub=this._digitIsSub,u}toArray(){const u=[];for(let b=0;b<this.length;++b){u.push(this.params[b]);const C=this._subParamsIdx[b]>>8,T=255&this._subParamsIdx[b];T-C>0&&u.push(Array.prototype.slice.call(this._subParams,C,T))}return u}reset(){this.length=0,this._subParamsLength=0,this._rejectDigits=!1,this._rejectSubDigits=!1,this._digitIsSub=!1}addParam(u){if(this._digitIsSub=!1,this.length>=this.maxLength)this._rejectDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParamsIdx[this.length]=this._subParamsLength<<8|this._subParamsLength,this.params[this.length++]=u>c?c:u}}addSubParam(u){if(this._digitIsSub=!0,this.length)if(this._rejectDigits||this._subParamsLength>=this.maxSubParamsLength)this._rejectSubDigits=!0;else{if(u<-1)throw new Error("values lesser than -1 are not allowed");this._subParams[this._subParamsLength++]=u>c?c:u,this._subParamsIdx[this.length-1]++}}hasSubParams(u){return(255&this._subParamsIdx[u])-(this._subParamsIdx[u]>>8)>0}getSubParams(u){const b=this._subParamsIdx[u]>>8,C=255&this._subParamsIdx[u];return C-b>0?this._subParams.subarray(b,C):null}getSubParamsAll(){const u={};for(let b=0;b<this.length;++b){const C=this._subParamsIdx[b]>>8,T=255&this._subParamsIdx[b];T-C>0&&(u[b]=this._subParams.slice(C,T))}return u}addDigit(u){let b;if(this._rejectDigits||!(b=this._digitIsSub?this._subParamsLength:this.length)||this._digitIsSub&&this._rejectSubDigits)return;const C=this._digitIsSub?this._subParams:this.params,T=C[b-1];C[b-1]=~T?Math.min(10*T+u,c):u}}o.Params=h},5741:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.AddonManager=void 0,o.AddonManager=class{constructor(){this._addons=[]}dispose(){for(let c=this._addons.length-1;c>=0;c--)this._addons[c].instance.dispose()}loadAddon(c,h){const p={instance:h,dispose:h.dispose,isDisposed:!1};this._addons.push(p),h.dispose=()=>this._wrappedAddonDispose(p),h.activate(c)}_wrappedAddonDispose(c){if(c.isDisposed)return;let h=-1;for(let p=0;p<this._addons.length;p++)if(this._addons[p]===c){h=p;break}if(h===-1)throw new Error("Could not dispose an addon that has not been loaded");c.isDisposed=!0,c.dispose.apply(c.instance),this._addons.splice(h,1)}}},8771:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferApiView=void 0;const h=c(3785),p=c(511);o.BufferApiView=class{constructor(u,b){this._buffer=u,this.type=b}init(u){return this._buffer=u,this}get cursorY(){return this._buffer.y}get cursorX(){return this._buffer.x}get viewportY(){return this._buffer.ydisp}get baseY(){return this._buffer.ybase}get length(){return this._buffer.lines.length}getLine(u){const b=this._buffer.lines.get(u);if(b)return new h.BufferLineApiView(b)}getNullCell(){return new p.CellData}}},3785:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferLineApiView=void 0;const h=c(511);o.BufferLineApiView=class{constructor(p){this._line=p}get isWrapped(){return this._line.isWrapped}get length(){return this._line.length}getCell(p,u){if(!(p<0||p>=this._line.length))return u?(this._line.loadCell(p,u),u):this._line.loadCell(p,new h.CellData)}translateToString(p,u,b){return this._line.translateToString(p,u,b)}}},8285:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.BufferNamespaceApi=void 0;const h=c(8771),p=c(8460),u=c(844);class b extends u.Disposable{constructor(T){super(),this._core=T,this._onBufferChange=this.register(new p.EventEmitter),this.onBufferChange=this._onBufferChange.event,this._normal=new h.BufferApiView(this._core.buffers.normal,"normal"),this._alternate=new h.BufferApiView(this._core.buffers.alt,"alternate"),this._core.buffers.onBufferActivate((()=>this._onBufferChange.fire(this.active)))}get active(){if(this._core.buffers.active===this._core.buffers.normal)return this.normal;if(this._core.buffers.active===this._core.buffers.alt)return this.alternate;throw new Error("Active buffer is neither normal nor alternate")}get normal(){return this._normal.init(this._core.buffers.normal)}get alternate(){return this._alternate.init(this._core.buffers.alt)}}o.BufferNamespaceApi=b},7975:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.ParserApi=void 0,o.ParserApi=class{constructor(c){this._core=c}registerCsiHandler(c,h){return this._core.registerCsiHandler(c,(p=>h(p.toArray())))}addCsiHandler(c,h){return this.registerCsiHandler(c,h)}registerDcsHandler(c,h){return this._core.registerDcsHandler(c,((p,u)=>h(p,u.toArray())))}addDcsHandler(c,h){return this.registerDcsHandler(c,h)}registerEscHandler(c,h){return this._core.registerEscHandler(c,h)}addEscHandler(c,h){return this.registerEscHandler(c,h)}registerOscHandler(c,h){return this._core.registerOscHandler(c,h)}addOscHandler(c,h){return this.registerOscHandler(c,h)}}},7090:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeApi=void 0,o.UnicodeApi=class{constructor(c){this._core=c}register(c){this._core.unicodeService.register(c)}get versions(){return this._core.unicodeService.versions}get activeVersion(){return this._core.unicodeService.activeVersion}set activeVersion(c){this._core.unicodeService.activeVersion=c}}},744:function(f,o,c){var h=this&&this.__decorate||function(S,v,_,y){var A,L=arguments.length,D=L<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,_):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,v,_,y);else for(var R=S.length-1;R>=0;R--)(A=S[R])&&(D=(L<3?A(D):L>3?A(v,_,D):A(v,_))||D);return L>3&&D&&Object.defineProperty(v,_,D),D},p=this&&this.__param||function(S,v){return function(_,y){v(_,y,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.BufferService=o.MINIMUM_ROWS=o.MINIMUM_COLS=void 0;const u=c(8460),b=c(844),C=c(5295),T=c(2585);o.MINIMUM_COLS=2,o.MINIMUM_ROWS=1;let E=o.BufferService=class extends b.Disposable{get buffer(){return this.buffers.active}constructor(S){super(),this.isUserScrolling=!1,this._onResize=this.register(new u.EventEmitter),this.onResize=this._onResize.event,this._onScroll=this.register(new u.EventEmitter),this.onScroll=this._onScroll.event,this.cols=Math.max(S.rawOptions.cols||0,o.MINIMUM_COLS),this.rows=Math.max(S.rawOptions.rows||0,o.MINIMUM_ROWS),this.buffers=this.register(new C.BufferSet(S,this))}resize(S,v){this.cols=S,this.rows=v,this.buffers.resize(S,v),this._onResize.fire({cols:S,rows:v})}reset(){this.buffers.reset(),this.isUserScrolling=!1}scroll(S,v=!1){const _=this.buffer;let y;y=this._cachedBlankLine,y&&y.length===this.cols&&y.getFg(0)===S.fg&&y.getBg(0)===S.bg||(y=_.getBlankLine(S,v),this._cachedBlankLine=y),y.isWrapped=v;const A=_.ybase+_.scrollTop,L=_.ybase+_.scrollBottom;if(_.scrollTop===0){const D=_.lines.isFull;L===_.lines.length-1?D?_.lines.recycle().copyFrom(y):_.lines.push(y.clone()):_.lines.splice(L+1,0,y.clone()),D?this.isUserScrolling&&(_.ydisp=Math.max(_.ydisp-1,0)):(_.ybase++,this.isUserScrolling||_.ydisp++)}else{const D=L-A+1;_.lines.shiftElements(A+1,D-1,-1),_.lines.set(L,y.clone())}this.isUserScrolling||(_.ydisp=_.ybase),this._onScroll.fire(_.ydisp)}scrollLines(S,v,_){const y=this.buffer;if(S<0){if(y.ydisp===0)return;this.isUserScrolling=!0}else S+y.ydisp>=y.ybase&&(this.isUserScrolling=!1);const A=y.ydisp;y.ydisp=Math.max(Math.min(y.ydisp+S,y.ybase),0),A!==y.ydisp&&(v||this._onScroll.fire(y.ydisp))}};o.BufferService=E=h([p(0,T.IOptionsService)],E)},7994:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.CharsetService=void 0,o.CharsetService=class{constructor(){this.glevel=0,this._charsets=[]}reset(){this.charset=void 0,this._charsets=[],this.glevel=0}setgLevel(c){this.glevel=c,this.charset=this._charsets[c]}setgCharset(c,h){this._charsets[c]=h,this.glevel===c&&(this.charset=h)}}},1753:function(f,o,c){var h=this&&this.__decorate||function(y,A,L,D){var R,k=arguments.length,M=k<3?A:D===null?D=Object.getOwnPropertyDescriptor(A,L):D;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")M=Reflect.decorate(y,A,L,D);else for(var j=y.length-1;j>=0;j--)(R=y[j])&&(M=(k<3?R(M):k>3?R(A,L,M):R(A,L))||M);return k>3&&M&&Object.defineProperty(A,L,M),M},p=this&&this.__param||function(y,A){return function(L,D){A(L,D,y)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreMouseService=void 0;const u=c(2585),b=c(8460),C=c(844),T={NONE:{events:0,restrict:()=>!1},X10:{events:1,restrict:y=>y.button!==4&&y.action===1&&(y.ctrl=!1,y.alt=!1,y.shift=!1,!0)},VT200:{events:19,restrict:y=>y.action!==32},DRAG:{events:23,restrict:y=>y.action!==32||y.button!==3},ANY:{events:31,restrict:y=>!0}};function E(y,A){let L=(y.ctrl?16:0)|(y.shift?4:0)|(y.alt?8:0);return y.button===4?(L|=64,L|=y.action):(L|=3&y.button,4&y.button&&(L|=64),8&y.button&&(L|=128),y.action===32?L|=32:y.action!==0||A||(L|=3)),L}const S=String.fromCharCode,v={DEFAULT:y=>{const A=[E(y,!1)+32,y.col+32,y.row+32];return A[0]>255||A[1]>255||A[2]>255?"":`\x1B[M${S(A[0])}${S(A[1])}${S(A[2])}`},SGR:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${E(y,!0)};${y.col};${y.row}${A}`},SGR_PIXELS:y=>{const A=y.action===0&&y.button!==4?"m":"M";return`\x1B[<${E(y,!0)};${y.x};${y.y}${A}`}};let _=o.CoreMouseService=class extends C.Disposable{constructor(y,A){super(),this._bufferService=y,this._coreService=A,this._protocols={},this._encodings={},this._activeProtocol="",this._activeEncoding="",this._lastEvent=null,this._onProtocolChange=this.register(new b.EventEmitter),this.onProtocolChange=this._onProtocolChange.event;for(const L of Object.keys(T))this.addProtocol(L,T[L]);for(const L of Object.keys(v))this.addEncoding(L,v[L]);this.reset()}addProtocol(y,A){this._protocols[y]=A}addEncoding(y,A){this._encodings[y]=A}get activeProtocol(){return this._activeProtocol}get areMouseEventsActive(){return this._protocols[this._activeProtocol].events!==0}set activeProtocol(y){if(!this._protocols[y])throw new Error(`unknown protocol "${y}"`);this._activeProtocol=y,this._onProtocolChange.fire(this._protocols[y].events)}get activeEncoding(){return this._activeEncoding}set activeEncoding(y){if(!this._encodings[y])throw new Error(`unknown encoding "${y}"`);this._activeEncoding=y}reset(){this.activeProtocol="NONE",this.activeEncoding="DEFAULT",this._lastEvent=null}triggerMouseEvent(y){if(y.col<0||y.col>=this._bufferService.cols||y.row<0||y.row>=this._bufferService.rows||y.button===4&&y.action===32||y.button===3&&y.action!==32||y.button!==4&&(y.action===2||y.action===3)||(y.col++,y.row++,y.action===32&&this._lastEvent&&this._equalEvents(this._lastEvent,y,this._activeEncoding==="SGR_PIXELS"))||!this._protocols[this._activeProtocol].restrict(y))return!1;const A=this._encodings[this._activeEncoding](y);return A&&(this._activeEncoding==="DEFAULT"?this._coreService.triggerBinaryEvent(A):this._coreService.triggerDataEvent(A,!0)),this._lastEvent=y,!0}explainEvents(y){return{down:!!(1&y),up:!!(2&y),drag:!!(4&y),move:!!(8&y),wheel:!!(16&y)}}_equalEvents(y,A,L){if(L){if(y.x!==A.x||y.y!==A.y)return!1}else if(y.col!==A.col||y.row!==A.row)return!1;return y.button===A.button&&y.action===A.action&&y.ctrl===A.ctrl&&y.alt===A.alt&&y.shift===A.shift}};o.CoreMouseService=_=h([p(0,u.IBufferService),p(1,u.ICoreService)],_)},6975:function(f,o,c){var h=this&&this.__decorate||function(_,y,A,L){var D,R=arguments.length,k=R<3?y:L===null?L=Object.getOwnPropertyDescriptor(y,A):L;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")k=Reflect.decorate(_,y,A,L);else for(var M=_.length-1;M>=0;M--)(D=_[M])&&(k=(R<3?D(k):R>3?D(y,A,k):D(y,A))||k);return R>3&&k&&Object.defineProperty(y,A,k),k},p=this&&this.__param||function(_,y){return function(A,L){y(A,L,_)}};Object.defineProperty(o,"__esModule",{value:!0}),o.CoreService=void 0;const u=c(1439),b=c(8460),C=c(844),T=c(2585),E=Object.freeze({insertMode:!1}),S=Object.freeze({applicationCursorKeys:!1,applicationKeypad:!1,bracketedPasteMode:!1,origin:!1,reverseWraparound:!1,sendFocus:!1,wraparound:!0});let v=o.CoreService=class extends C.Disposable{constructor(_,y,A){super(),this._bufferService=_,this._logService=y,this._optionsService=A,this.isCursorInitialized=!1,this.isCursorHidden=!1,this._onData=this.register(new b.EventEmitter),this.onData=this._onData.event,this._onUserInput=this.register(new b.EventEmitter),this.onUserInput=this._onUserInput.event,this._onBinary=this.register(new b.EventEmitter),this.onBinary=this._onBinary.event,this._onRequestScrollToBottom=this.register(new b.EventEmitter),this.onRequestScrollToBottom=this._onRequestScrollToBottom.event,this.modes=(0,u.clone)(E),this.decPrivateModes=(0,u.clone)(S)}reset(){this.modes=(0,u.clone)(E),this.decPrivateModes=(0,u.clone)(S)}triggerDataEvent(_,y=!1){if(this._optionsService.rawOptions.disableStdin)return;const A=this._bufferService.buffer;y&&this._optionsService.rawOptions.scrollOnUserInput&&A.ybase!==A.ydisp&&this._onRequestScrollToBottom.fire(),y&&this._onUserInput.fire(),this._logService.debug(`sending data "${_}"`,(()=>_.split("").map((L=>L.charCodeAt(0))))),this._onData.fire(_)}triggerBinaryEvent(_){this._optionsService.rawOptions.disableStdin||(this._logService.debug(`sending binary "${_}"`,(()=>_.split("").map((y=>y.charCodeAt(0))))),this._onBinary.fire(_))}};o.CoreService=v=h([p(0,T.IBufferService),p(1,T.ILogService),p(2,T.IOptionsService)],v)},9074:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.DecorationService=void 0;const h=c(8055),p=c(8460),u=c(844),b=c(6106);let C=0,T=0;class E extends u.Disposable{get decorations(){return this._decorations.values()}constructor(){super(),this._decorations=new b.SortedList((_=>_==null?void 0:_.marker.line)),this._onDecorationRegistered=this.register(new p.EventEmitter),this.onDecorationRegistered=this._onDecorationRegistered.event,this._onDecorationRemoved=this.register(new p.EventEmitter),this.onDecorationRemoved=this._onDecorationRemoved.event,this.register((0,u.toDisposable)((()=>this.reset())))}registerDecoration(_){if(_.marker.isDisposed)return;const y=new S(_);if(y){const A=y.marker.onDispose((()=>y.dispose()));y.onDispose((()=>{y&&(this._decorations.delete(y)&&this._onDecorationRemoved.fire(y),A.dispose())})),this._decorations.insert(y),this._onDecorationRegistered.fire(y)}return y}reset(){for(const _ of this._decorations.values())_.dispose();this._decorations.clear()}*getDecorationsAtCell(_,y,A){let L=0,D=0;for(const R of this._decorations.getKeyIterator(y))L=R.options.x??0,D=L+(R.options.width??1),_>=L&&_<D&&(!A||(R.options.layer??"bottom")===A)&&(yield R)}forEachDecorationAtCell(_,y,A,L){this._decorations.forEachByKey(y,(D=>{C=D.options.x??0,T=C+(D.options.width??1),_>=C&&_<T&&(!A||(D.options.layer??"bottom")===A)&&L(D)}))}}o.DecorationService=E;class S extends u.Disposable{get isDisposed(){return this._isDisposed}get backgroundColorRGB(){return this._cachedBg===null&&(this.options.backgroundColor?this._cachedBg=h.css.toColor(this.options.backgroundColor):this._cachedBg=void 0),this._cachedBg}get foregroundColorRGB(){return this._cachedFg===null&&(this.options.foregroundColor?this._cachedFg=h.css.toColor(this.options.foregroundColor):this._cachedFg=void 0),this._cachedFg}constructor(_){super(),this.options=_,this.onRenderEmitter=this.register(new p.EventEmitter),this.onRender=this.onRenderEmitter.event,this._onDispose=this.register(new p.EventEmitter),this.onDispose=this._onDispose.event,this._cachedBg=null,this._cachedFg=null,this.marker=_.marker,this.options.overviewRulerOptions&&!this.options.overviewRulerOptions.position&&(this.options.overviewRulerOptions.position="full")}dispose(){this._onDispose.fire(),super.dispose()}}},4348:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.InstantiationService=o.ServiceCollection=void 0;const h=c(2585),p=c(8343);class u{constructor(...C){this._entries=new Map;for(const[T,E]of C)this.set(T,E)}set(C,T){const E=this._entries.get(C);return this._entries.set(C,T),E}forEach(C){for(const[T,E]of this._entries.entries())C(T,E)}has(C){return this._entries.has(C)}get(C){return this._entries.get(C)}}o.ServiceCollection=u,o.InstantiationService=class{constructor(){this._services=new u,this._services.set(h.IInstantiationService,this)}setService(b,C){this._services.set(b,C)}getService(b){return this._services.get(b)}createInstance(b,...C){const T=(0,p.getServiceDependencies)(b).sort(((v,_)=>v.index-_.index)),E=[];for(const v of T){const _=this._services.get(v.id);if(!_)throw new Error(`[createInstance] ${b.name} depends on UNKNOWN service ${v.id}.`);E.push(_)}const S=T.length>0?T[0].index:C.length;if(C.length!==S)throw new Error(`[createInstance] First service dependency of ${b.name} at position ${S+1} conflicts with ${C.length} static arguments`);return new b(...C,...E)}}},7866:function(f,o,c){var h=this&&this.__decorate||function(S,v,_,y){var A,L=arguments.length,D=L<3?v:y===null?y=Object.getOwnPropertyDescriptor(v,_):y;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")D=Reflect.decorate(S,v,_,y);else for(var R=S.length-1;R>=0;R--)(A=S[R])&&(D=(L<3?A(D):L>3?A(v,_,D):A(v,_))||D);return L>3&&D&&Object.defineProperty(v,_,D),D},p=this&&this.__param||function(S,v){return function(_,y){v(_,y,S)}};Object.defineProperty(o,"__esModule",{value:!0}),o.traceCall=o.setTraceLogger=o.LogService=void 0;const u=c(844),b=c(2585),C={trace:b.LogLevelEnum.TRACE,debug:b.LogLevelEnum.DEBUG,info:b.LogLevelEnum.INFO,warn:b.LogLevelEnum.WARN,error:b.LogLevelEnum.ERROR,off:b.LogLevelEnum.OFF};let T,E=o.LogService=class extends u.Disposable{get logLevel(){return this._logLevel}constructor(S){super(),this._optionsService=S,this._logLevel=b.LogLevelEnum.OFF,this._updateLogLevel(),this.register(this._optionsService.onSpecificOptionChange("logLevel",(()=>this._updateLogLevel()))),T=this}_updateLogLevel(){this._logLevel=C[this._optionsService.rawOptions.logLevel]}_evalLazyOptionalParams(S){for(let v=0;v<S.length;v++)typeof S[v]=="function"&&(S[v]=S[v]())}_log(S,v,_){this._evalLazyOptionalParams(_),S.call(console,(this._optionsService.options.logger?"":"xterm.js: ")+v,..._)}trace(S,...v){var _;this._logLevel<=b.LogLevelEnum.TRACE&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.trace.bind(this._optionsService.options.logger))??console.log,S,v)}debug(S,...v){var _;this._logLevel<=b.LogLevelEnum.DEBUG&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.debug.bind(this._optionsService.options.logger))??console.log,S,v)}info(S,...v){var _;this._logLevel<=b.LogLevelEnum.INFO&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.info.bind(this._optionsService.options.logger))??console.info,S,v)}warn(S,...v){var _;this._logLevel<=b.LogLevelEnum.WARN&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.warn.bind(this._optionsService.options.logger))??console.warn,S,v)}error(S,...v){var _;this._logLevel<=b.LogLevelEnum.ERROR&&this._log(((_=this._optionsService.options.logger)==null?void 0:_.error.bind(this._optionsService.options.logger))??console.error,S,v)}};o.LogService=E=h([p(0,b.IOptionsService)],E),o.setTraceLogger=function(S){T=S},o.traceCall=function(S,v,_){if(typeof _.value!="function")throw new Error("not supported");const y=_.value;_.value=function(...A){if(T.logLevel!==b.LogLevelEnum.TRACE)return y.apply(this,A);T.trace(`GlyphRenderer#${y.name}(${A.map((D=>JSON.stringify(D))).join(", ")})`);const L=y.apply(this,A);return T.trace(`GlyphRenderer#${y.name} return`,L),L}}},7302:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.OptionsService=o.DEFAULT_OPTIONS=void 0;const h=c(8460),p=c(844),u=c(6114);o.DEFAULT_OPTIONS={cols:80,rows:24,cursorBlink:!1,cursorStyle:"block",cursorWidth:1,cursorInactiveStyle:"outline",customGlyphs:!0,drawBoldTextInBrightColors:!0,documentOverride:null,fastScrollModifier:"alt",fastScrollSensitivity:5,fontFamily:"courier-new, courier, monospace",fontSize:15,fontWeight:"normal",fontWeightBold:"bold",ignoreBracketedPasteMode:!1,lineHeight:1,letterSpacing:0,linkHandler:null,logLevel:"info",logger:null,scrollback:1e3,scrollOnUserInput:!0,scrollSensitivity:1,screenReaderMode:!1,smoothScrollDuration:0,macOptionIsMeta:!1,macOptionClickForcesSelection:!1,minimumContrastRatio:1,disableStdin:!1,allowProposedApi:!1,allowTransparency:!1,tabStopWidth:8,theme:{},rescaleOverlappingGlyphs:!1,rightClickSelectsWord:u.isMac,windowOptions:{},windowsMode:!1,windowsPty:{},wordSeparator:" ()[]{}',\"`",altClickMovesCursor:!0,convertEol:!1,termName:"xterm",cancelEvents:!1,overviewRulerWidth:0};const b=["normal","bold","100","200","300","400","500","600","700","800","900"];class C extends p.Disposable{constructor(E){super(),this._onOptionChange=this.register(new h.EventEmitter),this.onOptionChange=this._onOptionChange.event;const S={...o.DEFAULT_OPTIONS};for(const v in E)if(v in S)try{const _=E[v];S[v]=this._sanitizeAndValidateOption(v,_)}catch(_){console.error(_)}this.rawOptions=S,this.options={...S},this._setupOptions(),this.register((0,p.toDisposable)((()=>{this.rawOptions.linkHandler=null,this.rawOptions.documentOverride=null})))}onSpecificOptionChange(E,S){return this.onOptionChange((v=>{v===E&&S(this.rawOptions[E])}))}onMultipleOptionChange(E,S){return this.onOptionChange((v=>{E.indexOf(v)!==-1&&S()}))}_setupOptions(){const E=v=>{if(!(v in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);return this.rawOptions[v]},S=(v,_)=>{if(!(v in o.DEFAULT_OPTIONS))throw new Error(`No option with key "${v}"`);_=this._sanitizeAndValidateOption(v,_),this.rawOptions[v]!==_&&(this.rawOptions[v]=_,this._onOptionChange.fire(v))};for(const v in this.rawOptions){const _={get:E.bind(this,v),set:S.bind(this,v)};Object.defineProperty(this.options,v,_)}}_sanitizeAndValidateOption(E,S){switch(E){case"cursorStyle":if(S||(S=o.DEFAULT_OPTIONS[E]),!(function(v){return v==="block"||v==="underline"||v==="bar"})(S))throw new Error(`"${S}" is not a valid value for ${E}`);break;case"wordSeparator":S||(S=o.DEFAULT_OPTIONS[E]);break;case"fontWeight":case"fontWeightBold":if(typeof S=="number"&&1<=S&&S<=1e3)break;S=b.includes(S)?S:o.DEFAULT_OPTIONS[E];break;case"cursorWidth":S=Math.floor(S);case"lineHeight":case"tabStopWidth":if(S<1)throw new Error(`${E} cannot be less than 1, value: ${S}`);break;case"minimumContrastRatio":S=Math.max(1,Math.min(21,Math.round(10*S)/10));break;case"scrollback":if((S=Math.min(S,4294967295))<0)throw new Error(`${E} cannot be less than 0, value: ${S}`);break;case"fastScrollSensitivity":case"scrollSensitivity":if(S<=0)throw new Error(`${E} cannot be less than or equal to 0, value: ${S}`);break;case"rows":case"cols":if(!S&&S!==0)throw new Error(`${E} must be numeric, value: ${S}`);break;case"windowsPty":S=S??{}}return S}}o.OptionsService=C},2660:function(f,o,c){var h=this&&this.__decorate||function(C,T,E,S){var v,_=arguments.length,y=_<3?T:S===null?S=Object.getOwnPropertyDescriptor(T,E):S;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")y=Reflect.decorate(C,T,E,S);else for(var A=C.length-1;A>=0;A--)(v=C[A])&&(y=(_<3?v(y):_>3?v(T,E,y):v(T,E))||y);return _>3&&y&&Object.defineProperty(T,E,y),y},p=this&&this.__param||function(C,T){return function(E,S){T(E,S,C)}};Object.defineProperty(o,"__esModule",{value:!0}),o.OscLinkService=void 0;const u=c(2585);let b=o.OscLinkService=class{constructor(C){this._bufferService=C,this._nextId=1,this._entriesWithId=new Map,this._dataByLinkId=new Map}registerLink(C){const T=this._bufferService.buffer;if(C.id===void 0){const A=T.addMarker(T.ybase+T.y),L={data:C,id:this._nextId++,lines:[A]};return A.onDispose((()=>this._removeMarkerFromLink(L,A))),this._dataByLinkId.set(L.id,L),L.id}const E=C,S=this._getEntryIdKey(E),v=this._entriesWithId.get(S);if(v)return this.addLineToLink(v.id,T.ybase+T.y),v.id;const _=T.addMarker(T.ybase+T.y),y={id:this._nextId++,key:this._getEntryIdKey(E),data:E,lines:[_]};return _.onDispose((()=>this._removeMarkerFromLink(y,_))),this._entriesWithId.set(y.key,y),this._dataByLinkId.set(y.id,y),y.id}addLineToLink(C,T){const E=this._dataByLinkId.get(C);if(E&&E.lines.every((S=>S.line!==T))){const S=this._bufferService.buffer.addMarker(T);E.lines.push(S),S.onDispose((()=>this._removeMarkerFromLink(E,S)))}}getLinkData(C){var T;return(T=this._dataByLinkId.get(C))==null?void 0:T.data}_getEntryIdKey(C){return`${C.id};;${C.uri}`}_removeMarkerFromLink(C,T){const E=C.lines.indexOf(T);E!==-1&&(C.lines.splice(E,1),C.lines.length===0&&(C.data.id!==void 0&&this._entriesWithId.delete(C.key),this._dataByLinkId.delete(C.id)))}};o.OscLinkService=b=h([p(0,u.IBufferService)],b)},8343:(f,o)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.createDecorator=o.getServiceDependencies=o.serviceRegistry=void 0;const c="di$target",h="di$dependencies";o.serviceRegistry=new Map,o.getServiceDependencies=function(p){return p[h]||[]},o.createDecorator=function(p){if(o.serviceRegistry.has(p))return o.serviceRegistry.get(p);const u=function(b,C,T){if(arguments.length!==3)throw new Error("@IServiceName-decorator can only be used to decorate a parameter");(function(E,S,v){S[c]===S?S[h].push({id:E,index:v}):(S[h]=[{id:E,index:v}],S[c]=S)})(u,b,T)};return u.toString=()=>p,o.serviceRegistry.set(p,u),u}},2585:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.IDecorationService=o.IUnicodeService=o.IOscLinkService=o.IOptionsService=o.ILogService=o.LogLevelEnum=o.IInstantiationService=o.ICharsetService=o.ICoreService=o.ICoreMouseService=o.IBufferService=void 0;const h=c(8343);var p;o.IBufferService=(0,h.createDecorator)("BufferService"),o.ICoreMouseService=(0,h.createDecorator)("CoreMouseService"),o.ICoreService=(0,h.createDecorator)("CoreService"),o.ICharsetService=(0,h.createDecorator)("CharsetService"),o.IInstantiationService=(0,h.createDecorator)("InstantiationService"),(function(u){u[u.TRACE=0]="TRACE",u[u.DEBUG=1]="DEBUG",u[u.INFO=2]="INFO",u[u.WARN=3]="WARN",u[u.ERROR=4]="ERROR",u[u.OFF=5]="OFF"})(p||(o.LogLevelEnum=p={})),o.ILogService=(0,h.createDecorator)("LogService"),o.IOptionsService=(0,h.createDecorator)("OptionsService"),o.IOscLinkService=(0,h.createDecorator)("OscLinkService"),o.IUnicodeService=(0,h.createDecorator)("UnicodeService"),o.IDecorationService=(0,h.createDecorator)("DecorationService")},1480:(f,o,c)=>{Object.defineProperty(o,"__esModule",{value:!0}),o.UnicodeService=void 0;const h=c(8460),p=c(225);class u{static extractShouldJoin(C){return(1&C)!=0}static extractWidth(C){return C>>1&3}static extractCharKind(C){return C>>3}static createPropertyValue(C,T,E=!1){return(16777215&C)<<3|(3&T)<<1|(E?1:0)}constructor(){this._providers=Object.create(null),this._active="",this._onChange=new h.EventEmitter,this.onChange=this._onChange.event;const C=new p.UnicodeV6;this.register(C),this._active=C.version,this._activeProvider=C}dispose(){this._onChange.dispose()}get versions(){return Object.keys(this._providers)}get activeVersion(){return this._active}set activeVersion(C){if(!this._providers[C])throw new Error(`unknown Unicode version "${C}"`);this._active=C,this._activeProvider=this._providers[C],this._onChange.fire(C)}register(C){this._providers[C.version]=C}wcwidth(C){return this._activeProvider.wcwidth(C)}getStringCellWidth(C){let T=0,E=0;const S=C.length;for(let v=0;v<S;++v){let _=C.charCodeAt(v);if(55296<=_&&_<=56319){if(++v>=S)return T+this.wcwidth(_);const L=C.charCodeAt(v);56320<=L&&L<=57343?_=1024*(_-55296)+L-56320+65536:T+=this.wcwidth(L)}const y=this.charProperties(_,E);let A=u.extractWidth(y);u.extractShouldJoin(y)&&(A-=u.extractWidth(E)),T+=A,E=y}return T}charProperties(C,T){return this._activeProvider.charProperties(C,T)}}o.UnicodeService=u}},l={};function d(f){var o=l[f];if(o!==void 0)return o.exports;var c=l[f]={exports:{}};return s[f].call(c.exports,c,c.exports,d),c.exports}var m={};return(()=>{var f=m;Object.defineProperty(f,"__esModule",{value:!0}),f.Terminal=void 0;const o=d(9042),c=d(3236),h=d(844),p=d(5741),u=d(8285),b=d(7975),C=d(7090),T=["cols","rows"];class E extends h.Disposable{constructor(v){super(),this._core=this.register(new c.Terminal(v)),this._addonManager=this.register(new p.AddonManager),this._publicOptions={...this._core.options};const _=A=>this._core.options[A],y=(A,L)=>{this._checkReadonlyOptions(A),this._core.options[A]=L};for(const A in this._core.options){const L={get:_.bind(this,A),set:y.bind(this,A)};Object.defineProperty(this._publicOptions,A,L)}}_checkReadonlyOptions(v){if(T.includes(v))throw new Error(`Option "${v}" can only be set in the constructor`)}_checkProposedApi(){if(!this._core.optionsService.rawOptions.allowProposedApi)throw new Error("You must set the allowProposedApi option to true to use proposed API")}get onBell(){return this._core.onBell}get onBinary(){return this._core.onBinary}get onCursorMove(){return this._core.onCursorMove}get onData(){return this._core.onData}get onKey(){return this._core.onKey}get onLineFeed(){return this._core.onLineFeed}get onRender(){return this._core.onRender}get onResize(){return this._core.onResize}get onScroll(){return this._core.onScroll}get onSelectionChange(){return this._core.onSelectionChange}get onTitleChange(){return this._core.onTitleChange}get onWriteParsed(){return this._core.onWriteParsed}get element(){return this._core.element}get parser(){return this._parser||(this._parser=new b.ParserApi(this._core)),this._parser}get unicode(){return this._checkProposedApi(),new C.UnicodeApi(this._core)}get textarea(){return this._core.textarea}get rows(){return this._core.rows}get cols(){return this._core.cols}get buffer(){return this._buffer||(this._buffer=this.register(new u.BufferNamespaceApi(this._core))),this._buffer}get markers(){return this._checkProposedApi(),this._core.markers}get modes(){const v=this._core.coreService.decPrivateModes;let _="none";switch(this._core.coreMouseService.activeProtocol){case"X10":_="x10";break;case"VT200":_="vt200";break;case"DRAG":_="drag";break;case"ANY":_="any"}return{applicationCursorKeysMode:v.applicationCursorKeys,applicationKeypadMode:v.applicationKeypad,bracketedPasteMode:v.bracketedPasteMode,insertMode:this._core.coreService.modes.insertMode,mouseTrackingMode:_,originMode:v.origin,reverseWraparoundMode:v.reverseWraparound,sendFocusMode:v.sendFocus,wraparoundMode:v.wraparound}}get options(){return this._publicOptions}set options(v){for(const _ in v)this._publicOptions[_]=v[_]}blur(){this._core.blur()}focus(){this._core.focus()}input(v,_=!0){this._core.input(v,_)}resize(v,_){this._verifyIntegers(v,_),this._core.resize(v,_)}open(v){this._core.open(v)}attachCustomKeyEventHandler(v){this._core.attachCustomKeyEventHandler(v)}attachCustomWheelEventHandler(v){this._core.attachCustomWheelEventHandler(v)}registerLinkProvider(v){return this._core.registerLinkProvider(v)}registerCharacterJoiner(v){return this._checkProposedApi(),this._core.registerCharacterJoiner(v)}deregisterCharacterJoiner(v){this._checkProposedApi(),this._core.deregisterCharacterJoiner(v)}registerMarker(v=0){return this._verifyIntegers(v),this._core.registerMarker(v)}registerDecoration(v){return this._checkProposedApi(),this._verifyPositiveIntegers(v.x??0,v.width??0,v.height??0),this._core.registerDecoration(v)}hasSelection(){return this._core.hasSelection()}select(v,_,y){this._verifyIntegers(v,_,y),this._core.select(v,_,y)}getSelection(){return this._core.getSelection()}getSelectionPosition(){return this._core.getSelectionPosition()}clearSelection(){this._core.clearSelection()}selectAll(){this._core.selectAll()}selectLines(v,_){this._verifyIntegers(v,_),this._core.selectLines(v,_)}dispose(){super.dispose()}scrollLines(v){this._verifyIntegers(v),this._core.scrollLines(v)}scrollPages(v){this._verifyIntegers(v),this._core.scrollPages(v)}scrollToTop(){this._core.scrollToTop()}scrollToBottom(){this._core.scrollToBottom()}scrollToLine(v){this._verifyIntegers(v),this._core.scrollToLine(v)}clear(){this._core.clear()}write(v,_){this._core.write(v,_)}writeln(v,_){this._core.write(v),this._core.write(`\r
|
|
59
|
-
`,_)}paste(v){this._core.paste(v)}refresh(v,_){this._verifyIntegers(v,_),this._core.refresh(v,_)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return o}_verifyIntegers(...v){for(const _ of v)if(_===1/0||isNaN(_)||_%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const _ of v)if(_&&(_===1/0||isNaN(_)||_%1!=0||_<0))throw new Error("This API only accepts positive integers")}}f.Terminal=E})(),m})()))})(Gu)),Gu.exports}var
|
|
60
|
-
[VCM] ${A}`),(L=c.current)==null||L.call(c,A)}});d.current=C,p.cols>=qm&&p.rows>=$m&&C.resize(p.cols,p.rows);const T=p.onData(A=>{C.sendInput(A)});let E=0,S=0,v=0;const _=()=>{E&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{E=0,h({focus:o.current})})},y=new ResizeObserver(()=>{_()});return y.observe(l.current),S=window.requestAnimationFrame(_),v=window.setTimeout(_,120),()=>{E&&window.cancelAnimationFrame(E),S&&window.cancelAnimationFrame(S),v&&window.clearTimeout(v),y.disconnect(),T.dispose(),C.close(),p.dispose(),d.current=null,f.current=null,m.current=null}},[n]),te.useEffect(()=>{if(!r)return;const p=[],u=[];return p.push(window.requestAnimationFrame(()=>{h({focus:!0}),p.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of p)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),te.useEffect(()=>{const p=()=>{o.current&&h()};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]),x.jsx("div",{className:"terminal-frame",ref:l,onMouseDown:()=>{var p;return(p=f.current)==null?void 0:p.focus()}})}const Pm=160,Fm=80,qm=20,$m=5,v1={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"},n_=[{value:"bypassPermissions",label:"bypassPermissions",description:"Bypass prompts; recommended in DevContainer worktrees"},{value:"plan",label:"plan",description:"Plan-only permission mode"},{value:"default",label:"default",description:"Claude Code default permission behavior"}],i_=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}],y1=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"}],r_=[...y1,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function Ni({status:n}){return x.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function Mh({role:n,session:r,permissionMode:s,model:l,effort:d,busy:m=!1,onPermissionModeChange:f,onModelChange:o,onEffortChange:c,onStart:h,onResume:p,onStop:u,onRestart:b,onNotifyHarnessUpdated:C}){const T=(r==null?void 0:r.status)==="running",E=!!(r!=null&&r.claudeSessionId&&!T),S=!T&&!(r!=null&&r.claudeSessionId),v=!!(r!=null&&r.harnessOutdated);return x.jsxs("div",{className:"session-controls",children:[x.jsxs("label",{className:"session-option-field permission-mode-field",children:[x.jsx("span",{children:"Permission"}),x.jsx("select",{value:s,onChange:_=>f(_.target.value),children:n_.map(_=>x.jsx("option",{value:_.value,children:_.label},_.value))})]}),x.jsxs("label",{className:"session-option-field model-field",children:[x.jsx("span",{children:"Model"}),x.jsx("select",{value:l,onChange:_=>o(_.target.value),children:i_.map(_=>x.jsx("option",{value:_.value,children:_.label},_.value))})]}),x.jsxs("label",{className:"session-option-field effort-field",children:[x.jsx("span",{children:"Effort"}),x.jsx("select",{value:d,onChange:_=>c(_.target.value),children:r_.map(_=>x.jsx("option",{value:_.value,children:_.label},_.value))})]}),x.jsxs("div",{className:"session-toolbar",children:[x.jsx("button",{type:"button",disabled:m||!S,onClick:h,children:"Start"}),x.jsx("button",{type:"button",disabled:m||!E,onClick:p,children:"Resume"}),x.jsx("button",{type:"button",disabled:m||!r,onClick:b,children:"Restart"}),x.jsx("button",{type:"button",disabled:m||!r,onClick:u,children:"Stop"})]}),v?x.jsxs("div",{className:"session-harness-notice",children:[x.jsx(Ni,{status:"outdated"}),x.jsxs("span",{children:["Harness updated",(r==null?void 0:r.harnessRevision)!==void 0&&r.harnessCurrentRevision!==void 0?` (${r.harnessRevision} -> ${r.harnessCurrentRevision})`:""]}),x.jsx("button",{type:"button",disabled:m||!T||!C,onClick:C,children:"Notify role"})]}):null]})}function S1({busy:n,effort:r,model:s,open:l,permissionMode:d,taskSlug:m,bootstrapStatus:f,engineerSession:o,status:c,onClose:h,onEffortChange:p,onModelChange:u,onPermissionModeChange:b,onEngineerResume:C,onEngineerRestart:T,onEngineerStart:E,onEngineerStop:S,onEngineerNotifyHarnessUpdated:v,onOpenRepositoryDiff:_,onReviewTaskHarness:y,onRefresh:A}){const[L,D]=te.useState(null),[R,k]=te.useState(null),[M,j]=te.useState(""),[H,U]=te.useState(!1),[F,K]=te.useState(!1),[,Y]=Hi(null),[G,W]=te.useState(null),Z=(c==null?void 0:c.files)??[],z=Z.filter(ee=>ee.kind.startsWith("agent-")),O=z.filter(ee=>Gm(ee)),N=z.filter(ee=>!Gm(ee)),$=Z.filter(ee=>ee.kind.startsWith("skill-")),I=Z.filter(ee=>ee.kind.startsWith("tool-")),re=Z.filter(ee=>ee.kind==="root-claude"||ee.kind==="gitignore"||ee.kind==="pull-request-template"),ve=!!(R&&M!==R.content);te.useEffect(()=>{l||(D(null),k(null),j(""),U(!1),Y(null))},[Z,l,L]),te.useEffect(()=>{if(!l||!L||!m)return;let ee=!1;return K(!0),Y(null),U(!1),Se.getHarnessFileContent(m,L).then(ae=>{ee||(k(ae),j(ae.content))}).catch(ae=>{ee||Y(pt(`Load harness file ${L}`,ae))}).finally(()=>{ee||K(!1)}),()=>{ee=!0}},[l,L,m]);async function pe(){if(!(!R||!R.editable||!ve||!m)){K(!0),Y(null);try{const ee=await Se.updateHarnessFileContent(m,R.path,{content:M});k(ee.file),j(ee.file.content),U(!1),A()}catch(ee){Y(pt(`Save harness file ${R.path}`,ee))}finally{K(!1)}}}function Q(){D(null),k(null),j(""),U(!1),Y(null)}async function q(ee){Y(null);try{await b1(ee),W(ee),window.setTimeout(()=>{W(ae=>ae===ee?null:ae)},1200)}catch(ae){Y(pt(`Copy harness file path ${ee}`,ae))}}return l?x.jsx(x.Fragment,{children:x.jsx("div",{className:"modal-backdrop harness-studio-backdrop",children:x.jsxs("section",{className:"harness-studio-modal",role:"dialog","aria-modal":"true","aria-label":"Harness Studio",children:[x.jsxs("header",{className:"harness-studio-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Harness Studio"}),m?null:x.jsx("p",{className:"muted",children:"Create or select a task before editing harness files."})]}),x.jsxs("div",{className:"harness-studio-header-actions",children:[x.jsx("button",{type:"button",disabled:n||!m,onClick:y,children:"Review Task Harness"}),x.jsx("button",{type:"button",disabled:n,onClick:_,children:"Review Diff"}),x.jsx("button",{type:"button",disabled:n,onClick:A,children:"Refresh"}),x.jsx("button",{type:"button",onClick:h,children:"Close"})]})]}),x.jsxs("div",{className:"harness-studio-layout",children:[x.jsx("aside",{className:L?"harness-studio-left harness-studio-left-preview":"harness-studio-left",children:L?x.jsxs("section",{className:"harness-studio-section harness-studio-file-preview",children:[x.jsxs("header",{className:"harness-studio-file-editor-header",children:[x.jsxs("div",{children:[x.jsx("h3",{children:(R==null?void 0:R.title)??"Harness File"}),x.jsx("p",{className:"muted",children:(R==null?void 0:R.path)??L})]}),x.jsxs("div",{className:"harness-studio-file-editor-actions",children:[R?x.jsx(Ni,{status:R.editable?"ok":"unknown"}):null,H?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",disabled:F||!m||!(R!=null&&R.editable)||!ve,onClick:()=>void pe(),children:"Save"}),x.jsx("button",{type:"button",disabled:F,onClick:()=>{j((R==null?void 0:R.content)??""),U(!1)},children:"Cancel"})]}):x.jsx("button",{type:"button",disabled:F||!m||!(R!=null&&R.editable),onClick:()=>U(!0),children:"Edit"}),x.jsx("button",{type:"button",onClick:Q,children:"Return"})]})]}),R!=null&&R.readonlyReason?x.jsx("p",{className:"muted",children:R.readonlyReason}):null,x.jsx("textarea",{className:H?"harness-studio-file-textarea is-editing":"harness-studio-file-textarea",value:M,spellCheck:!1,readOnly:!H,disabled:F,onChange:ee=>j(ee.target.value)})]}):x.jsxs(x.Fragment,{children:[x.jsx(Na,{title:"VCM Roles",files:O,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D}),x.jsx(Na,{title:"Auxiliary Roles",files:N,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D}),x.jsx(dh,{title:"Overview",children:x.jsxs("section",{className:"harness-studio-overview",children:[x.jsxs("div",{className:"harness-studio-metrics",children:[x.jsx(Ts,{label:"Fixed install",value:c?c.initialized?c.needsApply?"updates":"current":"new":"unknown"}),x.jsx(Ts,{label:"Revision",value:String((c==null?void 0:c.harnessRevision)??0)}),x.jsx(Ts,{label:"Managed files",value:String(Z.length)}),x.jsx(Ts,{label:"Pending updates",value:String((c==null?void 0:c.plannedChanges.length)??0)}),x.jsx(Ts,{label:"Bootstrap",value:(f==null?void 0:f.status.replaceAll("_"," "))??"unknown"}),x.jsx(Ts,{label:"Engineer",value:Vm(o)})]}),c!=null&&c.warnings.length?x.jsx("ul",{className:"warnings",children:c.warnings.map(ee=>x.jsx("li",{children:ee},ee))}):null]})}),x.jsx(Na,{title:"Skills",files:$,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D,collapsible:!0}),x.jsx(Na,{title:"Root Context",files:re,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D,collapsible:!0}),x.jsx(Na,{title:"Tools",files:I,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D,collapsible:!0}),x.jsx(dh,{title:"Project Docs",children:x.jsx("ul",{className:"harness-studio-doc-list",children:(f==null?void 0:f.checks.map(ee=>x.jsxs("li",{children:[x.jsx("span",{children:ee.path??ee.label}),x.jsx(Ni,{status:ee.status})]},ee.key)))??x.jsx("li",{children:x.jsx("span",{children:"No bootstrap status loaded."})})})})]})}),x.jsxs("section",{className:"harness-studio-section harness-studio-engineer",children:[x.jsxs("div",{className:"harness-studio-engineer-header",children:[x.jsxs("div",{children:[x.jsx("h3",{children:"Harness Engineer"}),x.jsx("p",{className:"muted",children:Vm(o)})]}),x.jsx(Ni,{status:(o==null?void 0:o.status)??"unknown"})]}),x.jsx(Mh,{role:"harness-engineer",session:o??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:b,onModelChange:u,onEffortChange:p,onStart:E,onResume:C,onRestart:T,onStop:S,onNotifyHarnessUpdated:v}),x.jsx("div",{className:"harness-engineer-terminal",children:(o==null?void 0:o.status)==="running"?x.jsx(Oo,{sessionId:o.id,active:l},o.id):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:"harness-engineer"}),x.jsx("span",{children:o!=null&&o.claudeSessionId?"Resume this project Harness Engineer session.":"Start this project Harness Engineer session."})]})})]})]})]})})}):null}function Ts({label:n,value:r}){return x.jsxs("div",{className:"harness-studio-metric",children:[x.jsx("span",{children:n}),x.jsx("strong",{children:r})]})}function Na({title:n,files:r,selectedPath:s,copiedPath:l,onCopy:d,onSelect:m,collapsible:f=!1}){const o=x.jsx("ol",{className:"harness-studio-file-list",children:r.length?r.map(c=>x.jsxs("li",{className:c.path===s?"selected":void 0,children:[x.jsx("button",{className:"harness-studio-file-path-button",type:"button",title:c.path,onClick:()=>m(c.path),children:c.path}),x.jsx("button",{className:"harness-studio-file-copy-button",type:"button",title:`Copy ${c.path}`,onClick:()=>d(c.path),children:l===c.path?"Copied":"Copy"}),x.jsx(Ni,{status:c.action})]},c.path)):x.jsx("li",{children:x.jsx("span",{children:"No files."})})});return f?x.jsx(dh,{title:n,children:o}):x.jsxs("section",{className:"harness-studio-section",children:[x.jsx("h3",{children:n}),o]})}function dh({title:n,children:r}){return x.jsxs("details",{className:"harness-studio-section harness-studio-collapsible-section",children:[x.jsxs("summary",{children:[x.jsx("h3",{children:n}),x.jsx("span",{children:"Show"})]}),x.jsx("div",{className:"harness-studio-collapsible-content",children:r})]})}function Gm(n){return n.kind==="agent-project-manager"||n.kind==="agent-architect"||n.kind==="agent-coder"||n.kind==="agent-reviewer"||n.kind==="agent-gate-reviewer"}function Vm(n){return n?n.status==="running"?`${n.status} / ${n.activityStatus??"idle"}`:n.status:"not started"}async function b1(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function C1({open:n,taskSlug:r,onClose:s}){var k;const[l,d]=te.useState(null),[m,f]=te.useState(null),[o,c]=te.useState(null),[h,p]=te.useState(null),[u,b]=te.useState(null),[C,T]=te.useState(!1),[E,S]=te.useState(!1),[,v]=Hi(null),[_,y]=te.useState(null),A=te.useMemo(()=>(l==null?void 0:l.files.find(M=>M.path===o))??(l==null?void 0:l.files[0])??null,[l,o]);async function L(M=m){var j;T(!0),v(null);try{if(!r)throw new Error("Create or select a task before reviewing harness commits.");const H=await Se.getRepositoryDiff(r,M);d(H),p(null),f(((j=H.commit)==null?void 0:j.sha)??null),c(U=>{var F;return U&&H.files.some(K=>K.path===U)?U:((F=H.files[0])==null?void 0:F.path)??null})}catch(H){v(pt(M?`Load commit diff ${M}`:"Load latest commit diff",H))}finally{T(!1)}}te.useEffect(()=>{n&&(f(null),y(null),L(null))},[n,r]);async function D(M){b(M),v(null);try{if(!r)throw new Error("Create or select a task before reviewing file diffs.");const j=await Se.getRepositoryFileDiff(r,M);p(j),c(M)}catch(j){v(pt(`Load task file diff for ${M}`,j))}finally{b(null)}}async function R(){if(v(null),y(null),!r){v("Create or select a task before merging the task branch.");return}if(!l){v("Load the commit diff before merging the task branch.");return}const M=l.commits.length?l.commits.map(H=>`- ${H.shortSha} ${H.subject}`):["- No new commits found."];if(window.confirm([`Merge ${l.sourceBranch} into ${l.targetBranch}?`,"","VCM will run a fast-forward merge only.","The merge will fail if the task worktree or connected repository has uncommitted changes.","If the connected repository branch has diverged, rebase or merge manually first.","","Commits:",...M].join(`
|
|
61
|
-
`))){S(!0);try{const H=await Se.mergeRepositoryDiffToCurrentBranch(r);y(H.changed?`Merged ${H.sourceBranch} into ${H.targetBranch} at ${H.afterSha.slice(0,12)}.`:`${H.targetBranch} already includes ${H.sourceBranch}.`),f(null),await L(null)}catch(H){v(pt("Merge task branch to connected repository branch",H))}finally{S(!1)}}}return n?x.jsx("div",{className:"modal-backdrop repository-diff-backdrop",children:x.jsxs("section",{className:"repository-diff-modal",role:"dialog","aria-modal":"true","aria-label":"Commit Diff",children:[x.jsxs("header",{className:"repository-diff-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Commit Diff"}),x.jsx("p",{children:l?`${((k=l.commit)==null?void 0:k.shortSha)??"HEAD"} · ${l.summary.totalFiles} files · +${l.summary.additions} / -${l.summary.deletions}`:"Review a new commit on the active task worktree branch."})]}),x.jsxs("div",{className:"repository-diff-header-actions",children:[x.jsxs("label",{className:"repository-diff-commit-picker",children:[x.jsx("span",{children:"Commit"}),x.jsx("select",{value:m??"",disabled:C||!(l!=null&&l.commits.length),onChange:M=>{const j=M.target.value||null;f(j),L(j)},children:l==null?void 0:l.commits.map(M=>x.jsxs("option",{value:M.sha,children:[M.shortSha," · ",M.subject]},M.sha))})]}),x.jsx("button",{type:"button",disabled:C,onClick:()=>void L(),children:"Refresh"}),x.jsx("button",{type:"button",disabled:C||E||!r||!(l!=null&&l.commits.length),onClick:()=>void R(),children:E?"Merging...":"Merge to Main"}),x.jsx("button",{type:"button",onClick:s,children:"Close"})]})]}),_?x.jsx("p",{className:"success-banner",children:_}):null,l!=null&&l.warnings.length?x.jsx("ul",{className:"warnings repository-diff-warnings",children:l.warnings.map(M=>x.jsx("li",{children:M},M))}):null,x.jsxs("div",{className:"repository-diff-body",children:[x.jsxs("aside",{className:"repository-diff-sidebar",children:[x.jsx(
|
|
62
|
-
`).filter(r=>!k1(r)).map((r,s)=>x.jsx("span",{className:`repository-diff-line ${E1(r)}`,children:r||" "},`${s}:${r}`))}function E1(n){return n.startsWith("+")&&!n.startsWith("+++")?"repository-diff-line-added":n.startsWith("-")&&!n.startsWith("---")?"repository-diff-line-deleted":n.startsWith("@@")?"repository-diff-line-hunk":"repository-diff-line-context"}function k1(n){return n.startsWith("diff --git")||n.startsWith("index ")||n.startsWith("new file mode ")||n.startsWith("deleted file mode ")||n.startsWith("similarity index ")||n.startsWith("rename from ")||n.startsWith("rename to ")||n.startsWith("--- ")||n.startsWith("+++ ")}function A1({busy:n,effort:r,model:s,open:l,permissionMode:d,session:m,onClose:f,onEffortChange:o,onModelChange:c,onPermissionModeChange:h,onResume:p,onRestart:u,onStart:b,onStop:C,onNotifyHarnessUpdated:T}){return l?x.jsx("div",{className:"modal-backdrop translator-session-backdrop",children:x.jsxs("section",{className:"translator-session-modal",role:"dialog","aria-modal":"true","aria-label":"Translator Session",children:[x.jsxs("header",{className:"translator-session-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Translator Session"}),x.jsx("p",{children:T1(m)})]}),x.jsx("button",{type:"button",onClick:f,children:"Close"})]}),x.jsx(Mh,{role:"translator",session:m??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:h,onModelChange:c,onEffortChange:o,onStart:b,onResume:p,onRestart:u,onStop:C,onNotifyHarnessUpdated:T}),x.jsx("div",{className:"translator-session-terminal",children:(m==null?void 0:m.status)==="running"?x.jsx(Oo,{sessionId:m.id,active:l},m.id):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:"translator"}),x.jsx("span",{children:m!=null&&m.claudeSessionId?"Resume this project translator session.":"Start the project translator session."})]})})]})}):null}function T1(n){if(!n)return"not started";const r=n.status==="running"?` · ${n.activityStatus??"idle"}`:"";return`${n.status}${r}`}function R1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const D1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,L1={};function Km(n,r){return(L1.jsx?M1:D1).test(n)}const O1=/[ \t\n\f\r]/g;function B1(n){return typeof n=="object"?n.type==="text"?Ym(n.value):!1:Ym(n)}function Ym(n){return n.replace(O1,"")===""}class Qa{constructor(r,s,l){this.normal=s,this.property=r,l&&(this.space=l)}}Qa.prototype.normal={};Qa.prototype.property={};Qa.prototype.space=void 0;function a_(n,r){const s={},l={};for(const d of n)Object.assign(s,d.property),Object.assign(l,d.normal);return new Qa(s,l,r)}function gh(n){return n.toLowerCase()}class bn{constructor(r,s){this.attribute=s,this.property=r}}bn.prototype.attribute="";bn.prototype.booleanish=!1;bn.prototype.boolean=!1;bn.prototype.commaOrSpaceSeparated=!1;bn.prototype.commaSeparated=!1;bn.prototype.defined=!1;bn.prototype.mustUseProperty=!1;bn.prototype.number=!1;bn.prototype.overloadedBoolean=!1;bn.prototype.property="";bn.prototype.spaceSeparated=!1;bn.prototype.space=void 0;let j1=0;const Ue=Ur(),Mt=Ur(),_h=Ur(),be=Ur(),ct=Ur(),Os=Ur(),Ln=Ur();function Ur(){return 2**++j1}const vh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Mt,commaOrSpaceSeparated:Ln,commaSeparated:Os,number:be,overloadedBoolean:_h,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Vu=Object.keys(vh);class Lh extends bn{constructor(r,s,l,d){let m=-1;if(super(r,s),Xm(this,"space",d),typeof l=="number")for(;++m<Vu.length;){const f=Vu[m];Xm(this,Vu[m],(l&vh[f])===vh[f])}}}Lh.prototype.defined=!0;function Xm(n,r,s){s&&(n[r]=s)}function Hs(n){const r={},s={};for(const[l,d]of Object.entries(n.properties)){const m=new Lh(l,n.transform(n.attributes||{},l),d,n.space);n.mustUseProperty&&n.mustUseProperty.includes(l)&&(m.mustUseProperty=!0),r[l]=m,s[gh(l)]=l,s[gh(m.attribute)]=l}return new Qa(r,s,n.space)}const l_=Hs({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:ct,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:be,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:ct,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Mt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function o_(n,r){return r in n?n[r]:r}function c_(n,r){return o_(n,r.toLowerCase())}const N1=Hs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Os,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:be,colSpan:null,content:null,contentEditable:Mt,controls:Ue,controlsList:ct,coords:be|Os,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:_h,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:be,hidden:_h,high:be,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:be,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:be,rowSpan:be,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Mt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:c_}),H1=Hs({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:Ln,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ct,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:Os,g2:Os,glyphName:Os,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,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:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o_}),u_=Hs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),h_=Hs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c_}),f_=Hs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),z1={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"},I1=/[A-Z]/g,Qm=/-[a-z]/g,U1=/^data[-\w.:]+$/i;function P1(n,r){const s=gh(r);let l=r,d=bn;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&U1.test(r)){if(r.charAt(4)==="-"){const m=r.slice(5).replace(Qm,q1);l="data"+m.charAt(0).toUpperCase()+m.slice(1)}else{const m=r.slice(4);if(!Qm.test(m)){let f=m.replace(I1,F1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}d=Lh}return new d(l,r)}function F1(n){return"-"+n.toLowerCase()}function q1(n){return n.charAt(1).toUpperCase()}const $1=a_([l_,N1,u_,h_,f_],"html"),Oh=a_([l_,H1,u_,h_,f_],"svg");function G1(n){return n.join(" ").trim()}var Rs={},Wu,Jm;function V1(){if(Jm)return Wu;Jm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,d=/^:\s*/,m=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
|
|
63
|
-
`,h="/",p="*",u="",b="comment",C="declaration";function T(S,v){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];v=v||{};var _=1,y=1;function A(K){var Y=K.match(r);Y&&(_+=Y.length);var G=K.lastIndexOf(c);y=~G?K.length-G:y+K.length}function L(){var K={line:_,column:y};return function(Y){return Y.position=new D(K),M(),Y}}function D(K){this.start=K,this.end={line:_,column:y},this.source=v.source}D.prototype.content=S;function R(K){var Y=new Error(v.source+":"+_+":"+y+": "+K);if(Y.reason=K,Y.filename=v.source,Y.line=_,Y.column=y,Y.source=S,!v.silent)throw Y}function k(K){var Y=K.exec(S);if(Y){var G=Y[0];return A(G),S=S.slice(G.length),Y}}function M(){k(s)}function j(K){var Y;for(K=K||[];Y=H();)Y!==!1&&K.push(Y);return K}function H(){var K=L();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var Y=2;u!=S.charAt(Y)&&(p!=S.charAt(Y)||h!=S.charAt(Y+1));)++Y;if(Y+=2,u===S.charAt(Y-1))return R("End of comment missing");var G=S.slice(2,Y-2);return y+=2,A(G),S=S.slice(Y),y+=2,K({type:b,comment:G})}}function U(){var K=L(),Y=k(l);if(Y){if(H(),!k(d))return R("property missing ':'");var G=k(m),W=K({type:C,property:E(Y[0].replace(n,u)),value:G?E(G[0].replace(n,u)):u});return k(f),W}}function F(){var K=[];j(K);for(var Y;Y=U();)Y!==!1&&(K.push(Y),j(K));return K}return M(),F()}function E(S){return S?S.replace(o,u):u}return Wu=T,Wu}var Zm;function W1(){if(Zm)return Rs;Zm=1;var n=Rs&&Rs.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=s;const r=n(V1());function s(l,d){let m=null;if(!l||typeof l!="string")return m;const f=(0,r.default)(l),o=typeof d=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:p}=c;o?d(h,p,c):p&&(m=m||{},m[h]=p)}),m}return Rs}var Ha={},eg;function K1(){if(eg)return Ha;eg=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,d=/^-(ms)-/,m=function(h){return!h||s.test(h)||n.test(h)},f=function(h,p){return p.toUpperCase()},o=function(h,p){return"".concat(p,"-")},c=function(h,p){return p===void 0&&(p={}),m(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(d,o):h=h.replace(l,o),h.replace(r,f))};return Ha.camelCase=c,Ha}var za,tg;function Y1(){if(tg)return za;tg=1;var n=za&&za.__importDefault||function(d){return d&&d.__esModule?d:{default:d}},r=n(W1()),s=K1();function l(d,m){var f={};return!d||typeof d!="string"||(0,r.default)(d,function(o,c){o&&c&&(f[(0,s.camelCase)(o,m)]=c)}),f}return l.default=l,za=l,za}var X1=Y1();const Q1=Yg(X1),d_=p_("end"),Bh=p_("start");function p_(n){return r;function r(s){const l=s&&s.position&&s.position[n]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function J1(n){const r=Bh(n),s=d_(n);if(r&&s)return{start:r,end:s}}function Fa(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?ng(n.position):"start"in n||"end"in n?ng(n):"line"in n||"column"in n?yh(n):""}function yh(n){return ig(n&&n.line)+":"+ig(n&&n.column)}function ng(n){return yh(n&&n.start)+"-"+yh(n&&n.end)}function ig(n){return n&&typeof n=="number"?n:1}class Zt extends Error{constructor(r,s,l){super(),typeof s=="string"&&(l=s,s=void 0);let d="",m={},f=!1;if(s&&("line"in s&&"column"in s?m={place:s}:"start"in s&&"end"in s?m={place:s}:"type"in s?m={ancestors:[s],place:s.position}:m={...s}),typeof r=="string"?d=r:!m.cause&&r&&(f=!0,d=r.message,m.cause=r),!m.ruleId&&!m.source&&typeof l=="string"){const c=l.indexOf(":");c===-1?m.ruleId=l:(m.source=l.slice(0,c),m.ruleId=l.slice(c+1))}if(!m.place&&m.ancestors&&m.ancestors){const c=m.ancestors[m.ancestors.length-1];c&&(m.place=c.position)}const o=m.place&&"start"in m.place?m.place.start:m.place;this.ancestors=m.ancestors||void 0,this.cause=m.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=o?o.line:void 0,this.name=Fa(m.place)||"1:1",this.place=m.place||void 0,this.reason=this.message,this.ruleId=m.ruleId||void 0,this.source=m.source||void 0,this.stack=f&&m.cause&&typeof m.cause.stack=="string"?m.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Zt.prototype.file="";Zt.prototype.name="";Zt.prototype.reason="";Zt.prototype.message="";Zt.prototype.stack="";Zt.prototype.column=void 0;Zt.prototype.line=void 0;Zt.prototype.ancestors=void 0;Zt.prototype.cause=void 0;Zt.prototype.fatal=void 0;Zt.prototype.place=void 0;Zt.prototype.ruleId=void 0;Zt.prototype.source=void 0;const jh={}.hasOwnProperty,Z1=new Map,eS=/[A-Z]/g,tS=new Set(["table","tbody","thead","tfoot","tr"]),nS=new Set(["td","th"]),m_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function iS(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let l;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=hS(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=uS(s,r.jsx,r.jsxs)}const d={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:l,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Oh:$1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},m=g_(d,n,void 0);return m&&typeof m!="string"?m:d.create(n,d.Fragment,{children:m||void 0},void 0)}function g_(n,r,s){if(r.type==="element")return rS(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return sS(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return lS(n,r,s);if(r.type==="mdxjsEsm")return aS(n,r);if(r.type==="root")return oS(n,r,s);if(r.type==="text")return cS(n,r)}function rS(n,r,s){const l=n.schema;let d=l;r.tagName.toLowerCase()==="svg"&&l.space==="html"&&(d=Oh,n.schema=d),n.ancestors.push(r);const m=v_(n,r.tagName,!1),f=fS(n,r);let o=Hh(n,r);return tS.has(r.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!B1(c):!0})),__(n,f,m,r),Nh(f,o),n.ancestors.pop(),n.schema=l,n.create(r,m,f,s)}function sS(n,r){if(r.data&&r.data.estree&&n.evaluater){const l=r.data.estree.body[0];return l.type,n.evaluater.evaluateExpression(l.expression)}Ka(n,r.position)}function aS(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);Ka(n,r.position)}function lS(n,r,s){const l=n.schema;let d=l;r.name==="svg"&&l.space==="html"&&(d=Oh,n.schema=d),n.ancestors.push(r);const m=r.name===null?n.Fragment:v_(n,r.name,!0),f=dS(n,r),o=Hh(n,r);return __(n,f,m,r),Nh(f,o),n.ancestors.pop(),n.schema=l,n.create(r,m,f,s)}function oS(n,r,s){const l={};return Nh(l,Hh(n,r)),n.create(r,n.Fragment,l,s)}function cS(n,r){return r.value}function __(n,r,s,l){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=l)}function Nh(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function uS(n,r,s){return l;function l(d,m,f,o){const h=Array.isArray(f.children)?s:r;return o?h(m,f,o):h(m,f)}}function hS(n,r){return s;function s(l,d,m,f){const o=Array.isArray(m.children),c=Bh(l);return r(d,m,f,o,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function fS(n,r){const s={};let l,d;for(d in r.properties)if(d!=="children"&&jh.call(r.properties,d)){const m=pS(n,d,r.properties[d]);if(m){const[f,o]=m;n.tableCellAlignToStyle&&f==="align"&&typeof o=="string"&&nS.has(r.tagName)?l=o:s[f]=o}}if(l){const m=s.style||(s.style={});m[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return s}function dS(n,r){const s={};for(const l of r.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&n.evaluater){const m=l.data.estree.body[0];m.type;const f=m.expression;f.type;const o=f.properties[0];o.type,Object.assign(s,n.evaluater.evaluateExpression(o.argument))}else Ka(n,r.position);else{const d=l.name;let m;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&n.evaluater){const o=l.value.data.estree.body[0];o.type,m=n.evaluater.evaluateExpression(o.expression)}else Ka(n,r.position);else m=l.value===null?!0:l.value;s[d]=m}return s}function Hh(n,r){const s=[];let l=-1;const d=n.passKeys?new Map:Z1;for(;++l<r.children.length;){const m=r.children[l];let f;if(n.passKeys){const c=m.type==="element"?m.tagName:m.type==="mdxJsxFlowElement"||m.type==="mdxJsxTextElement"?m.name:void 0;if(c){const h=d.get(c)||0;f=c+"-"+h,d.set(c,h+1)}}const o=g_(n,m,f);o!==void 0&&s.push(o)}return s}function pS(n,r,s){const l=P1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=l.commaSeparated?R1(s):G1(s)),l.property==="style"){let d=typeof s=="object"?s:mS(n,String(s));return n.stylePropertyNameCase==="css"&&(d=gS(d)),["style",d]}return[n.elementAttributeNameCase==="react"&&l.space?z1[l.property]||l.property:l.attribute,s]}}function mS(n,r){try{return Q1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const l=s,d=new Zt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=n.filePath||void 0,d.url=m_+"#cannot-parse-style-attribute",d}}function v_(n,r,s){let l;if(!s)l={type:"Literal",value:r};else if(r.includes(".")){const d=r.split(".");let m=-1,f;for(;++m<d.length;){const o=Km(d[m])?{type:"Identifier",name:d[m]}:{type:"Literal",value:d[m]};f=f?{type:"MemberExpression",object:f,property:o,computed:!!(m&&o.type==="Literal"),optional:!1}:o}l=f}else l=Km(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(l.type==="Literal"){const d=l.value;return jh.call(n.components,d)?n.components[d]:d}if(n.evaluater)return n.evaluater.evaluateExpression(l);Ka(n)}function Ka(n,r){const s=new Zt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=m_+"#cannot-handle-mdx-estrees-without-createevaluater",s}function gS(n){const r={};let s;for(s in n)jh.call(n,s)&&(r[_S(s)]=n[s]);return r}function _S(n){let r=n.replace(eS,vS);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function vS(n){return"-"+n.toLowerCase()}const Ku={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"]},yS={};function zh(n,r){const s=yS,l=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,d=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return y_(n,l,d)}function y_(n,r,s){if(SS(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return rg(n.children,r,s)}return Array.isArray(n)?rg(n,r,s):""}function rg(n,r,s){const l=[];let d=-1;for(;++d<n.length;)l[d]=y_(n[d],r,s);return l.join("")}function SS(n){return!!(n&&typeof n=="object")}const sg=document.createElement("i");function Ih(n){const r="&"+n+";";sg.innerHTML=r;const s=sg.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function On(n,r,s,l){const d=n.length;let m=0,f;if(r<0?r=-r>d?0:d+r:r=r>d?d:r,s=s>0?s:0,l.length<1e4)f=Array.from(l),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);m<l.length;)f=l.slice(m,m+1e4),f.unshift(r,0),n.splice(...f),m+=1e4,r+=1e4}function $n(n,r){return n.length>0?(On(n,n.length,0,r),n):r}const ag={}.hasOwnProperty;function S_(n){const r={};let s=-1;for(;++s<n.length;)bS(r,n[s]);return r}function bS(n,r){let s;for(s in r){const d=(ag.call(n,s)?n[s]:void 0)||(n[s]={}),m=r[s];let f;if(m)for(f in m){ag.call(d,f)||(d[f]=[]);const o=m[f];CS(d[f],Array.isArray(o)?o:o?[o]:[])}}}function CS(n,r){let s=-1;const l=[];for(;++s<r.length;)(r[s].add==="after"?n:l).push(r[s]);On(n,0,0,l)}function b_(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function ni(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const sn=pr(/[A-Za-z]/),Jt=pr(/[\dA-Za-z]/),wS=pr(/[#-'*+\--9=?A-Z^-~]/);function Eo(n){return n!==null&&(n<32||n===127)}const Sh=pr(/\d/),xS=pr(/[\dA-Fa-f]/),ES=pr(/[!-/:-@[-`{-~]/);function De(n){return n!==null&&n<-2}function ot(n){return n!==null&&(n<0||n===32)}function Ve(n){return n===-2||n===-1||n===32}const Bo=pr(new RegExp("\\p{P}|\\p{S}","u")),zr=pr(/\s/);function pr(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function zs(n){const r=[];let s=-1,l=0,d=0;for(;++s<n.length;){const m=n.charCodeAt(s);let f="";if(m===37&&Jt(n.charCodeAt(s+1))&&Jt(n.charCodeAt(s+2)))d=2;else if(m<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(m))||(f=String.fromCharCode(m));else if(m>55295&&m<57344){const o=n.charCodeAt(s+1);m<56320&&o>56319&&o<57344?(f=String.fromCharCode(m,o),d=1):f="�"}else f=String.fromCharCode(m);f&&(r.push(n.slice(l,s),encodeURIComponent(f)),l=s+d+1,f=""),d&&(s+=d,d=0)}return r.join("")+n.slice(l)}function Xe(n,r,s,l){const d=l?l-1:Number.POSITIVE_INFINITY;let m=0;return f;function f(c){return Ve(c)?(n.enter(s),o(c)):r(c)}function o(c){return Ve(c)&&m++<d?(n.consume(c),o):(n.exit(s),r(c))}}const kS={tokenize:AS};function AS(n){const r=n.attempt(this.parser.constructs.contentInitial,l,d);let s;return r;function l(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Xe(n,r,"linePrefix")}function d(o){return n.enter("paragraph"),m(o)}function m(o){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(o)}function f(o){if(o===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(o);return}return De(o)?(n.consume(o),n.exit("chunkText"),m):(n.consume(o),f)}}const TS={tokenize:RS},lg={tokenize:DS};function RS(n){const r=this,s=[];let l=0,d,m,f;return o;function o(y){if(l<s.length){const A=s[l];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(y)}return h(y)}function c(y){if(l++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,d&&_();const A=r.events.length;let L=A,D;for(;L--;)if(r.events[L][0]==="exit"&&r.events[L][1].type==="chunkFlow"){D=r.events[L][1].end;break}v(l);let R=A;for(;R<r.events.length;)r.events[R][1].end={...D},R++;return On(r.events,L+1,0,r.events.slice(A)),r.events.length=R,h(y)}return o(y)}function h(y){if(l===s.length){if(!d)return b(y);if(d.currentConstruct&&d.currentConstruct.concrete)return T(y);r.interrupt=!!(d.currentConstruct&&!d._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(lg,p,u)(y)}function p(y){return d&&_(),v(l),b(y)}function u(y){return r.parser.lazy[r.now().line]=l!==s.length,f=r.now().offset,T(y)}function b(y){return r.containerState={},n.attempt(lg,C,T)(y)}function C(y){return l++,s.push([r.currentConstruct,r.containerState]),b(y)}function T(y){if(y===null){d&&_(),v(0),n.consume(y);return}return d=d||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:d,contentType:"flow",previous:m}),E(y)}function E(y){if(y===null){S(n.exit("chunkFlow"),!0),v(0),n.consume(y);return}return De(y)?(n.consume(y),S(n.exit("chunkFlow")),l=0,r.interrupt=void 0,o):(n.consume(y),E)}function S(y,A){const L=r.sliceStream(y);if(A&&L.push(null),y.previous=m,m&&(m.next=y),m=y,d.defineSkip(y.start),d.write(L),r.parser.lazy[y.start.line]){let D=d.events.length;for(;D--;)if(d.events[D][1].start.offset<f&&(!d.events[D][1].end||d.events[D][1].end.offset>f))return;const R=r.events.length;let k=R,M,j;for(;k--;)if(r.events[k][0]==="exit"&&r.events[k][1].type==="chunkFlow"){if(M){j=r.events[k][1].end;break}M=!0}for(v(l),D=R;D<r.events.length;)r.events[D][1].end={...j},D++;On(r.events,k+1,0,r.events.slice(R)),r.events.length=D}}function v(y){let A=s.length;for(;A-- >y;){const L=s[A];r.containerState=L[1],L[0].exit.call(r,n)}s.length=y}function _(){d.write([null]),m=void 0,d=void 0,r.containerState._closeFlow=void 0}}function DS(n,r,s){return Xe(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bs(n){if(n===null||ot(n)||zr(n))return 1;if(Bo(n))return 2}function jo(n,r,s){const l=[];let d=-1;for(;++d<n.length;){const m=n[d].resolveAll;m&&!l.includes(m)&&(r=m(r,s),l.push(m))}return r}const bh={name:"attention",resolveAll:MS,tokenize:LS};function MS(n,r){let s=-1,l,d,m,f,o,c,h,p;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(l=s;l--;)if(n[l][0]==="exit"&&n[l][1].type==="attentionSequence"&&n[l][1]._open&&r.sliceSerialize(n[l][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[l][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[l][1].end.offset-n[l][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;c=n[l][1].end.offset-n[l][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const u={...n[l][1].end},b={...n[s][1].start};og(u,-c),og(b,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[l][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:b},m={type:c>1?"strongText":"emphasisText",start:{...n[l][1].end},end:{...n[s][1].start}},d={type:c>1?"strong":"emphasis",start:{...f.start},end:{...o.end}},n[l][1].end={...f.start},n[s][1].start={...o.end},h=[],n[l][1].end.offset-n[l][1].start.offset&&(h=$n(h,[["enter",n[l][1],r],["exit",n[l][1],r]])),h=$n(h,[["enter",d,r],["enter",f,r],["exit",f,r],["enter",m,r]]),h=$n(h,jo(r.parser.constructs.insideSpan.null,n.slice(l+1,s),r)),h=$n(h,[["exit",m,r],["enter",o,r],["exit",o,r],["exit",d,r]]),n[s][1].end.offset-n[s][1].start.offset?(p=2,h=$n(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):p=0,On(n,l-1,s-l+3,h),s=l+h.length-p-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function LS(n,r){const s=this.parser.constructs.attentionMarkers.null,l=this.previous,d=Bs(l);let m;return f;function f(c){return m=c,n.enter("attentionSequence"),o(c)}function o(c){if(c===m)return n.consume(c),o;const h=n.exit("attentionSequence"),p=Bs(c),u=!p||p===2&&d||s.includes(c),b=!d||d===2&&p||s.includes(l);return h._open=!!(m===42?u:u&&(d||!b)),h._close=!!(m===42?b:b&&(p||!u)),r(c)}}function og(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const OS={name:"autolink",tokenize:BS};function BS(n,r,s){let l=0;return d;function d(C){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),m}function m(C){return sn(C)?(n.consume(C),f):C===64?s(C):h(C)}function f(C){return C===43||C===45||C===46||Jt(C)?(l=1,o(C)):h(C)}function o(C){return C===58?(n.consume(C),l=0,c):(C===43||C===45||C===46||Jt(C))&&l++<32?(n.consume(C),o):(l=0,h(C))}function c(C){return C===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):C===null||C===32||C===60||Eo(C)?s(C):(n.consume(C),c)}function h(C){return C===64?(n.consume(C),p):wS(C)?(n.consume(C),h):s(C)}function p(C){return Jt(C)?u(C):s(C)}function u(C){return C===46?(n.consume(C),l=0,p):C===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):b(C)}function b(C){if((C===45||Jt(C))&&l++<63){const T=C===45?b:u;return n.consume(C),T}return s(C)}}const Ja={partial:!0,tokenize:jS};function jS(n,r,s){return l;function l(m){return Ve(m)?Xe(n,d,"linePrefix")(m):d(m)}function d(m){return m===null||De(m)?r(m):s(m)}}const C_={continuation:{tokenize:HS},exit:zS,name:"blockQuote",tokenize:NS};function NS(n,r,s){const l=this;return d;function d(f){if(f===62){const o=l.containerState;return o.open||(n.enter("blockQuote",{_container:!0}),o.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),m}return s(f)}function m(f){return Ve(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function HS(n,r,s){const l=this;return d;function d(f){return Ve(f)?Xe(n,m,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):m(f)}function m(f){return n.attempt(C_,r,s)(f)}}function zS(n){n.exit("blockQuote")}const w_={name:"characterEscape",tokenize:IS};function IS(n,r,s){return l;function l(m){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(m),n.exit("escapeMarker"),d}function d(m){return ES(m)?(n.enter("characterEscapeValue"),n.consume(m),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(m)}}const x_={name:"characterReference",tokenize:US};function US(n,r,s){const l=this;let d=0,m,f;return o;function o(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),m=31,f=Jt,p(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),m=6,f=xS,p):(n.enter("characterReferenceValue"),m=7,f=Sh,p(u))}function p(u){if(u===59&&d){const b=n.exit("characterReferenceValue");return f===Jt&&!Ih(l.sliceSerialize(b))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&d++<m?(n.consume(u),p):s(u)}}const cg={partial:!0,tokenize:FS},ug={concrete:!0,name:"codeFenced",tokenize:PS};function PS(n,r,s){const l=this,d={partial:!0,tokenize:L};let m=0,f=0,o;return c;function c(D){return h(D)}function h(D){const R=l.events[l.events.length-1];return m=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,o=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===o?(f++,n.consume(D),p):f<3?s(D):(n.exit("codeFencedFenceSequence"),Ve(D)?Xe(n,u,"whitespace")(D):u(D))}function u(D){return D===null||De(D)?(n.exit("codeFencedFence"),l.interrupt?r(D):n.check(cg,E,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||De(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):Ve(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Xe(n,C,"whitespace")(D)):D===96&&D===o?s(D):(n.consume(D),b)}function C(D){return D===null||De(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||De(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===o?s(D):(n.consume(D),T)}function E(D){return n.attempt(d,A,S)(D)}function S(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),v}function v(D){return m>0&&Ve(D)?Xe(n,_,"linePrefix",m+1)(D):_(D)}function _(D){return D===null||De(D)?n.check(cg,E,A)(D):(n.enter("codeFlowValue"),y(D))}function y(D){return D===null||De(D)?(n.exit("codeFlowValue"),_(D)):(n.consume(D),y)}function A(D){return n.exit("codeFenced"),r(D)}function L(D,R,k){let M=0;return j;function j(Y){return D.enter("lineEnding"),D.consume(Y),D.exit("lineEnding"),H}function H(Y){return D.enter("codeFencedFence"),Ve(Y)?Xe(D,U,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):U(Y)}function U(Y){return Y===o?(D.enter("codeFencedFenceSequence"),F(Y)):k(Y)}function F(Y){return Y===o?(M++,D.consume(Y),F):M>=f?(D.exit("codeFencedFenceSequence"),Ve(Y)?Xe(D,K,"whitespace")(Y):K(Y)):k(Y)}function K(Y){return Y===null||De(Y)?(D.exit("codeFencedFence"),R(Y)):k(Y)}}}function FS(n,r,s){const l=this;return d;function d(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m)}function m(f){return l.parser.lazy[l.now().line]?s(f):r(f)}}const Yu={name:"codeIndented",tokenize:$S},qS={partial:!0,tokenize:GS};function $S(n,r,s){const l=this;return d;function d(h){return n.enter("codeIndented"),Xe(n,m,"linePrefix",5)(h)}function m(h){const p=l.events[l.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):De(h)?n.attempt(qS,f,c)(h):(n.enter("codeFlowValue"),o(h))}function o(h){return h===null||De(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),o)}function c(h){return n.exit("codeIndented"),r(h)}}function GS(n,r,s){const l=this;return d;function d(f){return l.parser.lazy[l.now().line]?s(f):De(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),d):Xe(n,m,"linePrefix",5)(f)}function m(f){const o=l.events[l.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(f):De(f)?d(f):s(f)}}const VS={name:"codeText",previous:KS,resolve:WS,tokenize:YS};function WS(n){let r=n.length-4,s=3,l,d;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(l=s;++l<r;)if(n[l][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(l=s-1,r++;++l<=r;)d===void 0?l!==r&&n[l][1].type!=="lineEnding"&&(d=l):(l===r||n[l][1].type==="lineEnding")&&(n[d][1].type="codeTextData",l!==d+2&&(n[d][1].end=n[l-1][1].end,n.splice(d+2,l-d-2),r-=l-d-2,l=d+2),d=void 0);return n}function KS(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function YS(n,r,s){let l=0,d,m;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),o(u)}function o(u){return u===96?(n.consume(u),l++,o):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(m=n.enter("codeTextSequence"),d=0,p(u)):De(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||De(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function p(u){return u===96?(n.consume(u),d++,p):d===l?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(m.type="codeTextData",h(u))}}class XS{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const l=s??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(r,l):r>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(r,s,l){const d=s||0;this.setCursor(Math.trunc(r));const m=this.right.splice(this.right.length-d,Number.POSITIVE_INFINITY);return l&&Ia(this.left,l),m.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Ia(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Ia(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);Ia(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Ia(this.left,s.reverse())}}}function Ia(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function E_(n){const r={};let s=-1,l,d,m,f,o,c,h;const p=new XS(n);for(;++s<p.length;){for(;s in r;)s=r[s];if(l=p.get(s),s&&l[1].type==="chunkFlow"&&p.get(s-1)[1].type==="listItemPrefix"&&(c=l[1]._tokenizer.events,m=0,m<c.length&&c[m][1].type==="lineEndingBlank"&&(m+=2),m<c.length&&c[m][1].type==="content"))for(;++m<c.length&&c[m][1].type!=="content";)c[m][1].type==="chunkText"&&(c[m][1]._isInFirstContentOfListItem=!0,m++);if(l[0]==="enter")l[1].contentType&&(Object.assign(r,QS(p,s)),s=r[s],h=!0);else if(l[1]._container){for(m=s,d=void 0;m--;)if(f=p.get(m),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(d&&(p.get(d)[1].type="lineEndingBlank"),f[1].type="lineEnding",d=m);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;d&&(l[1].end={...p.get(d)[1].start},o=p.slice(d,s),o.unshift(l),p.splice(d,s-d+1,o))}}return On(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function QS(n,r){const s=n.get(r)[1],l=n.get(r)[2];let d=r-1;const m=[];let f=s._tokenizer;f||(f=l.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const o=f.events,c=[],h={};let p,u,b=-1,C=s,T=0,E=0;const S=[E];for(;C;){for(;n.get(++d)[1]!==C;);m.push(d),C._tokenizer||(p=l.sliceStream(C),C.next||p.push(null),u&&f.defineSkip(C.start),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(p),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=C,C=C.next}for(C=s;++b<o.length;)o[b][0]==="exit"&&o[b-1][0]==="enter"&&o[b][1].type===o[b-1][1].type&&o[b][1].start.line!==o[b][1].end.line&&(E=b+1,S.push(E),C._tokenizer=void 0,C.previous=void 0,C=C.next);for(f.events=[],C?(C._tokenizer=void 0,C.previous=void 0):S.pop(),b=S.length;b--;){const v=o.slice(S[b],S[b+1]),_=m.pop();c.push([_,_+v.length-1]),n.splice(_,2,v)}for(c.reverse(),b=-1;++b<c.length;)h[T+c[b][0]]=T+c[b][1],T+=c[b][1]-c[b][0]-1;return h}const JS={resolve:eb,tokenize:tb},ZS={partial:!0,tokenize:nb};function eb(n){return E_(n),n}function tb(n,r){let s;return l;function l(o){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),d(o)}function d(o){return o===null?m(o):De(o)?n.check(ZS,f,m)(o):(n.consume(o),d)}function m(o){return n.exit("chunkContent"),n.exit("content"),r(o)}function f(o){return n.consume(o),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,d}}function nb(n,r,s){const l=this;return d;function d(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Xe(n,m,"linePrefix")}function m(f){if(f===null||De(f))return s(f);const o=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(f):n.interrupt(l.parser.constructs.flow,s,r)(f)}}function k_(n,r,s,l,d,m,f,o,c){const h=c||Number.POSITIVE_INFINITY;let p=0;return u;function u(v){return v===60?(n.enter(l),n.enter(d),n.enter(m),n.consume(v),n.exit(m),b):v===null||v===32||v===41||Eo(v)?s(v):(n.enter(l),n.enter(f),n.enter(o),n.enter("chunkString",{contentType:"string"}),E(v))}function b(v){return v===62?(n.enter(m),n.consume(v),n.exit(m),n.exit(d),n.exit(l),r):(n.enter(o),n.enter("chunkString",{contentType:"string"}),C(v))}function C(v){return v===62?(n.exit("chunkString"),n.exit(o),b(v)):v===null||v===60||De(v)?s(v):(n.consume(v),v===92?T:C)}function T(v){return v===60||v===62||v===92?(n.consume(v),C):C(v)}function E(v){return!p&&(v===null||v===41||ot(v))?(n.exit("chunkString"),n.exit(o),n.exit(f),n.exit(l),r(v)):p<h&&v===40?(n.consume(v),p++,E):v===41?(n.consume(v),p--,E):v===null||v===32||v===40||Eo(v)?s(v):(n.consume(v),v===92?S:E)}function S(v){return v===40||v===41||v===92?(n.consume(v),E):E(v)}}function A_(n,r,s,l,d,m){const f=this;let o=0,c;return h;function h(C){return n.enter(l),n.enter(d),n.consume(C),n.exit(d),n.enter(m),p}function p(C){return o>999||C===null||C===91||C===93&&!c||C===94&&!o&&"_hiddenFootnoteSupport"in f.parser.constructs?s(C):C===93?(n.exit(m),n.enter(d),n.consume(C),n.exit(d),n.exit(l),r):De(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),u(C))}function u(C){return C===null||C===91||C===93||De(C)||o++>999?(n.exit("chunkString"),p(C)):(n.consume(C),c||(c=!Ve(C)),C===92?b:u)}function b(C){return C===91||C===92||C===93?(n.consume(C),o++,u):u(C)}}function T_(n,r,s,l,d,m){let f;return o;function o(b){return b===34||b===39||b===40?(n.enter(l),n.enter(d),n.consume(b),n.exit(d),f=b===40?41:b,c):s(b)}function c(b){return b===f?(n.enter(d),n.consume(b),n.exit(d),n.exit(l),r):(n.enter(m),h(b))}function h(b){return b===f?(n.exit(m),c(f)):b===null?s(b):De(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Xe(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===f||b===null||De(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:p)}function u(b){return b===f||b===92?(n.consume(b),p):p(b)}}function qa(n,r){let s;return l;function l(d){return De(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),s=!0,l):Ve(d)?Xe(n,l,s?"linePrefix":"lineSuffix")(d):r(d)}}const ib={name:"definition",tokenize:sb},rb={partial:!0,tokenize:ab};function sb(n,r,s){const l=this;let d;return m;function m(C){return n.enter("definition"),f(C)}function f(C){return A_.call(l,n,o,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(C)}function o(C){return d=ni(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),C===58?(n.enter("definitionMarker"),n.consume(C),n.exit("definitionMarker"),c):s(C)}function c(C){return ot(C)?qa(n,h)(C):h(C)}function h(C){return k_(n,p,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(C)}function p(C){return n.attempt(rb,u,u)(C)}function u(C){return Ve(C)?Xe(n,b,"whitespace")(C):b(C)}function b(C){return C===null||De(C)?(n.exit("definition"),l.parser.defined.push(d),r(C)):s(C)}}function ab(n,r,s){return l;function l(o){return ot(o)?qa(n,d)(o):s(o)}function d(o){return T_(n,m,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function m(o){return Ve(o)?Xe(n,f,"whitespace")(o):f(o)}function f(o){return o===null||De(o)?r(o):s(o)}}const lb={name:"hardBreakEscape",tokenize:ob};function ob(n,r,s){return l;function l(m){return n.enter("hardBreakEscape"),n.consume(m),d}function d(m){return De(m)?(n.exit("hardBreakEscape"),r(m)):s(m)}}const cb={name:"headingAtx",resolve:ub,tokenize:hb};function ub(n,r){let s=n.length-2,l=3,d,m;return n[l][1].type==="whitespace"&&(l+=2),s-2>l&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(l===s-1||s-4>l&&n[s-2][1].type==="whitespace")&&(s-=l+1===s?2:4),s>l&&(d={type:"atxHeadingText",start:n[l][1].start,end:n[s][1].end},m={type:"chunkText",start:n[l][1].start,end:n[s][1].end,contentType:"text"},On(n,l,s-l+1,[["enter",d,r],["enter",m,r],["exit",m,r],["exit",d,r]])),n}function hb(n,r,s){let l=0;return d;function d(p){return n.enter("atxHeading"),m(p)}function m(p){return n.enter("atxHeadingSequence"),f(p)}function f(p){return p===35&&l++<6?(n.consume(p),f):p===null||ot(p)?(n.exit("atxHeadingSequence"),o(p)):s(p)}function o(p){return p===35?(n.enter("atxHeadingSequence"),c(p)):p===null||De(p)?(n.exit("atxHeading"),r(p)):Ve(p)?Xe(n,o,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function c(p){return p===35?(n.consume(p),c):(n.exit("atxHeadingSequence"),o(p))}function h(p){return p===null||p===35||ot(p)?(n.exit("atxHeadingText"),o(p)):(n.consume(p),h)}}const fb=["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"],hg=["pre","script","style","textarea"],db={concrete:!0,name:"htmlFlow",resolveTo:gb,tokenize:_b},pb={partial:!0,tokenize:yb},mb={partial:!0,tokenize:vb};function gb(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function _b(n,r,s){const l=this;let d,m,f,o,c;return h;function h(I){return p(I)}function p(I){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(I),u}function u(I){return I===33?(n.consume(I),b):I===47?(n.consume(I),m=!0,E):I===63?(n.consume(I),d=3,l.interrupt?r:O):sn(I)?(n.consume(I),f=String.fromCharCode(I),S):s(I)}function b(I){return I===45?(n.consume(I),d=2,C):I===91?(n.consume(I),d=5,o=0,T):sn(I)?(n.consume(I),d=4,l.interrupt?r:O):s(I)}function C(I){return I===45?(n.consume(I),l.interrupt?r:O):s(I)}function T(I){const re="CDATA[";return I===re.charCodeAt(o++)?(n.consume(I),o===re.length?l.interrupt?r:U:T):s(I)}function E(I){return sn(I)?(n.consume(I),f=String.fromCharCode(I),S):s(I)}function S(I){if(I===null||I===47||I===62||ot(I)){const re=I===47,ve=f.toLowerCase();return!re&&!m&&hg.includes(ve)?(d=1,l.interrupt?r(I):U(I)):fb.includes(f.toLowerCase())?(d=6,re?(n.consume(I),v):l.interrupt?r(I):U(I)):(d=7,l.interrupt&&!l.parser.lazy[l.now().line]?s(I):m?_(I):y(I))}return I===45||Jt(I)?(n.consume(I),f+=String.fromCharCode(I),S):s(I)}function v(I){return I===62?(n.consume(I),l.interrupt?r:U):s(I)}function _(I){return Ve(I)?(n.consume(I),_):j(I)}function y(I){return I===47?(n.consume(I),j):I===58||I===95||sn(I)?(n.consume(I),A):Ve(I)?(n.consume(I),y):j(I)}function A(I){return I===45||I===46||I===58||I===95||Jt(I)?(n.consume(I),A):L(I)}function L(I){return I===61?(n.consume(I),D):Ve(I)?(n.consume(I),L):y(I)}function D(I){return I===null||I===60||I===61||I===62||I===96?s(I):I===34||I===39?(n.consume(I),c=I,R):Ve(I)?(n.consume(I),D):k(I)}function R(I){return I===c?(n.consume(I),c=null,M):I===null||De(I)?s(I):(n.consume(I),R)}function k(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ot(I)?L(I):(n.consume(I),k)}function M(I){return I===47||I===62||Ve(I)?y(I):s(I)}function j(I){return I===62?(n.consume(I),H):s(I)}function H(I){return I===null||De(I)?U(I):Ve(I)?(n.consume(I),H):s(I)}function U(I){return I===45&&d===2?(n.consume(I),G):I===60&&d===1?(n.consume(I),W):I===62&&d===4?(n.consume(I),N):I===63&&d===3?(n.consume(I),O):I===93&&d===5?(n.consume(I),z):De(I)&&(d===6||d===7)?(n.exit("htmlFlowData"),n.check(pb,$,F)(I)):I===null||De(I)?(n.exit("htmlFlowData"),F(I)):(n.consume(I),U)}function F(I){return n.check(mb,K,$)(I)}function K(I){return n.enter("lineEnding"),n.consume(I),n.exit("lineEnding"),Y}function Y(I){return I===null||De(I)?F(I):(n.enter("htmlFlowData"),U(I))}function G(I){return I===45?(n.consume(I),O):U(I)}function W(I){return I===47?(n.consume(I),f="",Z):U(I)}function Z(I){if(I===62){const re=f.toLowerCase();return hg.includes(re)?(n.consume(I),N):U(I)}return sn(I)&&f.length<8?(n.consume(I),f+=String.fromCharCode(I),Z):U(I)}function z(I){return I===93?(n.consume(I),O):U(I)}function O(I){return I===62?(n.consume(I),N):I===45&&d===2?(n.consume(I),O):U(I)}function N(I){return I===null||De(I)?(n.exit("htmlFlowData"),$(I)):(n.consume(I),N)}function $(I){return n.exit("htmlFlow"),r(I)}}function vb(n,r,s){const l=this;return d;function d(f){return De(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):s(f)}function m(f){return l.parser.lazy[l.now().line]?s(f):r(f)}}function yb(n,r,s){return l;function l(d){return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),n.attempt(Ja,r,s)}}const Sb={name:"htmlText",tokenize:bb};function bb(n,r,s){const l=this;let d,m,f;return o;function o(O){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(O),c}function c(O){return O===33?(n.consume(O),h):O===47?(n.consume(O),L):O===63?(n.consume(O),y):sn(O)?(n.consume(O),k):s(O)}function h(O){return O===45?(n.consume(O),p):O===91?(n.consume(O),m=0,T):sn(O)?(n.consume(O),_):s(O)}function p(O){return O===45?(n.consume(O),C):s(O)}function u(O){return O===null?s(O):O===45?(n.consume(O),b):De(O)?(f=u,W(O)):(n.consume(O),u)}function b(O){return O===45?(n.consume(O),C):u(O)}function C(O){return O===62?G(O):O===45?b(O):u(O)}function T(O){const N="CDATA[";return O===N.charCodeAt(m++)?(n.consume(O),m===N.length?E:T):s(O)}function E(O){return O===null?s(O):O===93?(n.consume(O),S):De(O)?(f=E,W(O)):(n.consume(O),E)}function S(O){return O===93?(n.consume(O),v):E(O)}function v(O){return O===62?G(O):O===93?(n.consume(O),v):E(O)}function _(O){return O===null||O===62?G(O):De(O)?(f=_,W(O)):(n.consume(O),_)}function y(O){return O===null?s(O):O===63?(n.consume(O),A):De(O)?(f=y,W(O)):(n.consume(O),y)}function A(O){return O===62?G(O):y(O)}function L(O){return sn(O)?(n.consume(O),D):s(O)}function D(O){return O===45||Jt(O)?(n.consume(O),D):R(O)}function R(O){return De(O)?(f=R,W(O)):Ve(O)?(n.consume(O),R):G(O)}function k(O){return O===45||Jt(O)?(n.consume(O),k):O===47||O===62||ot(O)?M(O):s(O)}function M(O){return O===47?(n.consume(O),G):O===58||O===95||sn(O)?(n.consume(O),j):De(O)?(f=M,W(O)):Ve(O)?(n.consume(O),M):G(O)}function j(O){return O===45||O===46||O===58||O===95||Jt(O)?(n.consume(O),j):H(O)}function H(O){return O===61?(n.consume(O),U):De(O)?(f=H,W(O)):Ve(O)?(n.consume(O),H):M(O)}function U(O){return O===null||O===60||O===61||O===62||O===96?s(O):O===34||O===39?(n.consume(O),d=O,F):De(O)?(f=U,W(O)):Ve(O)?(n.consume(O),U):(n.consume(O),K)}function F(O){return O===d?(n.consume(O),d=void 0,Y):O===null?s(O):De(O)?(f=F,W(O)):(n.consume(O),F)}function K(O){return O===null||O===34||O===39||O===60||O===61||O===96?s(O):O===47||O===62||ot(O)?M(O):(n.consume(O),K)}function Y(O){return O===47||O===62||ot(O)?M(O):s(O)}function G(O){return O===62?(n.consume(O),n.exit("htmlTextData"),n.exit("htmlText"),r):s(O)}function W(O){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),Z}function Z(O){return Ve(O)?Xe(n,z,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):z(O)}function z(O){return n.enter("htmlTextData"),f(O)}}const Uh={name:"labelEnd",resolveAll:Eb,resolveTo:kb,tokenize:Ab},Cb={tokenize:Tb},wb={tokenize:Rb},xb={tokenize:Db};function Eb(n){let r=-1;const s=[];for(;++r<n.length;){const l=n[r][1];if(s.push(n[r]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const d=l.type==="labelImage"?4:2;l.type="data",r+=d}}return n.length!==s.length&&On(n,0,n.length,s),n}function kb(n,r){let s=n.length,l=0,d,m,f,o;for(;s--;)if(d=n[s][1],m){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;n[s][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(m=s,d.type!=="labelLink")){l=2;break}}else d.type==="labelEnd"&&(f=s);const c={type:n[m][1].type==="labelLink"?"link":"image",start:{...n[m][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[m][1].start},end:{...n[f][1].end}},p={type:"labelText",start:{...n[m+l+2][1].end},end:{...n[f-2][1].start}};return o=[["enter",c,r],["enter",h,r]],o=$n(o,n.slice(m+1,m+l+3)),o=$n(o,[["enter",p,r]]),o=$n(o,jo(r.parser.constructs.insideSpan.null,n.slice(m+l+4,f-3),r)),o=$n(o,[["exit",p,r],n[f-2],n[f-1],["exit",h,r]]),o=$n(o,n.slice(f+1)),o=$n(o,[["exit",c,r]]),On(n,m,n.length,o),n}function Ab(n,r,s){const l=this;let d=l.events.length,m,f;for(;d--;)if((l.events[d][1].type==="labelImage"||l.events[d][1].type==="labelLink")&&!l.events[d][1]._balanced){m=l.events[d][1];break}return o;function o(b){return m?m._inactive?u(b):(f=l.parser.defined.includes(ni(l.sliceSerialize({start:m.end,end:l.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),c):s(b)}function c(b){return b===40?n.attempt(Cb,p,f?p:u)(b):b===91?n.attempt(wb,p,f?h:u)(b):f?p(b):u(b)}function h(b){return n.attempt(xb,p,u)(b)}function p(b){return r(b)}function u(b){return m._balanced=!0,s(b)}}function Tb(n,r,s){return l;function l(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),d}function d(u){return ot(u)?qa(n,m)(u):m(u)}function m(u){return u===41?p(u):k_(n,f,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return ot(u)?qa(n,c)(u):p(u)}function o(u){return s(u)}function c(u){return u===34||u===39||u===40?T_(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):p(u)}function h(u){return ot(u)?qa(n,p)(u):p(u)}function p(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function Rb(n,r,s){const l=this;return d;function d(o){return A_.call(l,n,m,f,"reference","referenceMarker","referenceString")(o)}function m(o){return l.parser.defined.includes(ni(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?r(o):s(o)}function f(o){return s(o)}}function Db(n,r,s){return l;function l(m){return n.enter("reference"),n.enter("referenceMarker"),n.consume(m),n.exit("referenceMarker"),d}function d(m){return m===93?(n.enter("referenceMarker"),n.consume(m),n.exit("referenceMarker"),n.exit("reference"),r):s(m)}}const Mb={name:"labelStartImage",resolveAll:Uh.resolveAll,tokenize:Lb};function Lb(n,r,s){const l=this;return d;function d(o){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(o),n.exit("labelImageMarker"),m}function m(o){return o===91?(n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelImage"),f):s(o)}function f(o){return o===94&&"_hiddenFootnoteSupport"in l.parser.constructs?s(o):r(o)}}const Ob={name:"labelStartLink",resolveAll:Uh.resolveAll,tokenize:Bb};function Bb(n,r,s){const l=this;return d;function d(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),m}function m(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?s(f):r(f)}}const Xu={name:"lineEnding",tokenize:jb};function jb(n,r){return s;function s(l){return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),Xe(n,r,"linePrefix")}}const Co={name:"thematicBreak",tokenize:Nb};function Nb(n,r,s){let l=0,d;return m;function m(h){return n.enter("thematicBreak"),f(h)}function f(h){return d=h,o(h)}function o(h){return h===d?(n.enter("thematicBreakSequence"),c(h)):l>=3&&(h===null||De(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===d?(n.consume(h),l++,c):(n.exit("thematicBreakSequence"),Ve(h)?Xe(n,o,"whitespace")(h):o(h))}}const Sn={continuation:{tokenize:Ub},exit:Fb,name:"list",tokenize:Ib},Hb={partial:!0,tokenize:qb},zb={partial:!0,tokenize:Pb};function Ib(n,r,s){const l=this,d=l.events[l.events.length-1];let m=d&&d[1].type==="linePrefix"?d[2].sliceSerialize(d[1],!0).length:0,f=0;return o;function o(C){const T=l.containerState.type||(C===42||C===43||C===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!l.containerState.marker||C===l.containerState.marker:Sh(C)){if(l.containerState.type||(l.containerState.type=T,n.enter(T,{_container:!0})),T==="listUnordered")return n.enter("listItemPrefix"),C===42||C===45?n.check(Co,s,h)(C):h(C);if(!l.interrupt||C===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(C)}return s(C)}function c(C){return Sh(C)&&++f<10?(n.consume(C),c):(!l.interrupt||f<2)&&(l.containerState.marker?C===l.containerState.marker:C===41||C===46)?(n.exit("listItemValue"),h(C)):s(C)}function h(C){return n.enter("listItemMarker"),n.consume(C),n.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||C,n.check(Ja,l.interrupt?s:p,n.attempt(Hb,b,u))}function p(C){return l.containerState.initialBlankLine=!0,m++,b(C)}function u(C){return Ve(C)?(n.enter("listItemPrefixWhitespace"),n.consume(C),n.exit("listItemPrefixWhitespace"),b):s(C)}function b(C){return l.containerState.size=m+l.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(C)}}function Ub(n,r,s){const l=this;return l.containerState._closeFlow=void 0,n.check(Ja,d,m);function d(o){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Xe(n,r,"listItemIndent",l.containerState.size+1)(o)}function m(o){return l.containerState.furtherBlankLines||!Ve(o)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,f(o)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,n.attempt(zb,r,f)(o))}function f(o){return l.containerState._closeFlow=!0,l.interrupt=void 0,Xe(n,n.attempt(Sn,r,s),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Pb(n,r,s){const l=this;return Xe(n,d,"listItemIndent",l.containerState.size+1);function d(m){const f=l.events[l.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===l.containerState.size?r(m):s(m)}}function Fb(n){n.exit(this.containerState.type)}function qb(n,r,s){const l=this;return Xe(n,d,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function d(m){const f=l.events[l.events.length-1];return!Ve(m)&&f&&f[1].type==="listItemPrefixWhitespace"?r(m):s(m)}}const fg={name:"setextUnderline",resolveTo:$b,tokenize:Gb};function $b(n,r){let s=n.length,l,d,m;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){l=s;break}n[s][1].type==="paragraph"&&(d=s)}else n[s][1].type==="content"&&n.splice(s,1),!m&&n[s][1].type==="definition"&&(m=s);const f={type:"setextHeading",start:{...n[l][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",m?(n.splice(d,0,["enter",f,r]),n.splice(m+1,0,["exit",n[l][1],r]),n[l][1].end={...n[m][1].end}):n[l][1]=f,n.push(["exit",f,r]),n}function Gb(n,r,s){const l=this;let d;return m;function m(h){let p=l.events.length,u;for(;p--;)if(l.events[p][1].type!=="lineEnding"&&l.events[p][1].type!=="linePrefix"&&l.events[p][1].type!=="content"){u=l.events[p][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||u)?(n.enter("setextHeadingLine"),d=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),o(h)}function o(h){return h===d?(n.consume(h),o):(n.exit("setextHeadingLineSequence"),Ve(h)?Xe(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||De(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const Vb={tokenize:Wb};function Wb(n){const r=this,s=n.attempt(Ja,l,n.attempt(this.parser.constructs.flowInitial,d,Xe(n,n.attempt(this.parser.constructs.flow,d,n.attempt(JS,d)),"linePrefix")));return s;function l(m){if(m===null){n.consume(m);return}return n.enter("lineEndingBlank"),n.consume(m),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function d(m){if(m===null){n.consume(m);return}return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const Kb={resolveAll:D_()},Yb=R_("string"),Xb=R_("text");function R_(n){return{resolveAll:D_(n==="text"?Qb:void 0),tokenize:r};function r(s){const l=this,d=this.parser.constructs[n],m=s.attempt(d,f,o);return f;function f(p){return h(p)?m(p):o(p)}function o(p){if(p===null){s.consume(p);return}return s.enter("data"),s.consume(p),c}function c(p){return h(p)?(s.exit("data"),m(p)):(s.consume(p),c)}function h(p){if(p===null)return!0;const u=d[p];let b=-1;if(u)for(;++b<u.length;){const C=u[b];if(!C.previous||C.previous.call(l,l.previous))return!0}return!1}}}function D_(n){return r;function r(s,l){let d=-1,m;for(;++d<=s.length;)m===void 0?s[d]&&s[d][1].type==="data"&&(m=d,d++):(!s[d]||s[d][1].type!=="data")&&(d!==m+2&&(s[m][1].end=s[d-1][1].end,s.splice(m+2,d-m-2),d=m+2),m=void 0);return n?n(s,l):s}}function Qb(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const l=n[s-1][1],d=r.sliceStream(l);let m=d.length,f=-1,o=0,c;for(;m--;){const h=d[m];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)o++,f--;if(f)break;f=-1}else if(h===-2)c=!0,o++;else if(h!==-1){m++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(o=0),o){const h={type:s===n.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:m?f:l.start._bufferIndex+f,_index:l.start._index+m,line:l.end.line,column:l.end.column-o,offset:l.end.offset-o},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const Jb={42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:C_},Zb={91:ib},eC={[-2]:Yu,[-1]:Yu,32:Yu},tC={35:cb,42:Co,45:[fg,Co],60:db,61:fg,95:Co,96:ug,126:ug},nC={38:x_,92:w_},iC={[-5]:Xu,[-4]:Xu,[-3]:Xu,33:Mb,38:x_,42:bh,60:[OS,Sb],91:Ob,92:[lb,w_],93:Uh,95:bh,96:VS},rC={null:[bh,Kb]},sC={null:[42,95]},aC={null:[]},lC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:sC,contentInitial:Zb,disable:aC,document:Jb,flow:tC,flowInitial:eC,insideSpan:rC,string:nC,text:iC},Symbol.toStringTag,{value:"Module"}));function oC(n,r,s){let l={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const d={},m=[];let f=[],o=[];const c={attempt:R(L),check:R(D),consume:_,enter:y,exit:A,interrupt:R(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:T,parser:n,previous:null,sliceSerialize:b,sliceStream:C,write:u};let p=r.tokenize.call(h,c);return r.resolveAll&&m.push(r),h;function u(H){return f=$n(f,H),S(),f[f.length-1]!==null?[]:(k(r,0),h.events=jo(m,h.events,h),h.events)}function b(H,U){return uC(C(H),U)}function C(H){return cC(f,H)}function T(){const{_bufferIndex:H,_index:U,line:F,column:K,offset:Y}=l;return{_bufferIndex:H,_index:U,line:F,column:K,offset:Y}}function E(H){d[H.line]=H.column,j()}function S(){let H;for(;l._index<f.length;){const U=f[l._index];if(typeof U=="string")for(H=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===H&&l._bufferIndex<U.length;)v(U.charCodeAt(l._bufferIndex));else v(U)}}function v(H){p=p(H)}function _(H){De(H)?(l.line++,l.column=1,l.offset+=H===-3?2:1,j()):H!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===f[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=H}function y(H,U){const F=U||{};return F.type=H,F.start=T(),h.events.push(["enter",F,h]),o.push(F),F}function A(H){const U=o.pop();return U.end=T(),h.events.push(["exit",U,h]),U}function L(H,U){k(H,U.from)}function D(H,U){U.restore()}function R(H,U){return F;function F(K,Y,G){let W,Z,z,O;return Array.isArray(K)?$(K):"tokenize"in K?$([K]):N(K);function N(pe){return Q;function Q(q){const ee=q!==null&&pe[q],ae=q!==null&&pe.null,de=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return $(de)(q)}}function $(pe){return W=pe,Z=0,pe.length===0?G:I(pe[Z])}function I(pe){return Q;function Q(q){return O=M(),z=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?ve():pe.tokenize.call(U?Object.assign(Object.create(h),U):h,c,re,ve)(q)}}function re(pe){return H(z,O),Y}function ve(pe){return O.restore(),++Z<W.length?I(W[Z]):G}}}function k(H,U){H.resolveAll&&!m.includes(H)&&m.push(H),H.resolve&&On(h.events,U,h.events.length-U,H.resolve(h.events.slice(U),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function M(){const H=T(),U=h.previous,F=h.currentConstruct,K=h.events.length,Y=Array.from(o);return{from:K,restore:G};function G(){l=H,h.previous=U,h.currentConstruct=F,h.events.length=K,o=Y,j()}}function j(){l.line in d&&l.column<2&&(l.column=d[l.line],l.offset+=d[l.line]-1)}}function cC(n,r){const s=r.start._index,l=r.start._bufferIndex,d=r.end._index,m=r.end._bufferIndex;let f;if(s===d)f=[n[s].slice(l,m)];else{if(f=n.slice(s,d),l>-1){const o=f[0];typeof o=="string"?f[0]=o.slice(l):f.shift()}m>0&&f.push(n[d].slice(0,m))}return f}function uC(n,r){let s=-1;const l=[];let d;for(;++s<n.length;){const m=n[s];let f;if(typeof m=="string")f=m;else switch(m){case-5:{f="\r";break}case-4:{f=`
|
|
59
|
+
`,_)}paste(v){this._core.paste(v)}refresh(v,_){this._verifyIntegers(v,_),this._core.refresh(v,_)}reset(){this._core.reset()}clearTextureAtlas(){this._core.clearTextureAtlas()}loadAddon(v){this._addonManager.loadAddon(this,v)}static get strings(){return o}_verifyIntegers(...v){for(const _ of v)if(_===1/0||isNaN(_)||_%1!=0)throw new Error("This API only accepts integers")}_verifyPositiveIntegers(...v){for(const _ of v)if(_&&(_===1/0||isNaN(_)||_%1!=0||_<0))throw new Error("This API only accepts positive integers")}}f.Terminal=E})(),m})()))})(Gu)),Gu.exports}var m1=p1();class g1{constructor(r,s){Em(this,"socket");const d=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws/terminal/${encodeURIComponent(r)}`;this.socket=new WebSocket(d),this.socket.addEventListener("message",m=>{var o,c,h;let f;try{f=JSON.parse(m.data)}catch(p){(o=s.onError)==null||o.call(s,`Terminal message parse failed for session ${r}. Reason: ${Lo(p)}`);return}f.type==="output"?s.onOutput(f.data):f.type==="error"?(c=s.onError)==null||c.call(s,f.message):(h=s.onStatus)==null||h.call(s,f)}),this.socket.addEventListener("error",()=>{var m;(m=s.onError)==null||m.call(s,`Terminal WebSocket connection failed for session ${r}. URL: ${d}. Check that the VCM backend is running and the session still exists.`)})}sendInput(r){this.send({type:"input",data:r})}resize(r,s){this.send({type:"resize",cols:r,rows:s})}close(){this.socket.close()}send(r){const s=JSON.stringify(r);if(this.socket.readyState===WebSocket.OPEN){this.socket.send(s);return}this.socket.addEventListener("open",()=>this.socket.send(s),{once:!0})}}function Oo({sessionId:n,active:r=!0,onEvent:s}){const l=te.useRef(null),d=te.useRef(null),m=te.useRef(null),f=te.useRef(null),o=te.useRef(r),c=te.useRef(s);function h(p={}){const u=l.current,b=d.current,C=m.current,T=f.current;if(!u||!b||!C||!T)return!1;const E=u.getBoundingClientRect();return E.width<Pm||E.height<Fm||(C.fit(),T.cols<qm||T.rows<$m)?!1:(b.resize(T.cols,T.rows),p.focus&&T.focus(),!0)}return te.useEffect(()=>{c.current=s},[s]),te.useEffect(()=>{o.current=r},[r]),te.useEffect(()=>{if(!l.current)return;const p=new m1.Terminal({cursorBlink:!0,convertEol:!0,drawBoldTextInBrightColors:!0,fontFamily:"Menlo, Monaco, Consolas, monospace",fontSize:13,fontWeight:"400",fontWeightBold:"700",lineHeight:1.35,macOptionIsMeta:!0,scrollback:1e4,theme:_1}),u=new h1.FitAddon;p.loadAddon(u),p.loadAddon(new d1.WebLinksAddon),p.open(l.current),f.current=p,m.current=u;const b=l.current.getBoundingClientRect();b.width>=Pm&&b.height>=Fm&&u.fit();const C=new g1(n,{onOutput(A){p.write(A)},onStatus(A){var L;(L=c.current)==null||L.call(c,A.type)},onError(A){var L;p.writeln(`\r
|
|
60
|
+
[VCM] ${A}`),(L=c.current)==null||L.call(c,A)}});d.current=C,p.cols>=qm&&p.rows>=$m&&C.resize(p.cols,p.rows);const T=p.onData(A=>{C.sendInput(A)});let E=0,S=0,v=0;const _=()=>{E&&window.cancelAnimationFrame(E),E=window.requestAnimationFrame(()=>{E=0,h({focus:o.current})})},y=new ResizeObserver(()=>{_()});return y.observe(l.current),S=window.requestAnimationFrame(_),v=window.setTimeout(_,120),()=>{E&&window.cancelAnimationFrame(E),S&&window.cancelAnimationFrame(S),v&&window.clearTimeout(v),y.disconnect(),T.dispose(),C.close(),p.dispose(),d.current=null,f.current=null,m.current=null}},[n]),te.useEffect(()=>{if(!r)return;const p=[],u=[];return p.push(window.requestAnimationFrame(()=>{h({focus:!0}),p.push(window.requestAnimationFrame(()=>h({focus:!0})))})),u.push(window.setTimeout(()=>h({focus:!0}),160)),u.push(window.setTimeout(()=>h({focus:!0}),360)),()=>{for(const b of p)window.cancelAnimationFrame(b);for(const b of u)window.clearTimeout(b)}},[r]),te.useEffect(()=>{const p=()=>{o.current&&h()};return window.addEventListener("resize",p),()=>window.removeEventListener("resize",p)},[]),x.jsx("div",{className:"terminal-frame",ref:l,onMouseDown:()=>{var p;return(p=f.current)==null?void 0:p.focus()}})}const Pm=160,Fm=80,qm=20,$m=5,_1={background:"#0d1117",foreground:"#d6deeb",cursor:"#ffd866",cursorAccent:"#0d1117",selectionBackground:"#264f78",selectionForeground:"#ffffff",black:"#1f2430",red:"#ff5c57",green:"#5af78e",yellow:"#f3f99d",blue:"#57c7ff",magenta:"#ff6ac1",cyan:"#9aedfe",white:"#f1f1f0",brightBlack:"#686868",brightRed:"#ff5c57",brightGreen:"#5af78e",brightYellow:"#f3f99d",brightBlue:"#57c7ff",brightMagenta:"#ff6ac1",brightCyan:"#9aedfe",brightWhite:"#ffffff"},n_=[{value:"bypassPermissions",label:"bypassPermissions",description:"Bypass prompts; recommended in DevContainer worktrees"},{value:"plan",label:"plan",description:"Plan-only permission mode"},{value:"default",label:"default",description:"Claude Code default permission behavior"}],i_=[{value:"default",label:"Default",description:"Account default"},{value:"best",label:"Best",description:"Fable 5 or latest Opus"},{value:"fable",label:"Fable 5",description:"1M context, v2.1.170+"},{value:"opus",label:"Opus",description:"latest Opus"},{value:"opus[1m]",label:"Opus 1M",description:"Force 1M context"},{value:"claude-opus-4-8",label:"Opus 4.8",description:"Current Opus"},{value:"claude-opus-4-8[1m]",label:"Opus 4.8 1M",description:"Opus 4.8 + 1M context"}],v1=[{value:"default",label:"Default",description:"CLI or project default"},{value:"low",label:"Low",description:"Fastest reasoning"},{value:"medium",label:"Medium",description:"Balanced reasoning"},{value:"high",label:"High",description:"Deeper reasoning"},{value:"xhigh",label:"XHigh",description:"Extra high reasoning"}],r_=[...v1,{value:"max",label:"Max",description:"Maximum reasoning"},{value:"ultracode",label:"Ultracode",description:"Claude Code dynamic workflows with xhigh reasoning"}];function Ni({status:n}){return x.jsx("span",{className:`status-badge status-${n}`,children:n.replaceAll("_"," ")})}function Mh({role:n,session:r,permissionMode:s,model:l,effort:d,busy:m=!1,onPermissionModeChange:f,onModelChange:o,onEffortChange:c,onStart:h,onResume:p,onStop:u,onRestart:b,onNotifyHarnessUpdated:C}){const T=(r==null?void 0:r.status)==="running",E=!!(r!=null&&r.claudeSessionId&&!T),S=!T&&!(r!=null&&r.claudeSessionId),v=!!(r!=null&&r.harnessOutdated);return x.jsxs("div",{className:"session-controls",children:[x.jsxs("label",{className:"session-option-field permission-mode-field",children:[x.jsx("span",{children:"Permission"}),x.jsx("select",{value:s,onChange:_=>f(_.target.value),children:n_.map(_=>x.jsx("option",{value:_.value,children:_.label},_.value))})]}),x.jsxs("label",{className:"session-option-field model-field",children:[x.jsx("span",{children:"Model"}),x.jsx("select",{value:l,onChange:_=>o(_.target.value),children:i_.map(_=>x.jsx("option",{value:_.value,children:_.label},_.value))})]}),x.jsxs("label",{className:"session-option-field effort-field",children:[x.jsx("span",{children:"Effort"}),x.jsx("select",{value:d,onChange:_=>c(_.target.value),children:r_.map(_=>x.jsx("option",{value:_.value,children:_.label},_.value))})]}),x.jsxs("div",{className:"session-toolbar",children:[x.jsx("button",{type:"button",disabled:m||!S,onClick:h,children:"Start"}),x.jsx("button",{type:"button",disabled:m||!E,onClick:p,children:"Resume"}),x.jsx("button",{type:"button",disabled:m||!r,onClick:b,children:"Restart"}),x.jsx("button",{type:"button",disabled:m||!r,onClick:u,children:"Stop"})]}),v?x.jsxs("div",{className:"session-harness-notice",children:[x.jsx(Ni,{status:"outdated"}),x.jsxs("span",{children:["Harness updated",(r==null?void 0:r.harnessRevision)!==void 0&&r.harnessCurrentRevision!==void 0?` (${r.harnessRevision} -> ${r.harnessCurrentRevision})`:""]}),x.jsx("button",{type:"button",disabled:m||!T||!C,onClick:C,children:"Notify role"})]}):null]})}function y1({busy:n,effort:r,model:s,open:l,permissionMode:d,taskSlug:m,bootstrapStatus:f,engineerSession:o,status:c,onClose:h,onEffortChange:p,onModelChange:u,onPermissionModeChange:b,onEngineerResume:C,onEngineerRestart:T,onEngineerStart:E,onEngineerStop:S,onEngineerNotifyHarnessUpdated:v,onOpenRepositoryDiff:_,onReviewTaskHarness:y,onRefresh:A}){const[L,D]=te.useState(null),[R,k]=te.useState(null),[M,j]=te.useState(""),[H,U]=te.useState(!1),[F,K]=te.useState(!1),[,Y]=Hi(null),[G,W]=te.useState(null),Z=(c==null?void 0:c.files)??[],z=Z.filter(ee=>ee.kind.startsWith("agent-")),O=z.filter(ee=>Gm(ee)),N=z.filter(ee=>!Gm(ee)),$=Z.filter(ee=>ee.kind.startsWith("skill-")),I=Z.filter(ee=>ee.kind.startsWith("tool-")),re=Z.filter(ee=>ee.kind==="root-claude"||ee.kind==="gitignore"||ee.kind==="pull-request-template"),ve=!!(R&&M!==R.content);te.useEffect(()=>{l||(D(null),k(null),j(""),U(!1),Y(null))},[Z,l,L]),te.useEffect(()=>{if(!l||!L||!m)return;let ee=!1;return K(!0),Y(null),U(!1),Se.getHarnessFileContent(m,L).then(ae=>{ee||(k(ae),j(ae.content))}).catch(ae=>{ee||Y(pt(`Load harness file ${L}`,ae))}).finally(()=>{ee||K(!1)}),()=>{ee=!0}},[l,L,m]);async function pe(){if(!(!R||!R.editable||!ve||!m)){K(!0),Y(null);try{const ee=await Se.updateHarnessFileContent(m,R.path,{content:M});k(ee.file),j(ee.file.content),U(!1),A()}catch(ee){Y(pt(`Save harness file ${R.path}`,ee))}finally{K(!1)}}}function Q(){D(null),k(null),j(""),U(!1),Y(null)}async function q(ee){Y(null);try{await S1(ee),W(ee),window.setTimeout(()=>{W(ae=>ae===ee?null:ae)},1200)}catch(ae){Y(pt(`Copy harness file path ${ee}`,ae))}}return l?x.jsx(x.Fragment,{children:x.jsx("div",{className:"modal-backdrop harness-studio-backdrop",children:x.jsxs("section",{className:"harness-studio-modal",role:"dialog","aria-modal":"true","aria-label":"Harness Studio",children:[x.jsxs("header",{className:"harness-studio-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Harness Studio"}),m?null:x.jsx("p",{className:"muted",children:"Create or select a task before editing harness files."})]}),x.jsxs("div",{className:"harness-studio-header-actions",children:[x.jsx("button",{type:"button",disabled:n||!m,onClick:y,children:"Review Task Harness"}),x.jsx("button",{type:"button",disabled:n,onClick:_,children:"Review Diff"}),x.jsx("button",{type:"button",disabled:n,onClick:A,children:"Refresh"}),x.jsx("button",{type:"button",onClick:h,children:"Close"})]})]}),x.jsxs("div",{className:"harness-studio-layout",children:[x.jsx("aside",{className:L?"harness-studio-left harness-studio-left-preview":"harness-studio-left",children:L?x.jsxs("section",{className:"harness-studio-section harness-studio-file-preview",children:[x.jsxs("header",{className:"harness-studio-file-editor-header",children:[x.jsxs("div",{children:[x.jsx("h3",{children:(R==null?void 0:R.title)??"Harness File"}),x.jsx("p",{className:"muted",children:(R==null?void 0:R.path)??L})]}),x.jsxs("div",{className:"harness-studio-file-editor-actions",children:[R?x.jsx(Ni,{status:R.editable?"ok":"unknown"}):null,H?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",disabled:F||!m||!(R!=null&&R.editable)||!ve,onClick:()=>void pe(),children:"Save"}),x.jsx("button",{type:"button",disabled:F,onClick:()=>{j((R==null?void 0:R.content)??""),U(!1)},children:"Cancel"})]}):x.jsx("button",{type:"button",disabled:F||!m||!(R!=null&&R.editable),onClick:()=>U(!0),children:"Edit"}),x.jsx("button",{type:"button",onClick:Q,children:"Return"})]})]}),R!=null&&R.readonlyReason?x.jsx("p",{className:"muted",children:R.readonlyReason}):null,x.jsx("textarea",{className:H?"harness-studio-file-textarea is-editing":"harness-studio-file-textarea",value:M,spellCheck:!1,readOnly:!H,disabled:F,onChange:ee=>j(ee.target.value)})]}):x.jsxs(x.Fragment,{children:[x.jsx(Na,{title:"VCM Roles",files:O,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D}),x.jsx(Na,{title:"Auxiliary Roles",files:N,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D}),x.jsx(dh,{title:"Overview",children:x.jsxs("section",{className:"harness-studio-overview",children:[x.jsxs("div",{className:"harness-studio-metrics",children:[x.jsx(Ts,{label:"Fixed install",value:c?c.initialized?c.needsApply?"updates":"current":"new":"unknown"}),x.jsx(Ts,{label:"Revision",value:String((c==null?void 0:c.harnessRevision)??0)}),x.jsx(Ts,{label:"Managed files",value:String(Z.length)}),x.jsx(Ts,{label:"Pending updates",value:String((c==null?void 0:c.plannedChanges.length)??0)}),x.jsx(Ts,{label:"Bootstrap",value:(f==null?void 0:f.status.replaceAll("_"," "))??"unknown"}),x.jsx(Ts,{label:"Engineer",value:Vm(o)})]}),c!=null&&c.warnings.length?x.jsx("ul",{className:"warnings",children:c.warnings.map(ee=>x.jsx("li",{children:ee},ee))}):null]})}),x.jsx(Na,{title:"Skills",files:$,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D,collapsible:!0}),x.jsx(Na,{title:"Root Context",files:re,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D,collapsible:!0}),x.jsx(Na,{title:"Tools",files:I,selectedPath:L,copiedPath:G,onCopy:ee=>void q(ee),onSelect:D,collapsible:!0}),x.jsx(dh,{title:"Project Docs",children:x.jsx("ul",{className:"harness-studio-doc-list",children:(f==null?void 0:f.checks.map(ee=>x.jsxs("li",{children:[x.jsx("span",{children:ee.path??ee.label}),x.jsx(Ni,{status:ee.status})]},ee.key)))??x.jsx("li",{children:x.jsx("span",{children:"No bootstrap status loaded."})})})})]})}),x.jsxs("section",{className:"harness-studio-section harness-studio-engineer",children:[x.jsxs("div",{className:"harness-studio-engineer-header",children:[x.jsxs("div",{children:[x.jsx("h3",{children:"Harness Engineer"}),x.jsx("p",{className:"muted",children:Vm(o)})]}),x.jsx(Ni,{status:(o==null?void 0:o.status)??"unknown"})]}),x.jsx(Mh,{role:"harness-engineer",session:o??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:b,onModelChange:u,onEffortChange:p,onStart:E,onResume:C,onRestart:T,onStop:S,onNotifyHarnessUpdated:v}),x.jsx("div",{className:"harness-engineer-terminal",children:(o==null?void 0:o.status)==="running"?x.jsx(Oo,{sessionId:o.id,active:l},o.id):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:"harness-engineer"}),x.jsx("span",{children:o!=null&&o.claudeSessionId?"Resume this project Harness Engineer session.":"Start this project Harness Engineer session."})]})})]})]})]})})}):null}function Ts({label:n,value:r}){return x.jsxs("div",{className:"harness-studio-metric",children:[x.jsx("span",{children:n}),x.jsx("strong",{children:r})]})}function Na({title:n,files:r,selectedPath:s,copiedPath:l,onCopy:d,onSelect:m,collapsible:f=!1}){const o=x.jsx("ol",{className:"harness-studio-file-list",children:r.length?r.map(c=>x.jsxs("li",{className:c.path===s?"selected":void 0,children:[x.jsx("button",{className:"harness-studio-file-path-button",type:"button",title:c.path,onClick:()=>m(c.path),children:c.path}),x.jsx("button",{className:"harness-studio-file-copy-button",type:"button",title:`Copy ${c.path}`,onClick:()=>d(c.path),children:l===c.path?"Copied":"Copy"}),x.jsx(Ni,{status:c.action})]},c.path)):x.jsx("li",{children:x.jsx("span",{children:"No files."})})});return f?x.jsx(dh,{title:n,children:o}):x.jsxs("section",{className:"harness-studio-section",children:[x.jsx("h3",{children:n}),o]})}function dh({title:n,children:r}){return x.jsxs("details",{className:"harness-studio-section harness-studio-collapsible-section",children:[x.jsxs("summary",{children:[x.jsx("h3",{children:n}),x.jsx("span",{children:"Show"})]}),x.jsx("div",{className:"harness-studio-collapsible-content",children:r})]})}function Gm(n){return n.kind==="agent-project-manager"||n.kind==="agent-architect"||n.kind==="agent-coder"||n.kind==="agent-reviewer"||n.kind==="agent-gate-reviewer"}function Vm(n){return n?n.status==="running"?`${n.status} / ${n.activityStatus??"idle"}`:n.status:"not started"}async function S1(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function b1({open:n,taskSlug:r,onClose:s}){var k;const[l,d]=te.useState(null),[m,f]=te.useState(null),[o,c]=te.useState(null),[h,p]=te.useState(null),[u,b]=te.useState(null),[C,T]=te.useState(!1),[E,S]=te.useState(!1),[,v]=Hi(null),[_,y]=te.useState(null),A=te.useMemo(()=>(l==null?void 0:l.files.find(M=>M.path===o))??(l==null?void 0:l.files[0])??null,[l,o]);async function L(M=m){var j;T(!0),v(null);try{if(!r)throw new Error("Create or select a task before reviewing harness commits.");const H=await Se.getRepositoryDiff(r,M);d(H),p(null),f(((j=H.commit)==null?void 0:j.sha)??null),c(U=>{var F;return U&&H.files.some(K=>K.path===U)?U:((F=H.files[0])==null?void 0:F.path)??null})}catch(H){v(pt(M?`Load commit diff ${M}`:"Load latest commit diff",H))}finally{T(!1)}}te.useEffect(()=>{n&&(f(null),y(null),L(null))},[n,r]);async function D(M){b(M),v(null);try{if(!r)throw new Error("Create or select a task before reviewing file diffs.");const j=await Se.getRepositoryFileDiff(r,M);p(j),c(M)}catch(j){v(pt(`Load task file diff for ${M}`,j))}finally{b(null)}}async function R(){if(v(null),y(null),!r){v("Create or select a task before merging the task branch.");return}if(!l){v("Load the commit diff before merging the task branch.");return}const M=l.commits.length?l.commits.map(H=>`- ${H.shortSha} ${H.subject}`):["- No new commits found."];if(window.confirm([`Merge ${l.sourceBranch} into ${l.targetBranch}?`,"","VCM will run a fast-forward merge only.","The merge will fail if the task worktree or connected repository has uncommitted changes.","If the connected repository branch has diverged, rebase or merge manually first.","","Commits:",...M].join(`
|
|
61
|
+
`))){S(!0);try{const H=await Se.mergeRepositoryDiffToCurrentBranch(r);y(H.changed?`Merged ${H.sourceBranch} into ${H.targetBranch} at ${H.afterSha.slice(0,12)}.`:`${H.targetBranch} already includes ${H.sourceBranch}.`),f(null),await L(null)}catch(H){v(pt("Merge task branch to connected repository branch",H))}finally{S(!1)}}}return n?x.jsx("div",{className:"modal-backdrop repository-diff-backdrop",children:x.jsxs("section",{className:"repository-diff-modal",role:"dialog","aria-modal":"true","aria-label":"Commit Diff",children:[x.jsxs("header",{className:"repository-diff-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Commit Diff"}),x.jsx("p",{children:l?`${((k=l.commit)==null?void 0:k.shortSha)??"HEAD"} · ${l.summary.totalFiles} files · +${l.summary.additions} / -${l.summary.deletions}`:"Review a new commit on the active task worktree branch."})]}),x.jsxs("div",{className:"repository-diff-header-actions",children:[x.jsxs("label",{className:"repository-diff-commit-picker",children:[x.jsx("span",{children:"Commit"}),x.jsx("select",{value:m??"",disabled:C||!(l!=null&&l.commits.length),onChange:M=>{const j=M.target.value||null;f(j),L(j)},children:l==null?void 0:l.commits.map(M=>x.jsxs("option",{value:M.sha,children:[M.shortSha," · ",M.subject]},M.sha))})]}),x.jsx("button",{type:"button",disabled:C,onClick:()=>void L(),children:"Refresh"}),x.jsx("button",{type:"button",disabled:C||E||!r||!(l!=null&&l.commits.length),onClick:()=>void R(),children:E?"Merging...":"Merge to Main"}),x.jsx("button",{type:"button",onClick:s,children:"Close"})]})]}),_?x.jsx("p",{className:"success-banner",children:_}):null,l!=null&&l.warnings.length?x.jsx("ul",{className:"warnings repository-diff-warnings",children:l.warnings.map(M=>x.jsx("li",{children:M},M))}):null,x.jsxs("div",{className:"repository-diff-body",children:[x.jsxs("aside",{className:"repository-diff-sidebar",children:[x.jsx(C1,{report:l,busy:C}),x.jsxs("ol",{className:"repository-diff-file-list",children:[l==null?void 0:l.files.map(M=>x.jsx("li",{className:[(A==null?void 0:A.path)===M.path&&!h?"selected":"",(h==null?void 0:h.path)===M.path?"task-diff-selected":""].filter(Boolean).join(" "),children:x.jsxs("div",{className:"repository-diff-file-row",children:[x.jsxs("button",{className:"repository-diff-file-select",type:"button",onClick:()=>{p(null),c(M.path)},children:[x.jsx("span",{children:M.path}),x.jsxs("small",{children:[mh(M.status)," · ",Wm(M.stage)," · ",ph(M.category)]})]}),x.jsx("button",{className:"repository-diff-task-file-button",type:"button",disabled:u===M.path,title:"View this file diff across the whole task worktree",onClick:()=>void D(M.path),children:u===M.path?"...":"Task diff"})]})},M.path)),l&&l.files.length===0?x.jsx("li",{className:"repository-diff-empty",children:l.commits.length===0?"No new commits on this task branch.":"No files in this commit."}):null]})]}),x.jsx("main",{className:"repository-diff-main",children:h?x.jsx(w1,{diff:h,onClose:()=>p(null)}):A?x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"repository-diff-file-header",children:[x.jsxs("div",{children:[x.jsx("h3",{children:A.path}),x.jsxs("p",{children:[ph(A.category)," · ",mh(A.status)," · ",Wm(A.stage)]})]}),x.jsxs("span",{className:"repository-diff-stats",children:["+",A.additions," / -",A.deletions]})]}),A.binary?x.jsx("p",{className:"muted",children:"Binary or non-regular file. Text diff is not available."}):null,A.truncated?x.jsx("p",{className:"muted",children:"Diff was truncated for display."}):null,x.jsx("pre",{className:"repository-diff-code","aria-label":`${A.path} diff`,children:s_(A.diff)})]}):x.jsx("div",{className:"repository-diff-placeholder",children:C?"Loading commit diff...":"No diff selected."})})]})]})}):null}function C1({report:n,busy:r}){var l;const s=n==null?void 0:n.summary;return x.jsxs("div",{className:"repository-diff-summary",children:[x.jsx("strong",{children:r?"Loading":n?"Commit changes":"Not loaded"}),s?x.jsxs(x.Fragment,{children:[x.jsxs("span",{children:[s.harnessFiles," harness files"]}),x.jsxs("span",{children:[s.productCodeFiles," product code files"]}),x.jsxs("span",{children:[s.committedFiles," committed files"]}),x.jsxs("span",{children:[(n==null?void 0:n.commits.length)??0," branch commits"]}),x.jsx("span",{children:((l=n==null?void 0:n.commit)==null?void 0:l.subject)??"HEAD"})]}):null]})}function w1({diff:n,onClose:r}){const s=n.file;return x.jsxs(x.Fragment,{children:[x.jsxs("div",{className:"repository-diff-file-header",children:[x.jsxs("div",{children:[x.jsx("h3",{children:n.path}),x.jsxs("p",{children:["Task diff · ",n.targetBranch," ",n.baseSha.slice(0,12)," → ",n.sourceBranch," worktree ",n.headSha.slice(0,12)]})]}),x.jsxs("div",{className:"repository-diff-task-file-actions",children:[s?x.jsxs("span",{className:"repository-diff-stats",children:["+",s.additions," / -",s.deletions]}):null,x.jsx("button",{type:"button",onClick:r,children:"Commit diff"})]})]}),n.warnings.length>0?x.jsx("ul",{className:"warnings repository-diff-warnings",children:n.warnings.map(l=>x.jsx("li",{children:l},l))}):null,s?x.jsxs(x.Fragment,{children:[x.jsxs("p",{className:"muted",children:[ph(s.category)," · ",mh(s.status)," · whole task comparison"]}),s.binary?x.jsx("p",{className:"muted",children:"Binary or non-regular file. Text diff is not available."}):null,s.truncated?x.jsx("p",{className:"muted",children:"Diff was truncated for display."}):null,x.jsx("pre",{className:"repository-diff-code","aria-label":`${n.path} task diff`,children:s_(s.diff)})]}):x.jsx("div",{className:"repository-diff-placeholder",children:"No task-level diff for this file."})]})}function ph(n){switch(n){case"fixed_harness":return"fixed harness";case"tools_hooks":return"tools/hooks";case"generated_context":return"generated context";case"project_docs":return"project docs";case"product_code":return"product code"}}function Wm(n){return n.replaceAll("_"," ")}function mh(n){return n.replaceAll("_"," ")}function s_(n){return n.split(`
|
|
62
|
+
`).filter(r=>!E1(r)).map((r,s)=>x.jsx("span",{className:`repository-diff-line ${x1(r)}`,children:r||" "},`${s}:${r}`))}function x1(n){return n.startsWith("+")&&!n.startsWith("+++")?"repository-diff-line-added":n.startsWith("-")&&!n.startsWith("---")?"repository-diff-line-deleted":n.startsWith("@@")?"repository-diff-line-hunk":"repository-diff-line-context"}function E1(n){return n.startsWith("diff --git")||n.startsWith("index ")||n.startsWith("new file mode ")||n.startsWith("deleted file mode ")||n.startsWith("similarity index ")||n.startsWith("rename from ")||n.startsWith("rename to ")||n.startsWith("--- ")||n.startsWith("+++ ")}function k1({busy:n,effort:r,model:s,open:l,permissionMode:d,session:m,onClose:f,onEffortChange:o,onModelChange:c,onPermissionModeChange:h,onResume:p,onRestart:u,onStart:b,onStop:C,onNotifyHarnessUpdated:T}){return l?x.jsx("div",{className:"modal-backdrop translator-session-backdrop",children:x.jsxs("section",{className:"translator-session-modal",role:"dialog","aria-modal":"true","aria-label":"Translator Session",children:[x.jsxs("header",{className:"translator-session-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Translator Session"}),x.jsx("p",{children:A1(m)})]}),x.jsx("button",{type:"button",onClick:f,children:"Close"})]}),x.jsx(Mh,{role:"translator",session:m??void 0,permissionMode:d,model:s,effort:r,busy:n,onPermissionModeChange:h,onModelChange:c,onEffortChange:o,onStart:b,onResume:p,onRestart:u,onStop:C,onNotifyHarnessUpdated:T}),x.jsx("div",{className:"translator-session-terminal",children:(m==null?void 0:m.status)==="running"?x.jsx(Oo,{sessionId:m.id,active:l},m.id):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:"translator"}),x.jsx("span",{children:m!=null&&m.claudeSessionId?"Resume this project translator session.":"Start the project translator session."})]})})]})}):null}function A1(n){if(!n)return"not started";const r=n.status==="running"?` · ${n.activityStatus??"idle"}`:"";return`${n.status}${r}`}function T1(n,r){const s={};return(n[n.length-1]===""?[...n,""]:n).join((s.padRight?" ":"")+","+(s.padLeft===!1?"":" ")).trim()}const R1=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,D1=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,M1={};function Km(n,r){return(M1.jsx?D1:R1).test(n)}const L1=/[ \t\n\f\r]/g;function O1(n){return typeof n=="object"?n.type==="text"?Ym(n.value):!1:Ym(n)}function Ym(n){return n.replace(L1,"")===""}class Qa{constructor(r,s,l){this.normal=s,this.property=r,l&&(this.space=l)}}Qa.prototype.normal={};Qa.prototype.property={};Qa.prototype.space=void 0;function a_(n,r){const s={},l={};for(const d of n)Object.assign(s,d.property),Object.assign(l,d.normal);return new Qa(s,l,r)}function gh(n){return n.toLowerCase()}class bn{constructor(r,s){this.attribute=s,this.property=r}}bn.prototype.attribute="";bn.prototype.booleanish=!1;bn.prototype.boolean=!1;bn.prototype.commaOrSpaceSeparated=!1;bn.prototype.commaSeparated=!1;bn.prototype.defined=!1;bn.prototype.mustUseProperty=!1;bn.prototype.number=!1;bn.prototype.overloadedBoolean=!1;bn.prototype.property="";bn.prototype.spaceSeparated=!1;bn.prototype.space=void 0;let B1=0;const Ue=Ur(),Mt=Ur(),_h=Ur(),be=Ur(),ct=Ur(),Os=Ur(),Ln=Ur();function Ur(){return 2**++B1}const vh=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ue,booleanish:Mt,commaOrSpaceSeparated:Ln,commaSeparated:Os,number:be,overloadedBoolean:_h,spaceSeparated:ct},Symbol.toStringTag,{value:"Module"})),Vu=Object.keys(vh);class Lh extends bn{constructor(r,s,l,d){let m=-1;if(super(r,s),Xm(this,"space",d),typeof l=="number")for(;++m<Vu.length;){const f=Vu[m];Xm(this,Vu[m],(l&vh[f])===vh[f])}}}Lh.prototype.defined=!0;function Xm(n,r,s){s&&(n[r]=s)}function Hs(n){const r={},s={};for(const[l,d]of Object.entries(n.properties)){const m=new Lh(l,n.transform(n.attributes||{},l),d,n.space);n.mustUseProperty&&n.mustUseProperty.includes(l)&&(m.mustUseProperty=!0),r[l]=m,s[gh(l)]=l,s[gh(m.attribute)]=l}return new Qa(r,s,n.space)}const l_=Hs({properties:{ariaActiveDescendant:null,ariaAtomic:Mt,ariaAutoComplete:null,ariaBusy:Mt,ariaChecked:Mt,ariaColCount:be,ariaColIndex:be,ariaColSpan:be,ariaControls:ct,ariaCurrent:null,ariaDescribedBy:ct,ariaDetails:null,ariaDisabled:Mt,ariaDropEffect:ct,ariaErrorMessage:null,ariaExpanded:Mt,ariaFlowTo:ct,ariaGrabbed:Mt,ariaHasPopup:null,ariaHidden:Mt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ct,ariaLevel:be,ariaLive:null,ariaModal:Mt,ariaMultiLine:Mt,ariaMultiSelectable:Mt,ariaOrientation:null,ariaOwns:ct,ariaPlaceholder:null,ariaPosInSet:be,ariaPressed:Mt,ariaReadOnly:Mt,ariaRelevant:null,ariaRequired:Mt,ariaRoleDescription:ct,ariaRowCount:be,ariaRowIndex:be,ariaRowSpan:be,ariaSelected:Mt,ariaSetSize:be,ariaSort:null,ariaValueMax:be,ariaValueMin:be,ariaValueNow:be,ariaValueText:null,role:null},transform(n,r){return r==="role"?r:"aria-"+r.slice(4).toLowerCase()}});function o_(n,r){return r in n?n[r]:r}function c_(n,r){return o_(n,r.toLowerCase())}const j1=Hs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Os,acceptCharset:ct,accessKey:ct,action:null,allow:null,allowFullScreen:Ue,allowPaymentRequest:Ue,allowUserMedia:Ue,alt:null,as:null,async:Ue,autoCapitalize:null,autoComplete:ct,autoFocus:Ue,autoPlay:Ue,blocking:ct,capture:null,charSet:null,checked:Ue,cite:null,className:ct,cols:be,colSpan:null,content:null,contentEditable:Mt,controls:Ue,controlsList:ct,coords:be|Os,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ue,defer:Ue,dir:null,dirName:null,disabled:Ue,download:_h,draggable:Mt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ue,formTarget:null,headers:ct,height:be,hidden:_h,high:be,href:null,hrefLang:null,htmlFor:ct,httpEquiv:ct,id:null,imageSizes:null,imageSrcSet:null,inert:Ue,inputMode:null,integrity:null,is:null,isMap:Ue,itemId:null,itemProp:ct,itemRef:ct,itemScope:Ue,itemType:ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ue,low:be,manifest:null,max:null,maxLength:be,media:null,method:null,min:null,minLength:be,multiple:Ue,muted:Ue,name:null,nonce:null,noModule:Ue,noValidate:Ue,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:Ue,optimum:be,pattern:null,ping:ct,placeholder:null,playsInline:Ue,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ue,referrerPolicy:null,rel:ct,required:Ue,reversed:Ue,rows:be,rowSpan:be,sandbox:ct,scope:null,scoped:Ue,seamless:Ue,selected:Ue,shadowRootClonable:Ue,shadowRootDelegatesFocus:Ue,shadowRootMode:null,shape:null,size:be,sizes:null,slot:null,span:be,spellCheck:Mt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:be,step:null,style:null,tabIndex:be,target:null,title:null,translate:null,type:null,typeMustMatch:Ue,useMap:null,value:Mt,width:be,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ct,axis:null,background:null,bgColor:null,border:be,borderColor:null,bottomMargin:be,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ue,declare:Ue,event:null,face:null,frame:null,frameBorder:null,hSpace:be,leftMargin:be,link:null,longDesc:null,lowSrc:null,marginHeight:be,marginWidth:be,noResize:Ue,noHref:Ue,noShade:Ue,noWrap:Ue,object:null,profile:null,prompt:null,rev:null,rightMargin:be,rules:null,scheme:null,scrolling:Mt,standby:null,summary:null,text:null,topMargin:be,valueType:null,version:null,vAlign:null,vLink:null,vSpace:be,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ue,disableRemotePlayback:Ue,prefix:null,property:null,results:be,security:null,unselectable:null},space:"html",transform:c_}),N1=Hs({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:Ln,accentHeight:be,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:be,amplitude:be,arabicForm:null,ascent:be,attributeName:null,attributeType:null,azimuth:be,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:be,by:null,calcMode:null,capHeight:be,className:ct,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:be,diffuseConstant:be,direction:null,display:null,dur:null,divisor:be,dominantBaseline:null,download:Ue,dx:null,dy:null,edgeMode:null,editable:null,elevation:be,enableBackground:null,end:null,event:null,exponent:be,externalResourcesRequired:null,fill:null,fillOpacity:be,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:Os,g2:Os,glyphName:Os,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:be,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:be,horizOriginX:be,horizOriginY:be,id:null,ideographic:be,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:be,k:be,k1:be,k2:be,k3:be,k4:be,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:be,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:be,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:be,overlineThickness:be,paintOrder:null,panose1:null,path:null,pathLength:be,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:be,pointsAtY:be,pointsAtZ:be,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:be,specularExponent:be,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:be,strikethroughThickness:be,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:be,strokeOpacity:be,strokeWidth:null,style:null,surfaceScale:be,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:be,tableValues:null,target:null,targetX:be,targetY:be,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:be,underlineThickness:be,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:be,values:null,vAlphabetic:be,vMathematical:be,vectorEffect:null,vHanging:be,vIdeographic:be,version:null,vertAdvY:be,vertOriginX:be,vertOriginY:be,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:be,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:o_}),u_=Hs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(n,r){return"xlink:"+r.slice(5).toLowerCase()}}),h_=Hs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:c_}),f_=Hs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(n,r){return"xml:"+r.slice(3).toLowerCase()}}),H1={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"},z1=/[A-Z]/g,Qm=/-[a-z]/g,I1=/^data[-\w.:]+$/i;function U1(n,r){const s=gh(r);let l=r,d=bn;if(s in n.normal)return n.property[n.normal[s]];if(s.length>4&&s.slice(0,4)==="data"&&I1.test(r)){if(r.charAt(4)==="-"){const m=r.slice(5).replace(Qm,F1);l="data"+m.charAt(0).toUpperCase()+m.slice(1)}else{const m=r.slice(4);if(!Qm.test(m)){let f=m.replace(z1,P1);f.charAt(0)!=="-"&&(f="-"+f),r="data"+f}}d=Lh}return new d(l,r)}function P1(n){return"-"+n.toLowerCase()}function F1(n){return n.charAt(1).toUpperCase()}const q1=a_([l_,j1,u_,h_,f_],"html"),Oh=a_([l_,N1,u_,h_,f_],"svg");function $1(n){return n.join(" ").trim()}var Rs={},Wu,Jm;function G1(){if(Jm)return Wu;Jm=1;var n=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,r=/\n/g,s=/^\s*/,l=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,d=/^:\s*/,m=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,o=/^\s+|\s+$/g,c=`
|
|
63
|
+
`,h="/",p="*",u="",b="comment",C="declaration";function T(S,v){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];v=v||{};var _=1,y=1;function A(K){var Y=K.match(r);Y&&(_+=Y.length);var G=K.lastIndexOf(c);y=~G?K.length-G:y+K.length}function L(){var K={line:_,column:y};return function(Y){return Y.position=new D(K),M(),Y}}function D(K){this.start=K,this.end={line:_,column:y},this.source=v.source}D.prototype.content=S;function R(K){var Y=new Error(v.source+":"+_+":"+y+": "+K);if(Y.reason=K,Y.filename=v.source,Y.line=_,Y.column=y,Y.source=S,!v.silent)throw Y}function k(K){var Y=K.exec(S);if(Y){var G=Y[0];return A(G),S=S.slice(G.length),Y}}function M(){k(s)}function j(K){var Y;for(K=K||[];Y=H();)Y!==!1&&K.push(Y);return K}function H(){var K=L();if(!(h!=S.charAt(0)||p!=S.charAt(1))){for(var Y=2;u!=S.charAt(Y)&&(p!=S.charAt(Y)||h!=S.charAt(Y+1));)++Y;if(Y+=2,u===S.charAt(Y-1))return R("End of comment missing");var G=S.slice(2,Y-2);return y+=2,A(G),S=S.slice(Y),y+=2,K({type:b,comment:G})}}function U(){var K=L(),Y=k(l);if(Y){if(H(),!k(d))return R("property missing ':'");var G=k(m),W=K({type:C,property:E(Y[0].replace(n,u)),value:G?E(G[0].replace(n,u)):u});return k(f),W}}function F(){var K=[];j(K);for(var Y;Y=U();)Y!==!1&&(K.push(Y),j(K));return K}return M(),F()}function E(S){return S?S.replace(o,u):u}return Wu=T,Wu}var Zm;function V1(){if(Zm)return Rs;Zm=1;var n=Rs&&Rs.__importDefault||function(l){return l&&l.__esModule?l:{default:l}};Object.defineProperty(Rs,"__esModule",{value:!0}),Rs.default=s;const r=n(G1());function s(l,d){let m=null;if(!l||typeof l!="string")return m;const f=(0,r.default)(l),o=typeof d=="function";return f.forEach(c=>{if(c.type!=="declaration")return;const{property:h,value:p}=c;o?d(h,p,c):p&&(m=m||{},m[h]=p)}),m}return Rs}var Ha={},eg;function W1(){if(eg)return Ha;eg=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.camelCase=void 0;var n=/^--[a-zA-Z0-9_-]+$/,r=/-([a-z])/g,s=/^[^-]+$/,l=/^-(webkit|moz|ms|o|khtml)-/,d=/^-(ms)-/,m=function(h){return!h||s.test(h)||n.test(h)},f=function(h,p){return p.toUpperCase()},o=function(h,p){return"".concat(p,"-")},c=function(h,p){return p===void 0&&(p={}),m(h)?h:(h=h.toLowerCase(),p.reactCompat?h=h.replace(d,o):h=h.replace(l,o),h.replace(r,f))};return Ha.camelCase=c,Ha}var za,tg;function K1(){if(tg)return za;tg=1;var n=za&&za.__importDefault||function(d){return d&&d.__esModule?d:{default:d}},r=n(V1()),s=W1();function l(d,m){var f={};return!d||typeof d!="string"||(0,r.default)(d,function(o,c){o&&c&&(f[(0,s.camelCase)(o,m)]=c)}),f}return l.default=l,za=l,za}var Y1=K1();const X1=Yg(Y1),d_=p_("end"),Bh=p_("start");function p_(n){return r;function r(s){const l=s&&s.position&&s.position[n]||{};if(typeof l.line=="number"&&l.line>0&&typeof l.column=="number"&&l.column>0)return{line:l.line,column:l.column,offset:typeof l.offset=="number"&&l.offset>-1?l.offset:void 0}}}function Q1(n){const r=Bh(n),s=d_(n);if(r&&s)return{start:r,end:s}}function Fa(n){return!n||typeof n!="object"?"":"position"in n||"type"in n?ng(n.position):"start"in n||"end"in n?ng(n):"line"in n||"column"in n?yh(n):""}function yh(n){return ig(n&&n.line)+":"+ig(n&&n.column)}function ng(n){return yh(n&&n.start)+"-"+yh(n&&n.end)}function ig(n){return n&&typeof n=="number"?n:1}class Jt extends Error{constructor(r,s,l){super(),typeof s=="string"&&(l=s,s=void 0);let d="",m={},f=!1;if(s&&("line"in s&&"column"in s?m={place:s}:"start"in s&&"end"in s?m={place:s}:"type"in s?m={ancestors:[s],place:s.position}:m={...s}),typeof r=="string"?d=r:!m.cause&&r&&(f=!0,d=r.message,m.cause=r),!m.ruleId&&!m.source&&typeof l=="string"){const c=l.indexOf(":");c===-1?m.ruleId=l:(m.source=l.slice(0,c),m.ruleId=l.slice(c+1))}if(!m.place&&m.ancestors&&m.ancestors){const c=m.ancestors[m.ancestors.length-1];c&&(m.place=c.position)}const o=m.place&&"start"in m.place?m.place.start:m.place;this.ancestors=m.ancestors||void 0,this.cause=m.cause||void 0,this.column=o?o.column:void 0,this.fatal=void 0,this.file="",this.message=d,this.line=o?o.line:void 0,this.name=Fa(m.place)||"1:1",this.place=m.place||void 0,this.reason=this.message,this.ruleId=m.ruleId||void 0,this.source=m.source||void 0,this.stack=f&&m.cause&&typeof m.cause.stack=="string"?m.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Jt.prototype.file="";Jt.prototype.name="";Jt.prototype.reason="";Jt.prototype.message="";Jt.prototype.stack="";Jt.prototype.column=void 0;Jt.prototype.line=void 0;Jt.prototype.ancestors=void 0;Jt.prototype.cause=void 0;Jt.prototype.fatal=void 0;Jt.prototype.place=void 0;Jt.prototype.ruleId=void 0;Jt.prototype.source=void 0;const jh={}.hasOwnProperty,J1=new Map,Z1=/[A-Z]/g,eS=new Set(["table","tbody","thead","tfoot","tr"]),tS=new Set(["td","th"]),m_="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function nS(n,r){if(!r||r.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const s=r.filePath||void 0;let l;if(r.development){if(typeof r.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");l=uS(s,r.jsxDEV)}else{if(typeof r.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof r.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");l=cS(s,r.jsx,r.jsxs)}const d={Fragment:r.Fragment,ancestors:[],components:r.components||{},create:l,elementAttributeNameCase:r.elementAttributeNameCase||"react",evaluater:r.createEvaluater?r.createEvaluater():void 0,filePath:s,ignoreInvalidStyle:r.ignoreInvalidStyle||!1,passKeys:r.passKeys!==!1,passNode:r.passNode||!1,schema:r.space==="svg"?Oh:q1,stylePropertyNameCase:r.stylePropertyNameCase||"dom",tableCellAlignToStyle:r.tableCellAlignToStyle!==!1},m=g_(d,n,void 0);return m&&typeof m!="string"?m:d.create(n,d.Fragment,{children:m||void 0},void 0)}function g_(n,r,s){if(r.type==="element")return iS(n,r,s);if(r.type==="mdxFlowExpression"||r.type==="mdxTextExpression")return rS(n,r);if(r.type==="mdxJsxFlowElement"||r.type==="mdxJsxTextElement")return aS(n,r,s);if(r.type==="mdxjsEsm")return sS(n,r);if(r.type==="root")return lS(n,r,s);if(r.type==="text")return oS(n,r)}function iS(n,r,s){const l=n.schema;let d=l;r.tagName.toLowerCase()==="svg"&&l.space==="html"&&(d=Oh,n.schema=d),n.ancestors.push(r);const m=v_(n,r.tagName,!1),f=hS(n,r);let o=Hh(n,r);return eS.has(r.tagName)&&(o=o.filter(function(c){return typeof c=="string"?!O1(c):!0})),__(n,f,m,r),Nh(f,o),n.ancestors.pop(),n.schema=l,n.create(r,m,f,s)}function rS(n,r){if(r.data&&r.data.estree&&n.evaluater){const l=r.data.estree.body[0];return l.type,n.evaluater.evaluateExpression(l.expression)}Ka(n,r.position)}function sS(n,r){if(r.data&&r.data.estree&&n.evaluater)return n.evaluater.evaluateProgram(r.data.estree);Ka(n,r.position)}function aS(n,r,s){const l=n.schema;let d=l;r.name==="svg"&&l.space==="html"&&(d=Oh,n.schema=d),n.ancestors.push(r);const m=r.name===null?n.Fragment:v_(n,r.name,!0),f=fS(n,r),o=Hh(n,r);return __(n,f,m,r),Nh(f,o),n.ancestors.pop(),n.schema=l,n.create(r,m,f,s)}function lS(n,r,s){const l={};return Nh(l,Hh(n,r)),n.create(r,n.Fragment,l,s)}function oS(n,r){return r.value}function __(n,r,s,l){typeof s!="string"&&s!==n.Fragment&&n.passNode&&(r.node=l)}function Nh(n,r){if(r.length>0){const s=r.length>1?r:r[0];s&&(n.children=s)}}function cS(n,r,s){return l;function l(d,m,f,o){const h=Array.isArray(f.children)?s:r;return o?h(m,f,o):h(m,f)}}function uS(n,r){return s;function s(l,d,m,f){const o=Array.isArray(m.children),c=Bh(l);return r(d,m,f,o,{columnNumber:c?c.column-1:void 0,fileName:n,lineNumber:c?c.line:void 0},void 0)}}function hS(n,r){const s={};let l,d;for(d in r.properties)if(d!=="children"&&jh.call(r.properties,d)){const m=dS(n,d,r.properties[d]);if(m){const[f,o]=m;n.tableCellAlignToStyle&&f==="align"&&typeof o=="string"&&tS.has(r.tagName)?l=o:s[f]=o}}if(l){const m=s.style||(s.style={});m[n.stylePropertyNameCase==="css"?"text-align":"textAlign"]=l}return s}function fS(n,r){const s={};for(const l of r.attributes)if(l.type==="mdxJsxExpressionAttribute")if(l.data&&l.data.estree&&n.evaluater){const m=l.data.estree.body[0];m.type;const f=m.expression;f.type;const o=f.properties[0];o.type,Object.assign(s,n.evaluater.evaluateExpression(o.argument))}else Ka(n,r.position);else{const d=l.name;let m;if(l.value&&typeof l.value=="object")if(l.value.data&&l.value.data.estree&&n.evaluater){const o=l.value.data.estree.body[0];o.type,m=n.evaluater.evaluateExpression(o.expression)}else Ka(n,r.position);else m=l.value===null?!0:l.value;s[d]=m}return s}function Hh(n,r){const s=[];let l=-1;const d=n.passKeys?new Map:J1;for(;++l<r.children.length;){const m=r.children[l];let f;if(n.passKeys){const c=m.type==="element"?m.tagName:m.type==="mdxJsxFlowElement"||m.type==="mdxJsxTextElement"?m.name:void 0;if(c){const h=d.get(c)||0;f=c+"-"+h,d.set(c,h+1)}}const o=g_(n,m,f);o!==void 0&&s.push(o)}return s}function dS(n,r,s){const l=U1(n.schema,r);if(!(s==null||typeof s=="number"&&Number.isNaN(s))){if(Array.isArray(s)&&(s=l.commaSeparated?T1(s):$1(s)),l.property==="style"){let d=typeof s=="object"?s:pS(n,String(s));return n.stylePropertyNameCase==="css"&&(d=mS(d)),["style",d]}return[n.elementAttributeNameCase==="react"&&l.space?H1[l.property]||l.property:l.attribute,s]}}function pS(n,r){try{return X1(r,{reactCompat:!0})}catch(s){if(n.ignoreInvalidStyle)return{};const l=s,d=new Jt("Cannot parse `style` attribute",{ancestors:n.ancestors,cause:l,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw d.file=n.filePath||void 0,d.url=m_+"#cannot-parse-style-attribute",d}}function v_(n,r,s){let l;if(!s)l={type:"Literal",value:r};else if(r.includes(".")){const d=r.split(".");let m=-1,f;for(;++m<d.length;){const o=Km(d[m])?{type:"Identifier",name:d[m]}:{type:"Literal",value:d[m]};f=f?{type:"MemberExpression",object:f,property:o,computed:!!(m&&o.type==="Literal"),optional:!1}:o}l=f}else l=Km(r)&&!/^[a-z]/.test(r)?{type:"Identifier",name:r}:{type:"Literal",value:r};if(l.type==="Literal"){const d=l.value;return jh.call(n.components,d)?n.components[d]:d}if(n.evaluater)return n.evaluater.evaluateExpression(l);Ka(n)}function Ka(n,r){const s=new Jt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:n.ancestors,place:r,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw s.file=n.filePath||void 0,s.url=m_+"#cannot-handle-mdx-estrees-without-createevaluater",s}function mS(n){const r={};let s;for(s in n)jh.call(n,s)&&(r[gS(s)]=n[s]);return r}function gS(n){let r=n.replace(Z1,_S);return r.slice(0,3)==="ms-"&&(r="-"+r),r}function _S(n){return"-"+n.toLowerCase()}const Ku={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"]},vS={};function zh(n,r){const s=vS,l=typeof s.includeImageAlt=="boolean"?s.includeImageAlt:!0,d=typeof s.includeHtml=="boolean"?s.includeHtml:!0;return y_(n,l,d)}function y_(n,r,s){if(yS(n)){if("value"in n)return n.type==="html"&&!s?"":n.value;if(r&&"alt"in n&&n.alt)return n.alt;if("children"in n)return rg(n.children,r,s)}return Array.isArray(n)?rg(n,r,s):""}function rg(n,r,s){const l=[];let d=-1;for(;++d<n.length;)l[d]=y_(n[d],r,s);return l.join("")}function yS(n){return!!(n&&typeof n=="object")}const sg=document.createElement("i");function Ih(n){const r="&"+n+";";sg.innerHTML=r;const s=sg.textContent;return s.charCodeAt(s.length-1)===59&&n!=="semi"||s===r?!1:s}function On(n,r,s,l){const d=n.length;let m=0,f;if(r<0?r=-r>d?0:d+r:r=r>d?d:r,s=s>0?s:0,l.length<1e4)f=Array.from(l),f.unshift(r,s),n.splice(...f);else for(s&&n.splice(r,s);m<l.length;)f=l.slice(m,m+1e4),f.unshift(r,0),n.splice(...f),m+=1e4,r+=1e4}function $n(n,r){return n.length>0?(On(n,n.length,0,r),n):r}const ag={}.hasOwnProperty;function S_(n){const r={};let s=-1;for(;++s<n.length;)SS(r,n[s]);return r}function SS(n,r){let s;for(s in r){const d=(ag.call(n,s)?n[s]:void 0)||(n[s]={}),m=r[s];let f;if(m)for(f in m){ag.call(d,f)||(d[f]=[]);const o=m[f];bS(d[f],Array.isArray(o)?o:o?[o]:[])}}}function bS(n,r){let s=-1;const l=[];for(;++s<r.length;)(r[s].add==="after"?n:l).push(r[s]);On(n,0,0,l)}function b_(n,r){const s=Number.parseInt(n,r);return s<9||s===11||s>13&&s<32||s>126&&s<160||s>55295&&s<57344||s>64975&&s<65008||(s&65535)===65535||(s&65535)===65534||s>1114111?"�":String.fromCodePoint(s)}function ni(n){return n.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const sn=pr(/[A-Za-z]/),Qt=pr(/[\dA-Za-z]/),CS=pr(/[#-'*+\--9=?A-Z^-~]/);function Eo(n){return n!==null&&(n<32||n===127)}const Sh=pr(/\d/),wS=pr(/[\dA-Fa-f]/),xS=pr(/[!-/:-@[-`{-~]/);function De(n){return n!==null&&n<-2}function ot(n){return n!==null&&(n<0||n===32)}function Ve(n){return n===-2||n===-1||n===32}const Bo=pr(new RegExp("\\p{P}|\\p{S}","u")),zr=pr(/\s/);function pr(n){return r;function r(s){return s!==null&&s>-1&&n.test(String.fromCharCode(s))}}function zs(n){const r=[];let s=-1,l=0,d=0;for(;++s<n.length;){const m=n.charCodeAt(s);let f="";if(m===37&&Qt(n.charCodeAt(s+1))&&Qt(n.charCodeAt(s+2)))d=2;else if(m<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(m))||(f=String.fromCharCode(m));else if(m>55295&&m<57344){const o=n.charCodeAt(s+1);m<56320&&o>56319&&o<57344?(f=String.fromCharCode(m,o),d=1):f="�"}else f=String.fromCharCode(m);f&&(r.push(n.slice(l,s),encodeURIComponent(f)),l=s+d+1,f=""),d&&(s+=d,d=0)}return r.join("")+n.slice(l)}function Xe(n,r,s,l){const d=l?l-1:Number.POSITIVE_INFINITY;let m=0;return f;function f(c){return Ve(c)?(n.enter(s),o(c)):r(c)}function o(c){return Ve(c)&&m++<d?(n.consume(c),o):(n.exit(s),r(c))}}const ES={tokenize:kS};function kS(n){const r=n.attempt(this.parser.constructs.contentInitial,l,d);let s;return r;function l(o){if(o===null){n.consume(o);return}return n.enter("lineEnding"),n.consume(o),n.exit("lineEnding"),Xe(n,r,"linePrefix")}function d(o){return n.enter("paragraph"),m(o)}function m(o){const c=n.enter("chunkText",{contentType:"text",previous:s});return s&&(s.next=c),s=c,f(o)}function f(o){if(o===null){n.exit("chunkText"),n.exit("paragraph"),n.consume(o);return}return De(o)?(n.consume(o),n.exit("chunkText"),m):(n.consume(o),f)}}const AS={tokenize:TS},lg={tokenize:RS};function TS(n){const r=this,s=[];let l=0,d,m,f;return o;function o(y){if(l<s.length){const A=s[l];return r.containerState=A[1],n.attempt(A[0].continuation,c,h)(y)}return h(y)}function c(y){if(l++,r.containerState._closeFlow){r.containerState._closeFlow=void 0,d&&_();const A=r.events.length;let L=A,D;for(;L--;)if(r.events[L][0]==="exit"&&r.events[L][1].type==="chunkFlow"){D=r.events[L][1].end;break}v(l);let R=A;for(;R<r.events.length;)r.events[R][1].end={...D},R++;return On(r.events,L+1,0,r.events.slice(A)),r.events.length=R,h(y)}return o(y)}function h(y){if(l===s.length){if(!d)return b(y);if(d.currentConstruct&&d.currentConstruct.concrete)return T(y);r.interrupt=!!(d.currentConstruct&&!d._gfmTableDynamicInterruptHack)}return r.containerState={},n.check(lg,p,u)(y)}function p(y){return d&&_(),v(l),b(y)}function u(y){return r.parser.lazy[r.now().line]=l!==s.length,f=r.now().offset,T(y)}function b(y){return r.containerState={},n.attempt(lg,C,T)(y)}function C(y){return l++,s.push([r.currentConstruct,r.containerState]),b(y)}function T(y){if(y===null){d&&_(),v(0),n.consume(y);return}return d=d||r.parser.flow(r.now()),n.enter("chunkFlow",{_tokenizer:d,contentType:"flow",previous:m}),E(y)}function E(y){if(y===null){S(n.exit("chunkFlow"),!0),v(0),n.consume(y);return}return De(y)?(n.consume(y),S(n.exit("chunkFlow")),l=0,r.interrupt=void 0,o):(n.consume(y),E)}function S(y,A){const L=r.sliceStream(y);if(A&&L.push(null),y.previous=m,m&&(m.next=y),m=y,d.defineSkip(y.start),d.write(L),r.parser.lazy[y.start.line]){let D=d.events.length;for(;D--;)if(d.events[D][1].start.offset<f&&(!d.events[D][1].end||d.events[D][1].end.offset>f))return;const R=r.events.length;let k=R,M,j;for(;k--;)if(r.events[k][0]==="exit"&&r.events[k][1].type==="chunkFlow"){if(M){j=r.events[k][1].end;break}M=!0}for(v(l),D=R;D<r.events.length;)r.events[D][1].end={...j},D++;On(r.events,k+1,0,r.events.slice(R)),r.events.length=D}}function v(y){let A=s.length;for(;A-- >y;){const L=s[A];r.containerState=L[1],L[0].exit.call(r,n)}s.length=y}function _(){d.write([null]),m=void 0,d=void 0,r.containerState._closeFlow=void 0}}function RS(n,r,s){return Xe(n,n.attempt(this.parser.constructs.document,r,s),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Bs(n){if(n===null||ot(n)||zr(n))return 1;if(Bo(n))return 2}function jo(n,r,s){const l=[];let d=-1;for(;++d<n.length;){const m=n[d].resolveAll;m&&!l.includes(m)&&(r=m(r,s),l.push(m))}return r}const bh={name:"attention",resolveAll:DS,tokenize:MS};function DS(n,r){let s=-1,l,d,m,f,o,c,h,p;for(;++s<n.length;)if(n[s][0]==="enter"&&n[s][1].type==="attentionSequence"&&n[s][1]._close){for(l=s;l--;)if(n[l][0]==="exit"&&n[l][1].type==="attentionSequence"&&n[l][1]._open&&r.sliceSerialize(n[l][1]).charCodeAt(0)===r.sliceSerialize(n[s][1]).charCodeAt(0)){if((n[l][1]._close||n[s][1]._open)&&(n[s][1].end.offset-n[s][1].start.offset)%3&&!((n[l][1].end.offset-n[l][1].start.offset+n[s][1].end.offset-n[s][1].start.offset)%3))continue;c=n[l][1].end.offset-n[l][1].start.offset>1&&n[s][1].end.offset-n[s][1].start.offset>1?2:1;const u={...n[l][1].end},b={...n[s][1].start};og(u,-c),og(b,c),f={type:c>1?"strongSequence":"emphasisSequence",start:u,end:{...n[l][1].end}},o={type:c>1?"strongSequence":"emphasisSequence",start:{...n[s][1].start},end:b},m={type:c>1?"strongText":"emphasisText",start:{...n[l][1].end},end:{...n[s][1].start}},d={type:c>1?"strong":"emphasis",start:{...f.start},end:{...o.end}},n[l][1].end={...f.start},n[s][1].start={...o.end},h=[],n[l][1].end.offset-n[l][1].start.offset&&(h=$n(h,[["enter",n[l][1],r],["exit",n[l][1],r]])),h=$n(h,[["enter",d,r],["enter",f,r],["exit",f,r],["enter",m,r]]),h=$n(h,jo(r.parser.constructs.insideSpan.null,n.slice(l+1,s),r)),h=$n(h,[["exit",m,r],["enter",o,r],["exit",o,r],["exit",d,r]]),n[s][1].end.offset-n[s][1].start.offset?(p=2,h=$n(h,[["enter",n[s][1],r],["exit",n[s][1],r]])):p=0,On(n,l-1,s-l+3,h),s=l+h.length-p-2;break}}for(s=-1;++s<n.length;)n[s][1].type==="attentionSequence"&&(n[s][1].type="data");return n}function MS(n,r){const s=this.parser.constructs.attentionMarkers.null,l=this.previous,d=Bs(l);let m;return f;function f(c){return m=c,n.enter("attentionSequence"),o(c)}function o(c){if(c===m)return n.consume(c),o;const h=n.exit("attentionSequence"),p=Bs(c),u=!p||p===2&&d||s.includes(c),b=!d||d===2&&p||s.includes(l);return h._open=!!(m===42?u:u&&(d||!b)),h._close=!!(m===42?b:b&&(p||!u)),r(c)}}function og(n,r){n.column+=r,n.offset+=r,n._bufferIndex+=r}const LS={name:"autolink",tokenize:OS};function OS(n,r,s){let l=0;return d;function d(C){return n.enter("autolink"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.enter("autolinkProtocol"),m}function m(C){return sn(C)?(n.consume(C),f):C===64?s(C):h(C)}function f(C){return C===43||C===45||C===46||Qt(C)?(l=1,o(C)):h(C)}function o(C){return C===58?(n.consume(C),l=0,c):(C===43||C===45||C===46||Qt(C))&&l++<32?(n.consume(C),o):(l=0,h(C))}function c(C){return C===62?(n.exit("autolinkProtocol"),n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):C===null||C===32||C===60||Eo(C)?s(C):(n.consume(C),c)}function h(C){return C===64?(n.consume(C),p):CS(C)?(n.consume(C),h):s(C)}function p(C){return Qt(C)?u(C):s(C)}function u(C){return C===46?(n.consume(C),l=0,p):C===62?(n.exit("autolinkProtocol").type="autolinkEmail",n.enter("autolinkMarker"),n.consume(C),n.exit("autolinkMarker"),n.exit("autolink"),r):b(C)}function b(C){if((C===45||Qt(C))&&l++<63){const T=C===45?b:u;return n.consume(C),T}return s(C)}}const Ja={partial:!0,tokenize:BS};function BS(n,r,s){return l;function l(m){return Ve(m)?Xe(n,d,"linePrefix")(m):d(m)}function d(m){return m===null||De(m)?r(m):s(m)}}const C_={continuation:{tokenize:NS},exit:HS,name:"blockQuote",tokenize:jS};function jS(n,r,s){const l=this;return d;function d(f){if(f===62){const o=l.containerState;return o.open||(n.enter("blockQuote",{_container:!0}),o.open=!0),n.enter("blockQuotePrefix"),n.enter("blockQuoteMarker"),n.consume(f),n.exit("blockQuoteMarker"),m}return s(f)}function m(f){return Ve(f)?(n.enter("blockQuotePrefixWhitespace"),n.consume(f),n.exit("blockQuotePrefixWhitespace"),n.exit("blockQuotePrefix"),r):(n.exit("blockQuotePrefix"),r(f))}}function NS(n,r,s){const l=this;return d;function d(f){return Ve(f)?Xe(n,m,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):m(f)}function m(f){return n.attempt(C_,r,s)(f)}}function HS(n){n.exit("blockQuote")}const w_={name:"characterEscape",tokenize:zS};function zS(n,r,s){return l;function l(m){return n.enter("characterEscape"),n.enter("escapeMarker"),n.consume(m),n.exit("escapeMarker"),d}function d(m){return xS(m)?(n.enter("characterEscapeValue"),n.consume(m),n.exit("characterEscapeValue"),n.exit("characterEscape"),r):s(m)}}const x_={name:"characterReference",tokenize:IS};function IS(n,r,s){const l=this;let d=0,m,f;return o;function o(u){return n.enter("characterReference"),n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),c}function c(u){return u===35?(n.enter("characterReferenceMarkerNumeric"),n.consume(u),n.exit("characterReferenceMarkerNumeric"),h):(n.enter("characterReferenceValue"),m=31,f=Qt,p(u))}function h(u){return u===88||u===120?(n.enter("characterReferenceMarkerHexadecimal"),n.consume(u),n.exit("characterReferenceMarkerHexadecimal"),n.enter("characterReferenceValue"),m=6,f=wS,p):(n.enter("characterReferenceValue"),m=7,f=Sh,p(u))}function p(u){if(u===59&&d){const b=n.exit("characterReferenceValue");return f===Qt&&!Ih(l.sliceSerialize(b))?s(u):(n.enter("characterReferenceMarker"),n.consume(u),n.exit("characterReferenceMarker"),n.exit("characterReference"),r)}return f(u)&&d++<m?(n.consume(u),p):s(u)}}const cg={partial:!0,tokenize:PS},ug={concrete:!0,name:"codeFenced",tokenize:US};function US(n,r,s){const l=this,d={partial:!0,tokenize:L};let m=0,f=0,o;return c;function c(D){return h(D)}function h(D){const R=l.events[l.events.length-1];return m=R&&R[1].type==="linePrefix"?R[2].sliceSerialize(R[1],!0).length:0,o=D,n.enter("codeFenced"),n.enter("codeFencedFence"),n.enter("codeFencedFenceSequence"),p(D)}function p(D){return D===o?(f++,n.consume(D),p):f<3?s(D):(n.exit("codeFencedFenceSequence"),Ve(D)?Xe(n,u,"whitespace")(D):u(D))}function u(D){return D===null||De(D)?(n.exit("codeFencedFence"),l.interrupt?r(D):n.check(cg,E,A)(D)):(n.enter("codeFencedFenceInfo"),n.enter("chunkString",{contentType:"string"}),b(D))}function b(D){return D===null||De(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),u(D)):Ve(D)?(n.exit("chunkString"),n.exit("codeFencedFenceInfo"),Xe(n,C,"whitespace")(D)):D===96&&D===o?s(D):(n.consume(D),b)}function C(D){return D===null||De(D)?u(D):(n.enter("codeFencedFenceMeta"),n.enter("chunkString",{contentType:"string"}),T(D))}function T(D){return D===null||De(D)?(n.exit("chunkString"),n.exit("codeFencedFenceMeta"),u(D)):D===96&&D===o?s(D):(n.consume(D),T)}function E(D){return n.attempt(d,A,S)(D)}function S(D){return n.enter("lineEnding"),n.consume(D),n.exit("lineEnding"),v}function v(D){return m>0&&Ve(D)?Xe(n,_,"linePrefix",m+1)(D):_(D)}function _(D){return D===null||De(D)?n.check(cg,E,A)(D):(n.enter("codeFlowValue"),y(D))}function y(D){return D===null||De(D)?(n.exit("codeFlowValue"),_(D)):(n.consume(D),y)}function A(D){return n.exit("codeFenced"),r(D)}function L(D,R,k){let M=0;return j;function j(Y){return D.enter("lineEnding"),D.consume(Y),D.exit("lineEnding"),H}function H(Y){return D.enter("codeFencedFence"),Ve(Y)?Xe(D,U,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Y):U(Y)}function U(Y){return Y===o?(D.enter("codeFencedFenceSequence"),F(Y)):k(Y)}function F(Y){return Y===o?(M++,D.consume(Y),F):M>=f?(D.exit("codeFencedFenceSequence"),Ve(Y)?Xe(D,K,"whitespace")(Y):K(Y)):k(Y)}function K(Y){return Y===null||De(Y)?(D.exit("codeFencedFence"),R(Y)):k(Y)}}}function PS(n,r,s){const l=this;return d;function d(f){return f===null?s(f):(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m)}function m(f){return l.parser.lazy[l.now().line]?s(f):r(f)}}const Yu={name:"codeIndented",tokenize:qS},FS={partial:!0,tokenize:$S};function qS(n,r,s){const l=this;return d;function d(h){return n.enter("codeIndented"),Xe(n,m,"linePrefix",5)(h)}function m(h){const p=l.events[l.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?f(h):s(h)}function f(h){return h===null?c(h):De(h)?n.attempt(FS,f,c)(h):(n.enter("codeFlowValue"),o(h))}function o(h){return h===null||De(h)?(n.exit("codeFlowValue"),f(h)):(n.consume(h),o)}function c(h){return n.exit("codeIndented"),r(h)}}function $S(n,r,s){const l=this;return d;function d(f){return l.parser.lazy[l.now().line]?s(f):De(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),d):Xe(n,m,"linePrefix",5)(f)}function m(f){const o=l.events[l.events.length-1];return o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(f):De(f)?d(f):s(f)}}const GS={name:"codeText",previous:WS,resolve:VS,tokenize:KS};function VS(n){let r=n.length-4,s=3,l,d;if((n[s][1].type==="lineEnding"||n[s][1].type==="space")&&(n[r][1].type==="lineEnding"||n[r][1].type==="space")){for(l=s;++l<r;)if(n[l][1].type==="codeTextData"){n[s][1].type="codeTextPadding",n[r][1].type="codeTextPadding",s+=2,r-=2;break}}for(l=s-1,r++;++l<=r;)d===void 0?l!==r&&n[l][1].type!=="lineEnding"&&(d=l):(l===r||n[l][1].type==="lineEnding")&&(n[d][1].type="codeTextData",l!==d+2&&(n[d][1].end=n[l-1][1].end,n.splice(d+2,l-d-2),r-=l-d-2,l=d+2),d=void 0);return n}function WS(n){return n!==96||this.events[this.events.length-1][1].type==="characterEscape"}function KS(n,r,s){let l=0,d,m;return f;function f(u){return n.enter("codeText"),n.enter("codeTextSequence"),o(u)}function o(u){return u===96?(n.consume(u),l++,o):(n.exit("codeTextSequence"),c(u))}function c(u){return u===null?s(u):u===32?(n.enter("space"),n.consume(u),n.exit("space"),c):u===96?(m=n.enter("codeTextSequence"),d=0,p(u)):De(u)?(n.enter("lineEnding"),n.consume(u),n.exit("lineEnding"),c):(n.enter("codeTextData"),h(u))}function h(u){return u===null||u===32||u===96||De(u)?(n.exit("codeTextData"),c(u)):(n.consume(u),h)}function p(u){return u===96?(n.consume(u),d++,p):d===l?(n.exit("codeTextSequence"),n.exit("codeText"),r(u)):(m.type="codeTextData",h(u))}}class YS{constructor(r){this.left=r?[...r]:[],this.right=[]}get(r){if(r<0||r>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+r+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return r<this.left.length?this.left[r]:this.right[this.right.length-r+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(r,s){const l=s??Number.POSITIVE_INFINITY;return l<this.left.length?this.left.slice(r,l):r>this.left.length?this.right.slice(this.right.length-l+this.left.length,this.right.length-r+this.left.length).reverse():this.left.slice(r).concat(this.right.slice(this.right.length-l+this.left.length).reverse())}splice(r,s,l){const d=s||0;this.setCursor(Math.trunc(r));const m=this.right.splice(this.right.length-d,Number.POSITIVE_INFINITY);return l&&Ia(this.left,l),m.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(r){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(r)}pushMany(r){this.setCursor(Number.POSITIVE_INFINITY),Ia(this.left,r)}unshift(r){this.setCursor(0),this.right.push(r)}unshiftMany(r){this.setCursor(0),Ia(this.right,r.reverse())}setCursor(r){if(!(r===this.left.length||r>this.left.length&&this.right.length===0||r<0&&this.left.length===0))if(r<this.left.length){const s=this.left.splice(r,Number.POSITIVE_INFINITY);Ia(this.right,s.reverse())}else{const s=this.right.splice(this.left.length+this.right.length-r,Number.POSITIVE_INFINITY);Ia(this.left,s.reverse())}}}function Ia(n,r){let s=0;if(r.length<1e4)n.push(...r);else for(;s<r.length;)n.push(...r.slice(s,s+1e4)),s+=1e4}function E_(n){const r={};let s=-1,l,d,m,f,o,c,h;const p=new YS(n);for(;++s<p.length;){for(;s in r;)s=r[s];if(l=p.get(s),s&&l[1].type==="chunkFlow"&&p.get(s-1)[1].type==="listItemPrefix"&&(c=l[1]._tokenizer.events,m=0,m<c.length&&c[m][1].type==="lineEndingBlank"&&(m+=2),m<c.length&&c[m][1].type==="content"))for(;++m<c.length&&c[m][1].type!=="content";)c[m][1].type==="chunkText"&&(c[m][1]._isInFirstContentOfListItem=!0,m++);if(l[0]==="enter")l[1].contentType&&(Object.assign(r,XS(p,s)),s=r[s],h=!0);else if(l[1]._container){for(m=s,d=void 0;m--;)if(f=p.get(m),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(d&&(p.get(d)[1].type="lineEndingBlank"),f[1].type="lineEnding",d=m);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;d&&(l[1].end={...p.get(d)[1].start},o=p.slice(d,s),o.unshift(l),p.splice(d,s-d+1,o))}}return On(n,0,Number.POSITIVE_INFINITY,p.slice(0)),!h}function XS(n,r){const s=n.get(r)[1],l=n.get(r)[2];let d=r-1;const m=[];let f=s._tokenizer;f||(f=l.parser[s.contentType](s.start),s._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const o=f.events,c=[],h={};let p,u,b=-1,C=s,T=0,E=0;const S=[E];for(;C;){for(;n.get(++d)[1]!==C;);m.push(d),C._tokenizer||(p=l.sliceStream(C),C.next||p.push(null),u&&f.defineSkip(C.start),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(p),C._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),u=C,C=C.next}for(C=s;++b<o.length;)o[b][0]==="exit"&&o[b-1][0]==="enter"&&o[b][1].type===o[b-1][1].type&&o[b][1].start.line!==o[b][1].end.line&&(E=b+1,S.push(E),C._tokenizer=void 0,C.previous=void 0,C=C.next);for(f.events=[],C?(C._tokenizer=void 0,C.previous=void 0):S.pop(),b=S.length;b--;){const v=o.slice(S[b],S[b+1]),_=m.pop();c.push([_,_+v.length-1]),n.splice(_,2,v)}for(c.reverse(),b=-1;++b<c.length;)h[T+c[b][0]]=T+c[b][1],T+=c[b][1]-c[b][0]-1;return h}const QS={resolve:ZS,tokenize:eb},JS={partial:!0,tokenize:tb};function ZS(n){return E_(n),n}function eb(n,r){let s;return l;function l(o){return n.enter("content"),s=n.enter("chunkContent",{contentType:"content"}),d(o)}function d(o){return o===null?m(o):De(o)?n.check(JS,f,m)(o):(n.consume(o),d)}function m(o){return n.exit("chunkContent"),n.exit("content"),r(o)}function f(o){return n.consume(o),n.exit("chunkContent"),s.next=n.enter("chunkContent",{contentType:"content",previous:s}),s=s.next,d}}function tb(n,r,s){const l=this;return d;function d(f){return n.exit("chunkContent"),n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),Xe(n,m,"linePrefix")}function m(f){if(f===null||De(f))return s(f);const o=l.events[l.events.length-1];return!l.parser.constructs.disable.null.includes("codeIndented")&&o&&o[1].type==="linePrefix"&&o[2].sliceSerialize(o[1],!0).length>=4?r(f):n.interrupt(l.parser.constructs.flow,s,r)(f)}}function k_(n,r,s,l,d,m,f,o,c){const h=c||Number.POSITIVE_INFINITY;let p=0;return u;function u(v){return v===60?(n.enter(l),n.enter(d),n.enter(m),n.consume(v),n.exit(m),b):v===null||v===32||v===41||Eo(v)?s(v):(n.enter(l),n.enter(f),n.enter(o),n.enter("chunkString",{contentType:"string"}),E(v))}function b(v){return v===62?(n.enter(m),n.consume(v),n.exit(m),n.exit(d),n.exit(l),r):(n.enter(o),n.enter("chunkString",{contentType:"string"}),C(v))}function C(v){return v===62?(n.exit("chunkString"),n.exit(o),b(v)):v===null||v===60||De(v)?s(v):(n.consume(v),v===92?T:C)}function T(v){return v===60||v===62||v===92?(n.consume(v),C):C(v)}function E(v){return!p&&(v===null||v===41||ot(v))?(n.exit("chunkString"),n.exit(o),n.exit(f),n.exit(l),r(v)):p<h&&v===40?(n.consume(v),p++,E):v===41?(n.consume(v),p--,E):v===null||v===32||v===40||Eo(v)?s(v):(n.consume(v),v===92?S:E)}function S(v){return v===40||v===41||v===92?(n.consume(v),E):E(v)}}function A_(n,r,s,l,d,m){const f=this;let o=0,c;return h;function h(C){return n.enter(l),n.enter(d),n.consume(C),n.exit(d),n.enter(m),p}function p(C){return o>999||C===null||C===91||C===93&&!c||C===94&&!o&&"_hiddenFootnoteSupport"in f.parser.constructs?s(C):C===93?(n.exit(m),n.enter(d),n.consume(C),n.exit(d),n.exit(l),r):De(C)?(n.enter("lineEnding"),n.consume(C),n.exit("lineEnding"),p):(n.enter("chunkString",{contentType:"string"}),u(C))}function u(C){return C===null||C===91||C===93||De(C)||o++>999?(n.exit("chunkString"),p(C)):(n.consume(C),c||(c=!Ve(C)),C===92?b:u)}function b(C){return C===91||C===92||C===93?(n.consume(C),o++,u):u(C)}}function T_(n,r,s,l,d,m){let f;return o;function o(b){return b===34||b===39||b===40?(n.enter(l),n.enter(d),n.consume(b),n.exit(d),f=b===40?41:b,c):s(b)}function c(b){return b===f?(n.enter(d),n.consume(b),n.exit(d),n.exit(l),r):(n.enter(m),h(b))}function h(b){return b===f?(n.exit(m),c(f)):b===null?s(b):De(b)?(n.enter("lineEnding"),n.consume(b),n.exit("lineEnding"),Xe(n,h,"linePrefix")):(n.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===f||b===null||De(b)?(n.exit("chunkString"),h(b)):(n.consume(b),b===92?u:p)}function u(b){return b===f||b===92?(n.consume(b),p):p(b)}}function qa(n,r){let s;return l;function l(d){return De(d)?(n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),s=!0,l):Ve(d)?Xe(n,l,s?"linePrefix":"lineSuffix")(d):r(d)}}const nb={name:"definition",tokenize:rb},ib={partial:!0,tokenize:sb};function rb(n,r,s){const l=this;let d;return m;function m(C){return n.enter("definition"),f(C)}function f(C){return A_.call(l,n,o,s,"definitionLabel","definitionLabelMarker","definitionLabelString")(C)}function o(C){return d=ni(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)),C===58?(n.enter("definitionMarker"),n.consume(C),n.exit("definitionMarker"),c):s(C)}function c(C){return ot(C)?qa(n,h)(C):h(C)}function h(C){return k_(n,p,s,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(C)}function p(C){return n.attempt(ib,u,u)(C)}function u(C){return Ve(C)?Xe(n,b,"whitespace")(C):b(C)}function b(C){return C===null||De(C)?(n.exit("definition"),l.parser.defined.push(d),r(C)):s(C)}}function sb(n,r,s){return l;function l(o){return ot(o)?qa(n,d)(o):s(o)}function d(o){return T_(n,m,s,"definitionTitle","definitionTitleMarker","definitionTitleString")(o)}function m(o){return Ve(o)?Xe(n,f,"whitespace")(o):f(o)}function f(o){return o===null||De(o)?r(o):s(o)}}const ab={name:"hardBreakEscape",tokenize:lb};function lb(n,r,s){return l;function l(m){return n.enter("hardBreakEscape"),n.consume(m),d}function d(m){return De(m)?(n.exit("hardBreakEscape"),r(m)):s(m)}}const ob={name:"headingAtx",resolve:cb,tokenize:ub};function cb(n,r){let s=n.length-2,l=3,d,m;return n[l][1].type==="whitespace"&&(l+=2),s-2>l&&n[s][1].type==="whitespace"&&(s-=2),n[s][1].type==="atxHeadingSequence"&&(l===s-1||s-4>l&&n[s-2][1].type==="whitespace")&&(s-=l+1===s?2:4),s>l&&(d={type:"atxHeadingText",start:n[l][1].start,end:n[s][1].end},m={type:"chunkText",start:n[l][1].start,end:n[s][1].end,contentType:"text"},On(n,l,s-l+1,[["enter",d,r],["enter",m,r],["exit",m,r],["exit",d,r]])),n}function ub(n,r,s){let l=0;return d;function d(p){return n.enter("atxHeading"),m(p)}function m(p){return n.enter("atxHeadingSequence"),f(p)}function f(p){return p===35&&l++<6?(n.consume(p),f):p===null||ot(p)?(n.exit("atxHeadingSequence"),o(p)):s(p)}function o(p){return p===35?(n.enter("atxHeadingSequence"),c(p)):p===null||De(p)?(n.exit("atxHeading"),r(p)):Ve(p)?Xe(n,o,"whitespace")(p):(n.enter("atxHeadingText"),h(p))}function c(p){return p===35?(n.consume(p),c):(n.exit("atxHeadingSequence"),o(p))}function h(p){return p===null||p===35||ot(p)?(n.exit("atxHeadingText"),o(p)):(n.consume(p),h)}}const hb=["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"],hg=["pre","script","style","textarea"],fb={concrete:!0,name:"htmlFlow",resolveTo:mb,tokenize:gb},db={partial:!0,tokenize:vb},pb={partial:!0,tokenize:_b};function mb(n){let r=n.length;for(;r--&&!(n[r][0]==="enter"&&n[r][1].type==="htmlFlow"););return r>1&&n[r-2][1].type==="linePrefix"&&(n[r][1].start=n[r-2][1].start,n[r+1][1].start=n[r-2][1].start,n.splice(r-2,2)),n}function gb(n,r,s){const l=this;let d,m,f,o,c;return h;function h(I){return p(I)}function p(I){return n.enter("htmlFlow"),n.enter("htmlFlowData"),n.consume(I),u}function u(I){return I===33?(n.consume(I),b):I===47?(n.consume(I),m=!0,E):I===63?(n.consume(I),d=3,l.interrupt?r:O):sn(I)?(n.consume(I),f=String.fromCharCode(I),S):s(I)}function b(I){return I===45?(n.consume(I),d=2,C):I===91?(n.consume(I),d=5,o=0,T):sn(I)?(n.consume(I),d=4,l.interrupt?r:O):s(I)}function C(I){return I===45?(n.consume(I),l.interrupt?r:O):s(I)}function T(I){const re="CDATA[";return I===re.charCodeAt(o++)?(n.consume(I),o===re.length?l.interrupt?r:U:T):s(I)}function E(I){return sn(I)?(n.consume(I),f=String.fromCharCode(I),S):s(I)}function S(I){if(I===null||I===47||I===62||ot(I)){const re=I===47,ve=f.toLowerCase();return!re&&!m&&hg.includes(ve)?(d=1,l.interrupt?r(I):U(I)):hb.includes(f.toLowerCase())?(d=6,re?(n.consume(I),v):l.interrupt?r(I):U(I)):(d=7,l.interrupt&&!l.parser.lazy[l.now().line]?s(I):m?_(I):y(I))}return I===45||Qt(I)?(n.consume(I),f+=String.fromCharCode(I),S):s(I)}function v(I){return I===62?(n.consume(I),l.interrupt?r:U):s(I)}function _(I){return Ve(I)?(n.consume(I),_):j(I)}function y(I){return I===47?(n.consume(I),j):I===58||I===95||sn(I)?(n.consume(I),A):Ve(I)?(n.consume(I),y):j(I)}function A(I){return I===45||I===46||I===58||I===95||Qt(I)?(n.consume(I),A):L(I)}function L(I){return I===61?(n.consume(I),D):Ve(I)?(n.consume(I),L):y(I)}function D(I){return I===null||I===60||I===61||I===62||I===96?s(I):I===34||I===39?(n.consume(I),c=I,R):Ve(I)?(n.consume(I),D):k(I)}function R(I){return I===c?(n.consume(I),c=null,M):I===null||De(I)?s(I):(n.consume(I),R)}function k(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ot(I)?L(I):(n.consume(I),k)}function M(I){return I===47||I===62||Ve(I)?y(I):s(I)}function j(I){return I===62?(n.consume(I),H):s(I)}function H(I){return I===null||De(I)?U(I):Ve(I)?(n.consume(I),H):s(I)}function U(I){return I===45&&d===2?(n.consume(I),G):I===60&&d===1?(n.consume(I),W):I===62&&d===4?(n.consume(I),N):I===63&&d===3?(n.consume(I),O):I===93&&d===5?(n.consume(I),z):De(I)&&(d===6||d===7)?(n.exit("htmlFlowData"),n.check(db,$,F)(I)):I===null||De(I)?(n.exit("htmlFlowData"),F(I)):(n.consume(I),U)}function F(I){return n.check(pb,K,$)(I)}function K(I){return n.enter("lineEnding"),n.consume(I),n.exit("lineEnding"),Y}function Y(I){return I===null||De(I)?F(I):(n.enter("htmlFlowData"),U(I))}function G(I){return I===45?(n.consume(I),O):U(I)}function W(I){return I===47?(n.consume(I),f="",Z):U(I)}function Z(I){if(I===62){const re=f.toLowerCase();return hg.includes(re)?(n.consume(I),N):U(I)}return sn(I)&&f.length<8?(n.consume(I),f+=String.fromCharCode(I),Z):U(I)}function z(I){return I===93?(n.consume(I),O):U(I)}function O(I){return I===62?(n.consume(I),N):I===45&&d===2?(n.consume(I),O):U(I)}function N(I){return I===null||De(I)?(n.exit("htmlFlowData"),$(I)):(n.consume(I),N)}function $(I){return n.exit("htmlFlow"),r(I)}}function _b(n,r,s){const l=this;return d;function d(f){return De(f)?(n.enter("lineEnding"),n.consume(f),n.exit("lineEnding"),m):s(f)}function m(f){return l.parser.lazy[l.now().line]?s(f):r(f)}}function vb(n,r,s){return l;function l(d){return n.enter("lineEnding"),n.consume(d),n.exit("lineEnding"),n.attempt(Ja,r,s)}}const yb={name:"htmlText",tokenize:Sb};function Sb(n,r,s){const l=this;let d,m,f;return o;function o(O){return n.enter("htmlText"),n.enter("htmlTextData"),n.consume(O),c}function c(O){return O===33?(n.consume(O),h):O===47?(n.consume(O),L):O===63?(n.consume(O),y):sn(O)?(n.consume(O),k):s(O)}function h(O){return O===45?(n.consume(O),p):O===91?(n.consume(O),m=0,T):sn(O)?(n.consume(O),_):s(O)}function p(O){return O===45?(n.consume(O),C):s(O)}function u(O){return O===null?s(O):O===45?(n.consume(O),b):De(O)?(f=u,W(O)):(n.consume(O),u)}function b(O){return O===45?(n.consume(O),C):u(O)}function C(O){return O===62?G(O):O===45?b(O):u(O)}function T(O){const N="CDATA[";return O===N.charCodeAt(m++)?(n.consume(O),m===N.length?E:T):s(O)}function E(O){return O===null?s(O):O===93?(n.consume(O),S):De(O)?(f=E,W(O)):(n.consume(O),E)}function S(O){return O===93?(n.consume(O),v):E(O)}function v(O){return O===62?G(O):O===93?(n.consume(O),v):E(O)}function _(O){return O===null||O===62?G(O):De(O)?(f=_,W(O)):(n.consume(O),_)}function y(O){return O===null?s(O):O===63?(n.consume(O),A):De(O)?(f=y,W(O)):(n.consume(O),y)}function A(O){return O===62?G(O):y(O)}function L(O){return sn(O)?(n.consume(O),D):s(O)}function D(O){return O===45||Qt(O)?(n.consume(O),D):R(O)}function R(O){return De(O)?(f=R,W(O)):Ve(O)?(n.consume(O),R):G(O)}function k(O){return O===45||Qt(O)?(n.consume(O),k):O===47||O===62||ot(O)?M(O):s(O)}function M(O){return O===47?(n.consume(O),G):O===58||O===95||sn(O)?(n.consume(O),j):De(O)?(f=M,W(O)):Ve(O)?(n.consume(O),M):G(O)}function j(O){return O===45||O===46||O===58||O===95||Qt(O)?(n.consume(O),j):H(O)}function H(O){return O===61?(n.consume(O),U):De(O)?(f=H,W(O)):Ve(O)?(n.consume(O),H):M(O)}function U(O){return O===null||O===60||O===61||O===62||O===96?s(O):O===34||O===39?(n.consume(O),d=O,F):De(O)?(f=U,W(O)):Ve(O)?(n.consume(O),U):(n.consume(O),K)}function F(O){return O===d?(n.consume(O),d=void 0,Y):O===null?s(O):De(O)?(f=F,W(O)):(n.consume(O),F)}function K(O){return O===null||O===34||O===39||O===60||O===61||O===96?s(O):O===47||O===62||ot(O)?M(O):(n.consume(O),K)}function Y(O){return O===47||O===62||ot(O)?M(O):s(O)}function G(O){return O===62?(n.consume(O),n.exit("htmlTextData"),n.exit("htmlText"),r):s(O)}function W(O){return n.exit("htmlTextData"),n.enter("lineEnding"),n.consume(O),n.exit("lineEnding"),Z}function Z(O){return Ve(O)?Xe(n,z,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):z(O)}function z(O){return n.enter("htmlTextData"),f(O)}}const Uh={name:"labelEnd",resolveAll:xb,resolveTo:Eb,tokenize:kb},bb={tokenize:Ab},Cb={tokenize:Tb},wb={tokenize:Rb};function xb(n){let r=-1;const s=[];for(;++r<n.length;){const l=n[r][1];if(s.push(n[r]),l.type==="labelImage"||l.type==="labelLink"||l.type==="labelEnd"){const d=l.type==="labelImage"?4:2;l.type="data",r+=d}}return n.length!==s.length&&On(n,0,n.length,s),n}function Eb(n,r){let s=n.length,l=0,d,m,f,o;for(;s--;)if(d=n[s][1],m){if(d.type==="link"||d.type==="labelLink"&&d._inactive)break;n[s][0]==="enter"&&d.type==="labelLink"&&(d._inactive=!0)}else if(f){if(n[s][0]==="enter"&&(d.type==="labelImage"||d.type==="labelLink")&&!d._balanced&&(m=s,d.type!=="labelLink")){l=2;break}}else d.type==="labelEnd"&&(f=s);const c={type:n[m][1].type==="labelLink"?"link":"image",start:{...n[m][1].start},end:{...n[n.length-1][1].end}},h={type:"label",start:{...n[m][1].start},end:{...n[f][1].end}},p={type:"labelText",start:{...n[m+l+2][1].end},end:{...n[f-2][1].start}};return o=[["enter",c,r],["enter",h,r]],o=$n(o,n.slice(m+1,m+l+3)),o=$n(o,[["enter",p,r]]),o=$n(o,jo(r.parser.constructs.insideSpan.null,n.slice(m+l+4,f-3),r)),o=$n(o,[["exit",p,r],n[f-2],n[f-1],["exit",h,r]]),o=$n(o,n.slice(f+1)),o=$n(o,[["exit",c,r]]),On(n,m,n.length,o),n}function kb(n,r,s){const l=this;let d=l.events.length,m,f;for(;d--;)if((l.events[d][1].type==="labelImage"||l.events[d][1].type==="labelLink")&&!l.events[d][1]._balanced){m=l.events[d][1];break}return o;function o(b){return m?m._inactive?u(b):(f=l.parser.defined.includes(ni(l.sliceSerialize({start:m.end,end:l.now()}))),n.enter("labelEnd"),n.enter("labelMarker"),n.consume(b),n.exit("labelMarker"),n.exit("labelEnd"),c):s(b)}function c(b){return b===40?n.attempt(bb,p,f?p:u)(b):b===91?n.attempt(Cb,p,f?h:u)(b):f?p(b):u(b)}function h(b){return n.attempt(wb,p,u)(b)}function p(b){return r(b)}function u(b){return m._balanced=!0,s(b)}}function Ab(n,r,s){return l;function l(u){return n.enter("resource"),n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),d}function d(u){return ot(u)?qa(n,m)(u):m(u)}function m(u){return u===41?p(u):k_(n,f,o,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(u)}function f(u){return ot(u)?qa(n,c)(u):p(u)}function o(u){return s(u)}function c(u){return u===34||u===39||u===40?T_(n,h,s,"resourceTitle","resourceTitleMarker","resourceTitleString")(u):p(u)}function h(u){return ot(u)?qa(n,p)(u):p(u)}function p(u){return u===41?(n.enter("resourceMarker"),n.consume(u),n.exit("resourceMarker"),n.exit("resource"),r):s(u)}}function Tb(n,r,s){const l=this;return d;function d(o){return A_.call(l,n,m,f,"reference","referenceMarker","referenceString")(o)}function m(o){return l.parser.defined.includes(ni(l.sliceSerialize(l.events[l.events.length-1][1]).slice(1,-1)))?r(o):s(o)}function f(o){return s(o)}}function Rb(n,r,s){return l;function l(m){return n.enter("reference"),n.enter("referenceMarker"),n.consume(m),n.exit("referenceMarker"),d}function d(m){return m===93?(n.enter("referenceMarker"),n.consume(m),n.exit("referenceMarker"),n.exit("reference"),r):s(m)}}const Db={name:"labelStartImage",resolveAll:Uh.resolveAll,tokenize:Mb};function Mb(n,r,s){const l=this;return d;function d(o){return n.enter("labelImage"),n.enter("labelImageMarker"),n.consume(o),n.exit("labelImageMarker"),m}function m(o){return o===91?(n.enter("labelMarker"),n.consume(o),n.exit("labelMarker"),n.exit("labelImage"),f):s(o)}function f(o){return o===94&&"_hiddenFootnoteSupport"in l.parser.constructs?s(o):r(o)}}const Lb={name:"labelStartLink",resolveAll:Uh.resolveAll,tokenize:Ob};function Ob(n,r,s){const l=this;return d;function d(f){return n.enter("labelLink"),n.enter("labelMarker"),n.consume(f),n.exit("labelMarker"),n.exit("labelLink"),m}function m(f){return f===94&&"_hiddenFootnoteSupport"in l.parser.constructs?s(f):r(f)}}const Xu={name:"lineEnding",tokenize:Bb};function Bb(n,r){return s;function s(l){return n.enter("lineEnding"),n.consume(l),n.exit("lineEnding"),Xe(n,r,"linePrefix")}}const Co={name:"thematicBreak",tokenize:jb};function jb(n,r,s){let l=0,d;return m;function m(h){return n.enter("thematicBreak"),f(h)}function f(h){return d=h,o(h)}function o(h){return h===d?(n.enter("thematicBreakSequence"),c(h)):l>=3&&(h===null||De(h))?(n.exit("thematicBreak"),r(h)):s(h)}function c(h){return h===d?(n.consume(h),l++,c):(n.exit("thematicBreakSequence"),Ve(h)?Xe(n,o,"whitespace")(h):o(h))}}const Sn={continuation:{tokenize:Ib},exit:Pb,name:"list",tokenize:zb},Nb={partial:!0,tokenize:Fb},Hb={partial:!0,tokenize:Ub};function zb(n,r,s){const l=this,d=l.events[l.events.length-1];let m=d&&d[1].type==="linePrefix"?d[2].sliceSerialize(d[1],!0).length:0,f=0;return o;function o(C){const T=l.containerState.type||(C===42||C===43||C===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!l.containerState.marker||C===l.containerState.marker:Sh(C)){if(l.containerState.type||(l.containerState.type=T,n.enter(T,{_container:!0})),T==="listUnordered")return n.enter("listItemPrefix"),C===42||C===45?n.check(Co,s,h)(C):h(C);if(!l.interrupt||C===49)return n.enter("listItemPrefix"),n.enter("listItemValue"),c(C)}return s(C)}function c(C){return Sh(C)&&++f<10?(n.consume(C),c):(!l.interrupt||f<2)&&(l.containerState.marker?C===l.containerState.marker:C===41||C===46)?(n.exit("listItemValue"),h(C)):s(C)}function h(C){return n.enter("listItemMarker"),n.consume(C),n.exit("listItemMarker"),l.containerState.marker=l.containerState.marker||C,n.check(Ja,l.interrupt?s:p,n.attempt(Nb,b,u))}function p(C){return l.containerState.initialBlankLine=!0,m++,b(C)}function u(C){return Ve(C)?(n.enter("listItemPrefixWhitespace"),n.consume(C),n.exit("listItemPrefixWhitespace"),b):s(C)}function b(C){return l.containerState.size=m+l.sliceSerialize(n.exit("listItemPrefix"),!0).length,r(C)}}function Ib(n,r,s){const l=this;return l.containerState._closeFlow=void 0,n.check(Ja,d,m);function d(o){return l.containerState.furtherBlankLines=l.containerState.furtherBlankLines||l.containerState.initialBlankLine,Xe(n,r,"listItemIndent",l.containerState.size+1)(o)}function m(o){return l.containerState.furtherBlankLines||!Ve(o)?(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,f(o)):(l.containerState.furtherBlankLines=void 0,l.containerState.initialBlankLine=void 0,n.attempt(Hb,r,f)(o))}function f(o){return l.containerState._closeFlow=!0,l.interrupt=void 0,Xe(n,n.attempt(Sn,r,s),"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(o)}}function Ub(n,r,s){const l=this;return Xe(n,d,"listItemIndent",l.containerState.size+1);function d(m){const f=l.events[l.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===l.containerState.size?r(m):s(m)}}function Pb(n){n.exit(this.containerState.type)}function Fb(n,r,s){const l=this;return Xe(n,d,"listItemPrefixWhitespace",l.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function d(m){const f=l.events[l.events.length-1];return!Ve(m)&&f&&f[1].type==="listItemPrefixWhitespace"?r(m):s(m)}}const fg={name:"setextUnderline",resolveTo:qb,tokenize:$b};function qb(n,r){let s=n.length,l,d,m;for(;s--;)if(n[s][0]==="enter"){if(n[s][1].type==="content"){l=s;break}n[s][1].type==="paragraph"&&(d=s)}else n[s][1].type==="content"&&n.splice(s,1),!m&&n[s][1].type==="definition"&&(m=s);const f={type:"setextHeading",start:{...n[l][1].start},end:{...n[n.length-1][1].end}};return n[d][1].type="setextHeadingText",m?(n.splice(d,0,["enter",f,r]),n.splice(m+1,0,["exit",n[l][1],r]),n[l][1].end={...n[m][1].end}):n[l][1]=f,n.push(["exit",f,r]),n}function $b(n,r,s){const l=this;let d;return m;function m(h){let p=l.events.length,u;for(;p--;)if(l.events[p][1].type!=="lineEnding"&&l.events[p][1].type!=="linePrefix"&&l.events[p][1].type!=="content"){u=l.events[p][1].type==="paragraph";break}return!l.parser.lazy[l.now().line]&&(l.interrupt||u)?(n.enter("setextHeadingLine"),d=h,f(h)):s(h)}function f(h){return n.enter("setextHeadingLineSequence"),o(h)}function o(h){return h===d?(n.consume(h),o):(n.exit("setextHeadingLineSequence"),Ve(h)?Xe(n,c,"lineSuffix")(h):c(h))}function c(h){return h===null||De(h)?(n.exit("setextHeadingLine"),r(h)):s(h)}}const Gb={tokenize:Vb};function Vb(n){const r=this,s=n.attempt(Ja,l,n.attempt(this.parser.constructs.flowInitial,d,Xe(n,n.attempt(this.parser.constructs.flow,d,n.attempt(QS,d)),"linePrefix")));return s;function l(m){if(m===null){n.consume(m);return}return n.enter("lineEndingBlank"),n.consume(m),n.exit("lineEndingBlank"),r.currentConstruct=void 0,s}function d(m){if(m===null){n.consume(m);return}return n.enter("lineEnding"),n.consume(m),n.exit("lineEnding"),r.currentConstruct=void 0,s}}const Wb={resolveAll:D_()},Kb=R_("string"),Yb=R_("text");function R_(n){return{resolveAll:D_(n==="text"?Xb:void 0),tokenize:r};function r(s){const l=this,d=this.parser.constructs[n],m=s.attempt(d,f,o);return f;function f(p){return h(p)?m(p):o(p)}function o(p){if(p===null){s.consume(p);return}return s.enter("data"),s.consume(p),c}function c(p){return h(p)?(s.exit("data"),m(p)):(s.consume(p),c)}function h(p){if(p===null)return!0;const u=d[p];let b=-1;if(u)for(;++b<u.length;){const C=u[b];if(!C.previous||C.previous.call(l,l.previous))return!0}return!1}}}function D_(n){return r;function r(s,l){let d=-1,m;for(;++d<=s.length;)m===void 0?s[d]&&s[d][1].type==="data"&&(m=d,d++):(!s[d]||s[d][1].type!=="data")&&(d!==m+2&&(s[m][1].end=s[d-1][1].end,s.splice(m+2,d-m-2),d=m+2),m=void 0);return n?n(s,l):s}}function Xb(n,r){let s=0;for(;++s<=n.length;)if((s===n.length||n[s][1].type==="lineEnding")&&n[s-1][1].type==="data"){const l=n[s-1][1],d=r.sliceStream(l);let m=d.length,f=-1,o=0,c;for(;m--;){const h=d[m];if(typeof h=="string"){for(f=h.length;h.charCodeAt(f-1)===32;)o++,f--;if(f)break;f=-1}else if(h===-2)c=!0,o++;else if(h!==-1){m++;break}}if(r._contentTypeTextTrailing&&s===n.length&&(o=0),o){const h={type:s===n.length||c||o<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:m?f:l.start._bufferIndex+f,_index:l.start._index+m,line:l.end.line,column:l.end.column-o,offset:l.end.offset-o},end:{...l.end}};l.end={...h.start},l.start.offset===l.end.offset?Object.assign(l,h):(n.splice(s,0,["enter",h,r],["exit",h,r]),s+=2)}s++}return n}const Qb={42:Sn,43:Sn,45:Sn,48:Sn,49:Sn,50:Sn,51:Sn,52:Sn,53:Sn,54:Sn,55:Sn,56:Sn,57:Sn,62:C_},Jb={91:nb},Zb={[-2]:Yu,[-1]:Yu,32:Yu},eC={35:ob,42:Co,45:[fg,Co],60:fb,61:fg,95:Co,96:ug,126:ug},tC={38:x_,92:w_},nC={[-5]:Xu,[-4]:Xu,[-3]:Xu,33:Db,38:x_,42:bh,60:[LS,yb],91:Lb,92:[ab,w_],93:Uh,95:bh,96:GS},iC={null:[bh,Wb]},rC={null:[42,95]},sC={null:[]},aC=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:rC,contentInitial:Jb,disable:sC,document:Qb,flow:eC,flowInitial:Zb,insideSpan:iC,string:tC,text:nC},Symbol.toStringTag,{value:"Module"}));function lC(n,r,s){let l={_bufferIndex:-1,_index:0,line:s&&s.line||1,column:s&&s.column||1,offset:s&&s.offset||0};const d={},m=[];let f=[],o=[];const c={attempt:R(L),check:R(D),consume:_,enter:y,exit:A,interrupt:R(D,{interrupt:!0})},h={code:null,containerState:{},defineSkip:E,events:[],now:T,parser:n,previous:null,sliceSerialize:b,sliceStream:C,write:u};let p=r.tokenize.call(h,c);return r.resolveAll&&m.push(r),h;function u(H){return f=$n(f,H),S(),f[f.length-1]!==null?[]:(k(r,0),h.events=jo(m,h.events,h),h.events)}function b(H,U){return cC(C(H),U)}function C(H){return oC(f,H)}function T(){const{_bufferIndex:H,_index:U,line:F,column:K,offset:Y}=l;return{_bufferIndex:H,_index:U,line:F,column:K,offset:Y}}function E(H){d[H.line]=H.column,j()}function S(){let H;for(;l._index<f.length;){const U=f[l._index];if(typeof U=="string")for(H=l._index,l._bufferIndex<0&&(l._bufferIndex=0);l._index===H&&l._bufferIndex<U.length;)v(U.charCodeAt(l._bufferIndex));else v(U)}}function v(H){p=p(H)}function _(H){De(H)?(l.line++,l.column=1,l.offset+=H===-3?2:1,j()):H!==-1&&(l.column++,l.offset++),l._bufferIndex<0?l._index++:(l._bufferIndex++,l._bufferIndex===f[l._index].length&&(l._bufferIndex=-1,l._index++)),h.previous=H}function y(H,U){const F=U||{};return F.type=H,F.start=T(),h.events.push(["enter",F,h]),o.push(F),F}function A(H){const U=o.pop();return U.end=T(),h.events.push(["exit",U,h]),U}function L(H,U){k(H,U.from)}function D(H,U){U.restore()}function R(H,U){return F;function F(K,Y,G){let W,Z,z,O;return Array.isArray(K)?$(K):"tokenize"in K?$([K]):N(K);function N(pe){return Q;function Q(q){const ee=q!==null&&pe[q],ae=q!==null&&pe.null,de=[...Array.isArray(ee)?ee:ee?[ee]:[],...Array.isArray(ae)?ae:ae?[ae]:[]];return $(de)(q)}}function $(pe){return W=pe,Z=0,pe.length===0?G:I(pe[Z])}function I(pe){return Q;function Q(q){return O=M(),z=pe,pe.partial||(h.currentConstruct=pe),pe.name&&h.parser.constructs.disable.null.includes(pe.name)?ve():pe.tokenize.call(U?Object.assign(Object.create(h),U):h,c,re,ve)(q)}}function re(pe){return H(z,O),Y}function ve(pe){return O.restore(),++Z<W.length?I(W[Z]):G}}}function k(H,U){H.resolveAll&&!m.includes(H)&&m.push(H),H.resolve&&On(h.events,U,h.events.length-U,H.resolve(h.events.slice(U),h)),H.resolveTo&&(h.events=H.resolveTo(h.events,h))}function M(){const H=T(),U=h.previous,F=h.currentConstruct,K=h.events.length,Y=Array.from(o);return{from:K,restore:G};function G(){l=H,h.previous=U,h.currentConstruct=F,h.events.length=K,o=Y,j()}}function j(){l.line in d&&l.column<2&&(l.column=d[l.line],l.offset+=d[l.line]-1)}}function oC(n,r){const s=r.start._index,l=r.start._bufferIndex,d=r.end._index,m=r.end._bufferIndex;let f;if(s===d)f=[n[s].slice(l,m)];else{if(f=n.slice(s,d),l>-1){const o=f[0];typeof o=="string"?f[0]=o.slice(l):f.shift()}m>0&&f.push(n[d].slice(0,m))}return f}function cC(n,r){let s=-1;const l=[];let d;for(;++s<n.length;){const m=n[s];let f;if(typeof m=="string")f=m;else switch(m){case-5:{f="\r";break}case-4:{f=`
|
|
64
64
|
`;break}case-3:{f=`\r
|
|
65
|
-
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&d)continue;f=" ";break}default:f=String.fromCharCode(m)}d=m===-2,l.push(f)}return l.join("")}function hC(n){const l={constructs:S_([lC,...(n||{}).extensions||[]]),content:d(kS),defined:[],document:d(TS),flow:d(Vb),lazy:{},string:d(Yb),text:d(Xb)};return l;function d(m){return f;function f(o){return oC(l,m,o)}}}function fC(n){for(;!E_(n););return n}const dg=/[\0\t\n\r]/g;function dC(){let n=1,r="",s=!0,l;return d;function d(m,f,o){const c=[];let h,p,u,b,C;for(m=r+(typeof m=="string"?m.toString():new TextDecoder(f||void 0).decode(m)),u=0,r="",s&&(m.charCodeAt(0)===65279&&u++,s=void 0);u<m.length;){if(dg.lastIndex=u,h=dg.exec(m),b=h&&h.index!==void 0?h.index:m.length,C=m.charCodeAt(b),!h){r=m.slice(u);break}if(C===10&&u===b&&l)c.push(-3),l=void 0;else switch(l&&(c.push(-5),l=void 0),u<b&&(c.push(m.slice(u,b)),n+=b-u),C){case 0:{c.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,c.push(-2);n++<p;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:l=!0,n=1}u=b+1}return o&&(l&&c.push(-5),r&&c.push(r),c.push(null)),c}}const pC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mC(n){return n.replace(pC,gC)}function gC(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const d=s.charCodeAt(1),m=d===120||d===88;return b_(s.slice(m?2:1),m?16:10)}return Ih(s)||n}const M_={}.hasOwnProperty;function _C(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),vC(s)(fC(hC(s).document().write(dC()(n,r,!0))))}function vC(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:m(yt),autolinkProtocol:M,autolinkEmail:M,atxHeading:m(He),blockQuote:m(ae),characterEscape:M,characterReference:M,codeFenced:m(de),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:m(de,f),codeText:m(se,f),codeTextData:M,data:M,codeFlowValue:M,definition:m(we),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:m(je),hardBreakEscape:m(Pe),hardBreakTrailing:m(Pe),htmlFlow:m(xe,f),htmlFlowData:M,htmlText:m(xe,f),htmlTextData:M,image:m(xt),label:f,link:m(yt),listItem:m(an),listItemValue:b,listOrdered:m(Et,u),listUnordered:m(Et),paragraph:m(Cn),reference:I,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:m(He),strong:m(St),thematicBreak:m(Lt)},exit:{atxHeading:c(),atxHeadingSequence:L,autolink:c(),autolinkEmail:ee,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:pe,characterReference:Q,codeFenced:c(S),codeFencedFence:E,codeFencedFenceInfo:C,codeFencedFenceMeta:T,codeFlowValue:j,codeIndented:c(v),codeText:c(Y),codeTextData:j,data:j,definition:c(),definitionDestinationString:A,definitionLabelString:_,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(U),hardBreakTrailing:c(U),htmlFlow:c(F),htmlFlowData:j,htmlText:c(K),htmlTextData:j,image:c(W),label:z,labelText:Z,lineEnding:H,link:c(G),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:O,resourceTitleString:N,resource:$,setextHeading:c(k),setextHeadingLineSequence:R,setextHeadingText:D,strong:c(),thematicBreak:c()}};L_(r,(n||{}).mdastExtensions||[]);const s={};return l;function l(he){let ye={type:"root",children:[]};const Ae={stack:[ye],tokenStack:[],config:r,enter:o,exit:h,buffer:f,resume:p,data:s},Me=[];let Oe=-1;for(;++Oe<he.length;)if(he[Oe][1].type==="listOrdered"||he[Oe][1].type==="listUnordered")if(he[Oe][0]==="enter")Me.push(Oe);else{const ft=Me.pop();Oe=d(he,ft,Oe)}for(Oe=-1;++Oe<he.length;){const ft=r[he[Oe][0]];M_.call(ft,he[Oe][1].type)&&ft[he[Oe][1].type].call(Object.assign({sliceSerialize:he[Oe][2].sliceSerialize},Ae),he[Oe][1])}if(Ae.tokenStack.length>0){const ft=Ae.tokenStack[Ae.tokenStack.length-1];(ft[1]||pg).call(Ae,void 0,ft[0])}for(ye.position={start:fr(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:fr(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<r.transforms.length;)ye=r.transforms[Oe](ye)||ye;return ye}function d(he,ye,Ae){let Me=ye-1,Oe=-1,ft=!1,Fe,gt,mt,Ot;for(;++Me<=Ae;){const Qe=he[Me];switch(Qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Qe[0]==="enter"?Oe++:Oe--,Ot=void 0;break}case"lineEndingBlank":{Qe[0]==="enter"&&(Fe&&!Ot&&!Oe&&!mt&&(mt=Me),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Oe&&Qe[0]==="enter"&&Qe[1].type==="listItemPrefix"||Oe===-1&&Qe[0]==="exit"&&(Qe[1].type==="listUnordered"||Qe[1].type==="listOrdered")){if(Fe){let en=Me;for(gt=void 0;en--;){const Bt=he[en];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;gt&&(he[gt][1].type="lineEndingBlank",ft=!0),Bt[1].type="lineEnding",gt=en}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}mt&&(!gt||mt<gt)&&(Fe._spread=!0),Fe.end=Object.assign({},gt?he[gt][1].start:Qe[1].end),he.splice(gt||Me,0,["exit",Fe,Qe[2]]),Me++,Ae++}if(Qe[1].type==="listItemPrefix"){const en={type:"listItem",_spread:!1,start:Object.assign({},Qe[1].start),end:void 0};Fe=en,he.splice(Me,0,["enter",en,Qe[2]]),Me++,Ae++,mt=void 0,Ot=!0}}}return he[ye][1]._spread=ft,Ae}function m(he,ye){return Ae;function Ae(Me){o.call(this,he(Me),Me),ye&&ye.call(this,Me)}}function f(){this.stack.push({type:"fragment",children:[]})}function o(he,ye,Ae){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([ye,Ae||void 0]),he.position={start:fr(ye.start),end:void 0}}function c(he){return ye;function ye(Ae){he&&he.call(this,Ae),h.call(this,Ae)}}function h(he,ye){const Ae=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==he.type&&(ye?ye.call(this,he,Me[0]):(Me[1]||pg).call(this,he,Me[0]));else throw new Error("Cannot close `"+he.type+"` ("+Fa({start:he.start,end:he.end})+"): it’s not open");Ae.position.end=fr(he.end)}function p(){return zh(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function b(he){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function C(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=he}function T(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=he}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he.replace(/(\r?\n|\r)$/g,"")}function _(he){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ye,Ae.identifier=ni(this.sliceSerialize(he)).toLowerCase()}function y(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.title=he}function A(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.url=he}function L(he){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Ae=this.sliceSerialize(he).length;ye.depth=Ae}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function R(he){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function M(he){const Ae=this.stack[this.stack.length-1].children;let Me=Ae[Ae.length-1];(!Me||Me.type!=="text")&&(Me=tt(),Me.position={start:fr(he.start),end:void 0},Ae.push(Me)),this.stack.push(Me)}function j(he){const ye=this.stack.pop();ye.value+=this.sliceSerialize(he),ye.position.end=fr(he.end)}function H(he){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=ye.children[ye.children.length-1];Ae.position.end=fr(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ye.type)&&(M.call(this,he),j.call(this,he))}function U(){this.data.atHardBreak=!0}function F(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function K(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function Y(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function G(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ye,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function W(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ye,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function Z(he){const ye=this.sliceSerialize(he),Ae=this.stack[this.stack.length-2];Ae.label=mC(ye),Ae.identifier=ni(ye).toLowerCase()}function z(){const he=this.stack[this.stack.length-1],ye=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Me=he.children;Ae.children=Me}else Ae.alt=ye}function O(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.url=he}function N(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.title=he}function $(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function re(he){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ye,Ae.identifier=ni(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function ve(he){this.data.characterReferenceType=he.type}function pe(he){const ye=this.sliceSerialize(he),Ae=this.data.characterReferenceType;let Me;Ae?(Me=b_(ye,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Ih(ye);const Oe=this.stack[this.stack.length-1];Oe.value+=Me}function Q(he){const ye=this.stack.pop();ye.position.end=fr(he.end)}function q(he){j.call(this,he);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(he)}function ee(he){j.call(this,he);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(he)}function ae(){return{type:"blockquote",children:[]}}function de(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function je(){return{type:"emphasis",children:[]}}function He(){return{type:"heading",depth:0,children:[]}}function Pe(){return{type:"break"}}function xe(){return{type:"html",value:""}}function xt(){return{type:"image",title:null,url:"",alt:null}}function yt(){return{type:"link",title:null,url:"",children:[]}}function Et(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function an(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function Cn(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function Lt(){return{type:"thematicBreak"}}}function fr(n){return{line:n.line,column:n.column,offset:n.offset}}function L_(n,r){let s=-1;for(;++s<r.length;){const l=r[s];Array.isArray(l)?L_(n,l):yC(n,l)}}function yC(n,r){let s;for(s in r)if(M_.call(r,s))switch(s){case"canContainEols":{const l=r[s];l&&n[s].push(...l);break}case"transforms":{const l=r[s];l&&n[s].push(...l);break}case"enter":case"exit":{const l=r[s];l&&Object.assign(n[s],l);break}}}function pg(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Fa({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Fa({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Fa({start:r.start,end:r.end})+") is still open")}function SC(n){const r=this;r.parser=s;function s(l){return _C(l,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function bC(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function CC(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
66
|
-
`}]}function
|
|
67
|
-
`:"",l={},d=r.lang?r.lang.split(/\s+/):[];d.length>0&&(l.className=["language-"+d[0]]);let m={type:"element",tagName:"code",properties:l,children:[{type:"text",value:s}]};return r.meta&&(m.data={meta:r.meta}),n.patch(r,m),m=n.applyData(r,m),m={type:"element",tagName:"pre",properties:{},children:[m]},n.patch(r,m),m}function
|
|
65
|
+
`;break}case-2:{f=r?" ":" ";break}case-1:{if(!r&&d)continue;f=" ";break}default:f=String.fromCharCode(m)}d=m===-2,l.push(f)}return l.join("")}function uC(n){const l={constructs:S_([aC,...(n||{}).extensions||[]]),content:d(ES),defined:[],document:d(AS),flow:d(Gb),lazy:{},string:d(Kb),text:d(Yb)};return l;function d(m){return f;function f(o){return lC(l,m,o)}}}function hC(n){for(;!E_(n););return n}const dg=/[\0\t\n\r]/g;function fC(){let n=1,r="",s=!0,l;return d;function d(m,f,o){const c=[];let h,p,u,b,C;for(m=r+(typeof m=="string"?m.toString():new TextDecoder(f||void 0).decode(m)),u=0,r="",s&&(m.charCodeAt(0)===65279&&u++,s=void 0);u<m.length;){if(dg.lastIndex=u,h=dg.exec(m),b=h&&h.index!==void 0?h.index:m.length,C=m.charCodeAt(b),!h){r=m.slice(u);break}if(C===10&&u===b&&l)c.push(-3),l=void 0;else switch(l&&(c.push(-5),l=void 0),u<b&&(c.push(m.slice(u,b)),n+=b-u),C){case 0:{c.push(65533),n++;break}case 9:{for(p=Math.ceil(n/4)*4,c.push(-2);n++<p;)c.push(-1);break}case 10:{c.push(-4),n=1;break}default:l=!0,n=1}u=b+1}return o&&(l&&c.push(-5),r&&c.push(r),c.push(null)),c}}const dC=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function pC(n){return n.replace(dC,mC)}function mC(n,r,s){if(r)return r;if(s.charCodeAt(0)===35){const d=s.charCodeAt(1),m=d===120||d===88;return b_(s.slice(m?2:1),m?16:10)}return Ih(s)||n}const M_={}.hasOwnProperty;function gC(n,r,s){return r&&typeof r=="object"&&(s=r,r=void 0),_C(s)(hC(uC(s).document().write(fC()(n,r,!0))))}function _C(n){const r={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:m(yt),autolinkProtocol:M,autolinkEmail:M,atxHeading:m(He),blockQuote:m(ae),characterEscape:M,characterReference:M,codeFenced:m(de),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:m(de,f),codeText:m(se,f),codeTextData:M,data:M,codeFlowValue:M,definition:m(we),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:m(je),hardBreakEscape:m(Pe),hardBreakTrailing:m(Pe),htmlFlow:m(xe,f),htmlFlowData:M,htmlText:m(xe,f),htmlTextData:M,image:m(xt),label:f,link:m(yt),listItem:m(an),listItemValue:b,listOrdered:m(Et,u),listUnordered:m(Et),paragraph:m(Cn),reference:I,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:m(He),strong:m(St),thematicBreak:m(Lt)},exit:{atxHeading:c(),atxHeadingSequence:L,autolink:c(),autolinkEmail:ee,autolinkProtocol:q,blockQuote:c(),characterEscapeValue:j,characterReferenceMarkerHexadecimal:ve,characterReferenceMarkerNumeric:ve,characterReferenceValue:pe,characterReference:Q,codeFenced:c(S),codeFencedFence:E,codeFencedFenceInfo:C,codeFencedFenceMeta:T,codeFlowValue:j,codeIndented:c(v),codeText:c(Y),codeTextData:j,data:j,definition:c(),definitionDestinationString:A,definitionLabelString:_,definitionTitleString:y,emphasis:c(),hardBreakEscape:c(U),hardBreakTrailing:c(U),htmlFlow:c(F),htmlFlowData:j,htmlText:c(K),htmlTextData:j,image:c(W),label:z,labelText:Z,lineEnding:H,link:c(G),listItem:c(),listOrdered:c(),listUnordered:c(),paragraph:c(),referenceString:re,resourceDestinationString:O,resourceTitleString:N,resource:$,setextHeading:c(k),setextHeadingLineSequence:R,setextHeadingText:D,strong:c(),thematicBreak:c()}};L_(r,(n||{}).mdastExtensions||[]);const s={};return l;function l(he){let ye={type:"root",children:[]};const Ae={stack:[ye],tokenStack:[],config:r,enter:o,exit:h,buffer:f,resume:p,data:s},Me=[];let Oe=-1;for(;++Oe<he.length;)if(he[Oe][1].type==="listOrdered"||he[Oe][1].type==="listUnordered")if(he[Oe][0]==="enter")Me.push(Oe);else{const ft=Me.pop();Oe=d(he,ft,Oe)}for(Oe=-1;++Oe<he.length;){const ft=r[he[Oe][0]];M_.call(ft,he[Oe][1].type)&&ft[he[Oe][1].type].call(Object.assign({sliceSerialize:he[Oe][2].sliceSerialize},Ae),he[Oe][1])}if(Ae.tokenStack.length>0){const ft=Ae.tokenStack[Ae.tokenStack.length-1];(ft[1]||pg).call(Ae,void 0,ft[0])}for(ye.position={start:fr(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:fr(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},Oe=-1;++Oe<r.transforms.length;)ye=r.transforms[Oe](ye)||ye;return ye}function d(he,ye,Ae){let Me=ye-1,Oe=-1,ft=!1,Fe,gt,mt,Ot;for(;++Me<=Ae;){const Qe=he[Me];switch(Qe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Qe[0]==="enter"?Oe++:Oe--,Ot=void 0;break}case"lineEndingBlank":{Qe[0]==="enter"&&(Fe&&!Ot&&!Oe&&!mt&&(mt=Me),Ot=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Ot=void 0}if(!Oe&&Qe[0]==="enter"&&Qe[1].type==="listItemPrefix"||Oe===-1&&Qe[0]==="exit"&&(Qe[1].type==="listUnordered"||Qe[1].type==="listOrdered")){if(Fe){let Zt=Me;for(gt=void 0;Zt--;){const Bt=he[Zt];if(Bt[1].type==="lineEnding"||Bt[1].type==="lineEndingBlank"){if(Bt[0]==="exit")continue;gt&&(he[gt][1].type="lineEndingBlank",ft=!0),Bt[1].type="lineEnding",gt=Zt}else if(!(Bt[1].type==="linePrefix"||Bt[1].type==="blockQuotePrefix"||Bt[1].type==="blockQuotePrefixWhitespace"||Bt[1].type==="blockQuoteMarker"||Bt[1].type==="listItemIndent"))break}mt&&(!gt||mt<gt)&&(Fe._spread=!0),Fe.end=Object.assign({},gt?he[gt][1].start:Qe[1].end),he.splice(gt||Me,0,["exit",Fe,Qe[2]]),Me++,Ae++}if(Qe[1].type==="listItemPrefix"){const Zt={type:"listItem",_spread:!1,start:Object.assign({},Qe[1].start),end:void 0};Fe=Zt,he.splice(Me,0,["enter",Zt,Qe[2]]),Me++,Ae++,mt=void 0,Ot=!0}}}return he[ye][1]._spread=ft,Ae}function m(he,ye){return Ae;function Ae(Me){o.call(this,he(Me),Me),ye&&ye.call(this,Me)}}function f(){this.stack.push({type:"fragment",children:[]})}function o(he,ye,Ae){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([ye,Ae||void 0]),he.position={start:fr(ye.start),end:void 0}}function c(he){return ye;function ye(Ae){he&&he.call(this,Ae),h.call(this,Ae)}}function h(he,ye){const Ae=this.stack.pop(),Me=this.tokenStack.pop();if(Me)Me[0].type!==he.type&&(ye?ye.call(this,he,Me[0]):(Me[1]||pg).call(this,he,Me[0]));else throw new Error("Cannot close `"+he.type+"` ("+Fa({start:he.start,end:he.end})+"): it’s not open");Ae.position.end=fr(he.end)}function p(){return zh(this.stack.pop())}function u(){this.data.expectingFirstListItemValue=!0}function b(he){if(this.data.expectingFirstListItemValue){const ye=this.stack[this.stack.length-2];ye.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function C(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.lang=he}function T(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.meta=he}function E(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function S(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he.replace(/(\r?\n|\r)$/g,"")}function _(he){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ye,Ae.identifier=ni(this.sliceSerialize(he)).toLowerCase()}function y(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.title=he}function A(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.url=he}function L(he){const ye=this.stack[this.stack.length-1];if(!ye.depth){const Ae=this.sliceSerialize(he).length;ye.depth=Ae}}function D(){this.data.setextHeadingSlurpLineEnding=!0}function R(he){const ye=this.stack[this.stack.length-1];ye.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function k(){this.data.setextHeadingSlurpLineEnding=void 0}function M(he){const Ae=this.stack[this.stack.length-1].children;let Me=Ae[Ae.length-1];(!Me||Me.type!=="text")&&(Me=tt(),Me.position={start:fr(he.start),end:void 0},Ae.push(Me)),this.stack.push(Me)}function j(he){const ye=this.stack.pop();ye.value+=this.sliceSerialize(he),ye.position.end=fr(he.end)}function H(he){const ye=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ae=ye.children[ye.children.length-1];Ae.position.end=fr(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&r.canContainEols.includes(ye.type)&&(M.call(this,he),j.call(this,he))}function U(){this.data.atHardBreak=!0}function F(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function K(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function Y(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.value=he}function G(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ye,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function W(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ye=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ye,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function Z(he){const ye=this.sliceSerialize(he),Ae=this.stack[this.stack.length-2];Ae.label=pC(ye),Ae.identifier=ni(ye).toLowerCase()}function z(){const he=this.stack[this.stack.length-1],ye=this.resume(),Ae=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ae.type==="link"){const Me=he.children;Ae.children=Me}else Ae.alt=ye}function O(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.url=he}function N(){const he=this.resume(),ye=this.stack[this.stack.length-1];ye.title=he}function $(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function re(he){const ye=this.resume(),Ae=this.stack[this.stack.length-1];Ae.label=ye,Ae.identifier=ni(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function ve(he){this.data.characterReferenceType=he.type}function pe(he){const ye=this.sliceSerialize(he),Ae=this.data.characterReferenceType;let Me;Ae?(Me=b_(ye,Ae==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Me=Ih(ye);const Oe=this.stack[this.stack.length-1];Oe.value+=Me}function Q(he){const ye=this.stack.pop();ye.position.end=fr(he.end)}function q(he){j.call(this,he);const ye=this.stack[this.stack.length-1];ye.url=this.sliceSerialize(he)}function ee(he){j.call(this,he);const ye=this.stack[this.stack.length-1];ye.url="mailto:"+this.sliceSerialize(he)}function ae(){return{type:"blockquote",children:[]}}function de(){return{type:"code",lang:null,meta:null,value:""}}function se(){return{type:"inlineCode",value:""}}function we(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function je(){return{type:"emphasis",children:[]}}function He(){return{type:"heading",depth:0,children:[]}}function Pe(){return{type:"break"}}function xe(){return{type:"html",value:""}}function xt(){return{type:"image",title:null,url:"",alt:null}}function yt(){return{type:"link",title:null,url:"",children:[]}}function Et(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function an(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function Cn(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function tt(){return{type:"text",value:""}}function Lt(){return{type:"thematicBreak"}}}function fr(n){return{line:n.line,column:n.column,offset:n.offset}}function L_(n,r){let s=-1;for(;++s<r.length;){const l=r[s];Array.isArray(l)?L_(n,l):vC(n,l)}}function vC(n,r){let s;for(s in r)if(M_.call(r,s))switch(s){case"canContainEols":{const l=r[s];l&&n[s].push(...l);break}case"transforms":{const l=r[s];l&&n[s].push(...l);break}case"enter":case"exit":{const l=r[s];l&&Object.assign(n[s],l);break}}}function pg(n,r){throw n?new Error("Cannot close `"+n.type+"` ("+Fa({start:n.start,end:n.end})+"): a different token (`"+r.type+"`, "+Fa({start:r.start,end:r.end})+") is open"):new Error("Cannot close document, a token (`"+r.type+"`, "+Fa({start:r.start,end:r.end})+") is still open")}function yC(n){const r=this;r.parser=s;function s(l){return gC(l,{...r.data("settings"),...n,extensions:r.data("micromarkExtensions")||[],mdastExtensions:r.data("fromMarkdownExtensions")||[]})}}function SC(n,r){const s={type:"element",tagName:"blockquote",properties:{},children:n.wrap(n.all(r),!0)};return n.patch(r,s),n.applyData(r,s)}function bC(n,r){const s={type:"element",tagName:"br",properties:{},children:[]};return n.patch(r,s),[n.applyData(r,s),{type:"text",value:`
|
|
66
|
+
`}]}function CC(n,r){const s=r.value?r.value+`
|
|
67
|
+
`:"",l={},d=r.lang?r.lang.split(/\s+/):[];d.length>0&&(l.className=["language-"+d[0]]);let m={type:"element",tagName:"code",properties:l,children:[{type:"text",value:s}]};return r.meta&&(m.data={meta:r.meta}),n.patch(r,m),m=n.applyData(r,m),m={type:"element",tagName:"pre",properties:{},children:[m]},n.patch(r,m),m}function wC(n,r){const s={type:"element",tagName:"del",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function xC(n,r){const s={type:"element",tagName:"em",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function EC(n,r){const s=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",l=String(r.identifier).toUpperCase(),d=zs(l.toLowerCase()),m=n.footnoteOrder.indexOf(l);let f,o=n.footnoteCounts.get(l);o===void 0?(o=0,n.footnoteOrder.push(l),f=n.footnoteOrder.length):f=m+1,o+=1,n.footnoteCounts.set(l,o);const c={type:"element",tagName:"a",properties:{href:"#"+s+"fn-"+d,id:s+"fnref-"+d+(o>1?"-"+o:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};n.patch(r,c);const h={type:"element",tagName:"sup",properties:{},children:[c]};return n.patch(r,h),n.applyData(r,h)}function kC(n,r){const s={type:"element",tagName:"h"+r.depth,properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function AC(n,r){if(n.options.allowDangerousHtml){const s={type:"raw",value:r.value};return n.patch(r,s),n.applyData(r,s)}}function O_(n,r){const s=r.referenceType;let l="]";if(s==="collapsed"?l+="[]":s==="full"&&(l+="["+(r.label||r.identifier)+"]"),r.type==="imageReference")return[{type:"text",value:"!["+r.alt+l}];const d=n.all(r),m=d[0];m&&m.type==="text"?m.value="["+m.value:d.unshift({type:"text",value:"["});const f=d[d.length-1];return f&&f.type==="text"?f.value+=l:d.push({type:"text",value:l}),d}function TC(n,r){const s=String(r.identifier).toUpperCase(),l=n.definitionById.get(s);if(!l)return O_(n,r);const d={src:zs(l.url||""),alt:r.alt};l.title!==null&&l.title!==void 0&&(d.title=l.title);const m={type:"element",tagName:"img",properties:d,children:[]};return n.patch(r,m),n.applyData(r,m)}function RC(n,r){const s={src:zs(r.url)};r.alt!==null&&r.alt!==void 0&&(s.alt=r.alt),r.title!==null&&r.title!==void 0&&(s.title=r.title);const l={type:"element",tagName:"img",properties:s,children:[]};return n.patch(r,l),n.applyData(r,l)}function DC(n,r){const s={type:"text",value:r.value.replace(/\r?\n|\r/g," ")};n.patch(r,s);const l={type:"element",tagName:"code",properties:{},children:[s]};return n.patch(r,l),n.applyData(r,l)}function MC(n,r){const s=String(r.identifier).toUpperCase(),l=n.definitionById.get(s);if(!l)return O_(n,r);const d={href:zs(l.url||"")};l.title!==null&&l.title!==void 0&&(d.title=l.title);const m={type:"element",tagName:"a",properties:d,children:n.all(r)};return n.patch(r,m),n.applyData(r,m)}function LC(n,r){const s={href:zs(r.url)};r.title!==null&&r.title!==void 0&&(s.title=r.title);const l={type:"element",tagName:"a",properties:s,children:n.all(r)};return n.patch(r,l),n.applyData(r,l)}function OC(n,r,s){const l=n.all(r),d=s?BC(s):B_(r),m={},f=[];if(typeof r.checked=="boolean"){const p=l[0];let u;p&&p.type==="element"&&p.tagName==="p"?u=p:(u={type:"element",tagName:"p",properties:{},children:[]},l.unshift(u)),u.children.length>0&&u.children.unshift({type:"text",value:" "}),u.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:r.checked,disabled:!0},children:[]}),m.className=["task-list-item"]}let o=-1;for(;++o<l.length;){const p=l[o];(d||o!==0||p.type!=="element"||p.tagName!=="p")&&f.push({type:"text",value:`
|
|
68
68
|
`}),p.type==="element"&&p.tagName==="p"&&!d?f.push(...p.children):f.push(p)}const c=l[l.length-1];c&&(d||c.type!=="element"||c.tagName!=="p")&&f.push({type:"text",value:`
|
|
69
|
-
`});const h={type:"element",tagName:"li",properties:m,children:f};return n.patch(r,h),n.applyData(r,h)}function
|
|
69
|
+
`});const h={type:"element",tagName:"li",properties:m,children:f};return n.patch(r,h),n.applyData(r,h)}function BC(n){let r=!1;if(n.type==="list"){r=n.spread||!1;const s=n.children;let l=-1;for(;!r&&++l<s.length;)r=B_(s[l])}return r}function B_(n){const r=n.spread;return r??n.children.length>1}function jC(n,r){const s={},l=n.all(r);let d=-1;for(typeof r.start=="number"&&r.start!==1&&(s.start=r.start);++d<l.length;){const f=l[d];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){s.className=["contains-task-list"];break}}const m={type:"element",tagName:r.ordered?"ol":"ul",properties:s,children:n.wrap(l,!0)};return n.patch(r,m),n.applyData(r,m)}function NC(n,r){const s={type:"element",tagName:"p",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function HC(n,r){const s={type:"root",children:n.wrap(n.all(r))};return n.patch(r,s),n.applyData(r,s)}function zC(n,r){const s={type:"element",tagName:"strong",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}function IC(n,r){const s=n.all(r),l=s.shift(),d=[];if(l){const f={type:"element",tagName:"thead",properties:{},children:n.wrap([l],!0)};n.patch(r.children[0],f),d.push(f)}if(s.length>0){const f={type:"element",tagName:"tbody",properties:{},children:n.wrap(s,!0)},o=Bh(r.children[1]),c=d_(r.children[r.children.length-1]);o&&c&&(f.position={start:o,end:c}),d.push(f)}const m={type:"element",tagName:"table",properties:{},children:n.wrap(d,!0)};return n.patch(r,m),n.applyData(r,m)}function UC(n,r,s){const l=s?s.children:void 0,m=(l?l.indexOf(r):1)===0?"th":"td",f=s&&s.type==="table"?s.align:void 0,o=f?f.length:r.children.length;let c=-1;const h=[];for(;++c<o;){const u=r.children[c],b={},C=f?f[c]:void 0;C&&(b.align=C);let T={type:"element",tagName:m,properties:b,children:[]};u&&(T.children=n.all(u),n.patch(u,T),T=n.applyData(u,T)),h.push(T)}const p={type:"element",tagName:"tr",properties:{},children:n.wrap(h,!0)};return n.patch(r,p),n.applyData(r,p)}function PC(n,r){const s={type:"element",tagName:"td",properties:{},children:n.all(r)};return n.patch(r,s),n.applyData(r,s)}const mg=9,gg=32;function FC(n){const r=String(n),s=/\r?\n|\r/g;let l=s.exec(r),d=0;const m=[];for(;l;)m.push(_g(r.slice(d,l.index),d>0,!0),l[0]),d=l.index+l[0].length,l=s.exec(r);return m.push(_g(r.slice(d),d>0,!1)),m.join("")}function _g(n,r,s){let l=0,d=n.length;if(r){let m=n.codePointAt(l);for(;m===mg||m===gg;)l++,m=n.codePointAt(l)}if(s){let m=n.codePointAt(d-1);for(;m===mg||m===gg;)d--,m=n.codePointAt(d-1)}return d>l?n.slice(l,d):""}function qC(n,r){const s={type:"text",value:FC(String(r.value))};return n.patch(r,s),n.applyData(r,s)}function $C(n,r){const s={type:"element",tagName:"hr",properties:{},children:[]};return n.patch(r,s),n.applyData(r,s)}const GC={blockquote:SC,break:bC,code:CC,delete:wC,emphasis:xC,footnoteReference:EC,heading:kC,html:AC,imageReference:TC,image:RC,inlineCode:DC,linkReference:MC,link:LC,listItem:OC,list:jC,paragraph:NC,root:HC,strong:zC,table:IC,tableCell:PC,tableRow:UC,text:qC,thematicBreak:$C,toml:go,yaml:go,definition:go,footnoteDefinition:go};function go(){}const j_=-1,No=0,$a=1,ko=2,Ph=3,Fh=4,qh=5,$h=6,N_=7,H_=8,VC=typeof self=="object"?self:globalThis,vg=(n,r)=>{switch(n){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+n)}return new VC[n](r)},WC=(n,r)=>{const s=(d,m)=>(n.set(m,d),d),l=d=>{if(n.has(d))return n.get(d);const[m,f]=r[d];switch(m){case No:case j_:return s(f,d);case $a:{const o=s([],d);for(const c of f)o.push(l(c));return o}case ko:{const o=s({},d);for(const[c,h]of f)o[l(c)]=l(h);return o}case Ph:return s(new Date(f),d);case Fh:{const{source:o,flags:c}=f;return s(new RegExp(o,c),d)}case qh:{const o=s(new Map,d);for(const[c,h]of f)o.set(l(c),l(h));return o}case $h:{const o=s(new Set,d);for(const c of f)o.add(l(c));return o}case N_:{const{name:o,message:c}=f;return s(vg(o,c),d)}case H_:return s(BigInt(f),d);case"BigInt":return s(Object(BigInt(f)),d);case"ArrayBuffer":return s(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:o}=new Uint8Array(f);return s(new DataView(o),f)}}return s(vg(m,f),d)};return l},yg=n=>WC(new Map,n)(0),Ds="",{toString:KC}={},{keys:YC}=Object,Ua=n=>{const r=typeof n;if(r!=="object"||!n)return[No,r];const s=KC.call(n).slice(8,-1);switch(s){case"Array":return[$a,Ds];case"Object":return[ko,Ds];case"Date":return[Ph,Ds];case"RegExp":return[Fh,Ds];case"Map":return[qh,Ds];case"Set":return[$h,Ds];case"DataView":return[$a,s]}return s.includes("Array")?[$a,s]:s.includes("Error")?[N_,s]:[ko,s]},_o=([n,r])=>n===No&&(r==="function"||r==="symbol"),XC=(n,r,s,l)=>{const d=(f,o)=>{const c=l.push(f)-1;return s.set(o,c),c},m=f=>{if(s.has(f))return s.get(f);let[o,c]=Ua(f);switch(o){case No:{let p=f;switch(c){case"bigint":o=H_,p=f.toString();break;case"function":case"symbol":if(n)throw new TypeError("unable to serialize "+c);p=null;break;case"undefined":return d([j_],f)}return d([o,p],f)}case $a:{if(c){let b=f;return c==="DataView"?b=new Uint8Array(f.buffer):c==="ArrayBuffer"&&(b=new Uint8Array(f)),d([c,[...b]],f)}const p=[],u=d([o,p],f);for(const b of f)p.push(m(b));return u}case ko:{if(c)switch(c){case"BigInt":return d([c,f.toString()],f);case"Boolean":case"Number":case"String":return d([c,f.valueOf()],f)}if(r&&"toJSON"in f)return m(f.toJSON());const p=[],u=d([o,p],f);for(const b of YC(f))(n||!_o(Ua(f[b])))&&p.push([m(b),m(f[b])]);return u}case Ph:return d([o,f.toISOString()],f);case Fh:{const{source:p,flags:u}=f;return d([o,{source:p,flags:u}],f)}case qh:{const p=[],u=d([o,p],f);for(const[b,C]of f)(n||!(_o(Ua(b))||_o(Ua(C))))&&p.push([m(b),m(C)]);return u}case $h:{const p=[],u=d([o,p],f);for(const b of f)(n||!_o(Ua(b)))&&p.push(m(b));return u}}const{message:h}=f;return d([o,{name:c,message:h}],f)};return m},Sg=(n,{json:r,lossy:s}={})=>{const l=[];return XC(!(r||s),!!r,new Map,l)(n),l},Ao=typeof structuredClone=="function"?(n,r)=>r&&("json"in r||"lossy"in r)?yg(Sg(n,r)):structuredClone(n):(n,r)=>yg(Sg(n,r));function QC(n,r){const s=[{type:"text",value:"↩"}];return r>1&&s.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(r)}]}),s}function JC(n,r){return"Back to reference "+(n+1)+(r>1?"-"+r:"")}function ZC(n){const r=typeof n.options.clobberPrefix=="string"?n.options.clobberPrefix:"user-content-",s=n.options.footnoteBackContent||QC,l=n.options.footnoteBackLabel||JC,d=n.options.footnoteLabel||"Footnotes",m=n.options.footnoteLabelTagName||"h2",f=n.options.footnoteLabelProperties||{className:["sr-only"]},o=[];let c=-1;for(;++c<n.footnoteOrder.length;){const h=n.footnoteById.get(n.footnoteOrder[c]);if(!h)continue;const p=n.all(h),u=String(h.identifier).toUpperCase(),b=zs(u.toLowerCase());let C=0;const T=[],E=n.footnoteCounts.get(u);for(;E!==void 0&&++C<=E;){T.length>0&&T.push({type:"text",value:" "});let _=typeof s=="string"?s:s(c,C);typeof _=="string"&&(_={type:"text",value:_}),T.push({type:"element",tagName:"a",properties:{href:"#"+r+"fnref-"+b+(C>1?"-"+C:""),dataFootnoteBackref:"",ariaLabel:typeof l=="string"?l:l(c,C),className:["data-footnote-backref"]},children:Array.isArray(_)?_:[_]})}const S=p[p.length-1];if(S&&S.type==="element"&&S.tagName==="p"){const _=S.children[S.children.length-1];_&&_.type==="text"?_.value+=" ":S.children.push({type:"text",value:" "}),S.children.push(...T)}else p.push(...T);const v={type:"element",tagName:"li",properties:{id:r+"fn-"+b},children:n.wrap(p,!0)};n.patch(h,v),o.push(v)}if(o.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:m,properties:{...Ao(f),id:"footnote-label"},children:[{type:"text",value:d}]},{type:"text",value:`
|
|
70
70
|
`},{type:"element",tagName:"ol",properties:{},children:n.wrap(o,!0)},{type:"text",value:`
|
|
71
|
-
`}]}}const Ho=(function(n){if(n==null)return
|
|
71
|
+
`}]}}const Ho=(function(n){if(n==null)return iw;if(typeof n=="function")return zo(n);if(typeof n=="object")return Array.isArray(n)?ew(n):tw(n);if(typeof n=="string")return nw(n);throw new Error("Expected function, string, or object as test")});function ew(n){const r=[];let s=-1;for(;++s<n.length;)r[s]=Ho(n[s]);return zo(l);function l(...d){let m=-1;for(;++m<r.length;)if(r[m].apply(this,d))return!0;return!1}}function tw(n){const r=n;return zo(s);function s(l){const d=l;let m;for(m in n)if(d[m]!==r[m])return!1;return!0}}function nw(n){return zo(r);function r(s){return s&&s.type===n}}function zo(n){return r;function r(s,l,d){return!!(rw(s)&&n.call(this,s,typeof l=="number"?l:void 0,d||void 0))}}function iw(){return!0}function rw(n){return n!==null&&typeof n=="object"&&"type"in n}const z_=[],sw=!0,Ch=!1,aw="skip";function I_(n,r,s,l){let d;typeof r=="function"&&typeof s!="function"?(l=s,s=r):d=r;const m=Ho(d),f=l?-1:1;o(n,void 0,[])();function o(c,h,p){const u=c&&typeof c=="object"?c:{};if(typeof u.type=="string"){const C=typeof u.tagName=="string"?u.tagName:typeof u.name=="string"?u.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(c.type+(C?"<"+C+">":""))+")"})}return b;function b(){let C=z_,T,E,S;if((!r||m(c,h,p[p.length-1]||void 0))&&(C=lw(s(c,p)),C[0]===Ch))return C;if("children"in c&&c.children){const v=c;if(v.children&&C[0]!==aw)for(E=(l?v.children.length:-1)+f,S=p.concat(v);E>-1&&E<v.children.length;){const _=v.children[E];if(T=o(_,E,S)(),T[0]===Ch)return T;E=typeof T[1]=="number"?T[1]:E+f}}return C}}}function lw(n){return Array.isArray(n)?n:typeof n=="number"?[sw,n]:n==null?z_:[n]}function Gh(n,r,s,l){let d,m,f;typeof r=="function"&&typeof s!="function"?(m=void 0,f=r,d=s):(m=r,f=s,d=l),I_(n,m,o,d);function o(c,h){const p=h[h.length-1],u=p?p.children.indexOf(c):void 0;return f(c,u,p)}}const wh={}.hasOwnProperty,ow={};function cw(n,r){const s=r||ow,l=new Map,d=new Map,m=new Map,f={...GC,...s.handlers},o={all:h,applyData:hw,definitionById:l,footnoteById:d,footnoteCounts:m,footnoteOrder:[],handlers:f,one:c,options:s,patch:uw,wrap:dw};return Gh(n,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const u=p.type==="definition"?l:d,b=String(p.identifier).toUpperCase();u.has(b)||u.set(b,p)}}),o;function c(p,u){const b=p.type,C=o.handlers[b];if(wh.call(o.handlers,b)&&C)return C(o,p,u);if(o.options.passThrough&&o.options.passThrough.includes(b)){if("children"in p){const{children:E,...S}=p,v=Ao(S);return v.children=o.all(p),v}return Ao(p)}return(o.options.unknownHandler||fw)(o,p,u)}function h(p){const u=[];if("children"in p){const b=p.children;let C=-1;for(;++C<b.length;){const T=o.one(b[C],p);if(T){if(C&&b[C-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=bg(T.value)),!Array.isArray(T)&&T.type==="element")){const E=T.children[0];E&&E.type==="text"&&(E.value=bg(E.value))}Array.isArray(T)?u.push(...T):u.push(T)}}}return u}}function uw(n,r){n.position&&(r.position=Q1(n))}function hw(n,r){let s=r;if(n&&n.data){const l=n.data.hName,d=n.data.hChildren,m=n.data.hProperties;if(typeof l=="string")if(s.type==="element")s.tagName=l;else{const f="children"in s?s.children:[s];s={type:"element",tagName:l,properties:{},children:f}}s.type==="element"&&m&&Object.assign(s.properties,Ao(m)),"children"in s&&s.children&&d!==null&&d!==void 0&&(s.children=d)}return s}function fw(n,r){const s=r.data||{},l="value"in r&&!(wh.call(s,"hProperties")||wh.call(s,"hChildren"))?{type:"text",value:r.value}:{type:"element",tagName:"div",properties:{},children:n.all(r)};return n.patch(r,l),n.applyData(r,l)}function dw(n,r){const s=[];let l=-1;for(r&&s.push({type:"text",value:`
|
|
72
72
|
`});++l<n.length;)l&&s.push({type:"text",value:`
|
|
73
73
|
`}),s.push(n[l]);return r&&n.length>0&&s.push({type:"text",value:`
|
|
74
|
-
`}),s}function bg(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Cg(n,r){const s=
|
|
75
|
-
`},d),m}function mw(n,r){return n&&"run"in n?async function(s,l){const d=Cg(s,{file:l,...r});await n.run(d,l)}:function(s,l){return Cg(s,{file:l,...n||r})}}function wg(n){if(n)throw n}var Qu,xg;function gw(){if(xg)return Qu;xg=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},m=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var p=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},f=function(h,p){s&&p.name==="__proto__"?s(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},o=function(h,p){if(p==="__proto__")if(n.call(h,p)){if(l)return l(h,p).value}else return;return h[p]};return Qu=function c(){var h,p,u,b,C,T,E=arguments[0],S=1,v=arguments.length,_=!1;for(typeof E=="boolean"&&(_=E,E=arguments[1]||{},S=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});S<v;++S)if(h=arguments[S],h!=null)for(p in h)u=o(E,p),b=o(h,p),E!==b&&(_&&b&&(m(b)||(C=d(b)))?(C?(C=!1,T=u&&d(u)?u:[]):T=u&&m(u)?u:{},f(E,{name:p,newValue:c(_,T,b)})):typeof b<"u"&&f(E,{name:p,newValue:b}));return E},Qu}var _w=gw();const Ju=Yg(_w);function xh(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function vw(){const n=[],r={run:s,use:l};return r;function s(...d){let m=-1;const f=d.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);o(null,...d);function o(c,...h){const p=n[++m];let u=-1;if(c){f(c);return}for(;++u<d.length;)(h[u]===null||h[u]===void 0)&&(h[u]=d[u]);d=h,p?yw(p,o)(...h):f(null,...h)}}function l(d){if(typeof d!="function")throw new TypeError("Expected `middelware` to be a function, not "+d);return n.push(d),r}}function yw(n,r){let s;return l;function l(...f){const o=n.length>f.length;let c;o&&f.push(d);try{c=n.apply(this,f)}catch(h){const p=h;if(o&&s)throw p;return d(p)}o||(c&&c.then&&typeof c.then=="function"?c.then(m,d):c instanceof Error?d(c):m(c))}function d(f,...o){s||(s=!0,r(f,...o))}function m(f){d(null,f)}}const ui={basename:Sw,dirname:bw,extname:Cw,join:ww,sep:"/"};function Sw(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Za(n);let s=0,l=-1,d=n.length,m;if(r===void 0||r.length===0||r.length>n.length){for(;d--;)if(n.codePointAt(d)===47){if(m){s=d+1;break}}else l<0&&(m=!0,l=d+1);return l<0?"":n.slice(s,l)}if(r===n)return"";let f=-1,o=r.length-1;for(;d--;)if(n.codePointAt(d)===47){if(m){s=d+1;break}}else f<0&&(m=!0,f=d+1),o>-1&&(n.codePointAt(d)===r.codePointAt(o--)?o<0&&(l=d):(o=-1,l=f));return s===l?l=f:l<0&&(l=n.length),n.slice(s,l)}function bw(n){if(Za(n),n.length===0)return".";let r=-1,s=n.length,l;for(;--s;)if(n.codePointAt(s)===47){if(l){r=s;break}}else l||(l=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function Cw(n){Za(n);let r=n.length,s=-1,l=0,d=-1,m=0,f;for(;r--;){const o=n.codePointAt(r);if(o===47){if(f){l=r+1;break}continue}s<0&&(f=!0,s=r+1),o===46?d<0?d=r:m!==1&&(m=1):d>-1&&(m=-1)}return d<0||s<0||m===0||m===1&&d===s-1&&d===l+1?"":n.slice(d,s)}function ww(...n){let r=-1,s;for(;++r<n.length;)Za(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":xw(s)}function xw(n){Za(n);const r=n.codePointAt(0)===47;let s=Ew(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function Ew(n,r){let s="",l=0,d=-1,m=0,f=-1,o,c;for(;++f<=n.length;){if(f<n.length)o=n.codePointAt(f);else{if(o===47)break;o=47}if(o===47){if(!(d===f-1||m===1))if(d!==f-1&&m===2){if(s.length<2||l!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",l=0):(s=s.slice(0,c),l=s.length-1-s.lastIndexOf("/")),d=f,m=0;continue}}else if(s.length>0){s="",l=0,d=f,m=0;continue}}r&&(s=s.length>0?s+"/..":"..",l=2)}else s.length>0?s+="/"+n.slice(d+1,f):s=n.slice(d+1,f),l=f-d-1;d=f,m=0}else o===46&&m>-1?m++:m=-1}return s}function Za(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const kw={cwd:Aw};function Aw(){return"/"}function Eh(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Tw(n){if(typeof n=="string")n=new URL(n);else if(!Eh(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return Rw(n)}function Rw(n){if(n.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const l=r.codePointAt(s+2);if(l===70||l===102){const d=new TypeError("File URL path must not include encoded / characters");throw d.code="ERR_INVALID_FILE_URL_PATH",d}}return decodeURIComponent(r)}const Zu=["history","path","basename","stem","extname","dirname"];class U_{constructor(r){let s;r?Eh(r)?s={path:r}:typeof r=="string"||Dw(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":kw.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Zu.length;){const m=Zu[l];m in s&&s[m]!==void 0&&s[m]!==null&&(this[m]=m==="history"?[...s[m]]:s[m])}let d;for(d in s)Zu.includes(d)||(this[d]=s[d])}get basename(){return typeof this.path=="string"?ui.basename(this.path):void 0}set basename(r){th(r,"basename"),eh(r,"basename"),this.path=ui.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?ui.dirname(this.path):void 0}set dirname(r){Eg(this.basename,"dirname"),this.path=ui.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?ui.extname(this.path):void 0}set extname(r){if(eh(r,"extname"),Eg(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ui.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Eh(r)&&(r=Tw(r)),th(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?ui.basename(this.path,this.extname):void 0}set stem(r){th(r,"stem"),eh(r,"stem"),this.path=ui.join(this.dirname||"",r+(this.extname||""))}fail(r,s,l){const d=this.message(r,s,l);throw d.fatal=!0,d}info(r,s,l){const d=this.message(r,s,l);return d.fatal=void 0,d}message(r,s,l){const d=new Zt(r,s,l);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function eh(n,r){if(n&&n.includes(ui.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+ui.sep+"`")}function th(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Eg(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function Dw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Mw=(function(n){const l=this.constructor.prototype,d=l[n],m=function(){return d.apply(m,arguments)};return Object.setPrototypeOf(m,l),m}),Lw={}.hasOwnProperty;class Vh extends Mw{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=vw()}copy(){const r=new Vh;let s=-1;for(;++s<this.attachers.length;){const l=this.attachers[s];r.use(...l)}return r.data(Ju(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(rh("data",this.frozen),this.namespace[r]=s,this):Lw.call(this.namespace,r)&&this.namespace[r]||void 0:r?(rh("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const d=s.call(r,...l);typeof d=="function"&&this.transformers.use(d)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=vo(r),l=this.parser||this.Parser;return nh("parse",l),l(String(s),s)}process(r,s){const l=this;return this.freeze(),nh("process",this.parser||this.Parser),ih("process",this.compiler||this.Compiler),s?d(void 0,s):new Promise(d);function d(m,f){const o=vo(r),c=l.parse(o);l.run(c,o,function(p,u,b){if(p||!u||!b)return h(p);const C=u,T=l.stringify(C,b);jw(T)?b.value=T:b.result=T,h(p,b)});function h(p,u){p||!u?f(p):m?m(u):s(void 0,u)}}}processSync(r){let s=!1,l;return this.freeze(),nh("processSync",this.parser||this.Parser),ih("processSync",this.compiler||this.Compiler),this.process(r,d),Ag("processSync","process",s),l;function d(m,f){s=!0,wg(m),l=f}}run(r,s,l){kg(r),this.freeze();const d=this.transformers;return!l&&typeof s=="function"&&(l=s,s=void 0),l?m(void 0,l):new Promise(m);function m(f,o){const c=vo(s);d.run(r,c,h);function h(p,u,b){const C=u||r;p?o(p):f?f(C):l(void 0,C,b)}}}runSync(r,s){let l=!1,d;return this.run(r,s,m),Ag("runSync","run",l),d;function m(f,o){wg(f),d=o,l=!0}}stringify(r,s){this.freeze();const l=vo(s),d=this.compiler||this.Compiler;return ih("stringify",d),kg(r),d(r,l)}use(r,...s){const l=this.attachers,d=this.namespace;if(rh("use",this.frozen),r!=null)if(typeof r=="function")c(r,s);else if(typeof r=="object")Array.isArray(r)?o(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function m(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...u]=h;c(p,u)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(h.plugins),h.settings&&(d.settings=Ju(!0,d.settings,h.settings))}function o(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const u=h[p];m(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,p){let u=-1,b=-1;for(;++u<l.length;)if(l[u][0]===h){b=u;break}if(b===-1)l.push([h,...p]);else if(p.length>0){let[C,...T]=p;const E=l[b][1];xh(E)&&xh(C)&&(C=Ju(!0,E,C)),l[b]=[h,C,...T]}}}}const Ow=new Vh().freeze();function nh(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function ih(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function rh(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kg(n){if(!xh(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Ag(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function vo(n){return Bw(n)?n:new U_(n)}function Bw(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function jw(n){return typeof n=="string"||Nw(n)}function Nw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Hw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tg=[],Rg={allowDangerousHtml:!0},zw=/^(https?|ircs?|mailto|xmpp)$/i,Iw=[{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 P_(n){const r=Uw(n),s=Pw(n);return Fw(r.runSync(r.parse(s),s),n)}function Uw(n){const r=n.rehypePlugins||Tg,s=n.remarkPlugins||Tg,l=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Rg}:Rg;return Ow().use(SC).use(s).use(mw,l).use(r)}function Pw(n){const r=n.children||"",s=new U_;return typeof r=="string"&&(s.value=r),s}function Fw(n,r){const s=r.allowedElements,l=r.allowElement,d=r.components,m=r.disallowedElements,f=r.skipHtml,o=r.unwrapDisallowed,c=r.urlTransform||qw;for(const p of Iw)Object.hasOwn(r,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Hw+p.id,void 0);return Gh(n,h),iS(n,{Fragment:x.Fragment,components:d,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,u,b){if(p.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:p.value},u;if(p.type==="element"){let C;for(C in Ku)if(Object.hasOwn(Ku,C)&&Object.hasOwn(p.properties,C)){const T=p.properties[C],E=Ku[C];(E===null||E.includes(p.tagName))&&(p.properties[C]=c(String(T||""),C,p))}}if(p.type==="element"){let C=s?!s.includes(p.tagName):m?m.includes(p.tagName):!1;if(!C&&l&&typeof u=="number"&&(C=!l(p,u,b)),C&&b&&typeof u=="number")return o&&p.children?b.children.splice(u,1,...p.children):b.children.splice(u,1),u}}}function qw(n){const r=n.indexOf(":"),s=n.indexOf("?"),l=n.indexOf("#"),d=n.indexOf("/");return r===-1||d!==-1&&r>d||s!==-1&&r>s||l!==-1&&r>l||zw.test(n.slice(0,r))?n:""}function Dg(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let l=0,d=s.indexOf(r);for(;d!==-1;)l++,d=s.indexOf(r,d+r.length);return l}function $w(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function Gw(n,r,s){const d=Ho((s||{}).ignore||[]),m=Vw(r);let f=-1;for(;++f<m.length;)I_(n,"text",o);function o(h,p){let u=-1,b;for(;++u<p.length;){const C=p[u],T=b?b.children:void 0;if(d(C,T?T.indexOf(C):void 0,b))return;b=C}if(b)return c(h,p)}function c(h,p){const u=p[p.length-1],b=m[f][0],C=m[f][1];let T=0;const S=u.children.indexOf(h);let v=!1,_=[];b.lastIndex=0;let y=b.exec(h.value);for(;y;){const A=y.index,L={index:y.index,input:y.input,stack:[...p,h]};let D=C(...y,L);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=A+1:(T!==A&&_.push({type:"text",value:h.value.slice(T,A)}),Array.isArray(D)?_.push(...D):D&&_.push(D),T=A+y[0].length,v=!0),!b.global)break;y=b.exec(h.value)}return v?(T<h.value.length&&_.push({type:"text",value:h.value.slice(T)}),u.children.splice(S,1,..._)):_=[h],S+_.length}}function Vw(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let l=-1;for(;++l<s.length;){const d=s[l];r.push([Ww(d[0]),Kw(d[1])])}return r}function Ww(n){return typeof n=="string"?new RegExp($w(n),"g"):n}function Kw(n){return typeof n=="function"?n:function(){return n}}const sh="phrasing",ah=["autolink","link","image","label"];function Yw(){return{transforms:[nx],enter:{literalAutolink:Qw,literalAutolinkEmail:lh,literalAutolinkHttp:lh,literalAutolinkWww:lh},exit:{literalAutolink:tx,literalAutolinkEmail:ex,literalAutolinkHttp:Jw,literalAutolinkWww:Zw}}}function Xw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sh,notInConstruct:ah},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sh,notInConstruct:ah},{character:":",before:"[ps]",after:"\\/",inConstruct:sh,notInConstruct:ah}]}}function Qw(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function lh(n){this.config.enter.autolinkProtocol.call(this,n)}function Jw(n){this.config.exit.autolinkProtocol.call(this,n)}function Zw(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function ex(n){this.config.exit.autolinkEmail.call(this,n)}function tx(n){this.exit(n)}function nx(n){Gw(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,ix],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),rx]],{ignore:["link","linkReference"]})}function ix(n,r,s,l,d){let m="";if(!F_(d)||(/^w/i.test(r)&&(s=r+s,r="",m="http://"),!sx(s)))return!1;const f=ax(s+l);if(!f[0])return!1;const o={type:"link",title:null,url:m+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[o,{type:"text",value:f[1]}]:o}function rx(n,r,s,l){return!F_(l,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function sx(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function ax(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],l=s.indexOf(")");const d=Dg(n,"(");let m=Dg(n,")");for(;l!==-1&&d>m;)n+=s.slice(0,l+1),s=s.slice(l+1),l=s.indexOf(")"),m++;return[n,s]}function F_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||zr(s)||Bo(s))&&(!r||s!==47)}q_.peek=mx;function lx(){this.buffer()}function ox(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function cx(){this.buffer()}function ux(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function hx(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=ni(this.sliceSerialize(n)).toLowerCase(),s.label=r}function fx(n){this.exit(n)}function dx(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=ni(this.sliceSerialize(n)).toLowerCase(),s.label=r}function px(n){this.exit(n)}function mx(){return"["}function q_(n,r,s,l){const d=s.createTracker(l);let m=d.move("[^");const f=s.enter("footnoteReference"),o=s.enter("reference");return m+=d.move(s.safe(s.associationId(n),{after:"]",before:m})),o(),f(),m+=d.move("]"),m}function gx(){return{enter:{gfmFootnoteCallString:lx,gfmFootnoteCall:ox,gfmFootnoteDefinitionLabelString:cx,gfmFootnoteDefinition:ux},exit:{gfmFootnoteCallString:hx,gfmFootnoteCall:fx,gfmFootnoteDefinitionLabelString:dx,gfmFootnoteDefinition:px}}}function _x(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:q_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(l,d,m,f){const o=m.createTracker(f);let c=o.move("[^");const h=m.enter("footnoteDefinition"),p=m.enter("label");return c+=o.move(m.safe(m.associationId(l),{before:c,after:"]"})),p(),c+=o.move("]:"),l.children&&l.children.length>0&&(o.shift(4),c+=o.move((r?`
|
|
76
|
-
`:" ")+m.indentLines(m.containerFlow(l,o.current()),r?$_:
|
|
77
|
-
`)}function
|
|
78
|
-
`&&
|
|
79
|
-
`}function
|
|
74
|
+
`}),s}function bg(n){let r=0,s=n.charCodeAt(r);for(;s===9||s===32;)r++,s=n.charCodeAt(r);return n.slice(r)}function Cg(n,r){const s=cw(n,r),l=s.one(n,void 0),d=ZC(s),m=Array.isArray(l)?{type:"root",children:l}:l||{type:"root",children:[]};return d&&m.children.push({type:"text",value:`
|
|
75
|
+
`},d),m}function pw(n,r){return n&&"run"in n?async function(s,l){const d=Cg(s,{file:l,...r});await n.run(d,l)}:function(s,l){return Cg(s,{file:l,...n||r})}}function wg(n){if(n)throw n}var Qu,xg;function mw(){if(xg)return Qu;xg=1;var n=Object.prototype.hasOwnProperty,r=Object.prototype.toString,s=Object.defineProperty,l=Object.getOwnPropertyDescriptor,d=function(h){return typeof Array.isArray=="function"?Array.isArray(h):r.call(h)==="[object Array]"},m=function(h){if(!h||r.call(h)!=="[object Object]")return!1;var p=n.call(h,"constructor"),u=h.constructor&&h.constructor.prototype&&n.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!p&&!u)return!1;var b;for(b in h);return typeof b>"u"||n.call(h,b)},f=function(h,p){s&&p.name==="__proto__"?s(h,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):h[p.name]=p.newValue},o=function(h,p){if(p==="__proto__")if(n.call(h,p)){if(l)return l(h,p).value}else return;return h[p]};return Qu=function c(){var h,p,u,b,C,T,E=arguments[0],S=1,v=arguments.length,_=!1;for(typeof E=="boolean"&&(_=E,E=arguments[1]||{},S=2),(E==null||typeof E!="object"&&typeof E!="function")&&(E={});S<v;++S)if(h=arguments[S],h!=null)for(p in h)u=o(E,p),b=o(h,p),E!==b&&(_&&b&&(m(b)||(C=d(b)))?(C?(C=!1,T=u&&d(u)?u:[]):T=u&&m(u)?u:{},f(E,{name:p,newValue:c(_,T,b)})):typeof b<"u"&&f(E,{name:p,newValue:b}));return E},Qu}var gw=mw();const Ju=Yg(gw);function xh(n){if(typeof n!="object"||n===null)return!1;const r=Object.getPrototypeOf(n);return(r===null||r===Object.prototype||Object.getPrototypeOf(r)===null)&&!(Symbol.toStringTag in n)&&!(Symbol.iterator in n)}function _w(){const n=[],r={run:s,use:l};return r;function s(...d){let m=-1;const f=d.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);o(null,...d);function o(c,...h){const p=n[++m];let u=-1;if(c){f(c);return}for(;++u<d.length;)(h[u]===null||h[u]===void 0)&&(h[u]=d[u]);d=h,p?vw(p,o)(...h):f(null,...h)}}function l(d){if(typeof d!="function")throw new TypeError("Expected `middelware` to be a function, not "+d);return n.push(d),r}}function vw(n,r){let s;return l;function l(...f){const o=n.length>f.length;let c;o&&f.push(d);try{c=n.apply(this,f)}catch(h){const p=h;if(o&&s)throw p;return d(p)}o||(c&&c.then&&typeof c.then=="function"?c.then(m,d):c instanceof Error?d(c):m(c))}function d(f,...o){s||(s=!0,r(f,...o))}function m(f){d(null,f)}}const ui={basename:yw,dirname:Sw,extname:bw,join:Cw,sep:"/"};function yw(n,r){if(r!==void 0&&typeof r!="string")throw new TypeError('"ext" argument must be a string');Za(n);let s=0,l=-1,d=n.length,m;if(r===void 0||r.length===0||r.length>n.length){for(;d--;)if(n.codePointAt(d)===47){if(m){s=d+1;break}}else l<0&&(m=!0,l=d+1);return l<0?"":n.slice(s,l)}if(r===n)return"";let f=-1,o=r.length-1;for(;d--;)if(n.codePointAt(d)===47){if(m){s=d+1;break}}else f<0&&(m=!0,f=d+1),o>-1&&(n.codePointAt(d)===r.codePointAt(o--)?o<0&&(l=d):(o=-1,l=f));return s===l?l=f:l<0&&(l=n.length),n.slice(s,l)}function Sw(n){if(Za(n),n.length===0)return".";let r=-1,s=n.length,l;for(;--s;)if(n.codePointAt(s)===47){if(l){r=s;break}}else l||(l=!0);return r<0?n.codePointAt(0)===47?"/":".":r===1&&n.codePointAt(0)===47?"//":n.slice(0,r)}function bw(n){Za(n);let r=n.length,s=-1,l=0,d=-1,m=0,f;for(;r--;){const o=n.codePointAt(r);if(o===47){if(f){l=r+1;break}continue}s<0&&(f=!0,s=r+1),o===46?d<0?d=r:m!==1&&(m=1):d>-1&&(m=-1)}return d<0||s<0||m===0||m===1&&d===s-1&&d===l+1?"":n.slice(d,s)}function Cw(...n){let r=-1,s;for(;++r<n.length;)Za(n[r]),n[r]&&(s=s===void 0?n[r]:s+"/"+n[r]);return s===void 0?".":ww(s)}function ww(n){Za(n);const r=n.codePointAt(0)===47;let s=xw(n,!r);return s.length===0&&!r&&(s="."),s.length>0&&n.codePointAt(n.length-1)===47&&(s+="/"),r?"/"+s:s}function xw(n,r){let s="",l=0,d=-1,m=0,f=-1,o,c;for(;++f<=n.length;){if(f<n.length)o=n.codePointAt(f);else{if(o===47)break;o=47}if(o===47){if(!(d===f-1||m===1))if(d!==f-1&&m===2){if(s.length<2||l!==2||s.codePointAt(s.length-1)!==46||s.codePointAt(s.length-2)!==46){if(s.length>2){if(c=s.lastIndexOf("/"),c!==s.length-1){c<0?(s="",l=0):(s=s.slice(0,c),l=s.length-1-s.lastIndexOf("/")),d=f,m=0;continue}}else if(s.length>0){s="",l=0,d=f,m=0;continue}}r&&(s=s.length>0?s+"/..":"..",l=2)}else s.length>0?s+="/"+n.slice(d+1,f):s=n.slice(d+1,f),l=f-d-1;d=f,m=0}else o===46&&m>-1?m++:m=-1}return s}function Za(n){if(typeof n!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(n))}const Ew={cwd:kw};function kw(){return"/"}function Eh(n){return!!(n!==null&&typeof n=="object"&&"href"in n&&n.href&&"protocol"in n&&n.protocol&&n.auth===void 0)}function Aw(n){if(typeof n=="string")n=new URL(n);else if(!Eh(n)){const r=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+n+"`");throw r.code="ERR_INVALID_ARG_TYPE",r}if(n.protocol!=="file:"){const r=new TypeError("The URL must be of scheme file");throw r.code="ERR_INVALID_URL_SCHEME",r}return Tw(n)}function Tw(n){if(n.hostname!==""){const l=new TypeError('File URL host must be "localhost" or empty on darwin');throw l.code="ERR_INVALID_FILE_URL_HOST",l}const r=n.pathname;let s=-1;for(;++s<r.length;)if(r.codePointAt(s)===37&&r.codePointAt(s+1)===50){const l=r.codePointAt(s+2);if(l===70||l===102){const d=new TypeError("File URL path must not include encoded / characters");throw d.code="ERR_INVALID_FILE_URL_PATH",d}}return decodeURIComponent(r)}const Zu=["history","path","basename","stem","extname","dirname"];class U_{constructor(r){let s;r?Eh(r)?s={path:r}:typeof r=="string"||Rw(r)?s={value:r}:s=r:s={},this.cwd="cwd"in s?"":Ew.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let l=-1;for(;++l<Zu.length;){const m=Zu[l];m in s&&s[m]!==void 0&&s[m]!==null&&(this[m]=m==="history"?[...s[m]]:s[m])}let d;for(d in s)Zu.includes(d)||(this[d]=s[d])}get basename(){return typeof this.path=="string"?ui.basename(this.path):void 0}set basename(r){th(r,"basename"),eh(r,"basename"),this.path=ui.join(this.dirname||"",r)}get dirname(){return typeof this.path=="string"?ui.dirname(this.path):void 0}set dirname(r){Eg(this.basename,"dirname"),this.path=ui.join(r||"",this.basename)}get extname(){return typeof this.path=="string"?ui.extname(this.path):void 0}set extname(r){if(eh(r,"extname"),Eg(this.dirname,"extname"),r){if(r.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(r.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=ui.join(this.dirname,this.stem+(r||""))}get path(){return this.history[this.history.length-1]}set path(r){Eh(r)&&(r=Aw(r)),th(r,"path"),this.path!==r&&this.history.push(r)}get stem(){return typeof this.path=="string"?ui.basename(this.path,this.extname):void 0}set stem(r){th(r,"stem"),eh(r,"stem"),this.path=ui.join(this.dirname||"",r+(this.extname||""))}fail(r,s,l){const d=this.message(r,s,l);throw d.fatal=!0,d}info(r,s,l){const d=this.message(r,s,l);return d.fatal=void 0,d}message(r,s,l){const d=new Jt(r,s,l);return this.path&&(d.name=this.path+":"+d.name,d.file=this.path),d.fatal=!1,this.messages.push(d),d}toString(r){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(r||void 0).decode(this.value)}}function eh(n,r){if(n&&n.includes(ui.sep))throw new Error("`"+r+"` cannot be a path: did not expect `"+ui.sep+"`")}function th(n,r){if(!n)throw new Error("`"+r+"` cannot be empty")}function Eg(n,r){if(!n)throw new Error("Setting `"+r+"` requires `path` to be set too")}function Rw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Dw=(function(n){const l=this.constructor.prototype,d=l[n],m=function(){return d.apply(m,arguments)};return Object.setPrototypeOf(m,l),m}),Mw={}.hasOwnProperty;class Vh extends Dw{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=_w()}copy(){const r=new Vh;let s=-1;for(;++s<this.attachers.length;){const l=this.attachers[s];r.use(...l)}return r.data(Ju(!0,{},this.namespace)),r}data(r,s){return typeof r=="string"?arguments.length===2?(rh("data",this.frozen),this.namespace[r]=s,this):Mw.call(this.namespace,r)&&this.namespace[r]||void 0:r?(rh("data",this.frozen),this.namespace=r,this):this.namespace}freeze(){if(this.frozen)return this;const r=this;for(;++this.freezeIndex<this.attachers.length;){const[s,...l]=this.attachers[this.freezeIndex];if(l[0]===!1)continue;l[0]===!0&&(l[0]=void 0);const d=s.call(r,...l);typeof d=="function"&&this.transformers.use(d)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(r){this.freeze();const s=vo(r),l=this.parser||this.Parser;return nh("parse",l),l(String(s),s)}process(r,s){const l=this;return this.freeze(),nh("process",this.parser||this.Parser),ih("process",this.compiler||this.Compiler),s?d(void 0,s):new Promise(d);function d(m,f){const o=vo(r),c=l.parse(o);l.run(c,o,function(p,u,b){if(p||!u||!b)return h(p);const C=u,T=l.stringify(C,b);Bw(T)?b.value=T:b.result=T,h(p,b)});function h(p,u){p||!u?f(p):m?m(u):s(void 0,u)}}}processSync(r){let s=!1,l;return this.freeze(),nh("processSync",this.parser||this.Parser),ih("processSync",this.compiler||this.Compiler),this.process(r,d),Ag("processSync","process",s),l;function d(m,f){s=!0,wg(m),l=f}}run(r,s,l){kg(r),this.freeze();const d=this.transformers;return!l&&typeof s=="function"&&(l=s,s=void 0),l?m(void 0,l):new Promise(m);function m(f,o){const c=vo(s);d.run(r,c,h);function h(p,u,b){const C=u||r;p?o(p):f?f(C):l(void 0,C,b)}}}runSync(r,s){let l=!1,d;return this.run(r,s,m),Ag("runSync","run",l),d;function m(f,o){wg(f),d=o,l=!0}}stringify(r,s){this.freeze();const l=vo(s),d=this.compiler||this.Compiler;return ih("stringify",d),kg(r),d(r,l)}use(r,...s){const l=this.attachers,d=this.namespace;if(rh("use",this.frozen),r!=null)if(typeof r=="function")c(r,s);else if(typeof r=="object")Array.isArray(r)?o(r):f(r);else throw new TypeError("Expected usable value, not `"+r+"`");return this;function m(h){if(typeof h=="function")c(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[p,...u]=h;c(p,u)}else f(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function f(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");o(h.plugins),h.settings&&(d.settings=Ju(!0,d.settings,h.settings))}function o(h){let p=-1;if(h!=null)if(Array.isArray(h))for(;++p<h.length;){const u=h[p];m(u)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function c(h,p){let u=-1,b=-1;for(;++u<l.length;)if(l[u][0]===h){b=u;break}if(b===-1)l.push([h,...p]);else if(p.length>0){let[C,...T]=p;const E=l[b][1];xh(E)&&xh(C)&&(C=Ju(!0,E,C)),l[b]=[h,C,...T]}}}}const Lw=new Vh().freeze();function nh(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `parser`")}function ih(n,r){if(typeof r!="function")throw new TypeError("Cannot `"+n+"` without `compiler`")}function rh(n,r){if(r)throw new Error("Cannot call `"+n+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function kg(n){if(!xh(n)||typeof n.type!="string")throw new TypeError("Expected node, got `"+n+"`")}function Ag(n,r,s){if(!s)throw new Error("`"+n+"` finished async. Use `"+r+"` instead")}function vo(n){return Ow(n)?n:new U_(n)}function Ow(n){return!!(n&&typeof n=="object"&&"message"in n&&"messages"in n)}function Bw(n){return typeof n=="string"||jw(n)}function jw(n){return!!(n&&typeof n=="object"&&"byteLength"in n&&"byteOffset"in n)}const Nw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Tg=[],Rg={allowDangerousHtml:!0},Hw=/^(https?|ircs?|mailto|xmpp)$/i,zw=[{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 P_(n){const r=Iw(n),s=Uw(n);return Pw(r.runSync(r.parse(s),s),n)}function Iw(n){const r=n.rehypePlugins||Tg,s=n.remarkPlugins||Tg,l=n.remarkRehypeOptions?{...n.remarkRehypeOptions,...Rg}:Rg;return Lw().use(yC).use(s).use(pw,l).use(r)}function Uw(n){const r=n.children||"",s=new U_;return typeof r=="string"&&(s.value=r),s}function Pw(n,r){const s=r.allowedElements,l=r.allowElement,d=r.components,m=r.disallowedElements,f=r.skipHtml,o=r.unwrapDisallowed,c=r.urlTransform||Fw;for(const p of zw)Object.hasOwn(r,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+Nw+p.id,void 0);return Gh(n,h),nS(n,{Fragment:x.Fragment,components:d,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.jsxs,passKeys:!0,passNode:!0});function h(p,u,b){if(p.type==="raw"&&b&&typeof u=="number")return f?b.children.splice(u,1):b.children[u]={type:"text",value:p.value},u;if(p.type==="element"){let C;for(C in Ku)if(Object.hasOwn(Ku,C)&&Object.hasOwn(p.properties,C)){const T=p.properties[C],E=Ku[C];(E===null||E.includes(p.tagName))&&(p.properties[C]=c(String(T||""),C,p))}}if(p.type==="element"){let C=s?!s.includes(p.tagName):m?m.includes(p.tagName):!1;if(!C&&l&&typeof u=="number"&&(C=!l(p,u,b)),C&&b&&typeof u=="number")return o&&p.children?b.children.splice(u,1,...p.children):b.children.splice(u,1),u}}}function Fw(n){const r=n.indexOf(":"),s=n.indexOf("?"),l=n.indexOf("#"),d=n.indexOf("/");return r===-1||d!==-1&&r>d||s!==-1&&r>s||l!==-1&&r>l||Hw.test(n.slice(0,r))?n:""}function Dg(n,r){const s=String(n);if(typeof r!="string")throw new TypeError("Expected character");let l=0,d=s.indexOf(r);for(;d!==-1;)l++,d=s.indexOf(r,d+r.length);return l}function qw(n){if(typeof n!="string")throw new TypeError("Expected a string");return n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function $w(n,r,s){const d=Ho((s||{}).ignore||[]),m=Gw(r);let f=-1;for(;++f<m.length;)I_(n,"text",o);function o(h,p){let u=-1,b;for(;++u<p.length;){const C=p[u],T=b?b.children:void 0;if(d(C,T?T.indexOf(C):void 0,b))return;b=C}if(b)return c(h,p)}function c(h,p){const u=p[p.length-1],b=m[f][0],C=m[f][1];let T=0;const S=u.children.indexOf(h);let v=!1,_=[];b.lastIndex=0;let y=b.exec(h.value);for(;y;){const A=y.index,L={index:y.index,input:y.input,stack:[...p,h]};let D=C(...y,L);if(typeof D=="string"&&(D=D.length>0?{type:"text",value:D}:void 0),D===!1?b.lastIndex=A+1:(T!==A&&_.push({type:"text",value:h.value.slice(T,A)}),Array.isArray(D)?_.push(...D):D&&_.push(D),T=A+y[0].length,v=!0),!b.global)break;y=b.exec(h.value)}return v?(T<h.value.length&&_.push({type:"text",value:h.value.slice(T)}),u.children.splice(S,1,..._)):_=[h],S+_.length}}function Gw(n){const r=[];if(!Array.isArray(n))throw new TypeError("Expected find and replace tuple or list of tuples");const s=!n[0]||Array.isArray(n[0])?n:[n];let l=-1;for(;++l<s.length;){const d=s[l];r.push([Vw(d[0]),Ww(d[1])])}return r}function Vw(n){return typeof n=="string"?new RegExp(qw(n),"g"):n}function Ww(n){return typeof n=="function"?n:function(){return n}}const sh="phrasing",ah=["autolink","link","image","label"];function Kw(){return{transforms:[tx],enter:{literalAutolink:Xw,literalAutolinkEmail:lh,literalAutolinkHttp:lh,literalAutolinkWww:lh},exit:{literalAutolink:ex,literalAutolinkEmail:Zw,literalAutolinkHttp:Qw,literalAutolinkWww:Jw}}}function Yw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:sh,notInConstruct:ah},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:sh,notInConstruct:ah},{character:":",before:"[ps]",after:"\\/",inConstruct:sh,notInConstruct:ah}]}}function Xw(n){this.enter({type:"link",title:null,url:"",children:[]},n)}function lh(n){this.config.enter.autolinkProtocol.call(this,n)}function Qw(n){this.config.exit.autolinkProtocol.call(this,n)}function Jw(n){this.config.exit.data.call(this,n);const r=this.stack[this.stack.length-1];r.type,r.url="http://"+this.sliceSerialize(n)}function Zw(n){this.config.exit.autolinkEmail.call(this,n)}function ex(n){this.exit(n)}function tx(n){$w(n,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,nx],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),ix]],{ignore:["link","linkReference"]})}function nx(n,r,s,l,d){let m="";if(!F_(d)||(/^w/i.test(r)&&(s=r+s,r="",m="http://"),!rx(s)))return!1;const f=sx(s+l);if(!f[0])return!1;const o={type:"link",title:null,url:m+r+f[0],children:[{type:"text",value:r+f[0]}]};return f[1]?[o,{type:"text",value:f[1]}]:o}function ix(n,r,s,l){return!F_(l,!0)||/[-\d_]$/.test(s)?!1:{type:"link",title:null,url:"mailto:"+r+"@"+s,children:[{type:"text",value:r+"@"+s}]}}function rx(n){const r=n.split(".");return!(r.length<2||r[r.length-1]&&(/_/.test(r[r.length-1])||!/[a-zA-Z\d]/.test(r[r.length-1]))||r[r.length-2]&&(/_/.test(r[r.length-2])||!/[a-zA-Z\d]/.test(r[r.length-2])))}function sx(n){const r=/[!"&'),.:;<>?\]}]+$/.exec(n);if(!r)return[n,void 0];n=n.slice(0,r.index);let s=r[0],l=s.indexOf(")");const d=Dg(n,"(");let m=Dg(n,")");for(;l!==-1&&d>m;)n+=s.slice(0,l+1),s=s.slice(l+1),l=s.indexOf(")"),m++;return[n,s]}function F_(n,r){const s=n.input.charCodeAt(n.index-1);return(n.index===0||zr(s)||Bo(s))&&(!r||s!==47)}q_.peek=px;function ax(){this.buffer()}function lx(n){this.enter({type:"footnoteReference",identifier:"",label:""},n)}function ox(){this.buffer()}function cx(n){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},n)}function ux(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=ni(this.sliceSerialize(n)).toLowerCase(),s.label=r}function hx(n){this.exit(n)}function fx(n){const r=this.resume(),s=this.stack[this.stack.length-1];s.type,s.identifier=ni(this.sliceSerialize(n)).toLowerCase(),s.label=r}function dx(n){this.exit(n)}function px(){return"["}function q_(n,r,s,l){const d=s.createTracker(l);let m=d.move("[^");const f=s.enter("footnoteReference"),o=s.enter("reference");return m+=d.move(s.safe(s.associationId(n),{after:"]",before:m})),o(),f(),m+=d.move("]"),m}function mx(){return{enter:{gfmFootnoteCallString:ax,gfmFootnoteCall:lx,gfmFootnoteDefinitionLabelString:ox,gfmFootnoteDefinition:cx},exit:{gfmFootnoteCallString:ux,gfmFootnoteCall:hx,gfmFootnoteDefinitionLabelString:fx,gfmFootnoteDefinition:dx}}}function gx(n){let r=!1;return n&&n.firstLineBlank&&(r=!0),{handlers:{footnoteDefinition:s,footnoteReference:q_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function s(l,d,m,f){const o=m.createTracker(f);let c=o.move("[^");const h=m.enter("footnoteDefinition"),p=m.enter("label");return c+=o.move(m.safe(m.associationId(l),{before:c,after:"]"})),p(),c+=o.move("]:"),l.children&&l.children.length>0&&(o.shift(4),c+=o.move((r?`
|
|
76
|
+
`:" ")+m.indentLines(m.containerFlow(l,o.current()),r?$_:_x))),h(),c}}function _x(n,r,s){return r===0?n:$_(n,r,s)}function $_(n,r,s){return(s?"":" ")+n}const vx=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];G_.peek=wx;function yx(){return{canContainEols:["delete"],enter:{strikethrough:bx},exit:{strikethrough:Cx}}}function Sx(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:vx}],handlers:{delete:G_}}}function bx(n){this.enter({type:"delete",children:[]},n)}function Cx(n){this.exit(n)}function G_(n,r,s,l){const d=s.createTracker(l),m=s.enter("strikethrough");let f=d.move("~~");return f+=s.containerPhrasing(n,{...d.current(),before:f,after:"~"}),f+=d.move("~~"),m(),f}function wx(){return"~"}function xx(n){return n.length}function Ex(n,r){const s=r||{},l=(s.align||[]).concat(),d=s.stringLength||xx,m=[],f=[],o=[],c=[];let h=0,p=-1;for(;++p<n.length;){const E=[],S=[];let v=-1;for(n[p].length>h&&(h=n[p].length);++v<n[p].length;){const _=kx(n[p][v]);if(s.alignDelimiters!==!1){const y=d(_);S[v]=y,(c[v]===void 0||y>c[v])&&(c[v]=y)}E.push(_)}f[p]=E,o[p]=S}let u=-1;if(typeof l=="object"&&"length"in l)for(;++u<h;)m[u]=Mg(l[u]);else{const E=Mg(l);for(;++u<h;)m[u]=E}u=-1;const b=[],C=[];for(;++u<h;){const E=m[u];let S="",v="";E===99?(S=":",v=":"):E===108?S=":":E===114&&(v=":");let _=s.alignDelimiters===!1?1:Math.max(1,c[u]-S.length-v.length);const y=S+"-".repeat(_)+v;s.alignDelimiters!==!1&&(_=S.length+_+v.length,_>c[u]&&(c[u]=_),C[u]=_),b[u]=y}f.splice(1,0,b),o.splice(1,0,C),p=-1;const T=[];for(;++p<f.length;){const E=f[p],S=o[p];u=-1;const v=[];for(;++u<h;){const _=E[u]||"";let y="",A="";if(s.alignDelimiters!==!1){const L=c[u]-(S[u]||0),D=m[u];D===114?y=" ".repeat(L):D===99?L%2?(y=" ".repeat(L/2+.5),A=" ".repeat(L/2-.5)):(y=" ".repeat(L/2),A=y):A=" ".repeat(L)}s.delimiterStart!==!1&&!u&&v.push("|"),s.padding!==!1&&!(s.alignDelimiters===!1&&_==="")&&(s.delimiterStart!==!1||u)&&v.push(" "),s.alignDelimiters!==!1&&v.push(y),v.push(_),s.alignDelimiters!==!1&&v.push(A),s.padding!==!1&&v.push(" "),(s.delimiterEnd!==!1||u!==h-1)&&v.push("|")}T.push(s.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return T.join(`
|
|
77
|
+
`)}function kx(n){return n==null?"":String(n)}function Mg(n){const r=typeof n=="string"?n.codePointAt(0):0;return r===67||r===99?99:r===76||r===108?108:r===82||r===114?114:0}function Ax(n,r,s,l){const d=s.enter("blockquote"),m=s.createTracker(l);m.move("> "),m.shift(2);const f=s.indentLines(s.containerFlow(n,m.current()),Tx);return d(),f}function Tx(n,r,s){return">"+(s?"":" ")+n}function Rx(n,r){return Lg(n,r.inConstruct,!0)&&!Lg(n,r.notInConstruct,!1)}function Lg(n,r,s){if(typeof r=="string"&&(r=[r]),!r||r.length===0)return s;let l=-1;for(;++l<r.length;)if(n.includes(r[l]))return!0;return!1}function Og(n,r,s,l){let d=-1;for(;++d<s.unsafe.length;)if(s.unsafe[d].character===`
|
|
78
|
+
`&&Rx(s.stack,s.unsafe[d]))return/[ \t]/.test(l.before)?"":" ";return`\\
|
|
79
|
+
`}function Dx(n,r){const s=String(n);let l=s.indexOf(r),d=l,m=0,f=0;if(typeof r!="string")throw new TypeError("Expected substring");for(;l!==-1;)l===d?++m>f&&(f=m):m=1,d=l+r.length,l=s.indexOf(r,d);return f}function Mx(n,r){return!!(r.options.fences===!1&&n.value&&!n.lang&&/[^ \r\n]/.test(n.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(n.value))}function Lx(n){const r=n.options.fence||"`";if(r!=="`"&&r!=="~")throw new Error("Cannot serialize code with `"+r+"` for `options.fence`, expected `` ` `` or `~`");return r}function Ox(n,r,s,l){const d=Lx(s),m=n.value||"",f=d==="`"?"GraveAccent":"Tilde";if(Mx(n,s)){const u=s.enter("codeIndented"),b=s.indentLines(m,Bx);return u(),b}const o=s.createTracker(l),c=d.repeat(Math.max(Dx(m,d)+1,3)),h=s.enter("codeFenced");let p=o.move(c);if(n.lang){const u=s.enter(`codeFencedLang${f}`);p+=o.move(s.safe(n.lang,{before:p,after:" ",encode:["`"],...o.current()})),u()}if(n.lang&&n.meta){const u=s.enter(`codeFencedMeta${f}`);p+=o.move(" "),p+=o.move(s.safe(n.meta,{before:p,after:`
|
|
80
80
|
`,encode:["`"],...o.current()})),u()}return p+=o.move(`
|
|
81
81
|
`),m&&(p+=o.move(m+`
|
|
82
|
-
`)),p+=o.move(c),h(),p}function
|
|
83
|
-
`,...c.current()}))),o(),n.title&&(o=s.enter(`title${m}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),o()),f(),h}function
|
|
82
|
+
`)),p+=o.move(c),h(),p}function Bx(n,r,s){return(s?"":" ")+n}function Wh(n){const r=n.options.quote||'"';if(r!=='"'&&r!=="'")throw new Error("Cannot serialize title with `"+r+"` for `options.quote`, expected `\"`, or `'`");return r}function jx(n,r,s,l){const d=Wh(s),m=d==='"'?"Quote":"Apostrophe",f=s.enter("definition");let o=s.enter("label");const c=s.createTracker(l);let h=c.move("[");return h+=c.move(s.safe(s.associationId(n),{before:h,after:"]",...c.current()})),h+=c.move("]: "),o(),!n.url||/[\0- \u007F]/.test(n.url)?(o=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(o=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":`
|
|
83
|
+
`,...c.current()}))),o(),n.title&&(o=s.enter(`title${m}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),o()),f(),h}function Nx(n){const r=n.options.emphasis||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize emphasis with `"+r+"` for `options.emphasis`, expected `*`, or `_`");return r}function Ya(n){return"&#x"+n.toString(16).toUpperCase()+";"}function To(n,r,s){const l=Bs(n),d=Bs(r);return l===void 0?d===void 0?s==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:l===1?d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:d===void 0?{inside:!1,outside:!1}:d===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}V_.peek=Hx;function V_(n,r,s,l){const d=Nx(s),m=s.enter("emphasis"),f=s.createTracker(l),o=f.move(d);let c=f.move(s.containerPhrasing(n,{after:d,before:o,...f.current()}));const h=c.charCodeAt(0),p=To(l.before.charCodeAt(l.before.length-1),h,d);p.inside&&(c=Ya(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=To(l.after.charCodeAt(0),u,d);b.inside&&(c=c.slice(0,-1)+Ya(u));const C=f.move(d);return m(),s.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},o+c+C}function Hx(n,r,s){return s.options.emphasis||"*"}function zx(n,r){let s=!1;return Gh(n,function(l){if("value"in l&&/\r?\n|\r/.test(l.value)||l.type==="break")return s=!0,Ch}),!!((!n.depth||n.depth<3)&&zh(n)&&(r.options.setext||s))}function Ix(n,r,s,l){const d=Math.max(Math.min(6,n.depth||1),1),m=s.createTracker(l);if(zx(n,s)){const p=s.enter("headingSetext"),u=s.enter("phrasing"),b=s.containerPhrasing(n,{...m.current(),before:`
|
|
84
84
|
`,after:`
|
|
85
85
|
`});return u(),p(),b+`
|
|
86
86
|
`+(d===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
87
87
|
`))+1))}const f="#".repeat(d),o=s.enter("headingAtx"),c=s.enter("phrasing");m.move(f+" ");let h=s.containerPhrasing(n,{before:"# ",after:`
|
|
88
|
-
`,...m.current()});return/^[\t ]/.test(h)&&(h=Ya(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),o(),h}W_.peek=
|
|
88
|
+
`,...m.current()});return/^[\t ]/.test(h)&&(h=Ya(h.charCodeAt(0))+h.slice(1)),h=h?f+" "+h:f,s.options.closeAtx&&(h+=" "+f),c(),o(),h}W_.peek=Ux;function W_(n){return n.value||""}function Ux(){return"<"}K_.peek=Px;function K_(n,r,s,l){const d=Wh(s),m=d==='"'?"Quote":"Apostrophe",f=s.enter("image");let o=s.enter("label");const c=s.createTracker(l);let h=c.move("![");return h+=c.move(s.safe(n.alt,{before:h,after:"]",...c.current()})),h+=c.move("]("),o(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(o=s.enter("destinationLiteral"),h+=c.move("<"),h+=c.move(s.safe(n.url,{before:h,after:">",...c.current()})),h+=c.move(">")):(o=s.enter("destinationRaw"),h+=c.move(s.safe(n.url,{before:h,after:n.title?" ":")",...c.current()}))),o(),n.title&&(o=s.enter(`title${m}`),h+=c.move(" "+d),h+=c.move(s.safe(n.title,{before:h,after:d,...c.current()})),h+=c.move(d),o()),h+=c.move(")"),f(),h}function Px(){return"!"}Y_.peek=Fx;function Y_(n,r,s,l){const d=n.referenceType,m=s.enter("imageReference");let f=s.enter("label");const o=s.createTracker(l);let c=o.move("![");const h=s.safe(n.alt,{before:c,after:"]",...o.current()});c+=o.move(h+"]["),f();const p=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...o.current()});return f(),s.stack=p,m(),d==="full"||!h||h!==u?c+=o.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Fx(){return"!"}X_.peek=qx;function X_(n,r,s){let l=n.value||"",d="`",m=-1;for(;new RegExp("(^|[^`])"+d+"([^`]|$)").test(l);)d+="`";for(/[^ \r\n]/.test(l)&&(/^[ \r\n]/.test(l)&&/[ \r\n]$/.test(l)||/^`|`$/.test(l))&&(l=" "+l+" ");++m<s.unsafe.length;){const f=s.unsafe[m],o=s.compilePattern(f);let c;if(f.atBreak)for(;c=o.exec(l);){let h=c.index;l.charCodeAt(h)===10&&l.charCodeAt(h-1)===13&&h--,l=l.slice(0,h)+" "+l.slice(c.index+1)}}return d+l+d}function qx(){return"`"}function Q_(n,r){const s=zh(n);return!!(!r.options.resourceLink&&n.url&&!n.title&&n.children&&n.children.length===1&&n.children[0].type==="text"&&(s===n.url||"mailto:"+s===n.url)&&/^[a-z][a-z+.-]+:/i.test(n.url)&&!/[\0- <>\u007F]/.test(n.url))}J_.peek=$x;function J_(n,r,s,l){const d=Wh(s),m=d==='"'?"Quote":"Apostrophe",f=s.createTracker(l);let o,c;if(Q_(n,s)){const p=s.stack;s.stack=[],o=s.enter("autolink");let u=f.move("<");return u+=f.move(s.containerPhrasing(n,{before:u,after:">",...f.current()})),u+=f.move(">"),o(),s.stack=p,u}o=s.enter("link"),c=s.enter("label");let h=f.move("[");return h+=f.move(s.containerPhrasing(n,{before:h,after:"](",...f.current()})),h+=f.move("]("),c(),!n.url&&n.title||/[\0- \u007F]/.test(n.url)?(c=s.enter("destinationLiteral"),h+=f.move("<"),h+=f.move(s.safe(n.url,{before:h,after:">",...f.current()})),h+=f.move(">")):(c=s.enter("destinationRaw"),h+=f.move(s.safe(n.url,{before:h,after:n.title?" ":")",...f.current()}))),c(),n.title&&(c=s.enter(`title${m}`),h+=f.move(" "+d),h+=f.move(s.safe(n.title,{before:h,after:d,...f.current()})),h+=f.move(d),c()),h+=f.move(")"),o(),h}function $x(n,r,s){return Q_(n,s)?"<":"["}Z_.peek=Gx;function Z_(n,r,s,l){const d=n.referenceType,m=s.enter("linkReference");let f=s.enter("label");const o=s.createTracker(l);let c=o.move("[");const h=s.containerPhrasing(n,{before:c,after:"]",...o.current()});c+=o.move(h+"]["),f();const p=s.stack;s.stack=[],f=s.enter("reference");const u=s.safe(s.associationId(n),{before:c,after:"]",...o.current()});return f(),s.stack=p,m(),d==="full"||!h||h!==u?c+=o.move(u+"]"):d==="shortcut"?c=c.slice(0,-1):c+=o.move("]"),c}function Gx(){return"["}function Kh(n){const r=n.options.bullet||"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bullet`, expected `*`, `+`, or `-`");return r}function Vx(n){const r=Kh(n),s=n.options.bulletOther;if(!s)return r==="*"?"-":"*";if(s!=="*"&&s!=="+"&&s!=="-")throw new Error("Cannot serialize items with `"+s+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(s===r)throw new Error("Expected `bullet` (`"+r+"`) and `bulletOther` (`"+s+"`) to be different");return s}function Wx(n){const r=n.options.bulletOrdered||".";if(r!=="."&&r!==")")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOrdered`, expected `.` or `)`");return r}function ev(n){const r=n.options.rule||"*";if(r!=="*"&&r!=="-"&&r!=="_")throw new Error("Cannot serialize rules with `"+r+"` for `options.rule`, expected `*`, `-`, or `_`");return r}function Kx(n,r,s,l){const d=s.enter("list"),m=s.bulletCurrent;let f=n.ordered?Wx(s):Kh(s);const o=n.ordered?f==="."?")":".":Vx(s);let c=r&&s.bulletLastUsed?f===s.bulletLastUsed:!1;if(!n.ordered){const p=n.children?n.children[0]:void 0;if((f==="*"||f==="-")&&p&&(!p.children||!p.children[0])&&s.stack[s.stack.length-1]==="list"&&s.stack[s.stack.length-2]==="listItem"&&s.stack[s.stack.length-3]==="list"&&s.stack[s.stack.length-4]==="listItem"&&s.indexStack[s.indexStack.length-1]===0&&s.indexStack[s.indexStack.length-2]===0&&s.indexStack[s.indexStack.length-3]===0&&(c=!0),ev(s)===f&&p){let u=-1;for(;++u<n.children.length;){const b=n.children[u];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){c=!0;break}}}}c&&(f=o),s.bulletCurrent=f;const h=s.containerFlow(n,l);return s.bulletLastUsed=f,s.bulletCurrent=m,d(),h}function Yx(n){const r=n.options.listItemIndent||"one";if(r!=="tab"&&r!=="one"&&r!=="mixed")throw new Error("Cannot serialize items with `"+r+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return r}function Xx(n,r,s,l){const d=Yx(s);let m=s.bulletCurrent||Kh(s);r&&r.type==="list"&&r.ordered&&(m=(typeof r.start=="number"&&r.start>-1?r.start:1)+(s.options.incrementListMarker===!1?0:r.children.indexOf(n))+m);let f=m.length+1;(d==="tab"||d==="mixed"&&(r&&r.type==="list"&&r.spread||n.spread))&&(f=Math.ceil(f/4)*4);const o=s.createTracker(l);o.move(m+" ".repeat(f-m.length)),o.shift(f);const c=s.enter("listItem"),h=s.indentLines(s.containerFlow(n,o.current()),p);return c(),h;function p(u,b,C){return b?(C?"":" ".repeat(f))+u:(C?m:m+" ".repeat(f-m.length))+u}}function Qx(n,r,s,l){const d=s.enter("paragraph"),m=s.enter("phrasing"),f=s.containerPhrasing(n,l);return m(),d(),f}const Jx=Ho(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Zx(n,r,s,l){return(n.children.some(function(f){return Jx(f)})?s.containerPhrasing:s.containerFlow).call(s,n,l)}function eE(n){const r=n.options.strong||"*";if(r!=="*"&&r!=="_")throw new Error("Cannot serialize strong with `"+r+"` for `options.strong`, expected `*`, or `_`");return r}tv.peek=tE;function tv(n,r,s,l){const d=eE(s),m=s.enter("strong"),f=s.createTracker(l),o=f.move(d+d);let c=f.move(s.containerPhrasing(n,{after:d,before:o,...f.current()}));const h=c.charCodeAt(0),p=To(l.before.charCodeAt(l.before.length-1),h,d);p.inside&&(c=Ya(h)+c.slice(1));const u=c.charCodeAt(c.length-1),b=To(l.after.charCodeAt(0),u,d);b.inside&&(c=c.slice(0,-1)+Ya(u));const C=f.move(d+d);return m(),s.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},o+c+C}function tE(n,r,s){return s.options.strong||"*"}function nE(n,r,s,l){return s.safe(n.value,l)}function iE(n){const r=n.options.ruleRepetition||3;if(r<3)throw new Error("Cannot serialize rules with repetition `"+r+"` for `options.ruleRepetition`, expected `3` or more");return r}function rE(n,r,s){const l=(ev(s)+(s.options.ruleSpaces?" ":"")).repeat(iE(s));return s.options.ruleSpaces?l.slice(0,-1):l}const nv={blockquote:Ax,break:Og,code:Ox,definition:jx,emphasis:V_,hardBreak:Og,heading:Ix,html:W_,image:K_,imageReference:Y_,inlineCode:X_,link:J_,linkReference:Z_,list:Kx,listItem:Xx,paragraph:Qx,root:Zx,strong:tv,text:nE,thematicBreak:rE};function sE(){return{enter:{table:aE,tableData:Bg,tableHeader:Bg,tableRow:oE},exit:{codeText:cE,table:lE,tableData:oh,tableHeader:oh,tableRow:oh}}}function aE(n){const r=n._align;this.enter({type:"table",align:r.map(function(s){return s==="none"?null:s}),children:[]},n),this.data.inTable=!0}function lE(n){this.exit(n),this.data.inTable=void 0}function oE(n){this.enter({type:"tableRow",children:[]},n)}function oh(n){this.exit(n)}function Bg(n){this.enter({type:"tableCell",children:[]},n)}function cE(n){let r=this.resume();this.data.inTable&&(r=r.replace(/\\([\\|])/g,uE));const s=this.stack[this.stack.length-1];s.type,s.value=r,this.exit(n)}function uE(n,r){return r==="|"?r:n}function hE(n){const r=n||{},s=r.tableCellPadding,l=r.tablePipeAlign,d=r.stringLength,m=s?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
89
89
|
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:f,tableCell:c,tableRow:o}};function f(C,T,E,S){return h(p(C,E,S),C.align)}function o(C,T,E,S){const v=u(C,E,S),_=h([v]);return _.slice(0,_.indexOf(`
|
|
90
|
-
`))}function c(C,T,E,S){const v=E.enter("tableCell"),_=E.enter("phrasing"),y=E.containerPhrasing(C,{...S,before:m,after:m});return _(),v(),y}function h(C,T){return kx(C,{align:T,alignDelimiters:l,padding:s,stringLength:d})}function p(C,T,E){const S=C.children;let v=-1;const _=[],y=T.enter("table");for(;++v<S.length;)_[v]=u(S[v],T,E);return y(),_}function u(C,T,E){const S=C.children;let v=-1;const _=[],y=T.enter("tableRow");for(;++v<S.length;)_[v]=c(S[v],C,T,E);return y(),_}function b(C,T,E){let S=nv.inlineCode(C,T,E);return E.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function dE(){return{exit:{taskListCheckValueChecked:jg,taskListCheckValueUnchecked:jg,paragraph:mE}}}function pE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gE}}}function jg(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function mE(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const l=s.children[0];if(l&&l.type==="text"){const d=r.children;let m=-1,f;for(;++m<d.length;){const o=d[m];if(o.type==="paragraph"){f=o;break}}f===s&&(l.value=l.value.slice(1),l.value.length===0?s.children.shift():s.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,s.position.start=Object.assign({},l.position.start)))}}this.exit(n)}function gE(n,r,s,l){const d=n.children[0],m=typeof n.checked=="boolean"&&d&&d.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",o=s.createTracker(l);m&&o.move(f);let c=nv.listItem(n,r,s,{...l,...o.current()});return m&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(p){return p+f}}function _E(){return[Yw(),gx(),Sx(),aE(),dE()]}function vE(n){return{extensions:[Xw(),_x(n),bx(),fE(n),pE()]}}const yE={tokenize:EE,partial:!0},iv={tokenize:kE,partial:!0},rv={tokenize:AE,partial:!0},sv={tokenize:TE,partial:!0},SE={tokenize:RE,partial:!0},av={name:"wwwAutolink",tokenize:wE,previous:ov},lv={name:"protocolAutolink",tokenize:xE,previous:cv},zi={name:"emailAutolink",tokenize:CE,previous:uv},fi={};function bE(){return{text:fi}}let jr=48;for(;jr<123;)fi[jr]=zi,jr++,jr===58?jr=65:jr===91&&(jr=97);fi[43]=zi;fi[45]=zi;fi[46]=zi;fi[95]=zi;fi[72]=[zi,lv];fi[104]=[zi,lv];fi[87]=[zi,av];fi[119]=[zi,av];function CE(n,r,s){const l=this;let d,m;return f;function f(u){return!kh(u)||!uv.call(l,l.previous)||Yh(l.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),o(u))}function o(u){return kh(u)?(n.consume(u),o):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(SE,p,h)(u):u===45||u===95||Jt(u)?(m=!0,n.consume(u),c):p(u)}function h(u){return n.consume(u),d=!0,c}function p(u){return m&&d&&sn(l.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function wE(n,r,s){const l=this;return d;function d(f){return f!==87&&f!==119||!ov.call(l,l.previous)||Yh(l.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(yE,n.attempt(iv,n.attempt(rv,m),s),s)(f))}function m(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function xE(n,r,s){const l=this;let d="",m=!1;return f;function f(u){return(u===72||u===104)&&cv.call(l,l.previous)&&!Yh(l.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),d+=String.fromCodePoint(u),n.consume(u),o):s(u)}function o(u){if(sn(u)&&d.length<5)return d+=String.fromCodePoint(u),n.consume(u),o;if(u===58){const b=d.toLowerCase();if(b==="http"||b==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),m?h:(m=!0,c)):s(u)}function h(u){return u===null||Eo(u)||ot(u)||zr(u)||Bo(u)?s(u):n.attempt(iv,n.attempt(rv,p),s)(u)}function p(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function EE(n,r,s){let l=0;return d;function d(f){return(f===87||f===119)&&l<3?(l++,n.consume(f),d):f===46&&l===3?(n.consume(f),m):s(f)}function m(f){return f===null?s(f):r(f)}}function kE(n,r,s){let l,d,m;return f;function f(h){return h===46||h===95?n.check(sv,c,o)(h):h===null||ot(h)||zr(h)||h!==45&&Bo(h)?c(h):(m=!0,n.consume(h),f)}function o(h){return h===95?l=!0:(d=l,l=void 0),n.consume(h),f}function c(h){return d||l||!m?s(h):r(h)}}function AE(n,r){let s=0,l=0;return d;function d(f){return f===40?(s++,n.consume(f),d):f===41&&l<s?m(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(sv,r,m)(f):f===null||ot(f)||zr(f)?r(f):(n.consume(f),d)}function m(f){return f===41&&l++,n.consume(f),d}}function TE(n,r,s){return l;function l(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(n.consume(o),l):o===38?(n.consume(o),m):o===93?(n.consume(o),d):o===60||o===null||ot(o)||zr(o)?r(o):s(o)}function d(o){return o===null||o===40||o===91||ot(o)||zr(o)?r(o):l(o)}function m(o){return sn(o)?f(o):s(o)}function f(o){return o===59?(n.consume(o),l):sn(o)?(n.consume(o),f):s(o)}}function RE(n,r,s){return l;function l(m){return n.consume(m),d}function d(m){return Jt(m)?s(m):r(m)}}function ov(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ot(n)}function cv(n){return!sn(n)}function uv(n){return!(n===47||kh(n))}function kh(n){return n===43||n===45||n===46||n===95||Jt(n)}function Yh(n){let r=n.length,s=!1;for(;r--;){const l=n[r][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){s=!0;break}if(l._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const DE={tokenize:zE,partial:!0};function ME(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:jE,continuation:{tokenize:NE},exit:HE}},text:{91:{name:"gfmFootnoteCall",tokenize:BE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:LE,resolveTo:OE}}}}function LE(n,r,s){const l=this;let d=l.events.length;const m=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let f;for(;d--;){const c=l.events[d][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!f||!f._balanced)return s(c);const h=ni(l.sliceSerialize({start:f.end,end:l.now()}));return h.codePointAt(0)!==94||!m.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function OE(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},d={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};d.end.column++,d.end.offset++,d.end._bufferIndex++;const m={type:"gfmFootnoteCallString",start:Object.assign({},d.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},m.start),end:Object.assign({},m.end)},o=[n[s+1],n[s+2],["enter",l,r],n[s+3],n[s+4],["enter",d,r],["exit",d,r],["enter",m,r],["enter",f,r],["exit",f,r],["exit",m,r],n[n.length-2],n[n.length-1],["exit",l,r]];return n.splice(s,n.length-s+1,...o),n}function BE(n,r,s){const l=this,d=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let m=0,f;return o;function o(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(m>999||u===93&&!f||u===null||u===91||ot(u))return s(u);if(u===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return d.includes(ni(l.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return ot(u)||(f=!0),m++,n.consume(u),u===92?p:h}function p(u){return u===91||u===92||u===93?(n.consume(u),m++,h):h(u)}}function jE(n,r,s){const l=this,d=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let m,f=0,o;return c;function c(T){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",p):s(T)}function p(T){if(f>999||T===93&&!o||T===null||T===91||ot(T))return s(T);if(T===93){n.exit("chunkString");const E=n.exit("gfmFootnoteDefinitionLabelString");return m=ni(l.sliceSerialize(E)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return ot(T)||(o=!0),f++,n.consume(T),T===92?u:p}function u(T){return T===91||T===92||T===93?(n.consume(T),f++,p):p(T)}function b(T){return T===58?(n.enter("definitionMarker"),n.consume(T),n.exit("definitionMarker"),d.includes(m)||d.push(m),Xe(n,C,"gfmFootnoteDefinitionWhitespace")):s(T)}function C(T){return r(T)}}function NE(n,r,s){return n.check(Ja,r,n.attempt(DE,r,s))}function HE(n){n.exit("gfmFootnoteDefinition")}function zE(n,r,s){const l=this;return Xe(n,d,"gfmFootnoteDefinitionIndent",5);function d(m){const f=l.events[l.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(m):s(m)}}function IE(n){let s=(n||{}).singleTilde;const l={name:"strikethrough",tokenize:m,resolveAll:d};return s==null&&(s=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function d(f,o){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},b=[["enter",p,o],["enter",f[h][1],o],["exit",f[h][1],o],["enter",u,o]],C=o.parser.constructs.insideSpan.null;C&&On(b,b.length,0,jo(C,f.slice(h+1,c),o)),On(b,b.length,0,[["exit",u,o],["enter",f[c][1],o],["exit",f[c][1],o],["exit",p,o]]),On(f,h-1,c-h+3,b),c=h+b.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function m(f,o,c){const h=this.previous,p=this.events;let u=0;return b;function b(T){return h===126&&p[p.length-1][1].type!=="characterEscape"?c(T):(f.enter("strikethroughSequenceTemporary"),C(T))}function C(T){const E=Bs(h);if(T===126)return u>1?c(T):(f.consume(T),u++,C);if(u<2&&!s)return c(T);const S=f.exit("strikethroughSequenceTemporary"),v=Bs(T);return S._open=!v||v===2&&!!E,S._close=!E||E===2&&!!v,o(T)}}}class UE{constructor(){this.map=[]}add(r,s,l){PE(this,r,s,l)}consume(r){if(this.map.sort(function(m,f){return m[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const l=[];for(;s>0;)s-=1,l.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];l.push(r.slice()),r.length=0;let d=l.pop();for(;d;){for(const m of d)r.push(m);d=l.pop()}this.map.length=0}}function PE(n,r,s,l){let d=0;if(!(s===0&&l.length===0)){for(;d<n.map.length;){if(n.map[d][0]===r){n.map[d][1]+=s,n.map[d][2].push(...l);return}d+=1}n.map.push([r,s,l])}}function FE(n,r){let s=!1;const l=[];for(;r<n.length;){const d=n[r];if(s){if(d[0]==="enter")d[1].type==="tableContent"&&l.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(d[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const m=l.length-1;l[m]=l[m]==="left"?"center":"right"}}else if(d[1].type==="tableDelimiterRow")break}else d[0]==="enter"&&d[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return l}function qE(){return{flow:{null:{name:"table",tokenize:$E,resolveAll:GE}}}}function $E(n,r,s){const l=this;let d=0,m=0,f;return o;function o(j){let H=l.events.length-1;for(;H>-1;){const K=l.events[H][1].type;if(K==="lineEnding"||K==="linePrefix")H--;else break}const U=H>-1?l.events[H][1].type:null,F=U==="tableHead"||U==="tableRow"?D:c;return F===D&&l.parser.lazy[l.now().line]?s(j):F(j)}function c(j){return n.enter("tableHead"),n.enter("tableRow"),h(j)}function h(j){return j===124||(f=!0,m+=1),p(j)}function p(j){return j===null?s(j):De(j)?m>1?(m=0,l.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),C):s(j):Ve(j)?Xe(n,p,"whitespace")(j):(m+=1,f&&(f=!1,d+=1),j===124?(n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),f=!0,p):(n.enter("data"),u(j)))}function u(j){return j===null||j===124||ot(j)?(n.exit("data"),p(j)):(n.consume(j),j===92?b:u)}function b(j){return j===92||j===124?(n.consume(j),u):u(j)}function C(j){return l.interrupt=!1,l.parser.lazy[l.now().line]?s(j):(n.enter("tableDelimiterRow"),f=!1,Ve(j)?Xe(n,T,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):T(j))}function T(j){return j===45||j===58?S(j):j===124?(f=!0,n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),E):L(j)}function E(j){return Ve(j)?Xe(n,S,"whitespace")(j):S(j)}function S(j){return j===58?(m+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(j),n.exit("tableDelimiterMarker"),v):j===45?(m+=1,v(j)):j===null||De(j)?A(j):L(j)}function v(j){return j===45?(n.enter("tableDelimiterFiller"),_(j)):L(j)}function _(j){return j===45?(n.consume(j),_):j===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(j),n.exit("tableDelimiterMarker"),y):(n.exit("tableDelimiterFiller"),y(j))}function y(j){return Ve(j)?Xe(n,A,"whitespace")(j):A(j)}function A(j){return j===124?T(j):j===null||De(j)?!f||d!==m?L(j):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(j)):L(j)}function L(j){return s(j)}function D(j){return n.enter("tableRow"),R(j)}function R(j){return j===124?(n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),R):j===null||De(j)?(n.exit("tableRow"),r(j)):Ve(j)?Xe(n,R,"whitespace")(j):(n.enter("data"),k(j))}function k(j){return j===null||j===124||ot(j)?(n.exit("data"),R(j)):(n.consume(j),j===92?M:k)}function M(j){return j===92||j===124?(n.consume(j),k):k(j)}}function GE(n,r){let s=-1,l=!0,d=0,m=[0,0,0,0],f=[0,0,0,0],o=!1,c=0,h,p,u;const b=new UE;for(;++s<n.length;){const C=n[s],T=C[1];C[0]==="enter"?T.type==="tableHead"?(o=!1,c!==0&&(Ng(b,r,c,h,p),p=void 0,c=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},b.add(s,0,[["enter",h,r]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(l=!0,u=void 0,m=[0,0,0,0],f=[0,s+1,0,0],o&&(o=!1,p={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},b.add(s,0,[["enter",p,r]])),d=T.type==="tableDelimiterRow"?2:p?3:1):d&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(l=!1,f[2]===0&&(m[1]!==0&&(f[0]=f[1],u=yo(b,r,m,d,void 0,u),m=[0,0,0,0]),f[2]=s)):T.type==="tableCellDivider"&&(l?l=!1:(m[1]!==0&&(f[0]=f[1],u=yo(b,r,m,d,void 0,u)),m=f,f=[m[1],s,0,0])):T.type==="tableHead"?(o=!0,c=s):T.type==="tableRow"||T.type==="tableDelimiterRow"?(c=s,m[1]!==0?(f[0]=f[1],u=yo(b,r,m,d,s,u)):f[1]!==0&&(u=yo(b,r,f,d,s,u)),d=0):d&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&Ng(b,r,c,h,p),b.consume(r.events),s=-1;++s<r.events.length;){const C=r.events[s];C[0]==="enter"&&C[1].type==="table"&&(C[1]._align=FE(r.events,s))}return n}function yo(n,r,s,l,d,m){const f=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",o="tableContent";s[0]!==0&&(m.end=Object.assign({},Ms(r.events,s[0])),n.add(s[0],0,[["exit",m,r]]));const c=Ms(r.events,s[1]);if(m={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",m,r]]),s[2]!==0){const h=Ms(r.events,s[2]),p=Ms(r.events,s[3]),u={type:o,start:Object.assign({},h),end:Object.assign({},p)};if(n.add(s[2],0,[["enter",u,r]]),l!==2){const b=r.events[s[2]],C=r.events[s[3]];if(b[1].end=Object.assign({},C[1].end),b[1].type="chunkText",b[1].contentType="text",s[3]>s[2]+1){const T=s[2]+1,E=s[3]-s[2]-1;n.add(T,E,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return d!==void 0&&(m.end=Object.assign({},Ms(r.events,d)),n.add(d,0,[["exit",m,r]]),m=void 0),m}function Ng(n,r,s,l,d){const m=[],f=Ms(r.events,s);d&&(d.end=Object.assign({},f),m.push(["exit",d,r])),l.end=Object.assign({},f),m.push(["exit",l,r]),n.add(s+1,0,m)}function Ms(n,r){const s=n[r],l=s[0]==="enter"?"start":"end";return s[1][l]}const VE={name:"tasklistCheck",tokenize:KE};function WE(){return{text:{91:VE}}}function KE(n,r,s){const l=this;return d;function d(c){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),m)}function m(c){return ot(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),o):s(c)}function o(c){return De(c)?r(c):Ve(c)?n.check({tokenize:YE},r,s)(c):s(c)}}function YE(n,r,s){return Xe(n,l,"whitespace");function l(d){return d===null?s(d):r(d)}}function XE(n){return S_([bE(),ME(),IE(n),qE(),WE()])}const QE={};function hv(n){const r=this,s=n||QE,l=r.data(),d=l.micromarkExtensions||(l.micromarkExtensions=[]),m=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),f=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);d.push(XE(s)),m.push(_E()),f.push(vE(s))}const fv=1e3,Ls=new Map;let Ga;function JE(n,r,s){const l=Symbol(n),d=Math.max(fv,s.intervalMs),m=Date.now();return Ls.set(n,{id:n,intervalMs:d,nextRunAt:s.runImmediately===!1?m+d:m,inFlight:!1,run:r,token:l}),ZE(),dv(),()=>{const f=Ls.get(n);(f==null?void 0:f.token)===l&&(Ls.delete(n),Ls.size===0&&Ga!==void 0&&(window.clearInterval(Ga),Ga=void 0))}}function ZE(){Ga!==void 0||typeof window>"u"||(Ga=window.setInterval(()=>{dv()},fv))}async function dv(){const n=Date.now();for(const r of Ls.values())r.inFlight||r.nextRunAt>n||e2(r)}async function e2(n){n.inFlight=!0;try{await n.run()}catch{}finally{const r=Ls.get(n.id);(r==null?void 0:r.token)===n.token&&(r.inFlight=!1,r.nextRunAt=Date.now()+r.intervalMs)}}function Xa(n,r,s){const l=te.useRef(r);te.useEffect(()=>{l.current=r},[r]),te.useEffect(()=>{if(!(!n||s.enabled===!1))return JE(n,()=>l.current(),{intervalMs:s.intervalMs,runImmediately:s.runImmediately})},[n,s.enabled,s.intervalMs,s.runImmediately])}const Ro=`
|
|
90
|
+
`))}function c(C,T,E,S){const v=E.enter("tableCell"),_=E.enter("phrasing"),y=E.containerPhrasing(C,{...S,before:m,after:m});return _(),v(),y}function h(C,T){return Ex(C,{align:T,alignDelimiters:l,padding:s,stringLength:d})}function p(C,T,E){const S=C.children;let v=-1;const _=[],y=T.enter("table");for(;++v<S.length;)_[v]=u(S[v],T,E);return y(),_}function u(C,T,E){const S=C.children;let v=-1;const _=[],y=T.enter("tableRow");for(;++v<S.length;)_[v]=c(S[v],C,T,E);return y(),_}function b(C,T,E){let S=nv.inlineCode(C,T,E);return E.stack.includes("tableCell")&&(S=S.replace(/\|/g,"\\$&")),S}}function fE(){return{exit:{taskListCheckValueChecked:jg,taskListCheckValueUnchecked:jg,paragraph:pE}}}function dE(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:mE}}}function jg(n){const r=this.stack[this.stack.length-2];r.type,r.checked=n.type==="taskListCheckValueChecked"}function pE(n){const r=this.stack[this.stack.length-2];if(r&&r.type==="listItem"&&typeof r.checked=="boolean"){const s=this.stack[this.stack.length-1];s.type;const l=s.children[0];if(l&&l.type==="text"){const d=r.children;let m=-1,f;for(;++m<d.length;){const o=d[m];if(o.type==="paragraph"){f=o;break}}f===s&&(l.value=l.value.slice(1),l.value.length===0?s.children.shift():s.position&&l.position&&typeof l.position.start.offset=="number"&&(l.position.start.column++,l.position.start.offset++,s.position.start=Object.assign({},l.position.start)))}}this.exit(n)}function mE(n,r,s,l){const d=n.children[0],m=typeof n.checked=="boolean"&&d&&d.type==="paragraph",f="["+(n.checked?"x":" ")+"] ",o=s.createTracker(l);m&&o.move(f);let c=nv.listItem(n,r,s,{...l,...o.current()});return m&&(c=c.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),c;function h(p){return p+f}}function gE(){return[Kw(),mx(),yx(),sE(),fE()]}function _E(n){return{extensions:[Yw(),gx(n),Sx(),hE(n),dE()]}}const vE={tokenize:xE,partial:!0},iv={tokenize:EE,partial:!0},rv={tokenize:kE,partial:!0},sv={tokenize:AE,partial:!0},yE={tokenize:TE,partial:!0},av={name:"wwwAutolink",tokenize:CE,previous:ov},lv={name:"protocolAutolink",tokenize:wE,previous:cv},zi={name:"emailAutolink",tokenize:bE,previous:uv},fi={};function SE(){return{text:fi}}let jr=48;for(;jr<123;)fi[jr]=zi,jr++,jr===58?jr=65:jr===91&&(jr=97);fi[43]=zi;fi[45]=zi;fi[46]=zi;fi[95]=zi;fi[72]=[zi,lv];fi[104]=[zi,lv];fi[87]=[zi,av];fi[119]=[zi,av];function bE(n,r,s){const l=this;let d,m;return f;function f(u){return!kh(u)||!uv.call(l,l.previous)||Yh(l.events)?s(u):(n.enter("literalAutolink"),n.enter("literalAutolinkEmail"),o(u))}function o(u){return kh(u)?(n.consume(u),o):u===64?(n.consume(u),c):s(u)}function c(u){return u===46?n.check(yE,p,h)(u):u===45||u===95||Qt(u)?(m=!0,n.consume(u),c):p(u)}function h(u){return n.consume(u),d=!0,c}function p(u){return m&&d&&sn(l.previous)?(n.exit("literalAutolinkEmail"),n.exit("literalAutolink"),r(u)):s(u)}}function CE(n,r,s){const l=this;return d;function d(f){return f!==87&&f!==119||!ov.call(l,l.previous)||Yh(l.events)?s(f):(n.enter("literalAutolink"),n.enter("literalAutolinkWww"),n.check(vE,n.attempt(iv,n.attempt(rv,m),s),s)(f))}function m(f){return n.exit("literalAutolinkWww"),n.exit("literalAutolink"),r(f)}}function wE(n,r,s){const l=this;let d="",m=!1;return f;function f(u){return(u===72||u===104)&&cv.call(l,l.previous)&&!Yh(l.events)?(n.enter("literalAutolink"),n.enter("literalAutolinkHttp"),d+=String.fromCodePoint(u),n.consume(u),o):s(u)}function o(u){if(sn(u)&&d.length<5)return d+=String.fromCodePoint(u),n.consume(u),o;if(u===58){const b=d.toLowerCase();if(b==="http"||b==="https")return n.consume(u),c}return s(u)}function c(u){return u===47?(n.consume(u),m?h:(m=!0,c)):s(u)}function h(u){return u===null||Eo(u)||ot(u)||zr(u)||Bo(u)?s(u):n.attempt(iv,n.attempt(rv,p),s)(u)}function p(u){return n.exit("literalAutolinkHttp"),n.exit("literalAutolink"),r(u)}}function xE(n,r,s){let l=0;return d;function d(f){return(f===87||f===119)&&l<3?(l++,n.consume(f),d):f===46&&l===3?(n.consume(f),m):s(f)}function m(f){return f===null?s(f):r(f)}}function EE(n,r,s){let l,d,m;return f;function f(h){return h===46||h===95?n.check(sv,c,o)(h):h===null||ot(h)||zr(h)||h!==45&&Bo(h)?c(h):(m=!0,n.consume(h),f)}function o(h){return h===95?l=!0:(d=l,l=void 0),n.consume(h),f}function c(h){return d||l||!m?s(h):r(h)}}function kE(n,r){let s=0,l=0;return d;function d(f){return f===40?(s++,n.consume(f),d):f===41&&l<s?m(f):f===33||f===34||f===38||f===39||f===41||f===42||f===44||f===46||f===58||f===59||f===60||f===63||f===93||f===95||f===126?n.check(sv,r,m)(f):f===null||ot(f)||zr(f)?r(f):(n.consume(f),d)}function m(f){return f===41&&l++,n.consume(f),d}}function AE(n,r,s){return l;function l(o){return o===33||o===34||o===39||o===41||o===42||o===44||o===46||o===58||o===59||o===63||o===95||o===126?(n.consume(o),l):o===38?(n.consume(o),m):o===93?(n.consume(o),d):o===60||o===null||ot(o)||zr(o)?r(o):s(o)}function d(o){return o===null||o===40||o===91||ot(o)||zr(o)?r(o):l(o)}function m(o){return sn(o)?f(o):s(o)}function f(o){return o===59?(n.consume(o),l):sn(o)?(n.consume(o),f):s(o)}}function TE(n,r,s){return l;function l(m){return n.consume(m),d}function d(m){return Qt(m)?s(m):r(m)}}function ov(n){return n===null||n===40||n===42||n===95||n===91||n===93||n===126||ot(n)}function cv(n){return!sn(n)}function uv(n){return!(n===47||kh(n))}function kh(n){return n===43||n===45||n===46||n===95||Qt(n)}function Yh(n){let r=n.length,s=!1;for(;r--;){const l=n[r][1];if((l.type==="labelLink"||l.type==="labelImage")&&!l._balanced){s=!0;break}if(l._gfmAutolinkLiteralWalkedInto){s=!1;break}}return n.length>0&&!s&&(n[n.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),s}const RE={tokenize:HE,partial:!0};function DE(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:BE,continuation:{tokenize:jE},exit:NE}},text:{91:{name:"gfmFootnoteCall",tokenize:OE},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:ME,resolveTo:LE}}}}function ME(n,r,s){const l=this;let d=l.events.length;const m=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let f;for(;d--;){const c=l.events[d][1];if(c.type==="labelImage"){f=c;break}if(c.type==="gfmFootnoteCall"||c.type==="labelLink"||c.type==="label"||c.type==="image"||c.type==="link")break}return o;function o(c){if(!f||!f._balanced)return s(c);const h=ni(l.sliceSerialize({start:f.end,end:l.now()}));return h.codePointAt(0)!==94||!m.includes(h.slice(1))?s(c):(n.enter("gfmFootnoteCallLabelMarker"),n.consume(c),n.exit("gfmFootnoteCallLabelMarker"),r(c))}}function LE(n,r){let s=n.length;for(;s--;)if(n[s][1].type==="labelImage"&&n[s][0]==="enter"){n[s][1];break}n[s+1][1].type="data",n[s+3][1].type="gfmFootnoteCallLabelMarker";const l={type:"gfmFootnoteCall",start:Object.assign({},n[s+3][1].start),end:Object.assign({},n[n.length-1][1].end)},d={type:"gfmFootnoteCallMarker",start:Object.assign({},n[s+3][1].end),end:Object.assign({},n[s+3][1].end)};d.end.column++,d.end.offset++,d.end._bufferIndex++;const m={type:"gfmFootnoteCallString",start:Object.assign({},d.end),end:Object.assign({},n[n.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},m.start),end:Object.assign({},m.end)},o=[n[s+1],n[s+2],["enter",l,r],n[s+3],n[s+4],["enter",d,r],["exit",d,r],["enter",m,r],["enter",f,r],["exit",f,r],["exit",m,r],n[n.length-2],n[n.length-1],["exit",l,r]];return n.splice(s,n.length-s+1,...o),n}function OE(n,r,s){const l=this,d=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let m=0,f;return o;function o(u){return n.enter("gfmFootnoteCall"),n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),c}function c(u){return u!==94?s(u):(n.enter("gfmFootnoteCallMarker"),n.consume(u),n.exit("gfmFootnoteCallMarker"),n.enter("gfmFootnoteCallString"),n.enter("chunkString").contentType="string",h)}function h(u){if(m>999||u===93&&!f||u===null||u===91||ot(u))return s(u);if(u===93){n.exit("chunkString");const b=n.exit("gfmFootnoteCallString");return d.includes(ni(l.sliceSerialize(b)))?(n.enter("gfmFootnoteCallLabelMarker"),n.consume(u),n.exit("gfmFootnoteCallLabelMarker"),n.exit("gfmFootnoteCall"),r):s(u)}return ot(u)||(f=!0),m++,n.consume(u),u===92?p:h}function p(u){return u===91||u===92||u===93?(n.consume(u),m++,h):h(u)}}function BE(n,r,s){const l=this,d=l.parser.gfmFootnotes||(l.parser.gfmFootnotes=[]);let m,f=0,o;return c;function c(T){return n.enter("gfmFootnoteDefinition")._container=!0,n.enter("gfmFootnoteDefinitionLabel"),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(T){return T===94?(n.enter("gfmFootnoteDefinitionMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionMarker"),n.enter("gfmFootnoteDefinitionLabelString"),n.enter("chunkString").contentType="string",p):s(T)}function p(T){if(f>999||T===93&&!o||T===null||T===91||ot(T))return s(T);if(T===93){n.exit("chunkString");const E=n.exit("gfmFootnoteDefinitionLabelString");return m=ni(l.sliceSerialize(E)),n.enter("gfmFootnoteDefinitionLabelMarker"),n.consume(T),n.exit("gfmFootnoteDefinitionLabelMarker"),n.exit("gfmFootnoteDefinitionLabel"),b}return ot(T)||(o=!0),f++,n.consume(T),T===92?u:p}function u(T){return T===91||T===92||T===93?(n.consume(T),f++,p):p(T)}function b(T){return T===58?(n.enter("definitionMarker"),n.consume(T),n.exit("definitionMarker"),d.includes(m)||d.push(m),Xe(n,C,"gfmFootnoteDefinitionWhitespace")):s(T)}function C(T){return r(T)}}function jE(n,r,s){return n.check(Ja,r,n.attempt(RE,r,s))}function NE(n){n.exit("gfmFootnoteDefinition")}function HE(n,r,s){const l=this;return Xe(n,d,"gfmFootnoteDefinitionIndent",5);function d(m){const f=l.events[l.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?r(m):s(m)}}function zE(n){let s=(n||{}).singleTilde;const l={name:"strikethrough",tokenize:m,resolveAll:d};return s==null&&(s=!0),{text:{126:l},insideSpan:{null:[l]},attentionMarkers:{null:[126]}};function d(f,o){let c=-1;for(;++c<f.length;)if(f[c][0]==="enter"&&f[c][1].type==="strikethroughSequenceTemporary"&&f[c][1]._close){let h=c;for(;h--;)if(f[h][0]==="exit"&&f[h][1].type==="strikethroughSequenceTemporary"&&f[h][1]._open&&f[c][1].end.offset-f[c][1].start.offset===f[h][1].end.offset-f[h][1].start.offset){f[c][1].type="strikethroughSequence",f[h][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},f[h][1].start),end:Object.assign({},f[c][1].end)},u={type:"strikethroughText",start:Object.assign({},f[h][1].end),end:Object.assign({},f[c][1].start)},b=[["enter",p,o],["enter",f[h][1],o],["exit",f[h][1],o],["enter",u,o]],C=o.parser.constructs.insideSpan.null;C&&On(b,b.length,0,jo(C,f.slice(h+1,c),o)),On(b,b.length,0,[["exit",u,o],["enter",f[c][1],o],["exit",f[c][1],o],["exit",p,o]]),On(f,h-1,c-h+3,b),c=h+b.length-2;break}}for(c=-1;++c<f.length;)f[c][1].type==="strikethroughSequenceTemporary"&&(f[c][1].type="data");return f}function m(f,o,c){const h=this.previous,p=this.events;let u=0;return b;function b(T){return h===126&&p[p.length-1][1].type!=="characterEscape"?c(T):(f.enter("strikethroughSequenceTemporary"),C(T))}function C(T){const E=Bs(h);if(T===126)return u>1?c(T):(f.consume(T),u++,C);if(u<2&&!s)return c(T);const S=f.exit("strikethroughSequenceTemporary"),v=Bs(T);return S._open=!v||v===2&&!!E,S._close=!E||E===2&&!!v,o(T)}}}class IE{constructor(){this.map=[]}add(r,s,l){UE(this,r,s,l)}consume(r){if(this.map.sort(function(m,f){return m[0]-f[0]}),this.map.length===0)return;let s=this.map.length;const l=[];for(;s>0;)s-=1,l.push(r.slice(this.map[s][0]+this.map[s][1]),this.map[s][2]),r.length=this.map[s][0];l.push(r.slice()),r.length=0;let d=l.pop();for(;d;){for(const m of d)r.push(m);d=l.pop()}this.map.length=0}}function UE(n,r,s,l){let d=0;if(!(s===0&&l.length===0)){for(;d<n.map.length;){if(n.map[d][0]===r){n.map[d][1]+=s,n.map[d][2].push(...l);return}d+=1}n.map.push([r,s,l])}}function PE(n,r){let s=!1;const l=[];for(;r<n.length;){const d=n[r];if(s){if(d[0]==="enter")d[1].type==="tableContent"&&l.push(n[r+1][1].type==="tableDelimiterMarker"?"left":"none");else if(d[1].type==="tableContent"){if(n[r-1][1].type==="tableDelimiterMarker"){const m=l.length-1;l[m]=l[m]==="left"?"center":"right"}}else if(d[1].type==="tableDelimiterRow")break}else d[0]==="enter"&&d[1].type==="tableDelimiterRow"&&(s=!0);r+=1}return l}function FE(){return{flow:{null:{name:"table",tokenize:qE,resolveAll:$E}}}}function qE(n,r,s){const l=this;let d=0,m=0,f;return o;function o(j){let H=l.events.length-1;for(;H>-1;){const K=l.events[H][1].type;if(K==="lineEnding"||K==="linePrefix")H--;else break}const U=H>-1?l.events[H][1].type:null,F=U==="tableHead"||U==="tableRow"?D:c;return F===D&&l.parser.lazy[l.now().line]?s(j):F(j)}function c(j){return n.enter("tableHead"),n.enter("tableRow"),h(j)}function h(j){return j===124||(f=!0,m+=1),p(j)}function p(j){return j===null?s(j):De(j)?m>1?(m=0,l.interrupt=!0,n.exit("tableRow"),n.enter("lineEnding"),n.consume(j),n.exit("lineEnding"),C):s(j):Ve(j)?Xe(n,p,"whitespace")(j):(m+=1,f&&(f=!1,d+=1),j===124?(n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),f=!0,p):(n.enter("data"),u(j)))}function u(j){return j===null||j===124||ot(j)?(n.exit("data"),p(j)):(n.consume(j),j===92?b:u)}function b(j){return j===92||j===124?(n.consume(j),u):u(j)}function C(j){return l.interrupt=!1,l.parser.lazy[l.now().line]?s(j):(n.enter("tableDelimiterRow"),f=!1,Ve(j)?Xe(n,T,"linePrefix",l.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(j):T(j))}function T(j){return j===45||j===58?S(j):j===124?(f=!0,n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),E):L(j)}function E(j){return Ve(j)?Xe(n,S,"whitespace")(j):S(j)}function S(j){return j===58?(m+=1,f=!0,n.enter("tableDelimiterMarker"),n.consume(j),n.exit("tableDelimiterMarker"),v):j===45?(m+=1,v(j)):j===null||De(j)?A(j):L(j)}function v(j){return j===45?(n.enter("tableDelimiterFiller"),_(j)):L(j)}function _(j){return j===45?(n.consume(j),_):j===58?(f=!0,n.exit("tableDelimiterFiller"),n.enter("tableDelimiterMarker"),n.consume(j),n.exit("tableDelimiterMarker"),y):(n.exit("tableDelimiterFiller"),y(j))}function y(j){return Ve(j)?Xe(n,A,"whitespace")(j):A(j)}function A(j){return j===124?T(j):j===null||De(j)?!f||d!==m?L(j):(n.exit("tableDelimiterRow"),n.exit("tableHead"),r(j)):L(j)}function L(j){return s(j)}function D(j){return n.enter("tableRow"),R(j)}function R(j){return j===124?(n.enter("tableCellDivider"),n.consume(j),n.exit("tableCellDivider"),R):j===null||De(j)?(n.exit("tableRow"),r(j)):Ve(j)?Xe(n,R,"whitespace")(j):(n.enter("data"),k(j))}function k(j){return j===null||j===124||ot(j)?(n.exit("data"),R(j)):(n.consume(j),j===92?M:k)}function M(j){return j===92||j===124?(n.consume(j),k):k(j)}}function $E(n,r){let s=-1,l=!0,d=0,m=[0,0,0,0],f=[0,0,0,0],o=!1,c=0,h,p,u;const b=new IE;for(;++s<n.length;){const C=n[s],T=C[1];C[0]==="enter"?T.type==="tableHead"?(o=!1,c!==0&&(Ng(b,r,c,h,p),p=void 0,c=0),h={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},b.add(s,0,[["enter",h,r]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(l=!0,u=void 0,m=[0,0,0,0],f=[0,s+1,0,0],o&&(o=!1,p={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},b.add(s,0,[["enter",p,r]])),d=T.type==="tableDelimiterRow"?2:p?3:1):d&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(l=!1,f[2]===0&&(m[1]!==0&&(f[0]=f[1],u=yo(b,r,m,d,void 0,u),m=[0,0,0,0]),f[2]=s)):T.type==="tableCellDivider"&&(l?l=!1:(m[1]!==0&&(f[0]=f[1],u=yo(b,r,m,d,void 0,u)),m=f,f=[m[1],s,0,0])):T.type==="tableHead"?(o=!0,c=s):T.type==="tableRow"||T.type==="tableDelimiterRow"?(c=s,m[1]!==0?(f[0]=f[1],u=yo(b,r,m,d,s,u)):f[1]!==0&&(u=yo(b,r,f,d,s,u)),d=0):d&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(f[3]=s)}for(c!==0&&Ng(b,r,c,h,p),b.consume(r.events),s=-1;++s<r.events.length;){const C=r.events[s];C[0]==="enter"&&C[1].type==="table"&&(C[1]._align=PE(r.events,s))}return n}function yo(n,r,s,l,d,m){const f=l===1?"tableHeader":l===2?"tableDelimiter":"tableData",o="tableContent";s[0]!==0&&(m.end=Object.assign({},Ms(r.events,s[0])),n.add(s[0],0,[["exit",m,r]]));const c=Ms(r.events,s[1]);if(m={type:f,start:Object.assign({},c),end:Object.assign({},c)},n.add(s[1],0,[["enter",m,r]]),s[2]!==0){const h=Ms(r.events,s[2]),p=Ms(r.events,s[3]),u={type:o,start:Object.assign({},h),end:Object.assign({},p)};if(n.add(s[2],0,[["enter",u,r]]),l!==2){const b=r.events[s[2]],C=r.events[s[3]];if(b[1].end=Object.assign({},C[1].end),b[1].type="chunkText",b[1].contentType="text",s[3]>s[2]+1){const T=s[2]+1,E=s[3]-s[2]-1;n.add(T,E,[])}}n.add(s[3]+1,0,[["exit",u,r]])}return d!==void 0&&(m.end=Object.assign({},Ms(r.events,d)),n.add(d,0,[["exit",m,r]]),m=void 0),m}function Ng(n,r,s,l,d){const m=[],f=Ms(r.events,s);d&&(d.end=Object.assign({},f),m.push(["exit",d,r])),l.end=Object.assign({},f),m.push(["exit",l,r]),n.add(s+1,0,m)}function Ms(n,r){const s=n[r],l=s[0]==="enter"?"start":"end";return s[1][l]}const GE={name:"tasklistCheck",tokenize:WE};function VE(){return{text:{91:GE}}}function WE(n,r,s){const l=this;return d;function d(c){return l.previous!==null||!l._gfmTasklistFirstContentOfListItem?s(c):(n.enter("taskListCheck"),n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),m)}function m(c){return ot(c)?(n.enter("taskListCheckValueUnchecked"),n.consume(c),n.exit("taskListCheckValueUnchecked"),f):c===88||c===120?(n.enter("taskListCheckValueChecked"),n.consume(c),n.exit("taskListCheckValueChecked"),f):s(c)}function f(c){return c===93?(n.enter("taskListCheckMarker"),n.consume(c),n.exit("taskListCheckMarker"),n.exit("taskListCheck"),o):s(c)}function o(c){return De(c)?r(c):Ve(c)?n.check({tokenize:KE},r,s)(c):s(c)}}function KE(n,r,s){return Xe(n,l,"whitespace");function l(d){return d===null?s(d):r(d)}}function YE(n){return S_([SE(),DE(),zE(n),FE(),VE()])}const XE={};function hv(n){const r=this,s=n||XE,l=r.data(),d=l.micromarkExtensions||(l.micromarkExtensions=[]),m=l.fromMarkdownExtensions||(l.fromMarkdownExtensions=[]),f=l.toMarkdownExtensions||(l.toMarkdownExtensions=[]);d.push(YE(s)),m.push(gE()),f.push(_E(s))}const fv=1e3,Ls=new Map;let Ga;function QE(n,r,s){const l=Symbol(n),d=Math.max(fv,s.intervalMs),m=Date.now();return Ls.set(n,{id:n,intervalMs:d,nextRunAt:s.runImmediately===!1?m+d:m,inFlight:!1,run:r,token:l}),JE(),dv(),()=>{const f=Ls.get(n);(f==null?void 0:f.token)===l&&(Ls.delete(n),Ls.size===0&&Ga!==void 0&&(window.clearInterval(Ga),Ga=void 0))}}function JE(){Ga!==void 0||typeof window>"u"||(Ga=window.setInterval(()=>{dv()},fv))}async function dv(){const n=Date.now();for(const r of Ls.values())r.inFlight||r.nextRunAt>n||ZE(r)}async function ZE(n){n.inFlight=!0;try{await n.run()}catch{}finally{const r=Ls.get(n.id);(r==null?void 0:r.token)===n.token&&(r.inFlight=!1,r.nextRunAt=Date.now()+r.intervalMs)}}function Xa(n,r,s){const l=te.useRef(r);te.useEffect(()=>{l.current=r},[r]),te.useEffect(()=>{if(!(!n||s.enabled===!1))return QE(n,()=>l.current(),{intervalMs:s.intervalMs,runImmediately:s.runImmediately})},[n,s.enabled,s.intervalMs,s.runImmediately])}const Ro=`
|
|
91
91
|
|
|
92
92
|
--- Translation ---
|
|
93
|
-
`;function t2({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:l,role:d,sessionId:m,panelState:f,onClearSession:o,onEntry:c,onFailures:h}){const[p,u]=te.useState(""),[b,C]=te.useState(""),[T,E]=te.useState(!1),[S,v]=te.useState(Date.now()),[_,y]=te.useState(!1),[,A]=Hi(""),L=te.useRef(null),D=f.entries,R=f.failures,k=f.status;te.useEffect(()=>{if(!n)return;const O=L.current;if(!O)return;const N=window.requestAnimationFrame(()=>{O.scrollTop=O.scrollHeight});return()=>window.cancelAnimationFrame(N)},[n,D]);const M=c2(D);te.useEffect(()=>{if(!M)return;v(Date.now());const O=window.setInterval(()=>v(Date.now()),250);return()=>window.clearInterval(O)},[M]);async function j(O=!1){const N=p;y(!0),A(""),E(!1);try{const $=await Se.translateUserInput(l,d,{text:N,mode:O?"auto-send":"review-before-send",useContext:!1,send:O});$.sent?(u(""),E(!1)):(u(mv(N,$.englishPreview)),E(!0))}catch($){A(pt("Translate composer input",$))}finally{y(!1)}}async function H(){const O=b.trim();if(O){y(!0),A("");try{const N=await Se.translateManualOutput(l,d,{text:O});c(m,d,N),C("")}catch(N){A(pt("Translate pasted English output",N))}finally{y(!1)}}}async function U(){const O=T?zg(p):p;if(O.trim()){y(!0),A("");try{await Se.sendTranslatedInput(l,d,{englishText:O}),u(""),E(!1)}catch(N){A(pt("Send translated English input to role",N))}finally{y(!1)}}}function F(O){O.key!=="Enter"||O.shiftKey||O.nativeEvent.isComposing||(O.preventDefault(),!_&&p.trim()&&(T?U():j(r)))}async function K(){o(m,d),await Se.clearTranslationSession(m).catch(O=>A(pt("Clear conversation translation panel",O)))}async function Y(){y(!0),A("");try{const O=await Se.ignoreTranslationFailures(m);h(m,d,O.failures)}catch(O){A(pt("Ignore failed conversation translations",O))}finally{y(!1)}}async function G(O){y(!0),A("");try{const N=await Se.retryTranslation(m,O.translationId);c(m,d,N)}catch(N){A(pt("Retry latest failed conversation translation",N))}finally{y(!1)}}const W=u2(D,k,S),Z=R.length,z=i2(R);return x.jsxs("aside",{className:"translation-panel",children:[x.jsxs("header",{className:"translation-panel-header",children:[x.jsxs("div",{className:"translation-panel-titlebar",children:[x.jsx("h2",{children:"Translation"}),x.jsxs("div",{className:"translation-panel-actions",children:[Z>0?x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",disabled:_,onClick:()=>void Y(),children:["Ignore ",Z]}),z?x.jsx("button",{type:"button",disabled:_,onClick:()=>void G(z),children:"Retry latest"}):null]}):null,x.jsx("button",{type:"button",onClick:()=>void K(),children:"Clear"})]})]}),x.jsx("div",{className:"translation-status-row",children:x.jsxs("p",{children:["Claude Code · target ",n2(s)," · ",W]})})]}),x.jsxs("div",{className:"translation-entry-list",ref:L,children:[D.length===0?x.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,D.map(O=>x.jsx(l2,{entry:O},O.id))]}),x.jsxs("div",{className:"translation-composer",children:[x.jsxs("div",{className:"translation-composer-row translation-manual-row",children:[x.jsx("textarea",{value:b,onChange:O=>C(O.target.value),placeholder:"Paste English to translate on demand..."}),x.jsx("div",{className:"translation-composer-actions",children:x.jsx("button",{type:"button",disabled:_||!b.trim(),onClick:()=>void H(),children:"Translate"})})]}),x.jsxs("div",{className:"translation-composer-row",children:[x.jsx("textarea",{value:p,onChange:O=>{u(O.target.value),(!O.target.value.trim()||T&&!d2(O.target.value))&&E(!1)},onKeyDown:F,placeholder:"输入中文,先翻译成英文工程指令..."}),x.jsx("div",{className:"translation-composer-actions",children:x.jsx("button",{type:"button",disabled:_||!T||!zg(p).trim(),onClick:()=>void U(),children:"Send English"})})]})]})]})}function n2(n){var r;return((r=e_.find(s=>s.value===n))==null?void 0:r.label)??n}function i2(n){let r,s=Number.NEGATIVE_INFINITY;for(const l of n){const d=Date.parse(l.failedAt),m=Number.isFinite(d)?d:Number.NEGATIVE_INFINITY;(!r||m>=s)&&(r=l,s=m)}return r}function r2({open:n,taskSlug:r,targetLanguage:s,onClose:l}){const[d,m]=te.useState(!1),[,f]=Hi(""),[o,c]=te.useState(null),[h,p]=te.useState(""),[u,b]=te.useState(""),[C,T]=te.useState(""),[E,S]=te.useState(!1),[v,_]=te.useState(null),[y,A]=te.useState(""),[L,D]=te.useState(""),[R,k]=te.useState(""),[M,j]=te.useState(!1);Xa(n?`file-translation:${h||"none"}`:null,()=>H(!0),{intervalMs:2e3,runImmediately:!0});async function H(G=!1){try{const W=await Se.getTranslationState();c(W);const Z=h?W.fileIndex.jobs.some(z=>z.id===h):!1;if((!h||!Z)&&W.fileIndex.jobs[0])U(W.fileIndex.jobs[0].id);else if(!W.fileIndex.jobs[0])p(""),b(""),T("");else if(G&&h){const z=await Se.readFileTranslation(h);b(z.output),T(z.report)}}catch(W){f(pt("Load file translation list",W))}}async function U(G){p(G),b(""),T("");try{const W=await Se.readFileTranslation(G);b(W.output),T(W.report)}catch(W){f(pt(`Read translated file ${G}`,W))}}async function F(){S(!0),await K(y,L)}async function K(G="",W=""){j(!0),f("");try{const Z=await Se.browseTranslationSourceFiles({path:G,query:W,limit:250});_(Z),A(Z.currentPath),D(W)}catch(Z){f(pt("Browse translation source files",Z))}finally{j(!1)}}async function Y(G=R){const W=G.trim();if(W){m(!0),f("");try{if(!r)throw new Error("Create or select a task before translating files.");const Z=await Se.createFileTranslation({taskSlug:r,sourcePath:W,targetLanguage:s});S(!1),await H(),await U(Z.id)}catch(Z){f(pt(`Create file translation for ${W}`,Z))}finally{m(!1)}}}return n?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:x.jsx(a2,{busy:d,state:o,selectedJobId:h,output:u,report:C,onClose:()=>{S(!1),l()},onRefresh:()=>void H(),onSelectJob:G=>void U(G),onTranslate:()=>void F()})}),E?x.jsx(s2,{busy:d||M,state:v,currentPath:y,query:L,selectedPath:R,onBrowse:(G,W)=>void K(G,W),onClose:()=>S(!1),onQueryChange:D,onSelectPath:k,onTranslate:()=>void Y()}):null]}):null}function s2({busy:n,state:r,currentPath:s,query:l,selectedPath:d,onBrowse:m,onClose:f,onQueryChange:o,onSelectPath:c,onTranslate:h}){const p=(r==null?void 0:r.entries)??[],u=p.filter(C=>C.type==="directory"),b=p.filter(C=>C.type==="file");return x.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:x.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Select Source File"}),x.jsx("p",{children:s||"."})]}),x.jsx("button",{type:"button",onClick:f,children:"Close"})]}),x.jsxs("div",{className:"translation-file-browser-controls",children:[x.jsxs("div",{className:"translation-file-browser-nav",children:[x.jsx("button",{type:"button",disabled:n||!s,onClick:()=>m((r==null?void 0:r.parentPath)??"",""),children:"Up"}),x.jsx("button",{type:"button",disabled:n||!s,onClick:()=>m("",""),children:"Root"})]}),x.jsxs("form",{className:"translation-file-browser-search",onSubmit:C=>{C.preventDefault(),m(s,l)},children:[x.jsx("input",{value:l,onChange:C=>o(C.target.value),placeholder:"Search files"}),x.jsx("button",{type:"submit",disabled:n,children:"Search"}),x.jsx("button",{type:"button",disabled:n||!l,onClick:()=>m(s,""),children:"Clear"})]})]}),x.jsxs("div",{className:"translation-file-browser-layout",children:[x.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?x.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&p.length===0?x.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?x.jsxs("div",{className:"translation-file-browser-group",children:[x.jsx("h3",{children:"Folders"}),u.map(C=>x.jsx(Hg,{entry:C,selected:d===C.path,onBrowse:m,onSelectPath:c},C.path))]}):null,b.length>0?x.jsxs("div",{className:"translation-file-browser-group",children:[x.jsx("h3",{children:"Files"}),b.map(C=>x.jsx(Hg,{entry:C,selected:d===C.path,onBrowse:m,onSelectPath:c},C.path))]}):null,r!=null&&r.truncated?x.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),x.jsxs("aside",{className:"translation-file-browser-selection",children:[x.jsxs("label",{children:[x.jsx("span",{children:"Source path"}),x.jsx("input",{value:d,onChange:C=>c(C.target.value)})]}),x.jsx("button",{type:"button",disabled:n||!d.trim(),onClick:h,children:"Translate File"})]})]})]})})}function Hg({entry:n,selected:r,onBrowse:s,onSelectPath:l}){const d=n.type==="directory";return x.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>d?s(n.path,""):l(n.path),onDoubleClick:()=>d?s(n.path,""):void 0,children:[x.jsx("span",{children:d?"DIR":"FILE"}),x.jsx("strong",{children:n.name}),x.jsx("small",{children:n.path})]})}function a2({busy:n,state:r,selectedJobId:s,output:l,report:d,onClose:m,onRefresh:f,onSelectJob:o,onTranslate:c}){const h=(r==null?void 0:r.fileIndex.jobs)??[],p=h.find(u=>u.id===s);return x.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[x.jsxs("header",{className:"file-translation-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"File Translation"}),x.jsx("p",{children:"Claude Code · 中英互译"})]}),x.jsxs("div",{className:"file-translation-toolbar",children:[x.jsx("button",{type:"button",disabled:n,onClick:c,children:"Translate"}),x.jsx("button",{type:"button",disabled:n,onClick:f,children:"Refresh"}),x.jsx("button",{type:"button",onClick:m,children:"Close"})]})]}),r!=null&&r.memoryInitialized?null:x.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),x.jsxs("div",{className:"file-translation-layout",children:[x.jsxs("div",{className:"file-translation-list",children:[h.length===0?x.jsx("p",{className:"muted",children:"No translated files yet."}):null,h.map(u=>x.jsxs("button",{className:u.id===s?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>o(u.id),children:[x.jsx("strong",{children:u.sourcePath}),x.jsxs("span",{children:[u.status," · ",u.targetLanguage]})]},u.id))]}),x.jsx("div",{className:"file-translation-preview",children:p?x.jsxs(x.Fragment,{children:[x.jsxs("header",{children:[x.jsx("strong",{children:p.sourcePath}),x.jsx("span",{children:p.status})]}),x.jsx("div",{className:"translation-markdown",children:x.jsx(P_,{remarkPlugins:[hv],children:l||d||"Translation output is not available yet."})})]}):x.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function l2({entry:n}){if(n.sourceKind==="conversation-boundary")return x.jsx(o2,{entry:n});const r=f2(n),s=n.sourceKind==="tool-output",l=n.direction==="user-input-to-english",d=["translation-entry",`is-${n.sourceKind}`,l?"is-user-input":""].filter(Boolean).join(" ");return x.jsxs("article",{className:d,children:[s?x.jsx("pre",{children:r}):x.jsx("div",{className:"translation-markdown",children:x.jsx(P_,{remarkPlugins:[hv],children:r})}),n.warning?x.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?x.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function o2({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,l=m2(n.occurredAt??n.createdAt);return x.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${l}`,children:[x.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),x.jsx("span",{children:r}),x.jsxs("span",{children:["第 ",s," 轮"]}),x.jsx("time",{children:l}),x.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function c2(n){const r=n.find(pv);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function u2(n,r,s){const l=n.find(pv);if(l)return`translating ${p2(Math.max(0,s-h2(l)))}`;const d=n.at(-1);return(d==null?void 0:d.status)==="failed"||r==="failed"?"error":r}function pv(n){return n.status==="queued"||n.status==="translating"}function h2(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function f2(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?mv(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function mv(n,r){return`${n.trimEnd()}${Ro}${r.trimStart()}`}function d2(n){return n.includes(Ro)}function zg(n){const r=n.indexOf(Ro);return r===-1?n:n.slice(r+Ro.length)}function p2(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),l=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${l}`}function m2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}const g2=8;function _2(){const[n,r]=te.useState([]);return te.useEffect(()=>{const s=m=>{var c,h;const f=(h=(c=m.detail)==null?void 0:c.message)==null?void 0:h.trim();if(!f)return;const o=new Date().toISOString();r(p=>{const u=p.find(b=>b.message===f);return u?[{...u,count:u.count+1,updatedAt:o},...p.filter(b=>b.id!==u.id)]:[{id:`ui_error_${Date.now()}_${Math.random().toString(16).slice(2)}`,message:f,count:1,createdAt:o,updatedAt:o},...p].slice(0,g2)})},l=m=>{var o;const f=((o=m.detail)==null?void 0:o.actions)??[];f.length!==0&&r(c=>c.filter(h=>!f.some(p=>h.message.startsWith(`${p} failed.`))))},d=m=>{var o,c;const f=(c=(o=m.detail)==null?void 0:o.message)==null?void 0:c.trim();f&&r(h=>h.filter(p=>p.message!==f))};return window.addEventListener(uh,s),window.addEventListener(hh,l),window.addEventListener(fh,d),()=>{window.removeEventListener(uh,s),window.removeEventListener(hh,l),window.removeEventListener(fh,d)}},[]),n.length===0?null:x.jsxs("aside",{className:"ui-error-center",role:"alert","aria-live":"polite","aria-label":"Application errors",children:[x.jsxs("header",{className:"ui-error-center-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Errors"}),x.jsxs("p",{children:[n.length," active"]})]}),x.jsx("button",{type:"button",onClick:()=>r([]),children:"Clear"})]}),x.jsx("ol",{className:"ui-error-list",children:n.map(s=>x.jsxs("li",{children:[x.jsxs("div",{children:[x.jsx("p",{children:s.message}),x.jsxs("span",{children:[v2(s.updatedAt),s.count>1?` · repeated ${s.count} times`:""]})]}),x.jsx("button",{type:"button","aria-label":"Dismiss error",onClick:()=>r(l=>l.filter(d=>d.id!==s.id)),children:"Close"})]},s.id))})]})}function v2(n){return new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function y2(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}function S2(n){if(!(n.mode!=="auto"||n.status!=="running")&&!(!n.activeRole||n.activeRole===n.lastFollowedRole))return n.activeRole}function b2(n,r){var d;if(!((d=n.flowPause)!=null&&d.paused)||n.flowPause.reason==="awaiting-user")return null;const s=n.activeRole??"role",l=n.roleRecovery;return n.flowPause.reason==="role-recovery-failed"&&l?r(l,s):`No new turn started after ${s} stopped.`}const C2=3,w2=3e4,wo=new Map;function gv(n,r){const s=pt(n,r);if(!x2(r))return wo.set(n,{consecutiveFailures:1,lastMessage:s,lastReportedAt:Date.now()}),s;const l=wo.get(n),d=((l==null?void 0:l.consecutiveFailures)??0)+1,m=Date.now(),f=d>=C2&&(!l||l.lastMessage!==s||m-l.lastReportedAt>=w2);return wo.set(n,{consecutiveFailures:d,lastMessage:s,lastReportedAt:f?m:(l==null?void 0:l.lastReportedAt)??0}),f?s:null}function Do(n){wo.delete(n),u1([n])}function x2(n){const r=Lo(n);return r.includes("could not reach the VCM backend")||r.includes("Failed to fetch")||r.includes("NetworkError")||r.includes("Load failed")||r.includes("ERR_CONNECTION")}const E2=["architecture-plan","validation-adequacy","final-diff"];function k2({events:n,maxEvents:r=8,showHeader:s=!0}){const l=r===null?n:n.slice(-r);return x.jsxs("section",{className:"event-log",children:[s?x.jsx("h2",{children:"Events"}):null,n.length===0?x.jsx("p",{className:"muted",children:"No terminal events yet."}):x.jsx("ol",{children:l.map((d,m)=>x.jsx("li",{children:d},`${d}-${m}`))})]})}function hi({checked:n,className:r,disabled:s,label:l,stateLabel:d,title:m,onChange:f}){const o=["switch-control",n?"is-on":"is-off",r].filter(Boolean).join(" "),c=d??(n?"on":"off");return x.jsxs("button",{type:"button",role:"switch","aria-checked":n,"aria-label":`${l}: ${c}`,className:o,disabled:s,title:m,onClick:()=>f(!n),children:[x.jsx("span",{className:"switch-control-label",children:l}),x.jsx("span",{className:"switch-control-track","aria-hidden":"true",children:x.jsx("span",{className:"switch-control-thumb"})})]})}function A2({status:n,bootstrapStatus:r,applyResult:s,hasActiveTask:l=!1,autoTaskHarnessReviewEnabled:d,busy:m=!1,onRefresh:f,onApply:o,onOpenStudio:c,onOpenRepositoryDiff:h,onAutoTaskHarnessReviewChange:p,onStartBootstrap:u,onRestartBootstrap:b,onStopBootstrap:C,onRunBootstrap:T}){const[E,S]=te.useState(!1),[v,_]=te.useState("bypassPermissions"),[y,A]=te.useState("default"),[L,D]=te.useState("default"),R=r==null?void 0:r.session,k=(r==null?void 0:r.status)==="running",M=(R==null?void 0:R.status)==="running",j=(r==null?void 0:r.status)!=="complete",H={permissionMode:v,model:y,effort:L};return l?n?x.jsxs("section",{className:"harness-panel",children:[x.jsxs("div",{className:"harness-stage",children:[x.jsxs("div",{className:"harness-panel-header",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Fixed install"}),x.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),x.jsx("div",{className:"harness-actions",children:n.initialized?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",disabled:m,onClick:()=>void f(),children:"Refresh"}),n.needsApply?x.jsx("button",{type:"button",disabled:m,onClick:()=>void o(),children:"Update"}):null]}):x.jsx("button",{type:"button",disabled:m,onClick:()=>void o(),children:"Initialize"})})]}),n.initialized&&n.needsApply?x.jsxs(x.Fragment,{children:[x.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),x.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(U=>x.jsxs("li",{children:[x.jsx("span",{children:U.path}),x.jsx(Ni,{status:U.action})]},`${U.path}:${U.action}`))})]}):null]}),x.jsxs("div",{className:"harness-stage",children:[x.jsxs("div",{className:"harness-panel-header",children:[x.jsx("div",{children:x.jsx("strong",{children:"Harness Studio"})}),x.jsx("div",{className:"harness-actions",children:x.jsx("button",{type:"button",disabled:m,onClick:c,children:"Open Studio"})})]}),x.jsx("button",{className:"harness-review-diff-button",type:"button",disabled:m,onClick:h,children:"Review Diff"}),x.jsx(hi,{checked:d,className:"sidebar-switch",disabled:m,label:"Auto task harness review",title:"Automatically ask Harness Engineer to review task harness after final acceptance completes",onChange:p})]}),j?x.jsx("div",{className:"harness-stage",children:x.jsxs("div",{className:"harness-panel-header",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Bootstrap"}),x.jsx("p",{className:"muted",children:r?T2(r.status):"not loaded"})]}),x.jsx("div",{className:"harness-actions",children:x.jsx("button",{type:"button",disabled:m||!(r!=null&&r.canStart),onClick:()=>{S(!0)},children:"Open Bootstrap"})})]})}):null,s!=null&&s.changedFiles.length?x.jsx("div",{className:"harness-result",children:x.jsx("p",{className:"muted",children:s.message})}):null,n.warnings.length>0?x.jsx("ul",{className:"warnings",children:n.warnings.map(U=>x.jsx("li",{children:U},U))}):null,r!=null&&r.warnings.length?x.jsx("ul",{className:"warnings",children:r.warnings.map(U=>x.jsx("li",{children:U},U))}):null,j&&E?x.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness Engineer bootstrap session",children:x.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[x.jsxs("header",{className:"harness-bootstrap-modal-header",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Harness Engineer Bootstrap"}),x.jsx("p",{className:"muted",children:(R==null?void 0:R.command)??"Start Harness Engineer, then run bootstrap when ready."})]}),x.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[R?x.jsx(Ni,{status:R.status}):null,x.jsx("button",{type:"button",onClick:()=>S(!1),children:"Close"})]})]}),x.jsxs("div",{className:"harness-bootstrap-controls",children:[x.jsxs("label",{children:[x.jsx("span",{children:"Permission"}),x.jsx("select",{value:v,disabled:m||k||M,onChange:U=>_(U.target.value),children:n_.map(U=>x.jsx("option",{value:U.value,children:U.label},U.value))})]}),x.jsxs("label",{children:[x.jsx("span",{children:"Model"}),x.jsx("select",{value:y,disabled:m||k||M,onChange:U=>A(U.target.value),children:i_.map(U=>x.jsx("option",{value:U.value,children:U.label},U.value))})]}),x.jsxs("label",{children:[x.jsx("span",{children:"Effort"}),x.jsx("select",{value:L,disabled:m||k||M,onChange:U=>D(U.target.value),children:r_.map(U=>x.jsx("option",{value:U.value,children:U.label},U.value))})]}),x.jsxs("div",{className:"harness-bootstrap-control-actions",children:[x.jsx("button",{type:"button",disabled:m||k||!(r!=null&&r.canStart),onClick:()=>void u(H),children:"Start"}),x.jsx("button",{type:"button",disabled:m||k||!(r!=null&&r.canStart),onClick:()=>void b(H),children:"Restart"}),x.jsx("button",{type:"button",disabled:m||!R,onClick:()=>void C(),children:"Stop"}),x.jsx("button",{type:"button",disabled:m||k||!M,onClick:()=>void T(),children:"Run bootstrap"})]})]}),x.jsx("div",{className:"harness-bootstrap-terminal",children:M?x.jsx(Oo,{sessionId:R.id,active:E}):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:"Harness Bootstrap"}),x.jsx("span",{children:"Start Harness Engineer first. When it is ready, click Run bootstrap to send the prompt."})]})})]})}):null]}):null:x.jsx("section",{className:"harness-panel",children:x.jsxs("div",{className:"harness-result",children:[x.jsx("strong",{children:"Task required"}),x.jsx("p",{className:"muted",children:"Create or select a task before changing VCM Harness. Harness changes are committed in the active task worktree."})]})})}function T2(n){return n.replaceAll("_"," ")}function Xh(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function R2(n,r=6){const s=[...n].sort(L2).map((d,m)=>({message:d,sequence:m+1}));return[...r===null?s:s.slice(-r)].sort((d,m)=>m.sequence-d.sequence)}function D2({messages:n,orchestration:r,busy:s,maxMessages:l=6,showControls:d=!0,showHeader:m=!0,onModeChange:f,onMarkAllDone:o}){const[c,h]=te.useState(null),p=Xh(n),u=(r==null?void 0:r.mode)??"auto",b=R2(n,l);async function C(T){await O2(T.body),h(T.id),window.setTimeout(()=>h(E=>E===T.id?null:E),1200)}return x.jsxs("section",{className:"message-panel",children:[m?x.jsxs("div",{className:"message-panel-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Messages"}),x.jsxs("p",{className:"muted",children:[p.total," total / ",p.accepted," accepted"]})]}),d&&f?x.jsx("div",{className:"message-controls",children:x.jsx(hi,{checked:u==="auto",className:"message-mode-toggle",disabled:s,label:"Auto orchestration",onChange:T=>f(T?"auto":"manual")})}):null,d&&o?x.jsx("button",{type:"button",disabled:s,onClick:o,children:"Mark All Done"}):null]}):null,n.length===0?x.jsx("p",{className:"muted",children:"No role messages yet."}):x.jsx("ol",{className:"message-list",children:b.map(({message:T,sequence:E})=>x.jsxs("li",{className:"message-item",children:[x.jsxs("div",{className:"message-item-main",children:[x.jsxs("div",{className:"message-meta",children:[x.jsxs("span",{className:"message-sequence",children:["#",E]}),x.jsx("time",{dateTime:Mo(T),children:M2(Mo(T))}),x.jsxs("strong",{children:[T.fromRole," ","->"," ",T.toRole]}),x.jsx("span",{children:T.type})]}),x.jsx("p",{children:T.body}),T.failureReason?x.jsx("span",{className:"message-reason",children:T.failureReason}):null,T.bodyPath?x.jsx("span",{className:"message-path",children:T.bodyPath}):null]}),x.jsx("div",{className:"message-actions",children:x.jsx("button",{type:"button",disabled:s,onClick:()=>void C(T),children:c===T.id?"Copied":"Copy"})})]},T.id))})]})}function M2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Mo(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function L2(n,r){const s=Mo(n).localeCompare(Mo(r));if(s!==0)return s;const l=n.createdAt.localeCompare(r.createdAt);return l!==0?l:n.id.localeCompare(r.id)}async function O2(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function B2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:l}){const[d,m]=te.useState(n);te.useEffect(()=>{n&&m(n)},[n]);async function f(o){o.preventDefault(),await l(d)}return x.jsx("form",{className:"repo-connect",onSubmit:f,children:x.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[x.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:d,onChange:o=>m(o.target.value),placeholder:"/path/to/repo"}),r.length>0?x.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:o=>{o.target.value&&m(o.target.value)},children:[x.jsx("option",{value:"",children:"Recent"}),r.map(o=>x.jsx("option",{value:o,children:o},o))]}):null,x.jsx("button",{type:"submit",disabled:s||!d.trim(),children:"Connect"})]})})}function j2({tasks:n,activeTaskSlug:r,onSelect:s}){return x.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(l=>x.jsxs("button",{className:l.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(l.taskSlug),children:[x.jsx("span",{children:l.title||l.taskSlug}),x.jsx(Ni,{status:l.status})]},l.taskSlug))})}function N2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:l,messages:d,orchestration:m,events:f,roundState:o,gateReview:c,translationEnabled:h,translationAutoSendEnabled:p,translationTargetLanguage:u,translationOutputMode:b,translationMemoryInitialized:C,translatorSession:T,harnessStatus:E,harnessBootstrapStatus:S,harnessApplyResult:v,autoTaskHarnessReviewEnabled:_,gatewayStatus:y,gatewayQrLogin:A,gatewayQrCheck:L,gatewayLarkRegistration:D,gatewayLarkRegistrationCheck:R,busy:k,onConnect:M,onRefreshConnectedRepository:j,onPullConnectedRepository:H,onRefreshHarness:U,onApplyHarness:F,onStartHarnessBootstrap:K,onRestartHarnessBootstrap:Y,onStopHarnessBootstrap:G,onRunHarnessBootstrap:W,onOpenHarnessStudio:Z,onOpenRepositoryDiff:z,onAutoTaskHarnessReviewChange:O,onRefreshGateway:N,onGatewayEnabledChange:$,onGatewaySettingsChange:I,onGatewayTranslationChange:re,onStartGatewayQrLogin:ve,onStartGatewayLarkRegistration:pe,onResetGatewayBinding:Q,onGateReviewGateEnabledChange:q,onTranslationEnabledChange:ee,onTranslationAutoSendChange:ae,onTranslationTargetLanguageChange:de,onTranslationOutputModeChange:se,onOpenFileTranslation:we,onOpenTranslatorSession:je,onCreateTranslationBootstrap:He,onUpdateTranslationMemory:Pe,onCreateTask:xe,onCloseTask:xt,onSelectTask:yt,themeMode:Et,onAutoOrchestrationChange:an,onThemeModeChange:Cn,pauseAlertSound:St,onPauseAlertSoundChange:tt,roleRetryEnabled:Lt,onRoleRetryEnabledChange:he,permissionRequestMode:ye,onPermissionRequestModeChange:Ae,launchTemplate:Me,canSaveLaunchTemplate:Oe,canOneClickStart:ft,onSaveLaunchTemplate:Fe,onOneClickStart:gt,onMarkAllMessagesDone:mt,onDeleteMessageHistory:Ot}){const[Qe,en]=te.useState(""),[Bt,ln]=te.useState(!1),[Gn,Vn]=te.useState(!1),[zt,on]=te.useState(()=>l?null:"repository"),Wn=Xh(d),Vt=Qe.trim(),Is=U2(n,l,E),Wt=s.filter(ze=>ze.cleanupStatus!=="cleaned"),wn=Wt.find(ze=>ze.taskSlug===l)??null;te.useEffect(()=>{on(ze=>!l&&ze===null?n?"task":"repository":ze)},[l,n]);function It(ze,di){on(di?ze:null)}async function Ii(ze){ze.preventDefault(),await xe({taskSlug:Vt}),en("")}return x.jsxs("div",{className:"project-dashboard",children:[x.jsx("header",{className:"brand-header",children:x.jsx("strong",{children:"VibeCodingMaster"})}),x.jsx(Nr,{title:"Repository",open:zt==="repository",onOpenChange:ze=>{It("repository",ze),ze&&n&&j()},children:x.jsxs("div",{className:"repository-panel",children:[x.jsx(B2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:k,onConnect:M}),n?x.jsx($2,{busy:k,project:n,onPull:H}):null]})}),x.jsx(Nr,{title:"Settings",open:zt==="settings",onOpenChange:ze=>It("settings",ze),children:x.jsxs("div",{className:"sidebar-settings",children:[x.jsxs("button",{"aria-label":`Theme mode: ${Ug(Et)}`,className:"settings-toggle theme-mode-toggle",disabled:k,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>Cn(Y2(Et)),children:[x.jsx("span",{children:"Theme"}),x.jsx("span",{children:Ug(Et)})]}),x.jsx(hi,{checked:((m==null?void 0:m.mode)??"auto")==="auto",className:"sidebar-switch",disabled:k||!l,label:"Auto orchestration",title:l?"Automatically dispatch role messages during the active task":"Create or select a task first",onChange:an}),x.jsx(hi,{checked:St,className:"sidebar-switch",disabled:k,label:"Pause alert sound",title:"Play a sound when VCM shows the fixed flow pause dialog",onChange:ze=>tt(ze)}),x.jsx(hi,{checked:Lt,className:"sidebar-switch",disabled:k,label:"CC auto retry",title:"Retry temporary Claude Code turn failures before showing the flow pause alert",onChange:ze=>he(ze)}),x.jsxs("label",{className:"settings-select-row",children:[x.jsx("span",{children:"Permission requests"}),x.jsxs("select",{value:ye,disabled:k,onChange:ze=>Ae(ze.target.value),children:[x.jsx("option",{value:"off",children:"off"}),x.jsx("option",{value:"allowAll",children:"allow all"})]})]}),x.jsxs("button",{className:"settings-toggle",disabled:k||!Oe,title:"Save the current core role launch settings and optional Gate Reviewer settings",type:"button",onClick:Fe,children:[x.jsx("span",{children:"Save launch template"}),x.jsx("span",{children:Oe?"ready":"open task"})]}),ft?x.jsxs("button",{className:"settings-toggle is-active",disabled:k,title:H2(Me),type:"button",onClick:gt,children:[x.jsx("span",{children:"One-click start"}),x.jsx("span",{children:_v(Me)})]}):null,l?x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",onClick:()=>ln(!0),children:[x.jsx("span",{children:"Messages"}),x.jsxs("span",{className:"muted",children:[Wn.total," total"]})]}),x.jsxs("button",{type:"button",onClick:()=>Vn(!0),children:[x.jsx("span",{children:"Events"}),x.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),x.jsx(Nr,{title:"Translation",open:zt==="translation",onOpenChange:ze=>It("translation",ze),children:x.jsx(z2,{busy:k,enabled:h,autoSendEnabled:p,targetLanguage:u,outputMode:b,memoryInitialized:C,baseUnavailableReason:Is,translatorSession:T,onAutoSendChange:ae,onCreateBootstrap:He,onEnabledChange:ee,onUpdateMemory:Pe,onTargetLanguageChange:de,onOutputModeChange:se,onOpenFileTranslation:we,onOpenTranslatorSession:je})}),n&&l?x.jsx(Nr,{title:"Gate Review Gates",open:zt==="gate-review-gates",onOpenChange:ze=>It("gate-review-gates",ze),children:x.jsx(P2,{busy:k,state:c,onGateEnabledChange:q})}):null,x.jsx(Nr,{title:"Gateway",open:zt==="gateway",onOpenChange:ze=>{It("gateway",ze),ze&&N()},children:x.jsx(q2,{busy:k,qrCheck:L,qrLogin:A,larkRegistration:D,larkRegistrationCheck:R,status:y,onEnabledChange:$,onSettingsChange:I,onResetBinding:Q,onStartLarkRegistration:pe,onStartQrLogin:ve,onTranslationChange:re})}),n?x.jsx(Nr,{title:"VCM Harness",open:zt==="vcm-harness",onOpenChange:ze=>It("vcm-harness",ze),children:x.jsx(A2,{status:E,bootstrapStatus:S,applyResult:v,hasActiveTask:!!wn,autoTaskHarnessReviewEnabled:_,busy:k,onRefresh:U,onApply:F,onOpenStudio:Z,onOpenRepositoryDiff:z,onAutoTaskHarnessReviewChange:O,onStartBootstrap:K,onRestartBootstrap:Y,onStopBootstrap:G,onRunBootstrap:W})}):null,n?x.jsx(Nr,{title:"Task",open:zt==="task",onOpenChange:ze=>It("task",ze),children:Wt.length>0?x.jsxs("div",{className:"task-panel",children:[x.jsx(j2,{tasks:Wt,activeTaskSlug:l,onSelect:yt}),wn?x.jsx("div",{className:"task-panel-actions",children:x.jsx("button",{className:"danger-button",disabled:k,type:"button",onClick:xt,children:"Close Task"})}):null]}):x.jsx("div",{className:"task-create",children:x.jsxs("form",{onSubmit:Ii,children:[x.jsx("input",{value:Qe,onChange:ze=>en(ze.target.value),placeholder:"task name"}),x.jsxs("div",{className:"task-create-preview",children:[x.jsxs("small",{children:["branch: ",Vt?`feature/${Vt}`:"feature/<task>"]}),x.jsxs("small",{children:["worktree: ",Vt?`.claude/worktrees/${Vt}`:".claude/worktrees/<task>"]})]}),x.jsx("button",{type:"submit",disabled:k||!Vt,children:"Create"})]})})}):null,n&&wn?x.jsx(W2,{task:wn,roundState:o}):null,Bt?x.jsx(Q2,{busy:k,messages:d,orchestration:m,onClose:()=>ln(!1),onMarkAllDone:()=>{l&&mt(l)},onDeleteMessageHistory:()=>{l&&Ot(l)}}):null,Gn?x.jsx(X2,{events:f,onClose:()=>Vn(!1)}):null]})}function _v(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function H2(n){const r=Object.entries(n.roles).map(([s,l])=>`${s}: ${l.permissionMode} / ${l.model} / ${l.effort}`).join("; ");return`Launch template: ${_v(n)}; ${r}`}function z2({autoSendEnabled:n,baseUnavailableReason:r,busy:s,enabled:l,memoryInitialized:d,outputMode:m,targetLanguage:f,translatorSession:o,onAutoSendChange:c,onCreateBootstrap:h,onEnabledChange:p,onUpdateMemory:u,onOutputModeChange:b,onTargetLanguageChange:C,onOpenFileTranslation:T,onOpenTranslatorSession:E}){const S=!!(s||r),v=(o==null?void 0:o.status)==="running",_=!!(l&&!r&&v),y=r??(v?null:"Start Translator session first."),A=!!(s||y),D=r??"Open Translator session",R=y??"Translation tools are ready";return x.jsxs("div",{className:"sidebar-settings",children:[x.jsx(hi,{checked:_,className:"sidebar-switch",disabled:S||!v,label:"Conversation translation",title:R,onChange:p}),x.jsx(hi,{checked:n,className:"sidebar-switch",disabled:S,label:"Auto-send",onChange:c}),x.jsxs("label",{className:"settings-select-row",children:[x.jsx("span",{children:"Language"}),x.jsx("select",{value:f,disabled:S,onChange:k=>C(k.target.value),children:e_.map(k=>x.jsx("option",{value:k.value,children:k.label},k.value))})]}),x.jsxs("label",{className:"settings-select-row",children:[x.jsx("span",{children:"Reply scope"}),x.jsx("select",{value:m,disabled:S,onChange:k=>b(k.target.value),children:e1.map(k=>x.jsx("option",{value:k.value,children:k.label},k.value))})]}),x.jsxs("button",{className:"settings-toggle",disabled:A,title:R,type:"button",onClick:T,children:[x.jsx("span",{children:"File translation"}),x.jsx("span",{children:"open"})]}),d?null:x.jsxs("button",{className:"settings-toggle",disabled:A,title:R,type:"button",onClick:h,children:[x.jsx("span",{children:"Bootstrap"}),x.jsx("span",{children:"run"})]}),x.jsxs("button",{className:"settings-toggle",disabled:A,title:R,type:"button",onClick:u,children:[x.jsx("span",{children:"Update memory"}),x.jsx("span",{children:"run"})]}),y?x.jsx("p",{className:"settings-help-text",children:y}):null,x.jsxs("div",{className:"settings-status-row",children:[x.jsx("span",{children:"Session status"}),x.jsx("strong",{children:I2(o)})]}),x.jsxs("button",{className:"settings-toggle",disabled:S,title:D,type:"button",onClick:E,children:[x.jsx("span",{children:"Open Session"}),x.jsx("span",{children:"open"})]})]})}function I2(n){return n?n.status==="running"?n.activityStatus??"idle":n.status:"not started"}function U2(n,r,s){return n?r?s?s.initialized?null:"Initialize VCM Harness first.":"Load VCM Harness status first.":"Create or select a task first.":"Connect a repository first."}function P2({busy:n,onGateEnabledChange:r,state:s}){return x.jsx("div",{className:"sidebar-settings",children:E2.map(l=>{const d=s==null?void 0:s.gates[l],m=!!(d!=null&&d.required);return x.jsx(hi,{checked:m,className:"sidebar-switch",disabled:n||!s,label:F2(l),title:d!=null&&d.status?`status: ${d.status}`:void 0,onChange:f=>r(l,f)},l)})})}function F2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function q2({busy:n,larkRegistration:r,larkRegistrationCheck:s,onEnabledChange:l,onResetBinding:d,onSettingsChange:m,onStartLarkRegistration:f,onStartQrLogin:o,onTranslationChange:c,qrCheck:h,qrLogin:p,status:u}){const b=(u==null?void 0:u.channel)==="lark",C=(u==null?void 0:u.channel)==="lark"?!!(u.binding.appIdConfigured&&u.binding.appSecretConfigured):!!(u!=null&&u.binding.tokenConfigured),T=(u==null?void 0:u.channel)==="lark"?!!(u.binding.appIdConfigured&&u.binding.appSecretConfigured):!!(u!=null&&u.binding.tokenConfigured);return x.jsxs("div",{className:"gateway-panel",children:[x.jsxs("label",{className:"compact-field",children:[x.jsx("span",{children:"Channel"}),x.jsxs("select",{disabled:n||!u,value:(u==null?void 0:u.channel)??"weixin-ilink",onChange:E=>{m({channel:E.currentTarget.value==="lark"?"lark":"weixin-ilink"})},children:[x.jsx("option",{value:"weixin-ilink",children:"Weixin iLink"}),x.jsx("option",{value:"lark",children:"Lark"})]})]}),x.jsxs("div",{className:"gateway-actions",children:[x.jsx(hi,{checked:!!(u!=null&&u.enabled),className:"sidebar-switch",disabled:n||!u||!u.enabled&&!C,label:"Gateway",title:C?"Enable or disable PM messages and task-changing Gateway commands":"Configure the selected Gateway channel first",onChange:E=>l(E)}),x.jsx(hi,{checked:!!(u!=null&&u.translationEnabled),className:"sidebar-switch",disabled:n||!u,label:"Translation",onChange:E=>c(E)}),b?x.jsx("button",{type:"button",disabled:n,onClick:f,children:"Start QR Setup"}):T?x.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:d,children:"Reset Binding"}):x.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),b?x.jsxs("div",{className:"gateway-lark-settings",children:[x.jsx("p",{className:"muted",children:u!=null&&u.binding.appIdConfigured&&u.binding.appSecretConfigured?`Lark app configured${u.binding.larkBotName?` · ${u.binding.larkBotName}`:""}.`:"Use QR setup to create and configure the Lark bot automatically."}),r?x.jsxs("p",{className:"muted",children:["QR setup: ",(s==null?void 0:s.status)??r.status,s!=null&&s.message?` · ${s.message}`:""]}):null]}):p?x.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,!b&&h?x.jsxs("p",{className:"muted",children:["QR status: ",h.status,h.message?` · ${h.message}`:""]}):null]})}function $2({busy:n,onPull:r,project:s}){const l=s.pullDisabledReason,d=!!s.canPull;return x.jsxs("div",{className:"project-summary",children:[x.jsxs("dl",{children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Base path"}),x.jsx("dd",{children:s.repoRoot})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Branch"}),x.jsx("dd",{children:G2(s)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Remote"}),x.jsx("dd",{children:s.upstreamBranch??"no upstream"})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Status"}),x.jsx("dd",{children:V2(s)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Commit"}),x.jsx("dd",{children:s.shortHeadCommit??s.headCommit??"unknown"})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Working tree"}),x.jsx("dd",{children:s.isDirty?"uncommitted changes":"clean"})]})]}),x.jsxs("div",{className:"connected-repo-actions",children:[x.jsx("button",{type:"button",disabled:n||!d,title:l??"Pull latest changes with git pull --ff-only",onClick:()=>void r(),children:"Pull"}),x.jsx("span",{className:"muted",children:s.checkedAt?`checked ${Ah(s.checkedAt)}`:"status not refreshed"})]}),l?x.jsx("p",{className:"muted",children:l}):null,s.warnings.length>0?x.jsx("ul",{className:"warnings",children:s.warnings.map(m=>x.jsx("li",{children:m},m))}):null]})}function G2(n){return n.branch||"unknown"}function V2(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function W2({roundState:n,task:r}){var p;const[s,l]=te.useState(()=>Date.now()),d=!!(n!=null&&n.startedAt),m=vv(r.createdAt,s),f=Ig(n,(n==null?void 0:n.totalCcActiveMs)??0,s),o=d&&n?Ig(n,n.currentRoundCcActiveMs,s):0,c=d&&n?K2(n,s):0,h=((p=r.title)==null?void 0:p.trim())||r.taskSlug;return te.useEffect(()=>{const u=window.setInterval(()=>l(Date.now()),1e3);return()=>window.clearInterval(u)},[]),x.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[x.jsxs("div",{className:"task-status-dock-title",children:[x.jsx("strong",{title:h,children:h}),x.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),x.jsxs("dl",{className:"task-status-stats",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Session start"}),x.jsx("dd",{children:Ah(r.createdAt)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Session total"}),x.jsx("dd",{children:So(m)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Rounds"}),x.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Role runtime"}),x.jsx("dd",{children:So(f)})]})]}),d&&n?x.jsxs("div",{className:"current-round-status",children:[x.jsxs("div",{className:"current-round-title",children:[x.jsx("span",{children:n.status==="running"?"Current Round":"Last Round"}),x.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),x.jsxs("dl",{className:"task-status-stats",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Started"}),x.jsx("dd",{children:Ah(n.startedAt)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Total"}),x.jsx("dd",{children:So(c)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Role runtime"}),x.jsx("dd",{children:So(o)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Turn count"}),x.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function Ig(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const l=Date.parse(n.updatedAt);return Number.isFinite(l)?r+Math.max(0,s-l):r}function K2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return vv(n.startedAt??"",Number.isFinite(s)?s:r)}function vv(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function Ah(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function So(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),l=Math.floor(r%3600/60),d=r%60;return s>0?l>0?`${s}h ${l}m`:`${s}h`:l>0?d>0?`${l}m ${d}s`:`${l}m`:`${d}s`}function Y2(n){return n==="system"?"light":n==="light"?"dark":"system"}function Ug(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function X2({events:n,onClose:r}){return x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Events"}),x.jsxs("p",{className:"muted",children:[n.length," total"]})]}),x.jsx("button",{type:"button",onClick:r,children:"Close"})]}),x.jsx(k2,{events:n,maxEvents:null,showHeader:!1})]})})}function Q2({busy:n,messages:r,orchestration:s,onClose:l,onMarkAllDone:d,onDeleteMessageHistory:m}){const f=Xh(r);function o(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
93
|
+
`;function e2({active:n=!0,autoSendEnabled:r,targetLanguage:s,taskSlug:l,role:d,sessionId:m,panelState:f,onClearSession:o,onEntry:c,onFailures:h}){const[p,u]=te.useState(""),[b,C]=te.useState(""),[T,E]=te.useState(!1),[S,v]=te.useState(Date.now()),[_,y]=te.useState(!1),[,A]=Hi(""),L=te.useRef(null),D=f.entries,R=f.failures,k=f.status;te.useEffect(()=>{if(!n)return;const O=L.current;if(!O)return;const N=window.requestAnimationFrame(()=>{O.scrollTop=O.scrollHeight});return()=>window.cancelAnimationFrame(N)},[n,D]);const M=o2(D);te.useEffect(()=>{if(!M)return;v(Date.now());const O=window.setInterval(()=>v(Date.now()),250);return()=>window.clearInterval(O)},[M]);async function j(O=!1){const N=p;y(!0),A(""),E(!1);try{const $=await Se.translateUserInput(l,d,{text:N,mode:O?"auto-send":"review-before-send",useContext:!1,send:O});$.sent?(u(""),E(!1)):(u(mv(N,$.englishPreview)),E(!0))}catch($){A(pt("Translate composer input",$))}finally{y(!1)}}async function H(){const O=b.trim();if(O){y(!0),A("");try{const N=await Se.translateManualOutput(l,d,{text:O});c(m,d,N),C("")}catch(N){A(pt("Translate pasted English output",N))}finally{y(!1)}}}async function U(){const O=T?zg(p):p;if(O.trim()){y(!0),A("");try{await Se.sendTranslatedInput(l,d,{englishText:O}),u(""),E(!1)}catch(N){A(pt("Send translated English input to role",N))}finally{y(!1)}}}function F(O){O.key!=="Enter"||O.shiftKey||O.nativeEvent.isComposing||(O.preventDefault(),!_&&p.trim()&&(T?U():j(r)))}async function K(){o(m,d),await Se.clearTranslationSession(m).catch(O=>A(pt("Clear conversation translation panel",O)))}async function Y(){y(!0),A("");try{const O=await Se.ignoreTranslationFailures(m);h(m,d,O.failures)}catch(O){A(pt("Ignore failed conversation translations",O))}finally{y(!1)}}async function G(O){y(!0),A("");try{const N=await Se.retryTranslation(m,O.translationId);c(m,d,N)}catch(N){A(pt("Retry latest failed conversation translation",N))}finally{y(!1)}}const W=c2(D,k,S),Z=R.length,z=n2(R);return x.jsxs("aside",{className:"translation-panel",children:[x.jsxs("header",{className:"translation-panel-header",children:[x.jsxs("div",{className:"translation-panel-titlebar",children:[x.jsx("h2",{children:"Translation"}),x.jsxs("div",{className:"translation-panel-actions",children:[Z>0?x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",disabled:_,onClick:()=>void Y(),children:["Ignore ",Z]}),z?x.jsx("button",{type:"button",disabled:_,onClick:()=>void G(z),children:"Retry latest"}):null]}):null,x.jsx("button",{type:"button",onClick:()=>void K(),children:"Clear"})]})]}),x.jsx("div",{className:"translation-status-row",children:x.jsxs("p",{children:["Claude Code · target ",t2(s)," · ",W]})})]}),x.jsxs("div",{className:"translation-entry-list",ref:L,children:[D.length===0?x.jsx("p",{className:"muted",children:"Translated Claude Code output will appear here."}):null,D.map(O=>x.jsx(a2,{entry:O},O.id))]}),x.jsxs("div",{className:"translation-composer",children:[x.jsxs("div",{className:"translation-composer-row translation-manual-row",children:[x.jsx("textarea",{value:b,onChange:O=>C(O.target.value),placeholder:"Paste English to translate on demand..."}),x.jsx("div",{className:"translation-composer-actions",children:x.jsx("button",{type:"button",disabled:_||!b.trim(),onClick:()=>void H(),children:"Translate"})})]}),x.jsxs("div",{className:"translation-composer-row",children:[x.jsx("textarea",{value:p,onChange:O=>{u(O.target.value),(!O.target.value.trim()||T&&!f2(O.target.value))&&E(!1)},onKeyDown:F,placeholder:"输入中文,先翻译成英文工程指令..."}),x.jsx("div",{className:"translation-composer-actions",children:x.jsx("button",{type:"button",disabled:_||!T||!zg(p).trim(),onClick:()=>void U(),children:"Send English"})})]})]})]})}function t2(n){var r;return((r=e_.find(s=>s.value===n))==null?void 0:r.label)??n}function n2(n){let r,s=Number.NEGATIVE_INFINITY;for(const l of n){const d=Date.parse(l.failedAt),m=Number.isFinite(d)?d:Number.NEGATIVE_INFINITY;(!r||m>=s)&&(r=l,s=m)}return r}function i2({open:n,taskSlug:r,targetLanguage:s,onClose:l}){const[d,m]=te.useState(!1),[,f]=Hi(""),[o,c]=te.useState(null),[h,p]=te.useState(""),[u,b]=te.useState(""),[C,T]=te.useState(""),[E,S]=te.useState(!1),[v,_]=te.useState(null),[y,A]=te.useState(""),[L,D]=te.useState(""),[R,k]=te.useState(""),[M,j]=te.useState(!1);Xa(n?`file-translation:${h||"none"}`:null,()=>H(!0),{intervalMs:2e3,runImmediately:!0});async function H(G=!1){try{const W=await Se.getTranslationState();c(W);const Z=h?W.fileIndex.jobs.some(z=>z.id===h):!1;if((!h||!Z)&&W.fileIndex.jobs[0])U(W.fileIndex.jobs[0].id);else if(!W.fileIndex.jobs[0])p(""),b(""),T("");else if(G&&h){const z=await Se.readFileTranslation(h);b(z.output),T(z.report)}}catch(W){f(pt("Load file translation list",W))}}async function U(G){p(G),b(""),T("");try{const W=await Se.readFileTranslation(G);b(W.output),T(W.report)}catch(W){f(pt(`Read translated file ${G}`,W))}}async function F(){S(!0),await K(y,L)}async function K(G="",W=""){j(!0),f("");try{const Z=await Se.browseTranslationSourceFiles({path:G,query:W,limit:250});_(Z),A(Z.currentPath),D(W)}catch(Z){f(pt("Browse translation source files",Z))}finally{j(!1)}}async function Y(G=R){const W=G.trim();if(W){m(!0),f("");try{if(!r)throw new Error("Create or select a task before translating files.");const Z=await Se.createFileTranslation({taskSlug:r,sourcePath:W,targetLanguage:s});S(!1),await H(),await U(Z.id)}catch(Z){f(pt(`Create file translation for ${W}`,Z))}finally{m(!1)}}}return n?x.jsxs(x.Fragment,{children:[x.jsx("div",{className:"modal-backdrop file-translation-backdrop",children:x.jsx(s2,{busy:d,state:o,selectedJobId:h,output:u,report:C,onClose:()=>{S(!1),l()},onRefresh:()=>void H(),onSelectJob:G=>void U(G),onTranslate:()=>void F()})}),E?x.jsx(r2,{busy:d||M,state:v,currentPath:y,query:L,selectedPath:R,onBrowse:(G,W)=>void K(G,W),onClose:()=>S(!1),onQueryChange:D,onSelectPath:k,onTranslate:()=>void Y()}):null]}):null}function r2({busy:n,state:r,currentPath:s,query:l,selectedPath:d,onBrowse:m,onClose:f,onQueryChange:o,onSelectPath:c,onTranslate:h}){const p=(r==null?void 0:r.entries)??[],u=p.filter(C=>C.type==="directory"),b=p.filter(C=>C.type==="file");return x.jsx("div",{className:"modal-backdrop translation-file-browser-backdrop",children:x.jsxs("section",{className:"translation-file-browser-modal",role:"dialog","aria-modal":"true","aria-label":"Select Source File",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Select Source File"}),x.jsx("p",{children:s||"."})]}),x.jsx("button",{type:"button",onClick:f,children:"Close"})]}),x.jsxs("div",{className:"translation-file-browser-controls",children:[x.jsxs("div",{className:"translation-file-browser-nav",children:[x.jsx("button",{type:"button",disabled:n||!s,onClick:()=>m((r==null?void 0:r.parentPath)??"",""),children:"Up"}),x.jsx("button",{type:"button",disabled:n||!s,onClick:()=>m("",""),children:"Root"})]}),x.jsxs("form",{className:"translation-file-browser-search",onSubmit:C=>{C.preventDefault(),m(s,l)},children:[x.jsx("input",{value:l,onChange:C=>o(C.target.value),placeholder:"Search files"}),x.jsx("button",{type:"submit",disabled:n,children:"Search"}),x.jsx("button",{type:"button",disabled:n||!l,onClick:()=>m(s,""),children:"Clear"})]})]}),x.jsxs("div",{className:"translation-file-browser-layout",children:[x.jsxs("div",{className:"translation-file-browser-list",children:[n&&!r?x.jsx("p",{className:"muted",children:"Loading files..."}):null,!n&&p.length===0?x.jsx("p",{className:"muted",children:"No source files found."}):null,u.length>0?x.jsxs("div",{className:"translation-file-browser-group",children:[x.jsx("h3",{children:"Folders"}),u.map(C=>x.jsx(Hg,{entry:C,selected:d===C.path,onBrowse:m,onSelectPath:c},C.path))]}):null,b.length>0?x.jsxs("div",{className:"translation-file-browser-group",children:[x.jsx("h3",{children:"Files"}),b.map(C=>x.jsx(Hg,{entry:C,selected:d===C.path,onBrowse:m,onSelectPath:c},C.path))]}):null,r!=null&&r.truncated?x.jsx("p",{className:"translation-entry-note",children:"Result limit reached."}):null]}),x.jsxs("aside",{className:"translation-file-browser-selection",children:[x.jsxs("label",{children:[x.jsx("span",{children:"Source path"}),x.jsx("input",{value:d,onChange:C=>c(C.target.value)})]}),x.jsx("button",{type:"button",disabled:n||!d.trim(),onClick:h,children:"Translate File"})]})]})]})})}function Hg({entry:n,selected:r,onBrowse:s,onSelectPath:l}){const d=n.type==="directory";return x.jsxs("button",{className:r?"translation-file-browser-entry is-selected":"translation-file-browser-entry",type:"button",onClick:()=>d?s(n.path,""):l(n.path),onDoubleClick:()=>d?s(n.path,""):void 0,children:[x.jsx("span",{children:d?"DIR":"FILE"}),x.jsx("strong",{children:n.name}),x.jsx("small",{children:n.path})]})}function s2({busy:n,state:r,selectedJobId:s,output:l,report:d,onClose:m,onRefresh:f,onSelectJob:o,onTranslate:c}){const h=(r==null?void 0:r.fileIndex.jobs)??[],p=h.find(u=>u.id===s);return x.jsxs("section",{className:"file-translation-modal",role:"dialog","aria-modal":"true","aria-label":"File Translation",children:[x.jsxs("header",{className:"file-translation-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"File Translation"}),x.jsx("p",{children:"Claude Code · 中英互译"})]}),x.jsxs("div",{className:"file-translation-toolbar",children:[x.jsx("button",{type:"button",disabled:n,onClick:c,children:"Translate"}),x.jsx("button",{type:"button",disabled:n,onClick:f,children:"Refresh"}),x.jsx("button",{type:"button",onClick:m,children:"Close"})]})]}),r!=null&&r.memoryInitialized?null:x.jsx("p",{className:"translation-entry-note",children:"Translation memory is not initialized. Run Bootstrap from the sidebar before important file translations."}),x.jsxs("div",{className:"file-translation-layout",children:[x.jsxs("div",{className:"file-translation-list",children:[h.length===0?x.jsx("p",{className:"muted",children:"No translated files yet."}):null,h.map(u=>x.jsxs("button",{className:u.id===s?"file-translation-item is-active":"file-translation-item",type:"button",onClick:()=>o(u.id),children:[x.jsx("strong",{children:u.sourcePath}),x.jsxs("span",{children:[u.status," · ",u.targetLanguage]})]},u.id))]}),x.jsx("div",{className:"file-translation-preview",children:p?x.jsxs(x.Fragment,{children:[x.jsxs("header",{children:[x.jsx("strong",{children:p.sourcePath}),x.jsx("span",{children:p.status})]}),x.jsx("div",{className:"translation-markdown",children:x.jsx(P_,{remarkPlugins:[hv],children:l||d||"Translation output is not available yet."})})]}):x.jsx("p",{className:"muted",children:"Select a translated file to preview it."})})]})]})}function a2({entry:n}){if(n.sourceKind==="conversation-boundary")return x.jsx(l2,{entry:n});const r=h2(n),s=n.sourceKind==="tool-output",l=n.direction==="user-input-to-english",d=["translation-entry",`is-${n.sourceKind}`,l?"is-user-input":""].filter(Boolean).join(" ");return x.jsxs("article",{className:d,children:[s?x.jsx("pre",{children:r}):x.jsx("div",{className:"translation-markdown",children:x.jsx(P_,{remarkPlugins:[hv],children:r})}),n.warning?x.jsx("p",{className:"translation-entry-note",children:n.warning}):null,n.error?x.jsx("p",{className:"translation-entry-note is-error",children:n.error}):null]})}function l2({entry:n}){const r=n.boundaryKind==="end"?"结束":"开始",s=n.conversationTurn??0,l=p2(n.occurredAt??n.createdAt);return x.jsxs("div",{className:"translation-conversation-boundary","aria-label":`${r} 第 ${s} 轮 ${l}`,children:[x.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"}),x.jsx("span",{children:r}),x.jsxs("span",{children:["第 ",s," 轮"]}),x.jsx("time",{children:l}),x.jsx("span",{className:"translation-boundary-dash","aria-hidden":"true"})]})}function o2(n){const r=n.find(pv);return(r==null?void 0:r.translationStartedAt)??(r==null?void 0:r.createdAt)}function c2(n,r,s){const l=n.find(pv);if(l)return`translating ${d2(Math.max(0,s-u2(l)))}`;const d=n.at(-1);return(d==null?void 0:d.status)==="failed"||r==="failed"?"error":r}function pv(n){return n.status==="queued"||n.status==="translating"}function u2(n){const r=Date.parse(n.translationStartedAt??n.createdAt);return Number.isFinite(r)?r:Date.now()}function h2(n){return n.status==="queued"||n.status==="translating"?n.sourceText:n.status==="translated"?n.direction==="user-input-to-english"?mv(n.sourceText,n.translatedText):n.translatedText:n.translatedText||n.sourceText}function mv(n,r){return`${n.trimEnd()}${Ro}${r.trimStart()}`}function f2(n){return n.includes(Ro)}function zg(n){const r=n.indexOf(Ro);return r===-1?n:n.slice(r+Ro.length)}function d2(n){if(n<1e3)return`${Math.max(.1,n/1e3).toFixed(1)}s`;const r=n/1e3;if(r<60)return`${r.toFixed(1)}s`;const s=Math.floor(r/60),l=Math.floor(r%60).toString().padStart(2,"0");return`${s}:${l}`}function p2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleTimeString()}const m2=8;function g2(){const[n,r]=te.useState([]);return te.useEffect(()=>{const s=m=>{var c,h;const f=(h=(c=m.detail)==null?void 0:c.message)==null?void 0:h.trim();if(!f)return;const o=new Date().toISOString();r(p=>{const u=p.find(b=>b.message===f);return u?[{...u,count:u.count+1,updatedAt:o},...p.filter(b=>b.id!==u.id)]:[{id:`ui_error_${Date.now()}_${Math.random().toString(16).slice(2)}`,message:f,count:1,createdAt:o,updatedAt:o},...p].slice(0,m2)})},l=m=>{var o;const f=((o=m.detail)==null?void 0:o.actions)??[];f.length!==0&&r(c=>c.filter(h=>!f.some(p=>h.message.startsWith(`${p} failed.`))))},d=m=>{var o,c;const f=(c=(o=m.detail)==null?void 0:o.message)==null?void 0:c.trim();f&&r(h=>h.filter(p=>p.message!==f))};return window.addEventListener(uh,s),window.addEventListener(hh,l),window.addEventListener(fh,d),()=>{window.removeEventListener(uh,s),window.removeEventListener(hh,l),window.removeEventListener(fh,d)}},[]),n.length===0?null:x.jsxs("aside",{className:"ui-error-center",role:"alert","aria-live":"polite","aria-label":"Application errors",children:[x.jsxs("header",{className:"ui-error-center-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Errors"}),x.jsxs("p",{children:[n.length," active"]})]}),x.jsx("button",{type:"button",onClick:()=>r([]),children:"Clear"})]}),x.jsx("ol",{className:"ui-error-list",children:n.map(s=>x.jsxs("li",{children:[x.jsxs("div",{children:[x.jsx("p",{children:s.message}),x.jsxs("span",{children:[_2(s.updatedAt),s.count>1?` · repeated ${s.count} times`:""]})]}),x.jsx("button",{type:"button","aria-label":"Dismiss error",onClick:()=>r(l=>l.filter(d=>d.id!==s.id)),children:"Close"})]},s.id))})]})}function _2(n){return new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}function v2(n,r){return n.find(s=>s.taskSlug===r)??n[0]??null}function y2(n){if(!(n.mode!=="auto"||n.status!=="running")&&!(!n.activeRole||n.activeRole===n.lastFollowedRole))return n.activeRole}function S2(n,r){var d;if(!((d=n.flowPause)!=null&&d.paused))return null;const s=n.flowPause.role??n.activeRole??"role",l=n.roleRecovery;return n.flowPause.reason==="role-recovery-failed"&&l?r(l,s):`No new turn started after ${s} stopped.`}function b2(n){const r=n.flowPause;if((r==null?void 0:r.reason)==="awaiting-user")return`awaiting-user:${r.since??n.taskSlug}`;const s=n.roundId??n.startedAt??n.taskSlug,l=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${s}:${l}`}const C2=3,w2=3e4,wo=new Map;function gv(n,r){const s=pt(n,r);if(!x2(r))return wo.set(n,{consecutiveFailures:1,lastMessage:s,lastReportedAt:Date.now()}),s;const l=wo.get(n),d=((l==null?void 0:l.consecutiveFailures)??0)+1,m=Date.now(),f=d>=C2&&(!l||l.lastMessage!==s||m-l.lastReportedAt>=w2);return wo.set(n,{consecutiveFailures:d,lastMessage:s,lastReportedAt:f?m:(l==null?void 0:l.lastReportedAt)??0}),f?s:null}function Do(n){wo.delete(n),c1([n])}function x2(n){const r=Lo(n);return r.includes("could not reach the VCM backend")||r.includes("Failed to fetch")||r.includes("NetworkError")||r.includes("Load failed")||r.includes("ERR_CONNECTION")}const E2=["architecture-plan","validation-adequacy","final-diff"];function k2({events:n,maxEvents:r=8,showHeader:s=!0}){const l=r===null?n:n.slice(-r);return x.jsxs("section",{className:"event-log",children:[s?x.jsx("h2",{children:"Events"}):null,n.length===0?x.jsx("p",{className:"muted",children:"No terminal events yet."}):x.jsx("ol",{children:l.map((d,m)=>x.jsx("li",{children:d},`${d}-${m}`))})]})}function hi({checked:n,className:r,disabled:s,label:l,stateLabel:d,title:m,onChange:f}){const o=["switch-control",n?"is-on":"is-off",r].filter(Boolean).join(" "),c=d??(n?"on":"off");return x.jsxs("button",{type:"button",role:"switch","aria-checked":n,"aria-label":`${l}: ${c}`,className:o,disabled:s,title:m,onClick:()=>f(!n),children:[x.jsx("span",{className:"switch-control-label",children:l}),x.jsx("span",{className:"switch-control-track","aria-hidden":"true",children:x.jsx("span",{className:"switch-control-thumb"})})]})}function A2({status:n,bootstrapStatus:r,applyResult:s,hasActiveTask:l=!1,autoTaskHarnessReviewEnabled:d,busy:m=!1,onRefresh:f,onApply:o,onOpenStudio:c,onOpenRepositoryDiff:h,onAutoTaskHarnessReviewChange:p,onStartBootstrap:u,onRestartBootstrap:b,onStopBootstrap:C,onRunBootstrap:T}){const[E,S]=te.useState(!1),[v,_]=te.useState("bypassPermissions"),[y,A]=te.useState("default"),[L,D]=te.useState("default"),R=r==null?void 0:r.session,k=(r==null?void 0:r.status)==="running",M=(R==null?void 0:R.status)==="running",j=(r==null?void 0:r.status)!=="complete",H={permissionMode:v,model:y,effort:L};return l?n?x.jsxs("section",{className:"harness-panel",children:[x.jsxs("div",{className:"harness-stage",children:[x.jsxs("div",{className:"harness-panel-header",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Fixed install"}),x.jsx("p",{className:"muted",children:n.initialized?n.needsApply?`${n.plannedChanges.length} pending updates`:"Up to date":"Not initialized"})]}),x.jsx("div",{className:"harness-actions",children:n.initialized?x.jsxs(x.Fragment,{children:[x.jsx("button",{type:"button",disabled:m,onClick:()=>void f(),children:"Refresh"}),n.needsApply?x.jsx("button",{type:"button",disabled:m,onClick:()=>void o(),children:"Update"}):null]}):x.jsx("button",{type:"button",disabled:m,onClick:()=>void o(),children:"Initialize"})})]}),n.initialized&&n.needsApply?x.jsxs(x.Fragment,{children:[x.jsx("h3",{className:"harness-file-list-title",children:"Files to update"}),x.jsx("ol",{className:"harness-file-list",children:n.plannedChanges.map(U=>x.jsxs("li",{children:[x.jsx("span",{children:U.path}),x.jsx(Ni,{status:U.action})]},`${U.path}:${U.action}`))})]}):null]}),x.jsxs("div",{className:"harness-stage",children:[x.jsxs("div",{className:"harness-panel-header",children:[x.jsx("div",{children:x.jsx("strong",{children:"Harness Studio"})}),x.jsx("div",{className:"harness-actions",children:x.jsx("button",{type:"button",disabled:m,onClick:c,children:"Open Studio"})})]}),x.jsx("button",{className:"harness-review-diff-button",type:"button",disabled:m,onClick:h,children:"Review Diff"}),x.jsx(hi,{checked:d,className:"sidebar-switch",disabled:m,label:"Auto task harness review",title:"Automatically ask Harness Engineer to review task harness after final acceptance completes",onChange:p})]}),j?x.jsx("div",{className:"harness-stage",children:x.jsxs("div",{className:"harness-panel-header",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Bootstrap"}),x.jsx("p",{className:"muted",children:r?T2(r.status):"not loaded"})]}),x.jsx("div",{className:"harness-actions",children:x.jsx("button",{type:"button",disabled:m||!(r!=null&&r.canStart),onClick:()=>{S(!0)},children:"Open Bootstrap"})})]})}):null,s!=null&&s.changedFiles.length?x.jsx("div",{className:"harness-result",children:x.jsx("p",{className:"muted",children:s.message})}):null,n.warnings.length>0?x.jsx("ul",{className:"warnings",children:n.warnings.map(U=>x.jsx("li",{children:U},U))}):null,r!=null&&r.warnings.length?x.jsx("ul",{className:"warnings",children:r.warnings.map(U=>x.jsx("li",{children:U},U))}):null,j&&E?x.jsx("div",{className:"harness-bootstrap-modal",role:"dialog","aria-modal":"true","aria-label":"Harness Engineer bootstrap session",children:x.jsxs("div",{className:"harness-bootstrap-modal-surface",children:[x.jsxs("header",{className:"harness-bootstrap-modal-header",children:[x.jsxs("div",{children:[x.jsx("strong",{children:"Harness Engineer Bootstrap"}),x.jsx("p",{className:"muted",children:(R==null?void 0:R.command)??"Start Harness Engineer, then run bootstrap when ready."})]}),x.jsxs("div",{className:"harness-bootstrap-modal-actions",children:[R?x.jsx(Ni,{status:R.status}):null,x.jsx("button",{type:"button",onClick:()=>S(!1),children:"Close"})]})]}),x.jsxs("div",{className:"harness-bootstrap-controls",children:[x.jsxs("label",{children:[x.jsx("span",{children:"Permission"}),x.jsx("select",{value:v,disabled:m||k||M,onChange:U=>_(U.target.value),children:n_.map(U=>x.jsx("option",{value:U.value,children:U.label},U.value))})]}),x.jsxs("label",{children:[x.jsx("span",{children:"Model"}),x.jsx("select",{value:y,disabled:m||k||M,onChange:U=>A(U.target.value),children:i_.map(U=>x.jsx("option",{value:U.value,children:U.label},U.value))})]}),x.jsxs("label",{children:[x.jsx("span",{children:"Effort"}),x.jsx("select",{value:L,disabled:m||k||M,onChange:U=>D(U.target.value),children:r_.map(U=>x.jsx("option",{value:U.value,children:U.label},U.value))})]}),x.jsxs("div",{className:"harness-bootstrap-control-actions",children:[x.jsx("button",{type:"button",disabled:m||k||!(r!=null&&r.canStart),onClick:()=>void u(H),children:"Start"}),x.jsx("button",{type:"button",disabled:m||k||!(r!=null&&r.canStart),onClick:()=>void b(H),children:"Restart"}),x.jsx("button",{type:"button",disabled:m||!R,onClick:()=>void C(),children:"Stop"}),x.jsx("button",{type:"button",disabled:m||k||!M,onClick:()=>void T(),children:"Run bootstrap"})]})]}),x.jsx("div",{className:"harness-bootstrap-terminal",children:M?x.jsx(Oo,{sessionId:R.id,active:E}):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:"Harness Bootstrap"}),x.jsx("span",{children:"Start Harness Engineer first. When it is ready, click Run bootstrap to send the prompt."})]})})]})}):null]}):null:x.jsx("section",{className:"harness-panel",children:x.jsxs("div",{className:"harness-result",children:[x.jsx("strong",{children:"Task required"}),x.jsx("p",{className:"muted",children:"Create or select a task before changing VCM Harness. Harness changes are committed in the active task worktree."})]})})}function T2(n){return n.replaceAll("_"," ")}function Xh(n){return{total:n.length,accepted:n.filter(r=>r.acceptedAt).length,delivered:n.filter(r=>r.deliveredAt).length}}function R2(n,r=6){const s=[...n].sort(L2).map((d,m)=>({message:d,sequence:m+1}));return[...r===null?s:s.slice(-r)].sort((d,m)=>m.sequence-d.sequence)}function D2({messages:n,orchestration:r,busy:s,maxMessages:l=6,showControls:d=!0,showHeader:m=!0,onModeChange:f,onMarkAllDone:o}){const[c,h]=te.useState(null),p=Xh(n),u=(r==null?void 0:r.mode)??"auto",b=R2(n,l);async function C(T){await O2(T.body),h(T.id),window.setTimeout(()=>h(E=>E===T.id?null:E),1200)}return x.jsxs("section",{className:"message-panel",children:[m?x.jsxs("div",{className:"message-panel-header",children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Messages"}),x.jsxs("p",{className:"muted",children:[p.total," total / ",p.accepted," accepted"]})]}),d&&f?x.jsx("div",{className:"message-controls",children:x.jsx(hi,{checked:u==="auto",className:"message-mode-toggle",disabled:s,label:"Auto orchestration",onChange:T=>f(T?"auto":"manual")})}):null,d&&o?x.jsx("button",{type:"button",disabled:s,onClick:o,children:"Mark All Done"}):null]}):null,n.length===0?x.jsx("p",{className:"muted",children:"No role messages yet."}):x.jsx("ol",{className:"message-list",children:b.map(({message:T,sequence:E})=>x.jsxs("li",{className:"message-item",children:[x.jsxs("div",{className:"message-item-main",children:[x.jsxs("div",{className:"message-meta",children:[x.jsxs("span",{className:"message-sequence",children:["#",E]}),x.jsx("time",{dateTime:Mo(T),children:M2(Mo(T))}),x.jsxs("strong",{children:[T.fromRole," ","->"," ",T.toRole]}),x.jsx("span",{children:T.type})]}),x.jsx("p",{children:T.body}),T.failureReason?x.jsx("span",{className:"message-reason",children:T.failureReason}):null,T.bodyPath?x.jsx("span",{className:"message-path",children:T.bodyPath}):null]}),x.jsx("div",{className:"message-actions",children:x.jsx("button",{type:"button",disabled:s,onClick:()=>void C(T),children:c===T.id?"Copied":"Copy"})})]},T.id))})]})}function M2(n){const r=new Date(n);return Number.isNaN(r.getTime())?n:r.toLocaleString(void 0,{month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})}function Mo(n){return n.acceptedAt??n.deliveredAt??n.dispatchingAt??n.createdAt}function L2(n,r){const s=Mo(n).localeCompare(Mo(r));if(s!==0)return s;const l=n.createdAt.localeCompare(r.createdAt);return l!==0?l:n.id.localeCompare(r.id)}async function O2(n){var s;if((s=navigator.clipboard)!=null&&s.writeText){await navigator.clipboard.writeText(n);return}const r=document.createElement("textarea");r.value=n,r.setAttribute("readonly","true"),r.style.position="fixed",r.style.left="-9999px",document.body.appendChild(r),r.select(),document.execCommand("copy"),r.remove()}function B2({defaultPath:n="",recentPaths:r=[],busy:s=!1,onConnect:l}){const[d,m]=te.useState(n);te.useEffect(()=>{n&&m(n)},[n]);async function f(o){o.preventDefault(),await l(d)}return x.jsx("form",{className:"repo-connect",onSubmit:f,children:x.jsxs("div",{className:r.length>0?"inline-form has-recent-paths":"inline-form",children:[x.jsx("input",{"aria-label":"Repository path",id:"repo-path",value:d,onChange:o=>m(o.target.value),placeholder:"/path/to/repo"}),r.length>0?x.jsxs("select",{"aria-label":"Recent repositories",className:"repo-recent-select",value:"",onChange:o=>{o.target.value&&m(o.target.value)},children:[x.jsx("option",{value:"",children:"Recent"}),r.map(o=>x.jsx("option",{value:o,children:o},o))]}):null,x.jsx("button",{type:"submit",disabled:s||!d.trim(),children:"Connect"})]})})}function j2({tasks:n,activeTaskSlug:r,onSelect:s}){return x.jsx("nav",{className:"task-nav","aria-label":"Tasks",children:n.map(l=>x.jsxs("button",{className:l.taskSlug===r?"task-nav-item is-active":"task-nav-item",type:"button",onClick:()=>s(l.taskSlug),children:[x.jsx("span",{children:l.title||l.taskSlug}),x.jsx(Ni,{status:l.status})]},l.taskSlug))})}function N2({project:n,recentRepositoryPaths:r,tasks:s,activeTaskSlug:l,messages:d,orchestration:m,events:f,roundState:o,gateReview:c,translationEnabled:h,translationAutoSendEnabled:p,translationTargetLanguage:u,translationOutputMode:b,translationMemoryInitialized:C,translatorSession:T,harnessStatus:E,harnessBootstrapStatus:S,harnessApplyResult:v,autoTaskHarnessReviewEnabled:_,gatewayStatus:y,gatewayQrLogin:A,gatewayQrCheck:L,gatewayLarkRegistration:D,gatewayLarkRegistrationCheck:R,busy:k,onConnect:M,onRefreshConnectedRepository:j,onPullConnectedRepository:H,onRefreshHarness:U,onApplyHarness:F,onStartHarnessBootstrap:K,onRestartHarnessBootstrap:Y,onStopHarnessBootstrap:G,onRunHarnessBootstrap:W,onOpenHarnessStudio:Z,onOpenRepositoryDiff:z,onAutoTaskHarnessReviewChange:O,onRefreshGateway:N,onGatewayEnabledChange:$,onGatewaySettingsChange:I,onGatewayTranslationChange:re,onStartGatewayQrLogin:ve,onStartGatewayLarkRegistration:pe,onResetGatewayBinding:Q,onGateReviewGateEnabledChange:q,onTranslationEnabledChange:ee,onTranslationAutoSendChange:ae,onTranslationTargetLanguageChange:de,onTranslationOutputModeChange:se,onOpenFileTranslation:we,onOpenTranslatorSession:je,onCreateTranslationBootstrap:He,onUpdateTranslationMemory:Pe,onCreateTask:xe,onCloseTask:xt,onSelectTask:yt,themeMode:Et,onAutoOrchestrationChange:an,onThemeModeChange:Cn,pauseAlertSound:St,onPauseAlertSoundChange:tt,roleRetryEnabled:Lt,onRoleRetryEnabledChange:he,permissionRequestMode:ye,onPermissionRequestModeChange:Ae,launchTemplate:Me,canSaveLaunchTemplate:Oe,canOneClickStart:ft,onSaveLaunchTemplate:Fe,onOneClickStart:gt,onMarkAllMessagesDone:mt,onDeleteMessageHistory:Ot}){const[Qe,Zt]=te.useState(""),[Bt,ln]=te.useState(!1),[Gn,Vn]=te.useState(!1),[zt,on]=te.useState(()=>l?null:"repository"),Wn=Xh(d),Vt=Qe.trim(),Is=U2(n,l,E),Wt=s.filter(ze=>ze.cleanupStatus!=="cleaned"),wn=Wt.find(ze=>ze.taskSlug===l)??null;te.useEffect(()=>{on(ze=>!l&&ze===null?n?"task":"repository":ze)},[l,n]);function It(ze,di){on(di?ze:null)}async function Ii(ze){ze.preventDefault(),await xe({taskSlug:Vt}),Zt("")}return x.jsxs("div",{className:"project-dashboard",children:[x.jsx("header",{className:"brand-header",children:x.jsx("strong",{children:"VibeCodingMaster"})}),x.jsx(Nr,{title:"Repository",open:zt==="repository",onOpenChange:ze=>{It("repository",ze),ze&&n&&j()},children:x.jsxs("div",{className:"repository-panel",children:[x.jsx(B2,{defaultPath:(n==null?void 0:n.repoRoot)??"",recentPaths:r,busy:k,onConnect:M}),n?x.jsx($2,{busy:k,project:n,onPull:H}):null]})}),x.jsx(Nr,{title:"Settings",open:zt==="settings",onOpenChange:ze=>It("settings",ze),children:x.jsxs("div",{className:"sidebar-settings",children:[x.jsxs("button",{"aria-label":`Theme mode: ${Ug(Et)}`,className:"settings-toggle theme-mode-toggle",disabled:k,title:"Cycle theme: system, light, dark",type:"button",onClick:()=>Cn(Y2(Et)),children:[x.jsx("span",{children:"Theme"}),x.jsx("span",{children:Ug(Et)})]}),x.jsx(hi,{checked:((m==null?void 0:m.mode)??"auto")==="auto",className:"sidebar-switch",disabled:k||!l,label:"Auto orchestration",title:l?"Automatically dispatch role messages during the active task":"Create or select a task first",onChange:an}),x.jsx(hi,{checked:St,className:"sidebar-switch",disabled:k,label:"Pause alert sound",title:"Play a sound when VCM shows the fixed flow pause dialog",onChange:ze=>tt(ze)}),x.jsx(hi,{checked:Lt,className:"sidebar-switch",disabled:k,label:"CC auto retry",title:"Retry temporary Claude Code turn failures before showing the flow pause alert",onChange:ze=>he(ze)}),x.jsxs("label",{className:"settings-select-row",children:[x.jsx("span",{children:"Permission requests"}),x.jsxs("select",{value:ye,disabled:k,onChange:ze=>Ae(ze.target.value),children:[x.jsx("option",{value:"off",children:"off"}),x.jsx("option",{value:"allowAll",children:"allow all"})]})]}),x.jsxs("button",{className:"settings-toggle",disabled:k||!Oe,title:"Save the current core role launch settings and optional Gate Reviewer settings",type:"button",onClick:Fe,children:[x.jsx("span",{children:"Save launch template"}),x.jsx("span",{children:Oe?"ready":"open task"})]}),ft?x.jsxs("button",{className:"settings-toggle is-active",disabled:k,title:H2(Me),type:"button",onClick:gt,children:[x.jsx("span",{children:"One-click start"}),x.jsx("span",{children:_v(Me)})]}):null,l?x.jsxs(x.Fragment,{children:[x.jsxs("button",{type:"button",onClick:()=>ln(!0),children:[x.jsx("span",{children:"Messages"}),x.jsxs("span",{className:"muted",children:[Wn.total," total"]})]}),x.jsxs("button",{type:"button",onClick:()=>Vn(!0),children:[x.jsx("span",{children:"Events"}),x.jsxs("span",{className:"muted",children:[f.length," total"]})]})]}):null]})}),x.jsx(Nr,{title:"Translation",open:zt==="translation",onOpenChange:ze=>It("translation",ze),children:x.jsx(z2,{busy:k,enabled:h,autoSendEnabled:p,targetLanguage:u,outputMode:b,memoryInitialized:C,baseUnavailableReason:Is,translatorSession:T,onAutoSendChange:ae,onCreateBootstrap:He,onEnabledChange:ee,onUpdateMemory:Pe,onTargetLanguageChange:de,onOutputModeChange:se,onOpenFileTranslation:we,onOpenTranslatorSession:je})}),n&&l?x.jsx(Nr,{title:"Gate Review Gates",open:zt==="gate-review-gates",onOpenChange:ze=>It("gate-review-gates",ze),children:x.jsx(P2,{busy:k,state:c,onGateEnabledChange:q})}):null,x.jsx(Nr,{title:"Gateway",open:zt==="gateway",onOpenChange:ze=>{It("gateway",ze),ze&&N()},children:x.jsx(q2,{busy:k,qrCheck:L,qrLogin:A,larkRegistration:D,larkRegistrationCheck:R,status:y,onEnabledChange:$,onSettingsChange:I,onResetBinding:Q,onStartLarkRegistration:pe,onStartQrLogin:ve,onTranslationChange:re})}),n?x.jsx(Nr,{title:"VCM Harness",open:zt==="vcm-harness",onOpenChange:ze=>It("vcm-harness",ze),children:x.jsx(A2,{status:E,bootstrapStatus:S,applyResult:v,hasActiveTask:!!wn,autoTaskHarnessReviewEnabled:_,busy:k,onRefresh:U,onApply:F,onOpenStudio:Z,onOpenRepositoryDiff:z,onAutoTaskHarnessReviewChange:O,onStartBootstrap:K,onRestartBootstrap:Y,onStopBootstrap:G,onRunBootstrap:W})}):null,n?x.jsx(Nr,{title:"Task",open:zt==="task",onOpenChange:ze=>It("task",ze),children:Wt.length>0?x.jsxs("div",{className:"task-panel",children:[x.jsx(j2,{tasks:Wt,activeTaskSlug:l,onSelect:yt}),wn?x.jsx("div",{className:"task-panel-actions",children:x.jsx("button",{className:"danger-button",disabled:k,type:"button",onClick:xt,children:"Close Task"})}):null]}):x.jsx("div",{className:"task-create",children:x.jsxs("form",{onSubmit:Ii,children:[x.jsx("input",{value:Qe,onChange:ze=>Zt(ze.target.value),placeholder:"task name"}),x.jsxs("div",{className:"task-create-preview",children:[x.jsxs("small",{children:["branch: ",Vt?`feature/${Vt}`:"feature/<task>"]}),x.jsxs("small",{children:["worktree: ",Vt?`.claude/worktrees/${Vt}`:".claude/worktrees/<task>"]})]}),x.jsx("button",{type:"submit",disabled:k||!Vt,children:"Create"})]})})}):null,n&&wn?x.jsx(W2,{task:wn,roundState:o}):null,Bt?x.jsx(Q2,{busy:k,messages:d,orchestration:m,onClose:()=>ln(!1),onMarkAllDone:()=>{l&&mt(l)},onDeleteMessageHistory:()=>{l&&Ot(l)}}):null,Gn?x.jsx(X2,{events:f,onClose:()=>Vn(!1)}):null]})}function _v(n){return[n.autoOrchestration?"auto":"manual"].join(" + ")}function H2(n){const r=Object.entries(n.roles).map(([s,l])=>`${s}: ${l.permissionMode} / ${l.model} / ${l.effort}`).join("; ");return`Launch template: ${_v(n)}; ${r}`}function z2({autoSendEnabled:n,baseUnavailableReason:r,busy:s,enabled:l,memoryInitialized:d,outputMode:m,targetLanguage:f,translatorSession:o,onAutoSendChange:c,onCreateBootstrap:h,onEnabledChange:p,onUpdateMemory:u,onOutputModeChange:b,onTargetLanguageChange:C,onOpenFileTranslation:T,onOpenTranslatorSession:E}){const S=!!(s||r),v=(o==null?void 0:o.status)==="running",_=!!(l&&!r&&v),y=r??(v?null:"Start Translator session first."),A=!!(s||y),D=r??"Open Translator session",R=y??"Translation tools are ready";return x.jsxs("div",{className:"sidebar-settings",children:[x.jsx(hi,{checked:_,className:"sidebar-switch",disabled:S||!v,label:"Conversation translation",title:R,onChange:p}),x.jsx(hi,{checked:n,className:"sidebar-switch",disabled:S,label:"Auto-send",onChange:c}),x.jsxs("label",{className:"settings-select-row",children:[x.jsx("span",{children:"Language"}),x.jsx("select",{value:f,disabled:S,onChange:k=>C(k.target.value),children:e_.map(k=>x.jsx("option",{value:k.value,children:k.label},k.value))})]}),x.jsxs("label",{className:"settings-select-row",children:[x.jsx("span",{children:"Reply scope"}),x.jsx("select",{value:m,disabled:S,onChange:k=>b(k.target.value),children:Z0.map(k=>x.jsx("option",{value:k.value,children:k.label},k.value))})]}),x.jsxs("button",{className:"settings-toggle",disabled:A,title:R,type:"button",onClick:T,children:[x.jsx("span",{children:"File translation"}),x.jsx("span",{children:"open"})]}),d?null:x.jsxs("button",{className:"settings-toggle",disabled:A,title:R,type:"button",onClick:h,children:[x.jsx("span",{children:"Bootstrap"}),x.jsx("span",{children:"run"})]}),x.jsxs("button",{className:"settings-toggle",disabled:A,title:R,type:"button",onClick:u,children:[x.jsx("span",{children:"Update memory"}),x.jsx("span",{children:"run"})]}),y?x.jsx("p",{className:"settings-help-text",children:y}):null,x.jsxs("div",{className:"settings-status-row",children:[x.jsx("span",{children:"Session status"}),x.jsx("strong",{children:I2(o)})]}),x.jsxs("button",{className:"settings-toggle",disabled:S,title:D,type:"button",onClick:E,children:[x.jsx("span",{children:"Open Session"}),x.jsx("span",{children:"open"})]})]})}function I2(n){return n?n.status==="running"?n.activityStatus??"idle":n.status:"not started"}function U2(n,r,s){return n?r?s?s.initialized?null:"Initialize VCM Harness first.":"Load VCM Harness status first.":"Create or select a task first.":"Connect a repository first."}function P2({busy:n,onGateEnabledChange:r,state:s}){return x.jsx("div",{className:"sidebar-settings",children:E2.map(l=>{const d=s==null?void 0:s.gates[l],m=!!(d!=null&&d.required);return x.jsx(hi,{checked:m,className:"sidebar-switch",disabled:n||!s,label:F2(l),title:d!=null&&d.status?`status: ${d.status}`:void 0,onChange:f=>r(l,f)},l)})})}function F2(n){switch(n){case"architecture-plan":return"Architecture plan";case"validation-adequacy":return"Validation adequacy";case"final-diff":return"Final diff"}return n}function q2({busy:n,larkRegistration:r,larkRegistrationCheck:s,onEnabledChange:l,onResetBinding:d,onSettingsChange:m,onStartLarkRegistration:f,onStartQrLogin:o,onTranslationChange:c,qrCheck:h,qrLogin:p,status:u}){const b=(u==null?void 0:u.channel)==="lark",C=(u==null?void 0:u.channel)==="lark"?!!(u.binding.appIdConfigured&&u.binding.appSecretConfigured):!!(u!=null&&u.binding.tokenConfigured),T=(u==null?void 0:u.channel)==="lark"?!!(u.binding.appIdConfigured&&u.binding.appSecretConfigured):!!(u!=null&&u.binding.tokenConfigured);return x.jsxs("div",{className:"gateway-panel",children:[x.jsxs("label",{className:"compact-field",children:[x.jsx("span",{children:"Channel"}),x.jsxs("select",{disabled:n||!u,value:(u==null?void 0:u.channel)??"weixin-ilink",onChange:E=>{m({channel:E.currentTarget.value==="lark"?"lark":"weixin-ilink"})},children:[x.jsx("option",{value:"weixin-ilink",children:"Weixin iLink"}),x.jsx("option",{value:"lark",children:"Lark"})]})]}),x.jsxs("div",{className:"gateway-actions",children:[x.jsx(hi,{checked:!!(u!=null&&u.enabled),className:"sidebar-switch",disabled:n||!u||!u.enabled&&!C,label:"Gateway",title:C?"Enable or disable PM messages and task-changing Gateway commands":"Configure the selected Gateway channel first",onChange:E=>l(E)}),x.jsx(hi,{checked:!!(u!=null&&u.translationEnabled),className:"sidebar-switch",disabled:n||!u,label:"Translation",onChange:E=>c(E)}),b?x.jsx("button",{type:"button",disabled:n,onClick:f,children:"Start QR Setup"}):T?x.jsx("button",{className:"danger-button",type:"button",disabled:n,onClick:d,children:"Reset Binding"}):x.jsx("button",{type:"button",disabled:n,onClick:o,children:"Start QR Login"})]}),b?x.jsxs("div",{className:"gateway-lark-settings",children:[x.jsx("p",{className:"muted",children:u!=null&&u.binding.appIdConfigured&&u.binding.appSecretConfigured?`Lark app configured${u.binding.larkBotName?` · ${u.binding.larkBotName}`:""}.`:"Use QR setup to create and configure the Lark bot automatically."}),r?x.jsxs("p",{className:"muted",children:["QR setup: ",(s==null?void 0:s.status)??r.status,s!=null&&s.message?` · ${s.message}`:""]}):null]}):p?x.jsx("p",{className:"muted",children:"QR login started. Use the login dialog to confirm binding."}):null,!b&&h?x.jsxs("p",{className:"muted",children:["QR status: ",h.status,h.message?` · ${h.message}`:""]}):null]})}function $2({busy:n,onPull:r,project:s}){const l=s.pullDisabledReason,d=!!s.canPull;return x.jsxs("div",{className:"project-summary",children:[x.jsxs("dl",{children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Base path"}),x.jsx("dd",{children:s.repoRoot})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Branch"}),x.jsx("dd",{children:G2(s)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Remote"}),x.jsx("dd",{children:s.upstreamBranch??"no upstream"})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Status"}),x.jsx("dd",{children:V2(s)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Commit"}),x.jsx("dd",{children:s.shortHeadCommit??s.headCommit??"unknown"})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Working tree"}),x.jsx("dd",{children:s.isDirty?"uncommitted changes":"clean"})]})]}),x.jsxs("div",{className:"connected-repo-actions",children:[x.jsx("button",{type:"button",disabled:n||!d,title:l??"Pull latest changes with git pull --ff-only",onClick:()=>void r(),children:"Pull"}),x.jsx("span",{className:"muted",children:s.checkedAt?`checked ${Ah(s.checkedAt)}`:"status not refreshed"})]}),l?x.jsx("p",{className:"muted",children:l}):null,s.warnings.length>0?x.jsx("ul",{className:"warnings",children:s.warnings.map(m=>x.jsx("li",{children:m},m))}):null]})}function G2(n){return n.branch||"unknown"}function V2(n){if(!n.upstreamBranch)return"no upstream";const r=n.ahead??0,s=n.behind??0;return r===0&&s===0?"up to date":r>0&&s>0?`ahead ${r}, behind ${s}`:r>0?`ahead ${r}`:`behind ${s}`}function W2({roundState:n,task:r}){var p;const[s,l]=te.useState(()=>Date.now()),d=!!(n!=null&&n.startedAt),m=vv(r.createdAt,s),f=Ig(n,(n==null?void 0:n.totalCcActiveMs)??0,s),o=d&&n?Ig(n,n.currentRoundCcActiveMs,s):0,c=d&&n?K2(n,s):0,h=((p=r.title)==null?void 0:p.trim())||r.taskSlug;return te.useEffect(()=>{const u=window.setInterval(()=>l(Date.now()),1e3);return()=>window.clearInterval(u)},[]),x.jsxs("section",{className:"task-status-dock","aria-label":"VCM Session status",children:[x.jsxs("div",{className:"task-status-dock-title",children:[x.jsx("strong",{title:h,children:h}),x.jsx("span",{className:`status-badge status-${r.status}`,children:r.status})]}),x.jsxs("dl",{className:"task-status-stats",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Session start"}),x.jsx("dd",{children:Ah(r.createdAt)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Session total"}),x.jsx("dd",{children:So(m)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Rounds"}),x.jsx("dd",{children:(n==null?void 0:n.totalRoundCount)??0})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Role runtime"}),x.jsx("dd",{children:So(f)})]})]}),d&&n?x.jsxs("div",{className:"current-round-status",children:[x.jsxs("div",{className:"current-round-title",children:[x.jsx("span",{children:n.status==="running"?"Current Round":"Last Round"}),x.jsx("span",{className:`status-badge status-${n.status}`,children:n.status})]}),x.jsxs("dl",{className:"task-status-stats",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Started"}),x.jsx("dd",{children:Ah(n.startedAt)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Total"}),x.jsx("dd",{children:So(c)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Role runtime"}),x.jsx("dd",{children:So(o)})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Turn count"}),x.jsx("dd",{children:n.turnCount})]})]})]}):null]})}function Ig(n,r,s){if(!(n!=null&&n.activeTurnStartedAt)||n.status!=="running")return r;const l=Date.parse(n.updatedAt);return Number.isFinite(l)?r+Math.max(0,s-l):r}function K2(n,r){const s=n.status==="running"?r:Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return vv(n.startedAt??"",Number.isFinite(s)?s:r)}function vv(n,r){const s=Date.parse(n);return Number.isFinite(s)?Math.max(0,r-s):0}function Ah(n){if(!n)return"-";const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit"}).format(r)}function So(n){const r=Math.max(0,Math.floor(n/1e3)),s=Math.floor(r/3600),l=Math.floor(r%3600/60),d=r%60;return s>0?l>0?`${s}h ${l}m`:`${s}h`:l>0?d>0?`${l}m ${d}s`:`${l}m`:`${d}s`}function Y2(n){return n==="system"?"light":n==="light"?"dark":"system"}function Ug(n){return n==="system"?"System":n==="light"?"Light":"Dark"}function X2({events:n,onClose:r}){return x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{className:"event-modal",role:"dialog","aria-modal":"true","aria-label":"Events",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Events"}),x.jsxs("p",{className:"muted",children:[n.length," total"]})]}),x.jsx("button",{type:"button",onClick:r,children:"Close"})]}),x.jsx(k2,{events:n,maxEvents:null,showHeader:!1})]})})}function Q2({busy:n,messages:r,orchestration:s,onClose:l,onMarkAllDone:d,onDeleteMessageHistory:m}){const f=Xh(r);function o(){window.confirm(["Clear all pending route-file messages?","","Use this only after you manually copied or handled stuck route-file messages.","VCM will clear non-empty handoff message files so Stop-hook orchestration can continue."].join(`
|
|
94
94
|
`))&&d()}function c(){window.confirm([`Delete ${f.total} message histor${f.total===1?"y item":"y items"}?`,"","This removes message history from the Messages panel.","Pending route-file messages are not touched."].join(`
|
|
95
|
-
`))&&m()}return x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Messages"}),x.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),x.jsxs("div",{className:"modal-actions",children:[x.jsx("button",{type:"button",disabled:n,onClick:o,children:"Mark All Done"}),x.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),x.jsx("button",{type:"button",onClick:l,children:"Close"})]})]}),x.jsx(D2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function Nr({children:n,onOpenChange:r,open:s,title:l}){return x.jsxs("section",{className:"sidebar-section",children:[x.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[x.jsx("span",{children:l}),x.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?x.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function yv(n,r){return n.find(s=>s.role===r)}function J2({activeRole:n,roles:r=Dh,sessions:s,onSelect:l}){return x.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(d=>{const m=yv(s,d.name),f=(m==null?void 0:m.status)==="running"?m.activityStatus??"idle":(m==null?void 0:m.status)??"not_started";return x.jsxs("button",{className:d.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":d.name===n,onClick:()=>l(d.name),children:[x.jsx("span",{children:d.label}),x.jsx(Ni,{status:f})]},d.name)})})}function Z2({role:n,session:r,permissionMode:s,model:l,effort:d,active:m=!0,busy:f,translationEnabled:o,translationAutoSendEnabled:c,translationTargetLanguage:h,translationPanelState:p,onClearTranslationSession:u,onTranslationEntry:b,onTranslationFailures:C,onPermissionModeChange:T,onModelChange:E,onEffortChange:S,onStart:v,onResume:_,onStop:y,onRestart:A,onNotifyHarnessUpdated:L,onTerminalEvent:D}){const R=m&&Q0(n)&&o&&(r==null?void 0:r.status)==="running";return x.jsx("section",{className:"session-console",children:x.jsxs("div",{className:R?"session-console-body has-translation":"session-console-body",children:[x.jsxs("div",{className:"terminal-pane",children:[x.jsx(Mh,{role:n,session:r,permissionMode:s,model:l,effort:d,busy:f,onPermissionModeChange:T,onModelChange:E,onEffortChange:S,onStart:v,onResume:_,onStop:y,onRestart:A,onNotifyHarnessUpdated:L}),(r==null?void 0:r.status)==="running"?x.jsx(Oo,{sessionId:r.id,active:m,onEvent:D},r.id):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:n}),x.jsx("span",{children:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]}),R?x.jsx("div",{className:"translation-pane",children:x.jsx(t2,{active:m,autoSendEnabled:c,targetLanguage:h,taskSlug:r.taskSlug,role:n,sessionId:r.id,panelState:p??{role:n,status:"ready",entries:[],failures:[]},onClearSession:u??(()=>{}),onEntry:b??(()=>{}),onFailures:C??(()=>{})},`${n}:${r.id}`)}):null]})})}const ch=500;function Th(n){return{taskSlug:n,cursor:1,sessions:{}}}function ek(n,r,s){return n.sessions[r]??js(s)}function tk(n,r){const l={...sk(n,r.taskSlug).sessions};for(const d of r.sessions)l[d.sessionId]={...js(d.role),...l[d.sessionId],role:d.role,status:d.status};for(const d of r.events){const m=l[d.sessionId]??js(d.role);if(d.event.type==="status")l[d.sessionId]={...m,role:d.role,status:d.event.status};else if(d.event.type==="failures")l[d.sessionId]={...m,role:d.role,failures:d.event.failures};else if(d.event.type==="entry"){const f=bv(Sv(m.entries,d.event.entry));l[d.sessionId]={...m,role:d.role,entries:f.entries,failures:f.removedIds.size>0?m.failures.filter(o=>!f.removedIds.has(o.translationId)):m.failures}}}return{taskSlug:r.taskSlug,cursor:r.nextCursor,sessions:l}}function nk(n,r,s){return{...n,sessions:{...n.sessions,[r]:js(s)}}}function ik(n,r,s,l){const d=n.sessions[r]??js(s),m=bv(Sv(d.entries,l));return{...n,sessions:{...n.sessions,[r]:{...d,role:s,entries:m.entries,failures:m.removedIds.size>0?d.failures.filter(f=>!m.removedIds.has(f.translationId)):d.failures}}}}function rk(n,r,s,l){const d=n.sessions[r]??js(s);return{...n,sessions:{...n.sessions,[r]:{...d,role:s,failures:l}}}}function sk(n,r){return n.taskSlug===r?n:Th(r)}function js(n){return{role:n,status:"ready",entries:[],failures:[]}}function Sv(n,r){return n.findIndex(l=>l.id===r.id)===-1?[...n,r]:n.map(l=>l.id===r.id?r:l)}function bv(n){if(n.length<=ch)return{entries:n,removedIds:new Set};const r=n.slice(0,n.length-ch);return{entries:n.slice(-ch),removedIds:new Set(r.map(s=>s.id))}}const ak={"project-manager":"bypassPermissions",architect:"bypassPermissions",coder:"bypassPermissions",reviewer:"bypassPermissions","gate-reviewer":"bypassPermissions",translator:"bypassPermissions","harness-engineer":"bypassPermissions"},lk={"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"default","harness-engineer":"default"},ok={"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"medium","harness-engineer":"medium"};function ck({task:n,activeRole:r,gateReviewerEnabled:s,translationEnabled:l,translationAutoSendEnabled:d,translationTargetLanguage:m,launchTemplate:f,refreshNonce:o=0,onTaskChanged:c,onActiveRoleChange:h,onMessagesChanged:p,onOrchestrationChanged:u,onRoundStateChanged:b,onEventsChanged:C,onLaunchStateChanged:T}){const[E,S]=te.useState(null),[v,_]=te.useState(()=>Fg(f)),[y,A]=te.useState(()=>qg(f)),[L,D]=te.useState(()=>$g(f)),[R,k]=te.useState(!1),[,M]=Hi(""),[j,H]=te.useState([]),[U,F]=te.useState(null),[K,Y]=te.useState(()=>Th(n.taskSlug)),G=te.useRef(""),W=te.useRef(1),Z=te.useMemo(()=>JSON.stringify(f),[f]),z=!!(E!=null&&E.sessions.some(de=>de.role==="gate-reviewer")),O=s||z,N=[...Wa,...O?[Qg]:[]],$=te.useCallback((de,se)=>{F(se),p==null||p(de),u==null||u(se)},[p,u]),I=te.useCallback((de,se,we,je)=>{S(de),$(se,we),b==null||b(je)},[$,b]),re=te.useCallback(async()=>{const de=await Se.getTaskWorkspaceState(n.taskSlug);I(de.taskStatus,de.messages,de.orchestration,de.roundState),Do("Poll task workspace state"),M(se=>xo(se,["Load task workspace state","Poll task workspace state"]))},[I,n.taskSlug]),ve=te.useCallback((de,se)=>{const we=gv(de,se);we&&M(we)},[]);Xa(`task-workspace:${n.taskSlug}:${o}`,()=>re().catch(de=>{ve("Poll task workspace state",de)}),{intervalMs:3e3,runImmediately:!0}),Xa(l?`task-translation-feed:${n.taskSlug}`:null,async()=>{try{const de=await Se.pollTranslationTaskFeed(n.taskSlug,W.current);W.current=de.nextCursor,Y(se=>tk(se,de)),Do("Poll task translation feed"),M(se=>xo(se,["Poll task translation feed"]))}catch(de){ve("Poll task translation feed",de)}},{intervalMs:1e3,runImmediately:!0}),te.useEffect(()=>{H([]),C==null||C([])},[C,n.taskSlug]),te.useEffect(()=>{W.current=1,Y(Th(n.taskSlug))},[n.taskSlug]),te.useEffect(()=>{_(Fg(f)),A(qg(f)),D($g(f))},[Z,n.taskSlug]),te.useEffect(()=>{E&&!O&&r==="gate-reviewer"&&h("project-manager"),E&&r==="translator"&&h("project-manager")},[r,O,h,E]),te.useEffect(()=>{const de=E==null?void 0:E.task;if(!de||de.taskSlug!==n.taskSlug)return;const se=Pg(de);if(se===Pg(n)){G.current="";return}G.current!==se&&(G.current=se,c().catch(we=>{G.current="",M(pt("Refresh task list after task status changed",we))}))},[c,E==null?void 0:E.task,n]),te.useEffect(()=>{const de=(E==null?void 0:E.sessions)??[],se=de.filter(Pe=>uk(Pe.role)),we=new Set(se.map(Pe=>Pe.role)),je=de.some(Pe=>Pe.role==="gate-reviewer"),He={};for(const Pe of Ns)He[Pe.name]={permissionMode:v[Pe.name],model:y[Pe.name],effort:L[Pe.name]};T==null||T({taskSlug:n.taskSlug,roles:He,autoOrchestration:((U==null?void 0:U.mode)??"auto")==="auto",statusLoaded:!!E,sessionCount:se.length,hasAnySession:se.length>0,hasGateReviewerSession:je,allRolesHaveSession:Wa.every(Pe=>we.has(Pe.name))})},[y,L,T,U==null?void 0:U.mode,v,E,n.taskSlug]);async function pe(de,se="Run role session action"){k(!0),M("");try{await de(),await re(),await c()}catch(we){M(pt(se,we))}finally{k(!1)}}function Q(de){H(se=>{const we=[...se,`${new Date().toLocaleTimeString()} ${de}`];return C==null||C(we),we})}function q(de,se){_(we=>({...we,[de]:se}))}function ee(de,se){A(we=>({...we,[de]:se}))}function ae(de,se){D(we=>({...we,[de]:se}))}return x.jsxs("div",{className:"task-workspace",children:[x.jsxs("header",{className:"workspace-header",children:[x.jsx("div",{className:"workspace-title-line",children:x.jsx("h1",{children:n.title||n.taskSlug})}),x.jsx(J2,{activeRole:r,roles:N,sessions:(E==null?void 0:E.sessions)??[],onSelect:h})]}),x.jsx("div",{className:"workspace-grid",children:x.jsx("div",{className:"workspace-main",children:x.jsx("div",{className:"role-console-stack",children:N.map(de=>{const se=de.name,we=se===r,je=(E==null?void 0:E.sessions)??[],He=yv(je,se),Pe=He?ek(K,He.id,se):void 0;return x.jsx("div",{className:we?"role-console-panel is-active":"role-console-panel","aria-hidden":!we,children:x.jsx(Z2,{role:se,session:He,permissionMode:v[se],model:y[se],effort:L[se],active:we,busy:R,translationEnabled:l,translationAutoSendEnabled:d,translationTargetLanguage:m,translationPanelState:Pe,onClearTranslationSession:(xe,xt)=>{Y(yt=>nk(yt,xe,xt))},onTranslationEntry:(xe,xt,yt)=>{Y(Et=>ik(Et,xe,xt,yt))},onTranslationFailures:(xe,xt,yt)=>{Y(Et=>rk(Et,xe,xt,yt))},onPermissionModeChange:xe=>q(se,xe),onModelChange:xe=>ee(se,xe),onEffortChange:xe=>ae(se,xe),onStart:()=>void pe(async()=>{await Se.startRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:v[se],model:y[se],effort:L[se]}),Q(`started ${se} with ${v[se]} / ${y[se]} / ${L[se]}`)},`Start ${se} session`),onResume:()=>void pe(async()=>{await Se.resumeRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:v[se],model:y[se],effort:L[se]}),Q(`resumed ${se} with ${v[se]} / ${y[se]} / ${L[se]}`)},`Resume ${se} session`),onStop:()=>void pe(async()=>{await Se.stopRoleSession(n.taskSlug,se),Q(`stopped ${se}`)},`Stop ${se} session`),onRestart:()=>void pe(async()=>{await Se.restartRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:v[se],model:y[se],effort:L[se]}),Q(`restarted ${se} with ${v[se]} / ${y[se]} / ${L[se]}`)},`Restart ${se} session`),onNotifyHarnessUpdated:()=>void pe(async()=>{await Se.notifyRoleHarnessUpdated(n.taskSlug,se),Q(`notified ${se} to reload latest harness`)},`Notify ${se} to reload harness`),onTerminalEvent:xe=>Q(`${de.label}: ${xe}`)})},se)})})})})]})}function uk(n){return Wa.some(r=>r.name===n)}function Pg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}function Fg(n){var s;const r={...ak};for(const l of Ns)r[l.name]=((s=n.roles[l.name])==null?void 0:s.permissionMode)??r[l.name];return r}function qg(n){var s;const r={...lk};for(const l of Ns)r[l.name]=((s=n.roles[l.name])==null?void 0:s.model)??r[l.name];return r}function $g(n){var s;const r={...ok};for(const l of Ns)r[l.name]=((s=n.roles[l.name])==null?void 0:s.effort)??r[l.name];return r}const hk=120*1e3,Gg=1400,fk=3;function dk(n){return!!(n!=null&&n.initialized)}function pk(){const[n,r]=te.useState(null),[s,l]=te.useState([]),[d,m]=te.useState(null),[f,o]=te.useState(null),[c,h]=te.useState(null),[p,u]=te.useState(null),[b,C]=te.useState(null),[T,E]=te.useState(null),[S,v]=te.useState(null),[_,y]=te.useState(null),[A,L]=te.useState(null),[D,R]=te.useState(!1),[k,M]=te.useState(null),[j,H]=te.useState(null),[U,F]=te.useState(!1),[K,Y]=te.useState([]),[G,W]=te.useState(null),[Z,z]=te.useState(null),[O,N]=te.useState(null),[$,I]=te.useState(null),[re,ve]=te.useState(null),[pe,Q]=te.useState(null),[q,ee]=te.useState("project-manager"),[ae,de]=te.useState("system"),[se,we]=te.useState(!0),[je,He]=te.useState(!0),[Pe,xe]=te.useState("off"),[xt,yt]=te.useState(!1),[Et,an]=te.useState(!1),[Cn,St]=te.useState(!1),[tt,Lt]=te.useState(J0),[he,ye]=te.useState(Z0),[Ae,Me]=te.useState(!1),[Oe,ft]=te.useState(!1),[Fe,gt]=te.useState(!1),[mt,Ot]=te.useState(!1),[Qe,en]=te.useState(!1),[Bt,ln]=te.useState(null),[Gn,Vn]=te.useState("bypassPermissions"),[zt,on]=te.useState("default"),[Wn,Vt]=te.useState("medium"),[Is,Wt]=te.useState(null),[wn,It]=te.useState("bypassPermissions"),[Ii,ze]=te.useState("default"),[di,Pr]=te.useState("medium"),[Fr,Us]=te.useState(()=>t1()),[Kn,el]=te.useState(null),[ii,kt]=te.useState(0),[Ut,Yn]=te.useState(null),[Ps,Io]=te.useState(null),[tl,nl]=te.useState(!1),[Bn,qr]=te.useState(!1),[,cn]=Hi(""),pi=te.useRef({}),mi=te.useRef({}),gi=te.useRef({}),bt=te.useRef({}),Fs=te.useRef({}),Xn=te.useRef(null),Qn=te.useRef(""),ie=te.useMemo(()=>y2(K,G),[K,G]),un=(Kn==null?void 0:Kn.taskSlug)===(ie==null?void 0:ie.taskSlug)?Kn:null,$r=c===(ie==null?void 0:ie.taskSlug)?d:null,qs=p===(ie==null?void 0:ie.taskSlug)?f:null,Uo=!!(n&&ie&&dk($r)),Gr=(Bt==null?void 0:Bt.status)==="running",_i=!!(S!=null&&S.running),jn=!!(Et&&Uo&&Gr),hn=!!(un!=null&&un.statusLoaded),il=!!(ie&&(un!=null&&un.statusLoaded)&&!un.hasAnySession),tn=te.useCallback(V=>{de(V.themeMode),we(V.flowPauseAlerts),He(V.roleRetryEnabled),xe(V.permissionRequestMode),yt(V.autoTaskHarnessReviewEnabled),an(V.translationEnabled),St(V.translationAutoSendEnabled),Lt(V.translationTargetLanguage),ye(V.translationOutputMode),Us(V.launchTemplate)},[]),Nt=te.useCallback(()=>{Xn.current!==null&&(window.clearInterval(Xn.current),Xn.current=null)},[]),$s=te.useCallback(()=>{Nt(),bo(),Xn.current=window.setInterval(()=>{bo()},Gg)},[Nt]),mr=te.useCallback(()=>{Nt();let V=1;bo(),Xn.current=window.setInterval(()=>{V+=1,bo(),V>=fk&&Xn.current!==null&&(window.clearInterval(Xn.current),Xn.current=null)},Gg)},[Nt]),rl=te.useCallback((V,me=`manual-${Date.now()}`,qe={})=>{Yn({id:me,text:V}),qe.sound==="strong"?$s():qe.sound==="weak"?mr():Nt()},[mr,$s,Nt]),fn=te.useCallback(()=>{Nt(),Yn(null)},[Nt]);te.useEffect(()=>{ie!=null&&ie.taskSlug&&(Fs.current[ie.taskSlug]=Date.now())},[ie==null?void 0:ie.taskSlug]);const Gs=te.useCallback(V=>{ie!=null&&ie.taskSlug&&z({taskSlug:ie.taskSlug,messages:V})},[ie==null?void 0:ie.taskSlug]),sl=te.useCallback(V=>{gi.current[V.taskSlug]=V.mode,ie!=null&&ie.taskSlug&&N({taskSlug:ie.taskSlug,orchestration:V})},[ie==null?void 0:ie.taskSlug]),Vs=te.useCallback(V=>{ie!=null&&ie.taskSlug&&I({taskSlug:ie.taskSlug,events:V})},[ie==null?void 0:ie.taskSlug]),Ui=te.useCallback(V=>{if(!(ie!=null&&ie.taskSlug)||V.taskSlug!==ie.taskSlug)return;ve({taskSlug:V.taskSlug,roundState:V});const me=S2({mode:gi.current[V.taskSlug],status:V.status,activeRole:V.activeRole,lastFollowedRole:bt.current[V.taskSlug]});me&&(bt.current[V.taskSlug]=me,ee(me));const qe=b2(V,Ck);if(qe===null){mi.current[V.taskSlug]={status:V.status};return}const pn=yk(V),yr=pi.current[V.taskSlug],Jr=mi.current[V.taskSlug];if(mi.current[V.taskSlug]={status:V.status},yr===pn||(pi.current[V.taskSlug]=pn,!vk(V,Jr,Fs.current[V.taskSlug])))return;if(_i){Nt(),Yn(null);return}const hl=se?_k(V)>=hk?"strong":"weak":"none";rl(qe,pn,{sound:hl})},[ie==null?void 0:ie.taskSlug,_i,se,rl,Nt]),al=te.useCallback(V=>{el(me=>(me==null?void 0:me.taskSlug)===V.taskSlug&&me.statusLoaded===V.statusLoaded&&me.sessionCount===V.sessionCount&&me.hasAnySession===V.hasAnySession&&me.hasGateReviewerSession===V.hasGateReviewerSession&&me.allRolesHaveSession===V.allRolesHaveSession&&me.autoOrchestration===V.autoOrchestration&&JSON.stringify(me.roles)===JSON.stringify(V.roles)?me:V)},[]);async function vi(){const V=await Se.listTasks();return Y(V),W(me=>{var qe;return me&&V.some(pn=>pn.taskSlug===me)?me:((qe=V[0])==null?void 0:qe.taskSlug)??null}),V}async function ri(V=ie==null?void 0:ie.taskSlug){if(!V)return m(null),h(null),null;const me=await Se.getHarnessStatus(V);return m(me),h(V),me}async function Ws(V=ie==null?void 0:ie.taskSlug){if(!V)return o(null),u(null),null;const me=await Se.getHarnessBootstrapStatus(V);return o(me),u(V),me}async function yi(){const V=await Se.getGatewayStatus();return v(V),V}async function ll(){const V=await Se.getRecentRepositoryPaths();return l(V),V}async function Vr(){if(!n)return Me(!1),!1;const V=await Se.getTranslationState();return Me(V.memoryInitialized),V.memoryInitialized}async function Ks(V){const[me,qe]=await Promise.all([Se.listMessages(V),Se.getOrchestrationState(V)]);z({taskSlug:V,messages:me}),N({taskSlug:V,orchestration:qe})}async function ol(V){const me=await Se.getGateReviewState(V);return Q({taskSlug:V,state:me}),Do("Poll Gate Review state"),cn(qe=>xo(qe,["Refresh Gate Review state","Poll Gate Review state"])),me}function gr(V,me){const qe=gv(V,me);qe&&cn(qe)}function Kt(V){V&&(Vn(V.permissionMode),V.model&&on(V.model),V.effort&&Vt(V.effort))}async function Wr(V={}){const me=await Se.getTranslatorSession();return ln(me),V.syncLaunchOptions&&Kt(me),me}function si(V){V&&(It(V.permissionMode),V.model&&ze(V.model),V.effort&&Pr(V.effort))}async function nn(V={}){const me=await Se.getHarnessEngineerSession();return Wt(me),V.syncLaunchOptions&&si(me),me}function Pi(V,me,qe={}){var pn;ln(V.translatorSession),Me(!!((pn=V.translationState)!=null&&pn.memoryInitialized)),Wt(V.harnessEngineerSession),E(V.harnessFeedbackState),v(V.gatewayStatus),me&&V.harnessStatus?(m(V.harnessStatus),h(me)):(m(null),h(null)),me&&V.harnessBootstrapStatus?(o(V.harnessBootstrapStatus),u(me)):(o(null),u(null)),qe.syncLaunchOptions&&(Kt(V.translatorSession),si(V.harnessEngineerSession))}async function cl(V={}){if(!n)return ln(null),Me(!1),Wt(null),m(null),o(null),h(null),u(null),E(null),null;const me=(ie==null?void 0:ie.taskSlug)??null,qe=await Se.getProjectRuntimeState(me);return Pi(qe,me,V),qe}function Ys(){const V=["Poll project runtime state","Load project runtime state","Refresh Harness feedback state","Poll Harness feedback state","Load Translator session","Poll Translator session","Poll translation memory status","Load Harness Engineer session","Poll Harness Engineer session","Load VCM Harness status","Poll VCM Harness status"];for(const me of V)Do(me);cn(me=>xo(me,V))}te.useEffect(()=>{Promise.all([Se.getCurrentProject(),Se.getRecentRepositoryPaths(),Se.getAppPreferences(),Se.getGatewayStatus()]).then(async([V,me,qe,pn])=>{r(V),l(me),v(pn),tn(qe),V&&await vi()}).catch(V=>cn(pt("Load initial app data",V)))},[tn]),te.useEffect(()=>{const V=window.matchMedia("(prefers-color-scheme: dark)"),me=()=>nl(V.matches);return me(),V.addEventListener("change",me),()=>V.removeEventListener("change",me)},[]),te.useEffect(()=>()=>Nt(),[Nt]),te.useEffect(()=>{_i&&(Nt(),Yn(null))},[_i,Nt]),te.useEffect(()=>{const V=ae==="system"?tl?"dark":"light":ae;document.documentElement.dataset.theme=V,document.documentElement.dataset.themeMode=ae},[tl,ae]),te.useEffect(()=>{if(!(ie!=null&&ie.taskSlug)){Q(null);return}ol(ie.taskSlug).catch(V=>cn(pt("Refresh Gate Review state",V)))},[ie==null?void 0:ie.taskSlug]),te.useEffect(()=>{Qn.current="",ln(null),Vn("bypassPermissions"),on("default"),Vt("medium"),Me(!1),Wt(null),It("bypassPermissions"),ze("default"),Pr("medium"),m(null),o(null),h(null),u(null),E(null)},[n==null?void 0:n.repoRoot]),Xa(n?`project-runtime:${n.repoRoot}:${(ie==null?void 0:ie.taskSlug)??"no-task"}`:null,async()=>{try{const V=(n==null?void 0:n.repoRoot)??"",me=!!(n&&Qn.current!==V);await cl({syncLaunchOptions:me}),me&&(Qn.current=V),Ys()}catch(V){gr("Poll project runtime state",V)}},{intervalMs:3e3,runImmediately:!0});const dn=(ie==null?void 0:ie.taskSlug)??null,Si=dn&&(pe==null?void 0:pe.taskSlug)===dn?pe.state:null,xn=dn&&(re==null?void 0:re.taskSlug)===dn?re.roundState:null,_r=dn&&(Kn==null?void 0:Kn.taskSlug)===dn?Kn:null,vr=!!(dn&&(Si!=null&&Si.activeGate||(xn==null?void 0:xn.activeRole)==="gate-reviewer"||_r!=null&&_r.hasGateReviewerSession));Xa(vr&&dn?`gate-review:${dn}`:null,async()=>{if(dn)try{await ol(dn)}catch(V){gr("Poll Gate Review state",V)}},{intervalMs:3e3,runImmediately:!1});async function ke(V,me="Run UI action"){qr(!0),cn("");try{await V()}catch(qe){cn(pt(me,qe))}finally{qr(!1)}}async function Xs(){if(!ie)throw new Error("Create or select a task before closing it.");const V=[`Close task "${ie.taskSlug}"?`,"","This is destructive:","- stops VCM-managed running role sessions for this task","- moves project-scoped Translator and Harness Engineer sessions to the base repository cwd",`- deletes the task worktree: ${ie.worktreePath}`,`- deletes the Git branch: ${ie.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
96
|
-
`);window.confirm(V)&&(await Se.cleanupTask(ie.taskSlug,{force:!0,forceDeleteBranch:!0}),W(null),z(null),N(null),I(null),ve(null),Q(null),kt(qe=>qe+1),await vi())}const Kr=Z&&Z.taskSlug===(ie==null?void 0:ie.taskSlug)?Z.messages:[],ul=O&&O.taskSlug===(ie==null?void 0:ie.taskSlug)?O.orchestration:null,Yr=$&&$.taskSlug===(ie==null?void 0:ie.taskSlug)?$.events:[],Yt=re&&re.taskSlug===(ie==null?void 0:ie.taskSlug)?re.roundState:null,Xr=ie!=null&&ie.taskSlug&&(Yt!=null&&Yt.roleRecovery)?Sk(ie.taskSlug,Yt.roleRecovery):null,Pt=Yt!=null&&Yt.roleRecovery&&Yt.roleRecovery.status!=="failed"&&Xr!==Ps?bk(Yt.roleRecovery):null,Jn=pe&&pe.taskSlug===(ie==null?void 0:ie.taskSlug)?pe.state:null,Qr=!!(Jn&&Object.values(Jn.gates).some(V=>V.required));return x.jsxs(n1,{sidebar:x.jsx(N2,{project:n,recentRepositoryPaths:s,tasks:K,activeTaskSlug:(ie==null?void 0:ie.taskSlug)??null,messages:Kr,orchestration:ul,events:Yr,roundState:Yt,gateReview:Jn,translationEnabled:jn,translationAutoSendEnabled:Cn,translationTargetLanguage:tt,translationOutputMode:he,translationMemoryInitialized:Ae,translatorSession:Bt,harnessStatus:$r,harnessBootstrapStatus:qs,harnessApplyResult:b,autoTaskHarnessReviewEnabled:xt,gatewayStatus:S,gatewayQrLogin:_,gatewayQrCheck:A,gatewayLarkRegistration:k,gatewayLarkRegistrationCheck:j,busy:Bn,onConnect:V=>ke(async()=>{const me=await Se.connectProject({repoPath:V});r(me),C(null),await Promise.all([vi(),ll()])},"Connect repository"),onRefreshConnectedRepository:()=>ke(async()=>{const V=await Se.getCurrentProject();r(V)},"Refresh connected repository"),onPullConnectedRepository:()=>ke(async()=>{const V=await Se.pullCurrentProject();r(V)},"Pull connected repository"),onRefreshHarness:()=>ke(async()=>{if(!ie)throw new Error("Create or select a task before refreshing VCM Harness.");C(null),await Promise.all([ri(ie.taskSlug),Ws(ie.taskSlug)])},"Refresh VCM Harness"),onApplyHarness:()=>ke(async()=>{if(!ie)throw new Error("Create or select a task before applying VCM Harness.");const V=await Se.applyHarness({taskSlug:ie.taskSlug});C(V),await Promise.all([ri(ie.taskSlug),Ws(ie.taskSlug)])},"Apply VCM Harness"),onStartHarnessBootstrap:V=>ke(async()=>{if(!ie)throw new Error("Create or select a task before starting Harness Bootstrap.");const me=await Se.startHarnessBootstrap({taskSlug:ie.taskSlug,cols:120,rows:32,...V});o(me.status),u(ie.taskSlug),await nn({syncLaunchOptions:!0})},"Start Harness Bootstrap"),onRestartHarnessBootstrap:V=>ke(async()=>{if(!ie)throw new Error("Create or select a task before restarting Harness Bootstrap.");const me=await Se.restartHarnessBootstrap({taskSlug:ie.taskSlug,cols:120,rows:32,...V});o(me.status),u(ie.taskSlug),await nn({syncLaunchOptions:!0})},"Restart Harness Bootstrap"),onStopHarnessBootstrap:()=>ke(async()=>{const V=await Se.stopHarnessBootstrap();o(V),u((ie==null?void 0:ie.taskSlug)??null),await nn()},"Stop Harness Bootstrap"),onRunHarnessBootstrap:()=>ke(async()=>{if(!ie)throw new Error("Create or select a task before running Harness Bootstrap.");const V=await Se.runHarnessBootstrap({taskSlug:ie.taskSlug});o(V.status),u(ie.taskSlug),await nn()},"Run Harness Bootstrap"),onOpenHarnessStudio:()=>Ot(!0),onOpenRepositoryDiff:()=>en(!0),onAutoTaskHarnessReviewChange:V=>{yt(V),ke(async()=>{const me=await Se.updateAppPreferences({autoTaskHarnessReviewEnabled:V});tn(me)},"Update auto task harness review setting")},onRefreshGateway:()=>ke(async()=>{await yi()},"Refresh Gateway status"),onGatewayEnabledChange:V=>{ke(async()=>{const me=await Se.updateGatewaySettings({enabled:V,...V&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(ie==null?void 0:ie.taskSlug)??null}:{}});v(me),V&&tn(await Se.getAppPreferences())},"Update Gateway enabled setting")},onGatewaySettingsChange:V=>ke(async()=>{const me=await Se.updateGatewaySettings(V);v(me)},"Update Gateway settings"),onGatewayTranslationChange:V=>{ke(async()=>{const me=await Se.updateGatewaySettings({translationEnabled:V});v(me)},"Update Gateway translation setting")},onStartGatewayQrLogin:()=>{ke(async()=>{const V=await Se.startGatewayQrLogin();y(V),L(null),R(!0),await yi()},"Start Gateway QR login")},onStartGatewayLarkRegistration:()=>{ke(async()=>{const V=await Se.startGatewayLarkRegistration();M(V),H(null),F(!0),await yi()},"Start Lark Gateway QR setup")},onResetGatewayBinding:()=>{ke(async()=>{const V=await Se.resetGatewayBinding();v(V),y(null),L(null),R(!1),M(null),H(null),F(!1)},"Reset Gateway binding")},onGateReviewGateEnabledChange:(V,me)=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before changing Gate Review Gates.");const qe=await Se.updateGateReviewSettings(ie.taskSlug,{gates:{[V]:me}});Q({taskSlug:ie.taskSlug,state:qe})},`Update ${V} Gate Review setting`)},onTranslationEnabledChange:V=>{an(V),ke(async()=>{const me=await Se.updateAppPreferences({translationEnabled:V});tn(me)},"Update conversation translation setting")},onTranslationAutoSendChange:V=>{St(V),ke(async()=>{const me=await Se.updateAppPreferences({translationAutoSendEnabled:V});tn(me)},"Update translation auto-send setting")},onTranslationTargetLanguageChange:V=>{Lt(V),ke(async()=>{const me=await Se.updateAppPreferences({translationTargetLanguage:V});tn(me)},"Update translation target language")},onTranslationOutputModeChange:V=>{ye(V),ke(async()=>{const me=await Se.updateAppPreferences({translationOutputMode:V});tn(me)},"Update translation output mode")},onOpenFileTranslation:()=>ft(!0),onOpenTranslatorSession:()=>gt(!0),onCreateTranslationBootstrap:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before running Translation Bootstrap.");await Se.createTranslationBootstrap({taskSlug:ie.taskSlug,targetLanguage:tt}),await Vr(),await Wr()},"Create Translation Bootstrap task")},onUpdateTranslationMemory:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before updating translation memory.");await Se.createTranslationMemoryUpdate({taskSlug:ie.taskSlug,targetLanguage:tt}),await Vr(),await Wr()},"Create translation memory update task")},onCreateTask:V=>ke(async()=>{const me=await Se.createTask(V);await vi(),W(me.taskSlug)},"Create task"),onCloseTask:()=>{ke(Xs,"Close task")},onSelectTask:W,themeMode:ae,onAutoOrchestrationChange:V=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before changing auto orchestration.");const me=await Se.updateOrchestrationState(ie.taskSlug,{mode:V?"auto":"manual"});N({taskSlug:ie.taskSlug,orchestration:me})},"Update auto orchestration mode")},onThemeModeChange:V=>{de(V),ke(async()=>{const me=await Se.updateAppPreferences({themeMode:V});tn(me)},"Update theme setting")},pauseAlertSound:se,onPauseAlertSoundChange:V=>{we(V),V&&kk(),ke(async()=>{const me=await Se.updateAppPreferences({flowPauseAlerts:V});tn(me)},"Update pause alert sound setting")},roleRetryEnabled:je,onRoleRetryEnabledChange:V=>{He(V),ke(async()=>{const me=await Se.updateAppPreferences({roleRetryEnabled:V});tn(me)},"Update CC retry setting")},permissionRequestMode:Pe,onPermissionRequestModeChange:V=>{xe(V),ke(async()=>{const me=await Se.updateAppPreferences({permissionRequestMode:V});tn(me)},"Update permission request setting")},launchTemplate:Fr,canSaveLaunchTemplate:hn,canOneClickStart:il,onSaveLaunchTemplate:()=>{ke(async()=>{if(!(un!=null&&un.statusLoaded))throw new Error("Open a task workspace before saving a launch template.");const V=await Se.updateAppPreferences({launchTemplate:{version:1,roles:un.roles,autoOrchestration:un.autoOrchestration}});tn(V)},"Save launch template")},onOneClickStart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before one-click start.");const V=await Se.oneClickStart(ie.taskSlug);N({taskSlug:ie.taskSlug,orchestration:V.orchestration}),ee("project-manager"),await Ks(ie.taskSlug),await vi(),kt(me=>me+1)},"One-click start role sessions")},onMarkAllMessagesDone:V=>{ke(async()=>{const me=await Se.markAllMessagesDone(V);z({taskSlug:V,messages:me.messages}),await Ks(V)},"Mark all role messages done")},onDeleteMessageHistory:V=>{ke(async()=>{const me=await Se.deleteMessageHistory(V);z({taskSlug:V,messages:me.messages}),await Ks(V)},"Delete role message history")}}),children:[x.jsx(_2,{}),x.jsx(xk,{roundState:Yt}),Ut?x.jsx("div",{className:"flow-pause-alert-backdrop",children:x.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[x.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),x.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),x.jsx("p",{id:"flow-pause-alert-body",children:Ut.text}),x.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),x.jsx("button",{type:"button",autoFocus:!0,onClick:fn,children:"Confirm"})]})}):null,Pt&&Xr?x.jsxs("div",{className:"role-recovery-toast",role:"status",children:[x.jsx("span",{children:Pt}),x.jsx("button",{type:"button",onClick:()=>Io(Xr),children:"Close"})]}):null,D&&_?x.jsx(mk,{busy:Bn,qrCheck:A,qrLogin:_,onCheck:()=>{ke(async()=>{const V=await Se.checkGatewayQrLogin();L(V),(V.status==="confirmed"||V.status==="binded_redirect")&&R(!1),await yi()})},onClose:()=>R(!1)}):null,U&&k?x.jsx(gk,{busy:Bn,registration:k,registrationCheck:j,onCheck:()=>{ke(async()=>{const V=await Se.checkGatewayLarkRegistration();H(V),V.gatewayStatus&&v(V.gatewayStatus),V.status==="confirmed"&&(F(!1),await yi())},"Check Lark Gateway QR setup")},onManualBind:(V,me)=>{ke(async()=>{const qe=await Se.bindGatewayLarkApp({appId:V,appSecret:me,larkDomain:"lark"});H(qe),qe.gatewayStatus&&v(qe.gatewayStatus),qe.status==="confirmed"&&(F(!1),await yi())},"Bind Lark Gateway app")},onClose:()=>F(!1)}):null,n&&ie?x.jsx(ck,{task:ie,activeRole:q,gateReviewerEnabled:Qr,translationEnabled:jn,translationAutoSendEnabled:Cn,translationTargetLanguage:tt,launchTemplate:Fr,refreshNonce:ii,onTaskChanged:async()=>{await vi()},onActiveRoleChange:ee,onMessagesChanged:Gs,onOrchestrationChanged:sl,onRoundStateChanged:Ui,onEventsChanged:Vs,onLaunchStateChanged:al}):x.jsxs("section",{className:"empty-workspace",children:[x.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),x.jsx("p",{children:n?"Tasks create local role commands and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, and handoff artifacts."})]}),x.jsx(r2,{open:Oe,taskSlug:(ie==null?void 0:ie.taskSlug)??null,targetLanguage:tt,onClose:()=>ft(!1)}),x.jsx(S1,{open:mt,busy:Bn,status:$r,bootstrapStatus:qs,engineerSession:Is,permissionMode:wn,model:Ii,effort:di,taskSlug:(ie==null?void 0:ie.taskSlug)??null,onClose:()=>Ot(!1),onRefresh:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before refreshing Harness Studio.");await Promise.all([ri(ie.taskSlug),Ws(ie.taskSlug),nn()])},"Refresh Harness Studio")},onPermissionModeChange:It,onModelChange:ze,onEffortChange:Pr,onEngineerStart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before starting Harness Engineer.");const V=await Se.startHarnessEngineerSession({taskSlug:ie.taskSlug,cols:120,rows:32,permissionMode:wn,model:Ii,effort:di});Wt(V),si(V)},"Start Harness Engineer")},onEngineerResume:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before resuming Harness Engineer.");const V=await Se.resumeHarnessEngineerSession({taskSlug:ie.taskSlug,cols:120,rows:32,permissionMode:wn,model:Ii,effort:di});Wt(V),si(V)},"Resume Harness Engineer")},onEngineerRestart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before restarting Harness Engineer.");const V=await Se.restartHarnessEngineerSession({taskSlug:ie.taskSlug,cols:120,rows:32,permissionMode:wn,model:Ii,effort:di});Wt(V),si(V)},"Restart Harness Engineer")},onEngineerStop:()=>{ke(async()=>{const V=await Se.stopHarnessEngineerSession();Wt(V)},"Stop Harness Engineer")},onEngineerNotifyHarnessUpdated:()=>{ke(async()=>{const V=await Se.notifyHarnessEngineerHarnessUpdated();Wt(V),si(V)},"Notify Harness Engineer to reload harness")},onOpenRepositoryDiff:()=>en(!0),onReviewTaskHarness:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before reviewing task harness.");const V=await Se.startTaskHarnessRetrospective({taskSlug:ie.taskSlug,trigger:"manual"});E(V),await nn({syncLaunchOptions:!0})},"Review task harness")}}),x.jsx(C1,{open:Qe,taskSlug:(ie==null?void 0:ie.taskSlug)??null,onClose:()=>en(!1)}),x.jsx(A1,{open:Fe,busy:Bn,session:Bt,permissionMode:Gn,model:zt,effort:Wn,onClose:()=>gt(!1),onPermissionModeChange:Vn,onModelChange:on,onEffortChange:Vt,onStart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before starting Translator.");const V=await Se.startTranslatorSession({taskSlug:ie.taskSlug,cols:100,rows:28,permissionMode:Gn,model:zt,effort:Wn});ln(V),Kt(V)},"Start Translator session")},onResume:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before resuming Translator.");const V=await Se.resumeTranslatorSession({taskSlug:ie.taskSlug,cols:100,rows:28,permissionMode:Gn,model:zt,effort:Wn});ln(V),Kt(V)},"Resume Translator session")},onRestart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before restarting Translator.");const V=await Se.restartTranslatorSession({taskSlug:ie.taskSlug,cols:100,rows:28,permissionMode:Gn,model:zt,effort:Wn});ln(V),Kt(V)},"Restart Translator session")},onStop:()=>{ke(async()=>{const V=await Se.stopTranslatorSession();ln(V)},"Stop Translator session")},onNotifyHarnessUpdated:()=>{ke(async()=>{const V=await Se.notifyTranslatorHarnessUpdated();ln(V),Kt(V)},"Notify Translator to reload harness")}}),x.jsx(i1,{busy:Bn,state:T,onCancel:V=>{ke(async()=>{const me=await Se.decideHarnessFeedback({action:"cancel",taskSlug:ie==null?void 0:ie.taskSlug,comment:V});E(me)},"Cancel Harness feedback")},onApprove:V=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before approving Harness feedback.");const me=await Se.decideHarnessFeedback({action:"approve",taskSlug:ie.taskSlug,comment:V});E(me),await nn()},"Approve Harness feedback")},onComment:V=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before sending Harness feedback comments.");const me=await Se.decideHarnessFeedback({action:"comment",taskSlug:ie.taskSlug,comment:V});E(me),await nn()},"Send Harness feedback comment")},onReject:V=>{ke(async()=>{const me=await Se.decideHarnessFeedback({action:"reject",taskSlug:ie==null?void 0:ie.taskSlug,comment:V});E(me)},"Reject Harness feedback")}})]})}function mk({busy:n,onCheck:r,onClose:s,qrCheck:l,qrLogin:d}){const[m,f]=te.useState(""),[o,c]=Hi("");return te.useEffect(()=>{let h=!1;if(c(""),f(""),d.qrcodeUrl.startsWith("data:image/")){f(d.qrcodeUrl);return}try{const p=Ir(0,"M");p.addData(d.qrcodeUrl),p.make(),h||f(p.createDataURL(8,2))}catch(p){h||c(pt("Render Gateway QR login code",p))}return()=>{h=!0}},[d.qrcodeUrl]),x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),x.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),x.jsx("button",{type:"button",onClick:s,children:"Close"})]}),x.jsxs("div",{className:"gateway-qr-modal-body",children:[x.jsx("div",{className:"gateway-qr-code-frame",children:m?x.jsx("img",{alt:"Weixin Gateway QR login",src:m}):x.jsx("div",{className:"gateway-qr-placeholder",children:o?"QR code could not be rendered.":"Rendering QR code..."})}),x.jsxs("dl",{className:"gateway-qr-meta",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Status"}),x.jsx("dd",{children:(l==null?void 0:l.status)??d.status})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Expires"}),x.jsx("dd",{children:Cv(d.expiresAt)})]}),l!=null&&l.message?x.jsxs("div",{children:[x.jsx("dt",{children:"Message"}),x.jsx("dd",{children:l.message})]}):null]})]}),x.jsx("footer",{children:x.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function gk({busy:n,onCheck:r,onClose:s,onManualBind:l,registration:d,registrationCheck:m}){const[f,o]=te.useState(""),[c,h]=Hi(""),[p,u]=te.useState(""),[b,C]=te.useState(""),[T,E]=Hi("");return te.useEffect(()=>{let S=!1;h(""),o("");try{const v=Ir(0,"M");v.addData(d.qrUrl),v.make(),S||o(v.createDataURL(8,2))}catch(v){S||h(pt("Render Lark Gateway setup QR code",v))}return()=>{S=!0}},[d.qrUrl]),x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{"aria-labelledby":"gateway-lark-registration-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{id:"gateway-lark-registration-title",children:"Lark Gateway Setup"}),x.jsx("p",{className:"muted",children:"Scan with Lark, approve bot creation, then click Confirm."})]}),x.jsx("button",{type:"button",onClick:s,children:"Close"})]}),x.jsxs("div",{className:"gateway-qr-modal-body",children:[x.jsx("div",{className:"gateway-qr-code-frame",children:f?x.jsx("img",{alt:"Lark Gateway setup QR code",src:f}):x.jsx("div",{className:"gateway-qr-placeholder",children:c?"QR code could not be rendered.":"Rendering QR code..."})}),x.jsx("div",{className:"gateway-qr-actions",children:x.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})}),x.jsxs("dl",{className:"gateway-qr-meta",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Status"}),x.jsx("dd",{children:(m==null?void 0:m.status)??d.status})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Expires"}),x.jsx("dd",{children:Cv(d.expiresAt)})]}),d.userCode?x.jsxs("div",{children:[x.jsx("dt",{children:"User Code"}),x.jsx("dd",{children:d.userCode})]}):null,m!=null&&m.larkBotName?x.jsxs("div",{children:[x.jsx("dt",{children:"Bot"}),x.jsx("dd",{children:m.larkBotName})]}):null,m!=null&&m.message?x.jsxs("div",{children:[x.jsx("dt",{children:"Message"}),x.jsx("dd",{children:m.message})]}):null]}),x.jsxs("form",{className:"gateway-manual-bind",onSubmit:S=>{S.preventDefault();const v=p.trim(),_=b.trim();if(!v||!_){E("Enter both App ID and App Secret.");return}E(""),C(""),l(v,_)},children:[x.jsxs("div",{children:[x.jsx("label",{htmlFor:"gateway-lark-app-id",children:"App ID"}),x.jsx("input",{id:"gateway-lark-app-id",autoComplete:"off",disabled:n,value:p,onChange:S=>u(S.currentTarget.value),placeholder:"cli_xxx"})]}),x.jsxs("div",{children:[x.jsx("label",{htmlFor:"gateway-lark-app-secret",children:"App Secret"}),x.jsx("input",{id:"gateway-lark-app-secret",autoComplete:"off",disabled:n,type:"password",value:b,onChange:S=>C(S.currentTarget.value),placeholder:"Enter App Secret"})]}),T?x.jsx("p",{className:"form-error",children:T}):null,x.jsx("button",{type:"submit",disabled:n,children:"Bind manually"})]})]})]})})}function Cv(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let Hr=null;function _k(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function vk(n,r,s){if((r==null?void 0:r.status)==="running")return!0;const l=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!!(s&&Number.isFinite(l)&&l>s)}function yk(n){const r=n.roundId??n.startedAt??n.taskSlug,s=n.stoppedAt??n.lastTurnEndedAt??"stopped";return`${r}:${s}`}function Sk(n,r){return`${n}:${r.role}:${r.lastFailureAt}`}function bk(n){const r=xv(n.role),s=wv(n);return n.status==="retrying"?`CC 出错,正在重试 ${r}${s} · 第 ${n.attempt}/${n.maxAttempts} 次`:`CC 出错,重试中 ${r}${s} · 第 ${n.attempt}/${n.maxAttempts} 次 · ${Ek(n.nextRetryAt)}`}function Ck(n,r){const s=wv(n);return n.retryable===!1?`CC stopped for ${r}: ${wk(n)} cannot be fixed by retrying.`:`CC retry failed after ${n.maxAttempts} attempts for ${r}${s}.`}function wv(n){return!n.error||n.error==="unknown"?"":` · ${n.error}`}function wk(n){return n.error&&n.error!=="unknown"?n.error:"this error"}function xk({roundState:n}){const r=n==null?void 0:n.flowPause;return(r==null?void 0:r.reason)!=="awaiting-user"?null:x.jsxs("section",{className:"await-user-banner",role:"status","aria-live":"polite",children:[x.jsx("p",{className:"await-user-banner-kicker",children:"Awaiting your input"}),x.jsxs("h2",{className:"await-user-banner-title",children:[xv(r.role??"project-manager")," is waiting for your decision"]}),r.message?x.jsxs(x.Fragment,{children:[x.jsx("p",{className:"await-user-banner-message",children:r.message}),r.messageTruncated?x.jsx("p",{className:"await-user-banner-truncated",children:"Message truncated — open the session for the full reply."}):null]}):x.jsx("p",{className:"await-user-banner-message await-user-banner-empty",children:"Open the project-manager session to see the latest reply."})]})}function xv(n){return n.split("-").filter(Boolean).map(r=>`${r.slice(0,1).toUpperCase()}${r.slice(1)}`).join(" ")}function Ek(n){if(!n)return"即将重试";const r=Date.parse(n)-Date.now();return!Number.isFinite(r)||r<=0?"即将重试":`${Math.ceil(r/6e4)} 分钟后`}async function kk(){const n=Ev();return n?kv(n):!1}async function bo(){const n=Ev();if(!n||!await kv(n))return!1;try{const s=n.createGain(),l=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),Kg(n,s,{frequency:587.33,startAt:l,duration:.18,peakGain:.045}),Kg(n,s,{frequency:783.99,startAt:l+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function Ev(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Hr||Hr.state==="closed")&&(Hr=new n),Hr}catch{return null}}function Vg(n){Hr=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function kv(n){if(Wg(n))return!0;try{await n.resume();const r=Wg(n);return!r&&n===Hr&&Vg(n),r}catch{return n===Hr&&Vg(n),!1}}function Wg(n){return n.state==="running"}function Kg(n,r,s){const l=n.createGain(),d=n.createOscillator(),m=n.createOscillator(),f=s.startAt+s.duration;l.gain.setValueAtTime(1e-4,s.startAt),l.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),l.gain.exponentialRampToValueAtTime(1e-4,f),d.type="sine",d.frequency.setValueAtTime(s.frequency,s.startAt),m.type="triangle",m.frequency.setValueAtTime(s.frequency*2.01,s.startAt),d.connect(l),m.connect(l),l.connect(r),d.start(s.startAt),m.start(s.startAt),d.stop(f+.02),m.stop(f+.02)}const Av=document.getElementById("root");if(!Av)throw new Error("Missing #root element.");U0.createRoot(Av).render(x.jsx(te.StrictMode,{children:x.jsx(pk,{})}));
|
|
95
|
+
`))&&m()}return x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{className:"message-modal",role:"dialog","aria-modal":"true","aria-label":"Messages",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{children:"Messages"}),x.jsxs("p",{className:"muted",children:[f.total," total / ",f.accepted," accepted",s?` · ${s.mode}`:""]})]}),x.jsxs("div",{className:"modal-actions",children:[x.jsx("button",{type:"button",disabled:n,onClick:o,children:"Mark All Done"}),x.jsx("button",{type:"button",disabled:n||f.total===0,onClick:c,children:"Delete All"}),x.jsx("button",{type:"button",onClick:l,children:"Close"})]})]}),x.jsx(D2,{busy:n,maxMessages:null,messages:r,orchestration:s,showControls:!1,showHeader:!1})]})})}function Nr({children:n,onOpenChange:r,open:s,title:l}){return x.jsxs("section",{className:"sidebar-section",children:[x.jsxs("button",{"aria-expanded":s,className:"sidebar-section-toggle",type:"button",onClick:()=>{r==null||r(!s)},children:[x.jsx("span",{children:l}),x.jsx("span",{"aria-hidden":"true",className:"sidebar-section-chevron"})]}),s?x.jsx("div",{className:"sidebar-section-content",children:n}):null]})}function yv(n,r){return n.find(s=>s.role===r)}function J2({activeRole:n,roles:r=Dh,sessions:s,onSelect:l}){return x.jsx("div",{className:"role-tabs",role:"tablist","aria-label":"Role sessions",children:r.map(d=>{const m=yv(s,d.name),f=(m==null?void 0:m.status)==="running"?m.activityStatus??"idle":(m==null?void 0:m.status)??"not_started";return x.jsxs("button",{className:d.name===n?"role-tab is-active":"role-tab",type:"button",role:"tab","aria-selected":d.name===n,onClick:()=>l(d.name),children:[x.jsx("span",{children:d.label}),x.jsx(Ni,{status:f})]},d.name)})})}function Z2({role:n,session:r,permissionMode:s,model:l,effort:d,active:m=!0,busy:f,translationEnabled:o,translationAutoSendEnabled:c,translationTargetLanguage:h,translationPanelState:p,onClearTranslationSession:u,onTranslationEntry:b,onTranslationFailures:C,onPermissionModeChange:T,onModelChange:E,onEffortChange:S,onStart:v,onResume:_,onStop:y,onRestart:A,onNotifyHarnessUpdated:L,onTerminalEvent:D}){const R=m&&X0(n)&&o&&(r==null?void 0:r.status)==="running";return x.jsx("section",{className:"session-console",children:x.jsxs("div",{className:R?"session-console-body has-translation":"session-console-body",children:[x.jsxs("div",{className:"terminal-pane",children:[x.jsx(Mh,{role:n,session:r,permissionMode:s,model:l,effort:d,busy:f,onPermissionModeChange:T,onModelChange:E,onEffortChange:S,onStart:v,onResume:_,onStop:y,onRestart:A,onNotifyHarnessUpdated:L}),(r==null?void 0:r.status)==="running"?x.jsx(Oo,{sessionId:r.id,active:m,onEvent:D},r.id):x.jsxs("div",{className:"terminal-empty",children:[x.jsx("strong",{children:n}),x.jsx("span",{children:r!=null&&r.claudeSessionId?"Resume this role to reconnect its Claude Code conversation.":"Start this role to open an embedded Claude Code terminal."})]})]}),R?x.jsx("div",{className:"translation-pane",children:x.jsx(e2,{active:m,autoSendEnabled:c,targetLanguage:h,taskSlug:r.taskSlug,role:n,sessionId:r.id,panelState:p??{role:n,status:"ready",entries:[],failures:[]},onClearSession:u??(()=>{}),onEntry:b??(()=>{}),onFailures:C??(()=>{})},`${n}:${r.id}`)}):null]})})}const ch=500;function Th(n){return{taskSlug:n,cursor:1,sessions:{}}}function ek(n,r,s){return n.sessions[r]??js(s)}function tk(n,r){const l={...sk(n,r.taskSlug).sessions};for(const d of r.sessions)l[d.sessionId]={...js(d.role),...l[d.sessionId],role:d.role,status:d.status};for(const d of r.events){const m=l[d.sessionId]??js(d.role);if(d.event.type==="status")l[d.sessionId]={...m,role:d.role,status:d.event.status};else if(d.event.type==="failures")l[d.sessionId]={...m,role:d.role,failures:d.event.failures};else if(d.event.type==="entry"){const f=bv(Sv(m.entries,d.event.entry));l[d.sessionId]={...m,role:d.role,entries:f.entries,failures:f.removedIds.size>0?m.failures.filter(o=>!f.removedIds.has(o.translationId)):m.failures}}}return{taskSlug:r.taskSlug,cursor:r.nextCursor,sessions:l}}function nk(n,r,s){return{...n,sessions:{...n.sessions,[r]:js(s)}}}function ik(n,r,s,l){const d=n.sessions[r]??js(s),m=bv(Sv(d.entries,l));return{...n,sessions:{...n.sessions,[r]:{...d,role:s,entries:m.entries,failures:m.removedIds.size>0?d.failures.filter(f=>!m.removedIds.has(f.translationId)):d.failures}}}}function rk(n,r,s,l){const d=n.sessions[r]??js(s);return{...n,sessions:{...n.sessions,[r]:{...d,role:s,failures:l}}}}function sk(n,r){return n.taskSlug===r?n:Th(r)}function js(n){return{role:n,status:"ready",entries:[],failures:[]}}function Sv(n,r){return n.findIndex(l=>l.id===r.id)===-1?[...n,r]:n.map(l=>l.id===r.id?r:l)}function bv(n){if(n.length<=ch)return{entries:n,removedIds:new Set};const r=n.slice(0,n.length-ch);return{entries:n.slice(-ch),removedIds:new Set(r.map(s=>s.id))}}const ak={"project-manager":"bypassPermissions",architect:"bypassPermissions",coder:"bypassPermissions",reviewer:"bypassPermissions","gate-reviewer":"bypassPermissions",translator:"bypassPermissions","harness-engineer":"bypassPermissions"},lk={"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"default","harness-engineer":"default"},ok={"project-manager":"default",architect:"default",coder:"default",reviewer:"default","gate-reviewer":"default",translator:"medium","harness-engineer":"medium"};function ck({task:n,activeRole:r,gateReviewerEnabled:s,translationEnabled:l,translationAutoSendEnabled:d,translationTargetLanguage:m,launchTemplate:f,refreshNonce:o=0,onTaskChanged:c,onActiveRoleChange:h,onMessagesChanged:p,onOrchestrationChanged:u,onRoundStateChanged:b,onEventsChanged:C,onLaunchStateChanged:T}){const[E,S]=te.useState(null),[v,_]=te.useState(()=>Fg(f)),[y,A]=te.useState(()=>qg(f)),[L,D]=te.useState(()=>$g(f)),[R,k]=te.useState(!1),[,M]=Hi(""),[j,H]=te.useState([]),[U,F]=te.useState(null),[K,Y]=te.useState(()=>Th(n.taskSlug)),G=te.useRef(""),W=te.useRef(1),Z=te.useMemo(()=>JSON.stringify(f),[f]),z=!!(E!=null&&E.sessions.some(de=>de.role==="gate-reviewer")),O=s||z,N=[...Wa,...O?[Qg]:[]],$=te.useCallback((de,se)=>{F(se),p==null||p(de),u==null||u(se)},[p,u]),I=te.useCallback((de,se,we,je)=>{S(de),$(se,we),b==null||b(je)},[$,b]),re=te.useCallback(async()=>{const de=await Se.getTaskWorkspaceState(n.taskSlug);I(de.taskStatus,de.messages,de.orchestration,de.roundState),Do("Poll task workspace state"),M(se=>xo(se,["Load task workspace state","Poll task workspace state"]))},[I,n.taskSlug]),ve=te.useCallback((de,se)=>{const we=gv(de,se);we&&M(we)},[]);Xa(`task-workspace:${n.taskSlug}:${o}`,()=>re().catch(de=>{ve("Poll task workspace state",de)}),{intervalMs:3e3,runImmediately:!0}),Xa(l?`task-translation-feed:${n.taskSlug}`:null,async()=>{try{const de=await Se.pollTranslationTaskFeed(n.taskSlug,W.current);W.current=de.nextCursor,Y(se=>tk(se,de)),Do("Poll task translation feed"),M(se=>xo(se,["Poll task translation feed"]))}catch(de){ve("Poll task translation feed",de)}},{intervalMs:1e3,runImmediately:!0}),te.useEffect(()=>{H([]),C==null||C([])},[C,n.taskSlug]),te.useEffect(()=>{W.current=1,Y(Th(n.taskSlug))},[n.taskSlug]),te.useEffect(()=>{_(Fg(f)),A(qg(f)),D($g(f))},[Z,n.taskSlug]),te.useEffect(()=>{E&&!O&&r==="gate-reviewer"&&h("project-manager"),E&&r==="translator"&&h("project-manager")},[r,O,h,E]),te.useEffect(()=>{const de=E==null?void 0:E.task;if(!de||de.taskSlug!==n.taskSlug)return;const se=Pg(de);if(se===Pg(n)){G.current="";return}G.current!==se&&(G.current=se,c().catch(we=>{G.current="",M(pt("Refresh task list after task status changed",we))}))},[c,E==null?void 0:E.task,n]),te.useEffect(()=>{const de=(E==null?void 0:E.sessions)??[],se=de.filter(Pe=>uk(Pe.role)),we=new Set(se.map(Pe=>Pe.role)),je=de.some(Pe=>Pe.role==="gate-reviewer"),He={};for(const Pe of Ns)He[Pe.name]={permissionMode:v[Pe.name],model:y[Pe.name],effort:L[Pe.name]};T==null||T({taskSlug:n.taskSlug,roles:He,autoOrchestration:((U==null?void 0:U.mode)??"auto")==="auto",statusLoaded:!!E,sessionCount:se.length,hasAnySession:se.length>0,hasGateReviewerSession:je,allRolesHaveSession:Wa.every(Pe=>we.has(Pe.name))})},[y,L,T,U==null?void 0:U.mode,v,E,n.taskSlug]);async function pe(de,se="Run role session action"){k(!0),M("");try{await de(),await re(),await c()}catch(we){M(pt(se,we))}finally{k(!1)}}function Q(de){H(se=>{const we=[...se,`${new Date().toLocaleTimeString()} ${de}`];return C==null||C(we),we})}function q(de,se){_(we=>({...we,[de]:se}))}function ee(de,se){A(we=>({...we,[de]:se}))}function ae(de,se){D(we=>({...we,[de]:se}))}return x.jsxs("div",{className:"task-workspace",children:[x.jsxs("header",{className:"workspace-header",children:[x.jsx("div",{className:"workspace-title-line",children:x.jsx("h1",{children:n.title||n.taskSlug})}),x.jsx(J2,{activeRole:r,roles:N,sessions:(E==null?void 0:E.sessions)??[],onSelect:h})]}),x.jsx("div",{className:"workspace-grid",children:x.jsx("div",{className:"workspace-main",children:x.jsx("div",{className:"role-console-stack",children:N.map(de=>{const se=de.name,we=se===r,je=(E==null?void 0:E.sessions)??[],He=yv(je,se),Pe=He?ek(K,He.id,se):void 0;return x.jsx("div",{className:we?"role-console-panel is-active":"role-console-panel","aria-hidden":!we,children:x.jsx(Z2,{role:se,session:He,permissionMode:v[se],model:y[se],effort:L[se],active:we,busy:R,translationEnabled:l,translationAutoSendEnabled:d,translationTargetLanguage:m,translationPanelState:Pe,onClearTranslationSession:(xe,xt)=>{Y(yt=>nk(yt,xe,xt))},onTranslationEntry:(xe,xt,yt)=>{Y(Et=>ik(Et,xe,xt,yt))},onTranslationFailures:(xe,xt,yt)=>{Y(Et=>rk(Et,xe,xt,yt))},onPermissionModeChange:xe=>q(se,xe),onModelChange:xe=>ee(se,xe),onEffortChange:xe=>ae(se,xe),onStart:()=>void pe(async()=>{await Se.startRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:v[se],model:y[se],effort:L[se]}),Q(`started ${se} with ${v[se]} / ${y[se]} / ${L[se]}`)},`Start ${se} session`),onResume:()=>void pe(async()=>{await Se.resumeRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:v[se],model:y[se],effort:L[se]}),Q(`resumed ${se} with ${v[se]} / ${y[se]} / ${L[se]}`)},`Resume ${se} session`),onStop:()=>void pe(async()=>{await Se.stopRoleSession(n.taskSlug,se),Q(`stopped ${se}`)},`Stop ${se} session`),onRestart:()=>void pe(async()=>{await Se.restartRoleSession(n.taskSlug,se,{cols:100,rows:28,permissionMode:v[se],model:y[se],effort:L[se]}),Q(`restarted ${se} with ${v[se]} / ${y[se]} / ${L[se]}`)},`Restart ${se} session`),onNotifyHarnessUpdated:()=>void pe(async()=>{await Se.notifyRoleHarnessUpdated(n.taskSlug,se),Q(`notified ${se} to reload latest harness`)},`Notify ${se} to reload harness`),onTerminalEvent:xe=>Q(`${de.label}: ${xe}`)})},se)})})})})]})}function uk(n){return Wa.some(r=>r.name===n)}function Pg(n){return[n.status,n.updatedAt,n.cleanupStatus??"",n.cleanedAt??""].join(":")}function Fg(n){var s;const r={...ak};for(const l of Ns)r[l.name]=((s=n.roles[l.name])==null?void 0:s.permissionMode)??r[l.name];return r}function qg(n){var s;const r={...lk};for(const l of Ns)r[l.name]=((s=n.roles[l.name])==null?void 0:s.model)??r[l.name];return r}function $g(n){var s;const r={...ok};for(const l of Ns)r[l.name]=((s=n.roles[l.name])==null?void 0:s.effort)??r[l.name];return r}const hk=120*1e3,Gg=1400,fk=3;function dk(n){return!!(n!=null&&n.initialized)}function pk(){const[n,r]=te.useState(null),[s,l]=te.useState([]),[d,m]=te.useState(null),[f,o]=te.useState(null),[c,h]=te.useState(null),[p,u]=te.useState(null),[b,C]=te.useState(null),[T,E]=te.useState(null),[S,v]=te.useState(null),[_,y]=te.useState(null),[A,L]=te.useState(null),[D,R]=te.useState(!1),[k,M]=te.useState(null),[j,H]=te.useState(null),[U,F]=te.useState(!1),[K,Y]=te.useState([]),[G,W]=te.useState(null),[Z,z]=te.useState(null),[O,N]=te.useState(null),[$,I]=te.useState(null),[re,ve]=te.useState(null),[pe,Q]=te.useState(null),[q,ee]=te.useState("project-manager"),[ae,de]=te.useState("system"),[se,we]=te.useState(!0),[je,He]=te.useState(!0),[Pe,xe]=te.useState("off"),[xt,yt]=te.useState(!1),[Et,an]=te.useState(!1),[Cn,St]=te.useState(!1),[tt,Lt]=te.useState(Q0),[he,ye]=te.useState(J0),[Ae,Me]=te.useState(!1),[Oe,ft]=te.useState(!1),[Fe,gt]=te.useState(!1),[mt,Ot]=te.useState(!1),[Qe,Zt]=te.useState(!1),[Bt,ln]=te.useState(null),[Gn,Vn]=te.useState("bypassPermissions"),[zt,on]=te.useState("default"),[Wn,Vt]=te.useState("medium"),[Is,Wt]=te.useState(null),[wn,It]=te.useState("bypassPermissions"),[Ii,ze]=te.useState("default"),[di,Pr]=te.useState("medium"),[Fr,Us]=te.useState(()=>e1()),[Kn,el]=te.useState(null),[ii,kt]=te.useState(0),[Ut,Yn]=te.useState(null),[Ps,Io]=te.useState(null),[tl,nl]=te.useState(!1),[Bn,qr]=te.useState(!1),[,cn]=Hi(""),pi=te.useRef({}),mi=te.useRef({}),gi=te.useRef({}),bt=te.useRef({}),Fs=te.useRef({}),Xn=te.useRef(null),Qn=te.useRef(""),ie=te.useMemo(()=>v2(K,G),[K,G]),un=(Kn==null?void 0:Kn.taskSlug)===(ie==null?void 0:ie.taskSlug)?Kn:null,$r=c===(ie==null?void 0:ie.taskSlug)?d:null,qs=p===(ie==null?void 0:ie.taskSlug)?f:null,Uo=!!(n&&ie&&dk($r)),Gr=(Bt==null?void 0:Bt.status)==="running",_i=!!(S!=null&&S.running),jn=!!(Et&&Uo&&Gr),hn=!!(un!=null&&un.statusLoaded),il=!!(ie&&(un!=null&&un.statusLoaded)&&!un.hasAnySession),en=te.useCallback(V=>{de(V.themeMode),we(V.flowPauseAlerts),He(V.roleRetryEnabled),xe(V.permissionRequestMode),yt(V.autoTaskHarnessReviewEnabled),an(V.translationEnabled),St(V.translationAutoSendEnabled),Lt(V.translationTargetLanguage),ye(V.translationOutputMode),Us(V.launchTemplate)},[]),Nt=te.useCallback(()=>{Xn.current!==null&&(window.clearInterval(Xn.current),Xn.current=null)},[]),$s=te.useCallback(()=>{Nt(),bo(),Xn.current=window.setInterval(()=>{bo()},Gg)},[Nt]),mr=te.useCallback(()=>{Nt();let V=1;bo(),Xn.current=window.setInterval(()=>{V+=1,bo(),V>=fk&&Xn.current!==null&&(window.clearInterval(Xn.current),Xn.current=null)},Gg)},[Nt]),rl=te.useCallback((V,me=`manual-${Date.now()}`,qe={})=>{Yn({id:me,text:V}),qe.sound==="strong"?$s():qe.sound==="weak"?mr():Nt()},[mr,$s,Nt]),fn=te.useCallback(()=>{Nt(),Yn(null)},[Nt]);te.useEffect(()=>{ie!=null&&ie.taskSlug&&(Fs.current[ie.taskSlug]=Date.now())},[ie==null?void 0:ie.taskSlug]);const Gs=te.useCallback(V=>{ie!=null&&ie.taskSlug&&z({taskSlug:ie.taskSlug,messages:V})},[ie==null?void 0:ie.taskSlug]),sl=te.useCallback(V=>{gi.current[V.taskSlug]=V.mode,ie!=null&&ie.taskSlug&&N({taskSlug:ie.taskSlug,orchestration:V})},[ie==null?void 0:ie.taskSlug]),Vs=te.useCallback(V=>{ie!=null&&ie.taskSlug&&I({taskSlug:ie.taskSlug,events:V})},[ie==null?void 0:ie.taskSlug]),Ui=te.useCallback(V=>{if(!(ie!=null&&ie.taskSlug)||V.taskSlug!==ie.taskSlug)return;ve({taskSlug:V.taskSlug,roundState:V});const me=y2({mode:gi.current[V.taskSlug],status:V.status,activeRole:V.activeRole,lastFollowedRole:bt.current[V.taskSlug]});me&&(bt.current[V.taskSlug]=me,ee(me));const qe=S2(V,bk);if(qe===null){mi.current[V.taskSlug]={status:V.status};return}const pn=b2(V),yr=pi.current[V.taskSlug],Jr=mi.current[V.taskSlug];if(mi.current[V.taskSlug]={status:V.status},yr===pn||(pi.current[V.taskSlug]=pn,!vk(V,Jr,Fs.current[V.taskSlug])))return;if(_i){Nt(),Yn(null);return}const hl=se?_k(V)>=hk?"strong":"weak":"none";rl(qe,pn,{sound:hl})},[ie==null?void 0:ie.taskSlug,_i,se,rl,Nt]),al=te.useCallback(V=>{el(me=>(me==null?void 0:me.taskSlug)===V.taskSlug&&me.statusLoaded===V.statusLoaded&&me.sessionCount===V.sessionCount&&me.hasAnySession===V.hasAnySession&&me.hasGateReviewerSession===V.hasGateReviewerSession&&me.allRolesHaveSession===V.allRolesHaveSession&&me.autoOrchestration===V.autoOrchestration&&JSON.stringify(me.roles)===JSON.stringify(V.roles)?me:V)},[]);async function vi(){const V=await Se.listTasks();return Y(V),W(me=>{var qe;return me&&V.some(pn=>pn.taskSlug===me)?me:((qe=V[0])==null?void 0:qe.taskSlug)??null}),V}async function ri(V=ie==null?void 0:ie.taskSlug){if(!V)return m(null),h(null),null;const me=await Se.getHarnessStatus(V);return m(me),h(V),me}async function Ws(V=ie==null?void 0:ie.taskSlug){if(!V)return o(null),u(null),null;const me=await Se.getHarnessBootstrapStatus(V);return o(me),u(V),me}async function yi(){const V=await Se.getGatewayStatus();return v(V),V}async function ll(){const V=await Se.getRecentRepositoryPaths();return l(V),V}async function Vr(){if(!n)return Me(!1),!1;const V=await Se.getTranslationState();return Me(V.memoryInitialized),V.memoryInitialized}async function Ks(V){const[me,qe]=await Promise.all([Se.listMessages(V),Se.getOrchestrationState(V)]);z({taskSlug:V,messages:me}),N({taskSlug:V,orchestration:qe})}async function ol(V){const me=await Se.getGateReviewState(V);return Q({taskSlug:V,state:me}),Do("Poll Gate Review state"),cn(qe=>xo(qe,["Refresh Gate Review state","Poll Gate Review state"])),me}function gr(V,me){const qe=gv(V,me);qe&&cn(qe)}function Kt(V){V&&(Vn(V.permissionMode),V.model&&on(V.model),V.effort&&Vt(V.effort))}async function Wr(V={}){const me=await Se.getTranslatorSession();return ln(me),V.syncLaunchOptions&&Kt(me),me}function si(V){V&&(It(V.permissionMode),V.model&&ze(V.model),V.effort&&Pr(V.effort))}async function tn(V={}){const me=await Se.getHarnessEngineerSession();return Wt(me),V.syncLaunchOptions&&si(me),me}function Pi(V,me,qe={}){var pn;ln(V.translatorSession),Me(!!((pn=V.translationState)!=null&&pn.memoryInitialized)),Wt(V.harnessEngineerSession),E(V.harnessFeedbackState),v(V.gatewayStatus),me&&V.harnessStatus?(m(V.harnessStatus),h(me)):(m(null),h(null)),me&&V.harnessBootstrapStatus?(o(V.harnessBootstrapStatus),u(me)):(o(null),u(null)),qe.syncLaunchOptions&&(Kt(V.translatorSession),si(V.harnessEngineerSession))}async function cl(V={}){if(!n)return ln(null),Me(!1),Wt(null),m(null),o(null),h(null),u(null),E(null),null;const me=(ie==null?void 0:ie.taskSlug)??null,qe=await Se.getProjectRuntimeState(me);return Pi(qe,me,V),qe}function Ys(){const V=["Poll project runtime state","Load project runtime state","Refresh Harness feedback state","Poll Harness feedback state","Load Translator session","Poll Translator session","Poll translation memory status","Load Harness Engineer session","Poll Harness Engineer session","Load VCM Harness status","Poll VCM Harness status"];for(const me of V)Do(me);cn(me=>xo(me,V))}te.useEffect(()=>{Promise.all([Se.getCurrentProject(),Se.getRecentRepositoryPaths(),Se.getAppPreferences(),Se.getGatewayStatus()]).then(async([V,me,qe,pn])=>{r(V),l(me),v(pn),en(qe),V&&await vi()}).catch(V=>cn(pt("Load initial app data",V)))},[en]),te.useEffect(()=>{const V=window.matchMedia("(prefers-color-scheme: dark)"),me=()=>nl(V.matches);return me(),V.addEventListener("change",me),()=>V.removeEventListener("change",me)},[]),te.useEffect(()=>()=>Nt(),[Nt]),te.useEffect(()=>{_i&&(Nt(),Yn(null))},[_i,Nt]),te.useEffect(()=>{const V=ae==="system"?tl?"dark":"light":ae;document.documentElement.dataset.theme=V,document.documentElement.dataset.themeMode=ae},[tl,ae]),te.useEffect(()=>{if(!(ie!=null&&ie.taskSlug)){Q(null);return}ol(ie.taskSlug).catch(V=>cn(pt("Refresh Gate Review state",V)))},[ie==null?void 0:ie.taskSlug]),te.useEffect(()=>{Qn.current="",ln(null),Vn("bypassPermissions"),on("default"),Vt("medium"),Me(!1),Wt(null),It("bypassPermissions"),ze("default"),Pr("medium"),m(null),o(null),h(null),u(null),E(null)},[n==null?void 0:n.repoRoot]),Xa(n?`project-runtime:${n.repoRoot}:${(ie==null?void 0:ie.taskSlug)??"no-task"}`:null,async()=>{try{const V=(n==null?void 0:n.repoRoot)??"",me=!!(n&&Qn.current!==V);await cl({syncLaunchOptions:me}),me&&(Qn.current=V),Ys()}catch(V){gr("Poll project runtime state",V)}},{intervalMs:3e3,runImmediately:!0});const dn=(ie==null?void 0:ie.taskSlug)??null,Si=dn&&(pe==null?void 0:pe.taskSlug)===dn?pe.state:null,xn=dn&&(re==null?void 0:re.taskSlug)===dn?re.roundState:null,_r=dn&&(Kn==null?void 0:Kn.taskSlug)===dn?Kn:null,vr=!!(dn&&(Si!=null&&Si.activeGate||(xn==null?void 0:xn.activeRole)==="gate-reviewer"||_r!=null&&_r.hasGateReviewerSession));Xa(vr&&dn?`gate-review:${dn}`:null,async()=>{if(dn)try{await ol(dn)}catch(V){gr("Poll Gate Review state",V)}},{intervalMs:3e3,runImmediately:!1});async function ke(V,me="Run UI action"){qr(!0),cn("");try{await V()}catch(qe){cn(pt(me,qe))}finally{qr(!1)}}async function Xs(){if(!ie)throw new Error("Create or select a task before closing it.");const V=[`Close task "${ie.taskSlug}"?`,"","This is destructive:","- stops VCM-managed running role sessions for this task","- moves project-scoped Translator and Harness Engineer sessions to the base repository cwd",`- deletes the task worktree: ${ie.worktreePath}`,`- deletes the Git branch: ${ie.branch}`,"- deletes VCM task/session/message/orchestration state","","VCM will not check running sessions or uncommitted changes before closing."].join(`
|
|
96
|
+
`);window.confirm(V)&&(await Se.cleanupTask(ie.taskSlug,{force:!0,forceDeleteBranch:!0}),W(null),z(null),N(null),I(null),ve(null),Q(null),kt(qe=>qe+1),await vi())}const Kr=Z&&Z.taskSlug===(ie==null?void 0:ie.taskSlug)?Z.messages:[],ul=O&&O.taskSlug===(ie==null?void 0:ie.taskSlug)?O.orchestration:null,Yr=$&&$.taskSlug===(ie==null?void 0:ie.taskSlug)?$.events:[],nn=re&&re.taskSlug===(ie==null?void 0:ie.taskSlug)?re.roundState:null,Xr=ie!=null&&ie.taskSlug&&(nn!=null&&nn.roleRecovery)?yk(ie.taskSlug,nn.roleRecovery):null,Pt=nn!=null&&nn.roleRecovery&&nn.roleRecovery.status!=="failed"&&Xr!==Ps?Sk(nn.roleRecovery):null,Jn=pe&&pe.taskSlug===(ie==null?void 0:ie.taskSlug)?pe.state:null,Qr=!!(Jn&&Object.values(Jn.gates).some(V=>V.required));return x.jsxs(t1,{sidebar:x.jsx(N2,{project:n,recentRepositoryPaths:s,tasks:K,activeTaskSlug:(ie==null?void 0:ie.taskSlug)??null,messages:Kr,orchestration:ul,events:Yr,roundState:nn,gateReview:Jn,translationEnabled:jn,translationAutoSendEnabled:Cn,translationTargetLanguage:tt,translationOutputMode:he,translationMemoryInitialized:Ae,translatorSession:Bt,harnessStatus:$r,harnessBootstrapStatus:qs,harnessApplyResult:b,autoTaskHarnessReviewEnabled:xt,gatewayStatus:S,gatewayQrLogin:_,gatewayQrCheck:A,gatewayLarkRegistration:k,gatewayLarkRegistrationCheck:j,busy:Bn,onConnect:V=>ke(async()=>{const me=await Se.connectProject({repoPath:V});r(me),C(null),await Promise.all([vi(),ll()])},"Connect repository"),onRefreshConnectedRepository:()=>ke(async()=>{const V=await Se.getCurrentProject();r(V)},"Refresh connected repository"),onPullConnectedRepository:()=>ke(async()=>{const V=await Se.pullCurrentProject();r(V)},"Pull connected repository"),onRefreshHarness:()=>ke(async()=>{if(!ie)throw new Error("Create or select a task before refreshing VCM Harness.");C(null),await Promise.all([ri(ie.taskSlug),Ws(ie.taskSlug)])},"Refresh VCM Harness"),onApplyHarness:()=>ke(async()=>{if(!ie)throw new Error("Create or select a task before applying VCM Harness.");const V=await Se.applyHarness({taskSlug:ie.taskSlug});C(V),await Promise.all([ri(ie.taskSlug),Ws(ie.taskSlug)])},"Apply VCM Harness"),onStartHarnessBootstrap:V=>ke(async()=>{if(!ie)throw new Error("Create or select a task before starting Harness Bootstrap.");const me=await Se.startHarnessBootstrap({taskSlug:ie.taskSlug,cols:120,rows:32,...V});o(me.status),u(ie.taskSlug),await tn({syncLaunchOptions:!0})},"Start Harness Bootstrap"),onRestartHarnessBootstrap:V=>ke(async()=>{if(!ie)throw new Error("Create or select a task before restarting Harness Bootstrap.");const me=await Se.restartHarnessBootstrap({taskSlug:ie.taskSlug,cols:120,rows:32,...V});o(me.status),u(ie.taskSlug),await tn({syncLaunchOptions:!0})},"Restart Harness Bootstrap"),onStopHarnessBootstrap:()=>ke(async()=>{const V=await Se.stopHarnessBootstrap();o(V),u((ie==null?void 0:ie.taskSlug)??null),await tn()},"Stop Harness Bootstrap"),onRunHarnessBootstrap:()=>ke(async()=>{if(!ie)throw new Error("Create or select a task before running Harness Bootstrap.");const V=await Se.runHarnessBootstrap({taskSlug:ie.taskSlug});o(V.status),u(ie.taskSlug),await tn()},"Run Harness Bootstrap"),onOpenHarnessStudio:()=>Ot(!0),onOpenRepositoryDiff:()=>Zt(!0),onAutoTaskHarnessReviewChange:V=>{yt(V),ke(async()=>{const me=await Se.updateAppPreferences({autoTaskHarnessReviewEnabled:V});en(me)},"Update auto task harness review setting")},onRefreshGateway:()=>ke(async()=>{await yi()},"Refresh Gateway status"),onGatewayEnabledChange:V=>{ke(async()=>{const me=await Se.updateGatewaySettings({enabled:V,...V&&n?{currentProjectId:n.repoRoot,currentTaskSlug:(ie==null?void 0:ie.taskSlug)??null}:{}});v(me),V&&en(await Se.getAppPreferences())},"Update Gateway enabled setting")},onGatewaySettingsChange:V=>ke(async()=>{const me=await Se.updateGatewaySettings(V);v(me)},"Update Gateway settings"),onGatewayTranslationChange:V=>{ke(async()=>{const me=await Se.updateGatewaySettings({translationEnabled:V});v(me)},"Update Gateway translation setting")},onStartGatewayQrLogin:()=>{ke(async()=>{const V=await Se.startGatewayQrLogin();y(V),L(null),R(!0),await yi()},"Start Gateway QR login")},onStartGatewayLarkRegistration:()=>{ke(async()=>{const V=await Se.startGatewayLarkRegistration();M(V),H(null),F(!0),await yi()},"Start Lark Gateway QR setup")},onResetGatewayBinding:()=>{ke(async()=>{const V=await Se.resetGatewayBinding();v(V),y(null),L(null),R(!1),M(null),H(null),F(!1)},"Reset Gateway binding")},onGateReviewGateEnabledChange:(V,me)=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before changing Gate Review Gates.");const qe=await Se.updateGateReviewSettings(ie.taskSlug,{gates:{[V]:me}});Q({taskSlug:ie.taskSlug,state:qe})},`Update ${V} Gate Review setting`)},onTranslationEnabledChange:V=>{an(V),ke(async()=>{const me=await Se.updateAppPreferences({translationEnabled:V});en(me)},"Update conversation translation setting")},onTranslationAutoSendChange:V=>{St(V),ke(async()=>{const me=await Se.updateAppPreferences({translationAutoSendEnabled:V});en(me)},"Update translation auto-send setting")},onTranslationTargetLanguageChange:V=>{Lt(V),ke(async()=>{const me=await Se.updateAppPreferences({translationTargetLanguage:V});en(me)},"Update translation target language")},onTranslationOutputModeChange:V=>{ye(V),ke(async()=>{const me=await Se.updateAppPreferences({translationOutputMode:V});en(me)},"Update translation output mode")},onOpenFileTranslation:()=>ft(!0),onOpenTranslatorSession:()=>gt(!0),onCreateTranslationBootstrap:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before running Translation Bootstrap.");await Se.createTranslationBootstrap({taskSlug:ie.taskSlug,targetLanguage:tt}),await Vr(),await Wr()},"Create Translation Bootstrap task")},onUpdateTranslationMemory:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before updating translation memory.");await Se.createTranslationMemoryUpdate({taskSlug:ie.taskSlug,targetLanguage:tt}),await Vr(),await Wr()},"Create translation memory update task")},onCreateTask:V=>ke(async()=>{const me=await Se.createTask(V);await vi(),W(me.taskSlug)},"Create task"),onCloseTask:()=>{ke(Xs,"Close task")},onSelectTask:W,themeMode:ae,onAutoOrchestrationChange:V=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before changing auto orchestration.");const me=await Se.updateOrchestrationState(ie.taskSlug,{mode:V?"auto":"manual"});N({taskSlug:ie.taskSlug,orchestration:me})},"Update auto orchestration mode")},onThemeModeChange:V=>{de(V),ke(async()=>{const me=await Se.updateAppPreferences({themeMode:V});en(me)},"Update theme setting")},pauseAlertSound:se,onPauseAlertSoundChange:V=>{we(V),V&&Ek(),ke(async()=>{const me=await Se.updateAppPreferences({flowPauseAlerts:V});en(me)},"Update pause alert sound setting")},roleRetryEnabled:je,onRoleRetryEnabledChange:V=>{He(V),ke(async()=>{const me=await Se.updateAppPreferences({roleRetryEnabled:V});en(me)},"Update CC retry setting")},permissionRequestMode:Pe,onPermissionRequestModeChange:V=>{xe(V),ke(async()=>{const me=await Se.updateAppPreferences({permissionRequestMode:V});en(me)},"Update permission request setting")},launchTemplate:Fr,canSaveLaunchTemplate:hn,canOneClickStart:il,onSaveLaunchTemplate:()=>{ke(async()=>{if(!(un!=null&&un.statusLoaded))throw new Error("Open a task workspace before saving a launch template.");const V=await Se.updateAppPreferences({launchTemplate:{version:1,roles:un.roles,autoOrchestration:un.autoOrchestration}});en(V)},"Save launch template")},onOneClickStart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before one-click start.");const V=await Se.oneClickStart(ie.taskSlug);N({taskSlug:ie.taskSlug,orchestration:V.orchestration}),ee("project-manager"),await Ks(ie.taskSlug),await vi(),kt(me=>me+1)},"One-click start role sessions")},onMarkAllMessagesDone:V=>{ke(async()=>{const me=await Se.markAllMessagesDone(V);z({taskSlug:V,messages:me.messages}),await Ks(V)},"Mark all role messages done")},onDeleteMessageHistory:V=>{ke(async()=>{const me=await Se.deleteMessageHistory(V);z({taskSlug:V,messages:me.messages}),await Ks(V)},"Delete role message history")}}),children:[x.jsx(g2,{}),Ut?x.jsx("div",{className:"flow-pause-alert-backdrop",children:x.jsxs("section",{"aria-describedby":"flow-pause-alert-body flow-pause-alert-hint","aria-labelledby":"flow-pause-alert-title","aria-modal":"true",className:"flow-pause-alert",role:"alertdialog",children:[x.jsx("p",{className:"flow-pause-alert-kicker",children:"VCM needs attention"}),x.jsx("h2",{id:"flow-pause-alert-title",children:"Flow needs attention"}),x.jsx("p",{id:"flow-pause-alert-body",children:Ut.text}),x.jsx("p",{id:"flow-pause-alert-hint",className:"flow-pause-alert-hint",children:"The task may be complete, waiting for your decision, or blocked by a workflow issue."}),x.jsx("button",{type:"button",autoFocus:!0,onClick:fn,children:"Confirm"})]})}):null,Pt&&Xr?x.jsxs("div",{className:"role-recovery-toast",role:"status",children:[x.jsx("span",{children:Pt}),x.jsx("button",{type:"button",onClick:()=>Io(Xr),children:"Close"})]}):null,D&&_?x.jsx(mk,{busy:Bn,qrCheck:A,qrLogin:_,onCheck:()=>{ke(async()=>{const V=await Se.checkGatewayQrLogin();L(V),(V.status==="confirmed"||V.status==="binded_redirect")&&R(!1),await yi()})},onClose:()=>R(!1)}):null,U&&k?x.jsx(gk,{busy:Bn,registration:k,registrationCheck:j,onCheck:()=>{ke(async()=>{const V=await Se.checkGatewayLarkRegistration();H(V),V.gatewayStatus&&v(V.gatewayStatus),V.status==="confirmed"&&(F(!1),await yi())},"Check Lark Gateway QR setup")},onManualBind:(V,me)=>{ke(async()=>{const qe=await Se.bindGatewayLarkApp({appId:V,appSecret:me,larkDomain:"lark"});H(qe),qe.gatewayStatus&&v(qe.gatewayStatus),qe.status==="confirmed"&&(F(!1),await yi())},"Bind Lark Gateway app")},onClose:()=>F(!1)}):null,n&&ie?x.jsx(ck,{task:ie,activeRole:q,gateReviewerEnabled:Qr,translationEnabled:jn,translationAutoSendEnabled:Cn,translationTargetLanguage:tt,launchTemplate:Fr,refreshNonce:ii,onTaskChanged:async()=>{await vi()},onActiveRoleChange:ee,onMessagesChanged:Gs,onOrchestrationChanged:sl,onRoundStateChanged:Ui,onEventsChanged:Vs,onLaunchStateChanged:al}):x.jsxs("section",{className:"empty-workspace",children:[x.jsx("h1",{children:n?"Create a task to open the workspace":"Connect a repository to begin"}),x.jsx("p",{children:n?"Tasks create local role commands and handoff artifacts for the selected repository.":"VibeCodingMaster will create a local task workspace, role sessions, and handoff artifacts."})]}),x.jsx(i2,{open:Oe,taskSlug:(ie==null?void 0:ie.taskSlug)??null,targetLanguage:tt,onClose:()=>ft(!1)}),x.jsx(y1,{open:mt,busy:Bn,status:$r,bootstrapStatus:qs,engineerSession:Is,permissionMode:wn,model:Ii,effort:di,taskSlug:(ie==null?void 0:ie.taskSlug)??null,onClose:()=>Ot(!1),onRefresh:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before refreshing Harness Studio.");await Promise.all([ri(ie.taskSlug),Ws(ie.taskSlug),tn()])},"Refresh Harness Studio")},onPermissionModeChange:It,onModelChange:ze,onEffortChange:Pr,onEngineerStart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before starting Harness Engineer.");const V=await Se.startHarnessEngineerSession({taskSlug:ie.taskSlug,cols:120,rows:32,permissionMode:wn,model:Ii,effort:di});Wt(V),si(V)},"Start Harness Engineer")},onEngineerResume:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before resuming Harness Engineer.");const V=await Se.resumeHarnessEngineerSession({taskSlug:ie.taskSlug,cols:120,rows:32,permissionMode:wn,model:Ii,effort:di});Wt(V),si(V)},"Resume Harness Engineer")},onEngineerRestart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before restarting Harness Engineer.");const V=await Se.restartHarnessEngineerSession({taskSlug:ie.taskSlug,cols:120,rows:32,permissionMode:wn,model:Ii,effort:di});Wt(V),si(V)},"Restart Harness Engineer")},onEngineerStop:()=>{ke(async()=>{const V=await Se.stopHarnessEngineerSession();Wt(V)},"Stop Harness Engineer")},onEngineerNotifyHarnessUpdated:()=>{ke(async()=>{const V=await Se.notifyHarnessEngineerHarnessUpdated();Wt(V),si(V)},"Notify Harness Engineer to reload harness")},onOpenRepositoryDiff:()=>Zt(!0),onReviewTaskHarness:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before reviewing task harness.");const V=await Se.startTaskHarnessRetrospective({taskSlug:ie.taskSlug,trigger:"manual"});E(V),await tn({syncLaunchOptions:!0})},"Review task harness")}}),x.jsx(b1,{open:Qe,taskSlug:(ie==null?void 0:ie.taskSlug)??null,onClose:()=>Zt(!1)}),x.jsx(k1,{open:Fe,busy:Bn,session:Bt,permissionMode:Gn,model:zt,effort:Wn,onClose:()=>gt(!1),onPermissionModeChange:Vn,onModelChange:on,onEffortChange:Vt,onStart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before starting Translator.");const V=await Se.startTranslatorSession({taskSlug:ie.taskSlug,cols:100,rows:28,permissionMode:Gn,model:zt,effort:Wn});ln(V),Kt(V)},"Start Translator session")},onResume:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before resuming Translator.");const V=await Se.resumeTranslatorSession({taskSlug:ie.taskSlug,cols:100,rows:28,permissionMode:Gn,model:zt,effort:Wn});ln(V),Kt(V)},"Resume Translator session")},onRestart:()=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before restarting Translator.");const V=await Se.restartTranslatorSession({taskSlug:ie.taskSlug,cols:100,rows:28,permissionMode:Gn,model:zt,effort:Wn});ln(V),Kt(V)},"Restart Translator session")},onStop:()=>{ke(async()=>{const V=await Se.stopTranslatorSession();ln(V)},"Stop Translator session")},onNotifyHarnessUpdated:()=>{ke(async()=>{const V=await Se.notifyTranslatorHarnessUpdated();ln(V),Kt(V)},"Notify Translator to reload harness")}}),x.jsx(n1,{busy:Bn,state:T,onCancel:V=>{ke(async()=>{const me=await Se.decideHarnessFeedback({action:"cancel",taskSlug:ie==null?void 0:ie.taskSlug,comment:V});E(me)},"Cancel Harness feedback")},onApprove:V=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before approving Harness feedback.");const me=await Se.decideHarnessFeedback({action:"approve",taskSlug:ie.taskSlug,comment:V});E(me),await tn()},"Approve Harness feedback")},onComment:V=>{ke(async()=>{if(!ie)throw new Error("Create or select a task before sending Harness feedback comments.");const me=await Se.decideHarnessFeedback({action:"comment",taskSlug:ie.taskSlug,comment:V});E(me),await tn()},"Send Harness feedback comment")},onReject:V=>{ke(async()=>{const me=await Se.decideHarnessFeedback({action:"reject",taskSlug:ie==null?void 0:ie.taskSlug,comment:V});E(me)},"Reject Harness feedback")}})]})}function mk({busy:n,onCheck:r,onClose:s,qrCheck:l,qrLogin:d}){const[m,f]=te.useState(""),[o,c]=Hi("");return te.useEffect(()=>{let h=!1;if(c(""),f(""),d.qrcodeUrl.startsWith("data:image/")){f(d.qrcodeUrl);return}try{const p=Ir(0,"M");p.addData(d.qrcodeUrl),p.make(),h||f(p.createDataURL(8,2))}catch(p){h||c(pt("Render Gateway QR login code",p))}return()=>{h=!0}},[d.qrcodeUrl]),x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{"aria-labelledby":"gateway-qr-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{id:"gateway-qr-title",children:"Weixin Gateway Login"}),x.jsx("p",{className:"muted",children:"Scan with Weixin, confirm on the phone, then click Confirm."})]}),x.jsx("button",{type:"button",onClick:s,children:"Close"})]}),x.jsxs("div",{className:"gateway-qr-modal-body",children:[x.jsx("div",{className:"gateway-qr-code-frame",children:m?x.jsx("img",{alt:"Weixin Gateway QR login",src:m}):x.jsx("div",{className:"gateway-qr-placeholder",children:o?"QR code could not be rendered.":"Rendering QR code..."})}),x.jsxs("dl",{className:"gateway-qr-meta",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Status"}),x.jsx("dd",{children:(l==null?void 0:l.status)??d.status})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Expires"}),x.jsx("dd",{children:Cv(d.expiresAt)})]}),l!=null&&l.message?x.jsxs("div",{children:[x.jsx("dt",{children:"Message"}),x.jsx("dd",{children:l.message})]}):null]})]}),x.jsx("footer",{children:x.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})})]})})}function gk({busy:n,onCheck:r,onClose:s,onManualBind:l,registration:d,registrationCheck:m}){const[f,o]=te.useState(""),[c,h]=Hi(""),[p,u]=te.useState(""),[b,C]=te.useState(""),[T,E]=Hi("");return te.useEffect(()=>{let S=!1;h(""),o("");try{const v=Ir(0,"M");v.addData(d.qrUrl),v.make(),S||o(v.createDataURL(8,2))}catch(v){S||h(pt("Render Lark Gateway setup QR code",v))}return()=>{S=!0}},[d.qrUrl]),x.jsx("div",{className:"modal-backdrop",children:x.jsxs("section",{"aria-labelledby":"gateway-lark-registration-title","aria-modal":"true",className:"gateway-qr-modal",role:"dialog",children:[x.jsxs("header",{children:[x.jsxs("div",{children:[x.jsx("h2",{id:"gateway-lark-registration-title",children:"Lark Gateway Setup"}),x.jsx("p",{className:"muted",children:"Scan with Lark, approve bot creation, then click Confirm."})]}),x.jsx("button",{type:"button",onClick:s,children:"Close"})]}),x.jsxs("div",{className:"gateway-qr-modal-body",children:[x.jsx("div",{className:"gateway-qr-code-frame",children:f?x.jsx("img",{alt:"Lark Gateway setup QR code",src:f}):x.jsx("div",{className:"gateway-qr-placeholder",children:c?"QR code could not be rendered.":"Rendering QR code..."})}),x.jsx("div",{className:"gateway-qr-actions",children:x.jsx("button",{type:"button",disabled:n,onClick:r,children:"Confirm"})}),x.jsxs("dl",{className:"gateway-qr-meta",children:[x.jsxs("div",{children:[x.jsx("dt",{children:"Status"}),x.jsx("dd",{children:(m==null?void 0:m.status)??d.status})]}),x.jsxs("div",{children:[x.jsx("dt",{children:"Expires"}),x.jsx("dd",{children:Cv(d.expiresAt)})]}),d.userCode?x.jsxs("div",{children:[x.jsx("dt",{children:"User Code"}),x.jsx("dd",{children:d.userCode})]}):null,m!=null&&m.larkBotName?x.jsxs("div",{children:[x.jsx("dt",{children:"Bot"}),x.jsx("dd",{children:m.larkBotName})]}):null,m!=null&&m.message?x.jsxs("div",{children:[x.jsx("dt",{children:"Message"}),x.jsx("dd",{children:m.message})]}):null]}),x.jsxs("form",{className:"gateway-manual-bind",onSubmit:S=>{S.preventDefault();const v=p.trim(),_=b.trim();if(!v||!_){E("Enter both App ID and App Secret.");return}E(""),C(""),l(v,_)},children:[x.jsxs("div",{children:[x.jsx("label",{htmlFor:"gateway-lark-app-id",children:"App ID"}),x.jsx("input",{id:"gateway-lark-app-id",autoComplete:"off",disabled:n,value:p,onChange:S=>u(S.currentTarget.value),placeholder:"cli_xxx"})]}),x.jsxs("div",{children:[x.jsx("label",{htmlFor:"gateway-lark-app-secret",children:"App Secret"}),x.jsx("input",{id:"gateway-lark-app-secret",autoComplete:"off",disabled:n,type:"password",value:b,onChange:S=>C(S.currentTarget.value),placeholder:"Enter App Secret"})]}),T?x.jsx("p",{className:"form-error",children:T}):null,x.jsx("button",{type:"submit",disabled:n,children:"Bind manually"})]})]})]})})}function Cv(n){const r=new Date(n);return Number.isNaN(r.getTime())?"-":new Intl.DateTimeFormat(void 0,{hour:"2-digit",minute:"2-digit",second:"2-digit"}).format(r)}let Hr=null;function _k(n){const r=Date.parse(n.startedAt??""),s=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!Number.isFinite(r)||!Number.isFinite(s)?0:Math.max(0,s-r)}function vk(n,r,s){if((r==null?void 0:r.status)==="running")return!0;const l=Date.parse(n.stoppedAt??n.lastTurnEndedAt??"");return!!(s&&Number.isFinite(l)&&l>s)}function yk(n,r){return`${n}:${r.role}:${r.lastFailureAt}`}function Sk(n){const r=wk(n.role),s=wv(n);return n.status==="retrying"?`CC 出错,正在重试 ${r}${s} · 第 ${n.attempt}/${n.maxAttempts} 次`:`CC 出错,重试中 ${r}${s} · 第 ${n.attempt}/${n.maxAttempts} 次 · ${xk(n.nextRetryAt)}`}function bk(n,r){const s=wv(n);return n.retryable===!1?`CC stopped for ${r}: ${Ck(n)} cannot be fixed by retrying.`:`CC retry failed after ${n.maxAttempts} attempts for ${r}${s}.`}function wv(n){return!n.error||n.error==="unknown"?"":` · ${n.error}`}function Ck(n){return n.error&&n.error!=="unknown"?n.error:"this error"}function wk(n){return n.split("-").filter(Boolean).map(r=>`${r.slice(0,1).toUpperCase()}${r.slice(1)}`).join(" ")}function xk(n){if(!n)return"即将重试";const r=Date.parse(n)-Date.now();return!Number.isFinite(r)||r<=0?"即将重试":`${Math.ceil(r/6e4)} 分钟后`}async function Ek(){const n=xv();return n?Ev(n):!1}async function bo(){const n=xv();if(!n||!await Ev(n))return!1;try{const s=n.createGain(),l=n.currentTime+.025;return s.gain.setValueAtTime(.85,n.currentTime),s.connect(n.destination),Kg(n,s,{frequency:587.33,startAt:l,duration:.18,peakGain:.045}),Kg(n,s,{frequency:783.99,startAt:l+.11,duration:.28,peakGain:.055}),window.setTimeout(()=>{s.disconnect()},800),!0}catch{return!1}}function xv(){const n=window.AudioContext??window.webkitAudioContext;if(!n)return null;try{return(!Hr||Hr.state==="closed")&&(Hr=new n),Hr}catch{return null}}function Vg(n){Hr=null,n&&n.state!=="closed"&&n.close().catch(()=>{})}async function Ev(n){if(Wg(n))return!0;try{await n.resume();const r=Wg(n);return!r&&n===Hr&&Vg(n),r}catch{return n===Hr&&Vg(n),!1}}function Wg(n){return n.state==="running"}function Kg(n,r,s){const l=n.createGain(),d=n.createOscillator(),m=n.createOscillator(),f=s.startAt+s.duration;l.gain.setValueAtTime(1e-4,s.startAt),l.gain.exponentialRampToValueAtTime(s.peakGain,s.startAt+.018),l.gain.exponentialRampToValueAtTime(1e-4,f),d.type="sine",d.frequency.setValueAtTime(s.frequency,s.startAt),m.type="triangle",m.frequency.setValueAtTime(s.frequency*2.01,s.startAt),d.connect(l),m.connect(l),l.connect(r),d.start(s.startAt),m.start(s.startAt),d.stop(f+.02),m.stop(f+.02)}const kv=document.getElementById("root");if(!kv)throw new Error("Missing #root element.");I0.createRoot(kv).render(x.jsx(te.StrictMode,{children:x.jsx(pk,{})}));
|