@robota-sdk/agent-cli 3.0.0-beta.86 → 3.0.0-beta.88
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/CHANGELOG.md +103 -48
- package/README.md +289 -39
- package/bin/{robota.cjs → agent.cjs} +1 -1
- package/dist/node/bin.js +23 -23
- package/dist/node/{bounded-output-Bgx2Cgkx-28em7iHq.js → bounded-output-BdWv9SX3-28em7iHq.js} +1 -1
- package/dist/node/{bounded-output-Bgx2Cgkx-28em7iHq.js.map → bounded-output-BdWv9SX3-28em7iHq.js.map} +1 -1
- package/dist/node/cli-core-CEWWF4d6.js +2917 -0
- package/dist/node/{command-executor-d6DdfUTD-DhFSDHvb.js → command-executor-D_UBZHxh-CVZipoOV.js} +2 -2
- package/dist/node/{command-executor-d6DdfUTD-DhFSDHvb.js.map → command-executor-D_UBZHxh-CVZipoOV.js.map} +1 -1
- package/dist/node/{command-executor-d6DdfUTD-3KEnsTnN.js → command-executor-D_UBZHxh-D7UrdAlN.js} +1 -1
- package/dist/node/headless.js +2 -2
- package/dist/node/index.d.ts +2423 -166
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +610 -580
- package/dist/node/index.js.map +1 -1
- package/dist/node/{node-BfqR16CD.js → node-BIdvEvlf.js} +1 -1
- package/dist/node/node-BUERQysz.js +15 -0
- package/dist/node/node-BWNobqRD.js +15 -0
- package/dist/node/node-BWNobqRD.js.map +1 -0
- package/dist/node/node-C4_FOvnk.js.map +1 -1
- package/dist/node/node-CEI_VczS.js +165 -0
- package/dist/node/node-CrspydTR.js +165 -0
- package/dist/node/node-CrspydTR.js.map +1 -0
- package/dist/node/node-DENLEmMT.js.map +1 -1
- package/dist/web/assets/index-BSxTg2Py.css +1 -0
- package/dist/web/assets/index-BpCxNRj_.js +309 -0
- package/dist/web/index.html +3 -3
- package/package.json +49 -44
- package/dist/node/cli-core-DOdGt9XE.js +0 -2891
- package/dist/node/node-B48couEE.js +0 -14
- package/dist/node/node-B48couEE.js.map +0 -1
- package/dist/node/node-CgLYctGm.js +0 -67
- package/dist/node/node-CgLYctGm.js.map +0 -1
- package/dist/node/node-DAOCaE6N.js +0 -67
- package/dist/node/node-DlLm_kxn.js +0 -14
- package/dist/web/assets/index-DSLs7oij.js +0 -309
- package/dist/web/assets/index-OqCBtMJ2.css +0 -1
- /package/dist/node/{bounded-output-Bgx2Cgkx-C4ucXwLR.js → bounded-output-BdWv9SX3-C4ucXwLR.js} +0 -0
|
@@ -1,309 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))u(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&u(f)}).observe(document,{childList:!0,subtree:!0});function r(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function u(o){if(o.ep)return;o.ep=!0;const c=r(o);fetch(o.href,c)}})();function Ou(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var lc={exports:{}},Vr={};/**
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var Om;function h0(){if(Om)return Vr;Om=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,o,c){var f=null;if(c!==void 0&&(f=""+c),o.key!==void 0&&(f=""+o.key),"key"in o){c={};for(var p in o)p!=="key"&&(c[p]=o[p])}else c=o;return o=c.ref,{$$typeof:t,type:u,key:f,ref:o!==void 0?o:null,props:c}}return Vr.Fragment=i,Vr.jsx=r,Vr.jsxs=r,Vr}var Lm;function p0(){return Lm||(Lm=1,lc.exports=h0()),lc.exports}var h=p0(),ic={exports:{}},Ne={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react.production.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var Um;function m0(){if(Um)return Ne;Um=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),p=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function v(_){return _===null||typeof _!="object"?null:(_=S&&_[S]||_["@@iterator"],typeof _=="function"?_:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,L={};function E(_,H,w){this.props=_,this.context=H,this.refs=L,this.updater=w||N}E.prototype.isReactComponent={},E.prototype.setState=function(_,H){if(typeof _!="object"&&typeof _!="function"&&_!=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,_,H,"setState")},E.prototype.forceUpdate=function(_){this.updater.enqueueForceUpdate(this,_,"forceUpdate")};function V(){}V.prototype=E.prototype;function R(_,H,w){this.props=_,this.context=H,this.refs=L,this.updater=w||N}var W=R.prototype=new V;W.constructor=R,T(W,E.prototype),W.isPureReactComponent=!0;var ie=Array.isArray;function M(){}var Y={H:null,A:null,T:null,S:null},ue=Object.prototype.hasOwnProperty;function J(_,H,w){var ae=w.ref;return{$$typeof:t,type:_,key:H,ref:ae!==void 0?ae:null,props:w}}function U(_,H){return J(_.type,H,_.props)}function ne(_){return typeof _=="object"&&_!==null&&_.$$typeof===t}function le(_){var H={"=":"=0",":":"=2"};return"$"+_.replace(/[=:]/g,function(w){return H[w]})}var xe=/\/+/g;function oe(_,H){return typeof _=="object"&&_!==null&&_.key!=null?le(""+_.key):H.toString(36)}function P(_){switch(_.status){case"fulfilled":return _.value;case"rejected":throw _.reason;default:switch(typeof _.status=="string"?_.then(M,M):(_.status="pending",_.then(function(H){_.status==="pending"&&(_.status="fulfilled",_.value=H)},function(H){_.status==="pending"&&(_.status="rejected",_.reason=H)})),_.status){case"fulfilled":return _.value;case"rejected":throw _.reason}}throw _}function D(_,H,w,ae,fe){var he=typeof _;(he==="undefined"||he==="boolean")&&(_=null);var je=!1;if(_===null)je=!0;else switch(he){case"bigint":case"string":case"number":je=!0;break;case"object":switch(_.$$typeof){case t:case i:je=!0;break;case b:return je=_._init,D(je(_._payload),H,w,ae,fe)}}if(je)return fe=fe(_),je=ae===""?"."+oe(_,0):ae,ie(fe)?(w="",je!=null&&(w=je.replace(xe,"$&/")+"/"),D(fe,H,w,"",function(yt){return yt})):fe!=null&&(ne(fe)&&(fe=U(fe,w+(fe.key==null||_&&_.key===fe.key?"":(""+fe.key).replace(xe,"$&/")+"/")+je)),H.push(fe)),1;je=0;var Ge=ae===""?".":ae+":";if(ie(_))for(var ge=0;ge<_.length;ge++)ae=_[ge],he=Ge+oe(ae,ge),je+=D(ae,H,w,he,fe);else if(ge=v(_),typeof ge=="function")for(_=ge.call(_),ge=0;!(ae=_.next()).done;)ae=ae.value,he=Ge+oe(ae,ge++),je+=D(ae,H,w,he,fe);else if(he==="object"){if(typeof _.then=="function")return D(P(_),H,w,ae,fe);throw H=String(_),Error("Objects are not valid as a React child (found: "+(H==="[object Object]"?"object with keys {"+Object.keys(_).join(", ")+"}":H)+"). If you meant to render a collection of children, use an array instead.")}return je}function Q(_,H,w){if(_==null)return _;var ae=[],fe=0;return D(_,ae,"","",function(he){return H.call(w,he,fe++)}),ae}function se(_){if(_._status===-1){var H=_._result;H=H(),H.then(function(w){(_._status===0||_._status===-1)&&(_._status=1,_._result=w)},function(w){(_._status===0||_._status===-1)&&(_._status=2,_._result=w)}),_._status===-1&&(_._status=0,_._result=H)}if(_._status===1)return _._result.default;throw _._result}var me=typeof reportError=="function"?reportError:function(_){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var H=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof _=="object"&&_!==null&&typeof _.message=="string"?String(_.message):String(_),error:_});if(!window.dispatchEvent(H))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",_);return}console.error(_)},C={map:Q,forEach:function(_,H,w){Q(_,function(){H.apply(this,arguments)},w)},count:function(_){var H=0;return Q(_,function(){H++}),H},toArray:function(_){return Q(_,function(H){return H})||[]},only:function(_){if(!ne(_))throw Error("React.Children.only expected to receive a single React element child.");return _}};return Ne.Activity=x,Ne.Children=C,Ne.Component=E,Ne.Fragment=r,Ne.Profiler=o,Ne.PureComponent=R,Ne.StrictMode=u,Ne.Suspense=g,Ne.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Y,Ne.__COMPILER_RUNTIME={__proto__:null,c:function(_){return Y.H.useMemoCache(_)}},Ne.cache=function(_){return function(){return _.apply(null,arguments)}},Ne.cacheSignal=function(){return null},Ne.cloneElement=function(_,H,w){if(_==null)throw Error("The argument must be a React element, but you passed "+_+".");var ae=T({},_.props),fe=_.key;if(H!=null)for(he in H.key!==void 0&&(fe=""+H.key),H)!ue.call(H,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&H.ref===void 0||(ae[he]=H[he]);var he=arguments.length-2;if(he===1)ae.children=w;else if(1<he){for(var je=Array(he),Ge=0;Ge<he;Ge++)je[Ge]=arguments[Ge+2];ae.children=je}return J(_.type,fe,ae)},Ne.createContext=function(_){return _={$$typeof:f,_currentValue:_,_currentValue2:_,_threadCount:0,Provider:null,Consumer:null},_.Provider=_,_.Consumer={$$typeof:c,_context:_},_},Ne.createElement=function(_,H,w){var ae,fe={},he=null;if(H!=null)for(ae in H.key!==void 0&&(he=""+H.key),H)ue.call(H,ae)&&ae!=="key"&&ae!=="__self"&&ae!=="__source"&&(fe[ae]=H[ae]);var je=arguments.length-2;if(je===1)fe.children=w;else if(1<je){for(var Ge=Array(je),ge=0;ge<je;ge++)Ge[ge]=arguments[ge+2];fe.children=Ge}if(_&&_.defaultProps)for(ae in je=_.defaultProps,je)fe[ae]===void 0&&(fe[ae]=je[ae]);return J(_,he,fe)},Ne.createRef=function(){return{current:null}},Ne.forwardRef=function(_){return{$$typeof:p,render:_}},Ne.isValidElement=ne,Ne.lazy=function(_){return{$$typeof:b,_payload:{_status:-1,_result:_},_init:se}},Ne.memo=function(_,H){return{$$typeof:m,type:_,compare:H===void 0?null:H}},Ne.startTransition=function(_){var H=Y.T,w={};Y.T=w;try{var ae=_(),fe=Y.S;fe!==null&&fe(w,ae),typeof ae=="object"&&ae!==null&&typeof ae.then=="function"&&ae.then(M,me)}catch(he){me(he)}finally{H!==null&&w.types!==null&&(H.types=w.types),Y.T=H}},Ne.unstable_useCacheRefresh=function(){return Y.H.useCacheRefresh()},Ne.use=function(_){return Y.H.use(_)},Ne.useActionState=function(_,H,w){return Y.H.useActionState(_,H,w)},Ne.useCallback=function(_,H){return Y.H.useCallback(_,H)},Ne.useContext=function(_){return Y.H.useContext(_)},Ne.useDebugValue=function(){},Ne.useDeferredValue=function(_,H){return Y.H.useDeferredValue(_,H)},Ne.useEffect=function(_,H){return Y.H.useEffect(_,H)},Ne.useEffectEvent=function(_){return Y.H.useEffectEvent(_)},Ne.useId=function(){return Y.H.useId()},Ne.useImperativeHandle=function(_,H,w){return Y.H.useImperativeHandle(_,H,w)},Ne.useInsertionEffect=function(_,H){return Y.H.useInsertionEffect(_,H)},Ne.useLayoutEffect=function(_,H){return Y.H.useLayoutEffect(_,H)},Ne.useMemo=function(_,H){return Y.H.useMemo(_,H)},Ne.useOptimistic=function(_,H){return Y.H.useOptimistic(_,H)},Ne.useReducer=function(_,H,w){return Y.H.useReducer(_,H,w)},Ne.useRef=function(_){return Y.H.useRef(_)},Ne.useState=function(_){return Y.H.useState(_)},Ne.useSyncExternalStore=function(_,H,w){return Y.H.useSyncExternalStore(_,H,w)},Ne.useTransition=function(){return Y.H.useTransition()},Ne.version="19.2.8",Ne}var qm;function of(){return qm||(qm=1,ic.exports=m0()),ic.exports}var j=of();const cf=Ou(j);var rc={exports:{}},Fr={},ac={exports:{}},uc={};/**
|
|
18
|
-
* @license React
|
|
19
|
-
* scheduler.production.js
|
|
20
|
-
*
|
|
21
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
22
|
-
*
|
|
23
|
-
* This source code is licensed under the MIT license found in the
|
|
24
|
-
* LICENSE file in the root directory of this source tree.
|
|
25
|
-
*/var Bm;function g0(){return Bm||(Bm=1,(function(t){function i(D,Q){var se=D.length;D.push(Q);e:for(;0<se;){var me=se-1>>>1,C=D[me];if(0<o(C,Q))D[me]=Q,D[se]=C,se=me;else break e}}function r(D){return D.length===0?null:D[0]}function u(D){if(D.length===0)return null;var Q=D[0],se=D.pop();if(se!==Q){D[0]=se;e:for(var me=0,C=D.length,_=C>>>1;me<_;){var H=2*(me+1)-1,w=D[H],ae=H+1,fe=D[ae];if(0>o(w,se))ae<C&&0>o(fe,w)?(D[me]=fe,D[ae]=se,me=ae):(D[me]=w,D[H]=se,me=H);else if(ae<C&&0>o(fe,se))D[me]=fe,D[ae]=se,me=ae;else break e}}return Q}function o(D,Q){var se=D.sortIndex-Q.sortIndex;return se!==0?se:D.id-Q.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,p=f.now();t.unstable_now=function(){return f.now()-p}}var g=[],m=[],b=1,x=null,S=3,v=!1,N=!1,T=!1,L=!1,E=typeof setTimeout=="function"?setTimeout:null,V=typeof clearTimeout=="function"?clearTimeout:null,R=typeof setImmediate<"u"?setImmediate:null;function W(D){for(var Q=r(m);Q!==null;){if(Q.callback===null)u(m);else if(Q.startTime<=D)u(m),Q.sortIndex=Q.expirationTime,i(g,Q);else break;Q=r(m)}}function ie(D){if(T=!1,W(D),!N)if(r(g)!==null)N=!0,M||(M=!0,le());else{var Q=r(m);Q!==null&&P(ie,Q.startTime-D)}}var M=!1,Y=-1,ue=5,J=-1;function U(){return L?!0:!(t.unstable_now()-J<ue)}function ne(){if(L=!1,M){var D=t.unstable_now();J=D;var Q=!0;try{e:{N=!1,T&&(T=!1,V(Y),Y=-1),v=!0;var se=S;try{t:{for(W(D),x=r(g);x!==null&&!(x.expirationTime>D&&U());){var me=x.callback;if(typeof me=="function"){x.callback=null,S=x.priorityLevel;var C=me(x.expirationTime<=D);if(D=t.unstable_now(),typeof C=="function"){x.callback=C,W(D),Q=!0;break t}x===r(g)&&u(g),W(D)}else u(g);x=r(g)}if(x!==null)Q=!0;else{var _=r(m);_!==null&&P(ie,_.startTime-D),Q=!1}}break e}finally{x=null,S=se,v=!1}Q=void 0}}finally{Q?le():M=!1}}}var le;if(typeof R=="function")le=function(){R(ne)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,oe=xe.port2;xe.port1.onmessage=ne,le=function(){oe.postMessage(null)}}else le=function(){E(ne,0)};function P(D,Q){Y=E(function(){D(t.unstable_now())},Q)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(D){D.callback=null},t.unstable_forceFrameRate=function(D){0>D||125<D?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ue=0<D?Math.floor(1e3/D):5},t.unstable_getCurrentPriorityLevel=function(){return S},t.unstable_next=function(D){switch(S){case 1:case 2:case 3:var Q=3;break;default:Q=S}var se=S;S=Q;try{return D()}finally{S=se}},t.unstable_requestPaint=function(){L=!0},t.unstable_runWithPriority=function(D,Q){switch(D){case 1:case 2:case 3:case 4:case 5:break;default:D=3}var se=S;S=D;try{return Q()}finally{S=se}},t.unstable_scheduleCallback=function(D,Q,se){var me=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?me+se:me):se=me,D){case 1:var C=-1;break;case 2:C=250;break;case 5:C=1073741823;break;case 4:C=1e4;break;default:C=5e3}return C=se+C,D={id:b++,callback:Q,priorityLevel:D,startTime:se,expirationTime:C,sortIndex:-1},se>me?(D.sortIndex=se,i(m,D),r(g)===null&&D===r(m)&&(T?(V(Y),Y=-1):T=!0,P(ie,se-me))):(D.sortIndex=C,i(g,D),N||v||(N=!0,M||(M=!0,le()))),D},t.unstable_shouldYield=U,t.unstable_wrapCallback=function(D){var Q=S;return function(){var se=S;S=Q;try{return D.apply(this,arguments)}finally{S=se}}}})(uc)),uc}var Hm;function x0(){return Hm||(Hm=1,ac.exports=g0()),ac.exports}var sc={exports:{}},Dt={};/**
|
|
26
|
-
* @license React
|
|
27
|
-
* react-dom.production.js
|
|
28
|
-
*
|
|
29
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
30
|
-
*
|
|
31
|
-
* This source code is licensed under the MIT license found in the
|
|
32
|
-
* LICENSE file in the root directory of this source tree.
|
|
33
|
-
*/var Im;function y0(){if(Im)return Dt;Im=1;var t=of();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)m+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+m+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var u={d:{f:r,r:function(){throw Error(i(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(g,m,b){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:x==null?null:""+x,children:g,containerInfo:m,implementation:b}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function p(g,m){if(g==="font")return"";if(typeof m=="string")return m==="use-credentials"?m:""}return Dt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Dt.createPortal=function(g,m){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)throw Error(i(299));return c(g,m,null,b)},Dt.flushSync=function(g){var m=f.T,b=u.p;try{if(f.T=null,u.p=2,g)return g()}finally{f.T=m,u.p=b,u.d.f()}},Dt.preconnect=function(g,m){typeof g=="string"&&(m?(m=m.crossOrigin,m=typeof m=="string"?m==="use-credentials"?m:"":void 0):m=null,u.d.C(g,m))},Dt.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},Dt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var b=m.as,x=p(b,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;b==="style"?u.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:v}):b==="script"&&u.d.X(g,{crossOrigin:x,integrity:S,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Dt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var b=p(m.as,m.crossOrigin);u.d.M(g,{crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0})}}else m==null&&u.d.M(g)},Dt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var b=m.as,x=p(b,m.crossOrigin);u.d.L(g,b,{crossOrigin:x,integrity:typeof m.integrity=="string"?m.integrity:void 0,nonce:typeof m.nonce=="string"?m.nonce:void 0,type:typeof m.type=="string"?m.type:void 0,fetchPriority:typeof m.fetchPriority=="string"?m.fetchPriority:void 0,referrerPolicy:typeof m.referrerPolicy=="string"?m.referrerPolicy:void 0,imageSrcSet:typeof m.imageSrcSet=="string"?m.imageSrcSet:void 0,imageSizes:typeof m.imageSizes=="string"?m.imageSizes:void 0,media:typeof m.media=="string"?m.media:void 0})}},Dt.preloadModule=function(g,m){if(typeof g=="string")if(m){var b=p(m.as,m.crossOrigin);u.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:b,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(g)},Dt.requestFormReset=function(g){u.d.r(g)},Dt.unstable_batchedUpdates=function(g,m){return g(m)},Dt.useFormState=function(g,m,b){return f.H.useFormState(g,m,b)},Dt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Dt.version="19.2.8",Dt}var Ym;function b0(){if(Ym)return sc.exports;Ym=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),sc.exports=y0(),sc.exports}/**
|
|
34
|
-
* @license React
|
|
35
|
-
* react-dom-client.production.js
|
|
36
|
-
*
|
|
37
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the MIT license found in the
|
|
40
|
-
* LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/var Gm;function v0(){if(Gm)return Fr;Gm=1;var t=x0(),i=of(),r=b0();function u(e){var n="https://react.dev/errors/"+e;if(1<arguments.length){n+="?args[]="+encodeURIComponent(arguments[1]);for(var l=2;l<arguments.length;l++)n+="&args[]="+encodeURIComponent(arguments[l])}return"Minified React error #"+e+"; visit "+n+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var n=e,l=e;if(e.alternate)for(;n.return;)n=n.return;else{e=n;do n=e,(n.flags&4098)!==0&&(l=n.return),e=n.return;while(e)}return n.tag===3?l:null}function f(e){if(e.tag===13){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function p(e){if(e.tag===31){var n=e.memoizedState;if(n===null&&(e=e.alternate,e!==null&&(n=e.memoizedState)),n!==null)return n.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(u(188))}function m(e){var n=e.alternate;if(!n){if(n=c(e),n===null)throw Error(u(188));return n!==e?null:e}for(var l=e,a=n;;){var s=l.return;if(s===null)break;var d=s.alternate;if(d===null){if(a=s.return,a!==null){l=a;continue}break}if(s.child===d.child){for(d=s.child;d;){if(d===l)return g(s),e;if(d===a)return g(s),n;d=d.sibling}throw Error(u(188))}if(l.return!==a.return)l=s,a=d;else{for(var y=!1,k=s.child;k;){if(k===l){y=!0,l=s,a=d;break}if(k===a){y=!0,a=s,l=d;break}k=k.sibling}if(!y){for(k=d.child;k;){if(k===l){y=!0,l=d,a=s;break}if(k===a){y=!0,a=d,l=s;break}k=k.sibling}if(!y)throw Error(u(189))}}if(l.alternate!==a)throw Error(u(190))}if(l.tag!==3)throw Error(u(188));return l.stateNode.current===l?e:n}function b(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=b(e),n!==null)return n;e=e.sibling}return null}var x=Object.assign,S=Symbol.for("react.element"),v=Symbol.for("react.transitional.element"),N=Symbol.for("react.portal"),T=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),V=Symbol.for("react.consumer"),R=Symbol.for("react.context"),W=Symbol.for("react.forward_ref"),ie=Symbol.for("react.suspense"),M=Symbol.for("react.suspense_list"),Y=Symbol.for("react.memo"),ue=Symbol.for("react.lazy"),J=Symbol.for("react.activity"),U=Symbol.for("react.memo_cache_sentinel"),ne=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=ne&&e[ne]||e["@@iterator"],typeof e=="function"?e:null)}var xe=Symbol.for("react.client.reference");function oe(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===xe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case T:return"Fragment";case E:return"Profiler";case L:return"StrictMode";case ie:return"Suspense";case M:return"SuspenseList";case J:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case R:return e.displayName||"Context";case V:return(e._context.displayName||"Context")+".Consumer";case W:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Y:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case ue:n=e._payload,e=e._init;try{return oe(e(n))}catch{}}return null}var P=Array.isArray,D=i.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q=r.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},me=[],C=-1;function _(e){return{current:e}}function H(e){0>C||(e.current=me[C],me[C]=null,C--)}function w(e,n){C++,me[C]=e.current,e.current=n}var ae=_(null),fe=_(null),he=_(null),je=_(null);function Ge(e,n){switch(w(he,n),w(fe,e),w(ae,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?im(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=im(n),e=rm(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}H(ae),w(ae,e)}function ge(){H(ae),H(fe),H(he)}function yt(e){e.memoizedState!==null&&w(je,e);var n=ae.current,l=rm(n,e.type);n!==l&&(w(fe,e),w(ae,l))}function Ot(e){fe.current===e&&(H(ae),H(fe)),je.current===e&&(H(je),Hr._currentValue=se)}var ln,rl;function qt(e){if(ln===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);ln=n&&n[1]||"",rl=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+ln+e+rl}var rn=!1;function En(e,n){if(!e||rn)return"";rn=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(n){var Z=function(){throw Error()};if(Object.defineProperty(Z.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(Z,[])}catch(G){var I=G}Reflect.construct(e,[],Z)}else{try{Z.call()}catch(G){I=G}e.call(Z.prototype)}}else{try{throw Error()}catch(G){I=G}(Z=e())&&typeof Z.catch=="function"&&Z.catch(function(){})}}catch(G){if(G&&I&&typeof G.stack=="string")return[G.stack,I.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var s=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");s&&s.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var d=a.DetermineComponentFrameRoot(),y=d[0],k=d[1];if(y&&k){var A=y.split(`
|
|
44
|
-
`),B=k.split(`
|
|
45
|
-
`);for(s=a=0;a<A.length&&!A[a].includes("DetermineComponentFrameRoot");)a++;for(;s<B.length&&!B[s].includes("DetermineComponentFrameRoot");)s++;if(a===A.length||s===B.length)for(a=A.length-1,s=B.length-1;1<=a&&0<=s&&A[a]!==B[s];)s--;for(;1<=a&&0<=s;a--,s--)if(A[a]!==B[s]){if(a!==1||s!==1)do if(a--,s--,0>s||A[a]!==B[s]){var X=`
|
|
46
|
-
`+A[a].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=a&&0<=s);break}}}finally{rn=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?qt(l):""}function _n(e,n){switch(e.tag){case 26:case 27:case 5:return qt(e.type);case 16:return qt("Lazy");case 13:return e.child!==n&&n!==null?qt("Suspense Fallback"):qt("Suspense");case 19:return qt("SuspenseList");case 0:case 15:return En(e.type,!1);case 11:return En(e.type.render,!1);case 1:return En(e.type,!0);case 31:return qt("Activity");default:return""}}function al(e){try{var n="",l=null;do n+=_n(e,l),l=e,e=e.return;while(e);return n}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var bn=Object.prototype.hasOwnProperty,ee=t.unstable_scheduleCallback,Le=t.unstable_cancelCallback,it=t.unstable_shouldYield,an=t.unstable_requestPaint,rt=t.unstable_now,Cn=t.unstable_getCurrentPriorityLevel,F=t.unstable_ImmediatePriority,re=t.unstable_UserBlockingPriority,ve=t.unstable_NormalPriority,_e=t.unstable_LowPriority,He=t.unstable_IdlePriority,At=t.log,un=t.unstable_setDisableYieldValue,vt=null,at=null;function St(e){if(typeof At=="function"&&un(e),at&&typeof at.setStrictMode=="function")try{at.setStrictMode(vt,e)}catch{}}var Fe=Math.clz32?Math.clz32:Vu,vn=Math.log,zt=Math.LN2;function Vu(e){return e>>>=0,e===0?32:31-(vn(e)/zt|0)|0}var Ol=256,ai=262144,ui=4194304;function Un(e){var n=e&42;if(n!==0)return n;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 K(e,n,l){var a=e.pendingLanes;if(a===0)return 0;var s=0,d=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var k=a&134217727;return k!==0?(a=k&~d,a!==0?s=Un(a):(y&=k,y!==0?s=Un(y):l||(l=k&~e,l!==0&&(s=Un(l))))):(k=a&~d,k!==0?s=Un(k):y!==0?s=Un(y):l||(l=a&~e,l!==0&&(s=Un(l)))),s===0?0:n!==0&&n!==s&&(n&d)===0&&(d=s&-s,l=n&-n,d>=l||d===32&&(l&4194048)!==0)?n:s}function ce(e,n){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&n)===0}function Ee(e,n){switch(e){case 1:case 2:case 4:case 8:case 64:return n+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 n+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 ut(){var e=ui;return ui<<=1,(ui&62914560)===0&&(ui=4194304),e}function Tn(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function er(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function t1(e,n,l,a,s,d){var y=e.pendingLanes;e.pendingLanes=l,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=l,e.entangledLanes&=l,e.errorRecoveryDisabledLanes&=l,e.shellSuspendCounter=0;var k=e.entanglements,A=e.expirationTimes,B=e.hiddenUpdates;for(l=y&~l;0<l;){var X=31-Fe(l),Z=1<<X;k[X]=0,A[X]=-1;var I=B[X];if(I!==null)for(B[X]=null,X=0;X<I.length;X++){var G=I[X];G!==null&&(G.lane&=-536870913)}l&=~Z}a!==0&&Hf(e,a,0),d!==0&&s===0&&e.tag!==0&&(e.suspendedLanes|=d&~(y&~n))}function Hf(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-Fe(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function If(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var a=31-Fe(l),s=1<<a;s&n|e[a]&n&&(e[a]|=n),l&=~s}}function Yf(e,n){var l=n&-n;return l=(l&42)!==0?1:Fu(l),(l&(e.suspendedLanes|n))!==0?0:l}function Fu(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 Xu(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Gf(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:Cm(e.type))}function Vf(e,n){var l=Q.p;try{return Q.p=e,n()}finally{Q.p=l}}var ul=Math.random().toString(36).slice(2),Nt="__reactFiber$"+ul,Bt="__reactProps$"+ul,si="__reactContainer$"+ul,Qu="__reactEvents$"+ul,n1="__reactListeners$"+ul,l1="__reactHandles$"+ul,Ff="__reactResources$"+ul,tr="__reactMarker$"+ul;function $u(e){delete e[Nt],delete e[Bt],delete e[Qu],delete e[n1],delete e[l1]}function oi(e){var n=e[Nt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[si]||l[Nt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=dm(e);e!==null;){if(l=e[Nt])return l;e=dm(e)}return n}e=l,l=e.parentNode}return null}function ci(e){if(e=e[Nt]||e[si]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function nr(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(u(33))}function fi(e){var n=e[Ff];return n||(n=e[Ff]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function kt(e){e[tr]=!0}var Xf=new Set,Qf={};function Ll(e,n){di(e,n),di(e+"Capture",n)}function di(e,n){for(Qf[e]=n,e=0;e<n.length;e++)Xf.add(n[e])}var i1=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]*$"),$f={},Zf={};function r1(e){return bn.call(Zf,e)?!0:bn.call($f,e)?!1:i1.test(e)?Zf[e]=!0:($f[e]=!0,!1)}function sa(e,n,l){if(r1(n))if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":e.removeAttribute(n);return;case"boolean":var a=n.toLowerCase().slice(0,5);if(a!=="data-"&&a!=="aria-"){e.removeAttribute(n);return}}e.setAttribute(n,""+l)}}function oa(e,n,l){if(l===null)e.removeAttribute(n);else{switch(typeof l){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttribute(n,""+l)}}function qn(e,n,l,a){if(a===null)e.removeAttribute(l);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(l);return}e.setAttributeNS(n,l,""+a)}}function sn(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Kf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function a1(e,n,l){var a=Object.getOwnPropertyDescriptor(e.constructor.prototype,n);if(!e.hasOwnProperty(n)&&typeof a<"u"&&typeof a.get=="function"&&typeof a.set=="function"){var s=a.get,d=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return s.call(this)},set:function(y){l=""+y,d.call(this,y)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(y){l=""+y},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Zu(e){if(!e._valueTracker){var n=Kf(e)?"checked":"value";e._valueTracker=a1(e,n,""+e[n])}}function Jf(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),a="";return e&&(a=Kf(e)?e.checked?"true":"false":e.value),e=a,e!==l?(n.setValue(e),!0):!1}function ca(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 u1=/[\n"\\]/g;function on(e){return e.replace(u1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function Ku(e,n,l,a,s,d,y,k){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),n!=null?y==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+sn(n)):e.value!==""+sn(n)&&(e.value=""+sn(n)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),n!=null?Ju(e,y,sn(n)):l!=null?Ju(e,y,sn(l)):a!=null&&e.removeAttribute("value"),s==null&&d!=null&&(e.defaultChecked=!!d),s!=null&&(e.checked=s&&typeof s!="function"&&typeof s!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+sn(k):e.removeAttribute("name")}function Pf(e,n,l,a,s,d,y,k){if(d!=null&&typeof d!="function"&&typeof d!="symbol"&&typeof d!="boolean"&&(e.type=d),n!=null||l!=null){if(!(d!=="submit"&&d!=="reset"||n!=null)){Zu(e);return}l=l!=null?""+sn(l):"",n=n!=null?""+sn(n):l,k||n===e.value||(e.value=n),e.defaultValue=n}a=a??s,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=k?e.checked:!!a,e.defaultChecked=!!a,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),Zu(e)}function Ju(e,n,l){n==="number"&&ca(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function hi(e,n,l,a){if(e=e.options,n){n={};for(var s=0;s<l.length;s++)n["$"+l[s]]=!0;for(l=0;l<e.length;l++)s=n.hasOwnProperty("$"+e[l].value),e[l].selected!==s&&(e[l].selected=s),s&&a&&(e[l].defaultSelected=!0)}else{for(l=""+sn(l),n=null,s=0;s<e.length;s++){if(e[s].value===l){e[s].selected=!0,a&&(e[s].defaultSelected=!0);return}n!==null||e[s].disabled||(n=e[s])}n!==null&&(n.selected=!0)}}function Wf(e,n,l){if(n!=null&&(n=""+sn(n),n!==e.value&&(e.value=n),l==null)){e.defaultValue!==n&&(e.defaultValue=n);return}e.defaultValue=l!=null?""+sn(l):""}function ed(e,n,l,a){if(n==null){if(a!=null){if(l!=null)throw Error(u(92));if(P(a)){if(1<a.length)throw Error(u(93));a=a[0]}l=a}l==null&&(l=""),n=l}l=sn(n),e.defaultValue=l,a=e.textContent,a===l&&a!==""&&a!==null&&(e.value=a),Zu(e)}function pi(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var s1=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 td(e,n,l){var a=n.indexOf("--")===0;l==null||typeof l=="boolean"||l===""?a?e.setProperty(n,""):n==="float"?e.cssFloat="":e[n]="":a?e.setProperty(n,l):typeof l!="number"||l===0||s1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function nd(e,n,l){if(n!=null&&typeof n!="object")throw Error(u(62));if(e=e.style,l!=null){for(var a in l)!l.hasOwnProperty(a)||n!=null&&n.hasOwnProperty(a)||(a.indexOf("--")===0?e.setProperty(a,""):a==="float"?e.cssFloat="":e[a]="");for(var s in n)a=n[s],n.hasOwnProperty(s)&&l[s]!==a&&td(e,s,a)}else for(var d in n)n.hasOwnProperty(d)&&td(e,d,n[d])}function Pu(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 o1=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"]]),c1=/^[\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 fa(e){return c1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Bn(){}var Wu=null;function es(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var mi=null,gi=null;function ld(e){var n=ci(e);if(n&&(e=n.stateNode)){var l=e[Bt]||null;e:switch(e=n.stateNode,n.type){case"input":if(Ku(e,l.value,l.defaultValue,l.defaultValue,l.checked,l.defaultChecked,l.type,l.name),n=l.name,l.type==="radio"&&n!=null){for(l=e;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll('input[name="'+on(""+n)+'"][type="radio"]'),n=0;n<l.length;n++){var a=l[n];if(a!==e&&a.form===e.form){var s=a[Bt]||null;if(!s)throw Error(u(90));Ku(a,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name)}}for(n=0;n<l.length;n++)a=l[n],a.form===e.form&&Jf(a)}break e;case"textarea":Wf(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&hi(e,!!l.multiple,n,!1)}}}var ts=!1;function id(e,n,l){if(ts)return e(n,l);ts=!0;try{var a=e(n);return a}finally{if(ts=!1,(mi!==null||gi!==null)&&(Pa(),mi&&(n=mi,e=gi,gi=mi=null,ld(n),e)))for(n=0;n<e.length;n++)ld(e[n])}}function lr(e,n){var l=e.stateNode;if(l===null)return null;var a=l[Bt]||null;if(a===null)return null;l=a[n];e:switch(n){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(l&&typeof l!="function")throw Error(u(231,n,typeof l));return l}var Hn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),ns=!1;if(Hn)try{var ir={};Object.defineProperty(ir,"passive",{get:function(){ns=!0}}),window.addEventListener("test",ir,ir),window.removeEventListener("test",ir,ir)}catch{ns=!1}var sl=null,ls=null,da=null;function rd(){if(da)return da;var e,n=ls,l=n.length,a,s="value"in sl?sl.value:sl.textContent,d=s.length;for(e=0;e<l&&n[e]===s[e];e++);var y=l-e;for(a=1;a<=y&&n[l-a]===s[d-a];a++);return da=s.slice(e,1<a?1-a:void 0)}function ha(e){var n=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&n===13&&(e=13)):e=n,e===10&&(e=13),32<=e||e===13?e:0}function pa(){return!0}function ad(){return!1}function Ht(e){function n(l,a,s,d,y){this._reactName=l,this._targetInst=s,this.type=a,this.nativeEvent=d,this.target=y,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(l=e[k],this[k]=l?l(d):d[k]);return this.isDefaultPrevented=(d.defaultPrevented!=null?d.defaultPrevented:d.returnValue===!1)?pa:ad,this.isPropagationStopped=ad,this}return x(n.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=pa)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=pa)},persist:function(){},isPersistent:pa}),n}var Ul={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ma=Ht(Ul),rr=x({},Ul,{view:0,detail:0}),f1=Ht(rr),is,rs,ar,ga=x({},rr,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:us,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!==ar&&(ar&&e.type==="mousemove"?(is=e.screenX-ar.screenX,rs=e.screenY-ar.screenY):rs=is=0,ar=e),is)},movementY:function(e){return"movementY"in e?e.movementY:rs}}),ud=Ht(ga),d1=x({},ga,{dataTransfer:0}),h1=Ht(d1),p1=x({},rr,{relatedTarget:0}),as=Ht(p1),m1=x({},Ul,{animationName:0,elapsedTime:0,pseudoElement:0}),g1=Ht(m1),x1=x({},Ul,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),y1=Ht(x1),b1=x({},Ul,{data:0}),sd=Ht(b1),v1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},S1={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"},k1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function w1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=k1[e])?!!n[e]:!1}function us(){return w1}var j1=x({},rr,{key:function(e){if(e.key){var n=v1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=ha(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?S1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:us,charCode:function(e){return e.type==="keypress"?ha(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?ha(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),N1=Ht(j1),E1=x({},ga,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),od=Ht(E1),_1=x({},rr,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:us}),C1=Ht(_1),T1=x({},Ul,{propertyName:0,elapsedTime:0,pseudoElement:0}),A1=Ht(T1),z1=x({},ga,{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}),D1=Ht(z1),R1=x({},Ul,{newState:0,oldState:0}),M1=Ht(R1),O1=[9,13,27,32],ss=Hn&&"CompositionEvent"in window,ur=null;Hn&&"documentMode"in document&&(ur=document.documentMode);var L1=Hn&&"TextEvent"in window&&!ur,cd=Hn&&(!ss||ur&&8<ur&&11>=ur),fd=" ",dd=!1;function hd(e,n){switch(e){case"keyup":return O1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function pd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xi=!1;function U1(e,n){switch(e){case"compositionend":return pd(n);case"keypress":return n.which!==32?null:(dd=!0,fd);case"textInput":return e=n.data,e===fd&&dd?null:e;default:return null}}function q1(e,n){if(xi)return e==="compositionend"||!ss&&hd(e,n)?(e=rd(),da=ls=sl=null,xi=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1<n.char.length)return n.char;if(n.which)return String.fromCharCode(n.which)}return null;case"compositionend":return cd&&n.locale!=="ko"?null:n.data;default:return null}}var B1={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 md(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!B1[e.type]:n==="textarea"}function gd(e,n,l,a){mi?gi?gi.push(a):gi=[a]:mi=a,n=ru(n,"onChange"),0<n.length&&(l=new ma("onChange","change",null,l,a),e.push({event:l,listeners:n}))}var sr=null,or=null;function H1(e){Pp(e,0)}function xa(e){var n=nr(e);if(Jf(n))return e}function xd(e,n){if(e==="change")return n}var yd=!1;if(Hn){var os;if(Hn){var cs="oninput"in document;if(!cs){var bd=document.createElement("div");bd.setAttribute("oninput","return;"),cs=typeof bd.oninput=="function"}os=cs}else os=!1;yd=os&&(!document.documentMode||9<document.documentMode)}function vd(){sr&&(sr.detachEvent("onpropertychange",Sd),or=sr=null)}function Sd(e){if(e.propertyName==="value"&&xa(or)){var n=[];gd(n,or,e,es(e)),id(H1,n)}}function I1(e,n,l){e==="focusin"?(vd(),sr=n,or=l,sr.attachEvent("onpropertychange",Sd)):e==="focusout"&&vd()}function Y1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return xa(or)}function G1(e,n){if(e==="click")return xa(n)}function V1(e,n){if(e==="input"||e==="change")return xa(n)}function F1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var $t=typeof Object.is=="function"?Object.is:F1;function cr(e,n){if($t(e,n))return!0;if(typeof e!="object"||e===null||typeof n!="object"||n===null)return!1;var l=Object.keys(e),a=Object.keys(n);if(l.length!==a.length)return!1;for(a=0;a<l.length;a++){var s=l[a];if(!bn.call(n,s)||!$t(e[s],n[s]))return!1}return!0}function kd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wd(e,n){var l=kd(e);e=0;for(var a;l;){if(l.nodeType===3){if(a=e+l.textContent.length,e<=n&&a>=n)return{node:l,offset:n-e};e=a}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=kd(l)}}function jd(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?jd(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function Nd(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=ca(e.document);n instanceof e.HTMLIFrameElement;){try{var l=typeof n.contentWindow.location.href=="string"}catch{l=!1}if(l)e=n.contentWindow;else break;n=ca(e.document)}return n}function fs(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}var X1=Hn&&"documentMode"in document&&11>=document.documentMode,yi=null,ds=null,fr=null,hs=!1;function Ed(e,n,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;hs||yi==null||yi!==ca(a)||(a=yi,"selectionStart"in a&&fs(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}),fr&&cr(fr,a)||(fr=a,a=ru(ds,"onSelect"),0<a.length&&(n=new ma("onSelect","select",null,n,l),e.push({event:n,listeners:a}),n.target=yi)))}function ql(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var bi={animationend:ql("Animation","AnimationEnd"),animationiteration:ql("Animation","AnimationIteration"),animationstart:ql("Animation","AnimationStart"),transitionrun:ql("Transition","TransitionRun"),transitionstart:ql("Transition","TransitionStart"),transitioncancel:ql("Transition","TransitionCancel"),transitionend:ql("Transition","TransitionEnd")},ps={},_d={};Hn&&(_d=document.createElement("div").style,"AnimationEvent"in window||(delete bi.animationend.animation,delete bi.animationiteration.animation,delete bi.animationstart.animation),"TransitionEvent"in window||delete bi.transitionend.transition);function Bl(e){if(ps[e])return ps[e];if(!bi[e])return e;var n=bi[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in _d)return ps[e]=n[l];return e}var Cd=Bl("animationend"),Td=Bl("animationiteration"),Ad=Bl("animationstart"),Q1=Bl("transitionrun"),$1=Bl("transitionstart"),Z1=Bl("transitioncancel"),zd=Bl("transitionend"),Dd=new Map,ms="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(" ");ms.push("scrollEnd");function Sn(e,n){Dd.set(e,n),Ll(n,[e])}var ya=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=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(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},cn=[],vi=0,gs=0;function ba(){for(var e=vi,n=gs=vi=0;n<e;){var l=cn[n];cn[n++]=null;var a=cn[n];cn[n++]=null;var s=cn[n];cn[n++]=null;var d=cn[n];if(cn[n++]=null,a!==null&&s!==null){var y=a.pending;y===null?s.next=s:(s.next=y.next,y.next=s),a.pending=s}d!==0&&Rd(l,s,d)}}function va(e,n,l,a){cn[vi++]=e,cn[vi++]=n,cn[vi++]=l,cn[vi++]=a,gs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function xs(e,n,l,a){return va(e,n,l,a),Sa(e)}function Hl(e,n){return va(e,null,null,n),Sa(e)}function Rd(e,n,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var s=!1,d=e.return;d!==null;)d.childLanes|=l,a=d.alternate,a!==null&&(a.childLanes|=l),d.tag===22&&(e=d.stateNode,e===null||e._visibility&1||(s=!0)),e=d,d=d.return;return e.tag===3?(d=e.stateNode,s&&n!==null&&(s=31-Fe(l),e=d.hiddenUpdates,a=e[s],a===null?e[s]=[n]:a.push(n),n.lane=l|536870912),d):null}function Sa(e){if(50<Rr)throw Rr=0,_o=null,Error(u(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var Si={};function K1(e,n,l,a){this.tag=e,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=n,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 Zt(e,n,l,a){return new K1(e,n,l,a)}function ys(e){return e=e.prototype,!(!e||!e.isReactComponent)}function In(e,n){var l=e.alternate;return l===null?(l=Zt(e.tag,n,e.key,e.mode),l.elementType=e.elementType,l.type=e.type,l.stateNode=e.stateNode,l.alternate=e,e.alternate=l):(l.pendingProps=n,l.type=e.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=e.flags&65011712,l.childLanes=e.childLanes,l.lanes=e.lanes,l.child=e.child,l.memoizedProps=e.memoizedProps,l.memoizedState=e.memoizedState,l.updateQueue=e.updateQueue,n=e.dependencies,l.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},l.sibling=e.sibling,l.index=e.index,l.ref=e.ref,l.refCleanup=e.refCleanup,l}function Md(e,n){e.flags&=65011714;var l=e.alternate;return l===null?(e.childLanes=0,e.lanes=n,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=l.childLanes,e.lanes=l.lanes,e.child=l.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=l.memoizedProps,e.memoizedState=l.memoizedState,e.updateQueue=l.updateQueue,e.type=l.type,n=l.dependencies,e.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),e}function ka(e,n,l,a,s,d){var y=0;if(a=e,typeof e=="function")ys(e)&&(y=1);else if(typeof e=="string")y=t0(e,l,ae.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case J:return e=Zt(31,l,n,s),e.elementType=J,e.lanes=d,e;case T:return Il(l.children,s,d,n);case L:y=8,s|=24;break;case E:return e=Zt(12,l,n,s|2),e.elementType=E,e.lanes=d,e;case ie:return e=Zt(13,l,n,s),e.elementType=ie,e.lanes=d,e;case M:return e=Zt(19,l,n,s),e.elementType=M,e.lanes=d,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case R:y=10;break e;case V:y=9;break e;case W:y=11;break e;case Y:y=14;break e;case ue:y=16,a=null;break e}y=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return n=Zt(y,l,n,s),n.elementType=e,n.type=a,n.lanes=d,n}function Il(e,n,l,a){return e=Zt(7,e,a,n),e.lanes=l,e}function bs(e,n,l){return e=Zt(6,e,null,n),e.lanes=l,e}function Od(e){var n=Zt(18,null,null,0);return n.stateNode=e,n}function vs(e,n,l){return n=Zt(4,e.children!==null?e.children:[],e.key,n),n.lanes=l,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}var Ld=new WeakMap;function fn(e,n){if(typeof e=="object"&&e!==null){var l=Ld.get(e);return l!==void 0?l:(n={value:e,source:n,stack:al(n)},Ld.set(e,n),n)}return{value:e,source:n,stack:al(n)}}var ki=[],wi=0,wa=null,dr=0,dn=[],hn=0,ol=null,An=1,zn="";function Yn(e,n){ki[wi++]=dr,ki[wi++]=wa,wa=e,dr=n}function Ud(e,n,l){dn[hn++]=An,dn[hn++]=zn,dn[hn++]=ol,ol=e;var a=An;e=zn;var s=32-Fe(a)-1;a&=~(1<<s),l+=1;var d=32-Fe(n)+s;if(30<d){var y=s-s%5;d=(a&(1<<y)-1).toString(32),a>>=y,s-=y,An=1<<32-Fe(n)+s|l<<s|a,zn=d+e}else An=1<<d|l<<s|a,zn=e}function Ss(e){e.return!==null&&(Yn(e,1),Ud(e,1,0))}function ks(e){for(;e===wa;)wa=ki[--wi],ki[wi]=null,dr=ki[--wi],ki[wi]=null;for(;e===ol;)ol=dn[--hn],dn[hn]=null,zn=dn[--hn],dn[hn]=null,An=dn[--hn],dn[hn]=null}function qd(e,n){dn[hn++]=An,dn[hn++]=zn,dn[hn++]=ol,An=n.id,zn=n.overflow,ol=e}var Et=null,tt=null,Ue=!1,cl=null,pn=!1,ws=Error(u(519));function fl(e){var n=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw hr(fn(n,e)),ws}function Bd(e){var n=e.stateNode,l=e.type,a=e.memoizedProps;switch(n[Nt]=e,n[Bt]=a,l){case"dialog":De("cancel",n),De("close",n);break;case"iframe":case"object":case"embed":De("load",n);break;case"video":case"audio":for(l=0;l<Or.length;l++)De(Or[l],n);break;case"source":De("error",n);break;case"img":case"image":case"link":De("error",n),De("load",n);break;case"details":De("toggle",n);break;case"input":De("invalid",n),Pf(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":De("invalid",n);break;case"textarea":De("invalid",n),ed(n,a.value,a.defaultValue,a.children)}l=a.children,typeof l!="string"&&typeof l!="number"&&typeof l!="bigint"||n.textContent===""+l||a.suppressHydrationWarning===!0||nm(n.textContent,l)?(a.popover!=null&&(De("beforetoggle",n),De("toggle",n)),a.onScroll!=null&&De("scroll",n),a.onScrollEnd!=null&&De("scrollend",n),a.onClick!=null&&(n.onclick=Bn),n=!0):n=!1,n||fl(e,!0)}function Hd(e){for(Et=e.return;Et;)switch(Et.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Et=Et.return}}function ji(e){if(e!==Et)return!1;if(!Ue)return Hd(e),Ue=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Yo(e.type,e.memoizedProps)),l=!l),l&&tt&&fl(e),Hd(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));tt=fm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));tt=fm(e)}else n===27?(n=tt,Nl(e.type)?(e=Qo,Qo=null,tt=e):tt=n):tt=Et?gn(e.stateNode.nextSibling):null;return!0}function Yl(){tt=Et=null,Ue=!1}function js(){var e=cl;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),cl=null),e}function hr(e){cl===null?cl=[e]:cl.push(e)}var Ns=_(null),Gl=null,Gn=null;function dl(e,n,l){w(Ns,n._currentValue),n._currentValue=l}function Vn(e){e._currentValue=Ns.current,H(Ns)}function Es(e,n,l){for(;e!==null;){var a=e.alternate;if((e.childLanes&n)!==n?(e.childLanes|=n,a!==null&&(a.childLanes|=n)):a!==null&&(a.childLanes&n)!==n&&(a.childLanes|=n),e===l)break;e=e.return}}function _s(e,n,l,a){var s=e.child;for(s!==null&&(s.return=e);s!==null;){var d=s.dependencies;if(d!==null){var y=s.child;d=d.firstContext;e:for(;d!==null;){var k=d;d=s;for(var A=0;A<n.length;A++)if(k.context===n[A]){d.lanes|=l,k=d.alternate,k!==null&&(k.lanes|=l),Es(d.return,l,e),a||(y=null);break e}d=k.next}}else if(s.tag===18){if(y=s.return,y===null)throw Error(u(341));y.lanes|=l,d=y.alternate,d!==null&&(d.lanes|=l),Es(y,l,e),y=null}else y=s.child;if(y!==null)y.return=s;else for(y=s;y!==null;){if(y===e){y=null;break}if(s=y.sibling,s!==null){s.return=y.return,y=s;break}y=y.return}s=y}}function Ni(e,n,l,a){e=null;for(var s=n,d=!1;s!==null;){if(!d){if((s.flags&524288)!==0)d=!0;else if((s.flags&262144)!==0)break}if(s.tag===10){var y=s.alternate;if(y===null)throw Error(u(387));if(y=y.memoizedProps,y!==null){var k=s.type;$t(s.pendingProps.value,y.value)||(e!==null?e.push(k):e=[k])}}else if(s===je.current){if(y=s.alternate,y===null)throw Error(u(387));y.memoizedState.memoizedState!==s.memoizedState.memoizedState&&(e!==null?e.push(Hr):e=[Hr])}s=s.return}e!==null&&_s(n,e,l,a),n.flags|=262144}function ja(e){for(e=e.firstContext;e!==null;){if(!$t(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Vl(e){Gl=e,Gn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function _t(e){return Id(Gl,e)}function Na(e,n){return Gl===null&&Vl(e),Id(e,n)}function Id(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Gn===null){if(e===null)throw Error(u(308));Gn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Gn=Gn.next=n;return l}var J1=typeof AbortController<"u"?AbortController:function(){var e=[],n=this.signal={aborted:!1,addEventListener:function(l,a){e.push(a)}};this.abort=function(){n.aborted=!0,e.forEach(function(l){return l()})}},P1=t.unstable_scheduleCallback,W1=t.unstable_NormalPriority,ht={$$typeof:R,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Cs(){return{controller:new J1,data:new Map,refCount:0}}function pr(e){e.refCount--,e.refCount===0&&P1(W1,function(){e.controller.abort()})}var mr=null,Ts=0,Ei=0,_i=null;function eb(e,n){if(mr===null){var l=mr=[];Ts=0,Ei=Ro(),_i={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Ts++,n.then(Yd,Yd),n}function Yd(){if(--Ts===0&&mr!==null){_i!==null&&(_i.status="fulfilled");var e=mr;mr=null,Ei=0,_i=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function tb(e,n){var l=[],a={status:"pending",value:null,reason:null,then:function(s){l.push(s)}};return e.then(function(){a.status="fulfilled",a.value=n;for(var s=0;s<l.length;s++)(0,l[s])(n)},function(s){for(a.status="rejected",a.reason=s,s=0;s<l.length;s++)(0,l[s])(void 0)}),a}var Gd=D.S;D.S=function(e,n){Ep=rt(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&eb(e,n),Gd!==null&&Gd(e,n)};var Fl=_(null);function As(){var e=Fl.current;return e!==null?e:Pe.pooledCache}function Ea(e,n){n===null?w(Fl,Fl.current):w(Fl,n.pool)}function Vd(){var e=As();return e===null?null:{parent:ht._currentValue,pool:e}}var Ci=Error(u(460)),zs=Error(u(474)),_a=Error(u(542)),Ca={then:function(){}};function Fd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Xd(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Bn,Bn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,$d(e),e;default:if(typeof n.status=="string")n.then(Bn,Bn);else{if(e=Pe,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=n,e.status="pending",e.then(function(a){if(n.status==="pending"){var s=n;s.status="fulfilled",s.value=a}},function(a){if(n.status==="pending"){var s=n;s.status="rejected",s.reason=a}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,$d(e),e}throw Ql=n,Ci}}function Xl(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ql=l,Ci):l}}var Ql=null;function Qd(){if(Ql===null)throw Error(u(459));var e=Ql;return Ql=null,e}function $d(e){if(e===Ci||e===_a)throw Error(u(483))}var Ti=null,gr=0;function Ta(e){var n=gr;return gr+=1,Ti===null&&(Ti=[]),Xd(Ti,e,n)}function xr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function Aa(e,n){throw n.$$typeof===S?Error(u(525)):(e=Object.prototype.toString.call(n),Error(u(31,e==="[object Object]"?"object with keys {"+Object.keys(n).join(", ")+"}":e)))}function Zd(e){function n(O,z){if(e){var q=O.deletions;q===null?(O.deletions=[z],O.flags|=16):q.push(z)}}function l(O,z){if(!e)return null;for(;z!==null;)n(O,z),z=z.sibling;return null}function a(O){for(var z=new Map;O!==null;)O.key!==null?z.set(O.key,O):z.set(O.index,O),O=O.sibling;return z}function s(O,z){return O=In(O,z),O.index=0,O.sibling=null,O}function d(O,z,q){return O.index=q,e?(q=O.alternate,q!==null?(q=q.index,q<z?(O.flags|=67108866,z):q):(O.flags|=67108866,z)):(O.flags|=1048576,z)}function y(O){return e&&O.alternate===null&&(O.flags|=67108866),O}function k(O,z,q,$){return z===null||z.tag!==6?(z=bs(q,O.mode,$),z.return=O,z):(z=s(z,q),z.return=O,z)}function A(O,z,q,$){var ye=q.type;return ye===T?X(O,z,q.props.children,$,q.key):z!==null&&(z.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===ue&&Xl(ye)===z.type)?(z=s(z,q.props),xr(z,q),z.return=O,z):(z=ka(q.type,q.key,q.props,null,O.mode,$),xr(z,q),z.return=O,z)}function B(O,z,q,$){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=vs(q,O.mode,$),z.return=O,z):(z=s(z,q.children||[]),z.return=O,z)}function X(O,z,q,$,ye){return z===null||z.tag!==7?(z=Il(q,O.mode,$,ye),z.return=O,z):(z=s(z,q),z.return=O,z)}function Z(O,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=bs(""+z,O.mode,q),z.return=O,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case v:return q=ka(z.type,z.key,z.props,null,O.mode,q),xr(q,z),q.return=O,q;case N:return z=vs(z,O.mode,q),z.return=O,z;case ue:return z=Xl(z),Z(O,z,q)}if(P(z)||le(z))return z=Il(z,O.mode,q,null),z.return=O,z;if(typeof z.then=="function")return Z(O,Ta(z),q);if(z.$$typeof===R)return Z(O,Na(O,z),q);Aa(O,z)}return null}function I(O,z,q,$){var ye=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return ye!==null?null:k(O,z,""+q,$);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return q.key===ye?A(O,z,q,$):null;case N:return q.key===ye?B(O,z,q,$):null;case ue:return q=Xl(q),I(O,z,q,$)}if(P(q)||le(q))return ye!==null?null:X(O,z,q,$,null);if(typeof q.then=="function")return I(O,z,Ta(q),$);if(q.$$typeof===R)return I(O,z,Na(O,q),$);Aa(O,q)}return null}function G(O,z,q,$,ye){if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return O=O.get(q)||null,k(z,O,""+$,ye);if(typeof $=="object"&&$!==null){switch($.$$typeof){case v:return O=O.get($.key===null?q:$.key)||null,A(z,O,$,ye);case N:return O=O.get($.key===null?q:$.key)||null,B(z,O,$,ye);case ue:return $=Xl($),G(O,z,q,$,ye)}if(P($)||le($))return O=O.get(q)||null,X(z,O,$,ye,null);if(typeof $.then=="function")return G(O,z,q,Ta($),ye);if($.$$typeof===R)return G(O,z,q,Na(z,$),ye);Aa(z,$)}return null}function de(O,z,q,$){for(var ye=null,Ie=null,pe=z,Te=z=0,Oe=null;pe!==null&&Te<q.length;Te++){pe.index>Te?(Oe=pe,pe=null):Oe=pe.sibling;var Ye=I(O,pe,q[Te],$);if(Ye===null){pe===null&&(pe=Oe);break}e&&pe&&Ye.alternate===null&&n(O,pe),z=d(Ye,z,Te),Ie===null?ye=Ye:Ie.sibling=Ye,Ie=Ye,pe=Oe}if(Te===q.length)return l(O,pe),Ue&&Yn(O,Te),ye;if(pe===null){for(;Te<q.length;Te++)pe=Z(O,q[Te],$),pe!==null&&(z=d(pe,z,Te),Ie===null?ye=pe:Ie.sibling=pe,Ie=pe);return Ue&&Yn(O,Te),ye}for(pe=a(pe);Te<q.length;Te++)Oe=G(pe,O,Te,q[Te],$),Oe!==null&&(e&&Oe.alternate!==null&&pe.delete(Oe.key===null?Te:Oe.key),z=d(Oe,z,Te),Ie===null?ye=Oe:Ie.sibling=Oe,Ie=Oe);return e&&pe.forEach(function(Al){return n(O,Al)}),Ue&&Yn(O,Te),ye}function Se(O,z,q,$){if(q==null)throw Error(u(151));for(var ye=null,Ie=null,pe=z,Te=z=0,Oe=null,Ye=q.next();pe!==null&&!Ye.done;Te++,Ye=q.next()){pe.index>Te?(Oe=pe,pe=null):Oe=pe.sibling;var Al=I(O,pe,Ye.value,$);if(Al===null){pe===null&&(pe=Oe);break}e&&pe&&Al.alternate===null&&n(O,pe),z=d(Al,z,Te),Ie===null?ye=Al:Ie.sibling=Al,Ie=Al,pe=Oe}if(Ye.done)return l(O,pe),Ue&&Yn(O,Te),ye;if(pe===null){for(;!Ye.done;Te++,Ye=q.next())Ye=Z(O,Ye.value,$),Ye!==null&&(z=d(Ye,z,Te),Ie===null?ye=Ye:Ie.sibling=Ye,Ie=Ye);return Ue&&Yn(O,Te),ye}for(pe=a(pe);!Ye.done;Te++,Ye=q.next())Ye=G(pe,O,Te,Ye.value,$),Ye!==null&&(e&&Ye.alternate!==null&&pe.delete(Ye.key===null?Te:Ye.key),z=d(Ye,z,Te),Ie===null?ye=Ye:Ie.sibling=Ye,Ie=Ye);return e&&pe.forEach(function(d0){return n(O,d0)}),Ue&&Yn(O,Te),ye}function Ke(O,z,q,$){if(typeof q=="object"&&q!==null&&q.type===T&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case v:e:{for(var ye=q.key;z!==null;){if(z.key===ye){if(ye=q.type,ye===T){if(z.tag===7){l(O,z.sibling),$=s(z,q.props.children),$.return=O,O=$;break e}}else if(z.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===ue&&Xl(ye)===z.type){l(O,z.sibling),$=s(z,q.props),xr($,q),$.return=O,O=$;break e}l(O,z);break}else n(O,z);z=z.sibling}q.type===T?($=Il(q.props.children,O.mode,$,q.key),$.return=O,O=$):($=ka(q.type,q.key,q.props,null,O.mode,$),xr($,q),$.return=O,O=$)}return y(O);case N:e:{for(ye=q.key;z!==null;){if(z.key===ye)if(z.tag===4&&z.stateNode.containerInfo===q.containerInfo&&z.stateNode.implementation===q.implementation){l(O,z.sibling),$=s(z,q.children||[]),$.return=O,O=$;break e}else{l(O,z);break}else n(O,z);z=z.sibling}$=vs(q,O.mode,$),$.return=O,O=$}return y(O);case ue:return q=Xl(q),Ke(O,z,q,$)}if(P(q))return de(O,z,q,$);if(le(q)){if(ye=le(q),typeof ye!="function")throw Error(u(150));return q=ye.call(q),Se(O,z,q,$)}if(typeof q.then=="function")return Ke(O,z,Ta(q),$);if(q.$$typeof===R)return Ke(O,z,Na(O,q),$);Aa(O,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,z!==null&&z.tag===6?(l(O,z.sibling),$=s(z,q),$.return=O,O=$):(l(O,z),$=bs(q,O.mode,$),$.return=O,O=$),y(O)):l(O,z)}return function(O,z,q,$){try{gr=0;var ye=Ke(O,z,q,$);return Ti=null,ye}catch(pe){if(pe===Ci||pe===_a)throw pe;var Ie=Zt(29,pe,null,O.mode);return Ie.lanes=$,Ie.return=O,Ie}}}var $l=Zd(!0),Kd=Zd(!1),hl=!1;function Ds(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Rs(e,n){e=e.updateQueue,n.updateQueue===e&&(n.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function pl(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function ml(e,n,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Ve&2)!==0){var s=a.pending;return s===null?n.next=n:(n.next=s.next,s.next=n),a.pending=n,n=Sa(e),Rd(e,null,l),n}return va(e,a,n,l),Sa(e)}function yr(e,n,l){if(n=n.updateQueue,n!==null&&(n=n.shared,(l&4194048)!==0)){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,If(e,l)}}function Ms(e,n){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var s=null,d=null;if(l=l.firstBaseUpdate,l!==null){do{var y={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};d===null?s=d=y:d=d.next=y,l=l.next}while(l!==null);d===null?s=d=n:d=d.next=n}else s=d=n;l={baseState:a.baseState,firstBaseUpdate:s,lastBaseUpdate:d,shared:a.shared,callbacks:a.callbacks},e.updateQueue=l;return}e=l.lastBaseUpdate,e===null?l.firstBaseUpdate=n:e.next=n,l.lastBaseUpdate=n}var Os=!1;function br(){if(Os){var e=_i;if(e!==null)throw e}}function vr(e,n,l,a){Os=!1;var s=e.updateQueue;hl=!1;var d=s.firstBaseUpdate,y=s.lastBaseUpdate,k=s.shared.pending;if(k!==null){s.shared.pending=null;var A=k,B=A.next;A.next=null,y===null?d=B:y.next=B,y=A;var X=e.alternate;X!==null&&(X=X.updateQueue,k=X.lastBaseUpdate,k!==y&&(k===null?X.firstBaseUpdate=B:k.next=B,X.lastBaseUpdate=A))}if(d!==null){var Z=s.baseState;y=0,X=B=A=null,k=d;do{var I=k.lane&-536870913,G=I!==k.lane;if(G?(Me&I)===I:(a&I)===I){I!==0&&I===Ei&&(Os=!0),X!==null&&(X=X.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var de=e,Se=k;I=n;var Ke=l;switch(Se.tag){case 1:if(de=Se.payload,typeof de=="function"){Z=de.call(Ke,Z,I);break e}Z=de;break e;case 3:de.flags=de.flags&-65537|128;case 0:if(de=Se.payload,I=typeof de=="function"?de.call(Ke,Z,I):de,I==null)break e;Z=x({},Z,I);break e;case 2:hl=!0}}I=k.callback,I!==null&&(e.flags|=64,G&&(e.flags|=8192),G=s.callbacks,G===null?s.callbacks=[I]:G.push(I))}else G={lane:I,tag:k.tag,payload:k.payload,callback:k.callback,next:null},X===null?(B=X=G,A=Z):X=X.next=G,y|=I;if(k=k.next,k===null){if(k=s.shared.pending,k===null)break;G=k,k=G.next,G.next=null,s.lastBaseUpdate=G,s.shared.pending=null}}while(!0);X===null&&(A=Z),s.baseState=A,s.firstBaseUpdate=B,s.lastBaseUpdate=X,d===null&&(s.shared.lanes=0),vl|=y,e.lanes=y,e.memoizedState=Z}}function Jd(e,n){if(typeof e!="function")throw Error(u(191,e));e.call(n)}function Pd(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)Jd(l[e],n)}var Ai=_(null),za=_(0);function Wd(e,n){e=Wn,w(za,e),w(Ai,n),Wn=e|n.baseLanes}function Ls(){w(za,Wn),w(Ai,Ai.current)}function Us(){Wn=za.current,H(Ai),H(za)}var Kt=_(null),mn=null;function gl(e){var n=e.alternate;w(ct,ct.current&1),w(Kt,e),mn===null&&(n===null||Ai.current!==null||n.memoizedState!==null)&&(mn=e)}function qs(e){w(ct,ct.current),w(Kt,e),mn===null&&(mn=e)}function eh(e){e.tag===22?(w(ct,ct.current),w(Kt,e),mn===null&&(mn=e)):xl()}function xl(){w(ct,ct.current),w(Kt,Kt.current)}function Jt(e){H(Kt),mn===e&&(mn=null),H(ct)}var ct=_(0);function Da(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Fo(l)||Xo(l)))return n}else if(n.tag===19&&(n.memoizedProps.revealOrder==="forwards"||n.memoizedProps.revealOrder==="backwards"||n.memoizedProps.revealOrder==="unstable_legacy-backwards"||n.memoizedProps.revealOrder==="together")){if((n.flags&128)!==0)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Fn=0,Ce=null,$e=null,pt=null,Ra=!1,zi=!1,Zl=!1,Ma=0,Sr=0,Di=null,nb=0;function st(){throw Error(u(321))}function Bs(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!$t(e[l],n[l]))return!1;return!0}function Hs(e,n,l,a,s,d){return Fn=d,Ce=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=e===null||e.memoizedState===null?Uh:to,Zl=!1,d=l(a,s),Zl=!1,zi&&(d=nh(n,l,a,s)),th(e),d}function th(e){D.H=jr;var n=$e!==null&&$e.next!==null;if(Fn=0,pt=$e=Ce=null,Ra=!1,Sr=0,Di=null,n)throw Error(u(300));e===null||mt||(e=e.dependencies,e!==null&&ja(e)&&(mt=!0))}function nh(e,n,l,a){Ce=e;var s=0;do{if(zi&&(Di=null),Sr=0,zi=!1,25<=s)throw Error(u(301));if(s+=1,pt=$e=null,e.updateQueue!=null){var d=e.updateQueue;d.lastEffect=null,d.events=null,d.stores=null,d.memoCache!=null&&(d.memoCache.index=0)}D.H=qh,d=n(l,a)}while(zi);return d}function lb(){var e=D.H,n=e.useState()[0];return n=typeof n.then=="function"?kr(n):n,e=e.useState()[0],($e!==null?$e.memoizedState:null)!==e&&(Ce.flags|=1024),n}function Is(){var e=Ma!==0;return Ma=0,e}function Ys(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function Gs(e){if(Ra){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ra=!1}Fn=0,pt=$e=Ce=null,zi=!1,Sr=Ma=0,Di=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return pt===null?Ce.memoizedState=pt=e:pt=pt.next=e,pt}function ft(){if($e===null){var e=Ce.alternate;e=e!==null?e.memoizedState:null}else e=$e.next;var n=pt===null?Ce.memoizedState:pt.next;if(n!==null)pt=n,$e=e;else{if(e===null)throw Ce.alternate===null?Error(u(467)):Error(u(310));$e=e,e={memoizedState:$e.memoizedState,baseState:$e.baseState,baseQueue:$e.baseQueue,queue:$e.queue,next:null},pt===null?Ce.memoizedState=pt=e:pt=pt.next=e}return pt}function Oa(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function kr(e){var n=Sr;return Sr+=1,Di===null&&(Di=[]),e=Xd(Di,e,n),n=Ce,(pt===null?n.memoizedState:pt.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Uh:to),e}function La(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return kr(e);if(e.$$typeof===R)return _t(e)}throw Error(u(438,String(e)))}function Vs(e){var n=null,l=Ce.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var a=Ce.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(n={data:a.data.map(function(s){return s.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=Oa(),Ce.updateQueue=l),l.memoCache=n,l=n.data[n.index],l===void 0)for(l=n.data[n.index]=Array(e),a=0;a<e;a++)l[a]=U;return n.index++,l}function Xn(e,n){return typeof n=="function"?n(e):n}function Ua(e){var n=ft();return Fs(n,$e,e)}function Fs(e,n,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var s=e.baseQueue,d=a.pending;if(d!==null){if(s!==null){var y=s.next;s.next=d.next,d.next=y}n.baseQueue=s=d,a.pending=null}if(d=e.baseState,s===null)e.memoizedState=d;else{n=s.next;var k=y=null,A=null,B=n,X=!1;do{var Z=B.lane&-536870913;if(Z!==B.lane?(Me&Z)===Z:(Fn&Z)===Z){var I=B.revertLane;if(I===0)A!==null&&(A=A.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),Z===Ei&&(X=!0);else if((Fn&I)===I){B=B.next,I===Ei&&(X=!0);continue}else Z={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(k=A=Z,y=d):A=A.next=Z,Ce.lanes|=I,vl|=I;Z=B.action,Zl&&l(d,Z),d=B.hasEagerState?B.eagerState:l(d,Z)}else I={lane:Z,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},A===null?(k=A=I,y=d):A=A.next=I,Ce.lanes|=Z,vl|=Z;B=B.next}while(B!==null&&B!==n);if(A===null?y=d:A.next=k,!$t(d,e.memoizedState)&&(mt=!0,X&&(l=_i,l!==null)))throw l;e.memoizedState=d,e.baseState=y,e.baseQueue=A,a.lastRenderedState=d}return s===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Xs(e){var n=ft(),l=n.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,s=l.pending,d=n.memoizedState;if(s!==null){l.pending=null;var y=s=s.next;do d=e(d,y.action),y=y.next;while(y!==s);$t(d,n.memoizedState)||(mt=!0),n.memoizedState=d,n.baseQueue===null&&(n.baseState=d),l.lastRenderedState=d}return[d,a]}function lh(e,n,l){var a=Ce,s=ft(),d=Ue;if(d){if(l===void 0)throw Error(u(407));l=l()}else l=n();var y=!$t(($e||s).memoizedState,l);if(y&&(s.memoizedState=l,mt=!0),s=s.queue,Zs(ah.bind(null,a,s,e),[e]),s.getSnapshot!==n||y||pt!==null&&pt.memoizedState.tag&1){if(a.flags|=2048,Ri(9,{destroy:void 0},rh.bind(null,a,s,l,n),null),Pe===null)throw Error(u(349));d||(Fn&127)!==0||ih(a,n,l)}return l}function ih(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Ce.updateQueue,n===null?(n=Oa(),Ce.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function rh(e,n,l,a){n.value=l,n.getSnapshot=a,uh(n)&&sh(e)}function ah(e,n,l){return l(function(){uh(n)&&sh(e)})}function uh(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!$t(e,l)}catch{return!0}}function sh(e){var n=Hl(e,2);n!==null&&Ft(n,e,2)}function Qs(e){var n=Lt();if(typeof e=="function"){var l=e;if(e=l(),Zl){St(!0);try{l()}finally{St(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:e},n}function oh(e,n,l,a){return e.baseState=l,Fs(e,$e,typeof a=="function"?a:Xn)}function ib(e,n,l,a,s){if(Ha(e))throw Error(u(485));if(e=n.action,e!==null){var d={payload:s,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){d.listeners.push(y)}};D.T!==null?l(!0):d.isTransition=!1,a(d),l=n.pending,l===null?(d.next=n.pending=d,ch(n,d)):(d.next=l.next,n.pending=l.next=d)}}function ch(e,n){var l=n.action,a=n.payload,s=e.state;if(n.isTransition){var d=D.T,y={};D.T=y;try{var k=l(s,a),A=D.S;A!==null&&A(y,k),fh(e,n,k)}catch(B){$s(e,n,B)}finally{d!==null&&y.types!==null&&(d.types=y.types),D.T=d}}else try{d=l(s,a),fh(e,n,d)}catch(B){$s(e,n,B)}}function fh(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){dh(e,n,a)},function(a){return $s(e,n,a)}):dh(e,n,l)}function dh(e,n,l){n.status="fulfilled",n.value=l,hh(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,ch(e,l)))}function $s(e,n,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=l,hh(n),n=n.next;while(n!==a)}e.action=null}function hh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function ph(e,n){return n}function mh(e,n){if(Ue){var l=Pe.formState;if(l!==null){e:{var a=Ce;if(Ue){if(tt){t:{for(var s=tt,d=pn;s.nodeType!==8;){if(!d){s=null;break t}if(s=gn(s.nextSibling),s===null){s=null;break t}}d=s.data,s=d==="F!"||d==="F"?s:null}if(s){tt=gn(s.nextSibling),a=s.data==="F!";break e}}fl(a)}a=!1}a&&(n=l[0])}}return l=Lt(),l.memoizedState=l.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:ph,lastRenderedState:n},l.queue=a,l=Mh.bind(null,Ce,a),a.dispatch=l,a=Qs(!1),d=eo.bind(null,Ce,!1,a.queue),a=Lt(),s={state:n,dispatch:null,action:e,pending:null},a.queue=s,l=ib.bind(null,Ce,s,d,l),s.dispatch=l,a.memoizedState=e,[n,l,!1]}function gh(e){var n=ft();return xh(n,$e,e)}function xh(e,n,l){if(n=Fs(e,n,ph)[0],e=Ua(Xn)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var a=kr(n)}catch(y){throw y===Ci?_a:y}else a=n;n=ft();var s=n.queue,d=s.dispatch;return l!==n.memoizedState&&(Ce.flags|=2048,Ri(9,{destroy:void 0},rb.bind(null,s,l),null)),[a,d,e]}function rb(e,n){e.action=n}function yh(e){var n=ft(),l=$e;if(l!==null)return xh(n,l,e);ft(),n=n.memoizedState,l=ft();var a=l.queue.dispatch;return l.memoizedState=e,[n,a,!1]}function Ri(e,n,l,a){return e={tag:e,create:l,deps:a,inst:n,next:null},n=Ce.updateQueue,n===null&&(n=Oa(),Ce.updateQueue=n),l=n.lastEffect,l===null?n.lastEffect=e.next=e:(a=l.next,l.next=e,e.next=a,n.lastEffect=e),e}function bh(){return ft().memoizedState}function qa(e,n,l,a){var s=Lt();Ce.flags|=e,s.memoizedState=Ri(1|n,{destroy:void 0},l,a===void 0?null:a)}function Ba(e,n,l,a){var s=ft();a=a===void 0?null:a;var d=s.memoizedState.inst;$e!==null&&a!==null&&Bs(a,$e.memoizedState.deps)?s.memoizedState=Ri(n,d,l,a):(Ce.flags|=e,s.memoizedState=Ri(1|n,d,l,a))}function vh(e,n){qa(8390656,8,e,n)}function Zs(e,n){Ba(2048,8,e,n)}function ab(e){Ce.flags|=4;var n=Ce.updateQueue;if(n===null)n=Oa(),Ce.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function Sh(e){var n=ft().memoizedState;return ab({ref:n,nextImpl:e}),function(){if((Ve&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}function kh(e,n){return Ba(4,2,e,n)}function wh(e,n){return Ba(4,4,e,n)}function jh(e,n){if(typeof n=="function"){e=e();var l=n(e);return function(){typeof l=="function"?l():n(null)}}if(n!=null)return e=e(),n.current=e,function(){n.current=null}}function Nh(e,n,l){l=l!=null?l.concat([e]):null,Ba(4,4,jh.bind(null,n,e),l)}function Ks(){}function Eh(e,n){var l=ft();n=n===void 0?null:n;var a=l.memoizedState;return n!==null&&Bs(n,a[1])?a[0]:(l.memoizedState=[e,n],e)}function _h(e,n){var l=ft();n=n===void 0?null:n;var a=l.memoizedState;if(n!==null&&Bs(n,a[1]))return a[0];if(a=e(),Zl){St(!0);try{e()}finally{St(!1)}}return l.memoizedState=[a,n],a}function Js(e,n,l){return l===void 0||(Fn&1073741824)!==0&&(Me&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=Cp(),Ce.lanes|=e,vl|=e,l)}function Ch(e,n,l,a){return $t(l,n)?l:Ai.current!==null?(e=Js(e,l,a),$t(e,n)||(mt=!0),e):(Fn&42)===0||(Fn&1073741824)!==0&&(Me&261930)===0?(mt=!0,e.memoizedState=l):(e=Cp(),Ce.lanes|=e,vl|=e,n)}function Th(e,n,l,a,s){var d=Q.p;Q.p=d!==0&&8>d?d:8;var y=D.T,k={};D.T=k,eo(e,!1,n,l);try{var A=s(),B=D.S;if(B!==null&&B(k,A),A!==null&&typeof A=="object"&&typeof A.then=="function"){var X=tb(A,a);wr(e,n,X,en(e))}else wr(e,n,a,en(e))}catch(Z){wr(e,n,{then:function(){},status:"rejected",reason:Z},en())}finally{Q.p=d,y!==null&&k.types!==null&&(y.types=k.types),D.T=y}}function ub(){}function Ps(e,n,l,a){if(e.tag!==5)throw Error(u(476));var s=Ah(e).queue;Th(e,s,n,se,l===null?ub:function(){return zh(e),l(a)})}function Ah(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:se},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Xn,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function zh(e){var n=Ah(e);n.next===null&&(n=e.alternate.memoizedState),wr(e,n.next.queue,{},en())}function Ws(){return _t(Hr)}function Dh(){return ft().memoizedState}function Rh(){return ft().memoizedState}function sb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=en();e=pl(l);var a=ml(n,e,l);a!==null&&(Ft(a,n,l),yr(a,n,l)),n={cache:Cs()},e.payload=n;return}n=n.return}}function ob(e,n,l){var a=en();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ha(e)?Oh(n,l):(l=xs(e,n,l,a),l!==null&&(Ft(l,e,a),Lh(l,n,a)))}function Mh(e,n,l){var a=en();wr(e,n,l,a)}function wr(e,n,l,a){var s={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ha(e))Oh(n,s);else{var d=e.alternate;if(e.lanes===0&&(d===null||d.lanes===0)&&(d=n.lastRenderedReducer,d!==null))try{var y=n.lastRenderedState,k=d(y,l);if(s.hasEagerState=!0,s.eagerState=k,$t(k,y))return va(e,n,s,0),Pe===null&&ba(),!1}catch{}if(l=xs(e,n,s,a),l!==null)return Ft(l,e,a),Lh(l,n,a),!0}return!1}function eo(e,n,l,a){if(a={lane:2,revertLane:Ro(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ha(e)){if(n)throw Error(u(479))}else n=xs(e,l,a,2),n!==null&&Ft(n,e,2)}function Ha(e){var n=e.alternate;return e===Ce||n!==null&&n===Ce}function Oh(e,n){zi=Ra=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Lh(e,n,l){if((l&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,If(e,l)}}var jr={readContext:_t,use:La,useCallback:st,useContext:st,useEffect:st,useImperativeHandle:st,useLayoutEffect:st,useInsertionEffect:st,useMemo:st,useReducer:st,useRef:st,useState:st,useDebugValue:st,useDeferredValue:st,useTransition:st,useSyncExternalStore:st,useId:st,useHostTransitionStatus:st,useFormState:st,useActionState:st,useOptimistic:st,useMemoCache:st,useCacheRefresh:st};jr.useEffectEvent=st;var Uh={readContext:_t,use:La,useCallback:function(e,n){return Lt().memoizedState=[e,n===void 0?null:n],e},useContext:_t,useEffect:vh,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,qa(4194308,4,jh.bind(null,n,e),l)},useLayoutEffect:function(e,n){return qa(4194308,4,e,n)},useInsertionEffect:function(e,n){qa(4,2,e,n)},useMemo:function(e,n){var l=Lt();n=n===void 0?null:n;var a=e();if(Zl){St(!0);try{e()}finally{St(!1)}}return l.memoizedState=[a,n],a},useReducer:function(e,n,l){var a=Lt();if(l!==void 0){var s=l(n);if(Zl){St(!0);try{l(n)}finally{St(!1)}}}else s=n;return a.memoizedState=a.baseState=s,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:s},a.queue=e,e=e.dispatch=ob.bind(null,Ce,e),[a.memoizedState,e]},useRef:function(e){var n=Lt();return e={current:e},n.memoizedState=e},useState:function(e){e=Qs(e);var n=e.queue,l=Mh.bind(null,Ce,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:Ks,useDeferredValue:function(e,n){var l=Lt();return Js(l,e,n)},useTransition:function(){var e=Qs(!1);return e=Th.bind(null,Ce,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var a=Ce,s=Lt();if(Ue){if(l===void 0)throw Error(u(407));l=l()}else{if(l=n(),Pe===null)throw Error(u(349));(Me&127)!==0||ih(a,n,l)}s.memoizedState=l;var d={value:l,getSnapshot:n};return s.queue=d,vh(ah.bind(null,a,d,e),[e]),a.flags|=2048,Ri(9,{destroy:void 0},rh.bind(null,a,d,l,n),null),l},useId:function(){var e=Lt(),n=Pe.identifierPrefix;if(Ue){var l=zn,a=An;l=(a&~(1<<32-Fe(a)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Ma++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=nb++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:Ws,useFormState:mh,useActionState:mh,useOptimistic:function(e){var n=Lt();n.memoizedState=n.baseState=e;var l={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return n.queue=l,n=eo.bind(null,Ce,!0,l),l.dispatch=n,[e,n]},useMemoCache:Vs,useCacheRefresh:function(){return Lt().memoizedState=sb.bind(null,Ce)},useEffectEvent:function(e){var n=Lt(),l={impl:e};return n.memoizedState=l,function(){if((Ve&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},to={readContext:_t,use:La,useCallback:Eh,useContext:_t,useEffect:Zs,useImperativeHandle:Nh,useInsertionEffect:kh,useLayoutEffect:wh,useMemo:_h,useReducer:Ua,useRef:bh,useState:function(){return Ua(Xn)},useDebugValue:Ks,useDeferredValue:function(e,n){var l=ft();return Ch(l,$e.memoizedState,e,n)},useTransition:function(){var e=Ua(Xn)[0],n=ft().memoizedState;return[typeof e=="boolean"?e:kr(e),n]},useSyncExternalStore:lh,useId:Dh,useHostTransitionStatus:Ws,useFormState:gh,useActionState:gh,useOptimistic:function(e,n){var l=ft();return oh(l,$e,e,n)},useMemoCache:Vs,useCacheRefresh:Rh};to.useEffectEvent=Sh;var qh={readContext:_t,use:La,useCallback:Eh,useContext:_t,useEffect:Zs,useImperativeHandle:Nh,useInsertionEffect:kh,useLayoutEffect:wh,useMemo:_h,useReducer:Xs,useRef:bh,useState:function(){return Xs(Xn)},useDebugValue:Ks,useDeferredValue:function(e,n){var l=ft();return $e===null?Js(l,e,n):Ch(l,$e.memoizedState,e,n)},useTransition:function(){var e=Xs(Xn)[0],n=ft().memoizedState;return[typeof e=="boolean"?e:kr(e),n]},useSyncExternalStore:lh,useId:Dh,useHostTransitionStatus:Ws,useFormState:yh,useActionState:yh,useOptimistic:function(e,n){var l=ft();return $e!==null?oh(l,$e,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Vs,useCacheRefresh:Rh};qh.useEffectEvent=Sh;function no(e,n,l,a){n=e.memoizedState,l=l(a,n),l=l==null?n:x({},n,l),e.memoizedState=l,e.lanes===0&&(e.updateQueue.baseState=l)}var lo={enqueueSetState:function(e,n,l){e=e._reactInternals;var a=en(),s=pl(a);s.payload=n,l!=null&&(s.callback=l),n=ml(e,s,a),n!==null&&(Ft(n,e,a),yr(n,e,a))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var a=en(),s=pl(a);s.tag=1,s.payload=n,l!=null&&(s.callback=l),n=ml(e,s,a),n!==null&&(Ft(n,e,a),yr(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=en(),a=pl(l);a.tag=2,n!=null&&(a.callback=n),n=ml(e,a,l),n!==null&&(Ft(n,e,l),yr(n,e,l))}};function Bh(e,n,l,a,s,d,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,d,y):n.prototype&&n.prototype.isPureReactComponent?!cr(l,a)||!cr(s,d):!0}function Hh(e,n,l,a){e=n.state,typeof n.componentWillReceiveProps=="function"&&n.componentWillReceiveProps(l,a),typeof n.UNSAFE_componentWillReceiveProps=="function"&&n.UNSAFE_componentWillReceiveProps(l,a),n.state!==e&&lo.enqueueReplaceState(n,n.state,null)}function Kl(e,n){var l=n;if("ref"in n){l={};for(var a in n)a!=="ref"&&(l[a]=n[a])}if(e=e.defaultProps){l===n&&(l=x({},l));for(var s in e)l[s]===void 0&&(l[s]=e[s])}return l}function Ih(e){ya(e)}function Yh(e){console.error(e)}function Gh(e){ya(e)}function Ia(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(a){setTimeout(function(){throw a})}}function Vh(e,n,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(s){setTimeout(function(){throw s})}}function io(e,n,l){return l=pl(l),l.tag=3,l.payload={element:null},l.callback=function(){Ia(e,n)},l}function Fh(e){return e=pl(e),e.tag=3,e}function Xh(e,n,l,a){var s=l.type.getDerivedStateFromError;if(typeof s=="function"){var d=a.value;e.payload=function(){return s(d)},e.callback=function(){Vh(n,l,a)}}var y=l.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Vh(n,l,a),typeof s!="function"&&(Sl===null?Sl=new Set([this]):Sl.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})})}function cb(e,n,l,a,s){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(n=l.alternate,n!==null&&Ni(n,l,s,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return mn===null?Wa():l.alternate===null&&ot===0&&(ot=3),l.flags&=-257,l.flags|=65536,l.lanes=s,a===Ca?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([a]):n.add(a),Ao(e,a,s)),!1;case 22:return l.flags|=65536,a===Ca?l.flags|=16384:(n=l.updateQueue,n===null?(n={transitions:null,markerInstances:null,retryQueue:new Set([a])},l.updateQueue=n):(l=n.retryQueue,l===null?n.retryQueue=new Set([a]):l.add(a)),Ao(e,a,s)),!1}throw Error(u(435,l.tag))}return Ao(e,a,s),Wa(),!1}if(Ue)return n=Kt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=s,a!==ws&&(e=Error(u(422),{cause:a}),hr(fn(e,l)))):(a!==ws&&(n=Error(u(423),{cause:a}),hr(fn(n,l))),e=e.current.alternate,e.flags|=65536,s&=-s,e.lanes|=s,a=fn(a,l),s=io(e.stateNode,a,s),Ms(e,s),ot!==4&&(ot=2)),!1;var d=Error(u(520),{cause:a});if(d=fn(d,l),Dr===null?Dr=[d]:Dr.push(d),ot!==4&&(ot=2),n===null)return!0;a=fn(a,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=s&-s,l.lanes|=e,e=io(l.stateNode,a,e),Ms(l,e),!1;case 1:if(n=l.type,d=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||d!==null&&typeof d.componentDidCatch=="function"&&(Sl===null||!Sl.has(d))))return l.flags|=65536,s&=-s,l.lanes|=s,s=Fh(s),Xh(s,e,l,a),Ms(l,s),!1}l=l.return}while(l!==null);return!1}var ro=Error(u(461)),mt=!1;function Ct(e,n,l,a){n.child=e===null?Kd(n,null,l,a):$l(n,e.child,l,a)}function Qh(e,n,l,a,s){l=l.render;var d=n.ref;if("ref"in a){var y={};for(var k in a)k!=="ref"&&(y[k]=a[k])}else y=a;return Vl(n),a=Hs(e,n,l,y,d,s),k=Is(),e!==null&&!mt?(Ys(e,n,s),Qn(e,n,s)):(Ue&&k&&Ss(n),n.flags|=1,Ct(e,n,a,s),n.child)}function $h(e,n,l,a,s){if(e===null){var d=l.type;return typeof d=="function"&&!ys(d)&&d.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=d,Zh(e,n,d,a,s)):(e=ka(l.type,null,a,n,n.mode,s),e.ref=n.ref,e.return=n,n.child=e)}if(d=e.child,!po(e,s)){var y=d.memoizedProps;if(l=l.compare,l=l!==null?l:cr,l(y,a)&&e.ref===n.ref)return Qn(e,n,s)}return n.flags|=1,e=In(d,a),e.ref=n.ref,e.return=n,n.child=e}function Zh(e,n,l,a,s){if(e!==null){var d=e.memoizedProps;if(cr(d,a)&&e.ref===n.ref)if(mt=!1,n.pendingProps=a=d,po(e,s))(e.flags&131072)!==0&&(mt=!0);else return n.lanes=e.lanes,Qn(e,n,s)}return ao(e,n,l,a,s)}function Kh(e,n,l,a){var s=a.children,d=e!==null?e.memoizedState:null;if(e===null&&n.stateNode===null&&(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),a.mode==="hidden"){if((n.flags&128)!==0){if(d=d!==null?d.baseLanes|l:l,e!==null){for(a=n.child=e.child,s=0;a!==null;)s=s|a.lanes|a.childLanes,a=a.sibling;a=s&~d}else a=0,n.child=null;return Jh(e,n,d,l,a)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ea(n,d!==null?d.cachePool:null),d!==null?Wd(n,d):Ls(),eh(n);else return a=n.lanes=536870912,Jh(e,n,d!==null?d.baseLanes|l:l,l,a)}else d!==null?(Ea(n,d.cachePool),Wd(n,d),xl(),n.memoizedState=null):(e!==null&&Ea(n,null),Ls(),xl());return Ct(e,n,s,l),n.child}function Nr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function Jh(e,n,l,a,s){var d=As();return d=d===null?null:{parent:ht._currentValue,pool:d},n.memoizedState={baseLanes:l,cachePool:d},e!==null&&Ea(n,null),Ls(),eh(n),e!==null&&Ni(e,n,a,!0),n.childLanes=s,null}function Ya(e,n){return n=Va({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function Ph(e,n,l){return $l(n,e.child,null,l),e=Ya(n,n.pendingProps),e.flags|=2,Jt(n),n.memoizedState=null,e}function fb(e,n,l){var a=n.pendingProps,s=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(Ue){if(a.mode==="hidden")return e=Ya(n,a),n.lanes=536870912,Nr(null,e);if(qs(n),(e=tt)?(e=cm(e,pn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ol!==null?{id:An,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=Od(e),l.return=n,n.child=l,Et=n,tt=null)):e=null,e===null)throw fl(n);return n.lanes=536870912,null}return Ya(n,a)}var d=e.memoizedState;if(d!==null){var y=d.dehydrated;if(qs(n),s)if(n.flags&256)n.flags&=-257,n=Ph(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(u(558));else if(mt||Ni(e,n,l,!1),s=(l&e.childLanes)!==0,mt||s){if(a=Pe,a!==null&&(y=Yf(a,l),y!==0&&y!==d.retryLane))throw d.retryLane=y,Hl(e,y),Ft(a,e,y),ro;Wa(),n=Ph(e,n,l)}else e=d.treeContext,tt=gn(y.nextSibling),Et=n,Ue=!0,cl=null,pn=!1,e!==null&&qd(n,e),n=Ya(n,a),n.flags|=4096;return n}return e=In(e.child,{mode:a.mode,children:a.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Ga(e,n){var l=n.ref;if(l===null)e!==null&&e.ref!==null&&(n.flags|=4194816);else{if(typeof l!="function"&&typeof l!="object")throw Error(u(284));(e===null||e.ref!==l)&&(n.flags|=4194816)}}function ao(e,n,l,a,s){return Vl(n),l=Hs(e,n,l,a,void 0,s),a=Is(),e!==null&&!mt?(Ys(e,n,s),Qn(e,n,s)):(Ue&&a&&Ss(n),n.flags|=1,Ct(e,n,l,s),n.child)}function Wh(e,n,l,a,s,d){return Vl(n),n.updateQueue=null,l=nh(n,a,l,s),th(e),a=Is(),e!==null&&!mt?(Ys(e,n,d),Qn(e,n,d)):(Ue&&a&&Ss(n),n.flags|=1,Ct(e,n,l,d),n.child)}function ep(e,n,l,a,s){if(Vl(n),n.stateNode===null){var d=Si,y=l.contextType;typeof y=="object"&&y!==null&&(d=_t(y)),d=new l(a,d),n.memoizedState=d.state!==null&&d.state!==void 0?d.state:null,d.updater=lo,n.stateNode=d,d._reactInternals=n,d=n.stateNode,d.props=a,d.state=n.memoizedState,d.refs={},Ds(n),y=l.contextType,d.context=typeof y=="object"&&y!==null?_t(y):Si,d.state=n.memoizedState,y=l.getDerivedStateFromProps,typeof y=="function"&&(no(n,l,y,a),d.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof d.getSnapshotBeforeUpdate=="function"||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(y=d.state,typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount(),y!==d.state&&lo.enqueueReplaceState(d,d.state,null),vr(n,a,d,s),br(),d.state=n.memoizedState),typeof d.componentDidMount=="function"&&(n.flags|=4194308),a=!0}else if(e===null){d=n.stateNode;var k=n.memoizedProps,A=Kl(l,k);d.props=A;var B=d.context,X=l.contextType;y=Si,typeof X=="object"&&X!==null&&(y=_t(X));var Z=l.getDerivedStateFromProps;X=typeof Z=="function"||typeof d.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,X||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(k||B!==y)&&Hh(n,d,a,y),hl=!1;var I=n.memoizedState;d.state=I,vr(n,a,d,s),br(),B=n.memoizedState,k||I!==B||hl?(typeof Z=="function"&&(no(n,l,Z,a),B=n.memoizedState),(A=hl||Bh(n,l,A,a,I,B,y))?(X||typeof d.UNSAFE_componentWillMount!="function"&&typeof d.componentWillMount!="function"||(typeof d.componentWillMount=="function"&&d.componentWillMount(),typeof d.UNSAFE_componentWillMount=="function"&&d.UNSAFE_componentWillMount()),typeof d.componentDidMount=="function"&&(n.flags|=4194308)):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=B),d.props=a,d.state=B,d.context=y,a=A):(typeof d.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{d=n.stateNode,Rs(e,n),y=n.memoizedProps,X=Kl(l,y),d.props=X,Z=n.pendingProps,I=d.context,B=l.contextType,A=Si,typeof B=="object"&&B!==null&&(A=_t(B)),k=l.getDerivedStateFromProps,(B=typeof k=="function"||typeof d.getSnapshotBeforeUpdate=="function")||typeof d.UNSAFE_componentWillReceiveProps!="function"&&typeof d.componentWillReceiveProps!="function"||(y!==Z||I!==A)&&Hh(n,d,a,A),hl=!1,I=n.memoizedState,d.state=I,vr(n,a,d,s),br();var G=n.memoizedState;y!==Z||I!==G||hl||e!==null&&e.dependencies!==null&&ja(e.dependencies)?(typeof k=="function"&&(no(n,l,k,a),G=n.memoizedState),(X=hl||Bh(n,l,X,a,I,G,A)||e!==null&&e.dependencies!==null&&ja(e.dependencies))?(B||typeof d.UNSAFE_componentWillUpdate!="function"&&typeof d.componentWillUpdate!="function"||(typeof d.componentWillUpdate=="function"&&d.componentWillUpdate(a,G,A),typeof d.UNSAFE_componentWillUpdate=="function"&&d.UNSAFE_componentWillUpdate(a,G,A)),typeof d.componentDidUpdate=="function"&&(n.flags|=4),typeof d.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=G),d.props=a,d.state=G,d.context=A,a=X):(typeof d.componentDidUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof d.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),a=!1)}return d=a,Ga(e,n),a=(n.flags&128)!==0,d||a?(d=n.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:d.render(),n.flags|=1,e!==null&&a?(n.child=$l(n,e.child,null,s),n.child=$l(n,null,l,s)):Ct(e,n,l,s),n.memoizedState=d.state,e=n.child):e=Qn(e,n,s),e}function tp(e,n,l,a){return Yl(),n.flags|=256,Ct(e,n,l,a),n.child}var uo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function so(e){return{baseLanes:e,cachePool:Vd()}}function oo(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=Wt),e}function np(e,n,l){var a=n.pendingProps,s=!1,d=(n.flags&128)!==0,y;if((y=d)||(y=e!==null&&e.memoizedState===null?!1:(ct.current&2)!==0),y&&(s=!0,n.flags&=-129),y=(n.flags&32)!==0,n.flags&=-33,e===null){if(Ue){if(s?gl(n):xl(),(e=tt)?(e=cm(e,pn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:ol!==null?{id:An,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=Od(e),l.return=n,n.child=l,Et=n,tt=null)):e=null,e===null)throw fl(n);return Xo(e)?n.lanes=32:n.lanes=536870912,null}var k=a.children;return a=a.fallback,s?(xl(),s=n.mode,k=Va({mode:"hidden",children:k},s),a=Il(a,s,l,null),k.return=n,a.return=n,k.sibling=a,n.child=k,a=n.child,a.memoizedState=so(l),a.childLanes=oo(e,y,l),n.memoizedState=uo,Nr(null,a)):(gl(n),co(n,k))}var A=e.memoizedState;if(A!==null&&(k=A.dehydrated,k!==null)){if(d)n.flags&256?(gl(n),n.flags&=-257,n=fo(e,n,l)):n.memoizedState!==null?(xl(),n.child=e.child,n.flags|=128,n=null):(xl(),k=a.fallback,s=n.mode,a=Va({mode:"visible",children:a.children},s),k=Il(k,s,l,null),k.flags|=2,a.return=n,k.return=n,a.sibling=k,n.child=a,$l(n,e.child,null,l),a=n.child,a.memoizedState=so(l),a.childLanes=oo(e,y,l),n.memoizedState=uo,n=Nr(null,a));else if(gl(n),Xo(k)){if(y=k.nextSibling&&k.nextSibling.dataset,y)var B=y.dgst;y=B,a=Error(u(419)),a.stack="",a.digest=y,hr({value:a,source:null,stack:null}),n=fo(e,n,l)}else if(mt||Ni(e,n,l,!1),y=(l&e.childLanes)!==0,mt||y){if(y=Pe,y!==null&&(a=Yf(y,l),a!==0&&a!==A.retryLane))throw A.retryLane=a,Hl(e,a),Ft(y,e,a),ro;Fo(k)||Wa(),n=fo(e,n,l)}else Fo(k)?(n.flags|=192,n.child=e.child,n=null):(e=A.treeContext,tt=gn(k.nextSibling),Et=n,Ue=!0,cl=null,pn=!1,e!==null&&qd(n,e),n=co(n,a.children),n.flags|=4096);return n}return s?(xl(),k=a.fallback,s=n.mode,A=e.child,B=A.sibling,a=In(A,{mode:"hidden",children:a.children}),a.subtreeFlags=A.subtreeFlags&65011712,B!==null?k=In(B,k):(k=Il(k,s,l,null),k.flags|=2),k.return=n,a.return=n,a.sibling=k,n.child=a,Nr(null,a),a=n.child,k=e.child.memoizedState,k===null?k=so(l):(s=k.cachePool,s!==null?(A=ht._currentValue,s=s.parent!==A?{parent:A,pool:A}:s):s=Vd(),k={baseLanes:k.baseLanes|l,cachePool:s}),a.memoizedState=k,a.childLanes=oo(e,y,l),n.memoizedState=uo,Nr(e.child,a)):(gl(n),l=e.child,e=l.sibling,l=In(l,{mode:"visible",children:a.children}),l.return=n,l.sibling=null,e!==null&&(y=n.deletions,y===null?(n.deletions=[e],n.flags|=16):y.push(e)),n.child=l,n.memoizedState=null,l)}function co(e,n){return n=Va({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Va(e,n){return e=Zt(22,e,null,n),e.lanes=0,e}function fo(e,n,l){return $l(n,e.child,null,l),e=co(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function lp(e,n,l){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),Es(e.return,n,l)}function ho(e,n,l,a,s,d){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:s,treeForkCount:d}:(y.isBackwards=n,y.rendering=null,y.renderingStartTime=0,y.last=a,y.tail=l,y.tailMode=s,y.treeForkCount=d)}function ip(e,n,l){var a=n.pendingProps,s=a.revealOrder,d=a.tail;a=a.children;var y=ct.current,k=(y&2)!==0;if(k?(y=y&1|2,n.flags|=128):y&=1,w(ct,y),Ct(e,n,a,l),a=Ue?dr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&lp(e,l,n);else if(e.tag===19)lp(e,l,n);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break e;for(;e.sibling===null;){if(e.return===null||e.return===n)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(s){case"forwards":for(l=n.child,s=null;l!==null;)e=l.alternate,e!==null&&Da(e)===null&&(s=l),l=l.sibling;l=s,l===null?(s=n.child,n.child=null):(s=l.sibling,l.sibling=null),ho(n,!1,s,l,d,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,s=n.child,n.child=null;s!==null;){if(e=s.alternate,e!==null&&Da(e)===null){n.child=s;break}e=s.sibling,s.sibling=l,l=s,s=e}ho(n,!0,l,null,d,a);break;case"together":ho(n,!1,null,null,void 0,a);break;default:n.memoizedState=null}return n.child}function Qn(e,n,l){if(e!==null&&(n.dependencies=e.dependencies),vl|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Ni(e,n,l,!1),(l&n.childLanes)===0)return null}else return null;if(e!==null&&n.child!==e.child)throw Error(u(153));if(n.child!==null){for(e=n.child,l=In(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=In(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function po(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&ja(e)))}function db(e,n,l){switch(n.tag){case 3:Ge(n,n.stateNode.containerInfo),dl(n,ht,e.memoizedState.cache),Yl();break;case 27:case 5:yt(n);break;case 4:Ge(n,n.stateNode.containerInfo);break;case 10:dl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,qs(n),null;break;case 13:var a=n.memoizedState;if(a!==null)return a.dehydrated!==null?(gl(n),n.flags|=128,null):(l&n.child.childLanes)!==0?np(e,n,l):(gl(n),e=Qn(e,n,l),e!==null?e.sibling:null);gl(n);break;case 19:var s=(e.flags&128)!==0;if(a=(l&n.childLanes)!==0,a||(Ni(e,n,l,!1),a=(l&n.childLanes)!==0),s){if(a)return ip(e,n,l);n.flags|=128}if(s=n.memoizedState,s!==null&&(s.rendering=null,s.tail=null,s.lastEffect=null),w(ct,ct.current),a)break;return null;case 22:return n.lanes=0,Kh(e,n,l,n.pendingProps);case 24:dl(n,ht,e.memoizedState.cache)}return Qn(e,n,l)}function rp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)mt=!0;else{if(!po(e,l)&&(n.flags&128)===0)return mt=!1,db(e,n,l);mt=(e.flags&131072)!==0}else mt=!1,Ue&&(n.flags&1048576)!==0&&Ud(n,dr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var a=n.pendingProps;if(e=Xl(n.elementType),n.type=e,typeof e=="function")ys(e)?(a=Kl(e,a),n.tag=1,n=ep(null,n,e,a,l)):(n.tag=0,n=ao(null,n,e,a,l));else{if(e!=null){var s=e.$$typeof;if(s===W){n.tag=11,n=Qh(null,n,e,a,l);break e}else if(s===Y){n.tag=14,n=$h(null,n,e,a,l);break e}}throw n=oe(e)||e,Error(u(306,n,""))}}return n;case 0:return ao(e,n,n.type,n.pendingProps,l);case 1:return a=n.type,s=Kl(a,n.pendingProps),ep(e,n,a,s,l);case 3:e:{if(Ge(n,n.stateNode.containerInfo),e===null)throw Error(u(387));a=n.pendingProps;var d=n.memoizedState;s=d.element,Rs(e,n),vr(n,a,null,l);var y=n.memoizedState;if(a=y.cache,dl(n,ht,a),a!==d.cache&&_s(n,[ht],l,!0),br(),a=y.element,d.isDehydrated)if(d={element:a,isDehydrated:!1,cache:y.cache},n.updateQueue.baseState=d,n.memoizedState=d,n.flags&256){n=tp(e,n,a,l);break e}else if(a!==s){s=fn(Error(u(424)),n),hr(s),n=tp(e,n,a,l);break e}else for(e=n.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,tt=gn(e.firstChild),Et=n,Ue=!0,cl=null,pn=!0,l=Kd(n,null,a,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Yl(),a===s){n=Qn(e,n,l);break e}Ct(e,n,a,l)}n=n.child}return n;case 26:return Ga(e,n),e===null?(l=gm(n.type,null,n.pendingProps,null))?n.memoizedState=l:Ue||(l=n.type,e=n.pendingProps,a=au(he.current).createElement(l),a[Nt]=n,a[Bt]=e,Tt(a,l,e),kt(a),n.stateNode=a):n.memoizedState=gm(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return yt(n),e===null&&Ue&&(a=n.stateNode=hm(n.type,n.pendingProps,he.current),Et=n,pn=!0,s=tt,Nl(n.type)?(Qo=s,tt=gn(a.firstChild)):tt=s),Ct(e,n,n.pendingProps.children,l),Ga(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&Ue&&((s=a=tt)&&(a=Yb(a,n.type,n.pendingProps,pn),a!==null?(n.stateNode=a,Et=n,tt=gn(a.firstChild),pn=!1,s=!0):s=!1),s||fl(n)),yt(n),s=n.type,d=n.pendingProps,y=e!==null?e.memoizedProps:null,a=d.children,Yo(s,d)?a=null:y!==null&&Yo(s,y)&&(n.flags|=32),n.memoizedState!==null&&(s=Hs(e,n,lb,null,null,l),Hr._currentValue=s),Ga(e,n),Ct(e,n,a,l),n.child;case 6:return e===null&&Ue&&((e=l=tt)&&(l=Gb(l,n.pendingProps,pn),l!==null?(n.stateNode=l,Et=n,tt=null,e=!0):e=!1),e||fl(n)),null;case 13:return np(e,n,l);case 4:return Ge(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=$l(n,null,a,l):Ct(e,n,a,l),n.child;case 11:return Qh(e,n,n.type,n.pendingProps,l);case 7:return Ct(e,n,n.pendingProps,l),n.child;case 8:return Ct(e,n,n.pendingProps.children,l),n.child;case 12:return Ct(e,n,n.pendingProps.children,l),n.child;case 10:return a=n.pendingProps,dl(n,n.type,a.value),Ct(e,n,a.children,l),n.child;case 9:return s=n.type._context,a=n.pendingProps.children,Vl(n),s=_t(s),a=a(s),n.flags|=1,Ct(e,n,a,l),n.child;case 14:return $h(e,n,n.type,n.pendingProps,l);case 15:return Zh(e,n,n.type,n.pendingProps,l);case 19:return ip(e,n,l);case 31:return fb(e,n,l);case 22:return Kh(e,n,l,n.pendingProps);case 24:return Vl(n),a=_t(ht),e===null?(s=As(),s===null&&(s=Pe,d=Cs(),s.pooledCache=d,d.refCount++,d!==null&&(s.pooledCacheLanes|=l),s=d),n.memoizedState={parent:a,cache:s},Ds(n),dl(n,ht,s)):((e.lanes&l)!==0&&(Rs(e,n),vr(n,null,null,l),br()),s=e.memoizedState,d=n.memoizedState,s.parent!==a?(s={parent:a,cache:a},n.memoizedState=s,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=s),dl(n,ht,a)):(a=d.cache,dl(n,ht,a),a!==s.cache&&_s(n,[ht],l,!0))),Ct(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(u(156,n.tag))}function $n(e){e.flags|=4}function mo(e,n,l,a,s){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(s&335544128)===s)if(e.stateNode.complete)e.flags|=8192;else if(Dp())e.flags|=8192;else throw Ql=Ca,zs}else e.flags&=-16777217}function ap(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Sm(n))if(Dp())e.flags|=8192;else throw Ql=Ca,zs}function Fa(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?ut():536870912,e.lanes|=n,Ui|=n)}function Er(e,n){if(!Ue)switch(e.tailMode){case"hidden":n=e.tail;for(var l=null;n!==null;)n.alternate!==null&&(l=n),n=n.sibling;l===null?e.tail=null:l.sibling=null;break;case"collapsed":l=e.tail;for(var a=null;l!==null;)l.alternate!==null&&(a=l),l=l.sibling;a===null?n||e.tail===null?e.tail=null:e.tail.sibling=null:a.sibling=null}}function nt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(n)for(var s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags&65011712,a|=s.flags&65011712,s.return=e,s=s.sibling;else for(s=e.child;s!==null;)l|=s.lanes|s.childLanes,a|=s.subtreeFlags,a|=s.flags,s.return=e,s=s.sibling;return e.subtreeFlags|=a,e.childLanes=l,n}function hb(e,n,l){var a=n.pendingProps;switch(ks(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return nt(n),null;case 1:return nt(n),null;case 3:return l=n.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Vn(ht),ge(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(ji(n)?$n(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,js())),nt(n),null;case 26:var s=n.type,d=n.memoizedState;return e===null?($n(n),d!==null?(nt(n),ap(n,d)):(nt(n),mo(n,s,null,a,l))):d?d!==e.memoizedState?($n(n),nt(n),ap(n,d)):(nt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&$n(n),nt(n),mo(n,s,e,a,l)),null;case 27:if(Ot(n),l=he.current,s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&$n(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return nt(n),null}e=ae.current,ji(n)?Bd(n):(e=hm(s,a,l),n.stateNode=e,$n(n))}return nt(n),null;case 5:if(Ot(n),s=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&$n(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return nt(n),null}if(d=ae.current,ji(n))Bd(n);else{var y=au(he.current);switch(d){case 1:d=y.createElementNS("http://www.w3.org/2000/svg",s);break;case 2:d=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;default:switch(s){case"svg":d=y.createElementNS("http://www.w3.org/2000/svg",s);break;case"math":d=y.createElementNS("http://www.w3.org/1998/Math/MathML",s);break;case"script":d=y.createElement("div"),d.innerHTML="<script><\/script>",d=d.removeChild(d.firstChild);break;case"select":d=typeof a.is=="string"?y.createElement("select",{is:a.is}):y.createElement("select"),a.multiple?d.multiple=!0:a.size&&(d.size=a.size);break;default:d=typeof a.is=="string"?y.createElement(s,{is:a.is}):y.createElement(s)}}d[Nt]=n,d[Bt]=a;e:for(y=n.child;y!==null;){if(y.tag===5||y.tag===6)d.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===n)break e;for(;y.sibling===null;){if(y.return===null||y.return===n)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}n.stateNode=d;e:switch(Tt(d,s,a),s){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&$n(n)}}return nt(n),mo(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==a&&$n(n);else{if(typeof a!="string"&&n.stateNode===null)throw Error(u(166));if(e=he.current,ji(n)){if(e=n.stateNode,l=n.memoizedProps,a=null,s=Et,s!==null)switch(s.tag){case 27:case 5:a=s.memoizedProps}e[Nt]=n,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||nm(e.nodeValue,l)),e||fl(n,!0)}else e=au(e).createTextNode(a),e[Nt]=n,n.stateNode=e}return nt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(a=ji(n),l!==null){if(e===null){if(!a)throw Error(u(318));if(e=n.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(557));e[Nt]=n}else Yl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;nt(n),e=!1}else l=js(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=l),e=!0;if(!e)return n.flags&256?(Jt(n),n):(Jt(n),null);if((n.flags&128)!==0)throw Error(u(558))}return nt(n),null;case 13:if(a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(s=ji(n),a!==null&&a.dehydrated!==null){if(e===null){if(!s)throw Error(u(318));if(s=n.memoizedState,s=s!==null?s.dehydrated:null,!s)throw Error(u(317));s[Nt]=n}else Yl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;nt(n),s=!1}else s=js(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),s=!0;if(!s)return n.flags&256?(Jt(n),n):(Jt(n),null)}return Jt(n),(n.flags&128)!==0?(n.lanes=l,n):(l=a!==null,e=e!==null&&e.memoizedState!==null,l&&(a=n.child,s=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(s=a.alternate.memoizedState.cachePool.pool),d=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(d=a.memoizedState.cachePool.pool),d!==s&&(a.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Fa(n,n.updateQueue),nt(n),null);case 4:return ge(),e===null&&Uo(n.stateNode.containerInfo),nt(n),null;case 10:return Vn(n.type),nt(n),null;case 19:if(H(ct),a=n.memoizedState,a===null)return nt(n),null;if(s=(n.flags&128)!==0,d=a.rendering,d===null)if(s)Er(a,!1);else{if(ot!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(d=Da(e),d!==null){for(n.flags|=128,Er(a,!1),e=d.updateQueue,n.updateQueue=e,Fa(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Md(l,e),l=l.sibling;return w(ct,ct.current&1|2),Ue&&Yn(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&rt()>Ka&&(n.flags|=128,s=!0,Er(a,!1),n.lanes=4194304)}else{if(!s)if(e=Da(d),e!==null){if(n.flags|=128,s=!0,e=e.updateQueue,n.updateQueue=e,Fa(n,e),Er(a,!0),a.tail===null&&a.tailMode==="hidden"&&!d.alternate&&!Ue)return nt(n),null}else 2*rt()-a.renderingStartTime>Ka&&l!==536870912&&(n.flags|=128,s=!0,Er(a,!1),n.lanes=4194304);a.isBackwards?(d.sibling=n.child,n.child=d):(e=a.last,e!==null?e.sibling=d:n.child=d,a.last=d)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=rt(),e.sibling=null,l=ct.current,w(ct,s?l&1|2:l&1),Ue&&Yn(n,a.treeForkCount),e):(nt(n),null);case 22:case 23:return Jt(n),Us(),a=n.memoizedState!==null,e!==null?e.memoizedState!==null!==a&&(n.flags|=8192):a&&(n.flags|=8192),a?(l&536870912)!==0&&(n.flags&128)===0&&(nt(n),n.subtreeFlags&6&&(n.flags|=8192)):nt(n),l=n.updateQueue,l!==null&&Fa(n,l.retryQueue),l=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),a=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(a=n.memoizedState.cachePool.pool),a!==l&&(n.flags|=2048),e!==null&&H(Fl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Vn(ht),nt(n),null;case 25:return null;case 30:return null}throw Error(u(156,n.tag))}function pb(e,n){switch(ks(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Vn(ht),ge(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Ot(n),null;case 31:if(n.memoizedState!==null){if(Jt(n),n.alternate===null)throw Error(u(340));Yl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 13:if(Jt(n),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(u(340));Yl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return H(ct),null;case 4:return ge(),null;case 10:return Vn(n.type),null;case 22:case 23:return Jt(n),Us(),e!==null&&H(Fl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Vn(ht),null;case 25:return null;default:return null}}function up(e,n){switch(ks(n),n.tag){case 3:Vn(ht),ge();break;case 26:case 27:case 5:Ot(n);break;case 4:ge();break;case 31:n.memoizedState!==null&&Jt(n);break;case 13:Jt(n);break;case 19:H(ct);break;case 10:Vn(n.type);break;case 22:case 23:Jt(n),Us(),e!==null&&H(Fl);break;case 24:Vn(ht)}}function _r(e,n){try{var l=n.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var s=a.next;l=s;do{if((l.tag&e)===e){a=void 0;var d=l.create,y=l.inst;a=d(),y.destroy=a}l=l.next}while(l!==s)}}catch(k){Qe(n,n.return,k)}}function yl(e,n,l){try{var a=n.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var d=s.next;a=d;do{if((a.tag&e)===e){var y=a.inst,k=y.destroy;if(k!==void 0){y.destroy=void 0,s=n;var A=l,B=k;try{B()}catch(X){Qe(s,A,X)}}}a=a.next}while(a!==d)}}catch(X){Qe(n,n.return,X)}}function sp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{Pd(n,l)}catch(a){Qe(e,e.return,a)}}}function op(e,n,l){l.props=Kl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Qe(e,n,a)}}function Cr(e,n){try{var l=e.ref;if(l!==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 l=="function"?e.refCleanup=l(a):l.current=a}}catch(s){Qe(e,n,s)}}function Dn(e,n){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(s){Qe(e,n,s)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(s){Qe(e,n,s)}else l.current=null}function cp(e){var n=e.type,l=e.memoizedProps,a=e.stateNode;try{e:switch(n){case"button":case"input":case"select":case"textarea":l.autoFocus&&a.focus();break e;case"img":l.src?a.src=l.src:l.srcSet&&(a.srcset=l.srcSet)}}catch(s){Qe(e,e.return,s)}}function go(e,n,l){try{var a=e.stateNode;Lb(a,e.type,l,n),a[Bt]=n}catch(s){Qe(e,e.return,s)}}function fp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Nl(e.type)||e.tag===4}function xo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||fp(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&&Nl(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 yo(e,n,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?(l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l).insertBefore(e,n):(n=l.nodeType===9?l.body:l.nodeName==="HTML"?l.ownerDocument.body:l,n.appendChild(e),l=l._reactRootContainer,l!=null||n.onclick!==null||(n.onclick=Bn));else if(a!==4&&(a===27&&Nl(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(yo(e,n,l),e=e.sibling;e!==null;)yo(e,n,l),e=e.sibling}function Xa(e,n,l){var a=e.tag;if(a===5||a===6)e=e.stateNode,n?l.insertBefore(e,n):l.appendChild(e);else if(a!==4&&(a===27&&Nl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for(Xa(e,n,l),e=e.sibling;e!==null;)Xa(e,n,l),e=e.sibling}function dp(e){var n=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,s=n.attributes;s.length;)n.removeAttributeNode(s[0]);Tt(n,a,l),n[Nt]=e,n[Bt]=l}catch(d){Qe(e,e.return,d)}}var Zn=!1,gt=!1,bo=!1,hp=typeof WeakSet=="function"?WeakSet:Set,wt=null;function mb(e,n){if(e=e.containerInfo,Ho=hu,e=Nd(e),fs(e)){if("selectionStart"in e)var l={start:e.selectionStart,end:e.selectionEnd};else e:{l=(l=e.ownerDocument)&&l.defaultView||window;var a=l.getSelection&&l.getSelection();if(a&&a.rangeCount!==0){l=a.anchorNode;var s=a.anchorOffset,d=a.focusNode;a=a.focusOffset;try{l.nodeType,d.nodeType}catch{l=null;break e}var y=0,k=-1,A=-1,B=0,X=0,Z=e,I=null;t:for(;;){for(var G;Z!==l||s!==0&&Z.nodeType!==3||(k=y+s),Z!==d||a!==0&&Z.nodeType!==3||(A=y+a),Z.nodeType===3&&(y+=Z.nodeValue.length),(G=Z.firstChild)!==null;)I=Z,Z=G;for(;;){if(Z===e)break t;if(I===l&&++B===s&&(k=y),I===d&&++X===a&&(A=y),(G=Z.nextSibling)!==null)break;Z=I,I=Z.parentNode}Z=G}l=k===-1||A===-1?null:{start:k,end:A}}else l=null}l=l||{start:0,end:0}}else l=null;for(Io={focusedElem:e,selectionRange:l},hu=!1,wt=n;wt!==null;)if(n=wt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,wt=e;else for(;wt!==null;){switch(n=wt,d=n.alternate,e=n.flags,n.tag){case 0:if((e&4)!==0&&(e=n.updateQueue,e=e!==null?e.events:null,e!==null))for(l=0;l<e.length;l++)s=e[l],s.ref.impl=s.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&d!==null){e=void 0,l=n,s=d.memoizedProps,d=d.memoizedState,a=l.stateNode;try{var de=Kl(l.type,s);e=a.getSnapshotBeforeUpdate(de,d),a.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Qe(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)Vo(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Vo(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(u(163))}if(e=n.sibling,e!==null){e.return=n.return,wt=e;break}wt=n.return}}function pp(e,n,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Jn(e,l),a&4&&_r(5,l);break;case 1:if(Jn(e,l),a&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(y){Qe(l,l.return,y)}else{var s=Kl(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(s,n,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Qe(l,l.return,y)}}a&64&&sp(l),a&512&&Cr(l,l.return);break;case 3:if(Jn(e,l),a&64&&(e=l.updateQueue,e!==null)){if(n=null,l.child!==null)switch(l.child.tag){case 27:case 5:n=l.child.stateNode;break;case 1:n=l.child.stateNode}try{Pd(e,n)}catch(y){Qe(l,l.return,y)}}break;case 27:n===null&&a&4&&dp(l);case 26:case 5:Jn(e,l),n===null&&a&4&&cp(l),a&512&&Cr(l,l.return);break;case 12:Jn(e,l);break;case 31:Jn(e,l),a&4&&xp(e,l);break;case 13:Jn(e,l),a&4&&yp(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=jb.bind(null,l),Vb(e,l))));break;case 22:if(a=l.memoizedState!==null||Zn,!a){n=n!==null&&n.memoizedState!==null||gt,s=Zn;var d=gt;Zn=a,(gt=n)&&!d?Pn(e,l,(l.subtreeFlags&8772)!==0):Jn(e,l),Zn=s,gt=d}break;case 30:break;default:Jn(e,l)}}function mp(e){var n=e.alternate;n!==null&&(e.alternate=null,mp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&$u(n)),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 lt=null,It=!1;function Kn(e,n,l){for(l=l.child;l!==null;)gp(e,n,l),l=l.sibling}function gp(e,n,l){if(at&&typeof at.onCommitFiberUnmount=="function")try{at.onCommitFiberUnmount(vt,l)}catch{}switch(l.tag){case 26:gt||Dn(l,n),Kn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:gt||Dn(l,n);var a=lt,s=It;Nl(l.type)&&(lt=l.stateNode,It=!1),Kn(e,n,l),Ur(l.stateNode),lt=a,It=s;break;case 5:gt||Dn(l,n);case 6:if(a=lt,s=It,lt=null,Kn(e,n,l),lt=a,It=s,lt!==null)if(It)try{(lt.nodeType===9?lt.body:lt.nodeName==="HTML"?lt.ownerDocument.body:lt).removeChild(l.stateNode)}catch(d){Qe(l,n,d)}else try{lt.removeChild(l.stateNode)}catch(d){Qe(l,n,d)}break;case 18:lt!==null&&(It?(e=lt,sm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Fi(e)):sm(lt,l.stateNode));break;case 4:a=lt,s=It,lt=l.stateNode.containerInfo,It=!0,Kn(e,n,l),lt=a,It=s;break;case 0:case 11:case 14:case 15:yl(2,l,n),gt||yl(4,l,n),Kn(e,n,l);break;case 1:gt||(Dn(l,n),a=l.stateNode,typeof a.componentWillUnmount=="function"&&op(l,n,a)),Kn(e,n,l);break;case 21:Kn(e,n,l);break;case 22:gt=(a=gt)||l.memoizedState!==null,Kn(e,n,l),gt=a;break;default:Kn(e,n,l)}}function xp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Fi(e)}catch(l){Qe(n,n.return,l)}}}function yp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Fi(e)}catch(l){Qe(n,n.return,l)}}function gb(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new hp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new hp),n;default:throw Error(u(435,e.tag))}}function Qa(e,n){var l=gb(e);n.forEach(function(a){if(!l.has(a)){l.add(a);var s=Nb.bind(null,e,a);a.then(s,s)}})}function Yt(e,n){var l=n.deletions;if(l!==null)for(var a=0;a<l.length;a++){var s=l[a],d=e,y=n,k=y;e:for(;k!==null;){switch(k.tag){case 27:if(Nl(k.type)){lt=k.stateNode,It=!1;break e}break;case 5:lt=k.stateNode,It=!1;break e;case 3:case 4:lt=k.stateNode.containerInfo,It=!0;break e}k=k.return}if(lt===null)throw Error(u(160));gp(d,y,s),lt=null,It=!1,d=s.alternate,d!==null&&(d.return=null),s.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)bp(n,e),n=n.sibling}var kn=null;function bp(e,n){var l=e.alternate,a=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Yt(n,e),Gt(e),a&4&&(yl(3,e,e.return),_r(3,e),yl(5,e,e.return));break;case 1:Yt(n,e),Gt(e),a&512&&(gt||l===null||Dn(l,l.return)),a&64&&Zn&&(e=e.updateQueue,e!==null&&(a=e.callbacks,a!==null&&(l=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=l===null?a:l.concat(a))));break;case 26:var s=kn;if(Yt(n,e),Gt(e),a&512&&(gt||l===null||Dn(l,l.return)),a&4){var d=l!==null?l.memoizedState:null;if(a=e.memoizedState,l===null)if(a===null)if(e.stateNode===null){e:{a=e.type,l=e.memoizedProps,s=s.ownerDocument||s;t:switch(a){case"title":d=s.getElementsByTagName("title")[0],(!d||d[tr]||d[Nt]||d.namespaceURI==="http://www.w3.org/2000/svg"||d.hasAttribute("itemprop"))&&(d=s.createElement(a),s.head.insertBefore(d,s.querySelector("head > title"))),Tt(d,a,l),d[Nt]=e,kt(d),a=d;break e;case"link":var y=bm("link","href",s).get(a+(l.href||""));if(y){for(var k=0;k<y.length;k++)if(d=y[k],d.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&d.getAttribute("rel")===(l.rel==null?null:l.rel)&&d.getAttribute("title")===(l.title==null?null:l.title)&&d.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){y.splice(k,1);break t}}d=s.createElement(a),Tt(d,a,l),s.head.appendChild(d);break;case"meta":if(y=bm("meta","content",s).get(a+(l.content||""))){for(k=0;k<y.length;k++)if(d=y[k],d.getAttribute("content")===(l.content==null?null:""+l.content)&&d.getAttribute("name")===(l.name==null?null:l.name)&&d.getAttribute("property")===(l.property==null?null:l.property)&&d.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&d.getAttribute("charset")===(l.charSet==null?null:l.charSet)){y.splice(k,1);break t}}d=s.createElement(a),Tt(d,a,l),s.head.appendChild(d);break;default:throw Error(u(468,a))}d[Nt]=e,kt(d),a=d}e.stateNode=a}else vm(s,e.type,e.stateNode);else e.stateNode=ym(s,a,e.memoizedProps);else d!==a?(d===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):d.count--,a===null?vm(s,e.type,e.stateNode):ym(s,a,e.memoizedProps)):a===null&&e.stateNode!==null&&go(e,e.memoizedProps,l.memoizedProps)}break;case 27:Yt(n,e),Gt(e),a&512&&(gt||l===null||Dn(l,l.return)),l!==null&&a&4&&go(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Yt(n,e),Gt(e),a&512&&(gt||l===null||Dn(l,l.return)),e.flags&32){s=e.stateNode;try{pi(s,"")}catch(de){Qe(e,e.return,de)}}a&4&&e.stateNode!=null&&(s=e.memoizedProps,go(e,s,l!==null?l.memoizedProps:s)),a&1024&&(bo=!0);break;case 6:if(Yt(n,e),Gt(e),a&4){if(e.stateNode===null)throw Error(u(162));a=e.memoizedProps,l=e.stateNode;try{l.nodeValue=a}catch(de){Qe(e,e.return,de)}}break;case 3:if(ou=null,s=kn,kn=uu(n.containerInfo),Yt(n,e),kn=s,Gt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Fi(n.containerInfo)}catch(de){Qe(e,e.return,de)}bo&&(bo=!1,vp(e));break;case 4:a=kn,kn=uu(e.stateNode.containerInfo),Yt(n,e),Gt(e),kn=a;break;case 12:Yt(n,e),Gt(e);break;case 31:Yt(n,e),Gt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 13:Yt(n,e),Gt(e),e.child.flags&8192&&e.memoizedState!==null!=(l!==null&&l.memoizedState!==null)&&(Za=rt()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 22:s=e.memoizedState!==null;var A=l!==null&&l.memoizedState!==null,B=Zn,X=gt;if(Zn=B||s,gt=X||A,Yt(n,e),gt=X,Zn=B,Gt(e),a&8192)e:for(n=e.stateNode,n._visibility=s?n._visibility&-2:n._visibility|1,s&&(l===null||A||Zn||gt||Jl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){A=l=n;try{if(d=A.stateNode,s)y=d.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{k=A.stateNode;var Z=A.memoizedProps.style,I=Z!=null&&Z.hasOwnProperty("display")?Z.display:null;k.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(de){Qe(A,A.return,de)}}}else if(n.tag===6){if(l===null){A=n;try{A.stateNode.nodeValue=s?"":A.memoizedProps}catch(de){Qe(A,A.return,de)}}}else if(n.tag===18){if(l===null){A=n;try{var G=A.stateNode;s?om(G,!0):om(A.stateNode,!1)}catch(de){Qe(A,A.return,de)}}}else if((n.tag!==22&&n.tag!==23||n.memoizedState===null||n===e)&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;l===n&&(l=null),n=n.return}l===n&&(l=null),n.sibling.return=n.return,n=n.sibling}a&4&&(a=e.updateQueue,a!==null&&(l=a.retryQueue,l!==null&&(a.retryQueue=null,Qa(e,l))));break;case 19:Yt(n,e),Gt(e),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 30:break;case 21:break;default:Yt(n,e),Gt(e)}}function Gt(e){var n=e.flags;if(n&2){try{for(var l,a=e.return;a!==null;){if(fp(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var s=l.stateNode,d=xo(e);Xa(e,d,s);break;case 5:var y=l.stateNode;l.flags&32&&(pi(y,""),l.flags&=-33);var k=xo(e);Xa(e,k,y);break;case 3:case 4:var A=l.stateNode.containerInfo,B=xo(e);yo(e,B,A);break;default:throw Error(u(161))}}catch(X){Qe(e,e.return,X)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function vp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;vp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Jn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)pp(e,n.alternate,n),n=n.sibling}function Jl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:yl(4,n,n.return),Jl(n);break;case 1:Dn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&op(n,n.return,l),Jl(n);break;case 27:Ur(n.stateNode);case 26:case 5:Dn(n,n.return),Jl(n);break;case 22:n.memoizedState===null&&Jl(n);break;case 30:Jl(n);break;default:Jl(n)}e=e.sibling}}function Pn(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var a=n.alternate,s=e,d=n,y=d.flags;switch(d.tag){case 0:case 11:case 15:Pn(s,d,l),_r(4,d);break;case 1:if(Pn(s,d,l),a=d,s=a.stateNode,typeof s.componentDidMount=="function")try{s.componentDidMount()}catch(B){Qe(a,a.return,B)}if(a=d,s=a.updateQueue,s!==null){var k=a.stateNode;try{var A=s.shared.hiddenCallbacks;if(A!==null)for(s.shared.hiddenCallbacks=null,s=0;s<A.length;s++)Jd(A[s],k)}catch(B){Qe(a,a.return,B)}}l&&y&64&&sp(d),Cr(d,d.return);break;case 27:dp(d);case 26:case 5:Pn(s,d,l),l&&a===null&&y&4&&cp(d),Cr(d,d.return);break;case 12:Pn(s,d,l);break;case 31:Pn(s,d,l),l&&y&4&&xp(s,d);break;case 13:Pn(s,d,l),l&&y&4&&yp(s,d);break;case 22:d.memoizedState===null&&Pn(s,d,l),Cr(d,d.return);break;case 30:break;default:Pn(s,d,l)}n=n.sibling}}function vo(e,n){var l=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(l=e.memoizedState.cachePool.pool),e=null,n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(e=n.memoizedState.cachePool.pool),e!==l&&(e!=null&&e.refCount++,l!=null&&pr(l))}function So(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&pr(e))}function wn(e,n,l,a){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)Sp(e,n,l,a),n=n.sibling}function Sp(e,n,l,a){var s=n.flags;switch(n.tag){case 0:case 11:case 15:wn(e,n,l,a),s&2048&&_r(9,n);break;case 1:wn(e,n,l,a);break;case 3:wn(e,n,l,a),s&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&pr(e)));break;case 12:if(s&2048){wn(e,n,l,a),e=n.stateNode;try{var d=n.memoizedProps,y=d.id,k=d.onPostCommit;typeof k=="function"&&k(y,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(A){Qe(n,n.return,A)}}else wn(e,n,l,a);break;case 31:wn(e,n,l,a);break;case 13:wn(e,n,l,a);break;case 23:break;case 22:d=n.stateNode,y=n.alternate,n.memoizedState!==null?d._visibility&2?wn(e,n,l,a):Tr(e,n):d._visibility&2?wn(e,n,l,a):(d._visibility|=2,Mi(e,n,l,a,(n.subtreeFlags&10256)!==0||!1)),s&2048&&vo(y,n);break;case 24:wn(e,n,l,a),s&2048&&So(n.alternate,n);break;default:wn(e,n,l,a)}}function Mi(e,n,l,a,s){for(s=s&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var d=e,y=n,k=l,A=a,B=y.flags;switch(y.tag){case 0:case 11:case 15:Mi(d,y,k,A,s),_r(8,y);break;case 23:break;case 22:var X=y.stateNode;y.memoizedState!==null?X._visibility&2?Mi(d,y,k,A,s):Tr(d,y):(X._visibility|=2,Mi(d,y,k,A,s)),s&&B&2048&&vo(y.alternate,y);break;case 24:Mi(d,y,k,A,s),s&&B&2048&&So(y.alternate,y);break;default:Mi(d,y,k,A,s)}n=n.sibling}}function Tr(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,a=n,s=a.flags;switch(a.tag){case 22:Tr(l,a),s&2048&&vo(a.alternate,a);break;case 24:Tr(l,a),s&2048&&So(a.alternate,a);break;default:Tr(l,a)}n=n.sibling}}var Ar=8192;function Oi(e,n,l){if(e.subtreeFlags&Ar)for(e=e.child;e!==null;)kp(e,n,l),e=e.sibling}function kp(e,n,l){switch(e.tag){case 26:Oi(e,n,l),e.flags&Ar&&e.memoizedState!==null&&n0(l,kn,e.memoizedState,e.memoizedProps);break;case 5:Oi(e,n,l);break;case 3:case 4:var a=kn;kn=uu(e.stateNode.containerInfo),Oi(e,n,l),kn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=Ar,Ar=16777216,Oi(e,n,l),Ar=a):Oi(e,n,l));break;default:Oi(e,n,l)}}function wp(e){var n=e.alternate;if(n!==null&&(e=n.child,e!==null)){n.child=null;do n=e.sibling,e.sibling=null,e=n;while(e!==null)}}function zr(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];wt=a,Np(a,e)}wp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)jp(e),e=e.sibling}function jp(e){switch(e.tag){case 0:case 11:case 15:zr(e),e.flags&2048&&yl(9,e,e.return);break;case 3:zr(e);break;case 12:zr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,$a(e)):zr(e);break;default:zr(e)}}function $a(e){var n=e.deletions;if((e.flags&16)!==0){if(n!==null)for(var l=0;l<n.length;l++){var a=n[l];wt=a,Np(a,e)}wp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:yl(8,n,n.return),$a(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,$a(n));break;default:$a(n)}e=e.sibling}}function Np(e,n){for(;wt!==null;){var l=wt;switch(l.tag){case 0:case 11:case 15:yl(8,l,n);break;case 23:case 22:if(l.memoizedState!==null&&l.memoizedState.cachePool!==null){var a=l.memoizedState.cachePool.pool;a!=null&&a.refCount++}break;case 24:pr(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,wt=a;else e:for(l=e;wt!==null;){a=wt;var s=a.sibling,d=a.return;if(mp(a),a===l){wt=null;break e}if(s!==null){s.return=d,wt=s;break e}wt=d}}}var xb={getCacheForType:function(e){var n=_t(ht),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return _t(ht).controller.signal}},yb=typeof WeakMap=="function"?WeakMap:Map,Ve=0,Pe=null,ze=null,Me=0,Xe=0,Pt=null,bl=!1,Li=!1,ko=!1,Wn=0,ot=0,vl=0,Pl=0,wo=0,Wt=0,Ui=0,Dr=null,Vt=null,jo=!1,Za=0,Ep=0,Ka=1/0,Ja=null,Sl=null,bt=0,kl=null,qi=null,el=0,No=0,Eo=null,_p=null,Rr=0,_o=null;function en(){return(Ve&2)!==0&&Me!==0?Me&-Me:D.T!==null?Ro():Gf()}function Cp(){if(Wt===0)if((Me&536870912)===0||Ue){var e=ai;ai<<=1,(ai&3932160)===0&&(ai=262144),Wt=e}else Wt=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Wt}function Ft(e,n,l){(e===Pe&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)&&(Bi(e,0),wl(e,Me,Wt,!1)),er(e,l),((Ve&2)===0||e!==Pe)&&(e===Pe&&((Ve&2)===0&&(Pl|=l),ot===4&&wl(e,Me,Wt,!1)),Rn(e))}function Tp(e,n,l){if((Ve&6)!==0)throw Error(u(327));var a=!l&&(n&127)===0&&(n&e.expiredLanes)===0||ce(e,n),s=a?Sb(e,n):To(e,n,!0),d=a;do{if(s===0){Li&&!a&&wl(e,n,0,!1);break}else{if(l=e.current.alternate,d&&!bb(l)){s=To(e,n,!1),d=!1;continue}if(s===2){if(d=n,e.errorRecoveryDisabledLanes&d)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){n=y;e:{var k=e;s=Dr;var A=k.current.memoizedState.isDehydrated;if(A&&(Bi(k,y).flags|=256),y=To(k,y,!1),y!==2){if(ko&&!A){k.errorRecoveryDisabledLanes|=d,Pl|=d,s=4;break e}d=Vt,Vt=s,d!==null&&(Vt===null?Vt=d:Vt.push.apply(Vt,d))}s=y}if(d=!1,s!==2)continue}}if(s===1){Bi(e,0),wl(e,n,0,!0);break}e:{switch(a=e,d=s,d){case 0:case 1:throw Error(u(345));case 4:if((n&4194048)!==n)break;case 6:wl(a,n,Wt,!bl);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((n&62914560)===n&&(s=Za+300-rt(),10<s)){if(wl(a,n,Wt,!bl),K(a,0,!0)!==0)break e;el=n,a.timeoutHandle=am(Ap.bind(null,a,l,Vt,Ja,jo,n,Wt,Pl,Ui,bl,d,"Throttled",-0,0),s);break e}Ap(a,l,Vt,Ja,jo,n,Wt,Pl,Ui,bl,d,null,-0,0)}}break}while(!0);Rn(e)}function Ap(e,n,l,a,s,d,y,k,A,B,X,Z,I,G){if(e.timeoutHandle=-1,Z=n.subtreeFlags,Z&8192||(Z&16785408)===16785408){Z={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Bn},kp(n,d,Z);var de=(d&62914560)===d?Za-rt():(d&4194048)===d?Ep-rt():0;if(de=l0(Z,de),de!==null){el=d,e.cancelPendingCommit=de(qp.bind(null,e,n,d,l,a,s,y,k,A,X,Z,null,I,G)),wl(e,d,y,!B);return}}qp(e,n,d,l,a,s,y,k,A)}function bb(e){for(var n=e;;){var l=n.tag;if((l===0||l===11||l===15)&&n.flags&16384&&(l=n.updateQueue,l!==null&&(l=l.stores,l!==null)))for(var a=0;a<l.length;a++){var s=l[a],d=s.getSnapshot;s=s.value;try{if(!$t(d(),s))return!1}catch{return!1}}if(l=n.child,n.subtreeFlags&16384&&l!==null)l.return=n,n=l;else{if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return!0;n=n.return}n.sibling.return=n.return,n=n.sibling}}return!0}function wl(e,n,l,a){n&=~wo,n&=~Pl,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var s=n;0<s;){var d=31-Fe(s),y=1<<d;a[d]=-1,s&=~y}l!==0&&Hf(e,l,n)}function Pa(){return(Ve&6)===0?(Mr(0),!1):!0}function Co(){if(ze!==null){if(Xe===0)var e=ze.return;else e=ze,Gn=Gl=null,Gs(e),Ti=null,gr=0,e=ze;for(;e!==null;)up(e.alternate,e),e=e.return;ze=null}}function Bi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Bb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),el=0,Co(),Pe=e,ze=l=In(e.current,null),Me=n,Xe=0,Pt=null,bl=!1,Li=ce(e,n),ko=!1,Ui=Wt=wo=Pl=vl=ot=0,Vt=Dr=null,jo=!1,(n&8)!==0&&(n|=n&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=n;0<a;){var s=31-Fe(a),d=1<<s;n|=e[s],a&=~d}return Wn=n,ba(),l}function zp(e,n){Ce=null,D.H=jr,n===Ci||n===_a?(n=Qd(),Xe=3):n===zs?(n=Qd(),Xe=4):Xe=n===ro?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Pt=n,ze===null&&(ot=1,Ia(e,fn(n,e.current)))}function Dp(){var e=Kt.current;return e===null?!0:(Me&4194048)===Me?mn===null:(Me&62914560)===Me||(Me&536870912)!==0?e===mn:!1}function Rp(){var e=D.H;return D.H=jr,e===null?jr:e}function Mp(){var e=D.A;return D.A=xb,e}function Wa(){ot=4,bl||(Me&4194048)!==Me&&Kt.current!==null||(Li=!0),(vl&134217727)===0&&(Pl&134217727)===0||Pe===null||wl(Pe,Me,Wt,!1)}function To(e,n,l){var a=Ve;Ve|=2;var s=Rp(),d=Mp();(Pe!==e||Me!==n)&&(Ja=null,Bi(e,n)),n=!1;var y=ot;e:do try{if(Xe!==0&&ze!==null){var k=ze,A=Pt;switch(Xe){case 8:Co(),y=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(n=!0);var B=Xe;if(Xe=0,Pt=null,Hi(e,k,A,B),l&&Li){y=0;break e}break;default:B=Xe,Xe=0,Pt=null,Hi(e,k,A,B)}}vb(),y=ot;break}catch(X){zp(e,X)}while(!0);return n&&e.shellSuspendCounter++,Gn=Gl=null,Ve=a,D.H=s,D.A=d,ze===null&&(Pe=null,Me=0,ba()),y}function vb(){for(;ze!==null;)Op(ze)}function Sb(e,n){var l=Ve;Ve|=2;var a=Rp(),s=Mp();Pe!==e||Me!==n?(Ja=null,Ka=rt()+500,Bi(e,n)):Li=ce(e,n);e:do try{if(Xe!==0&&ze!==null){n=ze;var d=Pt;t:switch(Xe){case 1:Xe=0,Pt=null,Hi(e,n,d,1);break;case 2:case 9:if(Fd(d)){Xe=0,Pt=null,Lp(n);break}n=function(){Xe!==2&&Xe!==9||Pe!==e||(Xe=7),Rn(e)},d.then(n,n);break e;case 3:Xe=7;break e;case 4:Xe=5;break e;case 7:Fd(d)?(Xe=0,Pt=null,Lp(n)):(Xe=0,Pt=null,Hi(e,n,d,7));break;case 5:var y=null;switch(ze.tag){case 26:y=ze.memoizedState;case 5:case 27:var k=ze;if(y?Sm(y):k.stateNode.complete){Xe=0,Pt=null;var A=k.sibling;if(A!==null)ze=A;else{var B=k.return;B!==null?(ze=B,eu(B)):ze=null}break t}}Xe=0,Pt=null,Hi(e,n,d,5);break;case 6:Xe=0,Pt=null,Hi(e,n,d,6);break;case 8:Co(),ot=6;break e;default:throw Error(u(462))}}kb();break}catch(X){zp(e,X)}while(!0);return Gn=Gl=null,D.H=a,D.A=s,Ve=l,ze!==null?0:(Pe=null,Me=0,ba(),ot)}function kb(){for(;ze!==null&&!it();)Op(ze)}function Op(e){var n=rp(e.alternate,e,Wn);e.memoizedProps=e.pendingProps,n===null?eu(e):ze=n}function Lp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=Wh(l,n,n.pendingProps,n.type,void 0,Me);break;case 11:n=Wh(l,n,n.pendingProps,n.type.render,n.ref,Me);break;case 5:Gs(n);default:up(l,n),n=ze=Md(n,Wn),n=rp(l,n,Wn)}e.memoizedProps=e.pendingProps,n===null?eu(e):ze=n}function Hi(e,n,l,a){Gn=Gl=null,Gs(n),Ti=null,gr=0;var s=n.return;try{if(cb(e,s,n,l,Me)){ot=1,Ia(e,fn(l,e.current)),ze=null;return}}catch(d){if(s!==null)throw ze=s,d;ot=1,Ia(e,fn(l,e.current)),ze=null;return}n.flags&32768?(Ue||a===1?e=!0:Li||(Me&536870912)!==0?e=!1:(bl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Kt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Up(n,e)):eu(n)}function eu(e){var n=e;do{if((n.flags&32768)!==0){Up(n,bl);return}e=n.return;var l=hb(n.alternate,n,Wn);if(l!==null){ze=l;return}if(n=n.sibling,n!==null){ze=n;return}ze=n=e}while(n!==null);ot===0&&(ot=5)}function Up(e,n){do{var l=pb(e.alternate,e);if(l!==null){l.flags&=32767,ze=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){ze=e;return}ze=e=l}while(e!==null);ot=6,ze=null}function qp(e,n,l,a,s,d,y,k,A){e.cancelPendingCommit=null;do tu();while(bt!==0);if((Ve&6)!==0)throw Error(u(327));if(n!==null){if(n===e.current)throw Error(u(177));if(d=n.lanes|n.childLanes,d|=gs,t1(e,l,d,y,k,A),e===Pe&&(ze=Pe=null,Me=0),qi=n,kl=e,el=l,No=d,Eo=s,_p=a,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Eb(ve,function(){return Gp(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,s=Q.p,Q.p=2,y=Ve,Ve|=4;try{mb(e,n,l)}finally{Ve=y,Q.p=s,D.T=a}}bt=1,Bp(),Hp(),Ip()}}function Bp(){if(bt===1){bt=0;var e=kl,n=qi,l=(n.flags&13878)!==0;if((n.subtreeFlags&13878)!==0||l){l=D.T,D.T=null;var a=Q.p;Q.p=2;var s=Ve;Ve|=4;try{bp(n,e);var d=Io,y=Nd(e.containerInfo),k=d.focusedElem,A=d.selectionRange;if(y!==k&&k&&k.ownerDocument&&jd(k.ownerDocument.documentElement,k)){if(A!==null&&fs(k)){var B=A.start,X=A.end;if(X===void 0&&(X=B),"selectionStart"in k)k.selectionStart=B,k.selectionEnd=Math.min(X,k.value.length);else{var Z=k.ownerDocument||document,I=Z&&Z.defaultView||window;if(I.getSelection){var G=I.getSelection(),de=k.textContent.length,Se=Math.min(A.start,de),Ke=A.end===void 0?Se:Math.min(A.end,de);!G.extend&&Se>Ke&&(y=Ke,Ke=Se,Se=y);var O=wd(k,Se),z=wd(k,Ke);if(O&&z&&(G.rangeCount!==1||G.anchorNode!==O.node||G.anchorOffset!==O.offset||G.focusNode!==z.node||G.focusOffset!==z.offset)){var q=Z.createRange();q.setStart(O.node,O.offset),G.removeAllRanges(),Se>Ke?(G.addRange(q),G.extend(z.node,z.offset)):(q.setEnd(z.node,z.offset),G.addRange(q))}}}}for(Z=[],G=k;G=G.parentNode;)G.nodeType===1&&Z.push({element:G,left:G.scrollLeft,top:G.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<Z.length;k++){var $=Z[k];$.element.scrollLeft=$.left,$.element.scrollTop=$.top}}hu=!!Ho,Io=Ho=null}finally{Ve=s,Q.p=a,D.T=l}}e.current=n,bt=2}}function Hp(){if(bt===2){bt=0;var e=kl,n=qi,l=(n.flags&8772)!==0;if((n.subtreeFlags&8772)!==0||l){l=D.T,D.T=null;var a=Q.p;Q.p=2;var s=Ve;Ve|=4;try{pp(e,n.alternate,n)}finally{Ve=s,Q.p=a,D.T=l}}bt=3}}function Ip(){if(bt===4||bt===3){bt=0,an();var e=kl,n=qi,l=el,a=_p;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?bt=5:(bt=0,qi=kl=null,Yp(e,e.pendingLanes));var s=e.pendingLanes;if(s===0&&(Sl=null),Xu(l),n=n.stateNode,at&&typeof at.onCommitFiberRoot=="function")try{at.onCommitFiberRoot(vt,n,void 0,(n.current.flags&128)===128)}catch{}if(a!==null){n=D.T,s=Q.p,Q.p=2,D.T=null;try{for(var d=e.onRecoverableError,y=0;y<a.length;y++){var k=a[y];d(k.value,{componentStack:k.stack})}}finally{D.T=n,Q.p=s}}(el&3)!==0&&tu(),Rn(e),s=e.pendingLanes,(l&261930)!==0&&(s&42)!==0?e===_o?Rr++:(Rr=0,_o=e):Rr=0,Mr(0)}}function Yp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,pr(n)))}function tu(){return Bp(),Hp(),Ip(),Gp()}function Gp(){if(bt!==5)return!1;var e=kl,n=No;No=0;var l=Xu(el),a=D.T,s=Q.p;try{Q.p=32>l?32:l,D.T=null,l=Eo,Eo=null;var d=kl,y=el;if(bt=0,qi=kl=null,el=0,(Ve&6)!==0)throw Error(u(331));var k=Ve;if(Ve|=4,jp(d.current),Sp(d,d.current,y,l),Ve=k,Mr(0,!1),at&&typeof at.onPostCommitFiberRoot=="function")try{at.onPostCommitFiberRoot(vt,d)}catch{}return!0}finally{Q.p=s,D.T=a,Yp(e,n)}}function Vp(e,n,l){n=fn(l,n),n=io(e.stateNode,n,2),e=ml(e,n,2),e!==null&&(er(e,2),Rn(e))}function Qe(e,n,l){if(e.tag===3)Vp(e,e,l);else for(;n!==null;){if(n.tag===3){Vp(n,e,l);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(Sl===null||!Sl.has(a))){e=fn(l,e),l=Fh(2),a=ml(n,l,2),a!==null&&(Xh(l,a,n,e),er(a,2),Rn(a));break}}n=n.return}}function Ao(e,n,l){var a=e.pingCache;if(a===null){a=e.pingCache=new yb;var s=new Set;a.set(n,s)}else s=a.get(n),s===void 0&&(s=new Set,a.set(n,s));s.has(l)||(ko=!0,s.add(l),e=wb.bind(null,e,n,l),n.then(e,e))}function wb(e,n,l){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,Pe===e&&(Me&l)===l&&(ot===4||ot===3&&(Me&62914560)===Me&&300>rt()-Za?(Ve&2)===0&&Bi(e,0):wo|=l,Ui===Me&&(Ui=0)),Rn(e)}function Fp(e,n){n===0&&(n=ut()),e=Hl(e,n),e!==null&&(er(e,n),Rn(e))}function jb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),Fp(e,l)}function Nb(e,n){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,s=e.memoizedState;s!==null&&(l=s.retryLane);break;case 19:a=e.stateNode;break;case 22:a=e.stateNode._retryCache;break;default:throw Error(u(314))}a!==null&&a.delete(n),Fp(e,l)}function Eb(e,n){return ee(e,n)}var nu=null,Ii=null,zo=!1,lu=!1,Do=!1,jl=0;function Rn(e){e!==Ii&&e.next===null&&(Ii===null?nu=Ii=e:Ii=Ii.next=e),lu=!0,zo||(zo=!0,Cb())}function Mr(e,n){if(!Do&&lu){Do=!0;do for(var l=!1,a=nu;a!==null;){if(e!==0){var s=a.pendingLanes;if(s===0)var d=0;else{var y=a.suspendedLanes,k=a.pingedLanes;d=(1<<31-Fe(42|e)+1)-1,d&=s&~(y&~k),d=d&201326741?d&201326741|1:d?d|2:0}d!==0&&(l=!0,Zp(a,d))}else d=Me,d=K(a,a===Pe?d:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(d&3)===0||ce(a,d)||(l=!0,Zp(a,d));a=a.next}while(l);Do=!1}}function _b(){Xp()}function Xp(){lu=zo=!1;var e=0;jl!==0&&qb()&&(e=jl);for(var n=rt(),l=null,a=nu;a!==null;){var s=a.next,d=Qp(a,n);d===0?(a.next=null,l===null?nu=s:l.next=s,s===null&&(Ii=l)):(l=a,(e!==0||(d&3)!==0)&&(lu=!0)),a=s}bt!==0&&bt!==5||Mr(e),jl!==0&&(jl=0)}function Qp(e,n){for(var l=e.suspendedLanes,a=e.pingedLanes,s=e.expirationTimes,d=e.pendingLanes&-62914561;0<d;){var y=31-Fe(d),k=1<<y,A=s[y];A===-1?((k&l)===0||(k&a)!==0)&&(s[y]=Ee(k,n)):A<=n&&(e.expiredLanes|=k),d&=~k}if(n=Pe,l=Me,l=K(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===n&&(Xe===2||Xe===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&Le(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||ce(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(a!==null&&Le(a),Xu(l)){case 2:case 8:l=re;break;case 32:l=ve;break;case 268435456:l=He;break;default:l=ve}return a=$p.bind(null,e),l=ee(l,a),e.callbackPriority=n,e.callbackNode=l,n}return a!==null&&a!==null&&Le(a),e.callbackPriority=2,e.callbackNode=null,2}function $p(e,n){if(bt!==0&&bt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(tu()&&e.callbackNode!==l)return null;var a=Me;return a=K(e,e===Pe?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Tp(e,a,n),Qp(e,rt()),e.callbackNode!=null&&e.callbackNode===l?$p.bind(null,e):null)}function Zp(e,n){if(tu())return null;Tp(e,n,!0)}function Cb(){Hb(function(){(Ve&6)!==0?ee(F,_b):Xp()})}function Ro(){if(jl===0){var e=Ei;e===0&&(e=Ol,Ol<<=1,(Ol&261888)===0&&(Ol=256)),jl=e}return jl}function Kp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:fa(""+e)}function Jp(e,n){var l=n.ownerDocument.createElement("input");return l.name=n.name,l.value=n.value,e.id&&l.setAttribute("form",e.id),n.parentNode.insertBefore(l,n),e=new FormData(e),l.parentNode.removeChild(l),e}function Tb(e,n,l,a,s){if(n==="submit"&&l&&l.stateNode===s){var d=Kp((s[Bt]||null).action),y=a.submitter;y&&(n=(n=y[Bt]||null)?Kp(n.formAction):y.getAttribute("formAction"),n!==null&&(d=n,y=null));var k=new ma("action","action",null,a,s);e.push({event:k,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(jl!==0){var A=y?Jp(s,y):new FormData(s);Ps(l,{pending:!0,data:A,method:s.method,action:d},null,A)}}else typeof d=="function"&&(k.preventDefault(),A=y?Jp(s,y):new FormData(s),Ps(l,{pending:!0,data:A,method:s.method,action:d},d,A))},currentTarget:s}]})}}for(var Mo=0;Mo<ms.length;Mo++){var Oo=ms[Mo],Ab=Oo.toLowerCase(),zb=Oo[0].toUpperCase()+Oo.slice(1);Sn(Ab,"on"+zb)}Sn(Cd,"onAnimationEnd"),Sn(Td,"onAnimationIteration"),Sn(Ad,"onAnimationStart"),Sn("dblclick","onDoubleClick"),Sn("focusin","onFocus"),Sn("focusout","onBlur"),Sn(Q1,"onTransitionRun"),Sn($1,"onTransitionStart"),Sn(Z1,"onTransitionCancel"),Sn(zd,"onTransitionEnd"),di("onMouseEnter",["mouseout","mouseover"]),di("onMouseLeave",["mouseout","mouseover"]),di("onPointerEnter",["pointerout","pointerover"]),di("onPointerLeave",["pointerout","pointerover"]),Ll("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ll("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ll("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ll("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ll("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ll("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Or="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(" "),Db=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Or));function Pp(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],s=a.event;a=a.listeners;e:{var d=void 0;if(n)for(var y=a.length-1;0<=y;y--){var k=a[y],A=k.instance,B=k.currentTarget;if(k=k.listener,A!==d&&s.isPropagationStopped())break e;d=k,s.currentTarget=B;try{d(s)}catch(X){ya(X)}s.currentTarget=null,d=A}else for(y=0;y<a.length;y++){if(k=a[y],A=k.instance,B=k.currentTarget,k=k.listener,A!==d&&s.isPropagationStopped())break e;d=k,s.currentTarget=B;try{d(s)}catch(X){ya(X)}s.currentTarget=null,d=A}}}}function De(e,n){var l=n[Qu];l===void 0&&(l=n[Qu]=new Set);var a=e+"__bubble";l.has(a)||(Wp(n,e,2,!1),l.add(a))}function Lo(e,n,l){var a=0;n&&(a|=4),Wp(l,e,a,n)}var iu="_reactListening"+Math.random().toString(36).slice(2);function Uo(e){if(!e[iu]){e[iu]=!0,Xf.forEach(function(l){l!=="selectionchange"&&(Db.has(l)||Lo(l,!1,e),Lo(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[iu]||(n[iu]=!0,Lo("selectionchange",!1,n))}}function Wp(e,n,l,a){switch(Cm(n)){case 2:var s=a0;break;case 8:s=u0;break;default:s=Po}l=s.bind(null,n,l,e),s=void 0,!ns||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(s=!0),a?s!==void 0?e.addEventListener(n,l,{capture:!0,passive:s}):e.addEventListener(n,l,!0):s!==void 0?e.addEventListener(n,l,{passive:s}):e.addEventListener(n,l,!1)}function qo(e,n,l,a,s){var d=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var y=a.tag;if(y===3||y===4){var k=a.stateNode.containerInfo;if(k===s)break;if(y===4)for(y=a.return;y!==null;){var A=y.tag;if((A===3||A===4)&&y.stateNode.containerInfo===s)return;y=y.return}for(;k!==null;){if(y=oi(k),y===null)return;if(A=y.tag,A===5||A===6||A===26||A===27){a=d=y;continue e}k=k.parentNode}}a=a.return}id(function(){var B=d,X=es(l),Z=[];e:{var I=Dd.get(e);if(I!==void 0){var G=ma,de=e;switch(e){case"keypress":if(ha(l)===0)break e;case"keydown":case"keyup":G=N1;break;case"focusin":de="focus",G=as;break;case"focusout":de="blur",G=as;break;case"beforeblur":case"afterblur":G=as;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":G=ud;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":G=h1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":G=C1;break;case Cd:case Td:case Ad:G=g1;break;case zd:G=A1;break;case"scroll":case"scrollend":G=f1;break;case"wheel":G=D1;break;case"copy":case"cut":case"paste":G=y1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":G=od;break;case"toggle":case"beforetoggle":G=M1}var Se=(n&4)!==0,Ke=!Se&&(e==="scroll"||e==="scrollend"),O=Se?I!==null?I+"Capture":null:I;Se=[];for(var z=B,q;z!==null;){var $=z;if(q=$.stateNode,$=$.tag,$!==5&&$!==26&&$!==27||q===null||O===null||($=lr(z,O),$!=null&&Se.push(Lr(z,$,q))),Ke)break;z=z.return}0<Se.length&&(I=new G(I,de,null,l,X),Z.push({event:I,listeners:Se}))}}if((n&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",G=e==="mouseout"||e==="pointerout",I&&l!==Wu&&(de=l.relatedTarget||l.fromElement)&&(oi(de)||de[si]))break e;if((G||I)&&(I=X.window===X?X:(I=X.ownerDocument)?I.defaultView||I.parentWindow:window,G?(de=l.relatedTarget||l.toElement,G=B,de=de?oi(de):null,de!==null&&(Ke=c(de),Se=de.tag,de!==Ke||Se!==5&&Se!==27&&Se!==6)&&(de=null)):(G=null,de=B),G!==de)){if(Se=ud,$="onMouseLeave",O="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Se=od,$="onPointerLeave",O="onPointerEnter",z="pointer"),Ke=G==null?I:nr(G),q=de==null?I:nr(de),I=new Se($,z+"leave",G,l,X),I.target=Ke,I.relatedTarget=q,$=null,oi(X)===B&&(Se=new Se(O,z+"enter",de,l,X),Se.target=q,Se.relatedTarget=Ke,$=Se),Ke=$,G&&de)t:{for(Se=Rb,O=G,z=de,q=0,$=O;$;$=Se($))q++;$=0;for(var ye=z;ye;ye=Se(ye))$++;for(;0<q-$;)O=Se(O),q--;for(;0<$-q;)z=Se(z),$--;for(;q--;){if(O===z||z!==null&&O===z.alternate){Se=O;break t}O=Se(O),z=Se(z)}Se=null}else Se=null;G!==null&&em(Z,I,G,Se,!1),de!==null&&Ke!==null&&em(Z,Ke,de,Se,!0)}}e:{if(I=B?nr(B):window,G=I.nodeName&&I.nodeName.toLowerCase(),G==="select"||G==="input"&&I.type==="file")var Ie=xd;else if(md(I))if(yd)Ie=V1;else{Ie=Y1;var pe=I1}else G=I.nodeName,!G||G.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&Pu(B.elementType)&&(Ie=xd):Ie=G1;if(Ie&&(Ie=Ie(e,B))){gd(Z,Ie,l,X);break e}pe&&pe(e,I,B),e==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&Ju(I,"number",I.value)}switch(pe=B?nr(B):window,e){case"focusin":(md(pe)||pe.contentEditable==="true")&&(yi=pe,ds=B,fr=null);break;case"focusout":fr=ds=yi=null;break;case"mousedown":hs=!0;break;case"contextmenu":case"mouseup":case"dragend":hs=!1,Ed(Z,l,X);break;case"selectionchange":if(X1)break;case"keydown":case"keyup":Ed(Z,l,X)}var Te;if(ss)e:{switch(e){case"compositionstart":var Oe="onCompositionStart";break e;case"compositionend":Oe="onCompositionEnd";break e;case"compositionupdate":Oe="onCompositionUpdate";break e}Oe=void 0}else xi?hd(e,l)&&(Oe="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Oe="onCompositionStart");Oe&&(cd&&l.locale!=="ko"&&(xi||Oe!=="onCompositionStart"?Oe==="onCompositionEnd"&&xi&&(Te=rd()):(sl=X,ls="value"in sl?sl.value:sl.textContent,xi=!0)),pe=ru(B,Oe),0<pe.length&&(Oe=new sd(Oe,e,null,l,X),Z.push({event:Oe,listeners:pe}),Te?Oe.data=Te:(Te=pd(l),Te!==null&&(Oe.data=Te)))),(Te=L1?U1(e,l):q1(e,l))&&(Oe=ru(B,"onBeforeInput"),0<Oe.length&&(pe=new sd("onBeforeInput","beforeinput",null,l,X),Z.push({event:pe,listeners:Oe}),pe.data=Te)),Tb(Z,e,B,l,X)}Pp(Z,n)})}function Lr(e,n,l){return{instance:e,listener:n,currentTarget:l}}function ru(e,n){for(var l=n+"Capture",a=[];e!==null;){var s=e,d=s.stateNode;if(s=s.tag,s!==5&&s!==26&&s!==27||d===null||(s=lr(e,l),s!=null&&a.unshift(Lr(e,s,d)),s=lr(e,n),s!=null&&a.push(Lr(e,s,d))),e.tag===3)return a;e=e.return}return[]}function Rb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function em(e,n,l,a,s){for(var d=n._reactName,y=[];l!==null&&l!==a;){var k=l,A=k.alternate,B=k.stateNode;if(k=k.tag,A!==null&&A===a)break;k!==5&&k!==26&&k!==27||B===null||(A=B,s?(B=lr(l,d),B!=null&&y.unshift(Lr(l,B,A))):s||(B=lr(l,d),B!=null&&y.push(Lr(l,B,A)))),l=l.return}y.length!==0&&e.push({event:n,listeners:y})}var Mb=/\r\n?/g,Ob=/\u0000|\uFFFD/g;function tm(e){return(typeof e=="string"?e:""+e).replace(Mb,`
|
|
49
|
-
`).replace(Ob,"")}function nm(e,n){return n=tm(n),tm(e)===n}function Ze(e,n,l,a,s,d){switch(l){case"children":typeof a=="string"?n==="body"||n==="textarea"&&a===""||pi(e,a):(typeof a=="number"||typeof a=="bigint")&&n!=="body"&&pi(e,""+a);break;case"className":oa(e,"class",a);break;case"tabIndex":oa(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":oa(e,l,a);break;case"style":nd(e,a,d);break;case"data":if(n!=="object"){oa(e,"data",a);break}case"src":case"href":if(a===""&&(n!=="a"||l!=="href")){e.removeAttribute(l);break}if(a==null||typeof a=="function"||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=fa(""+a),e.setAttribute(l,a);break;case"action":case"formAction":if(typeof a=="function"){e.setAttribute(l,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof d=="function"&&(l==="formAction"?(n!=="input"&&Ze(e,n,"name",s.name,s,null),Ze(e,n,"formEncType",s.formEncType,s,null),Ze(e,n,"formMethod",s.formMethod,s,null),Ze(e,n,"formTarget",s.formTarget,s,null)):(Ze(e,n,"encType",s.encType,s,null),Ze(e,n,"method",s.method,s,null),Ze(e,n,"target",s.target,s,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=fa(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Bn);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}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}l=fa(""+a),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",l);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""+a):e.removeAttribute(l);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":a&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,""):e.removeAttribute(l);break;case"capture":case"download":a===!0?e.setAttribute(l,""):a!==!1&&a!=null&&typeof a!="function"&&typeof a!="symbol"?e.setAttribute(l,a):e.removeAttribute(l);break;case"cols":case"rows":case"size":case"span":a!=null&&typeof a!="function"&&typeof a!="symbol"&&!isNaN(a)&&1<=a?e.setAttribute(l,a):e.removeAttribute(l);break;case"rowSpan":case"start":a==null||typeof a=="function"||typeof a=="symbol"||isNaN(a)?e.removeAttribute(l):e.setAttribute(l,a);break;case"popover":De("beforetoggle",e),De("toggle",e),sa(e,"popover",a);break;case"xlinkActuate":qn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":qn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":qn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":qn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":qn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":qn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":qn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":qn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":qn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":sa(e,"is",a);break;case"innerText":case"textContent":break;default:(!(2<l.length)||l[0]!=="o"&&l[0]!=="O"||l[1]!=="n"&&l[1]!=="N")&&(l=o1.get(l)||l,sa(e,l,a))}}function Bo(e,n,l,a,s,d){switch(l){case"style":nd(e,a,d);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(s.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?pi(e,a):(typeof a=="number"||typeof a=="bigint")&&pi(e,""+a);break;case"onScroll":a!=null&&De("scroll",e);break;case"onScrollEnd":a!=null&&De("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Bn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Qf.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(s=l.endsWith("Capture"),n=l.slice(2,s?l.length-7:void 0),d=e[Bt]||null,d=d!=null?d[l]:null,typeof d=="function"&&e.removeEventListener(n,d,s),typeof a=="function")){typeof d!="function"&&d!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,a,s);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):sa(e,l,a)}}}function Tt(e,n,l){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":De("error",e),De("load",e);var a=!1,s=!1,d;for(d in l)if(l.hasOwnProperty(d)){var y=l[d];if(y!=null)switch(d){case"src":a=!0;break;case"srcSet":s=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:Ze(e,n,d,y,l,null)}}s&&Ze(e,n,"srcSet",l.srcSet,l,null),a&&Ze(e,n,"src",l.src,l,null);return;case"input":De("invalid",e);var k=d=y=s=null,A=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var X=l[a];if(X!=null)switch(a){case"name":s=X;break;case"type":y=X;break;case"checked":A=X;break;case"defaultChecked":B=X;break;case"value":d=X;break;case"defaultValue":k=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,n));break;default:Ze(e,n,a,X,l,null)}}Pf(e,d,k,A,B,y,s,!1);return;case"select":De("invalid",e),a=y=d=null;for(s in l)if(l.hasOwnProperty(s)&&(k=l[s],k!=null))switch(s){case"value":d=k;break;case"defaultValue":y=k;break;case"multiple":a=k;default:Ze(e,n,s,k,l,null)}n=d,l=y,e.multiple=!!a,n!=null?hi(e,!!a,n,!1):l!=null&&hi(e,!!a,l,!0);return;case"textarea":De("invalid",e),d=s=a=null;for(y in l)if(l.hasOwnProperty(y)&&(k=l[y],k!=null))switch(y){case"value":a=k;break;case"defaultValue":s=k;break;case"children":d=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(91));break;default:Ze(e,n,y,k,l,null)}ed(e,a,s,d);return;case"option":for(A in l)l.hasOwnProperty(A)&&(a=l[A],a!=null)&&(A==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":Ze(e,n,A,a,l,null));return;case"dialog":De("beforetoggle",e),De("toggle",e),De("cancel",e),De("close",e);break;case"iframe":case"object":De("load",e);break;case"video":case"audio":for(a=0;a<Or.length;a++)De(Or[a],e);break;case"image":De("error",e),De("load",e);break;case"details":De("toggle",e);break;case"embed":case"source":case"link":De("error",e),De("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(B in l)if(l.hasOwnProperty(B)&&(a=l[B],a!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:Ze(e,n,B,a,l,null)}return;default:if(Pu(n)){for(X in l)l.hasOwnProperty(X)&&(a=l[X],a!==void 0&&Bo(e,n,X,a,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(a=l[k],a!=null&&Ze(e,n,k,a,l,null))}function Lb(e,n,l,a){switch(n){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var s=null,d=null,y=null,k=null,A=null,B=null,X=null;for(G in l){var Z=l[G];if(l.hasOwnProperty(G)&&Z!=null)switch(G){case"checked":break;case"value":break;case"defaultValue":A=Z;default:a.hasOwnProperty(G)||Ze(e,n,G,null,a,Z)}}for(var I in a){var G=a[I];if(Z=l[I],a.hasOwnProperty(I)&&(G!=null||Z!=null))switch(I){case"type":d=G;break;case"name":s=G;break;case"checked":B=G;break;case"defaultChecked":X=G;break;case"value":y=G;break;case"defaultValue":k=G;break;case"children":case"dangerouslySetInnerHTML":if(G!=null)throw Error(u(137,n));break;default:G!==Z&&Ze(e,n,I,G,a,Z)}}Ku(e,y,k,A,B,X,d,s);return;case"select":G=y=k=I=null;for(d in l)if(A=l[d],l.hasOwnProperty(d)&&A!=null)switch(d){case"value":break;case"multiple":G=A;default:a.hasOwnProperty(d)||Ze(e,n,d,null,a,A)}for(s in a)if(d=a[s],A=l[s],a.hasOwnProperty(s)&&(d!=null||A!=null))switch(s){case"value":I=d;break;case"defaultValue":k=d;break;case"multiple":y=d;default:d!==A&&Ze(e,n,s,d,a,A)}n=k,l=y,a=G,I!=null?hi(e,!!l,I,!1):!!a!=!!l&&(n!=null?hi(e,!!l,n,!0):hi(e,!!l,l?[]:"",!1));return;case"textarea":G=I=null;for(k in l)if(s=l[k],l.hasOwnProperty(k)&&s!=null&&!a.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:Ze(e,n,k,null,a,s)}for(y in a)if(s=a[y],d=l[y],a.hasOwnProperty(y)&&(s!=null||d!=null))switch(y){case"value":I=s;break;case"defaultValue":G=s;break;case"children":break;case"dangerouslySetInnerHTML":if(s!=null)throw Error(u(91));break;default:s!==d&&Ze(e,n,y,s,a,d)}Wf(e,I,G);return;case"option":for(var de in l)I=l[de],l.hasOwnProperty(de)&&I!=null&&!a.hasOwnProperty(de)&&(de==="selected"?e.selected=!1:Ze(e,n,de,null,a,I));for(A in a)I=a[A],G=l[A],a.hasOwnProperty(A)&&I!==G&&(I!=null||G!=null)&&(A==="selected"?e.selected=I&&typeof I!="function"&&typeof I!="symbol":Ze(e,n,A,I,a,G));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 Se in l)I=l[Se],l.hasOwnProperty(Se)&&I!=null&&!a.hasOwnProperty(Se)&&Ze(e,n,Se,null,a,I);for(B in a)if(I=a[B],G=l[B],a.hasOwnProperty(B)&&I!==G&&(I!=null||G!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(u(137,n));break;default:Ze(e,n,B,I,a,G)}return;default:if(Pu(n)){for(var Ke in l)I=l[Ke],l.hasOwnProperty(Ke)&&I!==void 0&&!a.hasOwnProperty(Ke)&&Bo(e,n,Ke,void 0,a,I);for(X in a)I=a[X],G=l[X],!a.hasOwnProperty(X)||I===G||I===void 0&&G===void 0||Bo(e,n,X,I,a,G);return}}for(var O in l)I=l[O],l.hasOwnProperty(O)&&I!=null&&!a.hasOwnProperty(O)&&Ze(e,n,O,null,a,I);for(Z in a)I=a[Z],G=l[Z],!a.hasOwnProperty(Z)||I===G||I==null&&G==null||Ze(e,n,Z,I,a,G)}function lm(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Ub(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var s=l[a],d=s.transferSize,y=s.initiatorType,k=s.duration;if(d&&k&&lm(y)){for(y=0,k=s.responseEnd,a+=1;a<l.length;a++){var A=l[a],B=A.startTime;if(B>k)break;var X=A.transferSize,Z=A.initiatorType;X&&lm(Z)&&(A=A.responseEnd,y+=X*(A<k?1:(k-B)/(A-B)))}if(--a,n+=8*(d+y)/(s.duration/1e3),e++,10<e)break}}if(0<e)return n/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var Ho=null,Io=null;function au(e){return e.nodeType===9?e:e.ownerDocument}function im(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 rm(e,n){if(e===0)switch(n){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&n==="foreignObject"?0:e}function Yo(e,n){return e==="textarea"||e==="noscript"||typeof n.children=="string"||typeof n.children=="number"||typeof n.children=="bigint"||typeof n.dangerouslySetInnerHTML=="object"&&n.dangerouslySetInnerHTML!==null&&n.dangerouslySetInnerHTML.__html!=null}var Go=null;function qb(){var e=window.event;return e&&e.type==="popstate"?e===Go?!1:(Go=e,!0):(Go=null,!1)}var am=typeof setTimeout=="function"?setTimeout:void 0,Bb=typeof clearTimeout=="function"?clearTimeout:void 0,um=typeof Promise=="function"?Promise:void 0,Hb=typeof queueMicrotask=="function"?queueMicrotask:typeof um<"u"?function(e){return um.resolve(null).then(e).catch(Ib)}:am;function Ib(e){setTimeout(function(){throw e})}function Nl(e){return e==="head"}function sm(e,n){var l=n,a=0;do{var s=l.nextSibling;if(e.removeChild(l),s&&s.nodeType===8)if(l=s.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(s),Fi(n);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")Ur(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,Ur(l);for(var d=l.firstChild;d;){var y=d.nextSibling,k=d.nodeName;d[tr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&d.rel.toLowerCase()==="stylesheet"||l.removeChild(d),d=y}}else l==="body"&&Ur(e.ownerDocument.body);l=s}while(l);Fi(n)}function om(e,n){var l=e;e=0;do{var a=l.nextSibling;if(l.nodeType===1?n?(l._stashedDisplay=l.style.display,l.style.display="none"):(l.style.display=l._stashedDisplay||"",l.getAttribute("style")===""&&l.removeAttribute("style")):l.nodeType===3&&(n?(l._stashedText=l.nodeValue,l.nodeValue=""):l.nodeValue=l._stashedText||""),a&&a.nodeType===8)if(l=a.data,l==="/$"){if(e===0)break;e--}else l!=="$"&&l!=="$?"&&l!=="$~"&&l!=="$!"||e++;l=a}while(l)}function Vo(e){var n=e.firstChild;for(n&&n.nodeType===10&&(n=n.nextSibling);n;){var l=n;switch(n=n.nextSibling,l.nodeName){case"HTML":case"HEAD":case"BODY":Vo(l),$u(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Yb(e,n,l,a){for(;e.nodeType===1;){var s=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[tr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(d=e.getAttribute("rel"),d==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(d!==s.rel||e.getAttribute("href")!==(s.href==null||s.href===""?null:s.href)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin)||e.getAttribute("title")!==(s.title==null?null:s.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(d=e.getAttribute("src"),(d!==(s.src==null?null:s.src)||e.getAttribute("type")!==(s.type==null?null:s.type)||e.getAttribute("crossorigin")!==(s.crossOrigin==null?null:s.crossOrigin))&&d&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var d=s.name==null?null:""+s.name;if(s.type==="hidden"&&e.getAttribute("name")===d)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function Gb(e,n,l){if(n==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!l||(e=gn(e.nextSibling),e===null))return null;return e}function cm(e,n){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=gn(e.nextSibling),e===null))return null;return e}function Fo(e){return e.data==="$?"||e.data==="$~"}function Xo(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function Vb(e,n){var l=e.ownerDocument;if(e.data==="$~")e._reactRetry=n;else if(e.data!=="$?"||l.readyState!=="loading")n();else{var a=function(){n(),l.removeEventListener("DOMContentLoaded",a)};l.addEventListener("DOMContentLoaded",a),e._reactRetry=a}}function gn(e){for(;e!=null;e=e.nextSibling){var n=e.nodeType;if(n===1||n===3)break;if(n===8){if(n=e.data,n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"||n==="F!"||n==="F")break;if(n==="/$"||n==="/&")return null}}return e}var Qo=null;function fm(e){e=e.nextSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="/$"||l==="/&"){if(n===0)return gn(e.nextSibling);n--}else l!=="$"&&l!=="$!"&&l!=="$?"&&l!=="$~"&&l!=="&"||n++}e=e.nextSibling}return null}function dm(e){e=e.previousSibling;for(var n=0;e;){if(e.nodeType===8){var l=e.data;if(l==="$"||l==="$!"||l==="$?"||l==="$~"||l==="&"){if(n===0)return e;n--}else l!=="/$"&&l!=="/&"||n++}e=e.previousSibling}return null}function hm(e,n,l){switch(n=au(l),e){case"html":if(e=n.documentElement,!e)throw Error(u(452));return e;case"head":if(e=n.head,!e)throw Error(u(453));return e;case"body":if(e=n.body,!e)throw Error(u(454));return e;default:throw Error(u(451))}}function Ur(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);$u(e)}var xn=new Map,pm=new Set;function uu(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var tl=Q.d;Q.d={f:Fb,r:Xb,D:Qb,C:$b,L:Zb,m:Kb,X:Pb,S:Jb,M:Wb};function Fb(){var e=tl.f(),n=Pa();return e||n}function Xb(e){var n=ci(e);n!==null&&n.tag===5&&n.type==="form"?zh(n):tl.r(e)}var Yi=typeof document>"u"?null:document;function mm(e,n,l){var a=Yi;if(a&&typeof n=="string"&&n){var s=on(n);s='link[rel="'+e+'"][href="'+s+'"]',typeof l=="string"&&(s+='[crossorigin="'+l+'"]'),pm.has(s)||(pm.add(s),e={rel:e,crossOrigin:l,href:n},a.querySelector(s)===null&&(n=a.createElement("link"),Tt(n,"link",e),kt(n),a.head.appendChild(n)))}}function Qb(e){tl.D(e),mm("dns-prefetch",e,null)}function $b(e,n){tl.C(e,n),mm("preconnect",e,n)}function Zb(e,n,l){tl.L(e,n,l);var a=Yi;if(a&&e&&n){var s='link[rel="preload"][as="'+on(n)+'"]';n==="image"&&l&&l.imageSrcSet?(s+='[imagesrcset="'+on(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(s+='[imagesizes="'+on(l.imageSizes)+'"]')):s+='[href="'+on(e)+'"]';var d=s;switch(n){case"style":d=Gi(e);break;case"script":d=Vi(e)}xn.has(d)||(e=x({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),xn.set(d,e),a.querySelector(s)!==null||n==="style"&&a.querySelector(qr(d))||n==="script"&&a.querySelector(Br(d))||(n=a.createElement("link"),Tt(n,"link",e),kt(n),a.head.appendChild(n)))}}function Kb(e,n){tl.m(e,n);var l=Yi;if(l&&e){var a=n&&typeof n.as=="string"?n.as:"script",s='link[rel="modulepreload"][as="'+on(a)+'"][href="'+on(e)+'"]',d=s;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":d=Vi(e)}if(!xn.has(d)&&(e=x({rel:"modulepreload",href:e},n),xn.set(d,e),l.querySelector(s)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Br(d)))return}a=l.createElement("link"),Tt(a,"link",e),kt(a),l.head.appendChild(a)}}}function Jb(e,n,l){tl.S(e,n,l);var a=Yi;if(a&&e){var s=fi(a).hoistableStyles,d=Gi(e);n=n||"default";var y=s.get(d);if(!y){var k={loading:0,preload:null};if(y=a.querySelector(qr(d)))k.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},l),(l=xn.get(d))&&$o(e,l);var A=y=a.createElement("link");kt(A),Tt(A,"link",e),A._p=new Promise(function(B,X){A.onload=B,A.onerror=X}),A.addEventListener("load",function(){k.loading|=1}),A.addEventListener("error",function(){k.loading|=2}),k.loading|=4,su(y,n,a)}y={type:"stylesheet",instance:y,count:1,state:k},s.set(d,y)}}}function Pb(e,n){tl.X(e,n);var l=Yi;if(l&&e){var a=fi(l).hoistableScripts,s=Vi(e),d=a.get(s);d||(d=l.querySelector(Br(s)),d||(e=x({src:e,async:!0},n),(n=xn.get(s))&&Zo(e,n),d=l.createElement("script"),kt(d),Tt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},a.set(s,d))}}function Wb(e,n){tl.M(e,n);var l=Yi;if(l&&e){var a=fi(l).hoistableScripts,s=Vi(e),d=a.get(s);d||(d=l.querySelector(Br(s)),d||(e=x({src:e,async:!0,type:"module"},n),(n=xn.get(s))&&Zo(e,n),d=l.createElement("script"),kt(d),Tt(d,"link",e),l.head.appendChild(d)),d={type:"script",instance:d,count:1,state:null},a.set(s,d))}}function gm(e,n,l,a){var s=(s=he.current)?uu(s):null;if(!s)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Gi(l.href),l=fi(s).hoistableStyles,a=l.get(n),a||(a={type:"style",instance:null,count:0,state:null},l.set(n,a)),a):{type:"void",instance:null,count:0,state:null};case"link":if(l.rel==="stylesheet"&&typeof l.href=="string"&&typeof l.precedence=="string"){e=Gi(l.href);var d=fi(s).hoistableStyles,y=d.get(e);if(y||(s=s.ownerDocument||s,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},d.set(e,y),(d=s.querySelector(qr(e)))&&!d._p&&(y.instance=d,y.state.loading=5),xn.has(e)||(l={rel:"preload",as:"style",href:l.href,crossOrigin:l.crossOrigin,integrity:l.integrity,media:l.media,hrefLang:l.hrefLang,referrerPolicy:l.referrerPolicy},xn.set(e,l),d||e0(s,e,l,y.state))),n&&a===null)throw Error(u(528,""));return y}if(n&&a!==null)throw Error(u(529,""));return null;case"script":return n=l.async,l=l.src,typeof l=="string"&&n&&typeof n!="function"&&typeof n!="symbol"?(n=Vi(l),l=fi(s).hoistableScripts,a=l.get(n),a||(a={type:"script",instance:null,count:0,state:null},l.set(n,a)),a):{type:"void",instance:null,count:0,state:null};default:throw Error(u(444,e))}}function Gi(e){return'href="'+on(e)+'"'}function qr(e){return'link[rel="stylesheet"]['+e+"]"}function xm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function e0(e,n,l,a){e.querySelector('link[rel="preload"][as="style"]['+n+"]")?a.loading=1:(n=e.createElement("link"),a.preload=n,n.addEventListener("load",function(){return a.loading|=1}),n.addEventListener("error",function(){return a.loading|=2}),Tt(n,"link",l),kt(n),e.head.appendChild(n))}function Vi(e){return'[src="'+on(e)+'"]'}function Br(e){return"script[async]"+e}function ym(e,n,l){if(n.count++,n.instance===null)switch(n.type){case"style":var a=e.querySelector('style[data-href~="'+on(l.href)+'"]');if(a)return n.instance=a,kt(a),a;var s=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),kt(a),Tt(a,"style",s),su(a,l.precedence,e),n.instance=a;case"stylesheet":s=Gi(l.href);var d=e.querySelector(qr(s));if(d)return n.state.loading|=4,n.instance=d,kt(d),d;a=xm(l),(s=xn.get(s))&&$o(a,s),d=(e.ownerDocument||e).createElement("link"),kt(d);var y=d;return y._p=new Promise(function(k,A){y.onload=k,y.onerror=A}),Tt(d,"link",a),n.state.loading|=4,su(d,l.precedence,e),n.instance=d;case"script":return d=Vi(l.src),(s=e.querySelector(Br(d)))?(n.instance=s,kt(s),s):(a=l,(s=xn.get(d))&&(a=x({},l),Zo(a,s)),e=e.ownerDocument||e,s=e.createElement("script"),kt(s),Tt(s,"link",a),e.head.appendChild(s),n.instance=s);case"void":return null;default:throw Error(u(443,n.type))}else n.type==="stylesheet"&&(n.state.loading&4)===0&&(a=n.instance,n.state.loading|=4,su(a,l.precedence,e));return n.instance}function su(e,n,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),s=a.length?a[a.length-1]:null,d=s,y=0;y<a.length;y++){var k=a[y];if(k.dataset.precedence===n)d=k;else if(d!==s)break}d?d.parentNode.insertBefore(e,d.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function $o(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Zo(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var ou=null;function bm(e,n,l){if(ou===null){var a=new Map,s=ou=new Map;s.set(l,a)}else s=ou,a=s.get(l),a||(a=new Map,s.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),s=0;s<l.length;s++){var d=l[s];if(!(d[tr]||d[Nt]||e==="link"&&d.getAttribute("rel")==="stylesheet")&&d.namespaceURI!=="http://www.w3.org/2000/svg"){var y=d.getAttribute(n)||"";y=e+y;var k=a.get(y);k?k.push(d):a.set(y,[d])}}return a}function vm(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function t0(e,n,l){if(l===1||n.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof n.precedence!="string"||typeof n.href!="string"||n.href==="")break;return!0;case"link":if(typeof n.rel!="string"||typeof n.href!="string"||n.href===""||n.onLoad||n.onError)break;return n.rel==="stylesheet"?(e=n.disabled,typeof n.precedence=="string"&&e==null):!0;case"script":if(n.async&&typeof n.async!="function"&&typeof n.async!="symbol"&&!n.onLoad&&!n.onError&&n.src&&typeof n.src=="string")return!0}return!1}function Sm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function n0(e,n,l,a){if(l.type==="stylesheet"&&(typeof a.media!="string"||matchMedia(a.media).matches!==!1)&&(l.state.loading&4)===0){if(l.instance===null){var s=Gi(a.href),d=n.querySelector(qr(s));if(d){n=d._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=cu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=d,kt(d);return}d=n.ownerDocument||n,a=xm(a),(s=xn.get(s))&&$o(a,s),d=d.createElement("link"),kt(d);var y=d;y._p=new Promise(function(k,A){y.onload=k,y.onerror=A}),Tt(d,"link",a),l.instance=d}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=cu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var Ko=0;function l0(e,n){return e.stylesheets&&e.count===0&&du(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&du(e,e.stylesheets),e.unsuspend){var d=e.unsuspend;e.unsuspend=null,d()}},6e4+n);0<e.imgBytes&&Ko===0&&(Ko=62500*Ub());var s=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&du(e,e.stylesheets),e.unsuspend)){var d=e.unsuspend;e.unsuspend=null,d()}},(e.imgBytes>Ko?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(s)}}:null}function cu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)du(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var fu=null;function du(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,fu=new Map,n.forEach(i0,e),fu=null,cu.call(e))}function i0(e,n){if(!(n.state.loading&4)){var l=fu.get(e);if(l)var a=l.get(null);else{l=new Map,fu.set(e,l);for(var s=e.querySelectorAll("link[data-precedence],style[data-precedence]"),d=0;d<s.length;d++){var y=s[d];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(l.set(y.dataset.precedence,y),a=y)}a&&l.set(null,a)}s=n.instance,y=s.getAttribute("data-precedence"),d=l.get(y)||a,d===a&&l.set(null,s),l.set(y,s),this.count++,a=cu.bind(this),s.addEventListener("load",a),s.addEventListener("error",a),d?d.parentNode.insertBefore(s,d.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(s,e.firstChild)),n.state.loading|=4}}var Hr={$$typeof:R,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function r0(e,n,l,a,s,d,y,k,A){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=Tn(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Tn(0),this.hiddenUpdates=Tn(null),this.identifierPrefix=a,this.onUncaughtError=s,this.onCaughtError=d,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=A,this.incompleteTransitions=new Map}function km(e,n,l,a,s,d,y,k,A,B,X,Z){return e=new r0(e,n,l,y,A,B,X,Z,k),n=1,d===!0&&(n|=24),d=Zt(3,null,null,n),e.current=d,d.stateNode=e,n=Cs(),n.refCount++,e.pooledCache=n,n.refCount++,d.memoizedState={element:a,isDehydrated:l,cache:n},Ds(d),e}function wm(e){return e?(e=Si,e):Si}function jm(e,n,l,a,s,d){s=wm(s),a.context===null?a.context=s:a.pendingContext=s,a=pl(n),a.payload={element:l},d=d===void 0?null:d,d!==null&&(a.callback=d),l=ml(e,a,n),l!==null&&(Ft(l,e,n),yr(l,e,n))}function Nm(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function Jo(e,n){Nm(e,n),(e=e.alternate)&&Nm(e,n)}function Em(e){if(e.tag===13||e.tag===31){var n=Hl(e,67108864);n!==null&&Ft(n,e,67108864),Jo(e,67108864)}}function _m(e){if(e.tag===13||e.tag===31){var n=en();n=Fu(n);var l=Hl(e,n);l!==null&&Ft(l,e,n),Jo(e,n)}}var hu=!0;function a0(e,n,l,a){var s=D.T;D.T=null;var d=Q.p;try{Q.p=2,Po(e,n,l,a)}finally{Q.p=d,D.T=s}}function u0(e,n,l,a){var s=D.T;D.T=null;var d=Q.p;try{Q.p=8,Po(e,n,l,a)}finally{Q.p=d,D.T=s}}function Po(e,n,l,a){if(hu){var s=Wo(a);if(s===null)qo(e,n,a,pu,l),Tm(e,a);else if(o0(s,e,n,l,a))a.stopPropagation();else if(Tm(e,a),n&4&&-1<s0.indexOf(e)){for(;s!==null;){var d=ci(s);if(d!==null)switch(d.tag){case 3:if(d=d.stateNode,d.current.memoizedState.isDehydrated){var y=Un(d.pendingLanes);if(y!==0){var k=d;for(k.pendingLanes|=2,k.entangledLanes|=2;y;){var A=1<<31-Fe(y);k.entanglements[1]|=A,y&=~A}Rn(d),(Ve&6)===0&&(Ka=rt()+500,Mr(0))}}break;case 31:case 13:k=Hl(d,2),k!==null&&Ft(k,d,2),Pa(),Jo(d,2)}if(d=Wo(a),d===null&&qo(e,n,a,pu,l),d===s)break;s=d}s!==null&&a.stopPropagation()}else qo(e,n,a,null,l)}}function Wo(e){return e=es(e),ec(e)}var pu=null;function ec(e){if(pu=null,e=oi(e),e!==null){var n=c(e);if(n===null)e=null;else{var l=n.tag;if(l===13){if(e=f(n),e!==null)return e;e=null}else if(l===31){if(e=p(n),e!==null)return e;e=null}else if(l===3){if(n.stateNode.current.memoizedState.isDehydrated)return n.tag===3?n.stateNode.containerInfo:null;e=null}else n!==e&&(e=null)}}return pu=e,null}function Cm(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(Cn()){case F:return 2;case re:return 8;case ve:case _e:return 32;case He:return 268435456;default:return 32}default:return 32}}var tc=!1,El=null,_l=null,Cl=null,Ir=new Map,Yr=new Map,Tl=[],s0="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 Tm(e,n){switch(e){case"focusin":case"focusout":El=null;break;case"dragenter":case"dragleave":_l=null;break;case"mouseover":case"mouseout":Cl=null;break;case"pointerover":case"pointerout":Ir.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Yr.delete(n.pointerId)}}function Gr(e,n,l,a,s,d){return e===null||e.nativeEvent!==d?(e={blockedOn:n,domEventName:l,eventSystemFlags:a,nativeEvent:d,targetContainers:[s]},n!==null&&(n=ci(n),n!==null&&Em(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,s!==null&&n.indexOf(s)===-1&&n.push(s),e)}function o0(e,n,l,a,s){switch(n){case"focusin":return El=Gr(El,e,n,l,a,s),!0;case"dragenter":return _l=Gr(_l,e,n,l,a,s),!0;case"mouseover":return Cl=Gr(Cl,e,n,l,a,s),!0;case"pointerover":var d=s.pointerId;return Ir.set(d,Gr(Ir.get(d)||null,e,n,l,a,s)),!0;case"gotpointercapture":return d=s.pointerId,Yr.set(d,Gr(Yr.get(d)||null,e,n,l,a,s)),!0}return!1}function Am(e){var n=oi(e.target);if(n!==null){var l=c(n);if(l!==null){if(n=l.tag,n===13){if(n=f(l),n!==null){e.blockedOn=n,Vf(e.priority,function(){_m(l)});return}}else if(n===31){if(n=p(l),n!==null){e.blockedOn=n,Vf(e.priority,function(){_m(l)});return}}else if(n===3&&l.stateNode.current.memoizedState.isDehydrated){e.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}e.blockedOn=null}function mu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=Wo(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);Wu=a,l.target.dispatchEvent(a),Wu=null}else return n=ci(l),n!==null&&Em(n),e.blockedOn=l,!1;n.shift()}return!0}function zm(e,n,l){mu(e)&&l.delete(n)}function c0(){tc=!1,El!==null&&mu(El)&&(El=null),_l!==null&&mu(_l)&&(_l=null),Cl!==null&&mu(Cl)&&(Cl=null),Ir.forEach(zm),Yr.forEach(zm)}function gu(e,n){e.blockedOn===n&&(e.blockedOn=null,tc||(tc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,c0)))}var xu=null;function Dm(e){xu!==e&&(xu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){xu===e&&(xu=null);for(var n=0;n<e.length;n+=3){var l=e[n],a=e[n+1],s=e[n+2];if(typeof a!="function"){if(ec(a||l)===null)continue;break}var d=ci(l);d!==null&&(e.splice(n,3),n-=3,Ps(d,{pending:!0,data:s,method:l.method,action:a},a,s))}}))}function Fi(e){function n(A){return gu(A,e)}El!==null&&gu(El,e),_l!==null&&gu(_l,e),Cl!==null&&gu(Cl,e),Ir.forEach(n),Yr.forEach(n);for(var l=0;l<Tl.length;l++){var a=Tl[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Tl.length&&(l=Tl[0],l.blockedOn===null);)Am(l),l.blockedOn===null&&Tl.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var s=l[a],d=l[a+1],y=s[Bt]||null;if(typeof d=="function")y||Dm(l);else if(y){var k=null;if(d&&d.hasAttribute("formAction")){if(s=d,y=d[Bt]||null)k=y.formAction;else if(ec(s)!==null)continue}else k=y.action;typeof k=="function"?l[a+1]=k:(l.splice(a,3),a-=3),Dm(l)}}}function Rm(){function e(d){d.canIntercept&&d.info==="react-transition"&&d.intercept({handler:function(){return new Promise(function(y){return s=y})},focusReset:"manual",scroll:"manual"})}function n(){s!==null&&(s(),s=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var d=navigation.currentEntry;d&&d.url!=null&&navigation.navigate(d.url,{state:d.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,s=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",n),navigation.addEventListener("navigateerror",n),setTimeout(l,100),function(){a=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",n),navigation.removeEventListener("navigateerror",n),s!==null&&(s(),s=null)}}}function nc(e){this._internalRoot=e}yu.prototype.render=nc.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(u(409));var l=n.current,a=en();jm(l,a,e,n,null,null)},yu.prototype.unmount=nc.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;jm(e.current,2,null,e,null,null),Pa(),n[si]=null}};function yu(e){this._internalRoot=e}yu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Gf();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Tl.length&&n!==0&&n<Tl[l].priority;l++);Tl.splice(l,0,e),l===0&&Am(e)}};var Mm=i.version;if(Mm!=="19.2.8")throw Error(u(527,Mm,"19.2.8"));Q.findDOMNode=function(e){var n=e._reactInternals;if(n===void 0)throw typeof e.render=="function"?Error(u(188)):(e=Object.keys(e).join(","),Error(u(268,e)));return e=m(n),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var f0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var bu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bu.isDisabled&&bu.supportsFiber)try{vt=bu.inject(f0),at=bu}catch{}}return Fr.createRoot=function(e,n){if(!o(e))throw Error(u(299));var l=!1,a="",s=Ih,d=Yh,y=Gh;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(s=n.onUncaughtError),n.onCaughtError!==void 0&&(d=n.onCaughtError),n.onRecoverableError!==void 0&&(y=n.onRecoverableError)),n=km(e,1,!1,null,null,l,a,null,s,d,y,Rm),e[si]=n.current,Uo(e),new nc(n)},Fr.hydrateRoot=function(e,n,l){if(!o(e))throw Error(u(299));var a=!1,s="",d=Ih,y=Yh,k=Gh,A=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(s=l.identifierPrefix),l.onUncaughtError!==void 0&&(d=l.onUncaughtError),l.onCaughtError!==void 0&&(y=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(A=l.formState)),n=km(e,1,!0,n,l??null,a,s,A,d,y,k,Rm),n.context=wm(null),l=n.current,a=en(),a=Fu(a),s=pl(a),s.callback=null,ml(l,s,a),l=a,n.current.lanes=l,er(n,l),Rn(n),e[si]=n.current,Uo(e),new yu(n)},Fr.version="19.2.8",Fr}var Vm;function S0(){if(Vm)return rc.exports;Vm=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(i){console.error(i)}}return t(),rc.exports=v0(),rc.exports}var k0=S0();const w0=Ou(k0),j0=Object.freeze(["not_available","stopping","in_progress","prompt_pending","unknown_session","unreadable","start_failed","limit","failed"]),N0=Object.freeze(["not_available","stopping","unknown_session","live_elsewhere","running","failed"]),E0="owner",bx="agent";function qe(t){return typeof t=="object"&&!!t&&!Array.isArray(t)}const ke=t=>typeof t=="string",Je=t=>typeof t=="string"&&t.length>0,Dl=t=>typeof t=="boolean",Tu=t=>typeof t=="number"&&Number.isFinite(t),oc=t=>Number.isSafeInteger(t)&&t>=0,jt=t=>i=>i===void 0||t(i),Wl=t=>Array.isArray(t)&&t.every(qe),Fm=t=>t===null||qe(t),jn=t=>i=>typeof i=="string"&&t.includes(i),_0={user:!0,"agent-wakeup":!0,peer:!0,external:!0},C0=t=>qe(t)&&ke(t.id)&&ke(t.timestamp)&&ke(t.category)&&ke(t.type),T0=t=>Array.isArray(t)&&t.every(C0),A0=t=>qe(t)&&ke(t.name)&&ke(t.description)&&ke(t.definedIn),z0=t=>Array.isArray(t)&&t.every(A0),D0=["cancel","close","send"],Xm={none:{},several:{message:ke},stopped:{loopId:Je,message:jt(ke)},failed:{loopId:jt(Je),message:ke}},R0=t=>{if(!qe(t)||!ke(t.kind))return!1;let i=t.kind;if(!Object.prototype.hasOwnProperty.call(Xm,i))return!1;let r=Xm[i];return Object.entries(r).every(([u,o])=>o(t[u]))};function ff(t){return i=>{if(!qe(i)||!ke(i.kind))return!1;let r=Object.prototype.hasOwnProperty.call(t,i.kind)?t[i.kind]:void 0;return r!==void 0&&Object.entries(r).every(([u,o])=>o(i[u]))}}const M0=["Added","Modified","Deleted","Renamed","Copied","Untracked","Conflicted"],O0=t=>qe(t)&&Je(t.path)&&jn(M0)(t.status)&&jt(Je)(t.renamedFrom)&&jt(Tu)(t.added)&&jt(Tu)(t.removed),L0=ff({status:{branch:jt(ke),unborn:Dl,files:t=>Array.isArray(t)&&t.every(O0),truncated:Dl},"not-a-repository":{},failed:{message:ke}}),U0=["add","remove","context","hunk"],q0=t=>qe(t)&&jn(U0)(t.type)&&ke(t.text)&&Tu(t.lineNumber),B0=ff({diff:{diffLines:t=>Array.isArray(t)&&t.every(q0),truncated:Dl},"not-a-repository":{},"outside-workspace":{},failed:{message:ke}}),H0=ff({memory:{content:ke,path:Je,truncated:Dl},unavailable:{message:ke}}),nl={driverId:jt(ke)},I0={text_delta:{delta:ke,...nl},user_message:{content:ke,...nl},tool_start:{state:qe,...nl},tool_end:{state:qe,...nl},thinking:{isThinking:Dl,...nl},complete:{result:qe,...nl},interrupted:{result:qe,...nl},error:{message:ke,code:jt(jn(["auth","rate_limit","model_unavailable","network","provider"])),provider:jt(ke),retryAfterSeconds:jt(Tu),model:jt(ke),...nl},command_result:{name:ke,message:ke,success:Dl,requestId:jt(ke)},messages:{messages:Wl,display:jt(Wl),...nl},history:{startIndex:oc,total:oc,entries:T0},context:{state:qe},history_changed:{},turn_source:{source:jn(Object.keys(_0))},commands:{commands:Wl,skills:Wl},session_status:{status:qe},model_list:{requestId:Je,groups:Wl,currentProfile:jt(ke),currentModel:ke},agent_definitions:{requestId:Je,agents:z0,current:Je},sessions:{requestId:Je,listing:qe},sessions_error:{requestId:Je,code:jn(["not_available","list_failed"]),message:ke},session_switched:{event:qe},session_change_failed:{code:jn(j0),message:ke,requestId:jt(ke)},session_renamed_in_list:{requestId:Je,sessionId:ke,name:ke},session_rename_failed:{requestId:Je,message:ke},session_deleted:{requestId:Je,sessionId:ke},session_delete_failed:{requestId:Je,code:jn(N0),message:ke},usage_report:{report:qe},personal_usage_report:{requestId:Je,report:qe},personal_usage_report_error:{requestId:Je,code:jn(["not_available","report_failed"]),message:ke},stored_session_usage_report:{requestId:Je,sessionId:Je,report:qe},stored_session_usage_report_error:{requestId:Je,sessionId:Je,code:jn(["not_available","report_failed"]),message:ke},executing:{executing:Dl},pending:{pending:t=>t===null||ke(t),pendingCount:jt(oc)},execution_workspace_event:{snapshot:qe},execution_detail:{requestId:Je,page:qe},execution_detail_error:{requestId:Je,message:ke},waiting_loop_stop:{requestId:Je,outcome:R0},project_status:{requestId:Je,result:L0},project_diff:{requestId:Je,result:B0},project_memory:{requestId:Je,result:H0},background_task_event:{event:qe},background_job_group_event:{event:qe},plan_event:{event:qe},context_file_refreshed:{event:qe},branch_event:{event:qe},background_tasks:{tasks:Wl},background_task:{taskId:ke,task:Fm},background_job_groups:{groups:Wl},background_job_group:{groupId:ke,group:Fm},background_task_log:{taskId:ke,page:qe},permission_request:{event:qe},ask_request:{event:qe},prompt_resolved:{event:qe},ui_intent:{event:qe},session_renamed:{event:qe},history_cleared:{},background_task_control_result:{action:jn(D0),taskId:ke,success:Dl,message:jt(ke)},protocol_error:{message:ke,requestId:jt(ke)},resume_gap:{},settings:{requestId:Je,settings:qe},settings_error:{requestId:Je,code:jn(["not_available","invalid","refused","update_failed"]),message:ke}};function Y0(t,i,r){if(!qe(t))return{ok:!1,reason:"message must be a JSON object"};let u=t.type;if(!ke(u))return{ok:!1,reason:"message type must be a string"};let o=Object.prototype.hasOwnProperty.call(i,u)?i[u]:void 0;if(o===void 0)return{ok:!1,reason:`Unknown message type: ${u}`};for(let[c,f]of Object.entries(o))if(!f(t[c]))return{ok:!1,reason:r(c)};return{ok:!0,message:t}}function G0(t){return Y0(t,I0,i=>`${i} has an invalid shape`)}function V0(t,i){if(t.length>4194304)return{ok:!1,reason:"Frame too large"};let r;try{r=JSON.parse(t)}catch{return{ok:!1,reason:"Invalid JSON"}}return i(r)}function F0(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const X0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Q0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,$0={};function Qm(t,i){return($0.jsx?Q0:X0).test(t)}const Z0=/[ \t\n\f\r]/g;function K0(t){return typeof t=="object"?t.type==="text"?$m(t.value):!1:$m(t)}function $m(t){return t.replace(Z0,"")===""}class la{constructor(i,r,u){this.normal=r,this.property=i,u&&(this.space=u)}}la.prototype.normal={};la.prototype.property={};la.prototype.space=void 0;function vx(t,i){const r={},u={};for(const o of t)Object.assign(r,o.property),Object.assign(u,o.normal);return new la(r,u,i)}function Gc(t){return t.toLowerCase()}class Qt{constructor(i,r){this.attribute=r,this.property=i}}Qt.prototype.attribute="";Qt.prototype.booleanish=!1;Qt.prototype.boolean=!1;Qt.prototype.commaOrSpaceSeparated=!1;Qt.prototype.commaSeparated=!1;Qt.prototype.defined=!1;Qt.prototype.mustUseProperty=!1;Qt.prototype.number=!1;Qt.prototype.overloadedBoolean=!1;Qt.prototype.property="";Qt.prototype.spaceSeparated=!1;Qt.prototype.space=void 0;let J0=0;const we=ri(),xt=ri(),Vc=ri(),te=ri(),We=ri(),ni=ri(),tn=ri();function ri(){return 2**++J0}const Fc=Object.freeze(Object.defineProperty({__proto__:null,boolean:we,booleanish:xt,commaOrSpaceSeparated:tn,commaSeparated:ni,number:te,overloadedBoolean:Vc,spaceSeparated:We},Symbol.toStringTag,{value:"Module"})),cc=Object.keys(Fc);class df extends Qt{constructor(i,r,u,o){let c=-1;if(super(i,r),Zm(this,"space",o),typeof u=="number")for(;++c<cc.length;){const f=cc[c];Zm(this,cc[c],(u&Fc[f])===Fc[f])}}}df.prototype.defined=!0;function Zm(t,i,r){r&&(t[i]=r)}function Ji(t){const i={},r={};for(const[u,o]of Object.entries(t.properties)){const c=new df(u,t.transform(t.attributes||{},u),o,t.space);t.mustUseProperty&&t.mustUseProperty.includes(u)&&(c.mustUseProperty=!0),i[u]=c,r[Gc(u)]=u,r[Gc(c.attribute)]=u}return new la(i,r,t.space)}const Sx=Ji({properties:{ariaActiveDescendant:null,ariaAtomic:xt,ariaAutoComplete:null,ariaBusy:xt,ariaChecked:xt,ariaColCount:te,ariaColIndex:te,ariaColSpan:te,ariaControls:We,ariaCurrent:null,ariaDescribedBy:We,ariaDetails:null,ariaDisabled:xt,ariaDropEffect:We,ariaErrorMessage:null,ariaExpanded:xt,ariaFlowTo:We,ariaGrabbed:xt,ariaHasPopup:null,ariaHidden:xt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:We,ariaLevel:te,ariaLive:null,ariaModal:xt,ariaMultiLine:xt,ariaMultiSelectable:xt,ariaOrientation:null,ariaOwns:We,ariaPlaceholder:null,ariaPosInSet:te,ariaPressed:xt,ariaReadOnly:xt,ariaRelevant:null,ariaRequired:xt,ariaRoleDescription:We,ariaRowCount:te,ariaRowIndex:te,ariaRowSpan:te,ariaSelected:xt,ariaSetSize:te,ariaSort:null,ariaValueMax:te,ariaValueMin:te,ariaValueNow:te,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function kx(t,i){return i in t?t[i]:i}function wx(t,i){return kx(t,i.toLowerCase())}const P0=Ji({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ni,acceptCharset:We,accessKey:We,action:null,allow:null,allowFullScreen:we,allowPaymentRequest:we,allowUserMedia:we,alpha:we,alt:null,as:null,async:we,autoCapitalize:null,autoComplete:We,autoFocus:we,autoPlay:we,blocking:We,capture:null,charSet:null,checked:we,cite:null,className:We,closedBy:null,colorSpace:null,cols:te,colSpan:te,command:null,commandFor:null,content:null,contentEditable:xt,controls:we,controlsList:We,coords:te|ni,crossOrigin:null,data:null,dateTime:null,decoding:null,default:we,defer:we,dir:null,dirName:null,disabled:we,download:Vc,draggable:xt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:we,formTarget:null,headers:We,height:te,hidden:Vc,high:te,href:null,hrefLang:null,htmlFor:We,httpEquiv:We,id:null,imageSizes:null,imageSrcSet:null,inert:we,inputMode:null,integrity:null,is:null,isMap:we,itemId:null,itemProp:We,itemRef:We,itemScope:we,itemType:We,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:we,low:te,manifest:null,max:null,maxLength:te,media:null,method:null,min:null,minLength:te,multiple:we,muted:we,name:null,nonce:null,noModule:we,noValidate:we,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:we,optimum:te,pattern:null,ping:We,placeholder:null,playsInline:we,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:we,referrerPolicy:null,rel:We,required:we,reversed:we,rows:te,rowSpan:te,sandbox:We,scope:null,scoped:we,seamless:we,selected:we,shadowRootClonable:we,shadowRootCustomElementRegistry:we,shadowRootDelegatesFocus:we,shadowRootMode:null,shadowRootSerializable:we,shape:null,size:te,sizes:null,slot:null,span:te,spellCheck:xt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:te,step:null,style:null,tabIndex:te,target:null,title:null,translate:null,type:null,typeMustMatch:we,useMap:null,value:xt,width:te,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:We,axis:null,background:null,bgColor:null,border:te,borderColor:null,bottomMargin:te,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:we,declare:we,event:null,face:null,frame:null,frameBorder:null,hSpace:te,leftMargin:te,link:null,longDesc:null,lowSrc:null,marginHeight:te,marginWidth:te,noResize:we,noHref:we,noShade:we,noWrap:we,object:null,profile:null,prompt:null,rev:null,rightMargin:te,rules:null,scheme:null,scrolling:xt,standby:null,summary:null,text:null,topMargin:te,valueType:null,version:null,vAlign:null,vLink:null,vSpace:te,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:we,disablePictureInPicture:we,disableRemotePlayback:we,exportParts:ni,part:We,prefix:null,property:null,results:te,security:null,unselectable:null},space:"html",transform:wx}),W0=Ji({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",maskType:"mask-type",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:tn,accentHeight:te,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:te,amplitude:te,arabicForm:null,ascent:te,attributeName:null,attributeType:null,azimuth:te,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:te,by:null,calcMode:null,capHeight:te,className:We,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:te,diffuseConstant:te,direction:null,display:null,dur:null,divisor:te,dominantBaseline:null,download:we,dx:null,dy:null,edgeMode:null,editable:null,elevation:te,enableBackground:null,end:null,event:null,exponent:te,externalResourcesRequired:null,fill:null,fillOpacity:te,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:ni,g2:ni,glyphName:ni,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:te,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:te,horizOriginX:te,horizOriginY:te,id:null,ideographic:te,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:te,k:te,k1:te,k2:te,k3:te,k4:te,kernelMatrix:tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:te,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:te,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:te,overlineThickness:te,paintOrder:null,panose1:null,path:null,pathLength:te,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:We,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:te,pointsAtY:te,pointsAtZ:te,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:tn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:tn,rev:tn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:tn,requiredFeatures:tn,requiredFonts:tn,requiredFormats:tn,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:te,specularExponent:te,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:te,strikethroughThickness:te,string:null,stroke:null,strokeDashArray:tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:te,strokeOpacity:te,strokeWidth:null,style:null,surfaceScale:te,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tn,tabIndex:te,tableValues:null,target:null,targetX:te,targetY:te,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:tn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:te,underlineThickness:te,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:te,values:null,vAlphabetic:te,vMathematical:te,vectorEffect:null,vHanging:te,vIdeographic:te,version:null,vertAdvY:te,vertOriginX:te,vertOriginY:te,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:te,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:kx}),jx=Ji({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(t,i){return"xlink:"+i.slice(5).toLowerCase()}}),Nx=Ji({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:wx}),Ex=Ji({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),ev={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"},tv=/[A-Z]/g,Km=/-[a-z]/g,nv=/^data[-\w.:]+$/i;function lv(t,i){const r=Gc(i);let u=i,o=Qt;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&nv.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(Km,rv);u="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!Km.test(c)){let f=c.replace(tv,iv);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}o=df}return new o(u,i)}function iv(t){return"-"+t.toLowerCase()}function rv(t){return t.charAt(1).toUpperCase()}const av=vx([Sx,P0,jx,Nx,Ex],"html"),hf=vx([Sx,W0,jx,Nx,Ex],"svg");function uv(t){return t.join(" ").trim()}var Xi={},fc,Jm;function sv(){if(Jm)return fc;Jm=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,p=/^\s+|\s+$/g,g=`
|
|
50
|
-
`,m="/",b="*",x="",S="comment",v="declaration";function N(L,E){if(typeof L!="string")throw new TypeError("First argument must be a string");if(!L)return[];E=E||{};var V=1,R=1;function W(oe){var P=oe.match(i);P&&(V+=P.length);var D=oe.lastIndexOf(g);R=~D?oe.length-D:R+oe.length}function ie(){var oe={line:V,column:R};return function(P){return P.position=new M(oe),J(),P}}function M(oe){this.start=oe,this.end={line:V,column:R},this.source=E.source}M.prototype.content=L;function Y(oe){var P=new Error(E.source+":"+V+":"+R+": "+oe);if(P.reason=oe,P.filename=E.source,P.line=V,P.column=R,P.source=L,!E.silent)throw P}function ue(oe){var P=oe.exec(L);if(P){var D=P[0];return W(D),L=L.slice(D.length),P}}function J(){ue(r)}function U(oe){var P;for(oe=oe||[];P=ne();)P!==!1&&oe.push(P);return oe}function ne(){var oe=ie();if(!(m!=L.charAt(0)||b!=L.charAt(1))){for(var P=2;x!=L.charAt(P)&&(b!=L.charAt(P)||m!=L.charAt(P+1));)++P;if(P+=2,x===L.charAt(P-1))return Y("End of comment missing");var D=L.slice(2,P-2);return R+=2,W(D),L=L.slice(P),R+=2,oe({type:S,comment:D})}}function le(){var oe=ie(),P=ue(u);if(P){if(ne(),!ue(o))return Y("property missing ':'");var D=ue(c),Q=oe({type:v,property:T(P[0].replace(t,x)),value:D?T(D[0].replace(t,x)):x});return ue(f),Q}}function xe(){var oe=[];U(oe);for(var P;P=le();)P!==!1&&(oe.push(P),U(oe));return oe}return J(),xe()}function T(L){return L?L.replace(p,x):x}return fc=N,fc}var Pm;function ov(){if(Pm)return Xi;Pm=1;var t=Xi&&Xi.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty(Xi,"__esModule",{value:!0}),Xi.default=r;const i=t(sv());function r(u,o){let c=null;if(!u||typeof u!="string")return c;const f=(0,i.default)(u),p=typeof o=="function";return f.forEach(g=>{if(g.type!=="declaration")return;const{property:m,value:b}=g;p?o(m,b,g):b&&(c=c||{},c[m]=b)}),c}return Xi}var Xr={},Wm;function cv(){if(Wm)return Xr;Wm=1,Object.defineProperty(Xr,"__esModule",{value:!0}),Xr.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,c=function(m){return!m||r.test(m)||t.test(m)},f=function(m,b){return b.toUpperCase()},p=function(m,b){return"".concat(b,"-")},g=function(m,b){return b===void 0&&(b={}),c(m)?m:(m=m.toLowerCase(),b.reactCompat?m=m.replace(o,p):m=m.replace(u,p),m.replace(i,f))};return Xr.camelCase=g,Xr}var Qr,eg;function fv(){if(eg)return Qr;eg=1;var t=Qr&&Qr.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},i=t(ov()),r=cv();function u(o,c){var f={};return!o||typeof o!="string"||(0,i.default)(o,function(p,g){p&&g&&(f[(0,r.camelCase)(p,c)]=g)}),f}return u.default=u,Qr=u,Qr}var dv=fv();const hv=Ou(dv),_x=Cx("end"),pf=Cx("start");function Cx(t){return i;function i(r){const u=r&&r.position&&r.position[t]||{};if(typeof u.line=="number"&&u.line>0&&typeof u.column=="number"&&u.column>0)return{line:u.line,column:u.column,offset:typeof u.offset=="number"&&u.offset>-1?u.offset:void 0}}}function pv(t){const i=pf(t),r=_x(t);if(i&&r)return{start:i,end:r}}function Pr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?tg(t.position):"start"in t||"end"in t?tg(t):"line"in t||"column"in t?Xc(t):""}function Xc(t){return ng(t&&t.line)+":"+ng(t&&t.column)}function tg(t){return Xc(t&&t.start)+"-"+Xc(t&&t.end)}function ng(t){return t&&typeof t=="number"?t:1}class Mt extends Error{constructor(i,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let o="",c={},f=!1;if(r&&("line"in r&&"column"in r?c={place:r}:"start"in r&&"end"in r?c={place:r}:"type"in r?c={ancestors:[r],place:r.position}:c={...r}),typeof i=="string"?o=i:!c.cause&&i&&(f=!0,o=i.message,c.cause=i),!c.ruleId&&!c.source&&typeof u=="string"){const g=u.indexOf(":");g===-1?c.ruleId=u:(c.source=u.slice(0,g),c.ruleId=u.slice(g+1))}if(!c.place&&c.ancestors&&c.ancestors){const g=c.ancestors[c.ancestors.length-1];g&&(c.place=g.position)}const p=c.place&&"start"in c.place?c.place.start:c.place;this.ancestors=c.ancestors||void 0,this.cause=c.cause||void 0,this.column=p?p.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=p?p.line:void 0,this.name=Pr(c.place)||"1:1",this.place=c.place||void 0,this.reason=this.message,this.ruleId=c.ruleId||void 0,this.source=c.source||void 0,this.stack=f&&c.cause&&typeof c.cause.stack=="string"?c.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}Mt.prototype.file="";Mt.prototype.name="";Mt.prototype.reason="";Mt.prototype.message="";Mt.prototype.stack="";Mt.prototype.column=void 0;Mt.prototype.line=void 0;Mt.prototype.ancestors=void 0;Mt.prototype.cause=void 0;Mt.prototype.fatal=void 0;Mt.prototype.place=void 0;Mt.prototype.ruleId=void 0;Mt.prototype.source=void 0;const mf={}.hasOwnProperty,mv=new Map,gv=/[A-Z]/g,xv=new Set(["table","tbody","thead","tfoot","tr"]),yv=new Set(["td","th"]),Tx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function bv(t,i){if(!i||i.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=i.filePath||void 0;let u;if(i.development){if(typeof i.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");u=_v(r,i.jsxDEV)}else{if(typeof i.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof i.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");u=Ev(r,i.jsx,i.jsxs)}const o={Fragment:i.Fragment,ancestors:[],components:i.components||{},create:u,elementAttributeNameCase:i.elementAttributeNameCase||"react",evaluater:i.createEvaluater?i.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:i.ignoreInvalidStyle||!1,passKeys:i.passKeys!==!1,passNode:i.passNode||!1,schema:i.space==="svg"?hf:av,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=Ax(o,t,void 0);return c&&typeof c!="string"?c:o.create(t,o.Fragment,{children:c||void 0},void 0)}function Ax(t,i,r){if(i.type==="element")return vv(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return Sv(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return wv(t,i,r);if(i.type==="mdxjsEsm")return kv(t,i);if(i.type==="root")return jv(t,i,r);if(i.type==="text")return Nv(t,i)}function vv(t,i,r){const u=t.schema;let o=u;i.tagName.toLowerCase()==="svg"&&u.space==="html"&&(o=hf,t.schema=o),t.ancestors.push(i);const c=Dx(t,i.tagName,!1),f=Cv(t,i);let p=xf(t,i);return xv.has(i.tagName)&&(p=p.filter(function(g){return typeof g=="string"?!K0(g):!0})),zx(t,f,c,i),gf(f,p),t.ancestors.pop(),t.schema=u,t.create(i,c,f,r)}function Sv(t,i){if(i.data&&i.data.estree&&t.evaluater){const u=i.data.estree.body[0];return u.type,t.evaluater.evaluateExpression(u.expression)}ta(t,i.position)}function kv(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);ta(t,i.position)}function wv(t,i,r){const u=t.schema;let o=u;i.name==="svg"&&u.space==="html"&&(o=hf,t.schema=o),t.ancestors.push(i);const c=i.name===null?t.Fragment:Dx(t,i.name,!0),f=Tv(t,i),p=xf(t,i);return zx(t,f,c,i),gf(f,p),t.ancestors.pop(),t.schema=u,t.create(i,c,f,r)}function jv(t,i,r){const u={};return gf(u,xf(t,i)),t.create(i,t.Fragment,u,r)}function Nv(t,i){return i.value}function zx(t,i,r,u){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=u)}function gf(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function Ev(t,i,r){return u;function u(o,c,f,p){const m=Array.isArray(f.children)?r:i;return p?m(c,f,p):m(c,f)}}function _v(t,i){return r;function r(u,o,c,f){const p=Array.isArray(c.children),g=pf(u);return i(o,c,f,p,{columnNumber:g?g.column-1:void 0,fileName:t,lineNumber:g?g.line:void 0},void 0)}}function Cv(t,i){const r={};let u,o;for(o in i.properties)if(o!=="children"&&mf.call(i.properties,o)){const c=Av(t,o,i.properties[o]);if(c){const[f,p]=c;t.tableCellAlignToStyle&&f==="align"&&typeof p=="string"&&yv.has(i.tagName)?u=p:r[f]=p}}if(u){const c=r.style||(r.style={});c[t.stylePropertyNameCase==="css"?"text-align":"textAlign"]=u}return r}function Tv(t,i){const r={};for(const u of i.attributes)if(u.type==="mdxJsxExpressionAttribute")if(u.data&&u.data.estree&&t.evaluater){const c=u.data.estree.body[0];c.type;const f=c.expression;f.type;const p=f.properties[0];p.type,Object.assign(r,t.evaluater.evaluateExpression(p.argument))}else ta(t,i.position);else{const o=u.name;let c;if(u.value&&typeof u.value=="object")if(u.value.data&&u.value.data.estree&&t.evaluater){const p=u.value.data.estree.body[0];p.type,c=t.evaluater.evaluateExpression(p.expression)}else ta(t,i.position);else c=u.value===null?!0:u.value;r[o]=c}return r}function xf(t,i){const r=[];let u=-1;const o=t.passKeys?new Map:mv;for(;++u<i.children.length;){const c=i.children[u];let f;if(t.passKeys){const g=c.type==="element"?c.tagName:c.type==="mdxJsxFlowElement"||c.type==="mdxJsxTextElement"?c.name:void 0;if(g){const m=o.get(g)||0;f=g+"-"+m,o.set(g,m+1)}}const p=Ax(t,c,f);p!==void 0&&r.push(p)}return r}function Av(t,i,r){const u=lv(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?F0(r):uv(r)),u.property==="style"){let o=typeof r=="object"?r:zv(t,String(r));return t.stylePropertyNameCase==="css"&&(o=Dv(o)),["style",o]}return[t.elementAttributeNameCase==="react"&&u.space?ev[u.property]||u.property:u.attribute,r]}}function zv(t,i){try{return hv(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const u=r,o=new Mt("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=t.filePath||void 0,o.url=Tx+"#cannot-parse-style-attribute",o}}function Dx(t,i,r){let u;if(!r)u={type:"Literal",value:i};else if(i.includes(".")){const o=i.split(".");let c=-1,f;for(;++c<o.length;){const p=Qm(o[c])?{type:"Identifier",name:o[c]}:{type:"Literal",value:o[c]};f=f?{type:"MemberExpression",object:f,property:p,computed:!!(c&&p.type==="Literal"),optional:!1}:p}u=f}else u=Qm(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(u.type==="Literal"){const o=u.value;return mf.call(t.components,o)?t.components[o]:o}if(t.evaluater)return t.evaluater.evaluateExpression(u);ta(t)}function ta(t,i){const r=new Mt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:t.ancestors,place:i,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=t.filePath||void 0,r.url=Tx+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Dv(t){const i={};let r;for(r in t)mf.call(t,r)&&(i[Rv(r)]=t[r]);return i}function Rv(t){let i=t.replace(gv,Mv);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function Mv(t){return"-"+t.toLowerCase()}const dc={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"]},Ov={};function yf(t,i){const r=Ov,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,o=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Rx(t,u,o)}function Rx(t,i,r){if(Lv(t)){if("value"in t)return t.type==="html"&&!r?"":t.value;if(i&&"alt"in t&&t.alt)return t.alt;if("children"in t)return lg(t.children,i,r)}return Array.isArray(t)?lg(t,i,r):""}function lg(t,i,r){const u=[];let o=-1;for(;++o<t.length;)u[o]=Rx(t[o],i,r);return u.join("")}function Lv(t){return!!(t&&typeof t=="object")}const ig=document.createElement("i");function bf(t){const i="&"+t+";";ig.innerHTML=i;const r=ig.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function nn(t,i,r,u){const o=t.length;let c=0,f;if(i<0?i=-i>o?0:o+i:i=i>o?o:i,r=r>0?r:0,u.length<1e4)f=Array.from(u),f.unshift(i,r),t.splice(...f);else for(r&&t.splice(i,r);c<u.length;)f=u.slice(c,c+1e4),f.unshift(i,0),t.splice(...f),c+=1e4,i+=1e4}function yn(t,i){return t.length>0?(nn(t,t.length,0,i),t):i}const rg={}.hasOwnProperty;function Mx(t){const i={};let r=-1;for(;++r<t.length;)Uv(i,t[r]);return i}function Uv(t,i){let r;for(r in i){const o=(rg.call(t,r)?t[r]:void 0)||(t[r]={}),c=i[r];let f;if(c)for(f in c){rg.call(o,f)||(o[f]=[]);const p=c[f];qv(o[f],Array.isArray(p)?p:p?[p]:[])}}}function qv(t,i){let r=-1;const u=[];for(;++r<i.length;)(i[r].add==="after"?t:u).push(i[r]);nn(t,0,0,u)}function Ox(t,i){const r=Number.parseInt(t,i);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Nn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=Ml(/[A-Za-z]/),Rt=Ml(/[\dA-Za-z]/),Bv=Ml(/[#-'*+\--9=?A-Z^-~]/);function Au(t){return t!==null&&(t<32||t===127)}const Qc=Ml(/\d/),Hv=Ml(/[\dA-Fa-f]/),Iv=Ml(/[!-/:-@[-`{-~]/);function be(t){return t!==null&&t<-2}function et(t){return t!==null&&(t<0||t===32)}function Re(t){return t===-2||t===-1||t===32}const Lu=Ml(/\p{P}|\p{S}/u),ii=Ml(/\s/);function Ml(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Pi(t){const i=[];let r=-1,u=0,o=0;for(;++r<t.length;){const c=t.charCodeAt(r);let f="";if(c===37&&Rt(t.charCodeAt(r+1))&&Rt(t.charCodeAt(r+2)))o=2;else if(c<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(c))||(f=String.fromCharCode(c));else if(c>55295&&c<57344){const p=t.charCodeAt(r+1);c<56320&&p>56319&&p<57344?(f=String.fromCharCode(c,p),o=1):f="�"}else f=String.fromCharCode(c);f&&(i.push(t.slice(u,r),encodeURIComponent(f)),u=r+o+1,f=""),o&&(r+=o,o=0)}return i.join("")+t.slice(u)}function Be(t,i,r,u){const o=u?u-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return Re(g)?(t.enter(r),p(g)):i(g)}function p(g){return Re(g)&&c++<o?(t.consume(g),p):(t.exit(r),i(g))}}const Yv={tokenize:Gv};function Gv(t){const i=t.attempt(this.parser.constructs.contentInitial,u,o);let r;return i;function u(p){if(p===null){t.consume(p);return}return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Be(t,i,"linePrefix")}function o(p){return t.enter("paragraph"),c(p)}function c(p){const g=t.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=g),r=g,f(p)}function f(p){if(p===null){t.exit("chunkText"),t.exit("paragraph"),t.consume(p);return}return be(p)?(t.consume(p),t.exit("chunkText"),c):(t.consume(p),f)}}const Vv={tokenize:Fv},ag={tokenize:Xv};function Fv(t){const i=this,r=[];let u=0,o,c,f;return p;function p(R){if(u<r.length){const W=r[u];return i.containerState=W[1],t.attempt(W[0].continuation,g,m)(R)}return m(R)}function g(R){if(u++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,o&&V();const W=i.events.length;let ie=W,M;for(;ie--;)if(i.events[ie][0]==="exit"&&i.events[ie][1].type==="chunkFlow"){M=i.events[ie][1].end;break}E(u);let Y=W;for(;Y<i.events.length;)i.events[Y][1].end={...M},Y++;return nn(i.events,ie+1,0,i.events.slice(W)),i.events.length=Y,m(R)}return p(R)}function m(R){if(u===r.length){if(!o)return S(R);if(o.currentConstruct&&o.currentConstruct.concrete)return N(R);i.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(ag,b,x)(R)}function b(R){return o&&V(),E(u),S(R)}function x(R){return i.parser.lazy[i.now().line]=u!==r.length,f=i.now().offset,N(R)}function S(R){return i.containerState={},t.attempt(ag,v,N)(R)}function v(R){return u++,r.push([i.currentConstruct,i.containerState]),S(R)}function N(R){if(R===null){o&&V(),E(0),t.consume(R);return}return o=o||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:c}),T(R)}function T(R){if(R===null){L(t.exit("chunkFlow"),!0),E(0),t.consume(R);return}return be(R)?(t.consume(R),L(t.exit("chunkFlow")),u=0,i.interrupt=void 0,p):(t.consume(R),T)}function L(R,W){const ie=i.sliceStream(R);if(W&&ie.push(null),R.previous=c,c&&(c.next=R),c=R,o.defineSkip(R.start),o.write(ie),i.parser.lazy[R.start.line]){let M=o.events.length;for(;M--;)if(o.events[M][1].start.offset<f&&(!o.events[M][1].end||o.events[M][1].end.offset>f))return;const Y=i.events.length;let ue=Y,J,U;for(;ue--;)if(i.events[ue][0]==="exit"&&i.events[ue][1].type==="chunkFlow"){if(J){U=i.events[ue][1].end;break}J=!0}for(E(u),M=Y;M<i.events.length;)i.events[M][1].end={...U},M++;nn(i.events,ue+1,0,i.events.slice(Y)),i.events.length=M}}function E(R){let W=r.length;for(;W-- >R;){const ie=r[W];i.containerState=ie[1],ie[0].exit.call(i,t)}r.length=R}function V(){o.write([null]),c=void 0,o=void 0,i.containerState._closeFlow=void 0}}function Xv(t,i,r){return Be(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ki(t){if(t===null||et(t)||ii(t))return 1;if(Lu(t))return 2}function Uu(t,i,r){const u=[];let o=-1;for(;++o<t.length;){const c=t[o].resolveAll;c&&!u.includes(c)&&(i=c(i,r),u.push(c))}return i}const $c={name:"attention",resolveAll:Qv,tokenize:$v};function Qv(t,i){let r=-1,u,o,c,f,p,g,m,b;for(;++r<t.length;)if(t[r][0]==="enter"&&t[r][1].type==="attentionSequence"&&t[r][1]._close){for(u=r;u--;)if(t[u][0]==="exit"&&t[u][1].type==="attentionSequence"&&t[u][1]._open&&i.sliceSerialize(t[u][1]).charCodeAt(0)===i.sliceSerialize(t[r][1]).charCodeAt(0)){if((t[u][1]._close||t[r][1]._open)&&(t[r][1].end.offset-t[r][1].start.offset)%3&&!((t[u][1].end.offset-t[u][1].start.offset+t[r][1].end.offset-t[r][1].start.offset)%3))continue;g=t[u][1].end.offset-t[u][1].start.offset>1&&t[r][1].end.offset-t[r][1].start.offset>1?2:1;const x={...t[u][1].end},S={...t[r][1].start};ug(x,-g),ug(S,g),f={type:g>1?"strongSequence":"emphasisSequence",start:x,end:{...t[u][1].end}},p={type:g>1?"strongSequence":"emphasisSequence",start:{...t[r][1].start},end:S},c={type:g>1?"strongText":"emphasisText",start:{...t[u][1].end},end:{...t[r][1].start}},o={type:g>1?"strong":"emphasis",start:{...f.start},end:{...p.end}},t[u][1].end={...f.start},t[r][1].start={...p.end},m=[],t[u][1].end.offset-t[u][1].start.offset&&(m=yn(m,[["enter",t[u][1],i],["exit",t[u][1],i]])),m=yn(m,[["enter",o,i],["enter",f,i],["exit",f,i],["enter",c,i]]),m=yn(m,Uu(i.parser.constructs.insideSpan.null,t.slice(u+1,r),i)),m=yn(m,[["exit",c,i],["enter",p,i],["exit",p,i],["exit",o,i]]),t[r][1].end.offset-t[r][1].start.offset?(b=2,m=yn(m,[["enter",t[r][1],i],["exit",t[r][1],i]])):b=0,nn(t,u-1,r-u+3,m),r=u+m.length-b-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function $v(t,i){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,o=Ki(u);let c;return f;function f(g){return c=g,t.enter("attentionSequence"),p(g)}function p(g){if(g===c)return t.consume(g),p;const m=t.exit("attentionSequence"),b=Ki(g),x=!b||b===2&&o||r.includes(g),S=!o||o===2&&b||r.includes(u);return m._open=!!(c===42?x:x&&(o||!S)),m._close=!!(c===42?S:S&&(b||!x)),i(g)}}function ug(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const Zv={name:"autolink",tokenize:Kv};function Kv(t,i,r){let u=0;return o;function o(v){return t.enter("autolink"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.enter("autolinkProtocol"),c}function c(v){return Ut(v)?(t.consume(v),f):v===64?r(v):m(v)}function f(v){return v===43||v===45||v===46||Rt(v)?(u=1,p(v)):m(v)}function p(v){return v===58?(t.consume(v),u=0,g):(v===43||v===45||v===46||Rt(v))&&u++<32?(t.consume(v),p):(u=0,m(v))}function g(v){return v===62?(t.exit("autolinkProtocol"),t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):v===null||v===32||v===60||Au(v)?r(v):(t.consume(v),g)}function m(v){return v===64?(t.consume(v),b):Bv(v)?(t.consume(v),m):r(v)}function b(v){return Rt(v)?x(v):r(v)}function x(v){return v===46?(t.consume(v),u=0,b):v===62?(t.exit("autolinkProtocol").type="autolinkEmail",t.enter("autolinkMarker"),t.consume(v),t.exit("autolinkMarker"),t.exit("autolink"),i):S(v)}function S(v){if((v===45||Rt(v))&&u++<63){const N=v===45?S:x;return t.consume(v),N}return r(v)}}const ia={partial:!0,tokenize:Jv};function Jv(t,i,r){return u;function u(c){return Re(c)?Be(t,o,"linePrefix")(c):o(c)}function o(c){return c===null||be(c)?i(c):r(c)}}const Lx={continuation:{tokenize:Wv},exit:eS,name:"blockQuote",tokenize:Pv};function Pv(t,i,r){const u=this;return o;function o(f){if(f===62){const p=u.containerState;return p.open||(t.enter("blockQuote",{_container:!0}),p.open=!0),t.enter("blockQuotePrefix"),t.enter("blockQuoteMarker"),t.consume(f),t.exit("blockQuoteMarker"),c}return r(f)}function c(f){return Re(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(f))}}function Wv(t,i,r){const u=this;return o;function o(f){return Re(f)?Be(t,c,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return t.attempt(Lx,i,r)(f)}}function eS(t){t.exit("blockQuote")}const Ux={name:"characterEscape",tokenize:tS};function tS(t,i,r){return u;function u(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),o}function o(c){return Iv(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(c)}}const qx={name:"characterReference",tokenize:nS};function nS(t,i,r){const u=this;let o=0,c,f;return p;function p(x){return t.enter("characterReference"),t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),g}function g(x){return x===35?(t.enter("characterReferenceMarkerNumeric"),t.consume(x),t.exit("characterReferenceMarkerNumeric"),m):(t.enter("characterReferenceValue"),c=31,f=Rt,b(x))}function m(x){return x===88||x===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(x),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,f=Hv,b):(t.enter("characterReferenceValue"),c=7,f=Qc,b(x))}function b(x){if(x===59&&o){const S=t.exit("characterReferenceValue");return f===Rt&&!bf(u.sliceSerialize(S))?r(x):(t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return f(x)&&o++<c?(t.consume(x),b):r(x)}}const sg={partial:!0,tokenize:iS},og={concrete:!0,name:"codeFenced",tokenize:lS};function lS(t,i,r){const u=this,o={partial:!0,tokenize:ie};let c=0,f=0,p;return g;function g(M){return m(M)}function m(M){const Y=u.events[u.events.length-1];return c=Y&&Y[1].type==="linePrefix"?Y[2].sliceSerialize(Y[1],!0).length:0,p=M,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),b(M)}function b(M){return M===p?(f++,t.consume(M),b):f<3?r(M):(t.exit("codeFencedFenceSequence"),Re(M)?Be(t,x,"whitespace")(M):x(M))}function x(M){return M===null||be(M)?(t.exit("codeFencedFence"),u.interrupt?i(M):t.check(sg,T,W)(M)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),S(M))}function S(M){return M===null||be(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),x(M)):Re(M)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Be(t,v,"whitespace")(M)):M===96&&M===p?r(M):(t.consume(M),S)}function v(M){return M===null||be(M)?x(M):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(M))}function N(M){return M===null||be(M)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),x(M)):M===96&&M===p?r(M):(t.consume(M),N)}function T(M){return t.attempt(o,W,L)(M)}function L(M){return t.enter("lineEnding"),t.consume(M),t.exit("lineEnding"),E}function E(M){return c>0&&Re(M)?Be(t,V,"linePrefix",c+1)(M):V(M)}function V(M){return M===null||be(M)?t.check(sg,T,W)(M):(t.enter("codeFlowValue"),R(M))}function R(M){return M===null||be(M)?(t.exit("codeFlowValue"),V(M)):(t.consume(M),R)}function W(M){return t.exit("codeFenced"),i(M)}function ie(M,Y,ue){let J=0;return U;function U(P){return M.enter("lineEnding"),M.consume(P),M.exit("lineEnding"),ne}function ne(P){return M.enter("codeFencedFence"),Re(P)?Be(M,le,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):le(P)}function le(P){return P===p?(M.enter("codeFencedFenceSequence"),xe(P)):ue(P)}function xe(P){return P===p?(J++,M.consume(P),xe):J>=f?(M.exit("codeFencedFenceSequence"),Re(P)?Be(M,oe,"whitespace")(P):oe(P)):ue(P)}function oe(P){return P===null||be(P)?(M.exit("codeFencedFence"),Y(P)):ue(P)}}}function iS(t,i,r){const u=this;return o;function o(f){return f===null?r(f):(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c)}function c(f){return u.parser.lazy[u.now().line]?r(f):i(f)}}const hc={name:"codeIndented",tokenize:aS},rS={partial:!0,tokenize:uS};function aS(t,i,r){const u=this;return o;function o(m){return t.enter("codeIndented"),Be(t,c,"linePrefix",5)(m)}function c(m){const b=u.events[u.events.length-1];return b&&b[1].type==="linePrefix"&&b[2].sliceSerialize(b[1],!0).length>=4?f(m):r(m)}function f(m){return m===null?g(m):be(m)?t.attempt(rS,f,g)(m):(t.enter("codeFlowValue"),p(m))}function p(m){return m===null||be(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),p)}function g(m){return t.exit("codeIndented"),i(m)}}function uS(t,i,r){const u=this;return o;function o(f){return u.parser.lazy[u.now().line]?r(f):be(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),o):Be(t,c,"linePrefix",5)(f)}function c(f){const p=u.events[u.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?i(f):be(f)?o(f):r(f)}}const sS={name:"codeText",previous:cS,resolve:oS,tokenize:fS};function oS(t){let i=t.length-4,r=3,u,o;if((t[r][1].type==="lineEnding"||t[r][1].type==="space")&&(t[i][1].type==="lineEnding"||t[i][1].type==="space")){for(u=r;++u<i;)if(t[u][1].type==="codeTextData"){t[r][1].type="codeTextPadding",t[i][1].type="codeTextPadding",r+=2,i-=2;break}}for(u=r-1,i++;++u<=i;)o===void 0?u!==i&&t[u][1].type!=="lineEnding"&&(o=u):(u===i||t[u][1].type==="lineEnding")&&(t[o][1].type="codeTextData",u!==o+2&&(t[o][1].end=t[u-1][1].end,t.splice(o+2,u-o-2),i-=u-o-2,u=o+2),o=void 0);return t}function cS(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function fS(t,i,r){let u=0,o,c;return f;function f(x){return t.enter("codeText"),t.enter("codeTextSequence"),p(x)}function p(x){return x===96?(t.consume(x),u++,p):(t.exit("codeTextSequence"),g(x))}function g(x){return x===null?r(x):x===32?(t.enter("space"),t.consume(x),t.exit("space"),g):x===96?(c=t.enter("codeTextSequence"),o=0,b(x)):be(x)?(t.enter("lineEnding"),t.consume(x),t.exit("lineEnding"),g):(t.enter("codeTextData"),m(x))}function m(x){return x===null||x===32||x===96||be(x)?(t.exit("codeTextData"),g(x)):(t.consume(x),m)}function b(x){return x===96?(t.consume(x),o++,b):o===u?(t.exit("codeTextSequence"),t.exit("codeText"),i(x)):(c.type="codeTextData",m(x))}}class dS{constructor(i){this.left=i?[...i]:[],this.right=[]}get(i){if(i<0||i>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+i+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return i<this.left.length?this.left[i]:this.right[this.right.length-i+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(i,r){const u=r??Number.POSITIVE_INFINITY;return u<this.left.length?this.left.slice(i,u):i>this.left.length?this.right.slice(this.right.length-u+this.left.length,this.right.length-i+this.left.length).reverse():this.left.slice(i).concat(this.right.slice(this.right.length-u+this.left.length).reverse())}splice(i,r,u){const o=r||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return u&&$r(this.left,u),c.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(i){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(i)}pushMany(i){this.setCursor(Number.POSITIVE_INFINITY),$r(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),$r(this.right,i.reverse())}setCursor(i){if(!(i===this.left.length||i>this.left.length&&this.right.length===0||i<0&&this.left.length===0))if(i<this.left.length){const r=this.left.splice(i,Number.POSITIVE_INFINITY);$r(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);$r(this.left,r.reverse())}}}function $r(t,i){let r=0;if(i.length<1e4)t.push(...i);else for(;r<i.length;)t.push(...i.slice(r,r+1e4)),r+=1e4}function Bx(t){const i={};let r=-1,u,o,c,f,p,g,m;const b=new dS(t);for(;++r<b.length;){for(;r in i;)r=i[r];if(u=b.get(r),r&&u[1].type==="chunkFlow"&&b.get(r-1)[1].type==="listItemPrefix"&&(g=u[1]._tokenizer.events,c=0,c<g.length&&g[c][1].type==="lineEndingBlank"&&(c+=2),c<g.length&&g[c][1].type==="content"))for(;++c<g.length&&g[c][1].type!=="content";)g[c][1].type==="chunkText"&&(g[c][1]._isInFirstContentOfListItem=!0,c++);if(u[0]==="enter")u[1].contentType&&(Object.assign(i,hS(b,r)),r=i[r],m=!0);else if(u[1]._container){for(c=r,o=void 0;c--;)if(f=b.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(o&&(b.get(o)[1].type="lineEndingBlank"),f[1].type="lineEnding",o=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;o&&(u[1].end={...b.get(o)[1].start},p=b.slice(o,r),p.unshift(u),b.splice(o,r-o+1,p))}}return nn(t,0,Number.POSITIVE_INFINITY,b.slice(0)),!m}function hS(t,i){const r=t.get(i)[1],u=t.get(i)[2];let o=i-1;const c=[];let f=r._tokenizer;f||(f=u.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(f._contentTypeTextTrailing=!0));const p=f.events,g=[],m={};let b,x,S=-1,v=r,N=0,T=0;const L=[T];for(;v;){for(;t.get(++o)[1]!==v;);c.push(o),v._tokenizer||(b=u.sliceStream(v),v.next||b.push(null),x&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(b),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=void 0)),x=v,v=v.next}for(v=r;++S<p.length;)p[S][0]==="exit"&&p[S-1][0]==="enter"&&p[S][1].type===p[S-1][1].type&&p[S][1].start.line!==p[S][1].end.line&&(T=S+1,L.push(T),v._tokenizer=void 0,v.previous=void 0,v=v.next);for(f.events=[],v?(v._tokenizer=void 0,v.previous=void 0):L.pop(),S=L.length;S--;){const E=p.slice(L[S],L[S+1]),V=c.pop();g.push([V,V+E.length-1]),t.splice(V,2,E)}for(g.reverse(),S=-1;++S<g.length;)m[N+g[S][0]]=N+g[S][1],N+=g[S][1]-g[S][0]-1;return m}const pS={resolve:gS,tokenize:xS},mS={partial:!0,tokenize:yS};function gS(t){return Bx(t),t}function xS(t,i){let r;return u;function u(p){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),o(p)}function o(p){return p===null?c(p):be(p)?t.check(mS,f,c)(p):(t.consume(p),o)}function c(p){return t.exit("chunkContent"),t.exit("content"),i(p)}function f(p){return t.consume(p),t.exit("chunkContent"),r.next=t.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,o}}function yS(t,i,r){const u=this;return o;function o(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Be(t,c,"linePrefix")}function c(f){if(f===null||be(f))return r(f);const p=u.events[u.events.length-1];return!u.parser.constructs.disable.null.includes("codeIndented")&&p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?i(f):t.interrupt(u.parser.constructs.flow,r,i)(f)}}function Hx(t,i,r,u,o,c,f,p,g){const m=g||Number.POSITIVE_INFINITY;let b=0;return x;function x(E){return E===60?(t.enter(u),t.enter(o),t.enter(c),t.consume(E),t.exit(c),S):E===null||E===32||E===41||Au(E)?r(E):(t.enter(u),t.enter(f),t.enter(p),t.enter("chunkString",{contentType:"string"}),T(E))}function S(E){return E===62?(t.enter(c),t.consume(E),t.exit(c),t.exit(o),t.exit(u),i):(t.enter(p),t.enter("chunkString",{contentType:"string"}),v(E))}function v(E){return E===62?(t.exit("chunkString"),t.exit(p),S(E)):E===null||E===60||be(E)?r(E):(t.consume(E),E===92?N:v)}function N(E){return E===60||E===62||E===92?(t.consume(E),v):v(E)}function T(E){return!b&&(E===null||E===41||et(E))?(t.exit("chunkString"),t.exit(p),t.exit(f),t.exit(u),i(E)):b<m&&E===40?(t.consume(E),b++,T):E===41?(t.consume(E),b--,T):E===null||E===32||E===40||Au(E)?r(E):(t.consume(E),E===92?L:T)}function L(E){return E===40||E===41||E===92?(t.consume(E),T):T(E)}}function Ix(t,i,r,u,o,c){const f=this;let p=0,g;return m;function m(v){return t.enter(u),t.enter(o),t.consume(v),t.exit(o),t.enter(c),b}function b(v){return p>999||v===null||v===91||v===93&&!g||v===94&&!p&&"_hiddenFootnoteSupport"in f.parser.constructs?r(v):v===93?(t.exit(c),t.enter(o),t.consume(v),t.exit(o),t.exit(u),i):be(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),b):(t.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||be(v)||p++>999?(t.exit("chunkString"),b(v)):(t.consume(v),g||(g=!Re(v)),v===92?S:x)}function S(v){return v===91||v===92||v===93?(t.consume(v),p++,x):x(v)}}function Yx(t,i,r,u,o,c){let f;return p;function p(S){return S===34||S===39||S===40?(t.enter(u),t.enter(o),t.consume(S),t.exit(o),f=S===40?41:S,g):r(S)}function g(S){return S===f?(t.enter(o),t.consume(S),t.exit(o),t.exit(u),i):(t.enter(c),m(S))}function m(S){return S===f?(t.exit(c),g(f)):S===null?r(S):be(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Be(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),b(S))}function b(S){return S===f||S===null||be(S)?(t.exit("chunkString"),m(S)):(t.consume(S),S===92?x:b)}function x(S){return S===f||S===92?(t.consume(S),b):b(S)}}function Wr(t,i){let r;return u;function u(o){return be(o)?(t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),r=!0,u):Re(o)?Be(t,u,r?"linePrefix":"lineSuffix")(o):i(o)}}const bS={name:"definition",tokenize:SS},vS={partial:!0,tokenize:kS};function SS(t,i,r){const u=this;let o;return c;function c(v){return t.enter("definition"),f(v)}function f(v){return Ix.call(u,t,p,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function p(v){return o=Nn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)),v===58?(t.enter("definitionMarker"),t.consume(v),t.exit("definitionMarker"),g):r(v)}function g(v){return et(v)?Wr(t,m)(v):m(v)}function m(v){return Hx(t,b,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function b(v){return t.attempt(vS,x,x)(v)}function x(v){return Re(v)?Be(t,S,"whitespace")(v):S(v)}function S(v){return v===null||be(v)?(t.exit("definition"),u.parser.defined.push(o),i(v)):r(v)}}function kS(t,i,r){return u;function u(p){return et(p)?Wr(t,o)(p):r(p)}function o(p){return Yx(t,c,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(p)}function c(p){return Re(p)?Be(t,f,"whitespace")(p):f(p)}function f(p){return p===null||be(p)?i(p):r(p)}}const wS={name:"hardBreakEscape",tokenize:jS};function jS(t,i,r){return u;function u(c){return t.enter("hardBreakEscape"),t.consume(c),o}function o(c){return be(c)?(t.exit("hardBreakEscape"),i(c)):r(c)}}const NS={name:"headingAtx",resolve:ES,tokenize:_S};function ES(t,i){let r=t.length-2,u=3,o,c;return t[u][1].type==="whitespace"&&(u+=2),r-2>u&&t[r][1].type==="whitespace"&&(r-=2),t[r][1].type==="atxHeadingSequence"&&(u===r-1||r-4>u&&t[r-2][1].type==="whitespace")&&(r-=u+1===r?2:4),r>u&&(o={type:"atxHeadingText",start:t[u][1].start,end:t[r][1].end},c={type:"chunkText",start:t[u][1].start,end:t[r][1].end,contentType:"text"},nn(t,u,r-u+1,[["enter",o,i],["enter",c,i],["exit",c,i],["exit",o,i]])),t}function _S(t,i,r){let u=0;return o;function o(b){return t.enter("atxHeading"),c(b)}function c(b){return t.enter("atxHeadingSequence"),f(b)}function f(b){return b===35&&u++<6?(t.consume(b),f):b===null||et(b)?(t.exit("atxHeadingSequence"),p(b)):r(b)}function p(b){return b===35?(t.enter("atxHeadingSequence"),g(b)):b===null||be(b)?(t.exit("atxHeading"),i(b)):Re(b)?Be(t,p,"whitespace")(b):(t.enter("atxHeadingText"),m(b))}function g(b){return b===35?(t.consume(b),g):(t.exit("atxHeadingSequence"),p(b))}function m(b){return b===null||b===35||et(b)?(t.exit("atxHeadingText"),p(b)):(t.consume(b),m)}}const CS=["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"],cg=["pre","script","style","textarea"],TS={concrete:!0,name:"htmlFlow",resolveTo:DS,tokenize:RS},AS={partial:!0,tokenize:OS},zS={partial:!0,tokenize:MS};function DS(t){let i=t.length;for(;i--&&!(t[i][0]==="enter"&&t[i][1].type==="htmlFlow"););return i>1&&t[i-2][1].type==="linePrefix"&&(t[i][1].start=t[i-2][1].start,t[i+1][1].start=t[i-2][1].start,t.splice(i-2,2)),t}function RS(t,i,r){const u=this;let o,c,f,p,g;return m;function m(w){return b(w)}function b(w){return t.enter("htmlFlow"),t.enter("htmlFlowData"),t.consume(w),x}function x(w){return w===33?(t.consume(w),S):w===47?(t.consume(w),c=!0,T):w===63?(t.consume(w),o=3,u.interrupt?i:C):Ut(w)?(t.consume(w),f=String.fromCharCode(w),L):r(w)}function S(w){return w===45?(t.consume(w),o=2,v):w===91?(t.consume(w),o=5,p=0,N):Ut(w)?(t.consume(w),o=4,u.interrupt?i:C):r(w)}function v(w){return w===45?(t.consume(w),u.interrupt?i:C):r(w)}function N(w){const ae="CDATA[";return w===ae.charCodeAt(p++)?(t.consume(w),p===ae.length?u.interrupt?i:le:N):r(w)}function T(w){return Ut(w)?(t.consume(w),f=String.fromCharCode(w),L):r(w)}function L(w){if(w===null||w===47||w===62||et(w)){const ae=w===47,fe=f.toLowerCase();return!ae&&!c&&cg.includes(fe)?(o=1,u.interrupt?i(w):le(w)):CS.includes(f.toLowerCase())?(o=6,ae?(t.consume(w),E):u.interrupt?i(w):le(w)):(o=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(w):c?V(w):R(w))}return w===45||Rt(w)?(t.consume(w),f+=String.fromCharCode(w),L):r(w)}function E(w){return w===62?(t.consume(w),u.interrupt?i:le):r(w)}function V(w){return Re(w)?(t.consume(w),V):U(w)}function R(w){return w===47?(t.consume(w),U):w===58||w===95||Ut(w)?(t.consume(w),W):Re(w)?(t.consume(w),R):U(w)}function W(w){return w===45||w===46||w===58||w===95||Rt(w)?(t.consume(w),W):ie(w)}function ie(w){return w===61?(t.consume(w),M):Re(w)?(t.consume(w),ie):R(w)}function M(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),g=w,Y):Re(w)?(t.consume(w),M):ue(w)}function Y(w){return w===g?(t.consume(w),g=null,J):w===null||be(w)?r(w):(t.consume(w),Y)}function ue(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||et(w)?ie(w):(t.consume(w),ue)}function J(w){return w===47||w===62||Re(w)?R(w):r(w)}function U(w){return w===62?(t.consume(w),ne):r(w)}function ne(w){return w===null||be(w)?le(w):Re(w)?(t.consume(w),ne):r(w)}function le(w){return w===45&&o===2?(t.consume(w),D):w===60&&o===1?(t.consume(w),Q):w===62&&o===4?(t.consume(w),_):w===63&&o===3?(t.consume(w),C):w===93&&o===5?(t.consume(w),me):be(w)&&(o===6||o===7)?(t.exit("htmlFlowData"),t.check(AS,H,xe)(w)):w===null||be(w)?(t.exit("htmlFlowData"),xe(w)):(t.consume(w),le)}function xe(w){return t.check(zS,oe,H)(w)}function oe(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),P}function P(w){return w===null||be(w)?xe(w):(t.enter("htmlFlowData"),le(w))}function D(w){return w===45?(t.consume(w),C):le(w)}function Q(w){return w===47?(t.consume(w),f="",se):le(w)}function se(w){if(w===62){const ae=f.toLowerCase();return cg.includes(ae)?(t.consume(w),_):le(w)}return Ut(w)&&f.length<8?(t.consume(w),f+=String.fromCharCode(w),se):le(w)}function me(w){return w===93?(t.consume(w),C):le(w)}function C(w){return w===62?(t.consume(w),_):w===45&&o===2?(t.consume(w),C):le(w)}function _(w){return w===null||be(w)?(t.exit("htmlFlowData"),H(w)):(t.consume(w),_)}function H(w){return t.exit("htmlFlow"),i(w)}}function MS(t,i,r){const u=this;return o;function o(f){return be(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),c):r(f)}function c(f){return u.parser.lazy[u.now().line]?r(f):i(f)}}function OS(t,i,r){return u;function u(o){return t.enter("lineEnding"),t.consume(o),t.exit("lineEnding"),t.attempt(ia,i,r)}}const LS={name:"htmlText",tokenize:US};function US(t,i,r){const u=this;let o,c,f;return p;function p(C){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(C),g}function g(C){return C===33?(t.consume(C),m):C===47?(t.consume(C),ie):C===63?(t.consume(C),R):Ut(C)?(t.consume(C),ue):r(C)}function m(C){return C===45?(t.consume(C),b):C===91?(t.consume(C),c=0,N):Ut(C)?(t.consume(C),V):r(C)}function b(C){return C===45?(t.consume(C),v):r(C)}function x(C){return C===null?r(C):C===45?(t.consume(C),S):be(C)?(f=x,Q(C)):(t.consume(C),x)}function S(C){return C===45?(t.consume(C),v):x(C)}function v(C){return C===62?D(C):C===45?S(C):x(C)}function N(C){const _="CDATA[";return C===_.charCodeAt(c++)?(t.consume(C),c===_.length?T:N):r(C)}function T(C){return C===null?r(C):C===93?(t.consume(C),L):be(C)?(f=T,Q(C)):(t.consume(C),T)}function L(C){return C===93?(t.consume(C),E):T(C)}function E(C){return C===62?D(C):C===93?(t.consume(C),E):T(C)}function V(C){return C===null||C===62?D(C):be(C)?(f=V,Q(C)):(t.consume(C),V)}function R(C){return C===null?r(C):C===63?(t.consume(C),W):be(C)?(f=R,Q(C)):(t.consume(C),R)}function W(C){return C===62?D(C):R(C)}function ie(C){return Ut(C)?(t.consume(C),M):r(C)}function M(C){return C===45||Rt(C)?(t.consume(C),M):Y(C)}function Y(C){return be(C)?(f=Y,Q(C)):Re(C)?(t.consume(C),Y):D(C)}function ue(C){return C===45||Rt(C)?(t.consume(C),ue):C===47||C===62||et(C)?J(C):r(C)}function J(C){return C===47?(t.consume(C),D):C===58||C===95||Ut(C)?(t.consume(C),U):be(C)?(f=J,Q(C)):Re(C)?(t.consume(C),J):D(C)}function U(C){return C===45||C===46||C===58||C===95||Rt(C)?(t.consume(C),U):ne(C)}function ne(C){return C===61?(t.consume(C),le):be(C)?(f=ne,Q(C)):Re(C)?(t.consume(C),ne):J(C)}function le(C){return C===null||C===60||C===61||C===62||C===96?r(C):C===34||C===39?(t.consume(C),o=C,xe):be(C)?(f=le,Q(C)):Re(C)?(t.consume(C),le):(t.consume(C),oe)}function xe(C){return C===o?(t.consume(C),o=void 0,P):C===null?r(C):be(C)?(f=xe,Q(C)):(t.consume(C),xe)}function oe(C){return C===null||C===34||C===39||C===60||C===61||C===96?r(C):C===47||C===62||et(C)?J(C):(t.consume(C),oe)}function P(C){return C===47||C===62||et(C)?J(C):r(C)}function D(C){return C===62?(t.consume(C),t.exit("htmlTextData"),t.exit("htmlText"),i):r(C)}function Q(C){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(C),t.exit("lineEnding"),se}function se(C){return Re(C)?Be(t,me,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(C):me(C)}function me(C){return t.enter("htmlTextData"),f(C)}}const vf={name:"labelEnd",resolveAll:IS,resolveTo:YS,tokenize:GS},qS={tokenize:VS},BS={tokenize:FS},HS={tokenize:XS};function IS(t){let i=-1;const r=[];for(;++i<t.length;){const u=t[i][1];if(r.push(t[i]),u.type==="labelImage"||u.type==="labelLink"||u.type==="labelEnd"){const o=u.type==="labelImage"?4:2;u.type="data",i+=o}}return t.length!==r.length&&nn(t,0,t.length,r),t}function YS(t,i){let r=t.length,u=0,o,c,f,p;for(;r--;)if(o=t[r][1],c){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;t[r][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(f){if(t[r][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(c=r,o.type!=="labelLink")){u=2;break}}else o.type==="labelEnd"&&(f=r);const g={type:t[c][1].type==="labelLink"?"link":"image",start:{...t[c][1].start},end:{...t[t.length-1][1].end}},m={type:"label",start:{...t[c][1].start},end:{...t[f][1].end}},b={type:"labelText",start:{...t[c+u+2][1].end},end:{...t[f-2][1].start}};return p=[["enter",g,i],["enter",m,i]],p=yn(p,t.slice(c+1,c+u+3)),p=yn(p,[["enter",b,i]]),p=yn(p,Uu(i.parser.constructs.insideSpan.null,t.slice(c+u+4,f-3),i)),p=yn(p,[["exit",b,i],t[f-2],t[f-1],["exit",m,i]]),p=yn(p,t.slice(f+1)),p=yn(p,[["exit",g,i]]),nn(t,c,t.length,p),t}function GS(t,i,r){const u=this;let o=u.events.length,c,f;for(;o--;)if((u.events[o][1].type==="labelImage"||u.events[o][1].type==="labelLink")&&!u.events[o][1]._balanced){c=u.events[o][1];break}return p;function p(S){return c?c._inactive?x(S):(f=u.parser.defined.includes(Nn(u.sliceSerialize({start:c.end,end:u.now()}))),t.enter("labelEnd"),t.enter("labelMarker"),t.consume(S),t.exit("labelMarker"),t.exit("labelEnd"),g):r(S)}function g(S){return S===40?t.attempt(qS,b,f?b:x)(S):S===91?t.attempt(BS,b,f?m:x)(S):f?b(S):x(S)}function m(S){return t.attempt(HS,b,x)(S)}function b(S){return i(S)}function x(S){return c._balanced=!0,r(S)}}function VS(t,i,r){return u;function u(x){return t.enter("resource"),t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),o}function o(x){return et(x)?Wr(t,c)(x):c(x)}function c(x){return x===41?b(x):Hx(t,f,p,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function f(x){return et(x)?Wr(t,g)(x):b(x)}function p(x){return r(x)}function g(x){return x===34||x===39||x===40?Yx(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):b(x)}function m(x){return et(x)?Wr(t,b)(x):b(x)}function b(x){return x===41?(t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),t.exit("resource"),i):r(x)}}function FS(t,i,r){const u=this;return o;function o(p){return Ix.call(u,t,c,f,"reference","referenceMarker","referenceString")(p)}function c(p){return u.parser.defined.includes(Nn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?i(p):r(p)}function f(p){return r(p)}}function XS(t,i,r){return u;function u(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),o}function o(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),i):r(c)}}const QS={name:"labelStartImage",resolveAll:vf.resolveAll,tokenize:$S};function $S(t,i,r){const u=this;return o;function o(p){return t.enter("labelImage"),t.enter("labelImageMarker"),t.consume(p),t.exit("labelImageMarker"),c}function c(p){return p===91?(t.enter("labelMarker"),t.consume(p),t.exit("labelMarker"),t.exit("labelImage"),f):r(p)}function f(p){return p===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(p):i(p)}}const ZS={name:"labelStartLink",resolveAll:vf.resolveAll,tokenize:KS};function KS(t,i,r){const u=this;return o;function o(f){return t.enter("labelLink"),t.enter("labelMarker"),t.consume(f),t.exit("labelMarker"),t.exit("labelLink"),c}function c(f){return f===94&&"_hiddenFootnoteSupport"in u.parser.constructs?r(f):i(f)}}const pc={name:"lineEnding",tokenize:JS};function JS(t,i){return r;function r(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Be(t,i,"linePrefix")}}const _u={name:"thematicBreak",tokenize:PS};function PS(t,i,r){let u=0,o;return c;function c(m){return t.enter("thematicBreak"),f(m)}function f(m){return o=m,p(m)}function p(m){return m===o?(t.enter("thematicBreakSequence"),g(m)):u>=3&&(m===null||be(m))?(t.exit("thematicBreak"),i(m)):r(m)}function g(m){return m===o?(t.consume(m),u++,g):(t.exit("thematicBreakSequence"),Re(m)?Be(t,p,"whitespace")(m):p(m))}}const Xt={continuation:{tokenize:n2},exit:i2,name:"list",tokenize:t2},WS={partial:!0,tokenize:r2},e2={partial:!0,tokenize:l2};function t2(t,i,r){const u=this,o=u.events[u.events.length-1];let c=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,f=0;return p;function p(v){const N=u.containerState.type||(v===42||v===43||v===45?"listUnordered":"listOrdered");if(N==="listUnordered"?!u.containerState.marker||v===u.containerState.marker:Qc(v)){if(u.containerState.type||(u.containerState.type=N,t.enter(N,{_container:!0})),N==="listUnordered")return t.enter("listItemPrefix"),v===42||v===45?t.check(_u,r,m)(v):m(v);if(!u.interrupt||v===49)return t.enter("listItemPrefix"),t.enter("listItemValue"),g(v)}return r(v)}function g(v){return Qc(v)&&++f<10?(t.consume(v),g):(!u.interrupt||f<2)&&(u.containerState.marker?v===u.containerState.marker:v===41||v===46)?(t.exit("listItemValue"),m(v)):r(v)}function m(v){return t.enter("listItemMarker"),t.consume(v),t.exit("listItemMarker"),u.containerState.marker=u.containerState.marker||v,t.check(ia,u.interrupt?r:b,t.attempt(WS,S,x))}function b(v){return u.containerState.initialBlankLine=!0,c++,S(v)}function x(v){return Re(v)?(t.enter("listItemPrefixWhitespace"),t.consume(v),t.exit("listItemPrefixWhitespace"),S):r(v)}function S(v){return u.containerState.size=c+u.sliceSerialize(t.exit("listItemPrefix"),!0).length,i(v)}}function n2(t,i,r){const u=this;return u.containerState._closeFlow=void 0,t.check(ia,o,c);function o(p){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Be(t,i,"listItemIndent",u.containerState.size+1)(p)}function c(p){return u.containerState.furtherBlankLines||!Re(p)?(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,f(p)):(u.containerState.furtherBlankLines=void 0,u.containerState.initialBlankLine=void 0,t.attempt(e2,i,f)(p))}function f(p){return u.containerState._closeFlow=!0,u.interrupt=void 0,Be(t,t.attempt(Xt,i,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p)}}function l2(t,i,r){const u=this;return Be(t,o,"listItemIndent",u.containerState.size+1);function o(c){const f=u.events[u.events.length-1];return f&&f[1].type==="listItemIndent"&&f[2].sliceSerialize(f[1],!0).length===u.containerState.size?i(c):r(c)}}function i2(t){t.exit(this.containerState.type)}function r2(t,i,r){const u=this;return Be(t,o,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(c){const f=u.events[u.events.length-1];return!Re(c)&&f&&f[1].type==="listItemPrefixWhitespace"?i(c):r(c)}}const fg={name:"setextUnderline",resolveTo:a2,tokenize:u2};function a2(t,i){let r=t.length,u,o,c;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){u=r;break}t[r][1].type==="paragraph"&&(o=r)}else t[r][1].type==="content"&&t.splice(r,1),!c&&t[r][1].type==="definition"&&(c=r);const f={type:"setextHeading",start:{...t[u][1].start},end:{...t[t.length-1][1].end}};return t[o][1].type="setextHeadingText",c?(t.splice(o,0,["enter",f,i]),t.splice(c+1,0,["exit",t[u][1],i]),t[u][1].end={...t[c][1].end}):t[u][1]=f,t.push(["exit",f,i]),t}function u2(t,i,r){const u=this;let o;return c;function c(m){let b=u.events.length,x;for(;b--;)if(u.events[b][1].type!=="lineEnding"&&u.events[b][1].type!=="linePrefix"&&u.events[b][1].type!=="content"){x=u.events[b][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||x)?(t.enter("setextHeadingLine"),o=m,f(m)):r(m)}function f(m){return t.enter("setextHeadingLineSequence"),p(m)}function p(m){return m===o?(t.consume(m),p):(t.exit("setextHeadingLineSequence"),Re(m)?Be(t,g,"lineSuffix")(m):g(m))}function g(m){return m===null||be(m)?(t.exit("setextHeadingLine"),i(m)):r(m)}}const s2={tokenize:o2};function o2(t){const i=this,r=t.attempt(ia,u,t.attempt(this.parser.constructs.flowInitial,o,Be(t,t.attempt(this.parser.constructs.flow,o,t.attempt(pS,o)),"linePrefix")));return r;function u(c){if(c===null){t.consume(c);return}return t.enter("lineEndingBlank"),t.consume(c),t.exit("lineEndingBlank"),i.currentConstruct=void 0,r}function o(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const c2={resolveAll:Vx()},f2=Gx("string"),d2=Gx("text");function Gx(t){return{resolveAll:Vx(t==="text"?h2:void 0),tokenize:i};function i(r){const u=this,o=this.parser.constructs[t],c=r.attempt(o,f,p);return f;function f(b){return m(b)?c(b):p(b)}function p(b){if(b===null){r.consume(b);return}return r.enter("data"),r.consume(b),g}function g(b){return m(b)?(r.exit("data"),c(b)):(r.consume(b),g)}function m(b){if(b===null)return!0;const x=o[b];let S=-1;if(x)for(;++S<x.length;){const v=x[S];if(!v.previous||v.previous.call(u,u.previous))return!0}return!1}}}function Vx(t){return i;function i(r,u){let o=-1,c;for(;++o<=r.length;)c===void 0?r[o]&&r[o][1].type==="data"&&(c=o,o++):(!r[o]||r[o][1].type!=="data")&&(o!==c+2&&(r[c][1].end=r[o-1][1].end,r.splice(c+2,o-c-2),o=c+2),c=void 0);return t?t(r,u):r}}function h2(t,i){let r=0;for(;++r<=t.length;)if((r===t.length||t[r][1].type==="lineEnding")&&t[r-1][1].type==="data"){const u=t[r-1][1],o=i.sliceStream(u);let c=o.length,f=-1,p=0,g;for(;c--;){const m=o[c];if(typeof m=="string"){for(f=m.length;m.charCodeAt(f-1)===32;)p++,f--;if(f)break;f=-1}else if(m===-2)g=!0,p++;else if(m!==-1){c++;break}}if(i._contentTypeTextTrailing&&r===t.length&&(p=0),p){const m={type:r===t.length||g||p<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:c?f:u.start._bufferIndex+f,_index:u.start._index+c,line:u.end.line,column:u.end.column-p,offset:u.end.offset-p},end:{...u.end}};u.end={...m.start},u.start.offset===u.end.offset?Object.assign(u,m):(t.splice(r,0,["enter",m,i],["exit",m,i]),r+=2)}r++}return t}const p2={42:Xt,43:Xt,45:Xt,48:Xt,49:Xt,50:Xt,51:Xt,52:Xt,53:Xt,54:Xt,55:Xt,56:Xt,57:Xt,62:Lx},m2={91:bS},g2={[-2]:hc,[-1]:hc,32:hc},x2={35:NS,42:_u,45:[fg,_u],60:TS,61:fg,95:_u,96:og,126:og},y2={38:qx,92:Ux},b2={[-5]:pc,[-4]:pc,[-3]:pc,33:QS,38:qx,42:$c,60:[Zv,LS],91:ZS,92:[wS,Ux],93:vf,95:$c,96:sS},v2={null:[$c,c2]},S2={null:[42,95]},k2={null:[]},w2=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:S2,contentInitial:m2,disable:k2,document:p2,flow:x2,flowInitial:g2,insideSpan:v2,string:y2,text:b2},Symbol.toStringTag,{value:"Module"}));function j2(t,i,r){let u={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const o={},c=[];let f=[],p=[];const g={attempt:Y(ie),check:Y(M),consume:V,enter:R,exit:W,interrupt:Y(M,{interrupt:!0})},m={code:null,containerState:{},defineSkip:T,events:[],now:N,parser:t,previous:null,sliceSerialize:S,sliceStream:v,write:x};let b=i.tokenize.call(m,g);return i.resolveAll&&c.push(i),m;function x(ne){return f=yn(f,ne),L(),f[f.length-1]!==null?[]:(ue(i,0),m.events=Uu(c,m.events,m),m.events)}function S(ne,le){return E2(v(ne),le)}function v(ne){return N2(f,ne)}function N(){const{_bufferIndex:ne,_index:le,line:xe,column:oe,offset:P}=u;return{_bufferIndex:ne,_index:le,line:xe,column:oe,offset:P}}function T(ne){o[ne.line]=ne.column,U()}function L(){let ne;for(;u._index<f.length;){const le=f[u._index];if(typeof le=="string")for(ne=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===ne&&u._bufferIndex<le.length;)E(le.charCodeAt(u._bufferIndex));else E(le)}}function E(ne){b=b(ne)}function V(ne){be(ne)?(u.line++,u.column=1,u.offset+=ne===-3?2:1,U()):ne!==-1&&(u.column++,u.offset++),u._bufferIndex<0?u._index++:(u._bufferIndex++,u._bufferIndex===f[u._index].length&&(u._bufferIndex=-1,u._index++)),m.previous=ne}function R(ne,le){const xe=le||{};return xe.type=ne,xe.start=N(),m.events.push(["enter",xe,m]),p.push(xe),xe}function W(ne){const le=p.pop();return le.end=N(),m.events.push(["exit",le,m]),le}function ie(ne,le){ue(ne,le.from)}function M(ne,le){le.restore()}function Y(ne,le){return xe;function xe(oe,P,D){let Q,se,me,C;return Array.isArray(oe)?H(oe):"tokenize"in oe?H([oe]):_(oe);function _(he){return je;function je(Ge){const ge=Ge!==null&&he[Ge],yt=Ge!==null&&he.null,Ot=[...Array.isArray(ge)?ge:ge?[ge]:[],...Array.isArray(yt)?yt:yt?[yt]:[]];return H(Ot)(Ge)}}function H(he){return Q=he,se=0,he.length===0?D:w(he[se])}function w(he){return je;function je(Ge){return C=J(),me=he,he.partial||(m.currentConstruct=he),he.name&&m.parser.constructs.disable.null.includes(he.name)?fe():he.tokenize.call(le?Object.assign(Object.create(m),le):m,g,ae,fe)(Ge)}}function ae(he){return ne(me,C),P}function fe(he){return C.restore(),++se<Q.length?w(Q[se]):D}}}function ue(ne,le){ne.resolveAll&&!c.includes(ne)&&c.push(ne),ne.resolve&&nn(m.events,le,m.events.length-le,ne.resolve(m.events.slice(le),m)),ne.resolveTo&&(m.events=ne.resolveTo(m.events,m))}function J(){const ne=N(),le=m.previous,xe=m.currentConstruct,oe=m.events.length,P=Array.from(p);return{from:oe,restore:D};function D(){u=ne,m.previous=le,m.currentConstruct=xe,m.events.length=oe,p=P,U()}}function U(){u.line in o&&u.column<2&&(u.column=o[u.line],u.offset+=o[u.line]-1)}}function N2(t,i){const r=i.start._index,u=i.start._bufferIndex,o=i.end._index,c=i.end._bufferIndex;let f;if(r===o)f=[t[r].slice(u,c)];else{if(f=t.slice(r,o),u>-1){const p=f[0];typeof p=="string"?f[0]=p.slice(u):f.shift()}c>0&&f.push(t[o].slice(0,c))}return f}function E2(t,i){let r=-1;const u=[];let o;for(;++r<t.length;){const c=t[r];let f;if(typeof c=="string")f=c;else switch(c){case-5:{f="\r";break}case-4:{f=`
|
|
51
|
-
`;break}case-3:{f=`\r
|
|
52
|
-
`;break}case-2:{f=i?" ":" ";break}case-1:{if(!i&&o)continue;f=" ";break}default:f=String.fromCharCode(c)}o=c===-2,u.push(f)}return u.join("")}function _2(t){const u={constructs:Mx([w2,...(t||{}).extensions||[]]),content:o(Yv),defined:[],document:o(Vv),flow:o(s2),lazy:{},string:o(f2),text:o(d2)};return u;function o(c){return f;function f(p){return j2(u,c,p)}}}function C2(t){for(;!Bx(t););return t}const dg=/[\0\t\n\r]/g;function T2(){let t=1,i="",r=!0,u;return o;function o(c,f,p){const g=[];let m,b,x,S,v;for(c=i+(typeof c=="string"?c.toString():new TextDecoder(f||void 0).decode(c)),x=0,i="",r&&(c.charCodeAt(0)===65279&&x++,r=void 0);x<c.length;){if(dg.lastIndex=x,m=dg.exec(c),S=m&&m.index!==void 0?m.index:c.length,v=c.charCodeAt(S),!m){i=c.slice(x);break}if(v===10&&x===S&&u)g.push(-3),u=void 0;else switch(u&&(g.push(-5),u=void 0),x<S&&(g.push(c.slice(x,S)),t+=S-x),v){case 0:{g.push(65533),t++;break}case 9:{for(b=Math.ceil(t/4)*4,g.push(-2);t++<b;)g.push(-1);break}case 10:{g.push(-4),t=1;break}default:u=!0,t=1}x=S+1}return p&&(u&&g.push(-5),i&&g.push(i),g.push(null)),g}}const A2=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function z2(t){return t.replace(A2,D2)}function D2(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const o=r.charCodeAt(1),c=o===120||o===88;return Ox(r.slice(c?2:1),c?16:10)}return bf(r)||t}const Fx={}.hasOwnProperty;function R2(t,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),M2(r)(C2(_2(r).document().write(T2()(t,i,!0))))}function M2(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(bn),autolinkProtocol:J,autolinkEmail:J,atxHeading:c(rn),blockQuote:c(yt),characterEscape:J,characterReference:J,codeFenced:c(Ot),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(Ot,f),codeText:c(ln,f),codeTextData:J,data:J,codeFlowValue:J,definition:c(rl),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(qt),hardBreakEscape:c(En),hardBreakTrailing:c(En),htmlFlow:c(_n,f),htmlFlowData:J,htmlText:c(_n,f),htmlTextData:J,image:c(al),label:f,link:c(bn),listItem:c(Le),listItemValue:S,listOrdered:c(ee,x),listUnordered:c(ee),paragraph:c(it),reference:w,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(rn),strong:c(an),thematicBreak:c(Cn)},exit:{atxHeading:g(),atxHeadingSequence:ie,autolink:g(),autolinkEmail:ge,autolinkProtocol:Ge,blockQuote:g(),characterEscapeValue:U,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:he,characterReference:je,codeFenced:g(L),codeFencedFence:T,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:U,codeIndented:g(E),codeText:g(P),codeTextData:U,data:U,definition:g(),definitionDestinationString:W,definitionLabelString:V,definitionTitleString:R,emphasis:g(),hardBreakEscape:g(le),hardBreakTrailing:g(le),htmlFlow:g(xe),htmlFlowData:U,htmlText:g(oe),htmlTextData:U,image:g(Q),label:me,labelText:se,lineEnding:ne,link:g(D),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:ae,resourceDestinationString:C,resourceTitleString:_,resource:H,setextHeading:g(ue),setextHeadingLineSequence:Y,setextHeadingText:M,strong:g(),thematicBreak:g()}};Xx(i,(t||{}).mdastExtensions||[]);const r={};return u;function u(F){let re={type:"root",children:[]};const ve={stack:[re],tokenStack:[],config:i,enter:p,exit:m,buffer:f,resume:b,data:r},_e=[];let He=-1;for(;++He<F.length;)if(F[He][1].type==="listOrdered"||F[He][1].type==="listUnordered")if(F[He][0]==="enter")_e.push(He);else{const At=_e.pop();He=o(F,At,He)}for(He=-1;++He<F.length;){const At=i[F[He][0]];Fx.call(At,F[He][1].type)&&At[F[He][1].type].call(Object.assign({sliceSerialize:F[He][2].sliceSerialize},ve),F[He][1])}if(ve.tokenStack.length>0){const At=ve.tokenStack[ve.tokenStack.length-1];(At[1]||hg).call(ve,void 0,At[0])}for(re.position={start:zl(F.length>0?F[0][1].start:{line:1,column:1,offset:0}),end:zl(F.length>0?F[F.length-2][1].end:{line:1,column:1,offset:0})},He=-1;++He<i.transforms.length;)re=i.transforms[He](re)||re;return re}function o(F,re,ve){let _e=re-1,He=-1,At=!1,un,vt,at,St;for(;++_e<=ve;){const Fe=F[_e];switch(Fe[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Fe[0]==="enter"?He++:He--,St=void 0;break}case"lineEndingBlank":{Fe[0]==="enter"&&(un&&!St&&!He&&!at&&(at=_e),St=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:St=void 0}if(!He&&Fe[0]==="enter"&&Fe[1].type==="listItemPrefix"||He===-1&&Fe[0]==="exit"&&(Fe[1].type==="listUnordered"||Fe[1].type==="listOrdered")){if(un){let vn=_e;for(vt=void 0;vn--;){const zt=F[vn];if(zt[1].type==="lineEnding"||zt[1].type==="lineEndingBlank"){if(zt[0]==="exit")continue;vt&&(F[vt][1].type="lineEndingBlank",At=!0),zt[1].type="lineEnding",vt=vn}else if(!(zt[1].type==="linePrefix"||zt[1].type==="blockQuotePrefix"||zt[1].type==="blockQuotePrefixWhitespace"||zt[1].type==="blockQuoteMarker"||zt[1].type==="listItemIndent"))break}at&&(!vt||at<vt)&&(un._spread=!0),un.end=Object.assign({},vt?F[vt][1].start:Fe[1].end),F.splice(vt||_e,0,["exit",un,Fe[2]]),_e++,ve++}if(Fe[1].type==="listItemPrefix"){const vn={type:"listItem",_spread:!1,start:Object.assign({},Fe[1].start),end:void 0};un=vn,F.splice(_e,0,["enter",vn,Fe[2]]),_e++,ve++,at=void 0,St=!0}}}return F[re][1]._spread=At,ve}function c(F,re){return ve;function ve(_e){p.call(this,F(_e),_e),re&&re.call(this,_e)}}function f(){this.stack.push({type:"fragment",children:[]})}function p(F,re,ve){this.stack[this.stack.length-1].children.push(F),this.stack.push(F),this.tokenStack.push([re,ve||void 0]),F.position={start:zl(re.start),end:void 0}}function g(F){return re;function re(ve){F&&F.call(this,ve),m.call(this,ve)}}function m(F,re){const ve=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==F.type&&(re?re.call(this,F,_e[0]):(_e[1]||hg).call(this,F,_e[0]));else throw new Error("Cannot close `"+F.type+"` ("+Pr({start:F.start,end:F.end})+"): it’s not open");ve.position.end=zl(F.end)}function b(){return yf(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function S(F){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(F),10),this.data.expectingFirstListItemValue=void 0}}function v(){const F=this.resume(),re=this.stack[this.stack.length-1];re.lang=F}function N(){const F=this.resume(),re=this.stack[this.stack.length-1];re.meta=F}function T(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F.replace(/(\r?\n|\r)$/g,"")}function V(F){const re=this.resume(),ve=this.stack[this.stack.length-1];ve.label=re,ve.identifier=Nn(this.sliceSerialize(F)).toLowerCase()}function R(){const F=this.resume(),re=this.stack[this.stack.length-1];re.title=F}function W(){const F=this.resume(),re=this.stack[this.stack.length-1];re.url=F}function ie(F){const re=this.stack[this.stack.length-1];if(!re.depth){const ve=this.sliceSerialize(F).length;re.depth=ve}}function M(){this.data.setextHeadingSlurpLineEnding=!0}function Y(F){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(F).codePointAt(0)===61?1:2}function ue(){this.data.setextHeadingSlurpLineEnding=void 0}function J(F){const ve=this.stack[this.stack.length-1].children;let _e=ve[ve.length-1];(!_e||_e.type!=="text")&&(_e=rt(),_e.position={start:zl(F.start),end:void 0},ve.push(_e)),this.stack.push(_e)}function U(F){const re=this.stack.pop();re.value+=this.sliceSerialize(F),re.position.end=zl(F.end)}function ne(F){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ve=re.children[re.children.length-1];ve.position.end=zl(F.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(re.type)&&(J.call(this,F),U.call(this,F))}function le(){this.data.atHardBreak=!0}function xe(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function oe(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function P(){const F=this.resume(),re=this.stack[this.stack.length-1];re.value=F}function D(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=re,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function Q(){const F=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";F.type+="Reference",F.referenceType=re,delete F.url,delete F.title}else delete F.identifier,delete F.label;this.data.referenceType=void 0}function se(F){const re=this.sliceSerialize(F),ve=this.stack[this.stack.length-2];ve.label=z2(re),ve.identifier=Nn(re).toLowerCase()}function me(){const F=this.stack[this.stack.length-1],re=this.resume(),ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,ve.type==="link"){const _e=F.children;ve.children=_e}else ve.alt=re}function C(){const F=this.resume(),re=this.stack[this.stack.length-1];re.url=F}function _(){const F=this.resume(),re=this.stack[this.stack.length-1];re.title=F}function H(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function ae(F){const re=this.resume(),ve=this.stack[this.stack.length-1];ve.label=re,ve.identifier=Nn(this.sliceSerialize(F)).toLowerCase(),this.data.referenceType="full"}function fe(F){this.data.characterReferenceType=F.type}function he(F){const re=this.sliceSerialize(F),ve=this.data.characterReferenceType;let _e;ve?(_e=Ox(re,ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=bf(re);const He=this.stack[this.stack.length-1];He.value+=_e}function je(F){const re=this.stack.pop();re.position.end=zl(F.end)}function Ge(F){U.call(this,F);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(F)}function ge(F){U.call(this,F);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(F)}function yt(){return{type:"blockquote",children:[]}}function Ot(){return{type:"code",lang:null,meta:null,value:""}}function ln(){return{type:"inlineCode",value:""}}function rl(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function qt(){return{type:"emphasis",children:[]}}function rn(){return{type:"heading",depth:0,children:[]}}function En(){return{type:"break"}}function _n(){return{type:"html",value:""}}function al(){return{type:"image",title:null,url:"",alt:null}}function bn(){return{type:"link",title:null,url:"",children:[]}}function ee(F){return{type:"list",ordered:F.type==="listOrdered",start:null,spread:F._spread,children:[]}}function Le(F){return{type:"listItem",spread:F._spread,checked:null,children:[]}}function it(){return{type:"paragraph",children:[]}}function an(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function Cn(){return{type:"thematicBreak"}}}function zl(t){return{line:t.line,column:t.column,offset:t.offset}}function Xx(t,i){let r=-1;for(;++r<i.length;){const u=i[r];Array.isArray(u)?Xx(t,u):O2(t,u)}}function O2(t,i){let r;for(r in i)if(Fx.call(i,r))switch(r){case"canContainEols":{const u=i[r];u&&t[r].push(...u);break}case"transforms":{const u=i[r];u&&t[r].push(...u);break}case"enter":case"exit":{const u=i[r];u&&Object.assign(t[r],u);break}}}function hg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+Pr({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+Pr({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Pr({start:i.start,end:i.end})+") is still open")}function L2(t){const i=this;i.parser=r;function r(u){return R2(u,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function U2(t,i){const r={type:"element",tagName:"blockquote",properties:{},children:t.wrap(t.all(i),!0)};return t.patch(i,r),t.applyData(i,r)}function q2(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
|
|
53
|
-
`}]}function B2(t,i){const r=i.value?i.value+`
|
|
54
|
-
`:"",u={},o=i.lang?i.lang.split(/\s+/):[];o.length>0&&(u.className=["language-"+o[0]]);let c={type:"element",tagName:"code",properties:u,children:[{type:"text",value:r}]};return i.meta&&(c.data={meta:i.meta}),t.patch(i,c),c=t.applyData(i,c),c={type:"element",tagName:"pre",properties:{},children:[c]},t.patch(i,c),c}function H2(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function I2(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function Y2(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",u=String(i.identifier).toUpperCase(),o=Pi(u.toLowerCase()),c=t.footnoteOrder.indexOf(u);let f,p=t.footnoteCounts.get(u);p===void 0?(p=0,t.footnoteOrder.push(u),f=t.footnoteOrder.length):f=c+1,p+=1,t.footnoteCounts.set(u,p);const g={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+o,id:r+"fnref-"+o+(p>1?"-"+p:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(f)}]};t.patch(i,g);const m={type:"element",tagName:"sup",properties:{},children:[g]};return t.patch(i,m),t.applyData(i,m)}function G2(t,i){const r={type:"element",tagName:"h"+i.depth,properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function V2(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function Qx(t,i){const r=i.referenceType;let u="]";if(r==="collapsed"?u+="[]":r==="full"&&(u+="["+(i.label||i.identifier)+"]"),i.type==="imageReference")return[{type:"text",value:"!["+i.alt+u}];const o=t.all(i),c=o[0];c&&c.type==="text"?c.value="["+c.value:o.unshift({type:"text",value:"["});const f=o[o.length-1];return f&&f.type==="text"?f.value+=u:o.push({type:"text",value:u}),o}function F2(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return Qx(t,i);const o={src:Pi(u.url||""),alt:i.alt};u.title!==null&&u.title!==void 0&&(o.title=u.title);const c={type:"element",tagName:"img",properties:o,children:[]};return t.patch(i,c),t.applyData(i,c)}function X2(t,i){const r={src:Pi(i.url)};i.alt!==null&&i.alt!==void 0&&(r.alt=i.alt),i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"img",properties:r,children:[]};return t.patch(i,u),t.applyData(i,u)}function Q2(t,i){const r={type:"text",value:i.value.replace(/\r?\n|\r/g," ")};t.patch(i,r);const u={type:"element",tagName:"code",properties:{},children:[r]};return t.patch(i,u),t.applyData(i,u)}function $2(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return Qx(t,i);const o={href:Pi(u.url||"")};u.title!==null&&u.title!==void 0&&(o.title=u.title);const c={type:"element",tagName:"a",properties:o,children:t.all(i)};return t.patch(i,c),t.applyData(i,c)}function Z2(t,i){const r={href:Pi(i.url)};i.title!==null&&i.title!==void 0&&(r.title=i.title);const u={type:"element",tagName:"a",properties:r,children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function K2(t,i,r){const u=t.all(i),o=r?J2(r):$x(i),c={},f=[];if(typeof i.checked=="boolean"){const b=u[0];let x;b&&b.type==="element"&&b.tagName==="p"?x=b:(x={type:"element",tagName:"p",properties:{},children:[]},u.unshift(x)),x.children.length>0&&x.children.unshift({type:"text",value:" "}),x.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:i.checked,disabled:!0},children:[]}),c.className=["task-list-item"]}let p=-1;for(;++p<u.length;){const b=u[p];(o||p!==0||b.type!=="element"||b.tagName!=="p")&&f.push({type:"text",value:`
|
|
55
|
-
`}),b.type==="element"&&b.tagName==="p"&&!o?f.push(...b.children):f.push(b)}const g=u[u.length-1];g&&(o||g.type!=="element"||g.tagName!=="p")&&f.push({type:"text",value:`
|
|
56
|
-
`});const m={type:"element",tagName:"li",properties:c,children:f};return t.patch(i,m),t.applyData(i,m)}function J2(t){let i=!1;if(t.type==="list"){i=t.spread||!1;const r=t.children;let u=-1;for(;!i&&++u<r.length;)i=$x(r[u])}return i}function $x(t){const i=t.spread;return i??t.children.length>1}function P2(t,i){const r={},u=t.all(i);let o=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++o<u.length;){const f=u[o];if(f.type==="element"&&f.tagName==="li"&&f.properties&&Array.isArray(f.properties.className)&&f.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const c={type:"element",tagName:i.ordered?"ol":"ul",properties:r,children:t.wrap(u,!0)};return t.patch(i,c),t.applyData(i,c)}function W2(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function ek(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function tk(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function nk(t,i){const r=t.all(i),u=r.shift(),o=[];if(u){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([u],!0)};t.patch(i.children[0],f),o.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},p=pf(i.children[1]),g=_x(i.children[i.children.length-1]);p&&g&&(f.position={start:p,end:g}),o.push(f)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(o,!0)};return t.patch(i,c),t.applyData(i,c)}function lk(t,i,r){const u=r?r.children:void 0,c=(u?u.indexOf(i):1)===0?"th":"td",f=r&&r.type==="table"?r.align:void 0,p=f?f.length:i.children.length;let g=-1;const m=[];for(;++g<p;){const x=i.children[g],S={},v=f?f[g]:void 0;v&&(S.align=v);let N={type:"element",tagName:c,properties:S,children:[]};x&&(N.children=t.all(x),t.patch(x,N),N=t.applyData(x,N)),m.push(N)}const b={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(i,b),t.applyData(i,b)}function ik(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const pg=9,mg=32;function rk(t){const i=String(t),r=/\r?\n|\r/g;let u=r.exec(i),o=0;const c=[];for(;u;)c.push(gg(i.slice(o,u.index),o>0,!0),u[0]),o=u.index+u[0].length,u=r.exec(i);return c.push(gg(i.slice(o),o>0,!1)),c.join("")}function gg(t,i,r){let u=0,o=t.length;if(i){let c=t.codePointAt(u);for(;c===pg||c===mg;)u++,c=t.codePointAt(u)}if(r){let c=t.codePointAt(o-1);for(;c===pg||c===mg;)o--,c=t.codePointAt(o-1)}return o>u?t.slice(u,o):""}function ak(t,i){const r={type:"text",value:rk(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function uk(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const sk={blockquote:U2,break:q2,code:B2,delete:H2,emphasis:I2,footnoteReference:Y2,heading:G2,html:V2,imageReference:F2,image:X2,inlineCode:Q2,linkReference:$2,link:Z2,listItem:K2,list:P2,paragraph:W2,root:ek,strong:tk,table:nk,tableCell:ik,tableRow:lk,text:ak,thematicBreak:uk,toml:vu,yaml:vu,definition:vu,footnoteDefinition:vu};function vu(){}const Zx=-1,qu=0,ea=1,zu=2,Sf=3,kf=4,wf=5,jf=6,Kx=7,Jx=8,ok=typeof self=="object"?self:globalThis,xg=(t,i)=>{switch(t){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+t)}return new ok[t](i)},ck=(t,i)=>{const r=(o,c)=>(t.set(c,o),o),u=o=>{if(t.has(o))return t.get(o);const[c,f]=i[o];switch(c){case qu:case Zx:return r(f,o);case ea:{const p=r([],o);for(const g of f)p.push(u(g));return p}case zu:{const p=r({},o);for(const[g,m]of f)p[u(g)]=u(m);return p}case Sf:return r(new Date(f),o);case kf:{const{source:p,flags:g}=f;return r(new RegExp(p,g),o)}case wf:{const p=r(new Map,o);for(const[g,m]of f)p.set(u(g),u(m));return p}case jf:{const p=r(new Set,o);for(const g of f)p.add(u(g));return p}case Kx:{const{name:p,message:g}=f;return r(xg(p,g),o)}case Jx:return r(BigInt(f),o);case"BigInt":return r(Object(BigInt(f)),o);case"ArrayBuffer":return r(new Uint8Array(f).buffer,f);case"DataView":{const{buffer:p}=new Uint8Array(f);return r(new DataView(p),f)}}return r(xg(c,f),o)};return u},yg=t=>ck(new Map,t)(0),Qi="",{toString:fk}={},{keys:dk}=Object,Zr=t=>{const i=typeof t;if(i!=="object"||!t)return[qu,i];const r=fk.call(t).slice(8,-1);switch(r){case"Array":return[ea,Qi];case"Object":return[zu,Qi];case"Date":return[Sf,Qi];case"RegExp":return[kf,Qi];case"Map":return[wf,Qi];case"Set":return[jf,Qi];case"DataView":return[ea,r]}return r.includes("Array")?[ea,r]:r.includes("Error")?[Kx,r]:[zu,r]},Su=([t,i])=>t===qu&&(i==="function"||i==="symbol"),hk=(t,i,r,u)=>{const o=(f,p)=>{const g=u.push(f)-1;return r.set(p,g),g},c=f=>{if(r.has(f))return r.get(f);let[p,g]=Zr(f);switch(p){case qu:{let b=f;switch(g){case"bigint":p=Jx,b=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+g);b=null;break;case"undefined":return o([Zx],f)}return o([p,b],f)}case ea:{if(g){let S=f;return g==="DataView"?S=new Uint8Array(f.buffer):g==="ArrayBuffer"&&(S=new Uint8Array(f)),o([g,[...S]],f)}const b=[],x=o([p,b],f);for(const S of f)b.push(c(S));return x}case zu:{if(g)switch(g){case"BigInt":return o([g,f.toString()],f);case"Boolean":case"Number":case"String":return o([g,f.valueOf()],f)}if(i&&"toJSON"in f)return c(f.toJSON());const b=[],x=o([p,b],f);for(const S of dk(f))(t||!Su(Zr(f[S])))&&b.push([c(S),c(f[S])]);return x}case Sf:return o([p,f.toISOString()],f);case kf:{const{source:b,flags:x}=f;return o([p,{source:b,flags:x}],f)}case wf:{const b=[],x=o([p,b],f);for(const[S,v]of f)(t||!(Su(Zr(S))||Su(Zr(v))))&&b.push([c(S),c(v)]);return x}case jf:{const b=[],x=o([p,b],f);for(const S of f)(t||!Su(Zr(S)))&&b.push(c(S));return x}}const{message:m}=f;return o([p,{name:g,message:m}],f)};return c},bg=(t,{json:i,lossy:r}={})=>{const u=[];return hk(!(i||r),!!i,new Map,u)(t),u},Du=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?yg(bg(t,i)):structuredClone(t):(t,i)=>yg(bg(t,i));function pk(t,i){const r=[{type:"text",value:"↩"}];return i>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(i)}]}),r}function mk(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function gk(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||pk,u=t.options.footnoteBackLabel||mk,o=t.options.footnoteLabel||"Footnotes",c=t.options.footnoteLabelTagName||"h2",f=t.options.footnoteLabelProperties||{className:["sr-only"]},p=[];let g=-1;for(;++g<t.footnoteOrder.length;){const m=t.footnoteById.get(t.footnoteOrder[g]);if(!m)continue;const b=t.all(m),x=String(m.identifier).toUpperCase(),S=Pi(x.toLowerCase());let v=0;const N=[],T=t.footnoteCounts.get(x);for(;T!==void 0&&++v<=T;){N.length>0&&N.push({type:"text",value:" "});let V=typeof r=="string"?r:r(g,v);typeof V=="string"&&(V={type:"text",value:V}),N.push({type:"element",tagName:"a",properties:{href:"#"+i+"fnref-"+S+(v>1?"-"+v:""),dataFootnoteBackref:"",ariaLabel:typeof u=="string"?u:u(g,v),className:["data-footnote-backref"]},children:Array.isArray(V)?V:[V]})}const L=b[b.length-1];if(L&&L.type==="element"&&L.tagName==="p"){const V=L.children[L.children.length-1];V&&V.type==="text"?V.value+=" ":L.children.push({type:"text",value:" "}),L.children.push(...N)}else b.push(...N);const E={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:t.wrap(b,!0)};t.patch(m,E),p.push(E)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...Du(f),id:"footnote-label"},children:[{type:"text",value:o}]},{type:"text",value:`
|
|
57
|
-
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(p,!0)},{type:"text",value:`
|
|
58
|
-
`}]}}const Bu=(function(t){if(t==null)return vk;if(typeof t=="function")return Hu(t);if(typeof t=="object")return Array.isArray(t)?xk(t):yk(t);if(typeof t=="string")return bk(t);throw new Error("Expected function, string, or object as test")});function xk(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=Bu(t[r]);return Hu(u);function u(...o){let c=-1;for(;++c<i.length;)if(i[c].apply(this,o))return!0;return!1}}function yk(t){const i=t;return Hu(r);function r(u){const o=u;let c;for(c in t)if(o[c]!==i[c])return!1;return!0}}function bk(t){return Hu(i);function i(r){return r&&r.type===t}}function Hu(t){return i;function i(r,u,o){return!!(Sk(r)&&t.call(this,r,typeof u=="number"?u:void 0,o||void 0))}}function vk(){return!0}function Sk(t){return t!==null&&typeof t=="object"&&"type"in t}const Px=[],kk=!0,Zc=!1,wk="skip";function Wx(t,i,r,u){let o;typeof i=="function"&&typeof r!="function"?(u=r,r=i):o=i;const c=Bu(o),f=u?-1:1;p(t,void 0,[])();function p(g,m,b){const x=g&&typeof g=="object"?g:{};if(typeof x.type=="string"){const v=typeof x.tagName=="string"?x.tagName:typeof x.name=="string"?x.name:void 0;Object.defineProperty(S,"name",{value:"node ("+(g.type+(v?"<"+v+">":""))+")"})}return S;function S(){let v=Px,N,T,L;if((!i||c(g,m,b[b.length-1]||void 0))&&(v=jk(r(g,b)),v[0]===Zc))return v;if("children"in g&&g.children){const E=g;if(E.children&&v[0]!==wk)for(T=(u?E.children.length:-1)+f,L=b.concat(E);T>-1&&T<E.children.length;){const V=E.children[T];if(N=p(V,T,L)(),N[0]===Zc)return N;T=typeof N[1]=="number"?N[1]:T+f}}return v}}}function jk(t){return Array.isArray(t)?t:typeof t=="number"?[kk,t]:t==null?Px:[t]}function Nf(t,i,r,u){let o,c,f;typeof i=="function"&&typeof r!="function"?(c=void 0,f=i,o=r):(c=i,f=r,o=u),Wx(t,c,p,o);function p(g,m){const b=m[m.length-1],x=b?b.children.indexOf(g):void 0;return f(g,x,b)}}const Kc={}.hasOwnProperty,Nk={};function Ek(t,i){const r=i||Nk,u=new Map,o=new Map,c=new Map,f={...sk,...r.handlers},p={all:m,applyData:Ck,definitionById:u,footnoteById:o,footnoteCounts:c,footnoteOrder:[],handlers:f,one:g,options:r,patch:_k,wrap:Ak};return Nf(t,function(b){if(b.type==="definition"||b.type==="footnoteDefinition"){const x=b.type==="definition"?u:o,S=String(b.identifier).toUpperCase();x.has(S)||x.set(S,b)}}),p;function g(b,x){const S=b.type,v=p.handlers[S];if(Kc.call(p.handlers,S)&&v)return v(p,b,x);if(p.options.passThrough&&p.options.passThrough.includes(S)){if("children"in b){const{children:T,...L}=b,E=Du(L);return E.children=p.all(b),E}return Du(b)}return(p.options.unknownHandler||Tk)(p,b,x)}function m(b){const x=[];if("children"in b){const S=b.children;let v=-1;for(;++v<S.length;){const N=p.one(S[v],b);if(N){if(v&&S[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=vg(N.value)),!Array.isArray(N)&&N.type==="element")){const T=N.children[0];T&&T.type==="text"&&(T.value=vg(T.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function _k(t,i){t.position&&(i.position=pv(t))}function Ck(t,i){let r=i;if(t&&t.data){const u=t.data.hName,o=t.data.hChildren,c=t.data.hProperties;if(typeof u=="string")if(r.type==="element")r.tagName=u;else{const f="children"in r?r.children:[r];r={type:"element",tagName:u,properties:{},children:f}}r.type==="element"&&c&&Object.assign(r.properties,Du(c)),"children"in r&&r.children&&o!==null&&o!==void 0&&(r.children=o)}return r}function Tk(t,i){const r=i.data||{},u="value"in i&&!(Kc.call(r,"hProperties")||Kc.call(r,"hChildren"))?{type:"text",value:i.value}:{type:"element",tagName:"div",properties:{},children:t.all(i)};return t.patch(i,u),t.applyData(i,u)}function Ak(t,i){const r=[];let u=-1;for(i&&r.push({type:"text",value:`
|
|
59
|
-
`});++u<t.length;)u&&r.push({type:"text",value:`
|
|
60
|
-
`}),r.push(t[u]);return i&&t.length>0&&r.push({type:"text",value:`
|
|
61
|
-
`}),r}function vg(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function Sg(t,i){const r=Ek(t,i),u=r.one(t,void 0),o=gk(r),c=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return o&&c.children.push({type:"text",value:`
|
|
62
|
-
`},o),c}function zk(t,i){return t&&"run"in t?async function(r,u){const o=Sg(r,{file:u,...i});await t.run(o,u)}:function(r,u){return Sg(r,{file:u,...t||i})}}function kg(t){if(t)throw t}var mc,wg;function Dk(){if(wg)return mc;wg=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,o=function(m){return typeof Array.isArray=="function"?Array.isArray(m):i.call(m)==="[object Array]"},c=function(m){if(!m||i.call(m)!=="[object Object]")return!1;var b=t.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!b&&!x)return!1;var S;for(S in m);return typeof S>"u"||t.call(m,S)},f=function(m,b){r&&b.name==="__proto__"?r(m,b.name,{enumerable:!0,configurable:!0,value:b.newValue,writable:!0}):m[b.name]=b.newValue},p=function(m,b){if(b==="__proto__")if(t.call(m,b)){if(u)return u(m,b).value}else return;return m[b]};return mc=function g(){var m,b,x,S,v,N,T=arguments[0],L=1,E=arguments.length,V=!1;for(typeof T=="boolean"&&(V=T,T=arguments[1]||{},L=2),(T==null||typeof T!="object"&&typeof T!="function")&&(T={});L<E;++L)if(m=arguments[L],m!=null)for(b in m)x=p(T,b),S=p(m,b),T!==S&&(V&&S&&(c(S)||(v=o(S)))?(v?(v=!1,N=x&&o(x)?x:[]):N=x&&c(x)?x:{},f(T,{name:b,newValue:g(V,N,S)})):typeof S<"u"&&f(T,{name:b,newValue:S}));return T},mc}var Rk=Dk();const gc=Ou(Rk);function Jc(t){if(typeof t!="object"||t===null)return!1;const i=Object.getPrototypeOf(t);return(i===null||i===Object.prototype||Object.getPrototypeOf(i)===null)&&!(Symbol.toStringTag in t)&&!(Symbol.iterator in t)}function Mk(){const t=[],i={run:r,use:u};return i;function r(...o){let c=-1;const f=o.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);p(null,...o);function p(g,...m){const b=t[++c];let x=-1;if(g){f(g);return}for(;++x<o.length;)(m[x]===null||m[x]===void 0)&&(m[x]=o[x]);o=m,b?Ok(b,p)(...m):f(null,...m)}}function u(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return t.push(o),i}}function Ok(t,i){let r;return u;function u(...f){const p=t.length>f.length;let g;p&&f.push(o);try{g=t.apply(this,f)}catch(m){const b=m;if(p&&r)throw b;return o(b)}p||(g&&g.then&&typeof g.then=="function"?g.then(c,o):g instanceof Error?o(g):c(g))}function o(f,...p){r||(r=!0,i(f,...p))}function c(f){o(null,f)}}const Mn={basename:Lk,dirname:Uk,extname:qk,join:Bk,sep:"/"};function Lk(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');ra(t);let r=0,u=-1,o=t.length,c;if(i===void 0||i.length===0||i.length>t.length){for(;o--;)if(t.codePointAt(o)===47){if(c){r=o+1;break}}else u<0&&(c=!0,u=o+1);return u<0?"":t.slice(r,u)}if(i===t)return"";let f=-1,p=i.length-1;for(;o--;)if(t.codePointAt(o)===47){if(c){r=o+1;break}}else f<0&&(c=!0,f=o+1),p>-1&&(t.codePointAt(o)===i.codePointAt(p--)?p<0&&(u=o):(p=-1,u=f));return r===u?u=f:u<0&&(u=t.length),t.slice(r,u)}function Uk(t){if(ra(t),t.length===0)return".";let i=-1,r=t.length,u;for(;--r;)if(t.codePointAt(r)===47){if(u){i=r;break}}else u||(u=!0);return i<0?t.codePointAt(0)===47?"/":".":i===1&&t.codePointAt(0)===47?"//":t.slice(0,i)}function qk(t){ra(t);let i=t.length,r=-1,u=0,o=-1,c=0,f;for(;i--;){const p=t.codePointAt(i);if(p===47){if(f){u=i+1;break}continue}r<0&&(f=!0,r=i+1),p===46?o<0?o=i:c!==1&&(c=1):o>-1&&(c=-1)}return o<0||r<0||c===0||c===1&&o===r-1&&o===u+1?"":t.slice(o,r)}function Bk(...t){let i=-1,r;for(;++i<t.length;)ra(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":Hk(r)}function Hk(t){ra(t);const i=t.codePointAt(0)===47;let r=Ik(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function Ik(t,i){let r="",u=0,o=-1,c=0,f=-1,p,g;for(;++f<=t.length;){if(f<t.length)p=t.codePointAt(f);else{if(p===47)break;p=47}if(p===47){if(!(o===f-1||c===1))if(o!==f-1&&c===2){if(r.length<2||u!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(g=r.lastIndexOf("/"),g!==r.length-1){g<0?(r="",u=0):(r=r.slice(0,g),u=r.length-1-r.lastIndexOf("/")),o=f,c=0;continue}}else if(r.length>0){r="",u=0,o=f,c=0;continue}}i&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+t.slice(o+1,f):r=t.slice(o+1,f),u=f-o-1;o=f,c=0}else p===46&&c>-1?c++:c=-1}return r}function ra(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const Yk={cwd:Gk};function Gk(){return"/"}function Pc(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Vk(t){if(typeof t=="string")t=new URL(t);else if(!Pc(t)){const i=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+t+"`");throw i.code="ERR_INVALID_ARG_TYPE",i}if(t.protocol!=="file:"){const i=new TypeError("The URL must be of scheme file");throw i.code="ERR_INVALID_URL_SCHEME",i}return Fk(t)}function Fk(t){if(t.hostname!==""){const u=new TypeError('File URL host must be "localhost" or empty on darwin');throw u.code="ERR_INVALID_FILE_URL_HOST",u}const i=t.pathname;let r=-1;for(;++r<i.length;)if(i.codePointAt(r)===37&&i.codePointAt(r+1)===50){const u=i.codePointAt(r+2);if(u===70||u===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(i)}const xc=["history","path","basename","stem","extname","dirname"];class ey{constructor(i){let r;i?Pc(i)?r={path:i}:typeof i=="string"||Xk(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":Yk.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<xc.length;){const c=xc[u];c in r&&r[c]!==void 0&&r[c]!==null&&(this[c]=c==="history"?[...r[c]]:r[c])}let o;for(o in r)xc.includes(o)||(this[o]=r[o])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(i){bc(i,"basename"),yc(i,"basename"),this.path=Mn.join(this.dirname||"",i)}get dirname(){return typeof this.path=="string"?Mn.dirname(this.path):void 0}set dirname(i){jg(this.basename,"dirname"),this.path=Mn.join(i||"",this.basename)}get extname(){return typeof this.path=="string"?Mn.extname(this.path):void 0}set extname(i){if(yc(i,"extname"),jg(this.dirname,"extname"),i){if(i.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(i.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Mn.join(this.dirname,this.stem+(i||""))}get path(){return this.history[this.history.length-1]}set path(i){Pc(i)&&(i=Vk(i)),bc(i,"path"),this.path!==i&&this.history.push(i)}get stem(){return typeof this.path=="string"?Mn.basename(this.path,this.extname):void 0}set stem(i){bc(i,"stem"),yc(i,"stem"),this.path=Mn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,u){const o=this.message(i,r,u);throw o.fatal=!0,o}info(i,r,u){const o=this.message(i,r,u);return o.fatal=void 0,o}message(i,r,u){const o=new Mt(i,r,u);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function yc(t,i){if(t&&t.includes(Mn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Mn.sep+"`")}function bc(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function jg(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function Xk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Qk=(function(t){const u=this.constructor.prototype,o=u[t],c=function(){return o.apply(c,arguments)};return Object.setPrototypeOf(c,u),c}),$k={}.hasOwnProperty;class Ef extends Qk{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=Mk()}copy(){const i=new Ef;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];i.use(...u)}return i.data(gc(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(kc("data",this.frozen),this.namespace[i]=r,this):$k.call(this.namespace,i)&&this.namespace[i]||void 0:i?(kc("data",this.frozen),this.namespace=i,this):this.namespace}freeze(){if(this.frozen)return this;const i=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...u]=this.attachers[this.freezeIndex];if(u[0]===!1)continue;u[0]===!0&&(u[0]=void 0);const o=r.call(i,...u);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=ku(i),u=this.parser||this.Parser;return vc("parse",u),u(String(r),r)}process(i,r){const u=this;return this.freeze(),vc("process",this.parser||this.Parser),Sc("process",this.compiler||this.Compiler),r?o(void 0,r):new Promise(o);function o(c,f){const p=ku(i),g=u.parse(p);u.run(g,p,function(b,x,S){if(b||!x||!S)return m(b);const v=x,N=u.stringify(v,S);Jk(N)?S.value=N:S.result=N,m(b,S)});function m(b,x){b||!x?f(b):c?c(x):r(void 0,x)}}}processSync(i){let r=!1,u;return this.freeze(),vc("processSync",this.parser||this.Parser),Sc("processSync",this.compiler||this.Compiler),this.process(i,o),Eg("processSync","process",r),u;function o(c,f){r=!0,kg(c),u=f}}run(i,r,u){Ng(i),this.freeze();const o=this.transformers;return!u&&typeof r=="function"&&(u=r,r=void 0),u?c(void 0,u):new Promise(c);function c(f,p){const g=ku(r);o.run(i,g,m);function m(b,x,S){const v=x||i;b?p(b):f?f(v):u(void 0,v,S)}}}runSync(i,r){let u=!1,o;return this.run(i,r,c),Eg("runSync","run",u),o;function c(f,p){kg(f),o=p,u=!0}}stringify(i,r){this.freeze();const u=ku(r),o=this.compiler||this.Compiler;return Sc("stringify",o),Ng(i),o(i,u)}use(i,...r){const u=this.attachers,o=this.namespace;if(kc("use",this.frozen),i!=null)if(typeof i=="function")g(i,r);else if(typeof i=="object")Array.isArray(i)?p(i):f(i);else throw new TypeError("Expected usable value, not `"+i+"`");return this;function c(m){if(typeof m=="function")g(m,[]);else if(typeof m=="object")if(Array.isArray(m)){const[b,...x]=m;g(b,x)}else f(m);else throw new TypeError("Expected usable value, not `"+m+"`")}function f(m){if(!("plugins"in m)&&!("settings"in m))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");p(m.plugins),m.settings&&(o.settings=gc(!0,o.settings,m.settings))}function p(m){let b=-1;if(m!=null)if(Array.isArray(m))for(;++b<m.length;){const x=m[b];c(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function g(m,b){let x=-1,S=-1;for(;++x<u.length;)if(u[x][0]===m){S=x;break}if(S===-1)u.push([m,...b]);else if(b.length>0){let[v,...N]=b;const T=u[S][1];Jc(T)&&Jc(v)&&(v=gc(!0,T,v)),u[S]=[m,v,...N]}}}}const Zk=new Ef().freeze();function vc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Sc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function kc(t,i){if(i)throw new Error("Cannot call `"+t+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Ng(t){if(!Jc(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Eg(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function ku(t){return Kk(t)?t:new ey(t)}function Kk(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function Jk(t){return typeof t=="string"||Pk(t)}function Pk(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const Wk="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",_g=[],Cg={allowDangerousHtml:!0},ew=/^(https?|ircs?|mailto|xmpp)$/i,tw=[{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 nw(t){const i=lw(t),r=iw(t);return rw(i.runSync(i.parse(r),r),t)}function lw(t){const i=t.rehypePlugins||_g,r=t.remarkPlugins||_g,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...Cg}:Cg;return Zk().use(L2).use(r).use(zk,u).use(i)}function iw(t){const i=t.children||"",r=new ey;return typeof i=="string"&&(r.value=i),r}function rw(t,i){const r=i.allowedElements,u=i.allowElement,o=i.components,c=i.disallowedElements,f=i.skipHtml,p=i.unwrapDisallowed,g=i.urlTransform||aw;for(const b of tw)Object.hasOwn(i,b.from)&&(""+b.from+(b.to?"use `"+b.to+"` instead":"remove it")+Wk+b.id,void 0);return Nf(t,m),bv(t,{Fragment:h.Fragment,components:o,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function m(b,x,S){if(b.type==="raw"&&S&&typeof x=="number")return f?S.children.splice(x,1):S.children[x]={type:"text",value:b.value},x;if(b.type==="element"){let v;for(v in dc)if(Object.hasOwn(dc,v)&&Object.hasOwn(b.properties,v)){const N=b.properties[v],T=dc[v];(T===null||T.includes(b.tagName))&&(b.properties[v]=g(String(N||""),v,b))}}if(b.type==="element"){let v=r?!r.includes(b.tagName):c?c.includes(b.tagName):!1;if(!v&&u&&typeof x=="number"&&(v=!u(b,x,S)),v&&S&&typeof x=="number")return p&&b.children?S.children.splice(x,1,...b.children):S.children.splice(x,1),x}}}function aw(t){const i=t.indexOf(":"),r=t.indexOf("?"),u=t.indexOf("#"),o=t.indexOf("/");return i===-1||o!==-1&&i>o||r!==-1&&i>r||u!==-1&&i>u||ew.test(t.slice(0,i))?t:""}function Tg(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let u=0,o=r.indexOf(i);for(;o!==-1;)u++,o=r.indexOf(i,o+i.length);return u}function uw(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function sw(t,i,r){const o=Bu((r||{}).ignore||[]),c=ow(i);let f=-1;for(;++f<c.length;)Wx(t,"text",p);function p(m,b){let x=-1,S;for(;++x<b.length;){const v=b[x],N=S?S.children:void 0;if(o(v,N?N.indexOf(v):void 0,S))return;S=v}if(S)return g(m,b)}function g(m,b){const x=b[b.length-1],S=c[f][0],v=c[f][1];let N=0;const L=x.children.indexOf(m);let E=!1,V=[];S.lastIndex=0;let R=S.exec(m.value);for(;R;){const W=R.index,ie={index:R.index,input:R.input,stack:[...b,m]};let M=v(...R,ie);if(typeof M=="string"&&(M=M.length>0?{type:"text",value:M}:void 0),M===!1?S.lastIndex=W+1:(N!==W&&V.push({type:"text",value:m.value.slice(N,W)}),Array.isArray(M)?V.push(...M):M&&V.push(M),N=W+R[0].length,E=!0),!S.global)break;R=S.exec(m.value)}return E?(N<m.value.length&&V.push({type:"text",value:m.value.slice(N)}),x.children.splice(L,1,...V)):V=[m],L+V.length}}function ow(t){const i=[];if(!Array.isArray(t))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!t[0]||Array.isArray(t[0])?t:[t];let u=-1;for(;++u<r.length;){const o=r[u];i.push([cw(o[0]),fw(o[1])])}return i}function cw(t){return typeof t=="string"?new RegExp(uw(t),"g"):t}function fw(t){return typeof t=="function"?t:function(){return t}}const wc="phrasing",jc=["autolink","link","image","label"];function dw(){return{transforms:[bw],enter:{literalAutolink:pw,literalAutolinkEmail:Nc,literalAutolinkHttp:Nc,literalAutolinkWww:Nc},exit:{literalAutolink:yw,literalAutolinkEmail:xw,literalAutolinkHttp:mw,literalAutolinkWww:gw}}}function hw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:wc,notInConstruct:jc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:wc,notInConstruct:jc},{character:":",before:"[ps]",after:"\\/",inConstruct:wc,notInConstruct:jc}]}}function pw(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Nc(t){this.config.enter.autolinkProtocol.call(this,t)}function mw(t){this.config.exit.autolinkProtocol.call(this,t)}function gw(t){this.config.exit.data.call(this,t);const i=this.stack[this.stack.length-1];i.type,i.url="http://"+this.sliceSerialize(t)}function xw(t){this.config.exit.autolinkEmail.call(this,t)}function yw(t){this.exit(t)}function bw(t){sw(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,vw],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Sw]],{ignore:["link","linkReference"]})}function vw(t,i,r,u,o){let c="";if(!ty(o)||(/^w/i.test(i)&&(r=i+r,i="",c="http://"),!kw(r)))return!1;const f=ww(r+u);if(!f[0])return!1;const p={type:"link",title:null,url:c+i+f[0],children:[{type:"text",value:i+f[0]}]};return f[1]?[p,{type:"text",value:f[1]}]:p}function Sw(t,i,r,u){return!ty(u,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function kw(t){const i=t.split(".");return!(i.length<2||i[i.length-1]&&(/_/.test(i[i.length-1])||!/[a-zA-Z\d]/.test(i[i.length-1]))||i[i.length-2]&&(/_/.test(i[i.length-2])||!/[a-zA-Z\d]/.test(i[i.length-2])))}function ww(t){const i=/[!"&'),.:;<>?\]}]+$/.exec(t);if(!i)return[t,void 0];t=t.slice(0,i.index);let r=i[0],u=r.indexOf(")");const o=Tg(t,"(");let c=Tg(t,")");for(;u!==-1&&o>c;)t+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),c++;return[t,r]}function ty(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||ii(r)||Lu(r))&&(!i||r!==47)}ny.peek=Dw;function jw(){this.buffer()}function Nw(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Ew(){this.buffer()}function _w(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Cw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Nn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Tw(t){this.exit(t)}function Aw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Nn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function zw(t){this.exit(t)}function Dw(){return"["}function ny(t,i,r,u){const o=r.createTracker(u);let c=o.move("[^");const f=r.enter("footnoteReference"),p=r.enter("reference");return c+=o.move(r.safe(r.associationId(t),{after:"]",before:c})),p(),f(),c+=o.move("]"),c}function Rw(){return{enter:{gfmFootnoteCallString:jw,gfmFootnoteCall:Nw,gfmFootnoteDefinitionLabelString:Ew,gfmFootnoteDefinition:_w},exit:{gfmFootnoteCallString:Cw,gfmFootnoteCall:Tw,gfmFootnoteDefinitionLabelString:Aw,gfmFootnoteDefinition:zw}}}function Mw(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:ny},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,o,c,f){const p=c.createTracker(f);let g=p.move("[^");const m=c.enter("footnoteDefinition"),b=c.enter("label");return g+=p.move(c.safe(c.associationId(u),{before:g,after:"]"})),b(),g+=p.move("]:"),u.children&&u.children.length>0&&(p.shift(4),g+=p.move((i?`
|
|
63
|
-
`:" ")+c.indentLines(c.containerFlow(u,p.current()),i?ly:Ow))),m(),g}}function Ow(t,i,r){return i===0?t:ly(t,i,r)}function ly(t,i,r){return(r?"":" ")+t}const Lw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];iy.peek=Iw;function Uw(){return{canContainEols:["delete"],enter:{strikethrough:Bw},exit:{strikethrough:Hw}}}function qw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Lw}],handlers:{delete:iy}}}function Bw(t){this.enter({type:"delete",children:[]},t)}function Hw(t){this.exit(t)}function iy(t,i,r,u){const o=r.createTracker(u),c=r.enter("strikethrough");let f=o.move("~~");return f+=r.containerPhrasing(t,{...o.current(),before:f,after:"~"}),f+=o.move("~~"),c(),f}function Iw(){return"~"}function Yw(t){return t.length}function Gw(t,i){const r=i||{},u=(r.align||[]).concat(),o=r.stringLength||Yw,c=[],f=[],p=[],g=[];let m=0,b=-1;for(;++b<t.length;){const T=[],L=[];let E=-1;for(t[b].length>m&&(m=t[b].length);++E<t[b].length;){const V=Vw(t[b][E]);if(r.alignDelimiters!==!1){const R=o(V);L[E]=R,(g[E]===void 0||R>g[E])&&(g[E]=R)}T.push(V)}f[b]=T,p[b]=L}let x=-1;if(typeof u=="object"&&"length"in u)for(;++x<m;)c[x]=Ag(u[x]);else{const T=Ag(u);for(;++x<m;)c[x]=T}x=-1;const S=[],v=[];for(;++x<m;){const T=c[x];let L="",E="";T===99?(L=":",E=":"):T===108?L=":":T===114&&(E=":");let V=r.alignDelimiters===!1?1:Math.max(1,g[x]-L.length-E.length);const R=L+"-".repeat(V)+E;r.alignDelimiters!==!1&&(V=L.length+V+E.length,V>g[x]&&(g[x]=V),v[x]=V),S[x]=R}f.splice(1,0,S),p.splice(1,0,v),b=-1;const N=[];for(;++b<f.length;){const T=f[b],L=p[b];x=-1;const E=[];for(;++x<m;){const V=T[x]||"";let R="",W="";if(r.alignDelimiters!==!1){const ie=g[x]-(L[x]||0),M=c[x];M===114?R=" ".repeat(ie):M===99?ie%2?(R=" ".repeat(ie/2+.5),W=" ".repeat(ie/2-.5)):(R=" ".repeat(ie/2),W=R):W=" ".repeat(ie)}r.delimiterStart!==!1&&!x&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&V==="")&&(r.delimiterStart!==!1||x)&&E.push(" "),r.alignDelimiters!==!1&&E.push(R),E.push(V),r.alignDelimiters!==!1&&E.push(W),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&E.push("|")}N.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return N.join(`
|
|
64
|
-
`)}function Vw(t){return t==null?"":String(t)}function Ag(t){const i=typeof t=="string"?t.codePointAt(0):0;return i===67||i===99?99:i===76||i===108?108:i===82||i===114?114:0}function Fw(t,i,r,u){const o=r.enter("blockquote"),c=r.createTracker(u);c.move("> "),c.shift(2);const f=r.indentLines(r.containerFlow(t,c.current()),Xw);return o(),f}function Xw(t,i,r){return">"+(r?"":" ")+t}function Qw(t,i){return zg(t,i.inConstruct,!0)&&!zg(t,i.notInConstruct,!1)}function zg(t,i,r){if(typeof i=="string"&&(i=[i]),!i||i.length===0)return r;let u=-1;for(;++u<i.length;)if(t.includes(i[u]))return!0;return!1}function Dg(t,i,r,u){let o=-1;for(;++o<r.unsafe.length;)if(r.unsafe[o].character===`
|
|
65
|
-
`&&Qw(r.stack,r.unsafe[o]))return/[ \t]/.test(u.before)?"":" ";return`\\
|
|
66
|
-
`}function $w(t,i){const r=String(t);let u=r.indexOf(i),o=u,c=0,f=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;u!==-1;)u===o?++c>f&&(f=c):c=1,o=u+i.length,u=r.indexOf(i,o);return f}function Zw(t,i){return!!(i.options.fences===!1&&t.value&&!t.lang&&/[^ \r\n]/.test(t.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(t.value))}function Kw(t){const i=t.options.fence||"`";if(i!=="`"&&i!=="~")throw new Error("Cannot serialize code with `"+i+"` for `options.fence`, expected `` ` `` or `~`");return i}function Jw(t,i,r,u){const o=Kw(r),c=t.value||"",f=o==="`"?"GraveAccent":"Tilde";if(Zw(t,r)){const x=r.enter("codeIndented"),S=r.indentLines(c,Pw);return x(),S}const p=r.createTracker(u),g=o.repeat(Math.max($w(c,o)+1,3)),m=r.enter("codeFenced");let b=p.move(g);if(t.lang){const x=r.enter(`codeFencedLang${f}`);b+=p.move(r.safe(t.lang,{before:b,after:" ",encode:["`"],...p.current()})),x()}if(t.lang&&t.meta){const x=r.enter(`codeFencedMeta${f}`);b+=p.move(" "),b+=p.move(r.safe(t.meta,{before:b,after:`
|
|
67
|
-
`,encode:["`"],...p.current()})),x()}return b+=p.move(`
|
|
68
|
-
`),c&&(b+=p.move(c+`
|
|
69
|
-
`)),b+=p.move(g),m(),b}function Pw(t,i,r){return(r?"":" ")+t}function _f(t){const i=t.options.quote||'"';if(i!=='"'&&i!=="'")throw new Error("Cannot serialize title with `"+i+"` for `options.quote`, expected `\"`, or `'`");return i}function Ww(t,i,r,u){const o=_f(r),c=o==='"'?"Quote":"Apostrophe",f=r.enter("definition");let p=r.enter("label");const g=r.createTracker(u);let m=g.move("[");return m+=g.move(r.safe(r.associationId(t),{before:m,after:"]",...g.current()})),m+=g.move("]: "),p(),!t.url||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(t.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(p=r.enter("destinationRaw"),m+=g.move(r.safe(t.url,{before:m,after:t.title?" ":`
|
|
70
|
-
`,...g.current()}))),p(),t.title&&(p=r.enter(`title${c}`),m+=g.move(" "+o),m+=g.move(r.safe(t.title,{before:m,after:o,...g.current()})),m+=g.move(o),p()),f(),m}function ej(t){const i=t.options.emphasis||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize emphasis with `"+i+"` for `options.emphasis`, expected `*`, or `_`");return i}function na(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ru(t,i,r){const u=Ki(t),o=Ki(i);return u===void 0?o===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ry.peek=tj;function ry(t,i,r,u){const o=ej(r),c=r.enter("emphasis"),f=r.createTracker(u),p=f.move(o);let g=f.move(r.containerPhrasing(t,{after:o,before:p,...f.current()}));const m=g.charCodeAt(0),b=Ru(u.before.charCodeAt(u.before.length-1),m,o);b.inside&&(g=na(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Ru(u.after.charCodeAt(0),x,o);S.inside&&(g=g.slice(0,-1)+na(x));const v=f.move(o);return c(),r.attentionEncodeSurroundingInfo={after:S.outside,before:b.outside},p+g+v}function tj(t,i,r){return r.options.emphasis||"*"}function nj(t,i){let r=!1;return Nf(t,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,Zc}),!!((!t.depth||t.depth<3)&&yf(t)&&(i.options.setext||r))}function lj(t,i,r,u){const o=Math.max(Math.min(6,t.depth||1),1),c=r.createTracker(u);if(nj(t,r)){const b=r.enter("headingSetext"),x=r.enter("phrasing"),S=r.containerPhrasing(t,{...c.current(),before:`
|
|
71
|
-
`,after:`
|
|
72
|
-
`});return x(),b(),S+`
|
|
73
|
-
`+(o===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(`
|
|
74
|
-
`))+1))}const f="#".repeat(o),p=r.enter("headingAtx"),g=r.enter("phrasing");c.move(f+" ");let m=r.containerPhrasing(t,{before:"# ",after:`
|
|
75
|
-
`,...c.current()});return/^[\t ]/.test(m)&&(m=na(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,r.options.closeAtx&&(m+=" "+f),g(),p(),m}ay.peek=ij;function ay(t){return t.value||""}function ij(){return"<"}uy.peek=rj;function uy(t,i,r,u){const o=_f(r),c=o==='"'?"Quote":"Apostrophe",f=r.enter("image");let p=r.enter("label");const g=r.createTracker(u);let m=g.move("![");return m+=g.move(r.safe(t.alt,{before:m,after:"]",...g.current()})),m+=g.move("]("),p(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(p=r.enter("destinationLiteral"),m+=g.move("<"),m+=g.move(r.safe(t.url,{before:m,after:">",...g.current()})),m+=g.move(">")):(p=r.enter("destinationRaw"),m+=g.move(r.safe(t.url,{before:m,after:t.title?" ":")",...g.current()}))),p(),t.title&&(p=r.enter(`title${c}`),m+=g.move(" "+o),m+=g.move(r.safe(t.title,{before:m,after:o,...g.current()})),m+=g.move(o),p()),m+=g.move(")"),f(),m}function rj(){return"!"}sy.peek=aj;function sy(t,i,r,u){const o=t.referenceType,c=r.enter("imageReference");let f=r.enter("label");const p=r.createTracker(u);let g=p.move("![");const m=r.safe(t.alt,{before:g,after:"]",...p.current()});g+=p.move(m+"]["),f();const b=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...p.current()});return f(),r.stack=b,c(),o==="full"||!m||m!==x?g+=p.move(x+"]"):o==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function aj(){return"!"}oy.peek=uj;function oy(t,i,r){let u=t.value||"",o="`",c=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(u);)o+="`";for(/[^ \r\n]/.test(u)&&(/^[ \r\n]/.test(u)&&/[ \r\n]$/.test(u)||/^`|`$/.test(u))&&(u=" "+u+" ");++c<r.unsafe.length;){const f=r.unsafe[c],p=r.compilePattern(f);let g;if(f.atBreak)for(;g=p.exec(u);){let m=g.index;u.charCodeAt(m)===10&&u.charCodeAt(m-1)===13&&m--,u=u.slice(0,m)+" "+u.slice(g.index+1)}}return o+u+o}function uj(){return"`"}function cy(t,i){const r=yf(t);return!!(!i.options.resourceLink&&t.url&&!t.title&&t.children&&t.children.length===1&&t.children[0].type==="text"&&(r===t.url||"mailto:"+r===t.url)&&/^[a-z][a-z+.-]+:/i.test(t.url)&&!/[\0- <>\u007F]/.test(t.url))}fy.peek=sj;function fy(t,i,r,u){const o=_f(r),c=o==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let p,g;if(cy(t,r)){const b=r.stack;r.stack=[],p=r.enter("autolink");let x=f.move("<");return x+=f.move(r.containerPhrasing(t,{before:x,after:">",...f.current()})),x+=f.move(">"),p(),r.stack=b,x}p=r.enter("link"),g=r.enter("label");let m=f.move("[");return m+=f.move(r.containerPhrasing(t,{before:m,after:"](",...f.current()})),m+=f.move("]("),g(),!t.url&&t.title||/[\0- \u007F]/.test(t.url)?(g=r.enter("destinationLiteral"),m+=f.move("<"),m+=f.move(r.safe(t.url,{before:m,after:">",...f.current()})),m+=f.move(">")):(g=r.enter("destinationRaw"),m+=f.move(r.safe(t.url,{before:m,after:t.title?" ":")",...f.current()}))),g(),t.title&&(g=r.enter(`title${c}`),m+=f.move(" "+o),m+=f.move(r.safe(t.title,{before:m,after:o,...f.current()})),m+=f.move(o),g()),m+=f.move(")"),p(),m}function sj(t,i,r){return cy(t,r)?"<":"["}dy.peek=oj;function dy(t,i,r,u){const o=t.referenceType,c=r.enter("linkReference");let f=r.enter("label");const p=r.createTracker(u);let g=p.move("[");const m=r.containerPhrasing(t,{before:g,after:"]",...p.current()});g+=p.move(m+"]["),f();const b=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...p.current()});return f(),r.stack=b,c(),o==="full"||!m||m!==x?g+=p.move(x+"]"):o==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function oj(){return"["}function Cf(t){const i=t.options.bullet||"*";if(i!=="*"&&i!=="+"&&i!=="-")throw new Error("Cannot serialize items with `"+i+"` for `options.bullet`, expected `*`, `+`, or `-`");return i}function cj(t){const i=Cf(t),r=t.options.bulletOther;if(!r)return i==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===i)throw new Error("Expected `bullet` (`"+i+"`) and `bulletOther` (`"+r+"`) to be different");return r}function fj(t){const i=t.options.bulletOrdered||".";if(i!=="."&&i!==")")throw new Error("Cannot serialize items with `"+i+"` for `options.bulletOrdered`, expected `.` or `)`");return i}function hy(t){const i=t.options.rule||"*";if(i!=="*"&&i!=="-"&&i!=="_")throw new Error("Cannot serialize rules with `"+i+"` for `options.rule`, expected `*`, `-`, or `_`");return i}function dj(t,i,r,u){const o=r.enter("list"),c=r.bulletCurrent;let f=t.ordered?fj(r):Cf(r);const p=t.ordered?f==="."?")":".":cj(r);let g=i&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!t.ordered){const b=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&b&&(!b.children||!b.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(g=!0),hy(r)===f&&b){let x=-1;for(;++x<t.children.length;){const S=t.children[x];if(S&&S.type==="listItem"&&S.children&&S.children[0]&&S.children[0].type==="thematicBreak"){g=!0;break}}}}g&&(f=p),r.bulletCurrent=f;const m=r.containerFlow(t,u);return r.bulletLastUsed=f,r.bulletCurrent=c,o(),m}function hj(t){const i=t.options.listItemIndent||"one";if(i!=="tab"&&i!=="one"&&i!=="mixed")throw new Error("Cannot serialize items with `"+i+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return i}function pj(t,i,r,u){const o=hj(r);let c=r.bulletCurrent||Cf(r);i&&i.type==="list"&&i.ordered&&(c=(typeof i.start=="number"&&i.start>-1?i.start:1)+(r.options.incrementListMarker===!1?0:i.children.indexOf(t))+c);let f=c.length+1;(o==="tab"||o==="mixed"&&(i&&i.type==="list"&&i.spread||t.spread))&&(f=Math.ceil(f/4)*4);const p=r.createTracker(u);p.move(c+" ".repeat(f-c.length)),p.shift(f);const g=r.enter("listItem"),m=r.indentLines(r.containerFlow(t,p.current()),b);return g(),m;function b(x,S,v){return S?(v?"":" ".repeat(f))+x:(v?c:c+" ".repeat(f-c.length))+x}}function mj(t,i,r,u){const o=r.enter("paragraph"),c=r.enter("phrasing"),f=r.containerPhrasing(t,u);return c(),o(),f}const gj=Bu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function xj(t,i,r,u){return(t.children.some(function(f){return gj(f)})?r.containerPhrasing:r.containerFlow).call(r,t,u)}function yj(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}py.peek=bj;function py(t,i,r,u){const o=yj(r),c=r.enter("strong"),f=r.createTracker(u),p=f.move(o+o);let g=f.move(r.containerPhrasing(t,{after:o,before:p,...f.current()}));const m=g.charCodeAt(0),b=Ru(u.before.charCodeAt(u.before.length-1),m,o);b.inside&&(g=na(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Ru(u.after.charCodeAt(0),x,o);S.inside&&(g=g.slice(0,-1)+na(x));const v=f.move(o+o);return c(),r.attentionEncodeSurroundingInfo={after:S.outside,before:b.outside},p+g+v}function bj(t,i,r){return r.options.strong||"*"}function vj(t,i,r,u){return r.safe(t.value,u)}function Sj(t){const i=t.options.ruleRepetition||3;if(i<3)throw new Error("Cannot serialize rules with repetition `"+i+"` for `options.ruleRepetition`, expected `3` or more");return i}function kj(t,i,r){const u=(hy(r)+(r.options.ruleSpaces?" ":"")).repeat(Sj(r));return r.options.ruleSpaces?u.slice(0,-1):u}const my={blockquote:Fw,break:Dg,code:Jw,definition:Ww,emphasis:ry,hardBreak:Dg,heading:lj,html:ay,image:uy,imageReference:sy,inlineCode:oy,link:fy,linkReference:dy,list:dj,listItem:pj,paragraph:mj,root:xj,strong:py,text:vj,thematicBreak:kj};function wj(){return{enter:{table:jj,tableData:Rg,tableHeader:Rg,tableRow:Ej},exit:{codeText:_j,table:Nj,tableData:Ec,tableHeader:Ec,tableRow:Ec}}}function jj(t){const i=t._align;this.enter({type:"table",align:i.map(function(r){return r==="none"?null:r}),children:[]},t),this.data.inTable=!0}function Nj(t){this.exit(t),this.data.inTable=void 0}function Ej(t){this.enter({type:"tableRow",children:[]},t)}function Ec(t){this.exit(t)}function Rg(t){this.enter({type:"tableCell",children:[]},t)}function _j(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,Cj));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function Cj(t,i){return i==="|"?i:t}function Tj(t){const i=t||{},r=i.tableCellPadding,u=i.tablePipeAlign,o=i.stringLength,c=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
76
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:S,table:f,tableCell:g,tableRow:p}};function f(v,N,T,L){return m(b(v,T,L),v.align)}function p(v,N,T,L){const E=x(v,T,L),V=m([E]);return V.slice(0,V.indexOf(`
|
|
77
|
-
`))}function g(v,N,T,L){const E=T.enter("tableCell"),V=T.enter("phrasing"),R=T.containerPhrasing(v,{...L,before:c,after:c});return V(),E(),R}function m(v,N){return Gw(v,{align:N,alignDelimiters:u,padding:r,stringLength:o})}function b(v,N,T){const L=v.children;let E=-1;const V=[],R=N.enter("table");for(;++E<L.length;)V[E]=x(L[E],N,T);return R(),V}function x(v,N,T){const L=v.children;let E=-1;const V=[],R=N.enter("tableRow");for(;++E<L.length;)V[E]=g(L[E],v,N,T);return R(),V}function S(v,N,T){let L=my.inlineCode(v,N,T);return T.stack.includes("tableCell")&&(L=L.replace(/\|/g,"\\$&")),L}}function Aj(){return{exit:{taskListCheckValueChecked:Mg,taskListCheckValueUnchecked:Mg,paragraph:Dj}}}function zj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Rj}}}function Mg(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function Dj(t){const i=this.stack[this.stack.length-2];if(i&&i.type==="listItem"&&typeof i.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const u=r.children[0];if(u&&u.type==="text"){const o=i.children;let c=-1,f;for(;++c<o.length;){const p=o[c];if(p.type==="paragraph"){f=p;break}}f===r&&(u.value=u.value.slice(1),u.value.length===0?r.children.shift():r.position&&u.position&&typeof u.position.start.offset=="number"&&(u.position.start.column++,u.position.start.offset++,r.position.start=Object.assign({},u.position.start)))}}this.exit(t)}function Rj(t,i,r,u){const o=t.children[0],c=typeof t.checked=="boolean"&&o&&o.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",p=r.createTracker(u);c&&p.move(f);let g=my.listItem(t,i,r,{...u,...p.current()});return c&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),g;function m(b){return b+f}}function Mj(){return[dw(),Rw(),Uw(),wj(),Aj()]}function Oj(t){return{extensions:[hw(),Mw(t),qw(),Tj(t),zj()]}}const Lj={tokenize:Yj,partial:!0},gy={tokenize:Gj,partial:!0},xy={tokenize:Vj,partial:!0},yy={tokenize:Fj,partial:!0},Uj={tokenize:Xj,partial:!0},by={name:"wwwAutolink",tokenize:Hj,previous:Sy},vy={name:"protocolAutolink",tokenize:Ij,previous:ky},il={name:"emailAutolink",tokenize:Bj,previous:wy},Ln={};function qj(){return{text:Ln}}let ei=48;for(;ei<123;)Ln[ei]=il,ei++,ei===58?ei=65:ei===91&&(ei=97);Ln[43]=il;Ln[45]=il;Ln[46]=il;Ln[95]=il;Ln[72]=[il,vy];Ln[104]=[il,vy];Ln[87]=[il,by];Ln[119]=[il,by];function Bj(t,i,r){const u=this;let o,c;return f;function f(x){return!Wc(x)||!wy.call(u,u.previous)||Tf(u.events)?r(x):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),p(x))}function p(x){return Wc(x)?(t.consume(x),p):x===64?(t.consume(x),g):r(x)}function g(x){return x===46?t.check(Uj,b,m)(x):x===45||x===95||Rt(x)?(c=!0,t.consume(x),g):b(x)}function m(x){return t.consume(x),o=!0,g}function b(x){return c&&o&&Ut(u.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(x)):r(x)}}function Hj(t,i,r){const u=this;return o;function o(f){return f!==87&&f!==119||!Sy.call(u,u.previous)||Tf(u.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Lj,t.attempt(gy,t.attempt(xy,c),r),r)(f))}function c(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(f)}}function Ij(t,i,r){const u=this;let o="",c=!1;return f;function f(x){return(x===72||x===104)&&ky.call(u,u.previous)&&!Tf(u.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),o+=String.fromCodePoint(x),t.consume(x),p):r(x)}function p(x){if(Ut(x)&&o.length<5)return o+=String.fromCodePoint(x),t.consume(x),p;if(x===58){const S=o.toLowerCase();if(S==="http"||S==="https")return t.consume(x),g}return r(x)}function g(x){return x===47?(t.consume(x),c?m:(c=!0,g)):r(x)}function m(x){return x===null||Au(x)||et(x)||ii(x)||Lu(x)?r(x):t.attempt(gy,t.attempt(xy,b),r)(x)}function b(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(x)}}function Yj(t,i,r){let u=0;return o;function o(f){return(f===87||f===119)&&u<3?(u++,t.consume(f),o):f===46&&u===3?(t.consume(f),c):r(f)}function c(f){return f===null?r(f):i(f)}}function Gj(t,i,r){let u,o,c;return f;function f(m){return m===46||m===95?t.check(yy,g,p)(m):m===null||et(m)||ii(m)||m!==45&&Lu(m)?g(m):(c=!0,t.consume(m),f)}function p(m){return m===95?u=!0:(o=u,u=void 0),t.consume(m),f}function g(m){return o||u||!c?r(m):i(m)}}function Vj(t,i){let r=0,u=0;return o;function o(f){return f===40?(r++,t.consume(f),o):f===41&&u<r?c(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?t.check(yy,i,c)(f):f===null||et(f)||ii(f)?i(f):(t.consume(f),o)}function c(f){return f===41&&u++,t.consume(f),o}}function Fj(t,i,r){return u;function u(p){return p===33||p===34||p===39||p===41||p===42||p===44||p===46||p===58||p===59||p===63||p===95||p===126?(t.consume(p),u):p===38?(t.consume(p),c):p===93?(t.consume(p),o):p===60||p===null||et(p)||ii(p)?i(p):r(p)}function o(p){return p===null||p===40||p===91||et(p)||ii(p)?i(p):u(p)}function c(p){return Ut(p)?f(p):r(p)}function f(p){return p===59?(t.consume(p),u):Ut(p)?(t.consume(p),f):r(p)}}function Xj(t,i,r){return u;function u(c){return t.consume(c),o}function o(c){return Rt(c)?r(c):i(c)}}function Sy(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||et(t)}function ky(t){return!Ut(t)}function wy(t){return!(t===47||Wc(t))}function Wc(t){return t===43||t===45||t===46||t===95||Rt(t)}function Tf(t){let i=t.length,r=!1;for(;i--;){const u=t[i][1];if((u.type==="labelLink"||u.type==="labelImage")&&!u._balanced){r=!0;break}if(u._gfmAutolinkLiteralWalkedInto){r=!1;break}}return t.length>0&&!r&&(t[t.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const Qj={tokenize:tN,partial:!0};function $j(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:Pj,continuation:{tokenize:Wj},exit:eN}},text:{91:{name:"gfmFootnoteCall",tokenize:Jj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Zj,resolveTo:Kj}}}}function Zj(t,i,r){const u=this;let o=u.events.length;const c=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;o--;){const g=u.events[o][1];if(g.type==="labelImage"){f=g;break}if(g.type==="gfmFootnoteCall"||g.type==="labelLink"||g.type==="label"||g.type==="image"||g.type==="link")break}return p;function p(g){if(!f||!f._balanced)return r(g);const m=Nn(u.sliceSerialize({start:f.end,end:u.now()}));return m.codePointAt(0)!==94||!c.includes(m.slice(1))?r(g):(t.enter("gfmFootnoteCallLabelMarker"),t.consume(g),t.exit("gfmFootnoteCallLabelMarker"),i(g))}}function Kj(t,i){let r=t.length;for(;r--;)if(t[r][1].type==="labelImage"&&t[r][0]==="enter"){t[r][1];break}t[r+1][1].type="data",t[r+3][1].type="gfmFootnoteCallLabelMarker";const u={type:"gfmFootnoteCall",start:Object.assign({},t[r+3][1].start),end:Object.assign({},t[t.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},t[t.length-1][1].start)},f={type:"chunkString",contentType:"string",start:Object.assign({},c.start),end:Object.assign({},c.end)},p=[t[r+1],t[r+2],["enter",u,i],t[r+3],t[r+4],["enter",o,i],["exit",o,i],["enter",c,i],["enter",f,i],["exit",f,i],["exit",c,i],t[t.length-2],t[t.length-1],["exit",u,i]];return t.splice(r,t.length-r+1,...p),t}function Jj(t,i,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let c=0,f;return p;function p(x){return t.enter("gfmFootnoteCall"),t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),g}function g(x){return x!==94?r(x):(t.enter("gfmFootnoteCallMarker"),t.consume(x),t.exit("gfmFootnoteCallMarker"),t.enter("gfmFootnoteCallString"),t.enter("chunkString").contentType="string",m)}function m(x){if(c>999||x===93&&!f||x===null||x===91||et(x))return r(x);if(x===93){t.exit("chunkString");const S=t.exit("gfmFootnoteCallString");return o.includes(Nn(u.sliceSerialize(S)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(x)}return et(x)||(f=!0),c++,t.consume(x),x===92?b:m}function b(x){return x===91||x===92||x===93?(t.consume(x),c++,m):m(x)}}function Pj(t,i,r){const u=this,o=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let c,f=0,p;return g;function g(N){return t.enter("gfmFootnoteDefinition")._container=!0,t.enter("gfmFootnoteDefinitionLabel"),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),m}function m(N){return N===94?(t.enter("gfmFootnoteDefinitionMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionMarker"),t.enter("gfmFootnoteDefinitionLabelString"),t.enter("chunkString").contentType="string",b):r(N)}function b(N){if(f>999||N===93&&!p||N===null||N===91||et(N))return r(N);if(N===93){t.exit("chunkString");const T=t.exit("gfmFootnoteDefinitionLabelString");return c=Nn(u.sliceSerialize(T)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),S}return et(N)||(p=!0),f++,t.consume(N),N===92?x:b}function x(N){return N===91||N===92||N===93?(t.consume(N),f++,b):b(N)}function S(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),o.includes(c)||o.push(c),Be(t,v,"gfmFootnoteDefinitionWhitespace")):r(N)}function v(N){return i(N)}}function Wj(t,i,r){return t.check(ia,i,t.attempt(Qj,i,r))}function eN(t){t.exit("gfmFootnoteDefinition")}function tN(t,i,r){const u=this;return Be(t,o,"gfmFootnoteDefinitionIndent",5);function o(c){const f=u.events[u.events.length-1];return f&&f[1].type==="gfmFootnoteDefinitionIndent"&&f[2].sliceSerialize(f[1],!0).length===4?i(c):r(c)}}function nN(t){let r=(t||{}).singleTilde;const u={name:"strikethrough",tokenize:c,resolveAll:o};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function o(f,p){let g=-1;for(;++g<f.length;)if(f[g][0]==="enter"&&f[g][1].type==="strikethroughSequenceTemporary"&&f[g][1]._close){let m=g;for(;m--;)if(f[m][0]==="exit"&&f[m][1].type==="strikethroughSequenceTemporary"&&f[m][1]._open&&f[g][1].end.offset-f[g][1].start.offset===f[m][1].end.offset-f[m][1].start.offset){f[g][1].type="strikethroughSequence",f[m][1].type="strikethroughSequence";const b={type:"strikethrough",start:Object.assign({},f[m][1].start),end:Object.assign({},f[g][1].end)},x={type:"strikethroughText",start:Object.assign({},f[m][1].end),end:Object.assign({},f[g][1].start)},S=[["enter",b,p],["enter",f[m][1],p],["exit",f[m][1],p],["enter",x,p]],v=p.parser.constructs.insideSpan.null;v&&nn(S,S.length,0,Uu(v,f.slice(m+1,g),p)),nn(S,S.length,0,[["exit",x,p],["enter",f[g][1],p],["exit",f[g][1],p],["exit",b,p]]),nn(f,m-1,g-m+3,S),g=m+S.length-2;break}}for(g=-1;++g<f.length;)f[g][1].type==="strikethroughSequenceTemporary"&&(f[g][1].type="data");return f}function c(f,p,g){const m=this.previous,b=this.events;let x=0;return S;function S(N){return m===126&&b[b.length-1][1].type!=="characterEscape"?g(N):(f.enter("strikethroughSequenceTemporary"),v(N))}function v(N){const T=Ki(m);if(N===126)return x>1?g(N):(f.consume(N),x++,v);if(x<2&&!r)return g(N);const L=f.exit("strikethroughSequenceTemporary"),E=Ki(N);return L._open=!E||E===2&&!!T,L._close=!T||T===2&&!!E,p(N)}}}class lN{constructor(){this.map=[]}add(i,r,u){iN(this,i,r,u)}consume(i){if(this.map.sort(function(c,f){return c[0]-f[0]}),this.map.length===0)return;let r=this.map.length;const u=[];for(;r>0;)r-=1,u.push(i.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),i.length=this.map[r][0];u.push(i.slice()),i.length=0;let o=u.pop();for(;o;){for(const c of o)i.push(c);o=u.pop()}this.map.length=0}}function iN(t,i,r,u){let o=0;if(!(r===0&&u.length===0)){for(;o<t.map.length;){if(t.map[o][0]===i){t.map[o][1]+=r,t.map[o][2].push(...u);return}o+=1}t.map.push([i,r,u])}}function rN(t,i){let r=!1;const u=[];for(;i<t.length;){const o=t[i];if(r){if(o[0]==="enter")o[1].type==="tableContent"&&u.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const c=u.length-1;u[c]=u[c]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return u}function aN(){return{flow:{null:{name:"table",tokenize:uN,resolveAll:sN}}}}function uN(t,i,r){const u=this;let o=0,c=0,f;return p;function p(U){let ne=u.events.length-1;for(;ne>-1;){const oe=u.events[ne][1].type;if(oe==="lineEnding"||oe==="linePrefix")ne--;else break}const le=ne>-1?u.events[ne][1].type:null,xe=le==="tableHead"||le==="tableRow"?M:g;return xe===M&&u.parser.lazy[u.now().line]?r(U):xe(U)}function g(U){return t.enter("tableHead"),t.enter("tableRow"),m(U)}function m(U){return U===124||(f=!0,c+=1),b(U)}function b(U){return U===null?r(U):be(U)?c>1?(c=0,u.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(U),t.exit("lineEnding"),v):r(U):Re(U)?Be(t,b,"whitespace")(U):(c+=1,f&&(f=!1,o+=1),U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),f=!0,b):(t.enter("data"),x(U)))}function x(U){return U===null||U===124||et(U)?(t.exit("data"),b(U)):(t.consume(U),U===92?S:x)}function S(U){return U===92||U===124?(t.consume(U),x):x(U)}function v(U){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(U):(t.enter("tableDelimiterRow"),f=!1,Re(U)?Be(t,N,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(U):N(U))}function N(U){return U===45||U===58?L(U):U===124?(f=!0,t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),T):ie(U)}function T(U){return Re(U)?Be(t,L,"whitespace")(U):L(U)}function L(U){return U===58?(c+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),E):U===45?(c+=1,E(U)):U===null||be(U)?W(U):ie(U)}function E(U){return U===45?(t.enter("tableDelimiterFiller"),V(U)):ie(U)}function V(U){return U===45?(t.consume(U),V):U===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(U),t.exit("tableDelimiterMarker"),R):(t.exit("tableDelimiterFiller"),R(U))}function R(U){return Re(U)?Be(t,W,"whitespace")(U):W(U)}function W(U){return U===124?N(U):U===null||be(U)?!f||o!==c?ie(U):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(U)):ie(U)}function ie(U){return r(U)}function M(U){return t.enter("tableRow"),Y(U)}function Y(U){return U===124?(t.enter("tableCellDivider"),t.consume(U),t.exit("tableCellDivider"),Y):U===null||be(U)?(t.exit("tableRow"),i(U)):Re(U)?Be(t,Y,"whitespace")(U):(t.enter("data"),ue(U))}function ue(U){return U===null||U===124||et(U)?(t.exit("data"),Y(U)):(t.consume(U),U===92?J:ue)}function J(U){return U===92||U===124?(t.consume(U),ue):ue(U)}}function sN(t,i){let r=-1,u=!0,o=0,c=[0,0,0,0],f=[0,0,0,0],p=!1,g=0,m,b,x;const S=new lN;for(;++r<t.length;){const v=t[r],N=v[1];v[0]==="enter"?N.type==="tableHead"?(p=!1,g!==0&&(Og(S,i,g,m,b),b=void 0,g=0),m={type:"table",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",m,i]])):N.type==="tableRow"||N.type==="tableDelimiterRow"?(u=!0,x=void 0,c=[0,0,0,0],f=[0,r+1,0,0],p&&(p=!1,b={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",b,i]])),o=N.type==="tableDelimiterRow"?2:b?3:1):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(u=!1,f[2]===0&&(c[1]!==0&&(f[0]=f[1],x=wu(S,i,c,o,void 0,x),c=[0,0,0,0]),f[2]=r)):N.type==="tableCellDivider"&&(u?u=!1:(c[1]!==0&&(f[0]=f[1],x=wu(S,i,c,o,void 0,x)),c=f,f=[c[1],r,0,0])):N.type==="tableHead"?(p=!0,g=r):N.type==="tableRow"||N.type==="tableDelimiterRow"?(g=r,c[1]!==0?(f[0]=f[1],x=wu(S,i,c,o,r,x)):f[1]!==0&&(x=wu(S,i,f,o,r,x)),o=0):o&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(f[3]=r)}for(g!==0&&Og(S,i,g,m,b),S.consume(i.events),r=-1;++r<i.events.length;){const v=i.events[r];v[0]==="enter"&&v[1].type==="table"&&(v[1]._align=rN(i.events,r))}return t}function wu(t,i,r,u,o,c){const f=u===1?"tableHeader":u===2?"tableDelimiter":"tableData",p="tableContent";r[0]!==0&&(c.end=Object.assign({},Zi(i.events,r[0])),t.add(r[0],0,[["exit",c,i]]));const g=Zi(i.events,r[1]);if(c={type:f,start:Object.assign({},g),end:Object.assign({},g)},t.add(r[1],0,[["enter",c,i]]),r[2]!==0){const m=Zi(i.events,r[2]),b=Zi(i.events,r[3]),x={type:p,start:Object.assign({},m),end:Object.assign({},b)};if(t.add(r[2],0,[["enter",x,i]]),u!==2){const S=i.events[r[2]],v=i.events[r[3]];if(S[1].end=Object.assign({},v[1].end),S[1].type="chunkText",S[1].contentType="text",r[3]>r[2]+1){const N=r[2]+1,T=r[3]-r[2]-1;t.add(N,T,[])}}t.add(r[3]+1,0,[["exit",x,i]])}return o!==void 0&&(c.end=Object.assign({},Zi(i.events,o)),t.add(o,0,[["exit",c,i]]),c=void 0),c}function Og(t,i,r,u,o){const c=[],f=Zi(i.events,r);o&&(o.end=Object.assign({},f),c.push(["exit",o,i])),u.end=Object.assign({},f),c.push(["exit",u,i]),t.add(r+1,0,c)}function Zi(t,i){const r=t[i],u=r[0]==="enter"?"start":"end";return r[1][u]}const oN={name:"tasklistCheck",tokenize:fN};function cN(){return{text:{91:oN}}}function fN(t,i,r){const u=this;return o;function o(g){return u.previous!==null||!u._gfmTasklistFirstContentOfListItem?r(g):(t.enter("taskListCheck"),t.enter("taskListCheckMarker"),t.consume(g),t.exit("taskListCheckMarker"),c)}function c(g){return et(g)?(t.enter("taskListCheckValueUnchecked"),t.consume(g),t.exit("taskListCheckValueUnchecked"),f):g===88||g===120?(t.enter("taskListCheckValueChecked"),t.consume(g),t.exit("taskListCheckValueChecked"),f):r(g)}function f(g){return g===93?(t.enter("taskListCheckMarker"),t.consume(g),t.exit("taskListCheckMarker"),t.exit("taskListCheck"),p):r(g)}function p(g){return be(g)?i(g):Re(g)?t.check({tokenize:dN},i,r)(g):r(g)}}function dN(t,i,r){return Be(t,u,"whitespace");function u(o){return o===null?r(o):i(o)}}function hN(t){return Mx([qj(),$j(),nN(t),aN(),cN()])}const pN={};function mN(t){const i=this,r=t||pN,u=i.data(),o=u.micromarkExtensions||(u.micromarkExtensions=[]),c=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);o.push(hN(r)),c.push(Mj()),f.push(Oj(r))}/**
|
|
78
|
-
* @license lucide-react v1.26.0 - ISC
|
|
79
|
-
*
|
|
80
|
-
* This source code is licensed under the ISC license.
|
|
81
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
82
|
-
*/const jy=(...t)=>t.filter((i,r,u)=>!!i&&i.trim()!==""&&u.indexOf(i)===r).join(" ").trim();/**
|
|
83
|
-
* @license lucide-react v1.26.0 - ISC
|
|
84
|
-
*
|
|
85
|
-
* This source code is licensed under the ISC license.
|
|
86
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
87
|
-
*/const gN=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();/**
|
|
88
|
-
* @license lucide-react v1.26.0 - ISC
|
|
89
|
-
*
|
|
90
|
-
* This source code is licensed under the ISC license.
|
|
91
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
92
|
-
*/const xN=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(i,r,u)=>u?u.toUpperCase():r.toLowerCase());/**
|
|
93
|
-
* @license lucide-react v1.26.0 - ISC
|
|
94
|
-
*
|
|
95
|
-
* This source code is licensed under the ISC license.
|
|
96
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
97
|
-
*/const Lg=t=>{const i=xN(t);return i.charAt(0).toUpperCase()+i.slice(1)};/**
|
|
98
|
-
* @license lucide-react v1.26.0 - ISC
|
|
99
|
-
*
|
|
100
|
-
* This source code is licensed under the ISC license.
|
|
101
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
102
|
-
*/var _c={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
|
|
103
|
-
* @license lucide-react v1.26.0 - ISC
|
|
104
|
-
*
|
|
105
|
-
* This source code is licensed under the ISC license.
|
|
106
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
107
|
-
*/const yN=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},bN=j.createContext({}),vN=()=>j.useContext(bN),SN=j.forwardRef(({color:t,size:i,strokeWidth:r,absoluteStrokeWidth:u,className:o="",children:c,iconNode:f,...p},g)=>{const{size:m=24,strokeWidth:b=2,absoluteStrokeWidth:x=!1,color:S="currentColor",className:v=""}=vN()??{},N=u??x?Number(r??b)*24/Number(i??m):r??b;return j.createElement("svg",{ref:g,..._c,width:i??m??_c.width,height:i??m??_c.height,stroke:t??S,strokeWidth:N,className:jy("lucide",v,o),...!c&&!yN(p)&&{"aria-hidden":"true"},...p},[...f.map(([T,L])=>j.createElement(T,L)),...Array.isArray(c)?c:[c]])});/**
|
|
108
|
-
* @license lucide-react v1.26.0 - ISC
|
|
109
|
-
*
|
|
110
|
-
* This source code is licensed under the ISC license.
|
|
111
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
112
|
-
*/const Ae=(t,i)=>{const r=j.forwardRef(({className:u,...o},c)=>j.createElement(SN,{ref:c,iconNode:i,className:jy(`lucide-${gN(Lg(t))}`,`lucide-${t}`,u),...o}));return r.displayName=Lg(t),r};/**
|
|
113
|
-
* @license lucide-react v1.26.0 - ISC
|
|
114
|
-
*
|
|
115
|
-
* This source code is licensed under the ISC license.
|
|
116
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
117
|
-
*/const kN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],wN=Ae("arrow-down",kN);/**
|
|
118
|
-
* @license lucide-react v1.26.0 - ISC
|
|
119
|
-
*
|
|
120
|
-
* This source code is licensed under the ISC license.
|
|
121
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
122
|
-
*/const jN=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],NN=Ae("arrow-up",jN);/**
|
|
123
|
-
* @license lucide-react v1.26.0 - ISC
|
|
124
|
-
*
|
|
125
|
-
* This source code is licensed under the ISC license.
|
|
126
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
127
|
-
*/const EN=[["path",{d:"M12 8V4H8",key:"hb8ula"}],["rect",{width:"16",height:"12",x:"4",y:"8",rx:"2",key:"enze0r"}],["path",{d:"M2 14h2",key:"vft8re"}],["path",{d:"M20 14h2",key:"4cs60a"}],["path",{d:"M15 13v2",key:"1xurst"}],["path",{d:"M9 13v2",key:"rq6x2g"}]],_N=Ae("bot",EN);/**
|
|
128
|
-
* @license lucide-react v1.26.0 - ISC
|
|
129
|
-
*
|
|
130
|
-
* This source code is licensed under the ISC license.
|
|
131
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
132
|
-
*/const CN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],aa=Ae("check",CN);/**
|
|
133
|
-
* @license lucide-react v1.26.0 - ISC
|
|
134
|
-
*
|
|
135
|
-
* This source code is licensed under the ISC license.
|
|
136
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
137
|
-
*/const TN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ny=Ae("chevron-down",TN);/**
|
|
138
|
-
* @license lucide-react v1.26.0 - ISC
|
|
139
|
-
*
|
|
140
|
-
* This source code is licensed under the ISC license.
|
|
141
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
142
|
-
*/const AN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],zN=Ae("chevron-left",AN);/**
|
|
143
|
-
* @license lucide-react v1.26.0 - ISC
|
|
144
|
-
*
|
|
145
|
-
* This source code is licensed under the ISC license.
|
|
146
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
147
|
-
*/const DN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Iu=Ae("chevron-right",DN);/**
|
|
148
|
-
* @license lucide-react v1.26.0 - ISC
|
|
149
|
-
*
|
|
150
|
-
* This source code is licensed under the ISC license.
|
|
151
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
152
|
-
*/const RN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],MN=Ae("circle-check",RN);/**
|
|
153
|
-
* @license lucide-react v1.26.0 - ISC
|
|
154
|
-
*
|
|
155
|
-
* This source code is licensed under the ISC license.
|
|
156
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
157
|
-
*/const ON=[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]],LN=Ae("circle-dashed",ON);/**
|
|
158
|
-
* @license lucide-react v1.26.0 - ISC
|
|
159
|
-
*
|
|
160
|
-
* This source code is licensed under the ISC license.
|
|
161
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
162
|
-
*/const UN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],Ug=Ae("circle-x",UN);/**
|
|
163
|
-
* @license lucide-react v1.26.0 - ISC
|
|
164
|
-
*
|
|
165
|
-
* This source code is licensed under the ISC license.
|
|
166
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
167
|
-
*/const qN=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],BN=Ae("copy",qN);/**
|
|
168
|
-
* @license lucide-react v1.26.0 - ISC
|
|
169
|
-
*
|
|
170
|
-
* This source code is licensed under the ISC license.
|
|
171
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
172
|
-
*/const HN=[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]],IN=Ae("ellipsis",HN);/**
|
|
173
|
-
* @license lucide-react v1.26.0 - ISC
|
|
174
|
-
*
|
|
175
|
-
* This source code is licensed under the ISC license.
|
|
176
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
177
|
-
*/const YN=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],GN=Ae("external-link",YN);/**
|
|
178
|
-
* @license lucide-react v1.26.0 - ISC
|
|
179
|
-
*
|
|
180
|
-
* This source code is licensed under the ISC license.
|
|
181
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
182
|
-
*/const VN=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],FN=Ae("file-text",VN);/**
|
|
183
|
-
* @license lucide-react v1.26.0 - ISC
|
|
184
|
-
*
|
|
185
|
-
* This source code is licensed under the ISC license.
|
|
186
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
187
|
-
*/const XN=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],QN=Ae("gauge",XN);/**
|
|
188
|
-
* @license lucide-react v1.26.0 - ISC
|
|
189
|
-
*
|
|
190
|
-
* This source code is licensed under the ISC license.
|
|
191
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
192
|
-
*/const $N=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],ZN=Ae("git-branch",$N);/**
|
|
193
|
-
* @license lucide-react v1.26.0 - ISC
|
|
194
|
-
*
|
|
195
|
-
* This source code is licensed under the ISC license.
|
|
196
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
197
|
-
*/const KN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],JN=Ae("globe",KN);/**
|
|
198
|
-
* @license lucide-react v1.26.0 - ISC
|
|
199
|
-
*
|
|
200
|
-
* This source code is licensed under the ISC license.
|
|
201
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
202
|
-
*/const PN=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Af=Ae("loader-circle",PN);/**
|
|
203
|
-
* @license lucide-react v1.26.0 - ISC
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the ISC license.
|
|
206
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
207
|
-
*/const WN=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}],["path",{d:"M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3",key:"1u773s"}],["path",{d:"M12 17h.01",key:"p32p05"}]],eE=Ae("message-circle-question-mark",WN);/**
|
|
208
|
-
* @license lucide-react v1.26.0 - ISC
|
|
209
|
-
*
|
|
210
|
-
* This source code is licensed under the ISC license.
|
|
211
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
212
|
-
*/const tE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],nE=Ae("panel-left-close",tE);/**
|
|
213
|
-
* @license lucide-react v1.26.0 - ISC
|
|
214
|
-
*
|
|
215
|
-
* This source code is licensed under the ISC license.
|
|
216
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
217
|
-
*/const lE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],iE=Ae("panel-left-open",lE);/**
|
|
218
|
-
* @license lucide-react v1.26.0 - ISC
|
|
219
|
-
*
|
|
220
|
-
* This source code is licensed under the ISC license.
|
|
221
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
222
|
-
*/const rE=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],qg=Ae("paperclip",rE);/**
|
|
223
|
-
* @license lucide-react v1.26.0 - ISC
|
|
224
|
-
*
|
|
225
|
-
* This source code is licensed under the ISC license.
|
|
226
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
227
|
-
*/const aE=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],uE=Ae("pause",aE);/**
|
|
228
|
-
* @license lucide-react v1.26.0 - ISC
|
|
229
|
-
*
|
|
230
|
-
* This source code is licensed under the ISC license.
|
|
231
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
232
|
-
*/const sE=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],Ey=Ae("pencil",sE);/**
|
|
233
|
-
* @license lucide-react v1.26.0 - ISC
|
|
234
|
-
*
|
|
235
|
-
* This source code is licensed under the ISC license.
|
|
236
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
237
|
-
*/const oE=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],cE=Ae("play",oE);/**
|
|
238
|
-
* @license lucide-react v1.26.0 - ISC
|
|
239
|
-
*
|
|
240
|
-
* This source code is licensed under the ISC license.
|
|
241
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
242
|
-
*/const fE=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],zf=Ae("refresh-cw",fE);/**
|
|
243
|
-
* @license lucide-react v1.26.0 - ISC
|
|
244
|
-
*
|
|
245
|
-
* This source code is licensed under the ISC license.
|
|
246
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
247
|
-
*/const dE=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hE=Ae("search",dE);/**
|
|
248
|
-
* @license lucide-react v1.26.0 - ISC
|
|
249
|
-
*
|
|
250
|
-
* This source code is licensed under the ISC license.
|
|
251
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
252
|
-
*/const pE=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],_y=Ae("settings",pE);/**
|
|
253
|
-
* @license lucide-react v1.26.0 - ISC
|
|
254
|
-
*
|
|
255
|
-
* This source code is licensed under the ISC license.
|
|
256
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
257
|
-
*/const mE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]],ef=Ae("shield-alert",mE);/**
|
|
258
|
-
* @license lucide-react v1.26.0 - ISC
|
|
259
|
-
*
|
|
260
|
-
* This source code is licensed under the ISC license.
|
|
261
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
262
|
-
*/const gE=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}]],xE=Ae("shield",gE);/**
|
|
263
|
-
* @license lucide-react v1.26.0 - ISC
|
|
264
|
-
*
|
|
265
|
-
* This source code is licensed under the ISC license.
|
|
266
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
267
|
-
*/const yE=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],bE=Ae("sparkles",yE);/**
|
|
268
|
-
* @license lucide-react v1.26.0 - ISC
|
|
269
|
-
*
|
|
270
|
-
* This source code is licensed under the ISC license.
|
|
271
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
272
|
-
*/const vE=[["path",{d:"M12 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2v-7",key:"1m0v6g"}],["path",{d:"M18.375 2.625a1 1 0 0 1 3 3l-9.013 9.014a2 2 0 0 1-.853.505l-2.873.84a.5.5 0 0 1-.62-.62l.84-2.873a2 2 0 0 1 .506-.852z",key:"ohrbg2"}]],Cy=Ae("square-pen",vE);/**
|
|
273
|
-
* @license lucide-react v1.26.0 - ISC
|
|
274
|
-
*
|
|
275
|
-
* This source code is licensed under the ISC license.
|
|
276
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
277
|
-
*/const SE=[["path",{d:"m7 11 2-2-2-2",key:"1lz0vl"}],["path",{d:"M11 13h4",key:"1p7l4v"}],["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2",key:"1m3agn"}]],kE=Ae("square-terminal",SE);/**
|
|
278
|
-
* @license lucide-react v1.26.0 - ISC
|
|
279
|
-
*
|
|
280
|
-
* This source code is licensed under the ISC license.
|
|
281
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
282
|
-
*/const wE=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Df=Ae("square",wE);/**
|
|
283
|
-
* @license lucide-react v1.26.0 - ISC
|
|
284
|
-
*
|
|
285
|
-
* This source code is licensed under the ISC license.
|
|
286
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
287
|
-
*/const jE=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"6",key:"1vlfrh"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],Ty=Ae("target",jE);/**
|
|
288
|
-
* @license lucide-react v1.26.0 - ISC
|
|
289
|
-
*
|
|
290
|
-
* This source code is licensed under the ISC license.
|
|
291
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
292
|
-
*/const NE=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Rf=Ae("trash-2",NE);/**
|
|
293
|
-
* @license lucide-react v1.26.0 - ISC
|
|
294
|
-
*
|
|
295
|
-
* This source code is licensed under the ISC license.
|
|
296
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
297
|
-
*/const EE=[["path",{d:"M14.7 6.3a1 1 0 0 0 0 1.4l1.6 1.6a1 1 0 0 0 1.4 0l3.106-3.105c.32-.322.863-.22.983.218a6 6 0 0 1-8.259 7.057l-7.91 7.91a1 1 0 0 1-2.999-3l7.91-7.91a6 6 0 0 1 7.057-8.259c.438.12.54.662.219.984z",key:"1ngwbx"}]],Ay=Ae("wrench",EE);/**
|
|
298
|
-
* @license lucide-react v1.26.0 - ISC
|
|
299
|
-
*
|
|
300
|
-
* This source code is licensed under the ISC license.
|
|
301
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
302
|
-
*/const _E=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Wi=Ae("x",_E),zy=new Map([["theme","Robota follows your system appearance."],["keybindings","Robota uses standard keyboard shortcuts here."],["editor","Type your message directly in the composer."],["statusline","The GUI shows session status in its own status row, not a terminal status line."],["shell","Use the Terminal app for shell commands."],["exit","Close the window or tab to end this session; delete it from the sidebar to remove it for good."],["devices","Device pairing is managed from the terminal for now."]]),CE="This command runs in the robota terminal.";function Dy(t){return zy.has(t.name)?!0:t.runner==="client"&&!(t.surfaces??[]).includes("gui")}function Ry(t){return zy.get(t)??CE}function TE(t,i){switch(i.type){case"permission_request":{const{id:r,toolName:u,toolArgs:o,requesterDriverId:c,requester:f,diffLines:p,diffFile:g,cwd:m}=i.event;return t.some(b=>b.id===r)?t:[...t,{kind:"permission",id:r,toolName:u,toolArgs:o,...c?{requesterDriverId:c}:{},...f?{requester:f}:{},...p?{diffLines:p,diffFile:g}:{},...m?{cwd:m}:{}}]}case"ask_request":{const{id:r,request:u,requesterDriverId:o}=i.event;return t.some(c=>c.id===r)?t:[...t,{kind:"ask",id:r,request:u,...o?{requesterDriverId:o}:{}}]}case"prompt_resolved":{const{id:r}=i.event,u=t.filter(o=>o.id!==r);return u.length===t.length?t:u}default:return t}}function AE(t,i){return{type:"permission-response",id:t,result:i}}function zE(t,i){return{type:"ask-response",id:t,response:i}}function Kr(t){switch(t.type){case"show-plugin-manager":return"plugin";case"show-settings":return"settings";case"show-session-picker":return"resume";case"show-agent-switcher":return"agent";case"show-theme-picker":return"theme";default:return t.type}}function ju(t){return t.type==="show-session-picker"?"session-sidebar":t.type==="show-settings"?"settings":t.type==="show-plugin-manager"?"settings-plugins":t.type==="show-agent-switcher"?"agent-switcher":null}function DE(t){switch(t.type){case"show-session-picker":return"This host cannot list sessions, so there is nothing to resume.";case"show-theme-picker":return Ry("theme");default:return`Robota does not have a screen for '${t.type}' yet.`}}const RE=2e3,ME=10;function OE(t,i){let r=null,u="disconnected",o=null,c=0,f=!1;function p(v){u=v,i.onStatusChange(v)}function g(){if(!f){if(c>=ME){i.onGiveUp?.();return}o=setTimeout(()=>{c++,m()},RE)}}function m(){p("connecting"),r=new WebSocket(t),r.onopen=()=>{c=0,p("connected"),S({type:"get-messages"})},r.onmessage=v=>{const N=v.data;if(typeof N!="string")return;const T=V0(N,G0);if(!T.ok){i.onMessage({type:"protocol_error",message:`Malformed message from server (${T.reason})`});return}i.onMessage(T.message)},r.onclose=()=>{r=null,f?p("disconnected"):(p("disconnected"),g())},r.onerror=()=>{p("error")}}function b(){f=!1,o!==null&&(clearTimeout(o),o=null),m()}function x(){f=!0,o!==null&&(clearTimeout(o),o=null),r?.close(),r=null,p("disconnected")}function S(v){r?.readyState===WebSocket.OPEN&&r.send(JSON.stringify(v))}return{connect:b,disconnect:x,send:S,status:()=>u}}const LE={text_delta:"reducer-state",user_message:"reducer-state",tool_start:"reducer-state",tool_end:"reducer-state",thinking:"reducer-state",complete:"reducer-state",interrupted:"reducer-state",error:"visible-notice",command_result:"reducer-state",messages:"reducer-state",history:"intentionally-not-rendered",history_changed:"intentionally-not-rendered",context:"intentionally-not-rendered",turn_source:"intentionally-not-rendered",commands:"reducer-state",session_status:"reducer-state",model_list:"reducer-state",agent_definitions:"reducer-state",sessions:"reducer-state",sessions_error:"reducer-state",session_switched:"reducer-state",session_change_failed:"visible-notice",session_renamed_in_list:"reducer-state",session_rename_failed:"visible-notice",session_deleted:"reducer-state",session_delete_failed:"visible-notice",usage_report:"reducer-state",personal_usage_report:"reducer-state",personal_usage_report_error:"visible-notice",stored_session_usage_report:"reducer-state",stored_session_usage_report_error:"visible-notice",executing:"intentionally-not-rendered",pending:"reducer-state",execution_workspace_event:"reducer-state",execution_detail:"reducer-state",execution_detail_error:"reducer-state",waiting_loop_stop:"intentionally-not-rendered",project_status:"reducer-state",project_diff:"reducer-state",project_memory:"reducer-state",background_task_event:"intentionally-not-rendered",background_job_group_event:"intentionally-not-rendered",plan_event:"intentionally-not-rendered",context_file_refreshed:"intentionally-not-rendered",branch_event:"intentionally-not-rendered",background_tasks:"reducer-state",background_task:"intentionally-not-rendered",background_job_groups:"intentionally-not-rendered",background_job_group:"intentionally-not-rendered",background_task_log:"intentionally-not-rendered",permission_request:"reducer-state",ask_request:"reducer-state",prompt_resolved:"reducer-state",ui_intent:"reducer-state",session_renamed:"reducer-state",history_cleared:"reducer-state",background_task_control_result:"visible-notice",protocol_error:"visible-notice",resume_gap:"transport-control",settings:"reducer-state",settings_error:"reducer-state"};let Bg=0;function Hg(t){return Bg+=1,`${t}_${Bg}_${Date.now()}`}function UE(t){const[i,r]=j.useState(!1),[u,o]=j.useState("idle"),[c,f]=j.useState([]),[p,g]=j.useState(null),[m,b]=j.useState(null),x=j.useRef(null),S=j.useRef(null),v=j.useCallback(T=>T.type!=="agent_definitions"?!1:(x.current!==T.requestId||(f(T.agents),g(T.current),o("ready")),!0),[]),N=j.useCallback(()=>{const T=Hg("get_agent_definitions");x.current=T,t({type:"get-agent-definitions",requestId:T})},[t]);return{agentSwitcherOpen:i,agentSwitcherStatus:u,agentDefinitions:c,currentAgentType:p,agentSwitchMessage:m,openAgentSwitcher:j.useCallback(()=>{r(!0),o(T=>T==="ready"?"ready":"loading"),b(null),N()},[N]),closeAgentSwitcher:j.useCallback(()=>{r(!1)},[]),selectAgent:j.useCallback(T=>{const L=Hg("agent_switch");S.current=L,b(null),t({type:"command",name:"agent",args:T,requestId:L})},[t]),handleAgentDefinitionsMessage:v,resolveSwitchResult:j.useCallback((T,L)=>T===void 0||S.current!==T?!1:(S.current=null,b(L.message),L.success&&N(),!0),[N])}}let Ig=0;function qE(){return Ig+=1,`execdetail_${Ig}_${Date.now()}`}function BE(t){const[i,r]=j.useState(null),[u,o]=j.useState("idle"),[c,f]=j.useState([]),[p,g]=j.useState(null),[m,b]=j.useState(!1),x=j.useRef(null),S=j.useRef(null),v=j.useRef(void 0),N=j.useCallback((T,L)=>{const E=qE();x.current=E,S.current=T,o("loading"),g(null),t({type:"read-execution-detail",requestId:E,entryId:T,cursor:L})},[t]);return{openEntryId:i,executionDetailStatus:u,executionDetailRecords:c,executionDetailError:p,executionDetailComplete:m,openExecutionDetail:j.useCallback(T=>{r(T),f([]),b(!1),v.current=void 0,N(T)},[N]),loadMoreExecutionDetail:j.useCallback(()=>{!i||u==="loading"||m||N(i,v.current)},[i,u,m,N]),closeExecutionDetail:j.useCallback(()=>{r(null),x.current=null,S.current=null,f([]),o("idle"),g(null),b(!1)},[]),handleExecutionDetailMessage:j.useCallback(T=>T.type!=="execution_detail"&&T.type!=="execution_detail_error"?!1:x.current!==T.requestId?!0:T.type==="execution_detail_error"?(o("error"),g(T.message),!0):(f(L=>T.page.cursor===void 0?T.page.records:[...L,...T.page.records]),v.current=T.page.nextCursor,b(T.page.nextCursor===void 0),o("ready"),!0),[])}}let Yg=0;function HE(){return Yg+=1,`model_list_${Yg}_${Date.now()}`}function IE(t){const[i,r]=j.useState(null),u=j.useRef(null),o=j.useCallback(c=>c.type!=="model_list"?!1:(u.current!==c.requestId||r({groups:c.groups,currentModel:c.currentModel,...c.currentProfile!==void 0?{currentProfile:c.currentProfile}:{}}),!0),[]);return{modelList:i,requestModelList:j.useCallback(()=>{const c=HE();u.current=c,t({type:"list-models",requestId:c})},[t]),handleModelListMessage:o}}let Gg=0;function Vg(t){return Gg+=1,`${t}_${Gg}_${Date.now()}`}function YE(t){const[i,r]=j.useState("idle"),[u,o]=j.useState(null),[c,f]=j.useState(null),[p,g]=j.useState("idle"),[m,b]=j.useState(null),[x,S]=j.useState(null),[v,N]=j.useState(null),[T,L]=j.useState("idle"),[E,V]=j.useState(null),R=j.useRef(null),W=j.useRef(null),ie=j.useCallback(M=>M.type==="personal_usage_report"||M.type==="personal_usage_report_error"?(R.current!==M.requestId||(o(M.type==="personal_usage_report"?M.report:null),f(M.type==="personal_usage_report_error"?M.message:null),r(M.type==="personal_usage_report"?"ready":"error")),!0):M.type==="usage_report"?(V(M.report),L("ready"),!0):M.type==="stored_session_usage_report"||M.type==="stored_session_usage_report_error"?(W.current!==M.requestId||(b(M.type==="stored_session_usage_report"?M.report:null),S(M.sessionId),N(M.type==="stored_session_usage_report_error"?M.message:null),g(M.type==="stored_session_usage_report"?"ready":"error")),!0):(M.type==="protocol_error"&&L(Y=>Y==="loading"?"error":Y),!1),[]);return{personalUsageStatus:i,personalUsageReport:u,personalUsageError:c,requestPersonalUsage:j.useCallback(M=>{const Y=Vg("personal_usage");R.current=Y,r("loading"),f(null),t({type:"get-personal-usage-report",requestId:Y,period:M,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"})},[t]),storedSessionUsageStatus:p,storedSessionUsageReport:m,storedSessionUsageSessionId:x,storedSessionUsageError:v,requestStoredSessionUsage:j.useCallback(M=>{const Y=Vg("stored_session_usage");W.current=Y,g("loading"),b(null),S(M),N(null),t({type:"get-stored-session-usage-report",requestId:Y,sessionId:M})},[t]),currentSessionUsageStatus:T,currentSessionUsageReport:E,requestCurrentSessionUsage:j.useCallback(()=>{L("loading"),t({type:"get-usage-report"})},[t]),handleUsageMessage:ie}}let Fg=0;function Cc(t){return Fg+=1,`${t}_${Fg}_${Date.now()}`}function GE(t){const[i,r]=j.useState("idle"),[u,o]=j.useState(null),[c,f]=j.useState("idle"),[p,g]=j.useState(null),[m,b]=j.useState(null),[x,S]=j.useState("idle"),[v,N]=j.useState(null),T=j.useRef(null),L=j.useRef(null),E=j.useRef(null),V=j.useCallback(R=>R.type==="project_status"?(T.current!==R.requestId||(o(R.result),r("ready")),!0):R.type==="project_diff"?(L.current!==R.requestId||(b(R.result),f("ready")),!0):R.type==="project_memory"?(E.current!==R.requestId||(N(R.result),S("ready")),!0):(R.type==="protocol_error"&&R.requestId!==void 0&&(T.current===R.requestId&&r("error"),L.current===R.requestId&&f("error"),E.current===R.requestId&&S("error")),!1),[]);return{projectStatusState:i,projectStatus:u,requestProjectStatus:j.useCallback(()=>{const R=Cc("project_status");T.current=R,r("loading"),t({type:"project-status",requestId:R})},[t]),projectDiffState:c,projectDiffPath:p,projectDiff:m,requestProjectDiff:j.useCallback(R=>{const W=Cc("project_diff");L.current=W,g(R),f("loading"),b(null),t({type:"project-diff",requestId:W,path:R})},[t]),projectMemoryState:x,projectMemory:v,requestProjectMemory:j.useCallback(()=>{const R=Cc("project_memory");E.current=R,S("loading"),t({type:"project-memory",requestId:R})},[t]),handleProjectMessage:V}}function VE(t){const[i,r]=j.useState([]),u=j.useCallback(()=>{t({type:"get-background-tasks",filter:{kind:"scheduled"}})},[t]),o=j.useCallback(c=>c.type==="background_tasks"?(r(c.tasks.filter(f=>f.kind==="scheduled")),!0):c.type==="background_task_control_result"&&c.action==="cancel"?(c.success&&u(),!1):(c.type==="command_result"&&c.name==="schedule"&&c.success&&u(),!1),[u]);return{scheduledTasks:i,pauseSchedule:j.useCallback(c=>{t({type:"command",name:"schedule",args:`pause ${c}`})},[t]),resumeSchedule:j.useCallback(c=>{t({type:"command",name:"schedule",args:`resume ${c}`})},[t]),deleteSchedule:j.useCallback(c=>{t({type:"cancel-background-task",taskId:c})},[t]),handleSchedulesMessage:o,requestSchedules:u}}let Xg=0;function $i(t){return Xg+=1,`${t}_${Xg}_${Date.now()}`}function FE(t){return t.sessions.some(i=>typeof i.live=="boolean")}const Mf="robota.restoreSessionId";function XE(t){try{window.sessionStorage.setItem(Mf,t)}catch{}}function QE(){try{return window.sessionStorage.getItem(Mf)}catch{return null}}function $E(){try{window.sessionStorage.removeItem(Mf)}catch{}}function ZE(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(min-width: 768px)").matches}function KE(t){const[i,r]=j.useState(null),[u,o]=j.useState(null),[c,f]=j.useState(ZE),p=j.useRef(null),g=j.useRef(!1),m=j.useCallback(()=>{const R=$i("sessions");p.current=R,t({type:"list-sessions",requestId:R})},[t]),b=j.useRef(null);b.current=i?.currentSessionId??null;const x=j.useCallback(R=>{R!==b.current&&t({type:"switch-session",sessionId:R,requestId:$i("session_change")})},[t]),S=j.useCallback(()=>t({type:"new-session",requestId:$i("session_change")}),[t]),v=j.useCallback((R,W)=>t({type:"rename-session",sessionId:R,name:W,requestId:$i("session_rename")}),[t]),N=j.useCallback(R=>t({type:"delete-session",sessionId:R,requestId:$i("session_delete")}),[t]),T=j.useRef(null),L=j.useRef(null),E=j.useCallback(()=>{L.current=QE()??T.current},[]),V=j.useCallback(R=>{const W=L.current;L.current=null,W!==null&&($E(),W!==R.currentSessionId&&FE(R)&&R.sessions.some(ie=>ie.id===W)&&t({type:"switch-session",sessionId:W,requestId:$i("session_change")}))},[t]);return{sessionListing:i,sessionsError:u,requestSessions:m,switchSession:x,newSession:S,renameSessionInList:v,deleteSession:N,sessionSidebarOpen:c,setSessionSidebarOpen:f,handleSessionsMessage:j.useCallback(R=>R.type!=="sessions"&&R.type!=="sessions_error"?!1:R.requestId!==p.current?!0:R.type==="sessions"?(g.current=!1,r(R.listing),o(null),V(R.listing),!0):(L.current=null,g.current=R.code==="not_available",R.code==="not_available"&&r(null),o({code:R.code,message:R.message}),!0),[V]),canListSessions:j.useCallback(()=>!g.current,[]),markCurrent:j.useCallback(R=>{T.current=R,r(W=>W===null?W:{...W,currentSessionId:R})},[]),armRestore:E}}let Qg=0;function $g(t){return Qg+=1,`${t}_${Qg}_${Date.now()}`}function JE(t){const[i,r]=j.useState(!1),[u,o]=j.useState("idle"),[c,f]=j.useState(null),[p,g]=j.useState(null),[m,b]=j.useState(null),x=j.useRef(null),S=j.useCallback(N=>N.type!=="settings"&&N.type!=="settings_error"?!1:x.current!==N.requestId?!0:N.type==="settings"?(f(N.settings),o("ready"),g(null),!0):(g(N.message),o(T=>T==="ready"?"ready":"error"),!0),[]),v=j.useCallback(()=>{o(T=>T==="ready"?"ready":"loading"),g(null);const N=$g("get_settings");x.current=N,t({type:"get-settings",requestId:N})},[t]);return{settingsOpen:i,settingsStatus:u,settingsSnapshot:c,settingsError:p,settingsInitialSectionId:m,openSettings:j.useCallback(N=>{r(!0),b(N??null),v()},[v]),closeSettings:j.useCallback(()=>{r(!1)},[]),updateSettings:j.useCallback(N=>{const T=$g("update_settings");x.current=T,g(null),t({type:"update-settings",requestId:T,patch:N})},[t]),handleSettingsMessage:S,refreshSettings:v}}let PE=0;function dt(){return`msg_${++PE}_${Date.now()}`}let Zg=0;function WE(){return Zg+=1,`silent_command_${Zg}_${Date.now()}`}function My(t,i){const r=t[t.length-1];return r&&r.type==="text"?[...t.slice(0,-1),{...r,text:r.text+i}]:[...t,{type:"text",id:dt(),text:i}]}function Oy(t,i){const r=t[t.length-1];return r&&r.type==="tools"?[...t.slice(0,-1),{...r,tools:[...r.tools,i]}]:[...t,{type:"tools",id:dt(),tools:[i]}]}function Ly(t,i){return i.executionId!==void 0?t.findIndex(r=>r.executionId===i.executionId&&r.status==="running"):t.findIndex(r=>r.name===i.toolName&&r.status==="running")}function Uy(t){return{id:dt(),name:t.toolName,input:t.firstArg,...t.executionId?{executionId:t.executionId}:{},...t.displayPath?{displayPath:t.displayPath}:{},...t.commandName?{commandName:t.commandName}:{},...t.internal?{internal:!0}:{}}}function Of(t){return{status:t.isRunning?"running":t.result==="error"?"error":"done",result:t.result,...t.diffLines?{diffLines:t.diffLines}:{},...t.diffFile?{diffFile:t.diffFile}:{},...t.toolResultData!==void 0?{toolResultData:t.toolResultData}:{}}}function e_(t,i){let r=!1;return t.map(u=>{if(r||u.type!=="tools")return u;const o=Ly(u.tools,i);if(o===-1)return u;r=!0;const c=[...u.tools];return c[o]={...c[o],...Of(i)},{...u,tools:c}})}function qy(t){const i=new Map;for(const r of t)if(r.type==="tools")for(const u of r.tools){if(!u.diffFile||!u.diffLines||u.diffLines.length===0)continue;const o=u.diffLines.filter(p=>p.type==="add").length,c=u.diffLines.filter(p=>p.type==="remove").length,f=i.get(u.diffFile);i.set(u.diffFile,{path:u.diffFile,added:(f?.added??0)+o,removed:(f?.removed??0)+c,diffLines:u.diffLines})}return[...i.values()]}function t_(t){return{...Uy(t),...Of(t)}}function n_(t){const i=[];let r=[];const u=()=>{for(const c of r)i.push(c.type==="tools"?{id:c.id,role:"tools",tools:c.tools}:{id:c.id,role:"assistant",content:c.text});const o=qy(r);o.length>0&&i.push({id:dt(),role:"changed-files",files:o}),r=[]};for(const o of t)o.type==="text"&&o.role==="user"?(u(),i.push({id:dt(),role:"user",content:o.content})):o.type==="text"?r=My(r,o.content):r=Oy(r,t_(o.tool));return u(),i}function l_(t){const[i,r]=j.useState("disconnected"),[u,o]=j.useState([]),[c,f]=j.useState([]),[p,g]=j.useState(""),[m,b]=j.useState(!1),[x,S]=j.useState(null),[v,N]=j.useState([]),[T,L]=j.useState(null),[E,V]=j.useState(null),[R,W]=j.useState([]),[ie,M]=j.useState(null),Y=j.useRef(null),[ue,J]=j.useState(null),[U,ne]=j.useState(null),[le,xe]=j.useState(!1),oe=j.useCallback(()=>xe(!0),[]),P=j.useCallback(()=>xe(!1),[]),D=j.useRef(null),Q=j.useRef(""),se=j.useRef([]),me=j.useRef([]),C=j.useRef(null),_=j.useRef(null),H=j.useCallback(K=>{se.current=K(se.current),f(se.current)},[]),w=j.useCallback(K=>{o(ce=>[...ce,K])},[]),ae=j.useCallback(K=>{const ce=me.current;me.current=[],Q.current="",g(""),b(!1),H(()=>[]);for(const ut of ce)ut.type==="tools"?w({id:ut.id,role:"tools",tools:ut.tools.map(Tn=>({...Tn,status:K(Tn)}))}):w({id:ut.id,role:"assistant",content:ut.text});const Ee=qy(ce);Ee.length>0&&w({id:dt(),role:"changed-files",files:Ee})},[w,H]),fe=j.useRef(0),he=j.useRef(new Set),je=j.useRef(0),Ge=j.useRef(new Set),ge=j.useCallback(K=>{if(K.type==="command"){if(K.name==="help"){xe(!0);return}const ce=Y.current?.commands.find(Ee=>Ee.name===K.name);if(Dy(ce??{name:K.name})){w({id:dt(),role:"command",name:K.name,content:Ry(K.name),tone:"info"});return}fe.current+=1}(K.type==="switch-session"||K.type==="new-session")&&(je.current+=1,K.requestId!==void 0&&Ge.current.add(K.requestId)),D.current?.send(K)},[w]),yt=j.useCallback(K=>{je.current=Math.max(0,je.current-1),K!==void 0&&Ge.current.delete(K)},[]),Ot=j.useCallback((K,ce)=>{const Ee=WE();he.current.add(Ee),ge({type:"command",name:K,requestId:Ee,...ce?{args:ce}:{}})},[ge]),{handleUsageMessage:ln,...rl}=YE(ge),{handleExecutionDetailMessage:qt,closeExecutionDetail:rn,...En}=BE(ge),{handleModelListMessage:_n,...al}=IE(ge),{handleProjectMessage:bn,...ee}=GE(ge),{handleSessionsMessage:Le,canListSessions:it,markCurrent:an,armRestore:rt,...Cn}=KE(ge),{requestSessions:F,setSessionSidebarOpen:re}=Cn,{handleSettingsMessage:ve,openSettings:_e,refreshSettings:He,...At}=JE(ge),un=j.useRef(!1);un.current=At.settingsOpen;const{handleAgentDefinitionsMessage:vt,resolveSwitchResult:at,openAgentSwitcher:St,...Fe}=UE(ge),{handleSchedulesMessage:vn,requestSchedules:zt,...Vu}=VE(ge),Ol=j.useCallback(K=>{if(LE[K.type],!ln(K)&&!qt(K)&&!_n(K)&&!bn(K)&&!Le(K)&&!ve(K)&&!vt(K)&&!vn(K))switch(K.type){case"messages":{const ce=K.display?n_(K.display):K.messages.flatMap(Ee=>{if(Ee.role!=="user"&&Ee.role!=="assistant")return[];const ut=Ee.content??"";return[{id:dt(),role:Ee.role,content:ut}]});o(ce),K.driverId&&ne(K.driverId);break}case"user_message":o(ce=>[...ce,{id:dt(),role:"user",content:K.content??"",...K.driverId?{author:K.driverId}:{}}]);break;case"text_delta":{const ce=Q.current+K.delta;Q.current=ce,g(ce),me.current=My(me.current,K.delta);break}case"thinking":b(K.isThinking);break;case"tool_start":{const{state:ce}=K,Ee={...Uy(ce),status:"running"};H(ut=>[...ut,Ee]),me.current=Oy(me.current,Ee);break}case"tool_end":{const{state:ce}=K;H(Ee=>{const ut=Ly(Ee,ce);if(ut===-1)return Ee;const Tn=[...Ee];return Tn[ut]={...Tn[ut],...Of(ce)},Tn}),me.current=e_(me.current,ce);break}case"execution_workspace_event":S(K.snapshot);break;case"background_task_control_result":K.success||W(ce=>[...ce,{id:dt(),kind:"background-task-control-failed",message:K.message??`Could not stop ${K.taskId}.`}]);break;case"pending":L(K.pending===null?null:{text:K.pending,count:K.pendingCount??1});break;case"permission_request":case"ask_request":case"prompt_resolved":N(ce=>TE(ce,K));break;case"ui_intent":{if(ju(K.event.intent)==="session-sidebar"&&it()){re(!0),F(),fe.current>0&&(C.current={name:Kr(K.event.intent),text:null});break}if(ju(K.event.intent)==="settings"){_e(),fe.current>0&&(C.current={name:Kr(K.event.intent),text:null});break}if(ju(K.event.intent)==="settings-plugins"){_e("plugins"),fe.current>0&&(C.current={name:Kr(K.event.intent),text:null});break}if(ju(K.event.intent)==="agent-switcher"){St(),fe.current>0&&(C.current={name:Kr(K.event.intent),text:null});break}const ce={name:Kr(K.event.intent),text:DE(K.event.intent)};fe.current>0?C.current=ce:w({id:dt(),role:"command",name:ce.name,content:ce.text,tone:"info"});break}case"session_renamed":V(K.event.name),F();break;case"session_switched":yt(),_.current=null,J(null),Q.current="",me.current=[],g(""),b(!1),H(()=>[]),o([]),N([]),L(null),V(null),S(null),rn(),an(K.event.sessionId),ge({type:"get-messages"}),ge({type:"get-status"}),ge({type:"get-commands"}),ge({type:"get-execution-workspace"}),ge({type:"get-pending"}),F(),zt();break;case"history_cleared":Q.current="",me.current=[],g(""),o([]);break;case"error":{const ce=K.model??_.current?.model;ge({type:"get-status"}),ae(Ee=>Ee.status==="running"?"error":Ee.status),W(Ee=>[...Ee,{id:dt(),kind:"session-error",message:K.message,...K.code!==void 0&&{code:K.code},...K.provider!==void 0&&{provider:K.provider},...ce!==void 0&&{model:ce},...K.retryAfterSeconds!==void 0&&{retryAfterSeconds:K.retryAfterSeconds}}]);break}case"session_change_failed":if(K.requestId!==void 0&&!Ge.current.has(K.requestId))break;yt(K.requestId),W(ce=>[...ce,{id:dt(),kind:"session-change-refused",message:K.message}]);break;case"session_renamed_in_list":F();break;case"session_rename_failed":W(ce=>[...ce,{id:dt(),kind:"session-change-refused",message:K.message}]);break;case"session_deleted":F();break;case"session_delete_failed":W(ce=>[...ce,{id:dt(),kind:"session-change-refused",message:K.message}]);break;case"protocol_error":{if(je.current>0){yt(),W(Ee=>[...Ee,{id:dt(),kind:"protocol-error",message:K.message}]);break}fe.current=Math.max(0,fe.current-1);const ce=C.current;C.current=null,ce!==null&&ce.text!==null&&w({id:dt(),role:"command",name:ce.name,content:ce.text,tone:"info"}),W(Ee=>[...Ee,{id:dt(),kind:"protocol-error",message:K.message}]);break}case"commands":{const ce={commands:K.commands,skills:K.skills};Y.current=ce,M(ce);break}case"session_status":_.current=K.status,J(K.status);break;case"command_result":{ge({type:"get-status"}),ge({type:"get-commands"}),fe.current=Math.max(0,fe.current-1),K.name==="provider"&&K.success&&un.current&&He();const ce=K.requestId!==void 0&&he.current.delete(K.requestId);if(at(K.requestId,K))break;const Ee=C.current;if(C.current=null,Ee!==null&&K.success){Ee.text!==null&&w({id:dt(),role:"command",name:K.name,content:Ee.text,tone:"info"});break}if(K.message.trim().length===0)break;if(ce){K.success||W(ut=>[...ut,{id:dt(),kind:"command-failed",message:K.message}]);break}w({id:dt(),role:"command",name:K.name,content:K.message,tone:K.success?"success":"error"});break}case"complete":case"interrupted":ge({type:"get-status"}),ge({type:"get-pending"}),F(),ae(ce=>ce.status==="running"?"done":ce.status);break}},[w,it,rn,ae,vt,qt,_n,bn,vn,Le,ve,ln,an,St,_e,He,zt,F,at,ge,re,yt,H]),ai=j.useCallback((K,ce)=>{D.current?.send(AE(K,ce)),N(Ee=>Ee.filter(ut=>ut.id!==K))},[]),ui=j.useCallback((K,ce)=>{D.current?.send(zE(K,ce)),N(Ee=>Ee.filter(ut=>ut.id!==K))},[]),Un=j.useCallback(K=>{W(ce=>ce.filter(Ee=>Ee.id!==K))},[]);return j.useEffect(()=>{const ce=t({onMessage:Ol,onStatusChange:Ee=>{r(Ee),Ee==="connected"&&(fe.current=0,he.current.clear(),je.current=0,Ge.current.clear(),C.current=null,ce.send({type:"get-commands"}),ce.send({type:"get-status"}),ce.send({type:"get-pending"}),rt(),F(),zt())}});return D.current=ce,ce.connect(),()=>{ce.disconnect(),D.current=null}},[t,Ol,F,zt,rt]),{status:i,messages:u,activeTools:c,streamingText:p,isThinking:m,executionWorkspace:x,sessionName:E,commandCatalog:ie,sessionStatus:ue,ownDriverId:U,send:ge,sendCommandSilently:Ot,pendingPrompts:v,queuedPrompt:T,answerPermission:ai,answerAsk:ui,...rl,...En,closeExecutionDetail:rn,...al,...ee,...Cn,sessionNotices:R,dismissSessionNotice:Un,openSettings:_e,...At,openAgentSwitcher:St,...Fe,...Vu,helpOpen:le,openHelp:oe,closeHelp:P}}function i_(t){const[i,r]=j.useState(!1),u=l_(j.useCallback(o=>OE(t,{...o,onGiveUp:()=>r(!0)}),[t]));return j.useEffect(()=>{u.status==="connected"&&r(!1)},[u.status]),{...u,connectionLost:i}}async function r_(t){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{}if(!a_(t))throw new Error("copy failed")}function a_(t){if(typeof document>"u"||typeof document.execCommand!="function")return!1;const i=document.activeElement instanceof HTMLElement?document.activeElement:null,r=document.createElement("textarea");r.value=t,r.setAttribute("readonly",""),r.style.position="fixed",r.style.top="0",r.style.left="0",r.style.opacity="0",r.style.pointerEvents="none",document.body.appendChild(r),r.focus(),r.select();let u=!1;try{u=document.execCommand("copy")}catch{u=!1}return document.body.removeChild(r),i?.focus(),u}const u_=2e3;function s_(){const[t,i]=j.useState("idle");return j.useEffect(()=>{if(t==="idle")return;const u=setTimeout(()=>i("idle"),u_);return()=>clearTimeout(u)},[t]),{status:t,copy:u=>{r_(u).then(()=>i("copied"),()=>i("error"))}}}function tf(t){return t.startsWith("attach:")?"terminal":t==="app"?"desktop-app":t==="browser"?"browser":t==="remote:ws"?"remote":t.startsWith("peer:")?"peer":null}function By(t,i){if(t===E0)return!0;if(t===bx||i===null)return!1;if(t===i)return!0;const r=tf(t);return r!==null&&r===tf(i)}function o_(t){switch(tf(t)){case"terminal":return"the terminal";case"desktop-app":return"the desktop app";case"browser":return"the browser";case"remote":case"peer":return"a remote device";default:return"another surface"}}function Hy(t){return t===bx?"Automatic — loop":`from ${o_(t)}`}const c_={add:"bg-accent/10 text-foreground",remove:"bg-destructive/10 text-foreground",context:"text-muted-foreground",hunk:"text-subtle"},f_={add:"+ ",remove:"- ",context:" ",hunk:""},Tc=40,Nu=500;function Kg({line:t}){return h.jsx("div",{className:`whitespace-pre ${c_[t.type]}`,children:`${f_[t.type]}${t.text}`})}function Yu({diffLines:t}){const[i,r]=j.useState(!1);if(t.length<=Tc)return h.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:t.map((f,p)=>h.jsx(Kg,{line:f},p))});const u=t.slice(0,Nu),o=i?u:t.slice(0,Tc),c=Math.min(t.length,Nu)-Tc;return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:o.map((f,p)=>h.jsx(Kg,{line:f},p))}),i&&t.length>Nu&&h.jsxs("p",{className:"text-[12px] text-subtle",children:[t.length-Nu," more lines not shown"]}),h.jsx("button",{type:"button",onClick:()=>r(f=>!f),className:"self-start text-[12.5px] text-accent hover:underline",children:i?"Show less":`Show more (${c} more lines)`})]})}function nf(t){return t==null||typeof t=="boolean"?"":typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(nf).join(""):cf.isValidElement(t)?nf(t.props.children):""}function Iy({label:t,getText:i,className:r=""}){const{status:u,copy:o}=s_(),c=u==="copied"?"Copied":u==="error"?"Couldn't copy":"";return h.jsxs("span",{className:`inline-flex items-center ${r}`,children:[h.jsxs("button",{type:"button",onClick:()=>o(i()),className:"inline-flex items-center gap-1.5 rounded-md border border-border/60 bg-card px-2 py-1 text-[12px] font-medium text-muted-foreground shadow-sm shadow-black/5 transition-colors hover:bg-hover hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[u==="copied"?h.jsx(aa,{size:13,strokeWidth:2}):h.jsx(BN,{size:13,strokeWidth:1.9}),h.jsx("span",{children:t})]}),h.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:c})]})}function d_({children:t}){const i=nf(t).replace(/\n$/,"");return h.jsxs("div",{className:"group/code relative my-1",children:[h.jsx("pre",{tabIndex:0,"aria-label":"Code block, horizontally scrollable",className:"gui-code-scroll overflow-x-auto rounded-xl bg-sidebar px-4 py-3.5 font-mono text-[13px] leading-[1.65] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:t}),h.jsx(Iy,{label:"Copy code",getText:()=>i,className:"absolute right-2 top-2 opacity-0 transition-opacity group-hover/code:opacity-100 group-focus-within/code:opacity-100 [@media(hover:none)]:opacity-100"})]})}function h_({children:t}){return h.jsx(nw,{remarkPlugins:[mN],components:{h1:({children:i})=>h.jsx("h1",{className:"mt-6 text-[20px] font-semibold leading-snug tracking-[-0.015em] first:mt-0",children:i}),h2:({children:i})=>h.jsx("h2",{className:"mt-6 text-[17px] font-semibold leading-snug tracking-[-0.01em] first:mt-0",children:i}),h3:({children:i})=>h.jsx("h3",{className:"mt-5 text-[15px] font-semibold leading-snug first:mt-0",children:i}),p:({children:i})=>h.jsx("p",{children:i}),pre:d_,code:({className:i,children:r})=>i?h.jsx("code",{className:`font-mono ${i??""}`,children:r}):h.jsx("code",{className:"rounded-md bg-raised px-1.5 py-0.5 font-mono text-[0.85em]",children:r}),ul:({children:i})=>h.jsx("ul",{className:"ml-5 list-outside list-disc space-y-1.5 marker:text-subtle",children:i}),ol:({children:i})=>h.jsx("ol",{className:"ml-5 list-outside list-decimal space-y-1.5 marker:text-subtle",children:i}),li:({children:i})=>h.jsx("li",{className:"pl-1",children:i}),strong:({children:i})=>h.jsx("strong",{className:"font-semibold",children:i}),em:({children:i})=>h.jsx("em",{className:"italic",children:i}),a:({href:i,children:r})=>h.jsx("a",{href:i,className:"text-accent underline decoration-accent/40 underline-offset-[3px] hover:decoration-accent",target:"_blank",rel:"noopener noreferrer",children:r}),table:({children:i})=>h.jsx("div",{className:"overflow-x-auto",children:h.jsx("table",{className:"w-full border-collapse text-[14px]",children:i})}),thead:({children:i})=>h.jsx("thead",{children:i}),th:({children:i})=>h.jsx("th",{className:"border-b border-border px-3 py-2 text-left text-[13px] font-medium text-muted-foreground",children:i}),td:({children:i})=>h.jsx("td",{className:"px-3 py-2 align-top",children:i}),blockquote:({children:i})=>h.jsx("blockquote",{className:"border-l-2 border-subtle/50 pl-4 text-muted-foreground",children:i}),hr:()=>h.jsx("hr",{className:"mx-auto my-7 w-12 border-subtle/40"})},children:t})}function p_({content:t,author:i,ownDriverId:r}){const u=i&&!By(i,r)?Hy(i):void 0;return h.jsxs("div",{className:"flex flex-col items-end gap-1.5 pl-12",children:[u&&h.jsx("span",{className:"px-1 text-[12.5px] text-subtle",children:u}),h.jsx("div",{className:"max-w-full whitespace-pre-wrap break-words rounded-[20px] bg-raised px-4 py-2.5 text-[15px] leading-relaxed text-foreground",children:t})]})}function Jg({content:t,isStreaming:i=!1}){return h.jsxs("div",{className:"group/message gui-prose",children:[h.jsx(h_,{children:t}),i&&h.jsx("span",{className:"ml-1 inline-block h-2.5 w-2.5 animate-pulse rounded-full bg-foreground/70 align-middle"}),!i&&h.jsx("div",{className:"flex opacity-0 transition-opacity focus-within:opacity-100 group-hover/message:opacity-100 group-focus-within/message:opacity-100 [@media(hover:none)]:opacity-100",children:h.jsx(Iy,{label:"Copy message",getText:()=>t})})]})}function m_({name:t,className:i}){const r=t.toLowerCase(),u={size:15,strokeWidth:1.75,className:i};return/(read|view|cat|open)/u.test(r)?h.jsx(FN,{...u}):/(grep|glob|search|find|list|ls)/u.test(r)?h.jsx(hE,{...u}):/(edit|write|patch|replace|create)/u.test(r)?h.jsx(Ey,{...u}):/(bash|shell|exec|run|command|terminal)/u.test(r)?h.jsx(kE,{...u}):/(web|fetch|http|url|browse)/u.test(r)?h.jsx(JN,{...u}):/(agent|task|delegate)/u.test(r)?h.jsx(_N,{...u}):h.jsx(Ay,{...u})}const g_=52;function Yy(t,i=g_){if(t.length<=i)return t;const r=t.lastIndexOf("/");if(r===-1)return t;const u=t.slice(r+1),o=t.slice(0,r),c=i-u.length-2;return c<=0?`…/${u}`:`…${o.slice(o.length-c)}/${u}`}function x_(t){if(t)try{const i=JSON.parse(t);return{...typeof i.output=="string"&&i.output?{output:i.output}:{},...typeof i.error=="string"&&i.error?{error:i.error}:{},...typeof i.exitCode=="number"?{exitCode:i.exitCode}:{}}}catch{return{output:t}}}const Ac=20,zc=500;function y_({text:t}){const[i,r]=j.useState(!1),u=t.split(`
|
|
303
|
-
`);if(u.length<=Ac)return h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t});const o=u.slice(0,zc);return h.jsxs("div",{className:"flex flex-col gap-1",children:[h.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:(i?o:u.slice(0,Ac)).join(`
|
|
304
|
-
`)}),i&&u.length>zc&&h.jsxs("p",{className:"text-[12px] text-subtle",children:[u.length-zc," more lines"]}),h.jsx("button",{type:"button",onClick:()=>r(c=>!c),className:"self-start text-[12.5px] text-accent hover:underline",children:i?"Show less":`Show more (${u.length-Ac} more lines)`})]})}function Gy({tool:t}){const i=t.status==="running",r=t.status==="error",[u,o]=j.useState(!1),c=x_(t.toolResultData),f=t.diffLines!==void 0&&t.diffLines.length>0,p=!!c?.output||!!c?.error,g=f||p,m=t.commandName?`Ran /${t.commandName}`:t.name;return h.jsxs("div",{className:"flex flex-col text-[14px]",children:[h.jsxs("button",{type:"button",disabled:!g,"aria-expanded":g?u:void 0,onClick:()=>g&&o(b=>!b),className:`group -mx-2 flex min-w-0 items-center gap-2.5 rounded-lg px-2 py-1 text-left ${g?"hover:bg-hover":"cursor-default"}`,children:[h.jsx(m_,{name:t.name,className:`flex-shrink-0 ${r?"text-destructive":"text-subtle"}`}),h.jsx("span",{className:`flex-shrink-0 font-medium ${i?"gui-shimmer":r?"text-destructive":"text-muted-foreground"}`,children:m}),t.displayPath?h.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-subtle",title:t.displayPath,children:Yy(t.displayPath)}):typeof t.input=="string"&&t.input&&h.jsx("span",{className:"min-w-0 truncate font-mono text-[12.5px] text-subtle",children:t.input}),h.jsxs("span",{className:"ml-auto flex flex-shrink-0 items-center gap-1.5 text-[12.5px] text-subtle",children:[i?h.jsx(Af,{size:14,className:"animate-spin","aria-label":"running"}):r?h.jsx("span",{className:"text-destructive",children:"failed"}):h.jsx(aa,{size:14,"aria-label":"done"}),g&&h.jsx(Iu,{size:13,className:`transition-transform ${u?"rotate-90":""}`})]})]}),u&&g&&h.jsxs("div",{className:"flex flex-col gap-1 pb-1 pl-[25px] pt-0.5",children:[f&&h.jsx(Yu,{diffLines:t.diffLines}),!f&&c?.output&&h.jsx(y_,{text:c.output}),c?.error&&h.jsx("p",{className:"font-mono text-[12.5px] text-destructive",children:c.error}),typeof c?.exitCode=="number"&&h.jsxs("p",{className:"text-[12px] text-subtle",children:["exit ",c.exitCode]})]})]})}const Pg=12,Wg=280,b_={success:{dot:"bg-accent",text:"text-foreground/90"},error:{dot:"bg-destructive",text:"text-destructive"},info:{dot:"bg-subtle",text:"text-muted-foreground"}};function v_({entry:t}){const i=t.content.split(`
|
|
305
|
-
`),r=j.useRef(null),[u,o]=j.useState(!1),[c,f]=j.useState(!1);j.useLayoutEffect(()=>{const S=r.current;S&&o(S.scrollHeight>Wg)},[t.content]);const p=i.length>Pg,g=p||u,m=g&&!c,b=m&&p?i.slice(0,Pg).join(`
|
|
306
|
-
`):t.content,x=b_[t.tone];return h.jsxs("div",{"data-testid":"command-output","data-tone":t.tone,className:"overflow-hidden rounded-xl bg-card",children:[h.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-[13px]",children:[h.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${x.dot}`}),h.jsxs("span",{className:"font-mono font-medium text-foreground",children:["/",t.name]})]}),h.jsxs("div",{className:"relative",children:[h.jsx("pre",{ref:r,style:m?{maxHeight:Wg}:void 0,className:`overflow-hidden whitespace-pre-wrap break-words px-4 pb-3 pt-1.5 leading-[1.65] ${g?"font-mono text-[13px]":"font-sans text-[14.5px]"} ${x.text}`,children:b}),m&&h.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-card to-transparent"})]}),g&&h.jsxs("button",{type:"button",onClick:()=>f(S=>!S),className:"flex w-full items-center gap-1.5 px-4 pb-2.5 pt-1 text-left text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(Ny,{size:14,className:c?"rotate-180":""}),c?"Show less":`Show all ${i.length} lines`]})]})}function S_({tools:t}){const[i,r]=j.useState(!1),u=t.filter(f=>!f.internal),o=u.filter(f=>f.status==="error").length,c=[...new Set(u.map(f=>f.commandName?`/${f.commandName}`:f.name))].join(", ");return u.length===0?null:h.jsxs("div",{className:"text-[14px]",children:[h.jsxs("button",{type:"button","aria-expanded":i,onClick:()=>r(f=>!f),className:"group -mx-2 flex max-w-full items-center gap-2.5 rounded-lg px-2 py-1 text-left text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(Ay,{size:15,strokeWidth:1.75,className:"flex-shrink-0 text-subtle"}),h.jsxs("span",{className:"flex-shrink-0",children:[u.length," tool ",u.length===1?"call":"calls"]}),h.jsx("span",{className:"min-w-0 truncate text-subtle",children:c}),o>0&&h.jsxs("span",{className:"flex-shrink-0 rounded-md bg-destructive/12 px-1.5 text-[12.5px] text-destructive",children:[o," failed"]}),h.jsx(Iu,{size:14,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`})]}),i&&h.jsx("div",{className:"mt-0.5 flex flex-col pl-[25px]",children:u.map(f=>h.jsx(Gy,{tool:f},f.id))})]})}function k_({files:t}){const[i,r]=j.useState(null);return h.jsxs("div",{className:"flex flex-col gap-0.5 rounded-lg bg-card px-2 py-1.5 text-[13px]",children:[h.jsx("p",{className:"px-1 text-[12px] font-medium text-muted-foreground",children:"Changed files"}),t.map(u=>h.jsxs("div",{className:"flex flex-col",children:[h.jsxs("button",{type:"button","aria-expanded":i===u.path,onClick:()=>r(o=>o===u.path?null:u.path),className:"flex min-w-0 items-center gap-2 rounded-md px-1 py-1 text-left hover:bg-hover",children:[h.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-foreground",title:u.path,children:Yy(u.path)}),h.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",u.added]}),h.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",u.removed]})]}),i===u.path&&h.jsx("div",{className:"pl-2",children:h.jsx(Yu,{diffLines:u.diffLines})})]},u.path))]})}function w_(){return h.jsx("p",{className:"gui-shimmer w-fit text-[15px] font-medium",children:"Thinking…"})}const j_=80;function N_({messages:t,activeTools:i,streamingText:r,isThinking:u,ownDriverId:o}){const c=j.useRef(null),f=j.useRef(!0),[p,g]=j.useState(!0),[m,b]=j.useState(!1),x=E=>{f.current=E,g(E)};j.useLayoutEffect(()=>{if(f.current){const E=c.current;E&&(E.scrollTop=E.scrollHeight),x(!0),b(!1)}else b(!0)},[t.length,r,u,i.length]);const S=()=>{const E=c.current;if(!E)return;const V=E.scrollHeight-E.scrollTop-E.clientHeight<=j_;x(V),V&&b(!1)},v=()=>{const E=c.current;E&&(E.scrollTop=E.scrollHeight),x(!0),b(!1)},N=t.length===0&&!u&&i.length===0&&!r,T=u||r.length>0||i.some(E=>E.status==="running"),L=!p&&(m||T);return h.jsxs("div",{className:"robota-ui relative flex h-full min-h-0 flex-col",children:[h.jsx("main",{ref:c,onScroll:S,className:"min-h-0 flex-1 overflow-y-auto","aria-label":"Conversation",children:h.jsxs("div",{className:"mx-auto flex w-full max-w-[760px] flex-col gap-6 px-6 pb-6 pt-8",children:[N&&h.jsx("div",{className:"flex h-full items-center justify-center",children:h.jsx("p",{className:"text-[14px] text-subtle",children:"No messages yet"})}),t.map(E=>{switch(E.role){case"user":return h.jsx(p_,{content:E.content,author:E.author,ownDriverId:o},E.id);case"assistant":return h.jsx(Jg,{content:E.content},E.id);case"command":return h.jsx(v_,{entry:E},E.id);case"tools":return h.jsx(S_,{tools:E.tools},E.id);case"changed-files":return h.jsx(k_,{files:E.files},E.id)}}),u&&!r&&h.jsx(w_,{}),i.some(E=>!E.internal)&&h.jsx("div",{className:"flex flex-col",children:i.filter(E=>!E.internal).map(E=>h.jsx(Gy,{tool:E},E.id))}),r&&h.jsx(Jg,{content:r,isStreaming:!0})]})}),L&&h.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center",children:h.jsxs("button",{type:"button",onClick:v,className:"pointer-events-auto flex items-center gap-1.5 rounded-full bg-primary px-3.5 py-2 text-[13px] font-medium text-primary-foreground shadow-lg shadow-black/25 hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[h.jsx(wN,{size:14,strokeWidth:2.25}),"Jump to latest"]})})]})}const ex='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';let Jr=[];function ua({open:t,onClose:i,title:r,children:u,destructive:o=!1,panelClassName:c,describedById:f,restoreFocusTo:p,role:g="dialog"}){const m=j.useRef(null),b=j.useRef(null),x=j.useId(),S=j.useRef(Symbol("dialog"));return j.useEffect(()=>{if(!t)return;b.current=p??document.activeElement;const v=m.current;return(v?.querySelector(ex)??v)?.focus(),()=>{b.current?.focus?.()}},[t]),j.useEffect(()=>{if(!t)return;const v=S.current;return Jr.push(v),()=>{Jr=Jr.filter(N=>N!==v)}},[t]),j.useEffect(()=>{if(!t)return;const v=S.current,N=()=>Jr[Jr.length-1]===v,T=L=>{if(!N())return;if(L.key==="Escape"){L.stopImmediatePropagation(),i();return}if(L.key!=="Tab")return;const E=m.current;if(!E)return;const V=Array.from(E.querySelectorAll(ex));if(V.length===0)return;const R=V[0],W=V[V.length-1];L.shiftKey&&document.activeElement===R?(L.preventDefault(),W?.focus()):!L.shiftKey&&document.activeElement===W&&(L.preventDefault(),R?.focus())};return document.addEventListener("keydown",T,!0),()=>document.removeEventListener("keydown",T,!0)},[t,i]),t?h.jsx("div",{className:"robota-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",onMouseDown:v=>{o||v.target===v.currentTarget&&i()},children:h.jsxs("div",{ref:m,role:g,"aria-modal":"true","aria-labelledby":x,...f?{"aria-describedby":f}:{},tabIndex:-1,className:c??"flex max-h-[85vh] w-full max-w-lg flex-col rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[h.jsx("h2",{id:x,className:"sr-only",children:r}),u]})}):null}const Lf="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",E_=`${Lf} bg-primary text-primary-foreground hover:opacity-90`,__=`${Lf} bg-raised text-foreground hover:bg-hover`,C_=`${Lf} bg-destructive text-destructive-foreground hover:opacity-90`;function Rl({open:t,title:i,body:r,confirmLabel:u,cancelLabel:o="Cancel",destructive:c=!1,onConfirm:f,onCancel:p,restoreFocusTo:g}){const m=j.useId();return h.jsxs(ua,{open:t,onClose:p,title:i,destructive:c,role:c?"alertdialog":"dialog",describedById:m,restoreFocusTo:g,panelClassName:"w-full max-w-sm rounded-2xl bg-card p-5 text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[h.jsx("p",{className:"text-[15px] font-medium text-foreground",children:i}),h.jsx("p",{id:m,className:"mt-2 text-[13.5px] text-muted-foreground",children:r}),h.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[h.jsx("button",{type:"button",className:__,onClick:p,children:o}),h.jsx("button",{type:"button",className:c?C_:E_,onClick:f,children:u})]})]})}const T_={satisfied:"Satisfied","max-iterations":"Stopped — reached the iteration limit",cancelled:"Cancelled","no-progress":"Stopped — no progress"};function A_(t){return t.status==="active"?"Active":t.status==="satisfied"?"Satisfied":t.stopReason?T_[t.stopReason]:"Stopped"}const Vy=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function z_(t){return t.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"})}function tx(t,i){return t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()}function D_(t,i=new Date){const r=new Date(t);if(Number.isNaN(r.getTime()))return"Unknown";const u=z_(r);if(tx(r,i))return`Today ${u}`;const o=new Date(i);if(o.setDate(i.getDate()+1),tx(r,o))return`Tomorrow ${u}`;const c=new Date(i);return c.setDate(i.getDate()+6),r.getTime()>i.getTime()&&r.getTime()<=c.getTime()?`${Vy[r.getDay()]} ${u}`:`${r.toLocaleDateString(void 0,{month:"short",day:"numeric"})} ${u}`}function R_(t){const i=t.trim().split(/\s+/);if(i.length!==5)return;const[r,u,o,c,f]=i;if(o!=="*"||c!=="*"||!/^\d{1,2}$/.test(r)||!/^\d{1,2}$/.test(u))return;const p=`${u.padStart(2,"0")}:${r.padStart(2,"0")}`;if(f==="*")return`Every day at ${p}`;if(f==="1-5")return`Every weekday at ${p}`;if(f==="0,6"||f==="6,0")return`Every weekend at ${p}`;if(/^\d$/.test(f)){const g=Vy[Number(f)];return g?`Every ${g} at ${p}`:void 0}}function M_(t,i=new Date){if(t.nextFireAt)return D_(t.nextFireAt,i);const r=t.schedule?.cronExpression;return r?R_(r)??"Repeats":"—"}function Fy(t){return t.schedule?.agentInstruction??t.label}const O_={sleeping:"Active",paused:"Paused",running:"Running",queued:"Queued",cancelled:"Deleted",failed:"Failed",completed:"Done",waiting_permission:"Needs you"};function L_(t){return O_[t.status]??t.status}function Xy(t,i){return t==="completed"&&(i??0)>0}function U_(t){return Qy(t.status,t.attention,t.deniedToolCalls)}function Qy(t,i,r){return i==="permission"||t==="waiting_permission"?{label:"Needs you",tone:"warning"}:i==="failed"||t==="failed"?{label:"Failed",tone:"destructive"}:Xy(t,r)?{label:"Needs permission",tone:"warning"}:t==="completed"?{label:"Done",tone:"muted"}:t==="cancelled"?{label:"Stopped",tone:"muted"}:t==="queued"?{label:"Queued",tone:"muted"}:t==="running"?{label:"Running",tone:"muted"}:null}function q_({tasks:t,schedules:i=[],goal:r=null,onPauseSchedule:u,onResumeSchedule:o,onDeleteSchedule:c,onCancelGoal:f,className:p,onSelect:g,onReturnToConversation:m,onStop:b,selectedEntryId:x}){const S=t.filter(E=>E.status==="running").length,v=i.filter(E=>E.status!=="cancelled"),[N,T]=j.useState(null),L=v.find(E=>E.id===N)??null;return h.jsxs("div",{className:`robota-ui flex flex-col overflow-hidden ${p??""}`,children:[h.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[h.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Agents"}),S>0&&h.jsxs("span",{className:"ml-auto text-[13px] tabular-nums text-subtle",children:[S," running"]})]}),h.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto px-3 pb-3",children:[t.length>0&&h.jsx("div",{className:"space-y-2",children:t.map(E=>h.jsx(B_,{entry:E,selected:E.id===x,onOpen:E.kind==="main_thread"?m:g&&(()=>g(E)),onStop:b&&E.controls?.includes("cancel")?()=>b(E):void 0},E.id))}),v.length>0&&h.jsxs("div",{children:[h.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Scheduled"}),h.jsx("div",{className:"space-y-2",children:v.map(E=>h.jsx(H_,{task:E,onPause:u,onResume:o,onRequestDelete:()=>T(E.id)},E.id))})]}),r&&h.jsxs("div",{children:[h.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Goal"}),h.jsx(I_,{goal:r,onCancel:f})]})]}),h.jsx(Rl,{open:L!==null,title:"Delete this schedule?",body:L?`"${Fy(L)}" will stop running. This cannot be undone.`:"",confirmLabel:"Delete",destructive:!0,onConfirm:()=>{L&&c?.(L.id),T(null)},onCancel:()=>T(null)})]})}function B_({entry:t,selected:i,onOpen:r,onStop:u}){const o=t.attention==="permission"||t.status==="waiting_permission",c=t.attention==="failed"||t.status==="failed";return h.jsxs("div",{role:r?"button":void 0,tabIndex:r?0:void 0,onClick:r,onKeyDown:r?f=>{(f.key==="Enter"||f.key===" ")&&(f.preventDefault(),r())}:void 0,"aria-label":r?t.title:void 0,className:`rounded-xl px-3.5 py-3 transition-opacity duration-500 ${o?"bg-warning/10":c?"bg-destructive/10":"bg-card"} ${t.status==="completed"?"opacity-60":""} ${i?"ring-1 ring-inset ring-accent":""} ${r?"cursor-pointer":""}`,children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx(Y_,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),h.jsx(V_,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),u&&h.jsx("button",{type:"button","aria-label":`Stop ${t.title}`,onClick:f=>{f.stopPropagation(),u()},className:"flex-shrink-0 rounded-md px-1.5 py-px text-[12px] text-subtle hover:bg-destructive/10 hover:text-destructive",children:"Stop"})]}),t.currentAction&&h.jsx("p",{className:"mt-1.5 truncate pl-[26px] text-[13px] leading-snug text-muted-foreground",children:t.currentAction}),t.preview&&h.jsx("p",{className:"mt-1 truncate pl-[26px] font-mono text-[12px] leading-snug text-subtle",children:t.preview})]})}function H_({task:t,onPause:i,onResume:r,onRequestDelete:u}){const o=t.status==="paused";return h.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[h.jsx("p",{className:"truncate text-[14px] font-medium text-foreground",children:Fy(t)}),h.jsxs("p",{className:"mt-1 text-[13px] text-muted-foreground",children:[M_(t)," · ",L_(t)]}),h.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[o?h.jsxs("button",{type:"button",onClick:()=>r?.(t.id),className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(cE,{size:11,fill:"currentColor","aria-hidden":"true"}),"Resume"]}):h.jsxs("button",{type:"button",onClick:()=>i?.(t.id),className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(uE,{size:11,fill:"currentColor","aria-hidden":"true"}),"Pause"]}),h.jsx("button",{type:"button",onClick:u,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-destructive hover:bg-destructive/10",children:"Delete…"})]})]})}function I_({goal:t,onCancel:i}){return h.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[h.jsxs("div",{className:"flex items-center gap-2.5",children:[h.jsx(Ty,{size:16,strokeWidth:1.9,className:"flex-shrink-0 text-accent"}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.objective})]}),h.jsx("p",{className:"mt-1.5 pl-[26px] text-[13px] text-muted-foreground",children:A_(t)}),t.status==="active"&&h.jsx("div",{className:"mt-2 pl-[26px]",children:h.jsxs("button",{type:"button",onClick:i,className:"flex items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(Df,{size:11,fill:"currentColor","aria-hidden":"true"}),"Cancel goal"]})})]})}function Y_({status:t,attention:i,deniedToolCalls:r}){const u={size:16,strokeWidth:1.9,className:"flex-shrink-0"};return i==="permission"||t==="waiting_permission"?h.jsx(ef,{...u,className:`${u.className} text-warning`}):i==="failed"||t==="failed"?h.jsx(Ug,{...u,className:`${u.className} text-destructive`}):Xy(t,r)?h.jsx(ef,{...u,className:`${u.className} text-warning`}):t==="running"?h.jsx(Af,{...u,className:`${u.className} animate-spin text-muted-foreground`}):t==="completed"?h.jsx(MN,{...u,className:`${u.className} text-success`}):t==="cancelled"?h.jsx(Ug,{...u,className:`${u.className} text-subtle`}):h.jsx(LN,{...u,className:`${u.className} text-subtle`})}const G_={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"text-subtle"};function V_({attention:t,status:i,deniedToolCalls:r}){const u=Qy(i,t,r);return!u||u.label==="Running"?null:h.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${G_[u.tone]}`,children:u.label})}function F_({state:t}){if(!t.agentSwitcherOpen)return null;const i=t.agentSwitcherStatus==="loading"&&t.agentDefinitions.length===0;return h.jsxs(ua,{open:!0,onClose:()=>t.closeAgentSwitcher(),title:"Switch agent",panelClassName:"flex max-h-[min(560px,85vh)] w-full max-w-md flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[h.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[h.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Switch agent"}),h.jsx("button",{type:"button","aria-label":"Close",onClick:()=>t.closeAgentSwitcher(),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(Wi,{size:17,strokeWidth:1.75})})]}),t.agentSwitchMessage?h.jsx("p",{role:"status",className:"mx-4 mt-3 rounded-lg bg-raised px-3 py-2 text-[13px] text-foreground",children:t.agentSwitchMessage}):null,h.jsx("ul",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:i?h.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"Loading agents…"}):t.agentDefinitions.length===0?h.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"No agents are configured on this host."}):t.agentDefinitions.map(r=>{const u=r.name===t.currentAgentType;return h.jsx("li",{children:h.jsxs("button",{type:"button",onClick:()=>t.selectAgent(r.name),"aria-current":u?"true":void 0,className:"flex w-full items-start gap-3 rounded-xl px-3 py-2.5 text-left hover:bg-hover",children:[h.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:u?h.jsx(aa,{size:16,strokeWidth:2,className:"text-accent"}):null}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate text-[14px] font-medium text-foreground",children:r.name}),h.jsx("span",{className:"block truncate text-[13px] text-muted-foreground",children:r.description}),h.jsx("span",{className:"block truncate text-[12px] text-subtle",children:r.definedIn})]})]})},r.name)})})]})}function X_(t){return t!==null&&t.matches("input, textarea, select, [contenteditable]")}function nx(t,i){return t==="provider-profile-action"&&i==="delete"}function Dc({prompts:t,onAnswerPermission:i,onAnswerAsk:r,ownDriverId:u=null,layout:o="modal",armDelayMs:c=450,onFocusReturn:f}){const p=t[0],g=p?.id,m=j.useRef(null),b=j.useRef(null),x=p?.kind==="ask"&&p.request.allowFreeText===!0,[S,v]=j.useState(void 0),[N,T]=j.useState(!1),[L,E]=j.useState(!1),V=j.useRef(null),R=j.useRef(!1);j.useEffect(()=>{if(g===void 0||c<=0)return;const _=setTimeout(()=>v(g),c);return()=>clearTimeout(_)},[g,c]);const W=g!==void 0&&(c<=0||S===g);if(j.useLayoutEffect(()=>{const _=m.current;if(!_)return;const H=document.activeElement,w=!!(H&&H!==_&&_.contains(H)),ae=R.current&&H===document.body;(w||ae)&&_.focus()},[g]),j.useEffect(()=>{W&&(X_(document.activeElement)||(x?b.current:m.current)?.focus())},[W,g,x]),j.useEffect(()=>{if(g!==void 0){R.current=!1;return}T(!1),R.current&&(R.current=!1,f?.())},[g,f]),!p)return null;if(p.kind==="ask"&&p.request.id==="provider-delete")return h.jsx(Rl,{open:!0,title:p.request.title,body:"This removes it from your provider profiles. This can't be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>r(p.id,{type:"cancelled"}),onConfirm:()=>r(p.id,{type:"answer",values:["yes"]})});const ie=p.requesterDriverId&&!By(p.requesterDriverId,u)?Hy(p.requesterDriverId):void 0,M=o==="dock",Y=()=>{const _=m.current,H=document.activeElement;R.current=!!(_&&H&&_.contains(H))},ue=(_,H)=>{Y(),i(_,H)},J=(_,H)=>{Y(),V.current?.clear(),r(_,H)},U=_=>{x&&(_.target.closest("button, input")||b.current?.focus())},ne=_=>H=>{!W&&H.detail===0||_()},le=_=>{if(_.key==="Escape"){_.preventDefault(),p.kind==="permission"?ue(p.id,!1):J(p.id,{type:"cancelled"});return}if(!W)return;const H=Number(_.key)-1;if(!Number.isInteger(H)||H<0)return;if(p.kind==="permission"){H<2&&ue(p.id,H===0);return}const w=(p.request.options??[]).filter(ae=>!nx(p.request.id,ae.value))[H];w&&J(p.id,{type:"answer",values:[w.value]})},xe=p.kind==="permission"&&(p.diffLines?.length??0)>0,oe=p.kind==="permission"&&typeof p.toolArgs.command=="string"?p.toolArgs.command:void 0,P=p.kind==="permission"&&p.toolName==="Bash"&&oe!==void 0,D=p.kind==="ask"?p.request.id:void 0,Q=p.kind==="ask"?p.request.options??[]:[],se=Q.find(_=>nx(D,_.value)),me=se?Q.filter(_=>_!==se):Q,C=x&&L?"Enter to submit · Esc to cancel":Q.length>0?"1–9 choose · Esc cancel":"Esc cancels";return h.jsx("div",{className:M?"robota-ui gui-rise flex-shrink-0":"robota-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",children:h.jsx("div",{ref:m,tabIndex:M?0:-1,onKeyDown:M?le:void 0,onClick:U,onFocus:()=>T(!0),onBlur:_=>{_.currentTarget.contains(_.relatedTarget)||T(!1)},role:"dialog","aria-label":"pending question","data-armed":M?String(W):void 0,className:`w-full rounded-2xl bg-card text-[14px] text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none focus-visible:ring-2 focus-visible:ring-ring ${M?"p-4":"max-w-lg p-5"}`,children:p.kind==="permission"?h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-start gap-3",children:[h.jsx("span",{className:"mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-warning/15 text-warning",children:h.jsx(ef,{size:17,strokeWidth:1.9})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Permission request",ie&&h.jsxs(h.Fragment,{children:[" ","· ",h.jsx("span",{className:"text-foreground",children:ie})]})]}),p.requester?.kind==="background-agent"?h.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Background agent ",h.jsx("span",{className:"font-semibold",children:p.requester.label})," ","wants to"," ",xe?h.jsxs(h.Fragment,{children:[p.toolName.toLowerCase()," ",h.jsx("span",{className:"font-mono font-semibold",children:p.diffFile})]}):h.jsxs(h.Fragment,{children:["run ",h.jsx("span",{className:"font-semibold",children:p.toolName})]})]}):xe?h.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:[p.toolName," ",h.jsx("span",{className:"font-mono font-semibold",children:p.diffFile})]}):h.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Allow ",h.jsx("span",{className:"font-semibold",children:p.toolName})," to run?"]}),xe?h.jsx("div",{className:"mt-2.5",children:h.jsx(Yu,{diffLines:p.diffLines})}):P?h.jsx(J_,{command:oe,cwd:p.cwd}):h.jsx(K_,{args:p.toolArgs})]})]}),h.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 pl-11",children:[h.jsxs("button",{type:"button","aria-keyshortcuts":M?"1":void 0,className:lf,onClick:ne(()=>ue(p.id,!0)),children:[h.jsx("span",{children:"Allow"}),M&&h.jsx(Rc,{children:"1"})]}),h.jsxs("button",{type:"button","aria-keyshortcuts":M?"2":void 0,className:lx,onClick:ne(()=>ue(p.id,!1)),children:[h.jsx("span",{children:"Deny"}),M&&h.jsx(Rc,{children:"2"})]}),M&&h.jsx(ix,{hasFocus:N,armed:W,armedText:"1 allow · 2 deny · Esc deny"})]})]}):h.jsxs(h.Fragment,{children:[h.jsxs("div",{className:"flex items-start gap-3",children:[h.jsx("span",{className:"mt-0.5 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-accent/15 text-accent",children:h.jsx(eE,{size:17,strokeWidth:1.9})}),h.jsxs("div",{className:"min-w-0 flex-1",children:[ie&&h.jsx("p",{className:"text-[13px] text-muted-foreground",children:h.jsx("span",{className:"text-foreground",children:ie})}),h.jsx("p",{className:"text-[15px] font-medium text-foreground",children:p.request.title}),p.request.description?h.jsx("p",{className:"mt-1 leading-relaxed text-muted-foreground",children:p.request.description}):null]})]}),h.jsxs("div",{className:"mt-4 flex flex-col gap-3 pl-11",children:[me.length>0&&h.jsx("div",{className:"flex flex-wrap items-start gap-3",children:me.map((_,H)=>h.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[h.jsxs("button",{type:"button","aria-keyshortcuts":M&&H<9?String(H+1):void 0,className:H===0?lf:lx,onClick:ne(()=>J(p.id,{type:"answer",values:[_.value]})),children:[h.jsx("span",{children:_.label}),M&&H<9&&h.jsx(Rc,{children:H+1})]}),_.description&&h.jsx("p",{className:"pl-0.5 text-[11.5px] leading-snug text-subtle",children:_.description})]},_.value))}),se&&h.jsx("div",{className:"flex flex-wrap items-start gap-3",children:h.jsx("button",{type:"button",className:$_,onClick:ne(()=>J(p.id,{type:"answer",values:[se.value]})),children:h.jsx("span",{children:se.label})})}),x&&h.jsxs("div",{className:"flex flex-col gap-1.5",children:[Q.length>0&&h.jsx("p",{className:"text-[12.5px] text-subtle",children:"or type an answer"}),h.jsx(Z_,{ref:V,inputRef:b,masked:p.request.masked===!0,placeholder:p.request.placeholder,allowEmpty:p.request.allowEmpty===!0,wrapClick:ne,onSubmit:_=>J(p.id,{type:"answer",values:[],text:_}),onCancel:()=>J(p.id,{type:"cancelled"}),onFocusChange:E},p.id)]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("button",{type:"button",className:Q_,onClick:ne(()=>J(p.id,{type:"cancelled"})),children:"Cancel"}),M&&h.jsx(ix,{hasFocus:N,armed:W,armedText:C})]})]})]})})})}const Gu="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",lf=`${Gu} bg-primary text-primary-foreground hover:opacity-90`,lx=`${Gu} bg-raised text-foreground hover:bg-hover`,Q_=`${Gu} text-muted-foreground hover:bg-hover hover:text-foreground`,$_=`${Gu} bg-destructive/12 text-destructive hover:bg-destructive/20`,Z_=j.forwardRef(function({masked:i,placeholder:r,allowEmpty:u,inputRef:o,wrapClick:c,onSubmit:f,onCancel:p,onFocusChange:g},m){const[b,x]=j.useState("");j.useImperativeHandle(m,()=>({clear:()=>x("")}),[]);const S=()=>{const T=b.trim();!T&&!u||(x(""),f(T))},v=()=>{x(""),p()},N=T=>{if(T.stopPropagation(),T.key==="Enter"){if(T.nativeEvent.isComposing||T.keyCode===229)return;T.preventDefault(),S()}else T.key==="Escape"&&(T.preventDefault(),v())};return h.jsxs("div",{className:"flex items-center gap-2",children:[h.jsx("input",{ref:o,type:i?"password":"text",autoComplete:"off","aria-label":"answer",placeholder:r,value:b,onChange:T=>x(T.target.value),onKeyDown:N,onFocus:()=>g(!0),onBlur:()=>g(!1),className:"min-w-0 flex-1 rounded-lg bg-sidebar px-3 py-1.5 text-[14px] text-foreground placeholder:text-subtle focus:outline-none focus-visible:ring-2 focus-visible:ring-ring"}),h.jsx("button",{type:"button",className:lf,disabled:!b.trim()&&!u,onClick:c(S),children:"Continue"})]})});function Rc({children:t}){return h.jsx("kbd",{"aria-hidden":"true",className:"rounded bg-foreground/10 px-1 font-mono text-[11px] leading-[1.45] opacity-70",children:t})}function ix({hasFocus:t,armed:i,armedText:r}){return h.jsx("p",{className:"ml-auto text-[12.5px] text-subtle",children:t?i?r:"keys answer in a moment · click to answer now":"Click to answer, or press Shift+Tab to use the keys"})}function K_({args:t}){if(t===null||typeof t!="object")return null;const i=Object.entries(t);if(i.length===0)return null;const r=i.find(([c,f])=>(c==="command"||c==="cmd")&&typeof f=="string")?.[0],u=i.filter(([c])=>c!==r),o=c=>typeof c=="string"?c:JSON.stringify(c,null,2);return h.jsxs("div",{className:"mt-2.5 max-h-48 overflow-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:[r?h.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t[r]}):null,u.length>0?h.jsx("dl",{className:`text-muted-foreground ${r?"mt-1.5":""}`,children:u.map(([c,f])=>h.jsxs("div",{className:"flex gap-2",children:[h.jsxs("dt",{className:"flex-shrink-0 text-subtle",children:[c,":"]}),h.jsx("dd",{className:"min-w-0 whitespace-pre-wrap break-all",children:o(f)})]},c))}):null]})}function J_({command:t,cwd:i}){return h.jsxs("div",{className:"mt-2.5 max-h-48 overflow-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:[h.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t}),i&&h.jsxs("p",{className:"mt-1.5 text-muted-foreground",children:[h.jsx("span",{className:"text-subtle",children:"in "}),i]})]})}const rf=6e4,af=60*rf,Mc=24*af;function P_(t,i=Date.now()){const r=Date.parse(t);if(Number.isNaN(r))return"";const u=Math.max(0,i-r);return u<rf?"just now":u<af?`${Math.floor(u/rf)}m ago`:u<Mc?`${Math.floor(u/af)}h ago`:u<7*Mc?`${Math.floor(u/Mc)}d ago`:new Date(r).toISOString().slice(0,10)}function On(t){const i=t.name?.trim();if(i)return i;const r=t.title?.trim();return r||"New session"}function W_(t,i){if(t.clients===void 0)return null;const r=t.clients-(i?1:0);return r>=1?r:null}function eC({state:t,brand:i,className:r}){const u=t.sessionListing??null,o=u?.currentSessionId??null,c=u?.unreadableSessionIds??[],f=t.sessionsError?.code==="list_failed"?t.sessionsError.message:null,p=t.status==="connected",[g,m]=j.useState(null),[b,x]=j.useState(null),[S,v]=j.useState(""),[N,T]=j.useState(null),L=j.useRef(null),E=j.useRef(new Map);j.useEffect(()=>{if(g===null)return;const Y=J=>{J.key==="Escape"&&m(null)},ue=J=>{L.current&&!L.current.contains(J.target)&&m(null)};return document.addEventListener("keydown",Y),document.addEventListener("mousedown",ue),()=>{document.removeEventListener("keydown",Y),document.removeEventListener("mousedown",ue)}},[g]),j.useEffect(()=>{g!==null&&L.current?.querySelector('[role="menuitem"]')?.focus()},[g]);const V=(Y,ue,J)=>m({sessionId:Y,x:ue,y:J}),R=Y=>{m(null),x(Y.id),v(On(Y))},W=Y=>{const ue=S.trim();x(null),!(ue.length===0||ue===On(Y))&&(Y.id===o?t.send({type:"command",name:"rename",args:ue}):t.renameSessionInList?.(Y.id,ue))},ie=u?.sessions??[],M=ie.find(Y=>Y.id===N)??null;return h.jsxs("aside",{"aria-label":"Sessions",className:`robota-ui flex w-[272px] flex-shrink-0 flex-col overflow-hidden bg-sidebar ${r??""}`,children:[h.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[i,h.jsx("button",{type:"button","aria-label":"Hide sessions",title:"Hide sessions",onClick:()=>t.setSessionSidebarOpen?.(!1),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(nE,{size:17,strokeWidth:1.75})})]}),h.jsx("div",{className:"flex-shrink-0 px-2.5 pt-1",children:h.jsxs("button",{type:"button",disabled:!p,title:p?void 0:"Reconnecting…",onClick:()=>t.newSession?.(),className:"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[14px] font-medium text-foreground hover:bg-hover disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",children:[h.jsx(Cy,{size:16,strokeWidth:1.75,className:"text-muted-foreground"}),"New session"]})}),h.jsxs("div",{className:"flex-1 overflow-y-auto px-2.5 pb-3 pt-4",children:[h.jsx("h2",{className:"px-2.5 pb-1.5 text-[12.5px] font-medium text-subtle",children:"Sessions"}),f!==null?h.jsx("p",{className:"px-2.5 py-1 text-[13px] leading-snug text-destructive",children:f}):null,u===null&&f===null?h.jsx("p",{className:"px-2.5 py-1 text-[13px] text-subtle",children:"Loading sessions…"}):null,h.jsxs("ul",{className:"space-y-px",children:[ie.map(Y=>{const ue=Y.id===o,J=W_(Y,ue),U=b===Y.id,ne=[Y.live===!0?"Live":null,J!==null?`${J} ${J===1?"other":"others"}`:null].filter(P=>P!==null),le=`session-status-${Y.id}`,xe=`session-updated-${Y.id}`,oe=ne.length>0?`${xe} ${le}`:xe;return h.jsxs("li",{className:"group relative",children:[U?h.jsx("input",{autoFocus:!0,"aria-label":`Rename ${On(Y)}`,value:S,onChange:P=>v(P.target.value),onBlur:()=>W(Y),onKeyDown:P=>{P.key==="Enter"?(P.preventDefault(),W(Y)):P.key==="Escape"&&(P.preventDefault(),x(null))},className:"w-full rounded-lg border border-accent bg-raised px-2.5 py-2 text-[14px] text-foreground outline-none"}):h.jsxs("button",{type:"button","aria-current":ue?"true":void 0,"aria-label":On(Y),"aria-describedby":oe,title:p?Y.preview||Y.id:"Reconnecting…",disabled:!p,onClick:()=>{ue||t.switchSession?.(Y.id)},onContextMenu:P=>{P.preventDefault(),V(Y.id,P.clientX,P.clientY)},className:`w-full rounded-lg py-2 pl-2.5 pr-8 text-left transition-colors disabled:cursor-not-allowed disabled:opacity-60 ${ue?"bg-raised":"hover:bg-hover"}`,children:[h.jsx("span",{className:`block truncate text-[14px] leading-snug ${ue?"font-medium text-foreground":"text-foreground/85"}`,children:On(Y)}),h.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5 text-[12.5px] tabular-nums text-subtle",children:[Y.live===!0?h.jsx("span",{title:"Live in the host",className:"h-1.5 w-1.5 flex-shrink-0 rounded-full bg-accent",children:h.jsx("span",{className:"sr-only",children:"live"})}):null,h.jsx("span",{id:xe,children:P_(Y.updatedAt)}),J!==null?h.jsxs(h.Fragment,{children:[h.jsx("span",{"aria-hidden":"true",children:"·"}),h.jsxs("span",{className:"text-muted-foreground",children:[J," ",J===1?"other":"others"]})]}):null,ne.length>0?h.jsx("span",{id:le,className:"sr-only",children:ne.join(", ")}):null]})]}),U?null:h.jsx("button",{type:"button",ref:P=>{P?E.current.set(Y.id,P):E.current.delete(Y.id)},"aria-label":`More for ${On(Y)}`,"aria-haspopup":"menu","aria-expanded":g?.sessionId===Y.id,onClick:P=>{const D=P.currentTarget.getBoundingClientRect();V(Y.id,D.left,D.bottom)},className:"absolute right-1 top-1/2 -translate-y-1/2 rounded-md p-1 text-muted-foreground opacity-0 hover:bg-hover hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100",children:h.jsx(IN,{size:15,strokeWidth:1.75})})]},Y.id)}),c.length>0&&h.jsx("li",{children:h.jsxs("details",{className:"px-2.5 py-2 text-[12.5px] text-subtle",children:[h.jsxs("summary",{className:"cursor-pointer text-muted-foreground hover:text-foreground",children:[c.length," older ",c.length===1?"session":"sessions"," in this folder can't be opened"]}),h.jsx("ul",{className:"mt-1.5 space-y-0.5 font-mono text-[11.5px]",children:c.map(Y=>h.jsx("li",{className:"truncate",children:Y},Y))})]})})]})]}),h.jsx("div",{className:"flex-shrink-0 border-t border-border/60 px-2.5 py-2",children:h.jsxs("button",{type:"button","aria-label":"Settings",title:"Settings",onClick:()=>t.openSettings(),className:"flex w-full items-center gap-2.5 rounded-lg px-2.5 py-2 text-[13.5px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(_y,{size:16,strokeWidth:1.75}),"Settings"]})}),g!==null?(()=>{const Y=ie.find(ue=>ue.id===g.sessionId);return Y?h.jsxs("div",{ref:L,role:"menu","aria-label":`Actions for ${On(Y)}`,style:{position:"fixed",left:g.x,top:g.y},className:"gui-rise z-40 min-w-[140px] overflow-hidden rounded-lg bg-popover py-1 text-popover-foreground shadow-xl shadow-black/30",children:[h.jsxs("button",{type:"button",role:"menuitem",onClick:()=>R(Y),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] hover:bg-hover",children:[h.jsx(Ey,{size:14,strokeWidth:1.75}),"Rename"]}),h.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{m(null),T(Y.id)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] text-destructive hover:bg-hover",children:[h.jsx(Rf,{size:14,strokeWidth:1.75}),"Delete…"]})]}):null})():null,M!==null?h.jsx(Rl,{open:!0,title:`Delete "${On(M)}"?`,body:"This removes its conversation from this computer.",confirmLabel:"Delete",destructive:!0,restoreFocusTo:E.current.get(M.id)??null,onCancel:()=>T(null),onConfirm:()=>{t.deleteSession?.(M.id),T(null)}}):null]})}function tC({state:t}){const i=t.status==="connected";return h.jsxs("div",{className:"flex w-12 flex-shrink-0 flex-col items-center gap-1 bg-sidebar py-2.5",children:[h.jsx("button",{type:"button","aria-label":"Show sessions",title:"Show sessions",onClick:()=>t.setSessionSidebarOpen?.(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(iE,{size:17,strokeWidth:1.75})}),h.jsx("button",{type:"button","aria-label":"New session",title:i?"New session":"Reconnecting…",disabled:!i,onClick:()=>t.newSession?.(),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",children:h.jsx(Cy,{size:16,strokeWidth:1.75})}),h.jsx("button",{type:"button","aria-label":"Settings",title:"Settings",onClick:()=>t.openSettings(),className:"mt-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(_y,{size:16,strokeWidth:1.75})})]})}const ll=new Intl.NumberFormat("en-US"),nC=100,lC=["model","provider","surface","source"];function iC(t){return t==="activity"?"Activity":`By ${t}`}function rC(t){return t==="cli"?"Terminal":t==="remote"?"App or browser":t.split(/[-_]/).filter(i=>i.length>0).map(i=>i.charAt(0).toUpperCase()+i.slice(1)).join(" ")}function aC(t){return t.length===1&&t[0]?.key==="unknown"}function uC(t){return[...lC.filter(i=>!aC(Zy(t,i))),"activity"]}const sC=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"});function $y(t,i,r){const u=t.sessionListing?.sessions.find(f=>f.id===r);if(u)return On(u);const o=i.sessionFirstSeen?.[r],c=o?new Date(o):void 0;return c&&!Number.isNaN(c.getTime())?`Session from ${sC.format(c)}`:"Another session"}function ti({label:t,value:i,note:r}){return h.jsxs("div",{className:"rounded-2xl bg-card p-5",children:[h.jsxs("div",{className:"flex items-baseline gap-1.5 text-[13px] text-muted-foreground",children:[t,r?h.jsxs("span",{className:"text-subtle",children:["· ",r]}):null]}),h.jsx("div",{className:"mt-1.5 text-[28px] font-semibold tabular-nums tracking-[-0.02em] text-foreground",children:i})]})}function Zy(t,i){return i==="model"?t.byModel:i==="provider"?t.byProvider:i==="surface"?t.bySurface:i==="source"?t.bySource:[]}function oC({state:t,report:i,breakdown:r,setBreakdown:u}){const o=uC(i),c=o.includes(r)?r:o[0]??r;return h.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[h.jsx(cC,{breakdown:c,setBreakdown:u,visible:o}),h.jsx("div",{className:"mt-4 space-y-3",children:c==="activity"?h.jsx(fC,{report:i}):h.jsx(dC,{state:t,report:i,breakdown:c,dimensions:Zy(i,c)})})]})}function cC({breakdown:t,setBreakdown:i,visible:r}){return h.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[h.jsx("h2",{className:"text-[15px] font-semibold",children:"Breakdown"}),h.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(u=>h.jsx("button",{type:"button","aria-pressed":t===u,onClick:()=>i(u),className:`rounded-lg px-2.5 py-1 text-[13px] font-medium ${t===u?"bg-raised text-foreground":"text-muted-foreground hover:text-foreground"}`,children:iC(u)},u))})]})}function fC({report:t}){return h.jsx(h.Fragment,{children:t.byActivity.map(i=>h.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl bg-raised/60 px-3.5 py-2.5",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("span",{className:"truncate text-[14px] text-foreground",children:i.label})," ",h.jsx("span",{className:"ml-1 rounded-full bg-raised px-2 py-0.5 text-[11px] font-medium text-subtle",children:i.kind})]}),h.jsxs("span",{className:"text-[13px] tabular-nums text-muted-foreground",children:[ll.format(i.count)," calls"]})]},i.key))})}function dC({state:t,report:i,breakdown:r,dimensions:u}){return h.jsx(h.Fragment,{children:u.map(o=>h.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-3",children:[h.jsx(hC,{report:i,breakdown:r,dimension:o}),h.jsxs("span",{className:"self-start text-[13px] tabular-nums text-subtle",children:[ll.format(o.turns)," turns"]}),h.jsx(pC,{state:t,report:i,dimension:o})]},o.key))})}function hC({report:t,breakdown:i,dimension:r}){const u=t.totals.totalTokens===0?0:r.totalTokens/t.totals.totalTokens*nC;return h.jsxs("div",{className:"min-w-0",children:[h.jsxs("div",{className:"flex justify-between gap-3 text-[14px]",children:[h.jsx("span",{className:"truncate text-foreground",children:i==="surface"?rC(r.key):r.label}),h.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[ll.format(r.totalTokens)," tokens"]})]}),h.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-raised",children:h.jsx("div",{className:"h-full rounded-full bg-accent/80",style:{width:`${u}%`}})})]})}function pC({state:t,report:i,dimension:r}){return h.jsx("div",{className:"col-span-2 flex flex-wrap gap-1",children:r.sessionIds.map(u=>{const o=$y(t,i,u);return h.jsx("button",{type:"button","data-session-id":u,onClick:()=>t.requestStoredSessionUsage(u),"aria-label":`Open session ${o}`,className:"rounded-md bg-raised px-2 py-1 text-[12px] text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx("span",{className:"max-w-40 truncate align-middle",children:o})},u)})})}function mC({state:t}){if(t.storedSessionUsageStatus==="idle")return null;const i=t.storedSessionUsageSessionId??"";return h.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Session usage detail","data-session-id":i,children:[h.jsx("h2",{className:"text-[15px] font-semibold",children:t.personalUsageReport?$y(t,t.personalUsageReport,i):"Another session"}),h.jsx(gC,{state:t})]})}function gC({state:t}){if(t.storedSessionUsageStatus==="loading")return h.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});if(t.storedSessionUsageStatus==="error")return h.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:t.storedSessionUsageError??"Session usage failed."});const i=t.storedSessionUsageReport;return i?h.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-3",children:[h.jsx(ti,{label:"Session tokens",value:ll.format(i.totalTokens)}),h.jsx(ti,{label:"Sources",value:ll.format(i.bySource.length)}),h.jsx(ti,{label:"Trace turns",value:ll.format(i.timeline.length)})]}):null}function xC(t){const{coverage:i}=t,r=[];if(i.unsupportedSessions>0){const u=i.unsupportedSessions===1?"session":"sessions",o=i.unsupportedSessions===1?"uses":"use";r.push(`${ll.format(i.unsupportedSessions)} older ${u} ${o} a format this view can't read and ${i.unsupportedSessions===1?"isn't":"aren't"} counted.`)}if(i.corruptSessions>0){const u=i.corruptSessions===1?"session":"sessions";r.push(`${ll.format(i.corruptSessions)} ${u} couldn't be read and ${i.corruptSessions===1?"isn't":"aren't"} counted.`)}if(i.legacyObservations>0){const u=i.legacyObservations===1?"record":"records";r.push(`${ll.format(i.legacyObservations)} older usage ${u} ${i.legacyObservations===1?"doesn't":"don't"} have enough detail to break down, so ${i.legacyObservations===1?"it counts":"they count"} only toward the totals.`)}return r}function yC({report:t}){const i=xC(t);return i.length===0?null:h.jsx("div",{className:"space-y-1.5 rounded-xl bg-warning/10 px-4 py-3 text-[13px] leading-relaxed text-warning",children:i.map(r=>h.jsx("p",{children:r},r))})}const li=new Intl.NumberFormat("en-US"),bC=100,rx=2,vC=5,SC=2;function Oc({children:t}){return h.jsx("div",{className:"flex min-h-64 items-center justify-center rounded-2xl bg-card px-8 text-center text-[15px] text-muted-foreground",children:t})}function kC({period:t,setPeriod:i,requestCurrentSessionUsage:r}){return h.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[h.jsxs("div",{children:[h.jsx("div",{className:"text-[13px] font-medium text-accent",children:"Local analytics"}),h.jsx("h1",{className:"mt-1 text-[28px] font-semibold tracking-[-0.02em]",children:"Personal usage"}),h.jsx("p",{className:"mt-1 text-[15px] text-muted-foreground",children:"Cross-session activity grouped by local calendar day."})]}),h.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[h.jsx("button",{type:"button",onClick:r,className:"rounded-lg bg-raised px-3 py-2 text-[13px] font-medium text-foreground hover:bg-hover",children:"Current session trace"}),h.jsx(wC,{period:t,setPeriod:i})]})]})}function wC({period:t,setPeriod:i}){return h.jsx("div",{className:"flex rounded-lg bg-raised p-0.5",children:["7d","30d"].map(r=>h.jsx("button",{type:"button","aria-pressed":t===r,onClick:()=>i(r),className:`rounded-md px-3 py-1.5 text-[13px] font-medium transition-colors ${t===r?"bg-card text-foreground shadow-sm shadow-black/25":"text-muted-foreground hover:text-foreground"}`,children:r==="7d"?"7 days":"30 days"},r))})}function jC({state:t}){if(t.currentSessionUsageStatus==="idle")return null;let i=null;if(t.currentSessionUsageStatus==="loading")i=h.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});else if(t.currentSessionUsageStatus==="error")i=h.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:"Current trace unavailable."});else if(t.currentSessionUsageReport){const r=t.currentSessionUsageReport.timeline.length;i=h.jsxs("p",{className:"mt-3 text-[14px] tabular-nums text-muted-foreground",children:["This session: ",li.format(t.currentSessionUsageReport.totalTokens)," tokens",r>0?` · ${li.format(r)} turns`:""]})}return h.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Current session usage",children:[h.jsx("h2",{className:"text-[15px] font-semibold",children:"Current session trace"}),i]})}function NC(t){if(t.totals.costStatus==="unknown")return null;const i=t.totals.unpricedTurns??0;if(i===0)return null;const r=i===1?"turn":"turns",u=i===1?"is":"are";return`${li.format(i)} ${r} without a price ${u} not included.`}function EC({report:t}){const i=t.totals.costStatus==="unknown"?"Unknown":`$${t.totals.costUsd.toFixed(SC)}`,r=NC(t);return h.jsxs("section",{"aria-label":"Usage totals",children:[h.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[h.jsx(ti,{label:"Turns",value:li.format(t.totals.turns)}),h.jsx(ti,{label:"Sessions",value:li.format(t.totals.sessions)}),h.jsx(ti,{label:"Tokens",value:li.format(t.totals.totalTokens)}),h.jsx(ti,{label:"Cost",value:i,...t.totals.costStatus==="estimated"?{note:"estimated"}:{}})]}),r?h.jsx("p",{className:"mt-2 text-[13px] text-subtle",children:r}):null]})}function _C({report:t}){const i=t.daily.reduce((r,u)=>Math.max(r,u.totals.totalTokens),0);return h.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[h.jsx(CC,{report:t}),h.jsx("div",{className:"mt-5 flex h-44 items-end gap-1.5",role:"img","aria-label":"Daily token usage chart",children:t.daily.map(r=>h.jsxs("div",{className:"group flex min-w-0 flex-1 flex-col items-center justify-end gap-2",children:[h.jsx("div",{className:"relative flex h-32 w-full items-end",children:h.jsx("div",{className:"mx-auto w-full max-w-10 rounded-md bg-accent/75 transition-colors group-hover:bg-accent",style:{height:`${i===0?rx:Math.max(rx,r.totals.totalTokens/i*bC)}%`},title:`${r.date}: ${li.format(r.totals.totalTokens)} tokens`})}),h.jsx("span",{className:"truncate text-[12px] tabular-nums text-subtle",children:r.date.slice(vC)})]},r.date))})]})}function CC({report:t}){return h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsxs("div",{children:[h.jsx("h2",{className:"text-[15px] font-semibold",children:"Daily usage"}),h.jsxs("p",{className:"mt-0.5 text-[13px] text-muted-foreground",children:[t.interval.startDate," → ",t.interval.endDate," · ",t.timezone]})]}),t.daily.at(-1)?.partial?h.jsx("span",{className:"rounded-full bg-warning/15 px-2.5 py-1 text-[12px] font-medium text-warning",children:"Partial day"}):null]})}function TC({state:t,breakdown:i,setBreakdown:r}){const u=t.personalUsageReport;return t.personalUsageStatus==="loading"&&!u?h.jsx(Oc,{children:"Loading local usage…"}):t.personalUsageStatus==="error"?h.jsx(Oc,{children:t.personalUsageError??"Usage report failed."}):!u||AC(u)?h.jsx(Oc,{children:"No recorded usage in this period."}):h.jsxs(h.Fragment,{children:[h.jsx(EC,{report:u}),h.jsx(_C,{report:u}),h.jsx(oC,{state:t,report:u,breakdown:i,setBreakdown:r}),h.jsx(mC,{state:t}),h.jsx(yC,{report:u})]})}function AC(t){return t.totals.sessions===0&&t.totals.totalTokens===0&&t.byActivity.length===0}function zC({state:t}){const[i,r]=j.useState("7d"),[u,o]=j.useState("model");return j.useEffect(()=>{t.requestPersonalUsage(i)},[i,t.requestPersonalUsage]),h.jsx("main",{className:"robota-ui gui-rise h-full overflow-y-auto p-5 md:p-7","aria-label":"Personal usage",children:h.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-5",children:[h.jsx(kC,{period:i,setPeriod:r,requestCurrentSessionUsage:t.requestCurrentSessionUsage}),h.jsx(jC,{state:t}),h.jsx(TC,{state:t,breakdown:u,setBreakdown:o})]})})}function Uf({size:t=20}){return h.jsxs("svg",{width:t,height:t,viewBox:"0 0 20 20","aria-hidden":"true",className:"flex-shrink-0",children:[h.jsx("rect",{x:"1",y:"2.5",width:"18",height:"15",rx:"5.5",className:"fill-accent"}),h.jsx("circle",{cx:"7.2",cy:"10",r:"1.7",className:"fill-accent-foreground"}),h.jsx("circle",{cx:"12.8",cy:"10",r:"1.7",className:"fill-accent-foreground"})]})}function qf({surface:t}){return h.jsxs("span",{className:"flex items-center gap-2",children:[h.jsx(Uf,{}),h.jsx("span",{className:"text-[15px] font-semibold tracking-[-0.01em] text-foreground",children:"robota"}),t?h.jsx("span",{className:"rounded-md bg-raised px-1.5 py-px text-[11px] font-medium text-muted-foreground",children:t}):null]})}const DC=200;function Ky(t,i){if(!t||!i.startsWith("/")||/\s/u.test(i))return null;const r=i.slice(1).toLowerCase(),u=t.commands.filter(f=>!Dy(f)).map(f=>({name:f.name,description:f.description,kind:"command"})),o=t.skills.filter(f=>f.userInvocable).map(f=>({name:f.name,description:f.description,kind:"skill"})),c=[...ax(u,r),...ax(o,r)].slice(0,DC);return c.length>0?c:null}function ax(t,i){const r=t.filter(o=>o.name.toLowerCase().startsWith(i)),u=t.filter(o=>!o.name.toLowerCase().startsWith(i)&&o.name.toLowerCase().includes(i));return[...r.sort(ux),...u.sort(ux)]}function ux(t,i){return t.name.localeCompare(i.name)}const RC=64*1024,MC=256*1024,sx="Only files inside this project folder can be attached.",OC="You can attach up to 8 files to one message.",LC="Images and other non-text files can't be attached yet.";function ox(t){return t.replaceAll("\\","/")}function cx(t){const i=t.startsWith("/"),r=[];for(const u of t.split("/"))if(!(u===""||u===".")){if(u===".."){r.length>0&&r[r.length-1]!==".."?r.pop():i||r.push("..");continue}r.push(u)}return(i?"/":"")+r.join("/")}function UC(t,i){if(!t)return null;const r=cx(ox(t));if(!r||r==="/")return null;const u=cx(ox(i));if(u===r)return null;const o=`${r}/`;if(!u.startsWith(o))return null;const c=u.slice(o.length);return c||null}function qC(t){return/^text\//.test(t)||/[+/](?:json|xml)$/.test(t)}const BC=new Set(["png","jpg","jpeg","gif","webp","bmp","ico","tiff","heic","pdf","zip","tar","gz","tgz","7z","rar","exe","dll","so","dylib","bin","class","wasm","woff","woff2","ttf","otf","eot","mp3","mp4","mov","avi","wav","ogg","flac","m4a"]);function HC(t,i){if(i)return!qC(i);const r=t.lastIndexOf(".");return r<0?!1:BC.has(t.slice(r+1).toLowerCase())}const IC=/[\s)\]}>,;"'`]/u,YC=/[.,:;!?]$/u;function fx(t){return t>=1024?`${Math.round(t/1024)} KB`:`${t} B`}function GC(){const t=typeof crypto<"u"?crypto:void 0;return t?.randomUUID?t.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function VC(t,i,r,u){if(u>=8)return{kind:"rejected",message:OC};if(!t.absolutePath)return{kind:"rejected",message:sx};const o=UC(i,t.absolutePath);return o===null?{kind:"rejected",message:sx}:IC.test(o)||YC.test(o)?{kind:"rejected",message:`"${t.name}" has a character (such as a space, or a period/punctuation mark at the end) the @file syntax can't carry — rename it to attach it.`}:HC(t.name,t.mimeType)?{kind:"rejected",message:LC}:t.size>65536?{kind:"rejected",message:`${t.name} is larger than ${fx(RC)} and cannot be attached.`}:r+t.size>262144?{kind:"rejected",message:`Attachments cannot total more than ${fx(MC)}.`}:{kind:"attached",attachment:{id:GC(),name:t.name,relativePath:o,size:t.size}}}function FC(t,i){if(i.length===0)return t;const r=i.map(u=>`@./${u.relativePath}`).join(" ");return t?`${t}
|
|
307
|
-
|
|
308
|
-
${r}`:r}function Jy({label:t,sections:i,onClose:r,triggerRef:u}){const o=i.flatMap(v=>v.items),c=j.useId(),f=j.useRef(null),p=j.useRef([]),[g,m]=j.useState(()=>{const v=o.findIndex(N=>N.checked);return v>=0?v:0}),b=v=>{r(),v&&u.current?.focus()};j.useEffect(()=>{p.current[g]?.focus()},[g]),j.useEffect(()=>{const v=N=>{const T=N.target;f.current?.contains(T)||u.current?.contains(T)||b(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const x=v=>{if(v.key==="Escape"){v.preventDefault(),b(!0);return}if(v.key==="ArrowDown"||v.key==="ArrowUp"){if(v.preventDefault(),o.length===0)return;const N=v.key==="ArrowDown"?1:-1;m(T=>(T+N+o.length)%o.length);return}if(v.key==="Enter"||v.key===" "){v.preventDefault();const N=o[g];N&&(N.onSelect(),b(!0))}};let S=-1;return h.jsx("div",{ref:f,role:"menu","aria-label":t,onKeyDown:x,className:"gui-rise absolute bottom-full z-30 mb-2 max-h-[360px] w-64 overflow-y-auto rounded-2xl bg-popover p-1.5 shadow-2xl shadow-black/35 focus:outline-none",children:i.map((v,N)=>h.jsxs("div",{role:"group","aria-label":v.heading,children:[v.heading?h.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-medium uppercase tracking-wide text-subtle",children:v.heading}):null,v.items.map(T=>{S+=1;const L=S,E=T.kind==="action",V=T.description?`${c}-desc-${T.key}`:void 0;return h.jsxs("button",{ref:R=>{p.current[L]=R},type:"button",role:E?"menuitem":"menuitemradio","aria-checked":E?void 0:T.checked===!0,"aria-label":T.label,"aria-describedby":V,tabIndex:L===g?0:-1,onFocus:()=>m(L),onClick:()=>{T.onSelect(),b(!0)},className:`flex w-full items-start gap-2 rounded-xl px-3 py-2 text-left text-[13.5px] ${T.destructive?"text-destructive hover:bg-destructive/10":"text-foreground hover:bg-hover"} ${L===g?"bg-hover":""}`,children:[E?null:h.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:T.checked?h.jsx(aa,{size:14,strokeWidth:2.25,"aria-hidden":"true"}):null}),h.jsxs("span",{className:"min-w-0 flex-1",children:[h.jsx("span",{className:"block truncate",children:T.label}),T.description?h.jsx("span",{id:V,className:"block truncate text-[12px] text-muted-foreground",children:T.description}):null]})]},T.key)})]},v.heading??N))})}const Lc={auto:"Auto",none:"None",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},XC=["auto","low","medium","high"],QC=["none","minimal","xhigh","max"];function Py(t){return t?.commands.find(i=>i.name==="mode")?.subcommands??[]}function $C(t,i){return Py(t).find(r=>r.name===i)?.displayName??i}const ZC="flex min-w-0 items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground disabled:cursor-not-allowed disabled:opacity-60 disabled:hover:bg-transparent",KC="text-warning hover:text-warning";function Uc({chipLabel:t,value:i,icon:r,connected:u,warning:o=!1,menuLabel:c,sections:f,onOpen:p}){const[g,m]=j.useState(!1),b=j.useRef(null);return h.jsxs("span",{className:"relative",children:[h.jsxs("button",{ref:b,type:"button","aria-label":`${t}: ${i}`,"aria-haspopup":"menu","aria-expanded":g,title:u?`${t}: ${i}`:"Reconnecting…",disabled:!u,onClick:()=>{p?.(),m(!0)},className:`${ZC} ${o?KC:""}`,children:[r,h.jsx("span",{className:"hidden truncate md:inline",children:i})]}),g?h.jsx(Jy,{label:c,sections:f,triggerRef:b,onClose:()=>m(!1)}):null]})}const qc={size:14,strokeWidth:1.75,"aria-hidden":!0};function JC({status:t,catalog:i,modelList:r,onRequestModelList:u,onManageProviders:o,onSilentCommand:c,connected:f}){const p=t?Math.round(t.context.usedPercentage):null,[g,m]=j.useState(!1),b=[...(r?.groups??[]).map(v=>({heading:v.providerLabel,items:v.models.map(N=>({key:N.id,label:N.label,checked:N.id===r?.currentModel&&v.profileName===r?.currentProfile,onSelect:()=>c("model",N.id)}))})),{items:[{key:"manage-providers",label:"Manage providers…",kind:"action",onSelect:o}]}],x=[{items:Py(i).map(v=>({key:v.name,label:v.displayName??v.name,description:v.description,checked:v.name===t?.permissionMode,onSelect:v.name==="bypassPermissions"?()=>m(!0):()=>c("mode",v.name)}))}],S=[{items:XC.map(v=>({key:v,label:Lc[v],checked:v===t?.effort,onSelect:()=>c("effort",v)}))},{heading:"More",items:QC.map(v=>({key:v,label:Lc[v],checked:v===t?.effort,onSelect:()=>c("effort",v)}))}];return h.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-0.5",children:[t?h.jsxs(h.Fragment,{children:[h.jsx(Uc,{chipLabel:"mode",value:$C(i,t.permissionMode),icon:h.jsx(xE,{...qc}),connected:f,warning:t.permissionMode==="bypassPermissions",menuLabel:"Mode",sections:x}),h.jsx("span",{className:"ml-auto"}),h.jsx(Uc,{chipLabel:"model",value:t.model,icon:h.jsx(bE,{...qc}),connected:f,menuLabel:"Model",sections:b,onOpen:u}),h.jsx(Uc,{chipLabel:"effort",value:Lc[t.effort],icon:h.jsx(QN,{...qc}),connected:f,menuLabel:"Effort",sections:S})]}):h.jsx("span",{className:"ml-auto px-2 text-[13px] text-subtle",children:"…"}),h.jsxs("span",{className:"flex items-center gap-1.5 px-1.5 text-[12.5px] tabular-nums text-subtle",title:"Context used","aria-label":`context ${p??0}% used`,children:[h.jsx(PC,{percent:p??0}),p===null?"":`${p}%`]}),h.jsx(Rl,{open:g,title:"Skip all permission checks?",body:"Every action runs without asking first — file edits, shell commands and network access included. You can turn this back on at any time.",confirmLabel:"Skip all checks",destructive:!0,onCancel:()=>m(!1),onConfirm:()=>{m(!1),c("mode","bypassPermissions")}})]})}function PC({percent:t}){const r=2*Math.PI*5,u=Math.min(100,Math.max(0,t))/100;return h.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[h.jsx("circle",{cx:"7",cy:"7",r:5,className:"fill-none stroke-raised",strokeWidth:"2"}),h.jsx("circle",{cx:"7",cy:"7",r:5,className:`fill-none ${t>=80?"stroke-warning":"stroke-muted-foreground"}`,strokeWidth:"2",strokeDasharray:`${r*u} ${r}`,transform:"rotate(-90 7 7)"})]})}const Mu={text:"",attachments:[]},WC=new Set(["settings","resume","help"]);function dx(t){return t.kind==="command"&&WC.has(t.name)}function Bc(t){return t.kind==="skill"?"Skills":"Commands"}const e3="robota.draft.",t3="robota.draft";function Wy(t){return t?`${e3}${t}`:t3}function n3(t){if(!t||typeof t!="object")return!1;const i=t;return typeof i.id=="string"&&typeof i.name=="string"&&typeof i.relativePath=="string"&&typeof i.size=="number"}function l3(t){if(!t)return Mu;try{const i=JSON.parse(t);if(i&&typeof i=="object"&&typeof i.text=="string"){const r=i.attachments;return{text:i.text,attachments:Array.isArray(r)?r.filter(n3):[]}}}catch{}return{text:t,attachments:[]}}function hx(t){try{return l3(window.localStorage.getItem(Wy(t)))}catch{return Mu}}function Eu(t,i){try{const r=Wy(t);!i.text&&i.attachments.length===0?window.localStorage.removeItem(r):window.localStorage.setItem(r,JSON.stringify(i))}catch{}}const i3=j.forwardRef(function({onSubmit:i,onCommand:r,catalog:u,status:o,connected:c=!0,running:f,onStop:p,queued:g,onCancelQueue:m,pickFiles:b,getPathForFile:x,modelList:S=null,onRequestModelList:v=()=>{},onSilentCommand:N=r,onManageProviders:T=()=>r("provider")},L){const E=j.useRef(null);j.useImperativeHandle(L,()=>({focus:()=>E.current?.focus()}),[]);const V=o?.sessionId,R=j.useRef(V),W=j.useRef(V!==void 0),ie=j.useRef(Mu),[M,Y]=j.useState(()=>{const ee=hx(V);return ie.current=ee,ee.text}),[ue,J]=j.useState(()=>ie.current.attachments),[U,ne]=j.useState(null),[le,xe]=j.useState(0),[oe,P]=j.useState(!1),D=oe||!c?null:Ky(u,M);j.useEffect(()=>{xe(0),P(!1)},[M]);const Q=j.useRef([]);j.useEffect(()=>{Q.current[le]?.scrollIntoView?.({block:"nearest"})},[le,D]);const se=ee=>{ie.current={...ie.current,text:ee},Y(ee),Eu(R.current,ie.current)},me=ee=>{const Le=typeof ee=="function"?ee(ie.current.attachments):ee;ie.current={...ie.current,attachments:Le},J(Le),Eu(R.current,ie.current)};j.useEffect(()=>{if(V===void 0&&W.current||R.current===V)return;const ee=!W.current,Le=R.current;R.current=V,V!==void 0&&(W.current=!0);const it=hx(V),an=it.text!==""||it.attachments.length>0,rt=ie.current.text!==""||ie.current.attachments.length>0;if(ee&&!an&&rt){Eu(V,ie.current),Eu(Le,Mu);return}ie.current=it,Y(it.text),J(it.attachments),ne(null)},[V]);const C=()=>{if(!c)return;const ee=M.trim();!ee&&ue.length===0||(i(FC(ee,ue)),se(""),me([]),ne(null))},_=o?.workspace?.path,H=ue.reduce((ee,Le)=>ee+Le.size,0),w=ee=>{if(ee.length===0)return;let Le=H,it=ue.length;const an=[];let rt=null;for(const Cn of ee){const F=VC(Cn,_,Le,it);F.kind==="attached"?(an.push(F.attachment),Le+=F.attachment.size,it+=1):rt=F.message}an.length>0&&me(Cn=>[...Cn,...an]),ne(rt)},ae=ee=>{me(Le=>Le.filter(it=>it.id!==ee))},fe=ee=>({name:ee.name,size:ee.size,mimeType:ee.type||void 0,absolutePath:x&&x(ee)||void 0}),he=j.useRef(null),je=()=>{if(c){if(b){b().then(ee=>w(ee.map(Le=>({name:Le.name,size:Le.size,absolutePath:Le.path})))).catch(()=>ne("Could not open the file picker. Try again."));return}he.current?.click()}},Ge=ee=>{const Le=Array.from(ee.target.files??[]);ee.target.value="",w(Le.map(fe))},ge=j.useRef(0),[yt,Ot]=j.useState(!1),ln=ee=>Array.from(ee.dataTransfer?.types??[]).includes("Files"),rl=ee=>{!c||!ln(ee)||(ee.preventDefault(),ge.current+=1,Ot(!0))},qt=ee=>{!c||!ln(ee)||ee.preventDefault()},rn=()=>{ge.current=Math.max(0,ge.current-1),ge.current===0&&Ot(!1)},En=ee=>{!c||!ln(ee)||(ee.preventDefault(),ge.current=0,Ot(!1),w(Array.from(ee.dataTransfer?.files??[]).map(fe)))},_n=ee=>{if(dx(ee)){se(""),r(ee.name);return}se(`/${ee.name} `)},al=()=>{const ee=D?.[le];return!ee||!dx(ee)&&M===`/${ee.name}`?!1:(_n(ee),!0)},bn=()=>{g&&(se(g.text),m())};return h.jsxs("div",{className:"relative flex-shrink-0",onDragEnter:rl,onDragOver:qt,onDragLeave:rn,onDrop:En,children:[h.jsx("p",{id:"composer-attach-hint",className:"sr-only",children:"Drag files here, or use Attach files, to add them to your message."}),yt&&h.jsx("div",{role:"status","aria-live":"polite",className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center rounded-[22px] border-2 border-dashed border-accent bg-accent/10 text-[14px] font-medium text-accent",children:"Drop to attach"}),g&&h.jsxs("div",{role:"status","aria-label":"queued prompt",className:"gui-rise mb-2 flex items-center gap-3 rounded-2xl bg-card px-4 py-2 text-[13px]",children:[h.jsxs("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:["Queued: ",g.text,g.count>1&&h.jsxs("span",{className:"text-subtle",children:[" and ",g.count-1," more"]})]}),g.count===1?h.jsxs(h.Fragment,{children:[h.jsx("button",{type:"button",onClick:bn,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Edit"}),h.jsx("button",{type:"button",onClick:m,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Remove"})]}):h.jsx("button",{type:"button",onClick:m,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Remove all"})]}),D&&h.jsx("div",{role:"listbox","aria-label":"commands",className:"gui-rise absolute bottom-full left-0 right-0 mb-2 max-h-[320px] overflow-y-auto rounded-2xl bg-popover p-1.5 shadow-2xl shadow-black/35",children:D.map((ee,Le)=>h.jsxs("div",{children:[(Le===0||Bc(D[Le-1])!==Bc(ee))&&h.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-subtle first:pt-1",children:Bc(ee)}),h.jsxs("button",{ref:it=>{Q.current[Le]=it},type:"button",role:"option","aria-selected":Le===le,onMouseEnter:()=>xe(Le),onMouseDown:it=>{it.preventDefault(),_n(ee)},className:`flex w-full items-baseline gap-3 rounded-xl px-3 py-2 text-left text-[14px] ${Le===le?"bg-hover":""}`,children:[h.jsxs("span",{className:"flex-shrink-0 font-mono text-[13.5px] text-foreground",children:["/",ee.name]}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:ee.description})]})]},`${ee.kind}:${ee.name}`))}),h.jsxs("form",{className:"rounded-[22px] bg-card px-2.5 pb-2 pt-2.5 shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] transition-shadow focus-within:ring-2 focus-within:ring-ring",onSubmit:ee=>{ee.preventDefault(),C()},children:[ue.length>0&&h.jsx("ul",{"aria-label":"attachments",className:"mb-1.5 flex flex-wrap gap-1.5 px-1 pt-0.5",children:ue.map(ee=>h.jsxs("li",{title:ee.relativePath,className:"flex max-w-full items-center gap-1.5 rounded-lg bg-raised px-2 py-1 text-[12.5px] text-muted-foreground",children:[h.jsx(qg,{size:12,strokeWidth:1.75,"aria-hidden":"true",className:"flex-shrink-0"}),h.jsx("span",{className:"max-w-[180px] truncate",children:ee.name}),h.jsx("button",{type:"button","aria-label":`Remove ${ee.name}`,onClick:()=>ae(ee.id),className:"flex-shrink-0 rounded-full p-0.5 hover:bg-hover hover:text-foreground",children:h.jsx(Wi,{size:12,strokeWidth:2,"aria-hidden":"true"})})]},ee.id))}),U&&h.jsx("p",{role:"status","aria-live":"polite",className:"mb-1.5 px-1.5 text-[12.5px] text-muted-foreground",children:U}),h.jsx("input",{ref:he,type:"file",multiple:!0,onChange:Ge,className:"sr-only",tabIndex:-1,"aria-hidden":"true"}),h.jsx("textarea",{ref:E,"aria-label":"message","aria-describedby":"composer-attach-hint",rows:1,value:M,onChange:ee=>se(ee.target.value),onKeyDown:ee=>{if(!(ee.key==="Enter"&&(ee.nativeEvent.isComposing||ee.keyCode===229))){if(D){if(ee.key==="ArrowDown"||ee.key==="ArrowUp"){ee.preventDefault();const Le=ee.key==="ArrowDown"?1:-1;xe(it=>(it+Le+D.length)%D.length);return}if(ee.key==="Escape"){ee.preventDefault(),P(!0);return}if((ee.key==="Tab"||ee.key==="Enter"&&!ee.shiftKey)&&al()){ee.preventDefault();return}}if(ee.key==="Escape"&&f&&c){ee.preventDefault(),p();return}ee.key==="Enter"&&!ee.shiftKey&&(ee.preventDefault(),C())}},placeholder:"Ask robota anything — type / for commands",className:"block max-h-[220px] min-h-[48px] w-full resize-none bg-transparent px-2 py-1 text-[15px] leading-relaxed text-foreground [field-sizing:content] focus:outline-none"}),h.jsxs("div",{className:"mt-1 flex items-center gap-1",children:[h.jsx("button",{type:"button","aria-label":"Attach files",title:c?"Attach files":"Reconnecting…",disabled:!c,onClick:je,className:"flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full text-muted-foreground hover:bg-hover hover:text-foreground disabled:text-subtle disabled:hover:bg-transparent",children:h.jsx(qg,{size:16,strokeWidth:1.75,"aria-hidden":"true"})}),h.jsx(JC,{status:o,catalog:u,modelList:S,onRequestModelList:v,onManageProviders:T,onSilentCommand:N,connected:c}),h.jsxs("button",{type:f?"button":"submit",onClick:f?p:void 0,disabled:!c||!f&&!M.trim()&&ue.length===0,"aria-description":c?void 0:"Not connected",className:"ml-1 flex h-8 w-8 flex-shrink-0 items-center justify-center rounded-full bg-primary text-primary-foreground transition-all hover:opacity-85 disabled:bg-raised disabled:text-subtle",children:[f?h.jsx(Df,{size:13,strokeWidth:2,fill:"currentColor","aria-hidden":"true"}):h.jsx(NN,{size:17,strokeWidth:2.25,"aria-hidden":"true"}),h.jsx("span",{className:"sr-only",children:f?"Stop":"Send"})]})]})]})]})});function r3({status:t,onStop:i}){const r=t?.goal;if(!r||r.status!=="active")return null;const u=r.maxIterations>0?Math.min(1,r.iterations/r.maxIterations):0;return h.jsxs("div",{role:"status","aria-label":"goal",className:"gui-rise relative flex flex-shrink-0 items-center gap-3 overflow-hidden rounded-2xl bg-card px-4 py-2.5 text-[14px]",children:[h.jsx(Ty,{size:16,strokeWidth:1.75,className:"flex-shrink-0 text-accent"}),h.jsx("span",{className:"flex-shrink-0 font-medium text-foreground",children:"Goal"}),h.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:r.objective}),h.jsxs("span",{className:"flex-shrink-0 text-[13px] tabular-nums text-subtle",children:[r.iterations,"/",r.maxIterations]}),h.jsxs("button",{type:"button","aria-label":"Stop goal",onClick:i,className:"flex flex-shrink-0 items-center gap-1.5 rounded-lg px-2 py-1 text-[13px] text-muted-foreground hover:bg-hover hover:text-foreground",children:[h.jsx(Df,{size:11,fill:"currentColor","aria-hidden":"true"}),"Stop"]}),h.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-0 h-[2px] bg-accent/70 transition-[width]",style:{width:`${u*100}%`}})]})}const a3={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"bg-subtle/15 text-subtle"},px={message:"",tool_activity:"Tool",process_output:"Output",progress:"Progress",result:"Result",error:"Error",group_summary:"Summary"};function u3({entry:t,status:i,records:r,error:u,complete:o,onClose:c,onLoadMore:f,onStop:p}){if(!t)return null;const g=U_(t),m=p!==void 0&&t.controls.includes("cancel"),b=t.headline?.text??t.preview;return h.jsxs("div",{role:"dialog","aria-label":t.title,onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),c())},className:"robota-ui absolute inset-y-0 right-0 z-30 flex w-96 flex-col overflow-hidden border-l border-subtle/20 bg-background shadow-2xl shadow-black/40",children:[h.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-subtle/15 px-4 py-3",children:[h.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),g&&h.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${a3[g.tone]}`,children:g.label}),m&&h.jsx("button",{type:"button","aria-label":`Stop ${t.title}`,onClick:p,className:"flex-shrink-0 rounded-md px-1.5 py-px text-[12px] text-subtle hover:bg-destructive/10 hover:text-destructive",children:"Stop"}),h.jsx("button",{type:"button","aria-label":"Close","aria-keyshortcuts":"Escape",onClick:c,className:"flex-shrink-0 rounded-md p-1 text-subtle hover:bg-card hover:text-foreground",children:h.jsx(Wi,{size:16,strokeWidth:1.9,"aria-hidden":"true"})})]}),b&&h.jsx("p",{className:"flex-shrink-0 border-b border-subtle/15 px-4 py-2.5 text-[13px] leading-snug text-muted-foreground",children:b}),t.deniedToolCalls!==void 0&&t.deniedToolCalls>0&&h.jsxs("p",{className:"flex-shrink-0 px-4 pt-2 text-[12px] text-warning",children:[t.deniedToolCalls," tool ",t.deniedToolCalls===1?"call was":"calls were"," refused."]}),h.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-4 py-3",children:[r.map(x=>h.jsxs("div",{className:"text-[13px] leading-relaxed text-foreground",children:[px[x.kind]&&h.jsx("span",{className:"mr-1.5 text-[11px] font-medium uppercase tracking-wide text-subtle",children:px[x.kind]}),h.jsx("span",{className:"whitespace-pre-wrap break-words",children:x.text})]},x.id)),i==="loading"&&r.length===0&&h.jsx("p",{className:"text-[13px] text-subtle",children:"Loading…"}),u&&h.jsx("p",{className:"text-[13px] text-destructive",children:u}),!o&&i!=="loading"&&h.jsx("button",{type:"button",onClick:f,className:"text-[12px] text-subtle underline hover:text-foreground",children:"Load more"}),!o&&i==="loading"&&r.length>0&&h.jsx("p",{className:"text-[12px] text-subtle",children:"Loading more…"})]})]})}const s3=[{keys:"⌘,",description:"Open Settings"},{keys:"Esc",description:"Close a dialog or menu, or stop the current run"},{keys:"Shift+Tab",description:"Answer a pending question with the keyboard"},{keys:"Enter",description:"Send the message"},{keys:"Shift+Enter",description:"Start a new line"}];function o3({open:t,onClose:i,catalog:r}){const u=Ky(r,"/")??[],o=u.filter(f=>f.kind==="command"),c=u.filter(f=>f.kind==="skill");return h.jsxs(ua,{open:t,onClose:i,title:"Help",panelClassName:"flex h-[min(600px,85vh)] w-full max-w-lg flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[h.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[h.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Help"}),h.jsx("button",{type:"button","aria-label":"Close Help",onClick:i,className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(Wi,{size:17,strokeWidth:1.75})})]}),h.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[h.jsxs("section",{"aria-label":"Shortcuts",children:[h.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:"Shortcuts"}),h.jsx("dl",{className:"mt-2 mb-5 space-y-1.5",children:s3.map(f=>h.jsxs("div",{className:"flex items-baseline gap-3 text-[13.5px]",children:[h.jsx("dt",{className:"w-24 flex-shrink-0 font-mono text-foreground",children:f.keys}),h.jsx("dd",{className:"min-w-0 flex-1 text-muted-foreground",children:f.description})]},f.keys))})]}),h.jsx(mx,{label:"Commands",items:o}),c.length>0&&h.jsx(mx,{label:"Skills",items:c})]})]})}function mx({label:t,items:i}){return h.jsxs("section",{"aria-label":t,className:"mb-5 last:mb-0",children:[h.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:t}),h.jsx("ul",{className:"mt-2 space-y-1.5",children:i.map(r=>h.jsxs("li",{className:"flex items-baseline gap-3 text-[13.5px]",children:[h.jsxs("span",{className:"w-24 flex-shrink-0 truncate font-mono text-foreground",children:["/",r.name]}),h.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:r.description})]},r.name))})]})}const c3={Added:"text-accent",Modified:"text-warning",Deleted:"text-destructive",Renamed:"text-muted-foreground",Copied:"text-muted-foreground",Untracked:"text-subtle",Conflicted:"text-destructive"};function f3({file:t,open:i,onOpen:r}){return h.jsxs("button",{type:"button","aria-expanded":i,onClick:r,className:"flex min-w-0 items-center gap-2 rounded-md px-1.5 py-1.5 text-left hover:bg-hover",children:[h.jsx(Iu,{size:13,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`}),h.jsx("span",{className:`w-[76px] flex-shrink-0 text-[12px] font-medium ${c3[t.status]}`,children:t.status}),h.jsx("span",{className:"min-w-0 flex-1 truncate break-all font-mono text-[12.5px] text-foreground",title:t.path,children:t.path}),typeof t.added=="number"&&h.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",t.added]}),typeof t.removed=="number"&&h.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",t.removed]})]})}function d3({status:t,statusState:i,onRefresh:r,openPath:u,onSelectFile:o,diff:c,diffState:f,diffPath:p}){return h.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[h.jsxs("div",{className:"flex items-center gap-2 px-1",children:[h.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:t?.kind==="status"&&t.branch?`Changes — ${t.branch}`:"Changes"}),h.jsxs("button",{type:"button",onClick:r,disabled:i==="loading","aria-label":"Refresh",className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] text-subtle hover:bg-hover hover:text-foreground disabled:opacity-60",children:[h.jsx(zf,{size:12,className:i==="loading"?"animate-spin":""}),"Refresh"]})]}),i==="loading"&&t===null&&h.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"Reading git status…"}),i==="error"&&h.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:"Could not read git status."}),t?.kind==="not-a-repository"&&h.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"This folder is not a git repository."}),t?.kind==="failed"&&h.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:t.message}),t?.kind==="status"&&t.files.length===0&&h.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"No changes."}),t?.kind==="status"&&t.files.map(g=>h.jsxs("div",{className:"flex flex-col",children:[h.jsx(f3,{file:g,open:u===g.path,onOpen:()=>o(g.path)}),u===g.path&&h.jsxs("div",{className:"pl-6",children:[f==="loading"&&p===g.path&&h.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"Reading diff…"}),c&&p===g.path&&c.kind==="diff"&&c.diffLines.length===0&&h.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"No differences."}),c&&p===g.path&&c.kind==="diff"&&c.diffLines.length>0&&h.jsxs(h.Fragment,{children:[h.jsx(Yu,{diffLines:c.diffLines}),c.truncated&&h.jsx("p",{className:"py-1 text-[12px] text-subtle",children:"The diff was too long and was cut short."})]}),c&&p===g.path&&c.kind==="failed"&&h.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:c.message}),c&&p===g.path&&c.kind==="outside-workspace"&&h.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:"That path is outside the workspace."}),c&&p===g.path&&c.kind==="not-a-repository"&&h.jsx("p",{className:"py-1.5 text-[12.5px] text-muted-foreground",children:"This folder is not a git repository."})]})]},g.path)),t?.kind==="status"&&t.truncated&&h.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"Showing the first files only — there are more."})]})}function h3({memory:t,memoryState:i,onOpenInEditor:r}){return h.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[h.jsxs("div",{className:"flex items-center gap-2 px-1",children:[h.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:"Memory"}),t?.kind==="memory"&&r&&h.jsxs("button",{type:"button",onClick:()=>r(t.path),className:"flex items-center gap-1 rounded-md px-1.5 py-0.5 text-[12px] text-subtle hover:bg-hover hover:text-foreground",children:[h.jsx(GN,{size:12}),"Open in editor"]})]}),i==="loading"&&t===null&&h.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:"Reading project memory…"}),t?.kind==="unavailable"&&h.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:t.message}),t?.kind==="memory"&&h.jsxs(h.Fragment,{children:[h.jsx("pre",{className:"max-h-64 overflow-y-auto whitespace-pre-wrap break-words rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed text-foreground",children:t.content.length>0?t.content:"(empty)"}),t.truncated&&h.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"The memory was too long and was cut short."})]})]})}function p3({state:t,className:i,onOpenMemoryInEditor:r}){j.useEffect(()=>{t.requestProjectStatus(),t.requestProjectMemory()},[t.requestProjectStatus,t.requestProjectMemory]);const[u,o]=j.useState(null);return h.jsxs("div",{className:`robota-ui flex flex-col overflow-hidden ${i??""}`,children:[h.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[h.jsx(ZN,{size:15,className:"text-subtle"}),h.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Project"}),t.projectStatusState==="loading"&&h.jsx(Af,{size:13,className:"ml-auto animate-spin text-subtle","aria-label":"loading"})]}),h.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 pb-3",children:[h.jsx(d3,{status:t.projectStatus,statusState:t.projectStatusState,onRefresh:()=>t.requestProjectStatus(),openPath:u,onSelectFile:c=>{if(u===c){o(null);return}o(c),t.requestProjectDiff(c)},diff:t.projectDiffPath===u?t.projectDiff:null,diffState:t.projectDiffPath===u?t.projectDiffState:"loading",diffPath:t.projectDiffPath}),h.jsx(h3,{memory:t.projectMemory,memoryState:t.projectMemoryState,onOpenInEditor:r})]})]})}const gx={connected:{dot:"bg-accent status-glow",label:"Connected"},connecting:{dot:"bg-warning animate-pulse",label:"Connecting…"},disconnected:{dot:"bg-subtle",label:"Disconnected"},error:{dot:"bg-destructive",label:"Connection error"}},m3={chat:"Chat",usage:"Usage",project:"Project"};function g3(t){j.useEffect(()=>{typeof document>"u"||t===void 0||(document.title=`${t.name} — Robota`)},[t])}function x3({status:t,surface:i,title:r,workspace:u,showBrand:o,view:c,onView:f,personalUsageEnabled:p,connectionLost:g=!1}){const m=gx[t]??gx.disconnected;g3(u);const b=j.useRef(!1);j.useEffect(()=>{t==="connected"&&(b.current=!0)},[t]);const x=t!=="connected"&&(g||b.current),S=p?["chat","usage","project"]:["chat","project"];return h.jsxs("header",{className:"agent-gui-status flex h-12 flex-shrink-0 items-center gap-3 px-5","data-status":t,children:[o?h.jsx(qf,{surface:i}):null,c==="chat"&&r?h.jsx("h1",{className:"min-w-0 truncate text-[14px] font-medium text-foreground/90",children:r}):null,c==="chat"&&u?h.jsx("span",{title:u.path,className:"min-w-0 flex-shrink truncate text-[13px] text-muted-foreground",children:u.name}):null,h.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[h.jsx("nav",{className:"flex items-center rounded-lg bg-raised p-0.5","aria-label":"Primary",children:S.map(v=>h.jsx("button",{type:"button","aria-pressed":c===v,onClick:()=>f(v),className:`rounded-md px-3 py-1 text-[13px] font-medium transition-colors ${c===v?"bg-card text-foreground shadow-sm shadow-black/25":"text-muted-foreground hover:text-foreground"}`,children:m3[v]},v))}),x?null:h.jsxs("span",{className:"flex items-center gap-2",title:m.label,children:[h.jsx("span",{className:`h-2 w-2 rounded-full ${m.dot}`}),t==="connected"?h.jsx("span",{className:"sr-only",children:t}):h.jsx("span",{className:"text-[13px] text-muted-foreground",children:m.label})]})]})]})}const xx="mx-auto w-full max-w-[760px] px-6";function y3({status:t,connectionLost:i,onReconnect:r}){const u=j.useRef(!1);j.useEffect(()=>{t==="connected"&&(u.current=!0)},[t]);const[o,c]=j.useState(!1),[f,p]=j.useState(null);if(t==="connected"||!i&&!u.current)return null;if(!i)return h.jsx("div",{role:"status",className:`${xx} flex-shrink-0 pt-3`,children:h.jsxs("div",{className:"flex items-center gap-2.5 rounded-xl bg-warning/15 px-4 py-2.5 text-[13.5px] text-foreground",children:[h.jsx("span",{className:"h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-warning","aria-hidden":"true"}),"Connection lost. Reconnecting…"]})});const g=()=>{r&&(c(!0),p(null),r().catch(m=>{c(!1),p(m instanceof Error?m.message:String(m))}))};return h.jsx("div",{role:"alert",className:`${xx} flex-shrink-0 pt-3`,children:h.jsxs("div",{className:"flex flex-col gap-2 rounded-xl bg-destructive/15 px-4 py-3 text-[13.5px] text-foreground",children:[h.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[h.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-destructive","aria-hidden":"true"}),h.jsxs("span",{className:"min-w-0 flex-1",children:["Robota stopped.",!r&&h.jsxs(h.Fragment,{children:[" ","Run ",h.jsx("code",{className:"font-mono",children:"robota --serve --open"})," again to reopen it."]})]}),r?h.jsx("button",{type:"button",onClick:g,disabled:o,className:"flex-shrink-0 rounded-lg bg-primary px-3 py-1.5 text-[13px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:o?"Reconnecting…":"Reconnect"}):null]}),f?h.jsx("p",{className:"text-destructive",children:f}):null]})})}const b3={openai:"OpenAI",deepseek:"DeepSeek"};function v3(t){return t===void 0||t.length===0?"The provider":b3[t]??t[0].toUpperCase()+t.slice(1)}function S3(t){const i=v3(t.provider);switch(t.code){case"auth":return`${i} rejected the API key. Check the key for this provider.`;case"rate_limit":return`${i} is limiting requests. Try again in ${t.retryAfterSeconds!==void 0?`${t.retryAfterSeconds} second${t.retryAfterSeconds===1?"":"s"}`:"a moment"}.`;case"model_unavailable":return t.model?`The model "${t.model}" isn't available with this key.`:"The model isn't available with this key.";case"network":return`Can't reach ${i}. Check your connection.`;case"provider":return`${i} returned an error.`;default:return null}}function k3({state:t}){const i=t.sessionNotices??[];return i.length===0?null:h.jsx("div",{className:"pointer-events-none absolute right-4 top-16 z-40 flex w-[min(400px,calc(100%-32px))] flex-col gap-2",children:i.slice(-3).map(r=>{const u=S3(r);return h.jsxs("div",{role:"alert",className:"gui-rise pointer-events-auto flex items-start gap-3 rounded-xl bg-popover px-4 py-3 text-[14px] leading-snug text-popover-foreground shadow-xl shadow-black/30",children:[h.jsx("span",{className:"mt-[7px] h-2 w-2 flex-shrink-0 rounded-full bg-destructive"}),h.jsxs("span",{className:"max-h-40 flex-1 overflow-y-auto whitespace-pre-wrap break-words",children:[u??r.message,u&&h.jsxs("details",{className:"mt-1.5",children:[h.jsx("summary",{className:"cursor-pointer text-[12.5px] text-muted-foreground hover:text-foreground",children:"Details"}),h.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-[12.5px] text-muted-foreground",children:r.message})]})]}),h.jsx("button",{type:"button","aria-label":"Dismiss notice",onClick:()=>t.dismissSessionNotice?.(r.id),className:"-mr-1 rounded-md p-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(Wi,{size:15})})]},r.id)})})}const e1="min-w-[160px] flex-shrink-0 rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground";function uf({label:t,note:i,value:r,options:u,onChange:o,disabled:c=!1}){const f=j.useId(),p=u.find(m=>m.id===r),g=i??p?.description;return h.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),h.jsxs("select",{id:f,value:u.some(m=>m.id===r)?r:"",disabled:c,onChange:m=>o(m.target.value),className:e1,children:[u.some(m=>m.id===r)?null:h.jsx("option",{value:"",disabled:!0,children:r||"Unset"}),u.map(m=>h.jsx("option",{value:m.id,children:m.label},m.id))]})]}),g?h.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:g}):null]})}const Hc="__other__";function w3({label:t,current:i,recommended:r,note:u,onChange:o,disabled:c=!1}){const f=j.useId(),p=r.some(v=>v.id===i),[g,m]=j.useState(!p&&i.length>0),[b,x]=j.useState(p?"":i);j.useEffect(()=>{const v=r.some(N=>N.id===i);m(!v&&i.length>0),x(v?"":i)},[i,r]);function S(){const v=b.trim();v.length>0&&v!==i&&o(v)}return h.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[h.jsxs("div",{className:"flex items-center justify-between gap-4",children:[h.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),h.jsxs("select",{id:f,disabled:c,value:g?Hc:p?i:"",onChange:v=>{if(v.target.value===Hc){m(!0);return}m(!1),o(v.target.value)},className:e1,children:[!p&&!g?h.jsx("option",{value:"",disabled:!0,children:i||"Unset"}):null,r.map(v=>h.jsx("option",{value:v.id,children:v.label},v.id)),h.jsx("option",{value:Hc,children:"Other…"})]})]}),g?h.jsx("input",{type:"text","aria-label":`${t} — other`,placeholder:"Language code, e.g. fr",value:b,disabled:c,onChange:v=>x(v.target.value),onBlur:S,onKeyDown:v=>{v.key==="Enter"&&(v.preventDefault(),S())},className:"rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground"}):null,h.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:u})]})}function j3({snapshot:t,onUpdate:i,onRequestPresetChange:r}){return h.jsxs("section",{"aria-labelledby":"settings-general-heading",children:[h.jsx("h3",{id:"settings-general-heading",className:"sr-only",children:"General"}),h.jsx(w3,{label:"Language",current:t.language.current,recommended:t.language.recommended,note:t.language.appliesNote,onChange:u=>i({field:"language",language:u})}),h.jsx(uf,{label:"Output style",value:t.outputStyle.current,options:t.outputStyle.choices,onChange:u=>i({field:"outputStyle",styleId:u})}),h.jsx(uf,{label:"Preset",note:"Applies to this session — it is not saved for the next one.",value:t.preset.current,options:t.preset.choices,onChange:r})]})}const N3={connected:"Connected",failed:"Failed",disabled:"Disabled"},E3={connected:"text-success",failed:"text-destructive",disabled:"text-muted-foreground"};function _3({server:t,expanded:i,onToggleExpanded:r,onToggleEnabled:u}){const o=j.useId(),c=t.toolNames.length>0;return h.jsx("li",{className:"border-b border-border/60 py-3 last:border-b-0",children:h.jsxs("div",{className:"flex items-start justify-between gap-3",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsxs("button",{type:"button",onClick:c?r:void 0,disabled:!c,"aria-expanded":c?i:void 0,className:"flex w-full items-center gap-1.5 text-left disabled:cursor-default",children:[c?i?h.jsx(Ny,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):h.jsx(Iu,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):h.jsx("span",{className:"w-[14px] flex-shrink-0"}),h.jsx("span",{id:o,className:"truncate text-[14px] font-medium text-foreground",children:t.name})]}),h.jsxs("p",{className:"mt-0.5 text-[12.5px] text-muted-foreground",children:[t.scopeLabel," · ",h.jsx("span",{className:E3[t.status],children:N3[t.status]}),t.status==="failed"&&t.statusReason?`: ${t.statusReason}`:""," · ",t.toolNames.length===1?"1 tool":`${t.toolNames.length} tools`]}),i&&c?h.jsx("ul",{className:"mt-2 flex flex-col gap-0.5 pl-[20px]",children:t.toolNames.map(f=>h.jsx("li",{className:"truncate font-mono text-[12px] text-muted-foreground",children:f},f))}):null]}),h.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":o,onClick:()=>u(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:h.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${t.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})})}function C3({snapshot:t,onToggleServer:i,onReload:r,reloading:u}){const[o,c]=j.useState(new Set),{servers:f}=t.mcp;function p(g){c(m=>{const b=new Set(m);return b.has(g)?b.delete(g):b.add(g),b})}return h.jsxs("section",{"aria-labelledby":"settings-mcp-heading",className:"flex flex-col gap-3",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("h3",{id:"settings-mcp-heading",className:"text-[14px] font-medium text-foreground",children:"MCP Servers"}),h.jsxs("button",{type:"button",onClick:r,disabled:u,className:"inline-flex items-center gap-1.5 rounded-lg bg-raised px-2.5 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:[h.jsx(zf,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload servers"]})]}),f.length===0?h.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No MCP servers are configured."}):h.jsx("ul",{children:f.map(g=>h.jsx(_3,{server:g,expanded:o.has(g.id),onToggleExpanded:()=>p(g.id),onToggleEnabled:m=>i(g.id,m)},g.id))})]})}const yx={allow:"Allow",deny:"Deny",ask:"Ask"},T3={allow:"allowed",deny:"denied",ask:"asked about"};function A3({rule:t,onRequestRemove:i}){return h.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-lg px-2.5 py-2 hover:bg-hover",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsxs("p",{className:"truncate text-[13.5px] text-foreground",children:[h.jsx("span",{className:"font-medium",children:yx[t.kind]})," ",h.jsx("span",{className:"font-mono text-[12.5px]",children:t.pattern})]}),h.jsx("p",{className:"truncate text-[12px] text-muted-foreground",children:t.source})]}),t.removable?h.jsx("button",{type:"button","aria-label":`Remove rule: ${yx[t.kind]} ${t.pattern}`,onClick:()=>i(t),className:"flex-shrink-0 rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-destructive",children:h.jsx(Rf,{size:15,strokeWidth:1.75})}):null]})}function z3({snapshot:t,onRequestModeChange:i,onToggleSandbox:r,onRequestRemoveRule:u}){const o=j.useId(),{sandbox:c}=t;return h.jsxs("section",{"aria-labelledby":"settings-permissions-heading",className:"flex flex-col gap-5",children:[h.jsxs("div",{children:[h.jsx("h3",{id:"settings-permissions-heading",className:"sr-only",children:"Permissions"}),h.jsx(uf,{label:"Default permission mode",value:t.permissionMode.current,options:t.permissionMode.choices,onChange:i})]}),h.jsxs("div",{children:[h.jsx("h4",{className:"mb-1.5 text-[13px] font-medium text-foreground",children:"Rules"}),t.permissionRules.length===0?h.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No permission rules are configured — the default mode above governs every action."}):h.jsx("ul",{className:"space-y-0.5",children:t.permissionRules.map(f=>h.jsx(A3,{rule:f,onRequestRemove:u},f.id))})]}),h.jsxs("div",{className:"flex items-start justify-between gap-4 border-t border-border/60 pt-4",children:[h.jsxs("div",{className:"min-w-0",children:[h.jsx("span",{id:o,className:"text-[14px] font-medium text-foreground",children:"Sandbox"}),h.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:c.description}),!c.available&&c.unavailableReason?h.jsxs("p",{className:"mt-0.5 text-[12.5px] text-destructive",children:["Not available on this machine: ",c.unavailableReason]}):null]}),h.jsx("button",{type:"button",role:"switch","aria-checked":c.enabled,"aria-labelledby":o,disabled:!c.available,onClick:()=>r(!c.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${c.enabled?"bg-primary":"bg-raised"} ${c.available?"":"cursor-not-allowed opacity-50"}`,children:h.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${c.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})]})}function D3(t){return`"${t.pattern}" will no longer be ${T3[t.kind]} automatically.`}function R3({plugin:t,canInstall:i,onToggleEnabled:r,onRequestUninstall:u}){const o=j.useId();return h.jsxs("li",{className:"flex items-start justify-between gap-3 border-b border-border/60 py-3 last:border-b-0",children:[h.jsxs("div",{className:"min-w-0 flex-1",children:[h.jsx("span",{id:o,className:"truncate text-[14px] font-medium text-foreground",children:t.name}),t.description?h.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:t.description}):null]}),h.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[i?h.jsx("button",{type:"button","aria-label":`Uninstall ${t.name}`,onClick:u,className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-destructive",children:h.jsx(Rf,{size:15,strokeWidth:1.75})}):null,h.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":o,onClick:()=>r(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:h.jsx("span",{className:`absolute top-0.5 h-5 w-5 rounded-full bg-white shadow transition-transform ${t.enabled?"translate-x-[22px]":"translate-x-0.5"}`})})]})]})}function M3({snapshot:t,onTogglePlugin:i,onReload:r,reloading:u,onRequestInstall:o,onRequestUninstall:c}){const[f,p]=j.useState(""),{plugins:g,canInstall:m}=t.plugins,b=j.useId();function x(){const S=f.trim();S.length!==0&&(o(S),p(""))}return h.jsxs("section",{"aria-labelledby":"settings-plugins-heading",className:"flex flex-col gap-3",children:[h.jsxs("div",{className:"flex items-center justify-between gap-3",children:[h.jsx("h3",{id:"settings-plugins-heading",className:"text-[14px] font-medium text-foreground",children:"Plugins"}),h.jsxs("button",{type:"button",onClick:r,disabled:u,className:"inline-flex items-center gap-1.5 rounded-lg bg-raised px-2.5 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:[h.jsx(zf,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload plugins"]})]}),g.length===0?h.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No plugins are installed."}):h.jsx("ul",{children:g.map(S=>h.jsx(R3,{plugin:S,canInstall:m,onToggleEnabled:v=>i(S.id,v),onRequestUninstall:()=>c(S)},S.id))}),h.jsx("div",{className:"border-t border-border/60 pt-3",children:m?h.jsxs("div",{className:"flex flex-col gap-1.5",children:[h.jsx("label",{htmlFor:b,className:"text-[13px] font-medium text-foreground",children:"Install a plugin"}),h.jsxs("div",{className:"flex gap-2",children:[h.jsx("input",{id:b,type:"text",placeholder:"name@marketplace",value:f,onChange:S=>p(S.target.value),onKeyDown:S=>{S.key==="Enter"&&(S.preventDefault(),x())},className:"min-w-0 flex-1 rounded-lg border border-border bg-raised px-2.5 py-1.5 text-[13.5px] text-foreground"}),h.jsx("button",{type:"button",onClick:x,disabled:f.trim().length===0,className:"flex-shrink-0 rounded-lg bg-raised px-3 py-1.5 text-[13px] text-foreground hover:bg-hover disabled:opacity-60",children:"Install"})]})]}):h.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:"Installing and uninstalling plugins runs code on this computer, so it only works from the desktop app or the page opened here — not from a remote device."})})]})}const Bf="rounded-lg px-2.5 py-1.5 text-[12.5px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",O3=`${Bf} bg-primary text-primary-foreground hover:opacity-90`,Cu=`${Bf} bg-raised text-foreground hover:bg-hover`,L3=`${Bf} text-destructive hover:bg-destructive/10`;function U3({profile:t,modelList:i,onSelect:r}){const[u,o]=j.useState(!1),c=j.useRef(null),f=i?.groups.find(p=>p.profileName===t.name)?.models??[];return h.jsxs("span",{className:"relative inline-block",children:[h.jsx("button",{ref:c,type:"button","aria-haspopup":"menu","aria-expanded":u,disabled:f.length===0,onClick:()=>o(!0),className:Cu,children:"Model"}),u?h.jsx(Jy,{label:`Models for ${t.name}`,sections:[{items:f.map(p=>({key:p.id,label:p.label,checked:t.model!==void 0&&p.id===t.model.id,onSelect:()=>r(t.name,p.id)}))}],triggerRef:c,onClose:()=>o(!1)}):null]})}function q3({profile:t,modelList:i,onUse:r,onModelChange:u,onCommand:o,onRequestDelete:c}){return h.jsxs("li",{className:"rounded-xl border border-border/60 p-3",children:[h.jsxs("div",{className:"flex items-start gap-1.5",children:[t.current?h.jsx(aa,{size:14,strokeWidth:2.25,className:"mt-0.5 flex-shrink-0 text-primary","aria-hidden":"true"}):h.jsx("span",{className:"mt-0.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),h.jsxs("div",{className:"min-w-0",children:[h.jsxs("p",{className:"truncate text-[14px] font-medium text-foreground",children:[t.name,t.current?h.jsx("span",{className:"sr-only",children:" (in use)"}):null]}),h.jsxs("p",{className:"truncate text-[12.5px] text-muted-foreground",children:[t.providerLabel,t.model?` · ${t.model.label}`:" · No model configured"]}),t.connectionState?h.jsx("p",{className:"text-[12.5px] text-destructive",children:t.connectionState}):null]})]}),h.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[h.jsx("button",{type:"button",disabled:t.current,onClick:()=>r(t.name),className:O3,children:"Use"}),h.jsx(U3,{profile:t,modelList:i,onSelect:u}),h.jsx("button",{type:"button",onClick:()=>o(`edit ${t.name}`),className:Cu,children:"Edit…"}),h.jsx("button",{type:"button",onClick:()=>o(`test ${t.name}`),className:Cu,children:"Test connection"}),h.jsx("button",{type:"button",onClick:()=>o(`duplicate ${t.name}`),className:Cu,children:"Duplicate…"}),h.jsx("button",{type:"button",onClick:()=>c(t.name),className:`${L3} ml-auto`,children:"Delete…"})]})]})}function B3({snapshot:t,modelList:i,onRequestModelList:r,onUse:u,onModelChange:o,onCommand:c,onRequestDelete:f}){j.useEffect(()=>{r()},[]);const{profiles:p}=t.providers;return h.jsxs("section",{"aria-labelledby":"settings-providers-heading",className:"flex flex-col gap-4",children:[h.jsx("h3",{id:"settings-providers-heading",className:"sr-only",children:"Providers & Models"}),p.length===0?h.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"No providers configured yet."}):h.jsx("ul",{className:"flex flex-col gap-3",children:p.map(g=>h.jsx(q3,{profile:g,modelList:i,onUse:u,onModelChange:o,onCommand:c,onRequestDelete:f},g.name))}),h.jsx("button",{type:"button",onClick:()=>c("add"),className:"self-start rounded-lg bg-raised px-3 py-1.5 text-[13px] font-medium text-foreground hover:bg-hover",children:"Add provider…"})]})}const Ic=[{id:"general",label:"General"},{id:"permissions",label:"Permissions"},{id:"mcp",label:"MCP Servers"},{id:"plugins",label:"Plugins"},{id:"providers",label:"Providers & Models"}];function H3({state:t}){const[i,r]=j.useState("general"),[u,o]=j.useState(!0),[c,f]=j.useState(null),[p,g]=j.useState(null),[m,b]=j.useState(null),[x,S]=j.useState(!1),[v,N]=j.useState(!1),[T,L]=j.useState(null);if(j.useEffect(()=>{t.settingsOpen&&(r(t.settingsInitialSectionId??"general"),o(!0))},[t.settingsOpen,t.settingsInitialSectionId]),j.useEffect(()=>{S(!1),N(!1)},[t.settingsSnapshot,t.settingsError]),!t.settingsOpen)return null;const E=t.settingsSnapshot,V=Ic.find(J=>J.id===i)??Ic[0];function R(J){r(J),o(!1)}function W(J){if(E&&J===E.permissionMode.skipsAllChecksMode){f({kind:"mode"});return}t.updateSettings({field:"permissionMode",mode:J})}function ie(J){if(E?.preset.skipsAllChecksPresetIds.includes(J)){f({kind:"preset",presetId:J});return}t.updateSettings({field:"preset",presetId:J})}function M(){S(!0),t.updateSettings({field:"reloadMcpServers"})}function Y(){N(!0),t.updateSettings({field:"reloadPlugins"})}function ue(){m?.kind==="install"?t.updateSettings({field:"installPlugin",pluginId:m.pluginId}):m?.kind==="uninstall"&&t.updateSettings({field:"uninstallPlugin",pluginId:m.plugin.id}),b(null)}return h.jsxs(h.Fragment,{children:[h.jsxs(ua,{open:!0,onClose:()=>t.closeSettings(),title:"Settings",panelClassName:"flex h-[min(680px,85vh)] w-full max-w-3xl flex-col overflow-hidden rounded-2xl bg-card text-card-foreground shadow-[0_8px_30px_-12px_rgb(0_0_0/0.45)] focus:outline-none",children:[h.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[u?null:h.jsx("button",{type:"button","aria-label":"Back to sections",onClick:()=>o(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground md:hidden",children:h.jsx(zN,{size:18,strokeWidth:1.75})}),h.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Settings"}),h.jsx("button",{type:"button","aria-label":"Close Settings",onClick:()=>t.closeSettings(),className:"ml-auto rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground",children:h.jsx(Wi,{size:17,strokeWidth:1.75})})]}),h.jsxs("div",{className:"flex min-h-0 flex-1",children:[h.jsx("nav",{"aria-label":"Settings sections",className:`w-full flex-shrink-0 overflow-y-auto border-r border-border bg-sidebar px-2 py-3 md:block md:w-[200px] ${u?"block":"hidden"}`,children:h.jsx("ul",{className:"space-y-0.5",children:Ic.map(J=>h.jsx("li",{children:h.jsx("button",{type:"button",onClick:()=>R(J.id),"aria-current":J.id===i?"true":void 0,className:`w-full rounded-lg px-2.5 py-2 text-left text-[13.5px] ${J.id===i?"bg-raised font-medium text-foreground":"text-foreground/85 hover:bg-hover"}`,children:J.label})},J.id))})}),h.jsx("div",{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4 md:block ${u?"hidden":"block"}`,children:E===null?t.settingsStatus==="error"?h.jsxs("div",{className:"flex flex-col items-start gap-2",children:[h.jsx("p",{className:"text-[13.5px] text-destructive",children:t.settingsError??"Settings could not be read."}),h.jsx("button",{type:"button",onClick:()=>t.openSettings(),className:"rounded-lg bg-raised px-3 py-1.5 text-[13px] text-foreground hover:bg-hover",children:"Try again"})]}):h.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"Loading settings…"}):h.jsxs(h.Fragment,{children:[t.settingsError?h.jsx("p",{className:"mb-3 rounded-lg bg-destructive/12 px-3 py-2 text-[13px] text-destructive",children:t.settingsError}):null,V.id==="general"?h.jsx(j3,{snapshot:E,onUpdate:t.updateSettings,onRequestPresetChange:ie}):V.id==="mcp"?h.jsx(C3,{snapshot:E,onToggleServer:(J,U)=>t.updateSettings({field:"mcpServerEnabled",serverId:J,enabled:U}),onReload:M,reloading:x}):V.id==="plugins"?h.jsx(M3,{snapshot:E,onTogglePlugin:(J,U)=>t.updateSettings({field:"pluginEnabled",pluginId:J,enabled:U}),onReload:Y,reloading:v,onRequestInstall:J=>b({kind:"install",pluginId:J}),onRequestUninstall:J=>b({kind:"uninstall",plugin:J})}):V.id==="providers"?h.jsx(B3,{snapshot:E,modelList:t.modelList,onRequestModelList:t.requestModelList,onUse:J=>t.updateSettings({field:"providerProfile",profileName:J}),onModelChange:(J,U)=>t.updateSettings({field:"providerModel",profileName:J,modelId:U}),onCommand:J=>t.send({type:"command",name:"provider",args:J}),onRequestDelete:J=>L(J)}):h.jsx(z3,{snapshot:E,onRequestModeChange:W,onToggleSandbox:J=>t.updateSettings({field:"sandbox",enabled:J}),onRequestRemoveRule:J=>g(J)})]})})]})]}),h.jsx(Rl,{open:c!==null,title:"Skip all permission checks?",body:"Every action runs without asking first — file edits, shell commands and network access included. You can turn this back on at any time.",confirmLabel:"Skip all checks",destructive:!0,onCancel:()=>f(null),onConfirm:()=>{c?.kind==="mode"&&E?t.updateSettings({field:"permissionMode",mode:E.permissionMode.skipsAllChecksMode}):c?.kind==="preset"&&t.updateSettings({field:"preset",presetId:c.presetId}),f(null)}}),h.jsx(Rl,{open:p!==null,title:"Remove this rule?",body:p?D3(p):"",confirmLabel:"Remove",destructive:!0,onCancel:()=>g(null),onConfirm:()=>{p&&t.updateSettings({field:"removePermissionRule",scope:p.scope,kind:p.kind,pattern:p.pattern}),g(null)}}),h.jsx(Rl,{open:m!==null,title:m?.kind==="uninstall"?"Uninstall this plugin?":"Install this plugin?",body:m?I3(m):"",confirmLabel:m?.kind==="uninstall"?"Uninstall":"Install",destructive:!0,onCancel:()=>b(null),onConfirm:ue}),h.jsx(Rl,{open:T!==null,title:T?`Delete profile "${T}"?`:"",body:"This removes the profile and its stored key. This cannot be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>L(null),onConfirm:()=>{T&&t.updateSettings({field:"deleteProviderProfile",profileName:T}),L(null)}})]})}function I3(t){if(t.kind==="uninstall")return`"${t.plugin.name}" will be removed from this computer.`;const i=t.pluginId.lastIndexOf("@"),r=i===-1?t.pluginId:t.pluginId.slice(0,i),u=i===-1?void 0:t.pluginId.slice(i+1);return`Install "${r}"${u?` from ${u}`:""}. It can run code on this computer.`}function Y3(t){const[i,r]=j.useState(()=>typeof window>"u"||typeof window.matchMedia!="function"?!1:window.matchMedia(t).matches);return j.useEffect(()=>{if(typeof window>"u"||typeof window.matchMedia!="function")return;const u=window.matchMedia(t),o=()=>r(u.matches);return o(),u.addEventListener("change",o),()=>u.removeEventListener("change",o)},[t]),i}const G3="(max-width: 767.98px)",V3="mx-auto w-full max-w-[760px] px-6";function F3(){return h.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Conversation",children:h.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[h.jsx(Uf,{size:40}),h.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"What are we working on?"}),h.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Session connected. Send a message to start — the agent works in the robota runtime and asks you here before anything that needs your permission."})]})})}function X3({onSetUp:t,disabled:i}){return h.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Set up a provider",children:h.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[h.jsx(Uf,{size:40}),h.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"Connect a model provider to start."}),h.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Robota needs a provider profile — a type, a key and a model — before it can reply. Set one up now; you can add more or change it later the same way."}),h.jsx("button",{type:"button",onClick:t,disabled:i,className:"rounded-lg bg-primary px-4 py-2 text-[14px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:"Set up provider"})]})})}function Q3({state:t,surface:i,personalUsageEnabled:r=!1,onReconnect:u,pickFiles:o,getPathForFile:c,onOpenMemoryInEditor:f}){const[p,g]=j.useState("chat"),m=j.useRef(null),b=t.executionWorkspace?.entries??[],x=b.some(D=>D.kind!=="main_thread"),S=b.find(D=>D.id===t.openEntryId)??null,v=D=>{D.loopId!==void 0?t.send({type:"command",name:"loop",args:`stop ${D.loopId}`}):t.send({type:"cancel-background-task",taskId:D.sourceId})},N=t.sessionStatus?.goal??null,T=x||t.scheduledTasks.length>0||N!==null,L=t.messages.length===0&&!t.streamingText&&!t.isThinking&&t.activeTools.length===0,E=t.sessionStatus?.setupRequired===!0,V=(t.sessionListing??null)!==null||t.sessionsError?.code==="list_failed",R=V&&t.sessionSidebarOpen,W=r&&p==="usage",ie=p==="project",M=t.sessionListing??null,Y=M?.sessions.find(D=>D.id===M.currentSessionId),ue=t.sessionName??(Y?On(Y):null),J=Y3(G3),U=R&&J,ne=()=>t.setSessionSidebarOpen?.(!1),le=j.useRef(null);j.useEffect(()=>{if(U)return;const D=Q=>{Q.target instanceof HTMLElement&&(le.current=Q.target)};return document.addEventListener("focusin",D),()=>document.removeEventListener("focusin",D)},[U]);const xe=j.useRef(!1);j.useEffect(()=>{if(xe.current&&!U){const D=le.current,Q=D?.getAttribute("aria-label");(D&&document.contains(D)?D:Q?document.querySelector(`[aria-label="${Q}"]`):null)?.focus()}xe.current=U},[U]);const oe={...t,switchSession:D=>{g("chat"),t.switchSession?.(D),U&&ne()},newSession:()=>{g("chat"),t.newSession?.(),U&&ne()}},P=h.jsx(eC,{state:oe,brand:h.jsx(qf,{surface:i}),className:U?"h-full":"absolute inset-y-0 left-0 z-30 shadow-2xl shadow-black/40 md:static md:z-auto md:shadow-none"});return h.jsxs("div",{className:"robota-ui relative flex h-full bg-background text-foreground",children:[V?R?J?h.jsx(ua,{open:U,onClose:ne,title:"Sessions",panelClassName:"mr-auto flex h-full w-[272px] max-w-[85vw] flex-col self-stretch overflow-hidden rounded-2xl bg-sidebar shadow-2xl shadow-black/40 focus:outline-none",children:P}):P:h.jsx(tC,{state:oe}):null,h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx(x3,{status:t.status,surface:i,title:ue,workspace:t.sessionStatus?.workspace,showBrand:!R,view:p,onView:g,personalUsageEnabled:r,connectionLost:t.connectionLost??!1}),W?h.jsxs("div",{className:"min-h-0 flex-1",children:[h.jsx(zC,{state:t}),h.jsx(Dc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):ie?h.jsxs("div",{className:"min-h-0 flex-1",children:[h.jsx(p3,{state:t,onOpenMemoryInEditor:f}),h.jsx(Dc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):h.jsxs("div",{className:"flex min-h-0 flex-1",children:[h.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[h.jsx(y3,{status:t.status,connectionLost:t.connectionLost??!1,onReconnect:u}),h.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:E?h.jsx(X3,{onSetUp:()=>t.send({type:"command",name:"provider",args:"add"}),disabled:t.status!=="connected"}):L?h.jsx(F3,{}):h.jsx(N_,{messages:t.messages,activeTools:t.activeTools,streamingText:t.streamingText,isThinking:t.isThinking,ownDriverId:t.ownDriverId})}),h.jsxs("div",{className:`${V3} relative flex flex-shrink-0 flex-col gap-2 pb-4 before:pointer-events-none before:absolute before:inset-x-0 before:-top-8 before:h-8 before:bg-gradient-to-t before:from-background before:to-transparent`,children:[h.jsx(r3,{status:t.sessionStatus??null,onStop:()=>t.send({type:"command",name:"goal",args:"cancel"})}),h.jsx(Dc,{layout:"dock",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId,onFocusReturn:()=>m.current?.focus()}),E?null:h.jsx(i3,{ref:m,catalog:t.commandCatalog??null,status:t.sessionStatus??null,connected:t.status==="connected",running:t.isThinking,onStop:()=>t.send({type:"abort"}),queued:t.queuedPrompt,pickFiles:o,getPathForFile:c,onCancelQueue:()=>{t.send({type:"cancel-queue"}),t.send({type:"get-pending"})},onCommand:(D,Q)=>t.send({type:"command",name:D,...Q?{args:Q}:{}}),modelList:t.modelList,onRequestModelList:()=>t.requestModelList(),onSilentCommand:(D,Q)=>t.sendCommandSilently(D,Q),onManageProviders:()=>t.openSettings("providers"),onSubmit:D=>{if(!D.startsWith("/")){t.send({type:"submit",prompt:D});return}const[Q,...se]=D.slice(1).trim().split(/\s+/u);if(!Q)return;const me=se.join(" ");t.send({type:"command",name:Q,...me?{args:me}:{}})}})]})]}),T&&h.jsx("aside",{"aria-label":"Agents",className:"flex w-72 flex-shrink-0 overflow-hidden bg-sidebar",children:h.jsx(q_,{tasks:b,className:"flex-1",selectedEntryId:t.openEntryId??void 0,onSelect:D=>t.openExecutionDetail(D.id),onReturnToConversation:()=>t.closeExecutionDetail(),onStop:v,schedules:t.scheduledTasks,goal:N,onPauseSchedule:t.pauseSchedule,onResumeSchedule:t.resumeSchedule,onDeleteSchedule:t.deleteSchedule,onCancelGoal:()=>t.send({type:"command",name:"goal",args:"cancel"})})}),h.jsx(u3,{entry:S,status:t.executionDetailStatus,records:t.executionDetailRecords,error:t.executionDetailError,complete:t.executionDetailComplete,onClose:()=>t.closeExecutionDetail(),onLoadMore:()=>t.loadMoreExecutionDetail(),onStop:S?()=>v(S):void 0})]})]}),h.jsx(k3,{state:t}),h.jsx(H3,{state:t}),h.jsx(F_,{state:t}),h.jsx(o3,{open:t.helpOpen,onClose:()=>t.closeHelp(),catalog:t.commandCatalog})]})}function sf({tone:t,children:i}){return h.jsxs("div",{className:"robota-ui flex h-full flex-col bg-background text-foreground",children:[h.jsx("header",{className:"flex h-12 flex-shrink-0 items-center px-5",children:h.jsx(qf,{})}),h.jsx("main",{className:"flex flex-1 items-center justify-center",children:h.jsxs("div",{className:"gui-rise flex max-w-[520px] flex-col items-center gap-4 px-8 text-center",children:[h.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${t==="fatal"?"bg-destructive":"animate-pulse bg-warning"}`}),h.jsx("div",{className:`text-[15px] leading-relaxed ${t==="fatal"?"text-foreground":"text-muted-foreground"}`,children:i})]})})]})}function $3({url:t,host:i}){const r=i_(t);j.useEffect(()=>{r.status==="connected"&&i.signalReady()},[r.status,i]);const{openSettings:u}=r;j.useEffect(()=>i.onOpenSettings(u),[i,u]);const o=i.restartRuntime,c=r.sessionListing?.currentSessionId??null,f=o?async()=>{c&&XE(c),await o()}:void 0;return h.jsx(Q3,{state:r,surface:i.kind==="desktop"?"app":"web",personalUsageEnabled:!0,onReconnect:f,pickFiles:i.pickFiles,getPathForFile:i.getPathForFile,onOpenMemoryInEditor:i.openMemoryInEditor})}const Yc="rounded-lg px-4 py-2 text-[14px] font-medium disabled:opacity-60 focus-visible:outline focus-visible:outline-2";function Z3({detail:t,retry:i}){const[r,u]=j.useState(!1),[o,c]=j.useState(null),f=()=>{i&&(u(!0),c(null),i().catch(p=>{u(!1),c(p instanceof Error?p.message:String(p))}))};return h.jsxs(h.Fragment,{children:[t?h.jsxs(h.Fragment,{children:["The agent process stopped:",h.jsx("pre",{className:"mt-4 max-h-64 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-card p-4 text-left font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t})]}):"The agent process stopped. Personal Usage is unavailable.",i?h.jsx("div",{className:"mt-4",children:h.jsx("button",{type:"button",onClick:f,disabled:r,className:"rounded-lg bg-primary px-4 py-2 text-[14px] font-medium text-primary-foreground hover:opacity-90 disabled:opacity-60",children:r?"Trying again…":"Try again"})}):h.jsx("p",{className:"mt-3",children:"Restart the app to reconnect."}),o?h.jsx("p",{className:"mt-3 text-[13px] text-destructive",children:o}):null]})}function K3({question:t,answer:i}){const[r,u]=j.useState(!1),[o,c]=j.useState(null),f=p=>{u(!0),c(null),i(p).then(g=>{g.error!==void 0&&(u(!1),c(g.error))},g=>{u(!1),c(g instanceof Error?g.message:String(g))})};return h.jsx("div",{role:"dialog","aria-labelledby":"trust-title",className:"flex h-full flex-col",children:h.jsxs(sf,{tone:"muted",children:[h.jsx("h1",{id:"trust-title",className:"text-[16px] font-medium text-foreground",children:"Do you trust this folder?"}),h.jsx("p",{className:"mt-2 break-all font-mono text-[13px] text-foreground",children:t.folder}),h.jsx("p",{className:"mt-3",children:"Trusting this folder lets Robota use the project's own settings, hooks, skills and MCP servers. Restricted starts without them."}),t.loads.length>0?h.jsxs("details",{className:"mt-4 text-left",children:[h.jsx("summary",{className:"cursor-pointer text-[13px] text-muted-foreground hover:text-foreground",children:"Details"}),h.jsx("pre",{"aria-label":"What trust would load",className:"mt-2 max-h-48 overflow-auto whitespace-pre-wrap break-words rounded-xl bg-card p-4 font-mono text-[12px] leading-relaxed text-muted-foreground",children:t.loads.join(`
|
|
309
|
-
`)})]}):null,h.jsxs("div",{className:"mt-5 flex flex-wrap justify-center gap-2",children:[h.jsx("button",{type:"button",onClick:()=>f("trust"),disabled:r,className:`${Yc} bg-primary text-primary-foreground hover:opacity-90`,children:"Trust folder"}),h.jsx("button",{type:"button",onClick:()=>f("restricted"),disabled:r,className:`${Yc} bg-card text-foreground hover:opacity-90`,children:"Start Restricted"}),h.jsx("button",{type:"button",onClick:()=>f("quit"),disabled:r,className:`${Yc} text-muted-foreground hover:text-foreground`,children:"Quit"})]}),o?h.jsx("p",{role:"alert",className:"mt-3 whitespace-pre-wrap text-[13px] text-destructive",children:o}):null]})})}function J3({host:t}){const[i,r]=j.useState(null),[u,o]=j.useState(null),[c,f]=j.useState(null);return j.useEffect(()=>{let p=!1;const g=t.onState((m,b)=>{m==="fatal"&&o(b?{detail:b}:{})});return(async()=>{const m=await t.trustQuestion?.()??null;if(p)return;if(m){f(m);return}const b=await t.getEndpoint();p||r(b)})(),()=>{p=!0,g()}},[t]),u?h.jsx("div",{role:"alert",className:"flex h-full flex-col",children:h.jsx(sf,{tone:"fatal",children:h.jsx(Z3,{detail:u.detail,retry:t.restartRuntime})})}):c&&t.answerTrust?h.jsx(K3,{question:c,answer:t.answerTrust}):i?h.jsx($3,{url:i,host:t}):h.jsx(sf,{tone:"muted",children:"Starting the agent…"})}class P3 extends cf.Component{constructor(i){super(i),this.state={error:null}}static getDerivedStateFromError(i){return{error:i}}render(){return this.state.error?h.jsx("main",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center p-8",children:h.jsxs("div",{className:"max-w-[600px] text-[15px] text-[var(--destructive)]",children:[h.jsx("p",{className:"mb-2 text-[20px] font-semibold text-[var(--foreground)]",children:"Robota hit an error"}),h.jsx("p",{className:"text-[var(--muted-foreground)] mb-2",children:this.state.error.message}),h.jsx("pre",{className:"overflow-auto whitespace-pre-wrap rounded-xl bg-[var(--card)] p-4 font-mono text-[12.5px] leading-relaxed text-[var(--muted-foreground)]",children:this.state.error.stack})]})}):this.props.children}}function W3(t,i){const r=t?.trim();return r||`ws://${i}`}function e5(t){return t.querySelector('meta[name="ws-url"]')?.getAttribute("content")??null}function t5(t){const i=e5(t.document);if(i?.trim())return i.trim();const r=new URLSearchParams(t.location.search).get("ws");return W3(r,t.location.host)}function n5(t){const{bridge:i}=t;if(i)return{kind:"desktop",getEndpoint:()=>i.getEndpoint(),signalReady:()=>i.signalReady(),onState:u=>i.onState(u),restartRuntime:()=>i.restartRuntime(),trustQuestion:()=>i.trustQuestion(),answerTrust:u=>i.answerTrust(u),pickFiles:()=>i.pickFiles(),getPathForFile:u=>i.getPathForFile(u),onOpenSettings:u=>i.onOpenSettings(u),openMemoryInEditor:u=>{i.openPath(u)}};const r=t5(t);return{kind:"browser",getEndpoint:async()=>r,signalReady:()=>{},onState:()=>()=>{},onOpenSettings:()=>()=>{}}}function l5(t){const i=t.getElementById("root");if(!i)throw new Error("No #root element");return i}const i5=n5({bridge:window.agentGui,document,location:window.location});w0.createRoot(l5(document)).render(h.jsx(cf.StrictMode,{children:h.jsx(P3,{children:h.jsx("div",{className:"h-screen w-screen overflow-hidden",children:h.jsx(J3,{host:i5})})})}));
|