@robota-sdk/agent-cli 3.0.0-beta.95 → 3.0.0-beta.96
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 +26 -0
- package/dist/node/bin.js +1 -1
- package/dist/node/{cli-core-DJIgDK0t.js → cli-core-5TE9Su2X.js} +326 -326
- package/dist/node/desktop-host.js +1 -1
- package/dist/node/headless.js +1 -1
- package/dist/node/host.js +1 -1
- package/dist/node/index.d.ts +0 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +2 -2
- package/dist/node/index.js.map +1 -1
- package/dist/node/{node-BOLpvRke.js → node-DGWhhU6X.js} +2 -2
- package/dist/node/{node-BOLpvRke.js.map → node-DGWhhU6X.js.map} +1 -1
- package/dist/node/{node-CV7kyP4U.js → node-_t9QegIz.js} +1 -1
- package/dist/node/{product-host-BwV-X6oS.js → product-host-Df14iHe8.js} +351 -351
- package/dist/node/product-host-Df14iHe8.js.map +1 -0
- package/dist/web/app-sandbox.html +145 -0
- package/dist/web/assets/index-TR2EIAJ9.js +314 -0
- package/dist/web/index.html +2 -2
- package/package.json +47 -39
- package/scripts/native-build.mjs +9 -0
- package/dist/node/product-host-BwV-X6oS.js.map +0 -1
- package/dist/web/assets/index-DB915Rm-.js +0 -314
|
@@ -1,314 +0,0 @@
|
|
|
1
|
-
(function(){const i=document.createElement("link").relList;if(i&&i.supports&&i.supports("modulepreload"))return;for(const s of document.querySelectorAll('link[rel="modulepreload"]'))u(s);new MutationObserver(s=>{for(const c of s)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(s){const c={};return s.integrity&&(c.integrity=s.integrity),s.referrerPolicy&&(c.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?c.credentials="include":s.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function u(s){if(s.ep)return;s.ep=!0;const c=r(s);fetch(s.href,c)}})();function qu(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var uc={exports:{}},Fr={};/**
|
|
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 qm;function g0(){if(qm)return Fr;qm=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.fragment");function r(u,s,c){var f=null;if(c!==void 0&&(f=""+c),s.key!==void 0&&(f=""+s.key),"key"in s){c={};for(var p in s)p!=="key"&&(c[p]=s[p])}else c=s;return s=c.ref,{$$typeof:t,type:u,key:f,ref:s!==void 0?s:null,props:c}}return Fr.Fragment=i,Fr.jsx=r,Fr.jsxs=r,Fr}var Bm;function x0(){return Bm||(Bm=1,uc.exports=g0()),uc.exports}var d=x0(),sc={exports:{}},Ce={};/**
|
|
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 Hm;function y0(){if(Hm)return Ce;Hm=1;var t=Symbol.for("react.transitional.element"),i=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),u=Symbol.for("react.strict_mode"),s=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"),y=Symbol.for("react.lazy"),x=Symbol.for("react.activity"),S=Symbol.iterator;function v(A){return A===null||typeof A!="object"?null:(A=S&&A[S]||A["@@iterator"],typeof A=="function"?A:null)}var N={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,L={};function C(A,V,w){this.props=A,this.context=V,this.refs=L,this.updater=w||N}C.prototype.isReactComponent={},C.prototype.setState=function(A,V){if(typeof A!="object"&&typeof A!="function"&&A!=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,A,V,"setState")},C.prototype.forceUpdate=function(A){this.updater.enqueueForceUpdate(this,A,"forceUpdate")};function F(){}F.prototype=C.prototype;function U(A,V,w){this.props=A,this.context=V,this.refs=L,this.updater=w||N}var $=U.prototype=new F;$.constructor=U,_($,C.prototype),$.isPureReactComponent=!0;var ue=Array.isArray;function R(){}var H={H:null,A:null,T:null,S:null},ie=Object.prototype.hasOwnProperty;function ee(A,V,w){var se=w.ref;return{$$typeof:t,type:A,key:V,ref:se!==void 0?se:null,props:w}}function O(A,V){return ee(A.type,V,A.props)}function re(A){return typeof A=="object"&&A!==null&&A.$$typeof===t}function te(A){var V={"=":"=0",":":"=2"};return"$"+A.replace(/[=:]/g,function(w){return V[w]})}var xe=/\/+/g;function oe(A,V){return typeof A=="object"&&A!==null&&A.key!=null?te(""+A.key):V.toString(36)}function P(A){switch(A.status){case"fulfilled":return A.value;case"rejected":throw A.reason;default:switch(typeof A.status=="string"?A.then(R,R):(A.status="pending",A.then(function(V){A.status==="pending"&&(A.status="fulfilled",A.value=V)},function(V){A.status==="pending"&&(A.status="rejected",A.reason=V)})),A.status){case"fulfilled":return A.value;case"rejected":throw A.reason}}throw A}function D(A,V,w,se,fe){var he=typeof A;(he==="undefined"||he==="boolean")&&(A=null);var we=!1;if(A===null)we=!0;else switch(he){case"bigint":case"string":case"number":we=!0;break;case"object":switch(A.$$typeof){case t:case i:we=!0;break;case y:return we=A._init,D(we(A._payload),V,w,se,fe)}}if(we)return fe=fe(A),we=se===""?"."+oe(A,0):se,ue(fe)?(w="",we!=null&&(w=we.replace(xe,"$&/")+"/"),D(fe,V,w,"",function(je){return je})):fe!=null&&(re(fe)&&(fe=O(fe,w+(fe.key==null||A&&A.key===fe.key?"":(""+fe.key).replace(xe,"$&/")+"/")+we)),V.push(fe)),1;we=0;var He=se===""?".":se+":";if(ue(A))for(var W=0;W<A.length;W++)se=A[W],he=He+oe(se,W),we+=D(se,V,w,he,fe);else if(W=v(A),typeof W=="function")for(A=W.call(A),W=0;!(se=A.next()).done;)se=se.value,he=He+oe(se,W++),we+=D(se,V,w,he,fe);else if(he==="object"){if(typeof A.then=="function")return D(P(A),V,w,se,fe);throw V=String(A),Error("Objects are not valid as a React child (found: "+(V==="[object Object]"?"object with keys {"+Object.keys(A).join(", ")+"}":V)+"). If you meant to render a collection of children, use an array instead.")}return we}function Q(A,V,w){if(A==null)return A;var se=[],fe=0;return D(A,se,"","",function(he){return V.call(w,he,fe++)}),se}function ce(A){if(A._status===-1){var V=A._result;V=V(),V.then(function(w){(A._status===0||A._status===-1)&&(A._status=1,A._result=w)},function(w){(A._status===0||A._status===-1)&&(A._status=2,A._result=w)}),A._status===-1&&(A._status=0,A._result=V)}if(A._status===1)return A._result.default;throw A._result}var me=typeof reportError=="function"?reportError:function(A){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var V=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof A=="object"&&A!==null&&typeof A.message=="string"?String(A.message):String(A),error:A});if(!window.dispatchEvent(V))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",A);return}console.error(A)},E={map:Q,forEach:function(A,V,w){Q(A,function(){V.apply(this,arguments)},w)},count:function(A){var V=0;return Q(A,function(){V++}),V},toArray:function(A){return Q(A,function(V){return V})||[]},only:function(A){if(!re(A))throw Error("React.Children.only expected to receive a single React element child.");return A}};return Ce.Activity=x,Ce.Children=E,Ce.Component=C,Ce.Fragment=r,Ce.Profiler=s,Ce.PureComponent=U,Ce.StrictMode=u,Ce.Suspense=g,Ce.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=H,Ce.__COMPILER_RUNTIME={__proto__:null,c:function(A){return H.H.useMemoCache(A)}},Ce.cache=function(A){return function(){return A.apply(null,arguments)}},Ce.cacheSignal=function(){return null},Ce.cloneElement=function(A,V,w){if(A==null)throw Error("The argument must be a React element, but you passed "+A+".");var se=_({},A.props),fe=A.key;if(V!=null)for(he in V.key!==void 0&&(fe=""+V.key),V)!ie.call(V,he)||he==="key"||he==="__self"||he==="__source"||he==="ref"&&V.ref===void 0||(se[he]=V[he]);var he=arguments.length-2;if(he===1)se.children=w;else if(1<he){for(var we=Array(he),He=0;He<he;He++)we[He]=arguments[He+2];se.children=we}return ee(A.type,fe,se)},Ce.createContext=function(A){return A={$$typeof:f,_currentValue:A,_currentValue2:A,_threadCount:0,Provider:null,Consumer:null},A.Provider=A,A.Consumer={$$typeof:c,_context:A},A},Ce.createElement=function(A,V,w){var se,fe={},he=null;if(V!=null)for(se in V.key!==void 0&&(he=""+V.key),V)ie.call(V,se)&&se!=="key"&&se!=="__self"&&se!=="__source"&&(fe[se]=V[se]);var we=arguments.length-2;if(we===1)fe.children=w;else if(1<we){for(var He=Array(we),W=0;W<we;W++)He[W]=arguments[W+2];fe.children=He}if(A&&A.defaultProps)for(se in we=A.defaultProps,we)fe[se]===void 0&&(fe[se]=we[se]);return ee(A,he,fe)},Ce.createRef=function(){return{current:null}},Ce.forwardRef=function(A){return{$$typeof:p,render:A}},Ce.isValidElement=re,Ce.lazy=function(A){return{$$typeof:y,_payload:{_status:-1,_result:A},_init:ce}},Ce.memo=function(A,V){return{$$typeof:m,type:A,compare:V===void 0?null:V}},Ce.startTransition=function(A){var V=H.T,w={};H.T=w;try{var se=A(),fe=H.S;fe!==null&&fe(w,se),typeof se=="object"&&se!==null&&typeof se.then=="function"&&se.then(R,me)}catch(he){me(he)}finally{V!==null&&w.types!==null&&(V.types=w.types),H.T=V}},Ce.unstable_useCacheRefresh=function(){return H.H.useCacheRefresh()},Ce.use=function(A){return H.H.use(A)},Ce.useActionState=function(A,V,w){return H.H.useActionState(A,V,w)},Ce.useCallback=function(A,V){return H.H.useCallback(A,V)},Ce.useContext=function(A){return H.H.useContext(A)},Ce.useDebugValue=function(){},Ce.useDeferredValue=function(A,V){return H.H.useDeferredValue(A,V)},Ce.useEffect=function(A,V){return H.H.useEffect(A,V)},Ce.useEffectEvent=function(A){return H.H.useEffectEvent(A)},Ce.useId=function(){return H.H.useId()},Ce.useImperativeHandle=function(A,V,w){return H.H.useImperativeHandle(A,V,w)},Ce.useInsertionEffect=function(A,V){return H.H.useInsertionEffect(A,V)},Ce.useLayoutEffect=function(A,V){return H.H.useLayoutEffect(A,V)},Ce.useMemo=function(A,V){return H.H.useMemo(A,V)},Ce.useOptimistic=function(A,V){return H.H.useOptimistic(A,V)},Ce.useReducer=function(A,V,w){return H.H.useReducer(A,V,w)},Ce.useRef=function(A){return H.H.useRef(A)},Ce.useState=function(A){return H.H.useState(A)},Ce.useSyncExternalStore=function(A,V,w){return H.H.useSyncExternalStore(A,V,w)},Ce.useTransition=function(){return H.H.useTransition()},Ce.version="19.2.8",Ce}var Im;function hf(){return Im||(Im=1,sc.exports=y0()),sc.exports}var j=hf();const pf=qu(j);var oc={exports:{}},Xr={},cc={exports:{}},fc={};/**
|
|
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 Ym;function b0(){return Ym||(Ym=1,(function(t){function i(D,Q){var ce=D.length;D.push(Q);e:for(;0<ce;){var me=ce-1>>>1,E=D[me];if(0<s(E,Q))D[me]=Q,D[ce]=E,ce=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],ce=D.pop();if(ce!==Q){D[0]=ce;e:for(var me=0,E=D.length,A=E>>>1;me<A;){var V=2*(me+1)-1,w=D[V],se=V+1,fe=D[se];if(0>s(w,ce))se<E&&0>s(fe,w)?(D[me]=fe,D[se]=ce,me=se):(D[me]=w,D[V]=ce,me=V);else if(se<E&&0>s(fe,ce))D[me]=fe,D[se]=ce,me=se;else break e}}return Q}function s(D,Q){var ce=D.sortIndex-Q.sortIndex;return ce!==0?ce: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=[],y=1,x=null,S=3,v=!1,N=!1,_=!1,L=!1,C=typeof setTimeout=="function"?setTimeout:null,F=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate<"u"?setImmediate:null;function $(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 ue(D){if(_=!1,$(D),!N)if(r(g)!==null)N=!0,R||(R=!0,te());else{var Q=r(m);Q!==null&&P(ue,Q.startTime-D)}}var R=!1,H=-1,ie=5,ee=-1;function O(){return L?!0:!(t.unstable_now()-ee<ie)}function re(){if(L=!1,R){var D=t.unstable_now();ee=D;var Q=!0;try{e:{N=!1,_&&(_=!1,F(H),H=-1),v=!0;var ce=S;try{t:{for($(D),x=r(g);x!==null&&!(x.expirationTime>D&&O());){var me=x.callback;if(typeof me=="function"){x.callback=null,S=x.priorityLevel;var E=me(x.expirationTime<=D);if(D=t.unstable_now(),typeof E=="function"){x.callback=E,$(D),Q=!0;break t}x===r(g)&&u(g),$(D)}else u(g);x=r(g)}if(x!==null)Q=!0;else{var A=r(m);A!==null&&P(ue,A.startTime-D),Q=!1}}break e}finally{x=null,S=ce,v=!1}Q=void 0}}finally{Q?te():R=!1}}}var te;if(typeof U=="function")te=function(){U(re)};else if(typeof MessageChannel<"u"){var xe=new MessageChannel,oe=xe.port2;xe.port1.onmessage=re,te=function(){oe.postMessage(null)}}else te=function(){C(re,0)};function P(D,Q){H=C(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"):ie=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 ce=S;S=Q;try{return D()}finally{S=ce}},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 ce=S;S=D;try{return Q()}finally{S=ce}},t.unstable_scheduleCallback=function(D,Q,ce){var me=t.unstable_now();switch(typeof ce=="object"&&ce!==null?(ce=ce.delay,ce=typeof ce=="number"&&0<ce?me+ce:me):ce=me,D){case 1:var E=-1;break;case 2:E=250;break;case 5:E=1073741823;break;case 4:E=1e4;break;default:E=5e3}return E=ce+E,D={id:y++,callback:Q,priorityLevel:D,startTime:ce,expirationTime:E,sortIndex:-1},ce>me?(D.sortIndex=ce,i(m,D),r(g)===null&&D===r(m)&&(_?(F(H),H=-1):_=!0,P(ue,ce-me))):(D.sortIndex=E,i(g,D),N||v||(N=!0,R||(R=!0,te()))),D},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(D){var Q=S;return function(){var ce=S;S=Q;try{return D.apply(this,arguments)}finally{S=ce}}}})(fc)),fc}var Gm;function v0(){return Gm||(Gm=1,cc.exports=b0()),cc.exports}var dc={exports:{}},Rt={};/**
|
|
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 Vm;function S0(){if(Vm)return Rt;Vm=1;var t=hf();function i(g){var m="https://react.dev/errors/"+g;if(1<arguments.length){m+="?args[]="+encodeURIComponent(arguments[1]);for(var y=2;y<arguments.length;y++)m+="&args[]="+encodeURIComponent(arguments[y])}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},s=Symbol.for("react.portal");function c(g,m,y){var x=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:s,key:x==null?null:""+x,children:g,containerInfo:m,implementation:y}}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 Rt.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=u,Rt.createPortal=function(g,m){var y=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,y)},Rt.flushSync=function(g){var m=f.T,y=u.p;try{if(f.T=null,u.p=2,g)return g()}finally{f.T=m,u.p=y,u.d.f()}},Rt.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))},Rt.prefetchDNS=function(g){typeof g=="string"&&u.d.D(g)},Rt.preinit=function(g,m){if(typeof g=="string"&&m&&typeof m.as=="string"){var y=m.as,x=p(y,m.crossOrigin),S=typeof m.integrity=="string"?m.integrity:void 0,v=typeof m.fetchPriority=="string"?m.fetchPriority:void 0;y==="style"?u.d.S(g,typeof m.precedence=="string"?m.precedence:void 0,{crossOrigin:x,integrity:S,fetchPriority:v}):y==="script"&&u.d.X(g,{crossOrigin:x,integrity:S,fetchPriority:v,nonce:typeof m.nonce=="string"?m.nonce:void 0})}},Rt.preinitModule=function(g,m){if(typeof g=="string")if(typeof m=="object"&&m!==null){if(m.as==null||m.as==="script"){var y=p(m.as,m.crossOrigin);u.d.M(g,{crossOrigin:y,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)},Rt.preload=function(g,m){if(typeof g=="string"&&typeof m=="object"&&m!==null&&typeof m.as=="string"){var y=m.as,x=p(y,m.crossOrigin);u.d.L(g,y,{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})}},Rt.preloadModule=function(g,m){if(typeof g=="string")if(m){var y=p(m.as,m.crossOrigin);u.d.m(g,{as:typeof m.as=="string"&&m.as!=="script"?m.as:void 0,crossOrigin:y,integrity:typeof m.integrity=="string"?m.integrity:void 0})}else u.d.m(g)},Rt.requestFormReset=function(g){u.d.r(g)},Rt.unstable_batchedUpdates=function(g,m){return g(m)},Rt.useFormState=function(g,m,y){return f.H.useFormState(g,m,y)},Rt.useFormStatus=function(){return f.H.useHostTransitionStatus()},Rt.version="19.2.8",Rt}var Fm;function k0(){if(Fm)return dc.exports;Fm=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(),dc.exports=S0(),dc.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 Xm;function w0(){if(Xm)return Xr;Xm=1;var t=v0(),i=hf(),r=k0();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 s(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 o=l.return;if(o===null)break;var h=o.alternate;if(h===null){if(a=o.return,a!==null){l=a;continue}break}if(o.child===h.child){for(h=o.child;h;){if(h===l)return g(o),e;if(h===a)return g(o),n;h=h.sibling}throw Error(u(188))}if(l.return!==a.return)l=o,a=h;else{for(var b=!1,k=o.child;k;){if(k===l){b=!0,l=o,a=h;break}if(k===a){b=!0,a=o,l=h;break}k=k.sibling}if(!b){for(k=h.child;k;){if(k===l){b=!0,l=h,a=o;break}if(k===a){b=!0,a=h,l=o;break}k=k.sibling}if(!b)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 y(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e;for(e=e.child;e!==null;){if(n=y(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"),_=Symbol.for("react.fragment"),L=Symbol.for("react.strict_mode"),C=Symbol.for("react.profiler"),F=Symbol.for("react.consumer"),U=Symbol.for("react.context"),$=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),R=Symbol.for("react.suspense_list"),H=Symbol.for("react.memo"),ie=Symbol.for("react.lazy"),ee=Symbol.for("react.activity"),O=Symbol.for("react.memo_cache_sentinel"),re=Symbol.iterator;function te(e){return e===null||typeof e!="object"?null:(e=re&&e[re]||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 _:return"Fragment";case C:return"Profiler";case L:return"StrictMode";case ue:return"Suspense";case R:return"SuspenseList";case ee:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case N:return"Portal";case U:return e.displayName||"Context";case F:return(e._context.displayName||"Context")+".Consumer";case $:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case H:return n=e.displayName||null,n!==null?n:oe(e.type)||"Memo";case ie: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,ce={pending:!1,data:null,method:null,action:null},me=[],E=-1;function A(e){return{current:e}}function V(e){0>E||(e.current=me[E],me[E]=null,E--)}function w(e,n){E++,me[E]=e.current,e.current=n}var se=A(null),fe=A(null),he=A(null),we=A(null);function He(e,n){switch(w(he,n),w(fe,e),w(se,null),n.nodeType){case 9:case 11:e=(e=n.documentElement)&&(e=e.namespaceURI)?um(e):0;break;default:if(e=n.tagName,n=n.namespaceURI)n=um(n),e=sm(n,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}V(se),w(se,e)}function W(){V(se),V(fe),V(he)}function je(e){e.memoizedState!==null&&w(we,e);var n=se.current,l=sm(n,e.type);n!==l&&(w(fe,e),w(se,l))}function Qe(e){fe.current===e&&(V(se),V(fe)),we.current===e&&(V(we),Ir._currentValue=ce)}var qt,Nn;function At(e){if(qt===void 0)try{throw Error()}catch(l){var n=l.stack.trim().match(/\n( *(at )?)/);qt=n&&n[1]||"",Nn=-1<l.stack.indexOf(`
|
|
42
|
-
at`)?" (<anonymous>)":-1<l.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
43
|
-
`+qt+e+Nn}var ln=!1;function Cn(e,n){if(!e||ln)return"";ln=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var a={DetermineComponentFrameRoot:function(){try{if(n){var K=function(){throw Error()};if(Object.defineProperty(K.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(K,[])}catch(Y){var I=Y}Reflect.construct(e,[],K)}else{try{K.call()}catch(Y){I=Y}e.call(K.prototype)}}else{try{throw Error()}catch(Y){I=Y}(K=e())&&typeof K.catch=="function"&&K.catch(function(){})}}catch(Y){if(Y&&I&&typeof Y.stack=="string")return[Y.stack,I.stack]}return[null,null]}};a.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var o=Object.getOwnPropertyDescriptor(a.DetermineComponentFrameRoot,"name");o&&o.configurable&&Object.defineProperty(a.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=a.DetermineComponentFrameRoot(),b=h[0],k=h[1];if(b&&k){var T=b.split(`
|
|
44
|
-
`),B=k.split(`
|
|
45
|
-
`);for(o=a=0;a<T.length&&!T[a].includes("DetermineComponentFrameRoot");)a++;for(;o<B.length&&!B[o].includes("DetermineComponentFrameRoot");)o++;if(a===T.length||o===B.length)for(a=T.length-1,o=B.length-1;1<=a&&0<=o&&T[a]!==B[o];)o--;for(;1<=a&&0<=o;a--,o--)if(T[a]!==B[o]){if(a!==1||o!==1)do if(a--,o--,0>o||T[a]!==B[o]){var X=`
|
|
46
|
-
`+T[a].replace(" at new "," at ");return e.displayName&&X.includes("<anonymous>")&&(X=X.replace("<anonymous>",e.displayName)),X}while(1<=a&&0<=o);break}}}finally{ln=!1,Error.prepareStackTrace=l}return(l=e?e.displayName||e.name:"")?At(l):""}function Un(e,n){switch(e.tag){case 26:case 27:case 5:return At(e.type);case 16:return At("Lazy");case 13:return e.child!==n&&n!==null?At("Suspense Fallback"):At("Suspense");case 19:return At("SuspenseList");case 0:case 15:return Cn(e.type,!1);case 11:return Cn(e.type.render,!1);case 1:return Cn(e.type,!0);case 31:return At("Activity");default:return""}}function ul(e){try{var n="",l=null;do n+=Un(e,l),l=e,e=e.return;while(e);return n}catch(a){return`
|
|
47
|
-
Error generating stack: `+a.message+`
|
|
48
|
-
`+a.stack}}var rn=Object.prototype.hasOwnProperty,En=t.unstable_scheduleCallback,_n=t.unstable_cancelCallback,ne=t.unstable_shouldYield,Ye=t.unstable_requestPaint,Ue=t.unstable_now,an=t.unstable_getCurrentPriorityLevel,G=t.unstable_ImmediatePriority,ae=t.unstable_UserBlockingPriority,ye=t.unstable_NormalPriority,_e=t.unstable_LowPriority,Ge=t.unstable_IdlePriority,zt=t.log,un=t.unstable_setDisableYieldValue,St=null,ut=null;function kt(e){if(typeof zt=="function"&&un(e),ut&&typeof ut.setStrictMode=="function")try{ut.setStrictMode(St,e)}catch{}}var Ze=Math.clz32?Math.clz32:Qu,bn=Math.log,Dt=Math.LN2;function Qu(e){return e>>>=0,e===0?32:31-(bn(e)/Dt|0)|0}var Ll=256,ui=262144,si=4194304;function qn(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 J(e,n,l){var a=e.pendingLanes;if(a===0)return 0;var o=0,h=e.suspendedLanes,b=e.pingedLanes;e=e.warmLanes;var k=a&134217727;return k!==0?(a=k&~h,a!==0?o=qn(a):(b&=k,b!==0?o=qn(b):l||(l=k&~e,l!==0&&(o=qn(l))))):(k=a&~h,k!==0?o=qn(k):b!==0?o=qn(b):l||(l=a&~e,l!==0&&(o=qn(l)))),o===0?0:n!==0&&n!==o&&(n&h)===0&&(h=o&-o,l=n&-n,h>=l||h===32&&(l&4194048)!==0)?n:o}function de(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 st(){var e=si;return si<<=1,(si&62914560)===0&&(si=4194304),e}function Tn(e){for(var n=[],l=0;31>l;l++)n.push(e);return n}function tr(e,n){e.pendingLanes|=n,n!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function i1(e,n,l,a,o,h){var b=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,T=e.expirationTimes,B=e.hiddenUpdates;for(l=b&~l;0<l;){var X=31-Ze(l),K=1<<X;k[X]=0,T[X]=-1;var I=B[X];if(I!==null)for(B[X]=null,X=0;X<I.length;X++){var Y=I[X];Y!==null&&(Y.lane&=-536870913)}l&=~K}a!==0&&Gf(e,a,0),h!==0&&o===0&&e.tag!==0&&(e.suspendedLanes|=h&~(b&~n))}function Gf(e,n,l){e.pendingLanes|=n,e.suspendedLanes&=~n;var a=31-Ze(n);e.entangledLanes|=n,e.entanglements[a]=e.entanglements[a]|1073741824|l&261930}function Vf(e,n){var l=e.entangledLanes|=n;for(e=e.entanglements;l;){var a=31-Ze(l),o=1<<a;o&n|e[a]&n&&(e[a]|=n),l&=~o}}function Ff(e,n){var l=n&-n;return l=(l&42)!==0?1:Zu(l),(l&(e.suspendedLanes|n))!==0?0:l}function Zu(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 Ku(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Xf(){var e=Q.p;return e!==0?e:(e=window.event,e===void 0?32:zm(e.type))}function $f(e,n){var l=Q.p;try{return Q.p=e,n()}finally{Q.p=l}}var sl=Math.random().toString(36).slice(2),Nt="__reactFiber$"+sl,Bt="__reactProps$"+sl,oi="__reactContainer$"+sl,Ju="__reactEvents$"+sl,r1="__reactListeners$"+sl,a1="__reactHandles$"+sl,Qf="__reactResources$"+sl,nr="__reactMarker$"+sl;function Pu(e){delete e[Nt],delete e[Bt],delete e[Ju],delete e[r1],delete e[a1]}function ci(e){var n=e[Nt];if(n)return n;for(var l=e.parentNode;l;){if(n=l[oi]||l[Nt]){if(l=n.alternate,n.child!==null||l!==null&&l.child!==null)for(e=mm(e);e!==null;){if(l=e[Nt])return l;e=mm(e)}return n}e=l,l=e.parentNode}return null}function fi(e){if(e=e[Nt]||e[oi]){var n=e.tag;if(n===5||n===6||n===13||n===31||n===26||n===27||n===3)return e}return null}function lr(e){var n=e.tag;if(n===5||n===26||n===27||n===6)return e.stateNode;throw Error(u(33))}function di(e){var n=e[Qf];return n||(n=e[Qf]={hoistableStyles:new Map,hoistableScripts:new Map}),n}function wt(e){e[nr]=!0}var Zf=new Set,Kf={};function Ul(e,n){hi(e,n),hi(e+"Capture",n)}function hi(e,n){for(Kf[e]=n,e=0;e<n.length;e++)Zf.add(n[e])}var u1=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]*$"),Jf={},Pf={};function s1(e){return rn.call(Pf,e)?!0:rn.call(Jf,e)?!1:u1.test(e)?Pf[e]=!0:(Jf[e]=!0,!1)}function oa(e,n,l){if(s1(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 ca(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 Bn(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 Wf(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function o1(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 o=a.get,h=a.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return o.call(this)},set:function(b){l=""+b,h.call(this,b)}}),Object.defineProperty(e,n,{enumerable:a.enumerable}),{getValue:function(){return l},setValue:function(b){l=""+b},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Wu(e){if(!e._valueTracker){var n=Wf(e)?"checked":"value";e._valueTracker=o1(e,n,""+e[n])}}function ed(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var l=n.getValue(),a="";return e&&(a=Wf(e)?e.checked?"true":"false":e.value),e=a,e!==l?(n.setValue(e),!0):!1}function fa(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 c1=/[\n"\\]/g;function on(e){return e.replace(c1,function(n){return"\\"+n.charCodeAt(0).toString(16)+" "})}function es(e,n,l,a,o,h,b,k){e.name="",b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"?e.type=b:e.removeAttribute("type"),n!=null?b==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+sn(n)):e.value!==""+sn(n)&&(e.value=""+sn(n)):b!=="submit"&&b!=="reset"||e.removeAttribute("value"),n!=null?ts(e,b,sn(n)):l!=null?ts(e,b,sn(l)):a!=null&&e.removeAttribute("value"),o==null&&h!=null&&(e.defaultChecked=!!h),o!=null&&(e.checked=o&&typeof o!="function"&&typeof o!="symbol"),k!=null&&typeof k!="function"&&typeof k!="symbol"&&typeof k!="boolean"?e.name=""+sn(k):e.removeAttribute("name")}function td(e,n,l,a,o,h,b,k){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),n!=null||l!=null){if(!(h!=="submit"&&h!=="reset"||n!=null)){Wu(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??o,a=typeof a!="function"&&typeof a!="symbol"&&!!a,e.checked=k?e.checked:!!a,e.defaultChecked=!!a,b!=null&&typeof b!="function"&&typeof b!="symbol"&&typeof b!="boolean"&&(e.name=b),Wu(e)}function ts(e,n,l){n==="number"&&fa(e.ownerDocument)===e||e.defaultValue===""+l||(e.defaultValue=""+l)}function pi(e,n,l,a){if(e=e.options,n){n={};for(var o=0;o<l.length;o++)n["$"+l[o]]=!0;for(l=0;l<e.length;l++)o=n.hasOwnProperty("$"+e[l].value),e[l].selected!==o&&(e[l].selected=o),o&&a&&(e[l].defaultSelected=!0)}else{for(l=""+sn(l),n=null,o=0;o<e.length;o++){if(e[o].value===l){e[o].selected=!0,a&&(e[o].defaultSelected=!0);return}n!==null||e[o].disabled||(n=e[o])}n!==null&&(n.selected=!0)}}function nd(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 ld(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),Wu(e)}function mi(e,n){if(n){var l=e.firstChild;if(l&&l===e.lastChild&&l.nodeType===3){l.nodeValue=n;return}}e.textContent=n}var f1=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 id(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||f1.has(n)?n==="float"?e.cssFloat=l:e[n]=(""+l).trim():e[n]=l+"px"}function rd(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 o in n)a=n[o],n.hasOwnProperty(o)&&l[o]!==a&&id(e,o,a)}else for(var h in n)n.hasOwnProperty(h)&&id(e,h,n[h])}function ns(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 d1=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"]]),h1=/^[\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 da(e){return h1.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Hn(){}var ls=null;function is(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var gi=null,xi=null;function ad(e){var n=fi(e);if(n&&(e=n.stateNode)){var l=e[Bt]||null;e:switch(e=n.stateNode,n.type){case"input":if(es(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 o=a[Bt]||null;if(!o)throw Error(u(90));es(a,o.value,o.defaultValue,o.defaultValue,o.checked,o.defaultChecked,o.type,o.name)}}for(n=0;n<l.length;n++)a=l[n],a.form===e.form&&ed(a)}break e;case"textarea":nd(e,l.value,l.defaultValue);break e;case"select":n=l.value,n!=null&&pi(e,!!l.multiple,n,!1)}}}var rs=!1;function ud(e,n,l){if(rs)return e(n,l);rs=!0;try{var a=e(n);return a}finally{if(rs=!1,(gi!==null||xi!==null)&&(Wa(),gi&&(n=gi,e=xi,xi=gi=null,ad(n),e)))for(n=0;n<e.length;n++)ad(e[n])}}function ir(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 In=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),as=!1;if(In)try{var rr={};Object.defineProperty(rr,"passive",{get:function(){as=!0}}),window.addEventListener("test",rr,rr),window.removeEventListener("test",rr,rr)}catch{as=!1}var ol=null,us=null,ha=null;function sd(){if(ha)return ha;var e,n=us,l=n.length,a,o="value"in ol?ol.value:ol.textContent,h=o.length;for(e=0;e<l&&n[e]===o[e];e++);var b=l-e;for(a=1;a<=b&&n[l-a]===o[h-a];a++);return ha=o.slice(e,1<a?1-a:void 0)}function pa(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 ma(){return!0}function od(){return!1}function Ht(e){function n(l,a,o,h,b){this._reactName=l,this._targetInst=o,this.type=a,this.nativeEvent=h,this.target=b,this.currentTarget=null;for(var k in e)e.hasOwnProperty(k)&&(l=e[k],this[k]=l?l(h):h[k]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?ma:od,this.isPropagationStopped=od,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=ma)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=ma)},persist:function(){},isPersistent:ma}),n}var ql={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},ga=Ht(ql),ar=x({},ql,{view:0,detail:0}),p1=Ht(ar),ss,os,ur,xa=x({},ar,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:fs,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!==ur&&(ur&&e.type==="mousemove"?(ss=e.screenX-ur.screenX,os=e.screenY-ur.screenY):os=ss=0,ur=e),ss)},movementY:function(e){return"movementY"in e?e.movementY:os}}),cd=Ht(xa),m1=x({},xa,{dataTransfer:0}),g1=Ht(m1),x1=x({},ar,{relatedTarget:0}),cs=Ht(x1),y1=x({},ql,{animationName:0,elapsedTime:0,pseudoElement:0}),b1=Ht(y1),v1=x({},ql,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),S1=Ht(v1),k1=x({},ql,{data:0}),fd=Ht(k1),w1={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},j1={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"},N1={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function C1(e){var n=this.nativeEvent;return n.getModifierState?n.getModifierState(e):(e=N1[e])?!!n[e]:!1}function fs(){return C1}var E1=x({},ar,{key:function(e){if(e.key){var n=w1[e.key]||e.key;if(n!=="Unidentified")return n}return e.type==="keypress"?(e=pa(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?j1[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:fs,charCode:function(e){return e.type==="keypress"?pa(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?pa(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),_1=Ht(E1),T1=x({},xa,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),dd=Ht(T1),A1=x({},ar,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:fs}),z1=Ht(A1),D1=x({},ql,{propertyName:0,elapsedTime:0,pseudoElement:0}),R1=Ht(D1),M1=x({},xa,{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}),O1=Ht(M1),L1=x({},ql,{newState:0,oldState:0}),U1=Ht(L1),q1=[9,13,27,32],ds=In&&"CompositionEvent"in window,sr=null;In&&"documentMode"in document&&(sr=document.documentMode);var B1=In&&"TextEvent"in window&&!sr,hd=In&&(!ds||sr&&8<sr&&11>=sr),pd=" ",md=!1;function gd(e,n){switch(e){case"keyup":return q1.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function xd(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var yi=!1;function H1(e,n){switch(e){case"compositionend":return xd(n);case"keypress":return n.which!==32?null:(md=!0,pd);case"textInput":return e=n.data,e===pd&&md?null:e;default:return null}}function I1(e,n){if(yi)return e==="compositionend"||!ds&&gd(e,n)?(e=sd(),ha=us=ol=null,yi=!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 hd&&n.locale!=="ko"?null:n.data;default:return null}}var Y1={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 yd(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n==="input"?!!Y1[e.type]:n==="textarea"}function bd(e,n,l,a){gi?xi?xi.push(a):xi=[a]:gi=a,n=au(n,"onChange"),0<n.length&&(l=new ga("onChange","change",null,l,a),e.push({event:l,listeners:n}))}var or=null,cr=null;function G1(e){tm(e,0)}function ya(e){var n=lr(e);if(ed(n))return e}function vd(e,n){if(e==="change")return n}var Sd=!1;if(In){var hs;if(In){var ps="oninput"in document;if(!ps){var kd=document.createElement("div");kd.setAttribute("oninput","return;"),ps=typeof kd.oninput=="function"}hs=ps}else hs=!1;Sd=hs&&(!document.documentMode||9<document.documentMode)}function wd(){or&&(or.detachEvent("onpropertychange",jd),cr=or=null)}function jd(e){if(e.propertyName==="value"&&ya(cr)){var n=[];bd(n,cr,e,is(e)),ud(G1,n)}}function V1(e,n,l){e==="focusin"?(wd(),or=n,cr=l,or.attachEvent("onpropertychange",jd)):e==="focusout"&&wd()}function F1(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return ya(cr)}function X1(e,n){if(e==="click")return ya(n)}function $1(e,n){if(e==="input"||e==="change")return ya(n)}function Q1(e,n){return e===n&&(e!==0||1/e===1/n)||e!==e&&n!==n}var Qt=typeof Object.is=="function"?Object.is:Q1;function fr(e,n){if(Qt(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 o=l[a];if(!rn.call(n,o)||!Qt(e[o],n[o]))return!1}return!0}function Nd(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Cd(e,n){var l=Nd(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=Nd(l)}}function Ed(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?Ed(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function _d(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var n=fa(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=fa(e.document)}return n}function ms(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 Z1=In&&"documentMode"in document&&11>=document.documentMode,bi=null,gs=null,dr=null,xs=!1;function Td(e,n,l){var a=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xs||bi==null||bi!==fa(a)||(a=bi,"selectionStart"in a&&ms(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}),dr&&fr(dr,a)||(dr=a,a=au(gs,"onSelect"),0<a.length&&(n=new ga("onSelect","select",null,n,l),e.push({event:n,listeners:a}),n.target=bi)))}function Bl(e,n){var l={};return l[e.toLowerCase()]=n.toLowerCase(),l["Webkit"+e]="webkit"+n,l["Moz"+e]="moz"+n,l}var vi={animationend:Bl("Animation","AnimationEnd"),animationiteration:Bl("Animation","AnimationIteration"),animationstart:Bl("Animation","AnimationStart"),transitionrun:Bl("Transition","TransitionRun"),transitionstart:Bl("Transition","TransitionStart"),transitioncancel:Bl("Transition","TransitionCancel"),transitionend:Bl("Transition","TransitionEnd")},ys={},Ad={};In&&(Ad=document.createElement("div").style,"AnimationEvent"in window||(delete vi.animationend.animation,delete vi.animationiteration.animation,delete vi.animationstart.animation),"TransitionEvent"in window||delete vi.transitionend.transition);function Hl(e){if(ys[e])return ys[e];if(!vi[e])return e;var n=vi[e],l;for(l in n)if(n.hasOwnProperty(l)&&l in Ad)return ys[e]=n[l];return e}var zd=Hl("animationend"),Dd=Hl("animationiteration"),Rd=Hl("animationstart"),K1=Hl("transitionrun"),J1=Hl("transitionstart"),P1=Hl("transitioncancel"),Md=Hl("transitionend"),Od=new Map,bs="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(" ");bs.push("scrollEnd");function vn(e,n){Od.set(e,n),Ul(n,[e])}var ba=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=[],Si=0,vs=0;function va(){for(var e=Si,n=vs=Si=0;n<e;){var l=cn[n];cn[n++]=null;var a=cn[n];cn[n++]=null;var o=cn[n];cn[n++]=null;var h=cn[n];if(cn[n++]=null,a!==null&&o!==null){var b=a.pending;b===null?o.next=o:(o.next=b.next,b.next=o),a.pending=o}h!==0&&Ld(l,o,h)}}function Sa(e,n,l,a){cn[Si++]=e,cn[Si++]=n,cn[Si++]=l,cn[Si++]=a,vs|=a,e.lanes|=a,e=e.alternate,e!==null&&(e.lanes|=a)}function Ss(e,n,l,a){return Sa(e,n,l,a),ka(e)}function Il(e,n){return Sa(e,null,null,n),ka(e)}function Ld(e,n,l){e.lanes|=l;var a=e.alternate;a!==null&&(a.lanes|=l);for(var o=!1,h=e.return;h!==null;)h.childLanes|=l,a=h.alternate,a!==null&&(a.childLanes|=l),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(o=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,o&&n!==null&&(o=31-Ze(l),e=h.hiddenUpdates,a=e[o],a===null?e[o]=[n]:a.push(n),n.lane=l|536870912),h):null}function ka(e){if(50<Mr)throw Mr=0,zo=null,Error(u(185));for(var n=e.return;n!==null;)e=n,n=e.return;return e.tag===3?e.stateNode:null}var ki={};function W1(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 W1(e,n,l,a)}function ks(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Yn(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 Ud(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 wa(e,n,l,a,o,h){var b=0;if(a=e,typeof e=="function")ks(e)&&(b=1);else if(typeof e=="string")b=i0(e,l,se.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case ee:return e=Zt(31,l,n,o),e.elementType=ee,e.lanes=h,e;case _:return Yl(l.children,o,h,n);case L:b=8,o|=24;break;case C:return e=Zt(12,l,n,o|2),e.elementType=C,e.lanes=h,e;case ue:return e=Zt(13,l,n,o),e.elementType=ue,e.lanes=h,e;case R:return e=Zt(19,l,n,o),e.elementType=R,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case U:b=10;break e;case F:b=9;break e;case $:b=11;break e;case H:b=14;break e;case ie:b=16,a=null;break e}b=29,l=Error(u(130,e===null?"null":typeof e,"")),a=null}return n=Zt(b,l,n,o),n.elementType=e,n.type=a,n.lanes=h,n}function Yl(e,n,l,a){return e=Zt(7,e,a,n),e.lanes=l,e}function ws(e,n,l){return e=Zt(6,e,null,n),e.lanes=l,e}function qd(e){var n=Zt(18,null,null,0);return n.stateNode=e,n}function js(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 Bd=new WeakMap;function fn(e,n){if(typeof e=="object"&&e!==null){var l=Bd.get(e);return l!==void 0?l:(n={value:e,source:n,stack:ul(n)},Bd.set(e,n),n)}return{value:e,source:n,stack:ul(n)}}var wi=[],ji=0,ja=null,hr=0,dn=[],hn=0,cl=null,An=1,zn="";function Gn(e,n){wi[ji++]=hr,wi[ji++]=ja,ja=e,hr=n}function Hd(e,n,l){dn[hn++]=An,dn[hn++]=zn,dn[hn++]=cl,cl=e;var a=An;e=zn;var o=32-Ze(a)-1;a&=~(1<<o),l+=1;var h=32-Ze(n)+o;if(30<h){var b=o-o%5;h=(a&(1<<b)-1).toString(32),a>>=b,o-=b,An=1<<32-Ze(n)+o|l<<o|a,zn=h+e}else An=1<<h|l<<o|a,zn=e}function Ns(e){e.return!==null&&(Gn(e,1),Hd(e,1,0))}function Cs(e){for(;e===ja;)ja=wi[--ji],wi[ji]=null,hr=wi[--ji],wi[ji]=null;for(;e===cl;)cl=dn[--hn],dn[hn]=null,zn=dn[--hn],dn[hn]=null,An=dn[--hn],dn[hn]=null}function Id(e,n){dn[hn++]=An,dn[hn++]=zn,dn[hn++]=cl,An=n.id,zn=n.overflow,cl=e}var Ct=null,it=null,qe=!1,fl=null,pn=!1,Es=Error(u(519));function dl(e){var n=Error(u(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw pr(fn(n,e)),Es}function Yd(e){var n=e.stateNode,l=e.type,a=e.memoizedProps;switch(n[Nt]=e,n[Bt]=a,l){case"dialog":Re("cancel",n),Re("close",n);break;case"iframe":case"object":case"embed":Re("load",n);break;case"video":case"audio":for(l=0;l<Lr.length;l++)Re(Lr[l],n);break;case"source":Re("error",n);break;case"img":case"image":case"link":Re("error",n),Re("load",n);break;case"details":Re("toggle",n);break;case"input":Re("invalid",n),td(n,a.value,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name,!0);break;case"select":Re("invalid",n);break;case"textarea":Re("invalid",n),ld(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||rm(n.textContent,l)?(a.popover!=null&&(Re("beforetoggle",n),Re("toggle",n)),a.onScroll!=null&&Re("scroll",n),a.onScrollEnd!=null&&Re("scrollend",n),a.onClick!=null&&(n.onclick=Hn),n=!0):n=!1,n||dl(e,!0)}function Gd(e){for(Ct=e.return;Ct;)switch(Ct.tag){case 5:case 31:case 13:pn=!1;return;case 27:case 3:pn=!0;return;default:Ct=Ct.return}}function Ni(e){if(e!==Ct)return!1;if(!qe)return Gd(e),qe=!0,!1;var n=e.tag,l;if((l=n!==3&&n!==27)&&((l=n===5)&&(l=e.type,l=!(l!=="form"&&l!=="button")||Xo(e.type,e.memoizedProps)),l=!l),l&&it&&dl(e),Gd(e),n===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));it=pm(e)}else if(n===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(u(317));it=pm(e)}else n===27?(n=it,Cl(e.type)?(e=Jo,Jo=null,it=e):it=n):it=Ct?gn(e.stateNode.nextSibling):null;return!0}function Gl(){it=Ct=null,qe=!1}function _s(){var e=fl;return e!==null&&(Vt===null?Vt=e:Vt.push.apply(Vt,e),fl=null),e}function pr(e){fl===null?fl=[e]:fl.push(e)}var Ts=A(null),Vl=null,Vn=null;function hl(e,n,l){w(Ts,n._currentValue),n._currentValue=l}function Fn(e){e._currentValue=Ts.current,V(Ts)}function As(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 zs(e,n,l,a){var o=e.child;for(o!==null&&(o.return=e);o!==null;){var h=o.dependencies;if(h!==null){var b=o.child;h=h.firstContext;e:for(;h!==null;){var k=h;h=o;for(var T=0;T<n.length;T++)if(k.context===n[T]){h.lanes|=l,k=h.alternate,k!==null&&(k.lanes|=l),As(h.return,l,e),a||(b=null);break e}h=k.next}}else if(o.tag===18){if(b=o.return,b===null)throw Error(u(341));b.lanes|=l,h=b.alternate,h!==null&&(h.lanes|=l),As(b,l,e),b=null}else b=o.child;if(b!==null)b.return=o;else for(b=o;b!==null;){if(b===e){b=null;break}if(o=b.sibling,o!==null){o.return=b.return,b=o;break}b=b.return}o=b}}function Ci(e,n,l,a){e=null;for(var o=n,h=!1;o!==null;){if(!h){if((o.flags&524288)!==0)h=!0;else if((o.flags&262144)!==0)break}if(o.tag===10){var b=o.alternate;if(b===null)throw Error(u(387));if(b=b.memoizedProps,b!==null){var k=o.type;Qt(o.pendingProps.value,b.value)||(e!==null?e.push(k):e=[k])}}else if(o===we.current){if(b=o.alternate,b===null)throw Error(u(387));b.memoizedState.memoizedState!==o.memoizedState.memoizedState&&(e!==null?e.push(Ir):e=[Ir])}o=o.return}e!==null&&zs(n,e,l,a),n.flags|=262144}function Na(e){for(e=e.firstContext;e!==null;){if(!Qt(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Fl(e){Vl=e,Vn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Et(e){return Vd(Vl,e)}function Ca(e,n){return Vl===null&&Fl(e),Vd(e,n)}function Vd(e,n){var l=n._currentValue;if(n={context:n,memoizedValue:l,next:null},Vn===null){if(e===null)throw Error(u(308));Vn=n,e.dependencies={lanes:0,firstContext:n},e.flags|=524288}else Vn=Vn.next=n;return l}var eb=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()})}},tb=t.unstable_scheduleCallback,nb=t.unstable_NormalPriority,pt={$$typeof:U,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Ds(){return{controller:new eb,data:new Map,refCount:0}}function mr(e){e.refCount--,e.refCount===0&&tb(nb,function(){e.controller.abort()})}var gr=null,Rs=0,Ei=0,_i=null;function lb(e,n){if(gr===null){var l=gr=[];Rs=0,Ei=Uo(),_i={status:"pending",value:void 0,then:function(a){l.push(a)}}}return Rs++,n.then(Fd,Fd),n}function Fd(){if(--Rs===0&&gr!==null){_i!==null&&(_i.status="fulfilled");var e=gr;gr=null,Ei=0,_i=null;for(var n=0;n<e.length;n++)(0,e[n])()}}function ib(e,n){var l=[],a={status:"pending",value:null,reason:null,then:function(o){l.push(o)}};return e.then(function(){a.status="fulfilled",a.value=n;for(var o=0;o<l.length;o++)(0,l[o])(n)},function(o){for(a.status="rejected",a.reason=o,o=0;o<l.length;o++)(0,l[o])(void 0)}),a}var Xd=D.S;D.S=function(e,n){Tp=Ue(),typeof n=="object"&&n!==null&&typeof n.then=="function"&&lb(e,n),Xd!==null&&Xd(e,n)};var Xl=A(null);function Ms(){var e=Xl.current;return e!==null?e:tt.pooledCache}function Ea(e,n){n===null?w(Xl,Xl.current):w(Xl,n.pool)}function $d(){var e=Ms();return e===null?null:{parent:pt._currentValue,pool:e}}var Ti=Error(u(460)),Os=Error(u(474)),_a=Error(u(542)),Ta={then:function(){}};function Qd(e){return e=e.status,e==="fulfilled"||e==="rejected"}function Zd(e,n,l){switch(l=e[l],l===void 0?e.push(n):l!==n&&(n.then(Hn,Hn),n=l),n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Jd(e),e;default:if(typeof n.status=="string")n.then(Hn,Hn);else{if(e=tt,e!==null&&100<e.shellSuspendCounter)throw Error(u(482));e=n,e.status="pending",e.then(function(a){if(n.status==="pending"){var o=n;o.status="fulfilled",o.value=a}},function(a){if(n.status==="pending"){var o=n;o.status="rejected",o.reason=a}})}switch(n.status){case"fulfilled":return n.value;case"rejected":throw e=n.reason,Jd(e),e}throw Ql=n,Ti}}function $l(e){try{var n=e._init;return n(e._payload)}catch(l){throw l!==null&&typeof l=="object"&&typeof l.then=="function"?(Ql=l,Ti):l}}var Ql=null;function Kd(){if(Ql===null)throw Error(u(459));var e=Ql;return Ql=null,e}function Jd(e){if(e===Ti||e===_a)throw Error(u(483))}var Ai=null,xr=0;function Aa(e){var n=xr;return xr+=1,Ai===null&&(Ai=[]),Zd(Ai,e,n)}function yr(e,n){n=n.props.ref,e.ref=n!==void 0?n:null}function za(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 Pd(e){function n(M,z){if(e){var q=M.deletions;q===null?(M.deletions=[z],M.flags|=16):q.push(z)}}function l(M,z){if(!e)return null;for(;z!==null;)n(M,z),z=z.sibling;return null}function a(M){for(var z=new Map;M!==null;)M.key!==null?z.set(M.key,M):z.set(M.index,M),M=M.sibling;return z}function o(M,z){return M=Yn(M,z),M.index=0,M.sibling=null,M}function h(M,z,q){return M.index=q,e?(q=M.alternate,q!==null?(q=q.index,q<z?(M.flags|=67108866,z):q):(M.flags|=67108866,z)):(M.flags|=1048576,z)}function b(M){return e&&M.alternate===null&&(M.flags|=67108866),M}function k(M,z,q,Z){return z===null||z.tag!==6?(z=ws(q,M.mode,Z),z.return=M,z):(z=o(z,q),z.return=M,z)}function T(M,z,q,Z){var be=q.type;return be===_?X(M,z,q.props.children,Z,q.key):z!==null&&(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ie&&$l(be)===z.type)?(z=o(z,q.props),yr(z,q),z.return=M,z):(z=wa(q.type,q.key,q.props,null,M.mode,Z),yr(z,q),z.return=M,z)}function B(M,z,q,Z){return z===null||z.tag!==4||z.stateNode.containerInfo!==q.containerInfo||z.stateNode.implementation!==q.implementation?(z=js(q,M.mode,Z),z.return=M,z):(z=o(z,q.children||[]),z.return=M,z)}function X(M,z,q,Z,be){return z===null||z.tag!==7?(z=Yl(q,M.mode,Z,be),z.return=M,z):(z=o(z,q),z.return=M,z)}function K(M,z,q){if(typeof z=="string"&&z!==""||typeof z=="number"||typeof z=="bigint")return z=ws(""+z,M.mode,q),z.return=M,z;if(typeof z=="object"&&z!==null){switch(z.$$typeof){case v:return q=wa(z.type,z.key,z.props,null,M.mode,q),yr(q,z),q.return=M,q;case N:return z=js(z,M.mode,q),z.return=M,z;case ie:return z=$l(z),K(M,z,q)}if(P(z)||te(z))return z=Yl(z,M.mode,q,null),z.return=M,z;if(typeof z.then=="function")return K(M,Aa(z),q);if(z.$$typeof===U)return K(M,Ca(M,z),q);za(M,z)}return null}function I(M,z,q,Z){var be=z!==null?z.key:null;if(typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint")return be!==null?null:k(M,z,""+q,Z);if(typeof q=="object"&&q!==null){switch(q.$$typeof){case v:return q.key===be?T(M,z,q,Z):null;case N:return q.key===be?B(M,z,q,Z):null;case ie:return q=$l(q),I(M,z,q,Z)}if(P(q)||te(q))return be!==null?null:X(M,z,q,Z,null);if(typeof q.then=="function")return I(M,z,Aa(q),Z);if(q.$$typeof===U)return I(M,z,Ca(M,q),Z);za(M,q)}return null}function Y(M,z,q,Z,be){if(typeof Z=="string"&&Z!==""||typeof Z=="number"||typeof Z=="bigint")return M=M.get(q)||null,k(z,M,""+Z,be);if(typeof Z=="object"&&Z!==null){switch(Z.$$typeof){case v:return M=M.get(Z.key===null?q:Z.key)||null,T(z,M,Z,be);case N:return M=M.get(Z.key===null?q:Z.key)||null,B(z,M,Z,be);case ie:return Z=$l(Z),Y(M,z,q,Z,be)}if(P(Z)||te(Z))return M=M.get(q)||null,X(z,M,Z,be,null);if(typeof Z.then=="function")return Y(M,z,q,Aa(Z),be);if(Z.$$typeof===U)return Y(M,z,q,Ca(z,Z),be);za(z,Z)}return null}function pe(M,z,q,Z){for(var be=null,Ve=null,ge=z,Ae=z=0,Le=null;ge!==null&&Ae<q.length;Ae++){ge.index>Ae?(Le=ge,ge=null):Le=ge.sibling;var Fe=I(M,ge,q[Ae],Z);if(Fe===null){ge===null&&(ge=Le);break}e&&ge&&Fe.alternate===null&&n(M,ge),z=h(Fe,z,Ae),Ve===null?be=Fe:Ve.sibling=Fe,Ve=Fe,ge=Le}if(Ae===q.length)return l(M,ge),qe&&Gn(M,Ae),be;if(ge===null){for(;Ae<q.length;Ae++)ge=K(M,q[Ae],Z),ge!==null&&(z=h(ge,z,Ae),Ve===null?be=ge:Ve.sibling=ge,Ve=ge);return qe&&Gn(M,Ae),be}for(ge=a(ge);Ae<q.length;Ae++)Le=Y(ge,M,Ae,q[Ae],Z),Le!==null&&(e&&Le.alternate!==null&&ge.delete(Le.key===null?Ae:Le.key),z=h(Le,z,Ae),Ve===null?be=Le:Ve.sibling=Le,Ve=Le);return e&&ge.forEach(function(zl){return n(M,zl)}),qe&&Gn(M,Ae),be}function Se(M,z,q,Z){if(q==null)throw Error(u(151));for(var be=null,Ve=null,ge=z,Ae=z=0,Le=null,Fe=q.next();ge!==null&&!Fe.done;Ae++,Fe=q.next()){ge.index>Ae?(Le=ge,ge=null):Le=ge.sibling;var zl=I(M,ge,Fe.value,Z);if(zl===null){ge===null&&(ge=Le);break}e&&ge&&zl.alternate===null&&n(M,ge),z=h(zl,z,Ae),Ve===null?be=zl:Ve.sibling=zl,Ve=zl,ge=Le}if(Fe.done)return l(M,ge),qe&&Gn(M,Ae),be;if(ge===null){for(;!Fe.done;Ae++,Fe=q.next())Fe=K(M,Fe.value,Z),Fe!==null&&(z=h(Fe,z,Ae),Ve===null?be=Fe:Ve.sibling=Fe,Ve=Fe);return qe&&Gn(M,Ae),be}for(ge=a(ge);!Fe.done;Ae++,Fe=q.next())Fe=Y(ge,M,Ae,Fe.value,Z),Fe!==null&&(e&&Fe.alternate!==null&&ge.delete(Fe.key===null?Ae:Fe.key),z=h(Fe,z,Ae),Ve===null?be=Fe:Ve.sibling=Fe,Ve=Fe);return e&&ge.forEach(function(m0){return n(M,m0)}),qe&&Gn(M,Ae),be}function et(M,z,q,Z){if(typeof q=="object"&&q!==null&&q.type===_&&q.key===null&&(q=q.props.children),typeof q=="object"&&q!==null){switch(q.$$typeof){case v:e:{for(var be=q.key;z!==null;){if(z.key===be){if(be=q.type,be===_){if(z.tag===7){l(M,z.sibling),Z=o(z,q.props.children),Z.return=M,M=Z;break e}}else if(z.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===ie&&$l(be)===z.type){l(M,z.sibling),Z=o(z,q.props),yr(Z,q),Z.return=M,M=Z;break e}l(M,z);break}else n(M,z);z=z.sibling}q.type===_?(Z=Yl(q.props.children,M.mode,Z,q.key),Z.return=M,M=Z):(Z=wa(q.type,q.key,q.props,null,M.mode,Z),yr(Z,q),Z.return=M,M=Z)}return b(M);case N:e:{for(be=q.key;z!==null;){if(z.key===be)if(z.tag===4&&z.stateNode.containerInfo===q.containerInfo&&z.stateNode.implementation===q.implementation){l(M,z.sibling),Z=o(z,q.children||[]),Z.return=M,M=Z;break e}else{l(M,z);break}else n(M,z);z=z.sibling}Z=js(q,M.mode,Z),Z.return=M,M=Z}return b(M);case ie:return q=$l(q),et(M,z,q,Z)}if(P(q))return pe(M,z,q,Z);if(te(q)){if(be=te(q),typeof be!="function")throw Error(u(150));return q=be.call(q),Se(M,z,q,Z)}if(typeof q.then=="function")return et(M,z,Aa(q),Z);if(q.$$typeof===U)return et(M,z,Ca(M,q),Z);za(M,q)}return typeof q=="string"&&q!==""||typeof q=="number"||typeof q=="bigint"?(q=""+q,z!==null&&z.tag===6?(l(M,z.sibling),Z=o(z,q),Z.return=M,M=Z):(l(M,z),Z=ws(q,M.mode,Z),Z.return=M,M=Z),b(M)):l(M,z)}return function(M,z,q,Z){try{xr=0;var be=et(M,z,q,Z);return Ai=null,be}catch(ge){if(ge===Ti||ge===_a)throw ge;var Ve=Zt(29,ge,null,M.mode);return Ve.lanes=Z,Ve.return=M,Ve}}}var Zl=Pd(!0),Wd=Pd(!1),pl=!1;function Ls(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Us(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 ml(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function gl(e,n,l){var a=e.updateQueue;if(a===null)return null;if(a=a.shared,(Xe&2)!==0){var o=a.pending;return o===null?n.next=n:(n.next=o.next,o.next=n),a.pending=n,n=ka(e),Ld(e,null,l),n}return Sa(e,a,n,l),ka(e)}function br(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,Vf(e,l)}}function qs(e,n){var l=e.updateQueue,a=e.alternate;if(a!==null&&(a=a.updateQueue,l===a)){var o=null,h=null;if(l=l.firstBaseUpdate,l!==null){do{var b={lane:l.lane,tag:l.tag,payload:l.payload,callback:null,next:null};h===null?o=h=b:h=h.next=b,l=l.next}while(l!==null);h===null?o=h=n:h=h.next=n}else o=h=n;l={baseState:a.baseState,firstBaseUpdate:o,lastBaseUpdate:h,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 Bs=!1;function vr(){if(Bs){var e=_i;if(e!==null)throw e}}function Sr(e,n,l,a){Bs=!1;var o=e.updateQueue;pl=!1;var h=o.firstBaseUpdate,b=o.lastBaseUpdate,k=o.shared.pending;if(k!==null){o.shared.pending=null;var T=k,B=T.next;T.next=null,b===null?h=B:b.next=B,b=T;var X=e.alternate;X!==null&&(X=X.updateQueue,k=X.lastBaseUpdate,k!==b&&(k===null?X.firstBaseUpdate=B:k.next=B,X.lastBaseUpdate=T))}if(h!==null){var K=o.baseState;b=0,X=B=T=null,k=h;do{var I=k.lane&-536870913,Y=I!==k.lane;if(Y?(Oe&I)===I:(a&I)===I){I!==0&&I===Ei&&(Bs=!0),X!==null&&(X=X.next={lane:0,tag:k.tag,payload:k.payload,callback:null,next:null});e:{var pe=e,Se=k;I=n;var et=l;switch(Se.tag){case 1:if(pe=Se.payload,typeof pe=="function"){K=pe.call(et,K,I);break e}K=pe;break e;case 3:pe.flags=pe.flags&-65537|128;case 0:if(pe=Se.payload,I=typeof pe=="function"?pe.call(et,K,I):pe,I==null)break e;K=x({},K,I);break e;case 2:pl=!0}}I=k.callback,I!==null&&(e.flags|=64,Y&&(e.flags|=8192),Y=o.callbacks,Y===null?o.callbacks=[I]:Y.push(I))}else Y={lane:I,tag:k.tag,payload:k.payload,callback:k.callback,next:null},X===null?(B=X=Y,T=K):X=X.next=Y,b|=I;if(k=k.next,k===null){if(k=o.shared.pending,k===null)break;Y=k,k=Y.next,Y.next=null,o.lastBaseUpdate=Y,o.shared.pending=null}}while(!0);X===null&&(T=K),o.baseState=T,o.firstBaseUpdate=B,o.lastBaseUpdate=X,h===null&&(o.shared.lanes=0),Sl|=b,e.lanes=b,e.memoizedState=K}}function eh(e,n){if(typeof e!="function")throw Error(u(191,e));e.call(n)}function th(e,n){var l=e.callbacks;if(l!==null)for(e.callbacks=null,e=0;e<l.length;e++)eh(l[e],n)}var zi=A(null),Da=A(0);function nh(e,n){e=el,w(Da,e),w(zi,n),el=e|n.baseLanes}function Hs(){w(Da,el),w(zi,zi.current)}function Is(){el=Da.current,V(zi),V(Da)}var Kt=A(null),mn=null;function xl(e){var n=e.alternate;w(ft,ft.current&1),w(Kt,e),mn===null&&(n===null||zi.current!==null||n.memoizedState!==null)&&(mn=e)}function Ys(e){w(ft,ft.current),w(Kt,e),mn===null&&(mn=e)}function lh(e){e.tag===22?(w(ft,ft.current),w(Kt,e),mn===null&&(mn=e)):yl()}function yl(){w(ft,ft.current),w(Kt,Kt.current)}function Jt(e){V(Kt),mn===e&&(mn=null),V(ft)}var ft=A(0);function Ra(e){for(var n=e;n!==null;){if(n.tag===13){var l=n.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||Zo(l)||Ko(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 Xn=0,Te=null,Pe=null,mt=null,Ma=!1,Di=!1,Kl=!1,Oa=0,kr=0,Ri=null,rb=0;function ot(){throw Error(u(321))}function Gs(e,n){if(n===null)return!1;for(var l=0;l<n.length&&l<e.length;l++)if(!Qt(e[l],n[l]))return!1;return!0}function Vs(e,n,l,a,o,h){return Xn=h,Te=n,n.memoizedState=null,n.updateQueue=null,n.lanes=0,D.H=e===null||e.memoizedState===null?Hh:ro,Kl=!1,h=l(a,o),Kl=!1,Di&&(h=rh(n,l,a,o)),ih(e),h}function ih(e){D.H=Nr;var n=Pe!==null&&Pe.next!==null;if(Xn=0,mt=Pe=Te=null,Ma=!1,kr=0,Ri=null,n)throw Error(u(300));e===null||gt||(e=e.dependencies,e!==null&&Na(e)&&(gt=!0))}function rh(e,n,l,a){Te=e;var o=0;do{if(Di&&(Ri=null),kr=0,Di=!1,25<=o)throw Error(u(301));if(o+=1,mt=Pe=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}D.H=Ih,h=n(l,a)}while(Di);return h}function ab(){var e=D.H,n=e.useState()[0];return n=typeof n.then=="function"?wr(n):n,e=e.useState()[0],(Pe!==null?Pe.memoizedState:null)!==e&&(Te.flags|=1024),n}function Fs(){var e=Oa!==0;return Oa=0,e}function Xs(e,n,l){n.updateQueue=e.updateQueue,n.flags&=-2053,e.lanes&=~l}function $s(e){if(Ma){for(e=e.memoizedState;e!==null;){var n=e.queue;n!==null&&(n.pending=null),e=e.next}Ma=!1}Xn=0,mt=Pe=Te=null,Di=!1,kr=Oa=0,Ri=null}function Lt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?Te.memoizedState=mt=e:mt=mt.next=e,mt}function dt(){if(Pe===null){var e=Te.alternate;e=e!==null?e.memoizedState:null}else e=Pe.next;var n=mt===null?Te.memoizedState:mt.next;if(n!==null)mt=n,Pe=e;else{if(e===null)throw Te.alternate===null?Error(u(467)):Error(u(310));Pe=e,e={memoizedState:Pe.memoizedState,baseState:Pe.baseState,baseQueue:Pe.baseQueue,queue:Pe.queue,next:null},mt===null?Te.memoizedState=mt=e:mt=mt.next=e}return mt}function La(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function wr(e){var n=kr;return kr+=1,Ri===null&&(Ri=[]),e=Zd(Ri,e,n),n=Te,(mt===null?n.memoizedState:mt.next)===null&&(n=n.alternate,D.H=n===null||n.memoizedState===null?Hh:ro),e}function Ua(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return wr(e);if(e.$$typeof===U)return Et(e)}throw Error(u(438,String(e)))}function Qs(e){var n=null,l=Te.updateQueue;if(l!==null&&(n=l.memoCache),n==null){var a=Te.alternate;a!==null&&(a=a.updateQueue,a!==null&&(a=a.memoCache,a!=null&&(n={data:a.data.map(function(o){return o.slice()}),index:0})))}if(n==null&&(n={data:[],index:0}),l===null&&(l=La(),Te.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]=O;return n.index++,l}function $n(e,n){return typeof n=="function"?n(e):n}function qa(e){var n=dt();return Zs(n,Pe,e)}function Zs(e,n,l){var a=e.queue;if(a===null)throw Error(u(311));a.lastRenderedReducer=l;var o=e.baseQueue,h=a.pending;if(h!==null){if(o!==null){var b=o.next;o.next=h.next,h.next=b}n.baseQueue=o=h,a.pending=null}if(h=e.baseState,o===null)e.memoizedState=h;else{n=o.next;var k=b=null,T=null,B=n,X=!1;do{var K=B.lane&-536870913;if(K!==B.lane?(Oe&K)===K:(Xn&K)===K){var I=B.revertLane;if(I===0)T!==null&&(T=T.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),K===Ei&&(X=!0);else if((Xn&I)===I){B=B.next,I===Ei&&(X=!0);continue}else K={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},T===null?(k=T=K,b=h):T=T.next=K,Te.lanes|=I,Sl|=I;K=B.action,Kl&&l(h,K),h=B.hasEagerState?B.eagerState:l(h,K)}else I={lane:K,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},T===null?(k=T=I,b=h):T=T.next=I,Te.lanes|=K,Sl|=K;B=B.next}while(B!==null&&B!==n);if(T===null?b=h:T.next=k,!Qt(h,e.memoizedState)&&(gt=!0,X&&(l=_i,l!==null)))throw l;e.memoizedState=h,e.baseState=b,e.baseQueue=T,a.lastRenderedState=h}return o===null&&(a.lanes=0),[e.memoizedState,a.dispatch]}function Ks(e){var n=dt(),l=n.queue;if(l===null)throw Error(u(311));l.lastRenderedReducer=e;var a=l.dispatch,o=l.pending,h=n.memoizedState;if(o!==null){l.pending=null;var b=o=o.next;do h=e(h,b.action),b=b.next;while(b!==o);Qt(h,n.memoizedState)||(gt=!0),n.memoizedState=h,n.baseQueue===null&&(n.baseState=h),l.lastRenderedState=h}return[h,a]}function ah(e,n,l){var a=Te,o=dt(),h=qe;if(h){if(l===void 0)throw Error(u(407));l=l()}else l=n();var b=!Qt((Pe||o).memoizedState,l);if(b&&(o.memoizedState=l,gt=!0),o=o.queue,Ws(oh.bind(null,a,o,e),[e]),o.getSnapshot!==n||b||mt!==null&&mt.memoizedState.tag&1){if(a.flags|=2048,Mi(9,{destroy:void 0},sh.bind(null,a,o,l,n),null),tt===null)throw Error(u(349));h||(Xn&127)!==0||uh(a,n,l)}return l}function uh(e,n,l){e.flags|=16384,e={getSnapshot:n,value:l},n=Te.updateQueue,n===null?(n=La(),Te.updateQueue=n,n.stores=[e]):(l=n.stores,l===null?n.stores=[e]:l.push(e))}function sh(e,n,l,a){n.value=l,n.getSnapshot=a,ch(n)&&fh(e)}function oh(e,n,l){return l(function(){ch(n)&&fh(e)})}function ch(e){var n=e.getSnapshot;e=e.value;try{var l=n();return!Qt(e,l)}catch{return!0}}function fh(e){var n=Il(e,2);n!==null&&Ft(n,e,2)}function Js(e){var n=Lt();if(typeof e=="function"){var l=e;if(e=l(),Kl){kt(!0);try{l()}finally{kt(!1)}}}return n.memoizedState=n.baseState=e,n.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:e},n}function dh(e,n,l,a){return e.baseState=l,Zs(e,Pe,typeof a=="function"?a:$n)}function ub(e,n,l,a,o){if(Ia(e))throw Error(u(485));if(e=n.action,e!==null){var h={payload:o,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(b){h.listeners.push(b)}};D.T!==null?l(!0):h.isTransition=!1,a(h),l=n.pending,l===null?(h.next=n.pending=h,hh(n,h)):(h.next=l.next,n.pending=l.next=h)}}function hh(e,n){var l=n.action,a=n.payload,o=e.state;if(n.isTransition){var h=D.T,b={};D.T=b;try{var k=l(o,a),T=D.S;T!==null&&T(b,k),ph(e,n,k)}catch(B){Ps(e,n,B)}finally{h!==null&&b.types!==null&&(h.types=b.types),D.T=h}}else try{h=l(o,a),ph(e,n,h)}catch(B){Ps(e,n,B)}}function ph(e,n,l){l!==null&&typeof l=="object"&&typeof l.then=="function"?l.then(function(a){mh(e,n,a)},function(a){return Ps(e,n,a)}):mh(e,n,l)}function mh(e,n,l){n.status="fulfilled",n.value=l,gh(n),e.state=l,n=e.pending,n!==null&&(l=n.next,l===n?e.pending=null:(l=l.next,n.next=l,hh(e,l)))}function Ps(e,n,l){var a=e.pending;if(e.pending=null,a!==null){a=a.next;do n.status="rejected",n.reason=l,gh(n),n=n.next;while(n!==a)}e.action=null}function gh(e){e=e.listeners;for(var n=0;n<e.length;n++)(0,e[n])()}function xh(e,n){return n}function yh(e,n){if(qe){var l=tt.formState;if(l!==null){e:{var a=Te;if(qe){if(it){t:{for(var o=it,h=pn;o.nodeType!==8;){if(!h){o=null;break t}if(o=gn(o.nextSibling),o===null){o=null;break t}}h=o.data,o=h==="F!"||h==="F"?o:null}if(o){it=gn(o.nextSibling),a=o.data==="F!";break e}}dl(a)}a=!1}a&&(n=l[0])}}return l=Lt(),l.memoizedState=l.baseState=n,a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:xh,lastRenderedState:n},l.queue=a,l=Uh.bind(null,Te,a),a.dispatch=l,a=Js(!1),h=io.bind(null,Te,!1,a.queue),a=Lt(),o={state:n,dispatch:null,action:e,pending:null},a.queue=o,l=ub.bind(null,Te,o,h,l),o.dispatch=l,a.memoizedState=e,[n,l,!1]}function bh(e){var n=dt();return vh(n,Pe,e)}function vh(e,n,l){if(n=Zs(e,n,xh)[0],e=qa($n)[0],typeof n=="object"&&n!==null&&typeof n.then=="function")try{var a=wr(n)}catch(b){throw b===Ti?_a:b}else a=n;n=dt();var o=n.queue,h=o.dispatch;return l!==n.memoizedState&&(Te.flags|=2048,Mi(9,{destroy:void 0},sb.bind(null,o,l),null)),[a,h,e]}function sb(e,n){e.action=n}function Sh(e){var n=dt(),l=Pe;if(l!==null)return vh(n,l,e);dt(),n=n.memoizedState,l=dt();var a=l.queue.dispatch;return l.memoizedState=e,[n,a,!1]}function Mi(e,n,l,a){return e={tag:e,create:l,deps:a,inst:n,next:null},n=Te.updateQueue,n===null&&(n=La(),Te.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 kh(){return dt().memoizedState}function Ba(e,n,l,a){var o=Lt();Te.flags|=e,o.memoizedState=Mi(1|n,{destroy:void 0},l,a===void 0?null:a)}function Ha(e,n,l,a){var o=dt();a=a===void 0?null:a;var h=o.memoizedState.inst;Pe!==null&&a!==null&&Gs(a,Pe.memoizedState.deps)?o.memoizedState=Mi(n,h,l,a):(Te.flags|=e,o.memoizedState=Mi(1|n,h,l,a))}function wh(e,n){Ba(8390656,8,e,n)}function Ws(e,n){Ha(2048,8,e,n)}function ob(e){Te.flags|=4;var n=Te.updateQueue;if(n===null)n=La(),Te.updateQueue=n,n.events=[e];else{var l=n.events;l===null?n.events=[e]:l.push(e)}}function jh(e){var n=dt().memoizedState;return ob({ref:n,nextImpl:e}),function(){if((Xe&2)!==0)throw Error(u(440));return n.impl.apply(void 0,arguments)}}function Nh(e,n){return Ha(4,2,e,n)}function Ch(e,n){return Ha(4,4,e,n)}function Eh(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 _h(e,n,l){l=l!=null?l.concat([e]):null,Ha(4,4,Eh.bind(null,n,e),l)}function eo(){}function Th(e,n){var l=dt();n=n===void 0?null:n;var a=l.memoizedState;return n!==null&&Gs(n,a[1])?a[0]:(l.memoizedState=[e,n],e)}function Ah(e,n){var l=dt();n=n===void 0?null:n;var a=l.memoizedState;if(n!==null&&Gs(n,a[1]))return a[0];if(a=e(),Kl){kt(!0);try{e()}finally{kt(!1)}}return l.memoizedState=[a,n],a}function to(e,n,l){return l===void 0||(Xn&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=n:(e.memoizedState=l,e=zp(),Te.lanes|=e,Sl|=e,l)}function zh(e,n,l,a){return Qt(l,n)?l:zi.current!==null?(e=to(e,l,a),Qt(e,n)||(gt=!0),e):(Xn&42)===0||(Xn&1073741824)!==0&&(Oe&261930)===0?(gt=!0,e.memoizedState=l):(e=zp(),Te.lanes|=e,Sl|=e,n)}function Dh(e,n,l,a,o){var h=Q.p;Q.p=h!==0&&8>h?h:8;var b=D.T,k={};D.T=k,io(e,!1,n,l);try{var T=o(),B=D.S;if(B!==null&&B(k,T),T!==null&&typeof T=="object"&&typeof T.then=="function"){var X=ib(T,a);jr(e,n,X,en(e))}else jr(e,n,a,en(e))}catch(K){jr(e,n,{then:function(){},status:"rejected",reason:K},en())}finally{Q.p=h,b!==null&&k.types!==null&&(b.types=k.types),D.T=b}}function cb(){}function no(e,n,l,a){if(e.tag!==5)throw Error(u(476));var o=Rh(e).queue;Dh(e,o,n,ce,l===null?cb:function(){return Mh(e),l(a)})}function Rh(e){var n=e.memoizedState;if(n!==null)return n;n={memoizedState:ce,baseState:ce,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:ce},next:null};var l={};return n.next={memoizedState:l,baseState:l,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:$n,lastRenderedState:l},next:null},e.memoizedState=n,e=e.alternate,e!==null&&(e.memoizedState=n),n}function Mh(e){var n=Rh(e);n.next===null&&(n=e.alternate.memoizedState),jr(e,n.next.queue,{},en())}function lo(){return Et(Ir)}function Oh(){return dt().memoizedState}function Lh(){return dt().memoizedState}function fb(e){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var l=en();e=ml(l);var a=gl(n,e,l);a!==null&&(Ft(a,n,l),br(a,n,l)),n={cache:Ds()},e.payload=n;return}n=n.return}}function db(e,n,l){var a=en();l={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},Ia(e)?qh(n,l):(l=Ss(e,n,l,a),l!==null&&(Ft(l,e,a),Bh(l,n,a)))}function Uh(e,n,l){var a=en();jr(e,n,l,a)}function jr(e,n,l,a){var o={lane:a,revertLane:0,gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ia(e))qh(n,o);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=n.lastRenderedReducer,h!==null))try{var b=n.lastRenderedState,k=h(b,l);if(o.hasEagerState=!0,o.eagerState=k,Qt(k,b))return Sa(e,n,o,0),tt===null&&va(),!1}catch{}if(l=Ss(e,n,o,a),l!==null)return Ft(l,e,a),Bh(l,n,a),!0}return!1}function io(e,n,l,a){if(a={lane:2,revertLane:Uo(),gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null},Ia(e)){if(n)throw Error(u(479))}else n=Ss(e,l,a,2),n!==null&&Ft(n,e,2)}function Ia(e){var n=e.alternate;return e===Te||n!==null&&n===Te}function qh(e,n){Di=Ma=!0;var l=e.pending;l===null?n.next=n:(n.next=l.next,l.next=n),e.pending=n}function Bh(e,n,l){if((l&4194048)!==0){var a=n.lanes;a&=e.pendingLanes,l|=a,n.lanes=l,Vf(e,l)}}var Nr={readContext:Et,use:Ua,useCallback:ot,useContext:ot,useEffect:ot,useImperativeHandle:ot,useLayoutEffect:ot,useInsertionEffect:ot,useMemo:ot,useReducer:ot,useRef:ot,useState:ot,useDebugValue:ot,useDeferredValue:ot,useTransition:ot,useSyncExternalStore:ot,useId:ot,useHostTransitionStatus:ot,useFormState:ot,useActionState:ot,useOptimistic:ot,useMemoCache:ot,useCacheRefresh:ot};Nr.useEffectEvent=ot;var Hh={readContext:Et,use:Ua,useCallback:function(e,n){return Lt().memoizedState=[e,n===void 0?null:n],e},useContext:Et,useEffect:wh,useImperativeHandle:function(e,n,l){l=l!=null?l.concat([e]):null,Ba(4194308,4,Eh.bind(null,n,e),l)},useLayoutEffect:function(e,n){return Ba(4194308,4,e,n)},useInsertionEffect:function(e,n){Ba(4,2,e,n)},useMemo:function(e,n){var l=Lt();n=n===void 0?null:n;var a=e();if(Kl){kt(!0);try{e()}finally{kt(!1)}}return l.memoizedState=[a,n],a},useReducer:function(e,n,l){var a=Lt();if(l!==void 0){var o=l(n);if(Kl){kt(!0);try{l(n)}finally{kt(!1)}}}else o=n;return a.memoizedState=a.baseState=o,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:o},a.queue=e,e=e.dispatch=db.bind(null,Te,e),[a.memoizedState,e]},useRef:function(e){var n=Lt();return e={current:e},n.memoizedState=e},useState:function(e){e=Js(e);var n=e.queue,l=Uh.bind(null,Te,n);return n.dispatch=l,[e.memoizedState,l]},useDebugValue:eo,useDeferredValue:function(e,n){var l=Lt();return to(l,e,n)},useTransition:function(){var e=Js(!1);return e=Dh.bind(null,Te,e.queue,!0,!1),Lt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,n,l){var a=Te,o=Lt();if(qe){if(l===void 0)throw Error(u(407));l=l()}else{if(l=n(),tt===null)throw Error(u(349));(Oe&127)!==0||uh(a,n,l)}o.memoizedState=l;var h={value:l,getSnapshot:n};return o.queue=h,wh(oh.bind(null,a,h,e),[e]),a.flags|=2048,Mi(9,{destroy:void 0},sh.bind(null,a,h,l,n),null),l},useId:function(){var e=Lt(),n=tt.identifierPrefix;if(qe){var l=zn,a=An;l=(a&~(1<<32-Ze(a)-1)).toString(32)+l,n="_"+n+"R_"+l,l=Oa++,0<l&&(n+="H"+l.toString(32)),n+="_"}else l=rb++,n="_"+n+"r_"+l.toString(32)+"_";return e.memoizedState=n},useHostTransitionStatus:lo,useFormState:yh,useActionState:yh,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=io.bind(null,Te,!0,l),l.dispatch=n,[e,n]},useMemoCache:Qs,useCacheRefresh:function(){return Lt().memoizedState=fb.bind(null,Te)},useEffectEvent:function(e){var n=Lt(),l={impl:e};return n.memoizedState=l,function(){if((Xe&2)!==0)throw Error(u(440));return l.impl.apply(void 0,arguments)}}},ro={readContext:Et,use:Ua,useCallback:Th,useContext:Et,useEffect:Ws,useImperativeHandle:_h,useInsertionEffect:Nh,useLayoutEffect:Ch,useMemo:Ah,useReducer:qa,useRef:kh,useState:function(){return qa($n)},useDebugValue:eo,useDeferredValue:function(e,n){var l=dt();return zh(l,Pe.memoizedState,e,n)},useTransition:function(){var e=qa($n)[0],n=dt().memoizedState;return[typeof e=="boolean"?e:wr(e),n]},useSyncExternalStore:ah,useId:Oh,useHostTransitionStatus:lo,useFormState:bh,useActionState:bh,useOptimistic:function(e,n){var l=dt();return dh(l,Pe,e,n)},useMemoCache:Qs,useCacheRefresh:Lh};ro.useEffectEvent=jh;var Ih={readContext:Et,use:Ua,useCallback:Th,useContext:Et,useEffect:Ws,useImperativeHandle:_h,useInsertionEffect:Nh,useLayoutEffect:Ch,useMemo:Ah,useReducer:Ks,useRef:kh,useState:function(){return Ks($n)},useDebugValue:eo,useDeferredValue:function(e,n){var l=dt();return Pe===null?to(l,e,n):zh(l,Pe.memoizedState,e,n)},useTransition:function(){var e=Ks($n)[0],n=dt().memoizedState;return[typeof e=="boolean"?e:wr(e),n]},useSyncExternalStore:ah,useId:Oh,useHostTransitionStatus:lo,useFormState:Sh,useActionState:Sh,useOptimistic:function(e,n){var l=dt();return Pe!==null?dh(l,Pe,e,n):(l.baseState=e,[e,l.queue.dispatch])},useMemoCache:Qs,useCacheRefresh:Lh};Ih.useEffectEvent=jh;function ao(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 uo={enqueueSetState:function(e,n,l){e=e._reactInternals;var a=en(),o=ml(a);o.payload=n,l!=null&&(o.callback=l),n=gl(e,o,a),n!==null&&(Ft(n,e,a),br(n,e,a))},enqueueReplaceState:function(e,n,l){e=e._reactInternals;var a=en(),o=ml(a);o.tag=1,o.payload=n,l!=null&&(o.callback=l),n=gl(e,o,a),n!==null&&(Ft(n,e,a),br(n,e,a))},enqueueForceUpdate:function(e,n){e=e._reactInternals;var l=en(),a=ml(l);a.tag=2,n!=null&&(a.callback=n),n=gl(e,a,l),n!==null&&(Ft(n,e,l),br(n,e,l))}};function Yh(e,n,l,a,o,h,b){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(a,h,b):n.prototype&&n.prototype.isPureReactComponent?!fr(l,a)||!fr(o,h):!0}function Gh(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&&uo.enqueueReplaceState(n,n.state,null)}function Jl(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 o in e)l[o]===void 0&&(l[o]=e[o])}return l}function Vh(e){ba(e)}function Fh(e){console.error(e)}function Xh(e){ba(e)}function Ya(e,n){try{var l=e.onUncaughtError;l(n.value,{componentStack:n.stack})}catch(a){setTimeout(function(){throw a})}}function $h(e,n,l){try{var a=e.onCaughtError;a(l.value,{componentStack:l.stack,errorBoundary:n.tag===1?n.stateNode:null})}catch(o){setTimeout(function(){throw o})}}function so(e,n,l){return l=ml(l),l.tag=3,l.payload={element:null},l.callback=function(){Ya(e,n)},l}function Qh(e){return e=ml(e),e.tag=3,e}function Zh(e,n,l,a){var o=l.type.getDerivedStateFromError;if(typeof o=="function"){var h=a.value;e.payload=function(){return o(h)},e.callback=function(){$h(n,l,a)}}var b=l.stateNode;b!==null&&typeof b.componentDidCatch=="function"&&(e.callback=function(){$h(n,l,a),typeof o!="function"&&(kl===null?kl=new Set([this]):kl.add(this));var k=a.stack;this.componentDidCatch(a.value,{componentStack:k!==null?k:""})})}function hb(e,n,l,a,o){if(l.flags|=32768,a!==null&&typeof a=="object"&&typeof a.then=="function"){if(n=l.alternate,n!==null&&Ci(n,l,o,!0),l=Kt.current,l!==null){switch(l.tag){case 31:case 13:return mn===null?eu():l.alternate===null&&ct===0&&(ct=3),l.flags&=-257,l.flags|=65536,l.lanes=o,a===Ta?l.flags|=16384:(n=l.updateQueue,n===null?l.updateQueue=new Set([a]):n.add(a),Mo(e,a,o)),!1;case 22:return l.flags|=65536,a===Ta?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)),Mo(e,a,o)),!1}throw Error(u(435,l.tag))}return Mo(e,a,o),eu(),!1}if(qe)return n=Kt.current,n!==null?((n.flags&65536)===0&&(n.flags|=256),n.flags|=65536,n.lanes=o,a!==Es&&(e=Error(u(422),{cause:a}),pr(fn(e,l)))):(a!==Es&&(n=Error(u(423),{cause:a}),pr(fn(n,l))),e=e.current.alternate,e.flags|=65536,o&=-o,e.lanes|=o,a=fn(a,l),o=so(e.stateNode,a,o),qs(e,o),ct!==4&&(ct=2)),!1;var h=Error(u(520),{cause:a});if(h=fn(h,l),Rr===null?Rr=[h]:Rr.push(h),ct!==4&&(ct=2),n===null)return!0;a=fn(a,l),l=n;do{switch(l.tag){case 3:return l.flags|=65536,e=o&-o,l.lanes|=e,e=so(l.stateNode,a,e),qs(l,e),!1;case 1:if(n=l.type,h=l.stateNode,(l.flags&128)===0&&(typeof n.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(kl===null||!kl.has(h))))return l.flags|=65536,o&=-o,l.lanes|=o,o=Qh(o),Zh(o,e,l,a),qs(l,o),!1}l=l.return}while(l!==null);return!1}var oo=Error(u(461)),gt=!1;function _t(e,n,l,a){n.child=e===null?Wd(n,null,l,a):Zl(n,e.child,l,a)}function Kh(e,n,l,a,o){l=l.render;var h=n.ref;if("ref"in a){var b={};for(var k in a)k!=="ref"&&(b[k]=a[k])}else b=a;return Fl(n),a=Vs(e,n,l,b,h,o),k=Fs(),e!==null&&!gt?(Xs(e,n,o),Qn(e,n,o)):(qe&&k&&Ns(n),n.flags|=1,_t(e,n,a,o),n.child)}function Jh(e,n,l,a,o){if(e===null){var h=l.type;return typeof h=="function"&&!ks(h)&&h.defaultProps===void 0&&l.compare===null?(n.tag=15,n.type=h,Ph(e,n,h,a,o)):(e=wa(l.type,null,a,n,n.mode,o),e.ref=n.ref,e.return=n,n.child=e)}if(h=e.child,!yo(e,o)){var b=h.memoizedProps;if(l=l.compare,l=l!==null?l:fr,l(b,a)&&e.ref===n.ref)return Qn(e,n,o)}return n.flags|=1,e=Yn(h,a),e.ref=n.ref,e.return=n,n.child=e}function Ph(e,n,l,a,o){if(e!==null){var h=e.memoizedProps;if(fr(h,a)&&e.ref===n.ref)if(gt=!1,n.pendingProps=a=h,yo(e,o))(e.flags&131072)!==0&&(gt=!0);else return n.lanes=e.lanes,Qn(e,n,o)}return co(e,n,l,a,o)}function Wh(e,n,l,a){var o=a.children,h=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(h=h!==null?h.baseLanes|l:l,e!==null){for(a=n.child=e.child,o=0;a!==null;)o=o|a.lanes|a.childLanes,a=a.sibling;a=o&~h}else a=0,n.child=null;return ep(e,n,h,l,a)}if((l&536870912)!==0)n.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ea(n,h!==null?h.cachePool:null),h!==null?nh(n,h):Hs(),lh(n);else return a=n.lanes=536870912,ep(e,n,h!==null?h.baseLanes|l:l,l,a)}else h!==null?(Ea(n,h.cachePool),nh(n,h),yl(),n.memoizedState=null):(e!==null&&Ea(n,null),Hs(),yl());return _t(e,n,o,l),n.child}function Cr(e,n){return e!==null&&e.tag===22||n.stateNode!==null||(n.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),n.sibling}function ep(e,n,l,a,o){var h=Ms();return h=h===null?null:{parent:pt._currentValue,pool:h},n.memoizedState={baseLanes:l,cachePool:h},e!==null&&Ea(n,null),Hs(),lh(n),e!==null&&Ci(e,n,a,!0),n.childLanes=o,null}function Ga(e,n){return n=Fa({mode:n.mode,children:n.children},e.mode),n.ref=e.ref,e.child=n,n.return=e,n}function tp(e,n,l){return Zl(n,e.child,null,l),e=Ga(n,n.pendingProps),e.flags|=2,Jt(n),n.memoizedState=null,e}function pb(e,n,l){var a=n.pendingProps,o=(n.flags&128)!==0;if(n.flags&=-129,e===null){if(qe){if(a.mode==="hidden")return e=Ga(n,a),n.lanes=536870912,Cr(null,e);if(Ys(n),(e=it)?(e=hm(e,pn),e=e!==null&&e.data==="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:cl!==null?{id:An,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=qd(e),l.return=n,n.child=l,Ct=n,it=null)):e=null,e===null)throw dl(n);return n.lanes=536870912,null}return Ga(n,a)}var h=e.memoizedState;if(h!==null){var b=h.dehydrated;if(Ys(n),o)if(n.flags&256)n.flags&=-257,n=tp(e,n,l);else if(n.memoizedState!==null)n.child=e.child,n.flags|=128,n=null;else throw Error(u(558));else if(gt||Ci(e,n,l,!1),o=(l&e.childLanes)!==0,gt||o){if(a=tt,a!==null&&(b=Ff(a,l),b!==0&&b!==h.retryLane))throw h.retryLane=b,Il(e,b),Ft(a,e,b),oo;eu(),n=tp(e,n,l)}else e=h.treeContext,it=gn(b.nextSibling),Ct=n,qe=!0,fl=null,pn=!1,e!==null&&Id(n,e),n=Ga(n,a),n.flags|=4096;return n}return e=Yn(e.child,{mode:a.mode,children:a.children}),e.ref=n.ref,n.child=e,e.return=n,e}function Va(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 co(e,n,l,a,o){return Fl(n),l=Vs(e,n,l,a,void 0,o),a=Fs(),e!==null&&!gt?(Xs(e,n,o),Qn(e,n,o)):(qe&&a&&Ns(n),n.flags|=1,_t(e,n,l,o),n.child)}function np(e,n,l,a,o,h){return Fl(n),n.updateQueue=null,l=rh(n,a,l,o),ih(e),a=Fs(),e!==null&&!gt?(Xs(e,n,h),Qn(e,n,h)):(qe&&a&&Ns(n),n.flags|=1,_t(e,n,l,h),n.child)}function lp(e,n,l,a,o){if(Fl(n),n.stateNode===null){var h=ki,b=l.contextType;typeof b=="object"&&b!==null&&(h=Et(b)),h=new l(a,h),n.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=uo,n.stateNode=h,h._reactInternals=n,h=n.stateNode,h.props=a,h.state=n.memoizedState,h.refs={},Ls(n),b=l.contextType,h.context=typeof b=="object"&&b!==null?Et(b):ki,h.state=n.memoizedState,b=l.getDerivedStateFromProps,typeof b=="function"&&(ao(n,l,b,a),h.state=n.memoizedState),typeof l.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(b=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),b!==h.state&&uo.enqueueReplaceState(h,h.state,null),Sr(n,a,h,o),vr(),h.state=n.memoizedState),typeof h.componentDidMount=="function"&&(n.flags|=4194308),a=!0}else if(e===null){h=n.stateNode;var k=n.memoizedProps,T=Jl(l,k);h.props=T;var B=h.context,X=l.contextType;b=ki,typeof X=="object"&&X!==null&&(b=Et(X));var K=l.getDerivedStateFromProps;X=typeof K=="function"||typeof h.getSnapshotBeforeUpdate=="function",k=n.pendingProps!==k,X||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(k||B!==b)&&Gh(n,h,a,b),pl=!1;var I=n.memoizedState;h.state=I,Sr(n,a,h,o),vr(),B=n.memoizedState,k||I!==B||pl?(typeof K=="function"&&(ao(n,l,K,a),B=n.memoizedState),(T=pl||Yh(n,l,T,a,I,B,b))?(X||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(n.flags|=4194308)):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),n.memoizedProps=a,n.memoizedState=B),h.props=a,h.state=B,h.context=b,a=T):(typeof h.componentDidMount=="function"&&(n.flags|=4194308),a=!1)}else{h=n.stateNode,Us(e,n),b=n.memoizedProps,X=Jl(l,b),h.props=X,K=n.pendingProps,I=h.context,B=l.contextType,T=ki,typeof B=="object"&&B!==null&&(T=Et(B)),k=l.getDerivedStateFromProps,(B=typeof k=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(b!==K||I!==T)&&Gh(n,h,a,T),pl=!1,I=n.memoizedState,h.state=I,Sr(n,a,h,o),vr();var Y=n.memoizedState;b!==K||I!==Y||pl||e!==null&&e.dependencies!==null&&Na(e.dependencies)?(typeof k=="function"&&(ao(n,l,k,a),Y=n.memoizedState),(X=pl||Yh(n,l,X,a,I,Y,T)||e!==null&&e.dependencies!==null&&Na(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(a,Y,T),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(a,Y,T)),typeof h.componentDidUpdate=="function"&&(n.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(n.flags|=1024)):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),n.memoizedProps=a,n.memoizedState=Y),h.props=a,h.state=Y,h.context=T,a=X):(typeof h.componentDidUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||b===e.memoizedProps&&I===e.memoizedState||(n.flags|=1024),a=!1)}return h=a,Va(e,n),a=(n.flags&128)!==0,h||a?(h=n.stateNode,l=a&&typeof l.getDerivedStateFromError!="function"?null:h.render(),n.flags|=1,e!==null&&a?(n.child=Zl(n,e.child,null,o),n.child=Zl(n,null,l,o)):_t(e,n,l,o),n.memoizedState=h.state,e=n.child):e=Qn(e,n,o),e}function ip(e,n,l,a){return Gl(),n.flags|=256,_t(e,n,l,a),n.child}var fo={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function ho(e){return{baseLanes:e,cachePool:$d()}}function po(e,n,l){return e=e!==null?e.childLanes&~l:0,n&&(e|=Wt),e}function rp(e,n,l){var a=n.pendingProps,o=!1,h=(n.flags&128)!==0,b;if((b=h)||(b=e!==null&&e.memoizedState===null?!1:(ft.current&2)!==0),b&&(o=!0,n.flags&=-129),b=(n.flags&32)!==0,n.flags&=-33,e===null){if(qe){if(o?xl(n):yl(),(e=it)?(e=hm(e,pn),e=e!==null&&e.data!=="&"?e:null,e!==null&&(n.memoizedState={dehydrated:e,treeContext:cl!==null?{id:An,overflow:zn}:null,retryLane:536870912,hydrationErrors:null},l=qd(e),l.return=n,n.child=l,Ct=n,it=null)):e=null,e===null)throw dl(n);return Ko(e)?n.lanes=32:n.lanes=536870912,null}var k=a.children;return a=a.fallback,o?(yl(),o=n.mode,k=Fa({mode:"hidden",children:k},o),a=Yl(a,o,l,null),k.return=n,a.return=n,k.sibling=a,n.child=k,a=n.child,a.memoizedState=ho(l),a.childLanes=po(e,b,l),n.memoizedState=fo,Cr(null,a)):(xl(n),mo(n,k))}var T=e.memoizedState;if(T!==null&&(k=T.dehydrated,k!==null)){if(h)n.flags&256?(xl(n),n.flags&=-257,n=go(e,n,l)):n.memoizedState!==null?(yl(),n.child=e.child,n.flags|=128,n=null):(yl(),k=a.fallback,o=n.mode,a=Fa({mode:"visible",children:a.children},o),k=Yl(k,o,l,null),k.flags|=2,a.return=n,k.return=n,a.sibling=k,n.child=a,Zl(n,e.child,null,l),a=n.child,a.memoizedState=ho(l),a.childLanes=po(e,b,l),n.memoizedState=fo,n=Cr(null,a));else if(xl(n),Ko(k)){if(b=k.nextSibling&&k.nextSibling.dataset,b)var B=b.dgst;b=B,a=Error(u(419)),a.stack="",a.digest=b,pr({value:a,source:null,stack:null}),n=go(e,n,l)}else if(gt||Ci(e,n,l,!1),b=(l&e.childLanes)!==0,gt||b){if(b=tt,b!==null&&(a=Ff(b,l),a!==0&&a!==T.retryLane))throw T.retryLane=a,Il(e,a),Ft(b,e,a),oo;Zo(k)||eu(),n=go(e,n,l)}else Zo(k)?(n.flags|=192,n.child=e.child,n=null):(e=T.treeContext,it=gn(k.nextSibling),Ct=n,qe=!0,fl=null,pn=!1,e!==null&&Id(n,e),n=mo(n,a.children),n.flags|=4096);return n}return o?(yl(),k=a.fallback,o=n.mode,T=e.child,B=T.sibling,a=Yn(T,{mode:"hidden",children:a.children}),a.subtreeFlags=T.subtreeFlags&65011712,B!==null?k=Yn(B,k):(k=Yl(k,o,l,null),k.flags|=2),k.return=n,a.return=n,a.sibling=k,n.child=a,Cr(null,a),a=n.child,k=e.child.memoizedState,k===null?k=ho(l):(o=k.cachePool,o!==null?(T=pt._currentValue,o=o.parent!==T?{parent:T,pool:T}:o):o=$d(),k={baseLanes:k.baseLanes|l,cachePool:o}),a.memoizedState=k,a.childLanes=po(e,b,l),n.memoizedState=fo,Cr(e.child,a)):(xl(n),l=e.child,e=l.sibling,l=Yn(l,{mode:"visible",children:a.children}),l.return=n,l.sibling=null,e!==null&&(b=n.deletions,b===null?(n.deletions=[e],n.flags|=16):b.push(e)),n.child=l,n.memoizedState=null,l)}function mo(e,n){return n=Fa({mode:"visible",children:n},e.mode),n.return=e,e.child=n}function Fa(e,n){return e=Zt(22,e,null,n),e.lanes=0,e}function go(e,n,l){return Zl(n,e.child,null,l),e=mo(n,n.pendingProps.children),e.flags|=2,n.memoizedState=null,e}function ap(e,n,l){e.lanes|=n;var a=e.alternate;a!==null&&(a.lanes|=n),As(e.return,n,l)}function xo(e,n,l,a,o,h){var b=e.memoizedState;b===null?e.memoizedState={isBackwards:n,rendering:null,renderingStartTime:0,last:a,tail:l,tailMode:o,treeForkCount:h}:(b.isBackwards=n,b.rendering=null,b.renderingStartTime=0,b.last=a,b.tail=l,b.tailMode=o,b.treeForkCount=h)}function up(e,n,l){var a=n.pendingProps,o=a.revealOrder,h=a.tail;a=a.children;var b=ft.current,k=(b&2)!==0;if(k?(b=b&1|2,n.flags|=128):b&=1,w(ft,b),_t(e,n,a,l),a=qe?hr:0,!k&&e!==null&&(e.flags&128)!==0)e:for(e=n.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&ap(e,l,n);else if(e.tag===19)ap(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(o){case"forwards":for(l=n.child,o=null;l!==null;)e=l.alternate,e!==null&&Ra(e)===null&&(o=l),l=l.sibling;l=o,l===null?(o=n.child,n.child=null):(o=l.sibling,l.sibling=null),xo(n,!1,o,l,h,a);break;case"backwards":case"unstable_legacy-backwards":for(l=null,o=n.child,n.child=null;o!==null;){if(e=o.alternate,e!==null&&Ra(e)===null){n.child=o;break}e=o.sibling,o.sibling=l,l=o,o=e}xo(n,!0,l,null,h,a);break;case"together":xo(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),Sl|=n.lanes,(l&n.childLanes)===0)if(e!==null){if(Ci(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=Yn(e,e.pendingProps),n.child=l,l.return=n;e.sibling!==null;)e=e.sibling,l=l.sibling=Yn(e,e.pendingProps),l.return=n;l.sibling=null}return n.child}function yo(e,n){return(e.lanes&n)!==0?!0:(e=e.dependencies,!!(e!==null&&Na(e)))}function mb(e,n,l){switch(n.tag){case 3:He(n,n.stateNode.containerInfo),hl(n,pt,e.memoizedState.cache),Gl();break;case 27:case 5:je(n);break;case 4:He(n,n.stateNode.containerInfo);break;case 10:hl(n,n.type,n.memoizedProps.value);break;case 31:if(n.memoizedState!==null)return n.flags|=128,Ys(n),null;break;case 13:var a=n.memoizedState;if(a!==null)return a.dehydrated!==null?(xl(n),n.flags|=128,null):(l&n.child.childLanes)!==0?rp(e,n,l):(xl(n),e=Qn(e,n,l),e!==null?e.sibling:null);xl(n);break;case 19:var o=(e.flags&128)!==0;if(a=(l&n.childLanes)!==0,a||(Ci(e,n,l,!1),a=(l&n.childLanes)!==0),o){if(a)return up(e,n,l);n.flags|=128}if(o=n.memoizedState,o!==null&&(o.rendering=null,o.tail=null,o.lastEffect=null),w(ft,ft.current),a)break;return null;case 22:return n.lanes=0,Wh(e,n,l,n.pendingProps);case 24:hl(n,pt,e.memoizedState.cache)}return Qn(e,n,l)}function sp(e,n,l){if(e!==null)if(e.memoizedProps!==n.pendingProps)gt=!0;else{if(!yo(e,l)&&(n.flags&128)===0)return gt=!1,mb(e,n,l);gt=(e.flags&131072)!==0}else gt=!1,qe&&(n.flags&1048576)!==0&&Hd(n,hr,n.index);switch(n.lanes=0,n.tag){case 16:e:{var a=n.pendingProps;if(e=$l(n.elementType),n.type=e,typeof e=="function")ks(e)?(a=Jl(e,a),n.tag=1,n=lp(null,n,e,a,l)):(n.tag=0,n=co(null,n,e,a,l));else{if(e!=null){var o=e.$$typeof;if(o===$){n.tag=11,n=Kh(null,n,e,a,l);break e}else if(o===H){n.tag=14,n=Jh(null,n,e,a,l);break e}}throw n=oe(e)||e,Error(u(306,n,""))}}return n;case 0:return co(e,n,n.type,n.pendingProps,l);case 1:return a=n.type,o=Jl(a,n.pendingProps),lp(e,n,a,o,l);case 3:e:{if(He(n,n.stateNode.containerInfo),e===null)throw Error(u(387));a=n.pendingProps;var h=n.memoizedState;o=h.element,Us(e,n),Sr(n,a,null,l);var b=n.memoizedState;if(a=b.cache,hl(n,pt,a),a!==h.cache&&zs(n,[pt],l,!0),vr(),a=b.element,h.isDehydrated)if(h={element:a,isDehydrated:!1,cache:b.cache},n.updateQueue.baseState=h,n.memoizedState=h,n.flags&256){n=ip(e,n,a,l);break e}else if(a!==o){o=fn(Error(u(424)),n),pr(o),n=ip(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,it=gn(e.firstChild),Ct=n,qe=!0,fl=null,pn=!0,l=Wd(n,null,a,l),n.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Gl(),a===o){n=Qn(e,n,l);break e}_t(e,n,a,l)}n=n.child}return n;case 26:return Va(e,n),e===null?(l=bm(n.type,null,n.pendingProps,null))?n.memoizedState=l:qe||(l=n.type,e=n.pendingProps,a=uu(he.current).createElement(l),a[Nt]=n,a[Bt]=e,Tt(a,l,e),wt(a),n.stateNode=a):n.memoizedState=bm(n.type,e.memoizedProps,n.pendingProps,e.memoizedState),null;case 27:return je(n),e===null&&qe&&(a=n.stateNode=gm(n.type,n.pendingProps,he.current),Ct=n,pn=!0,o=it,Cl(n.type)?(Jo=o,it=gn(a.firstChild)):it=o),_t(e,n,n.pendingProps.children,l),Va(e,n),e===null&&(n.flags|=4194304),n.child;case 5:return e===null&&qe&&((o=a=it)&&(a=Fb(a,n.type,n.pendingProps,pn),a!==null?(n.stateNode=a,Ct=n,it=gn(a.firstChild),pn=!1,o=!0):o=!1),o||dl(n)),je(n),o=n.type,h=n.pendingProps,b=e!==null?e.memoizedProps:null,a=h.children,Xo(o,h)?a=null:b!==null&&Xo(o,b)&&(n.flags|=32),n.memoizedState!==null&&(o=Vs(e,n,ab,null,null,l),Ir._currentValue=o),Va(e,n),_t(e,n,a,l),n.child;case 6:return e===null&&qe&&((e=l=it)&&(l=Xb(l,n.pendingProps,pn),l!==null?(n.stateNode=l,Ct=n,it=null,e=!0):e=!1),e||dl(n)),null;case 13:return rp(e,n,l);case 4:return He(n,n.stateNode.containerInfo),a=n.pendingProps,e===null?n.child=Zl(n,null,a,l):_t(e,n,a,l),n.child;case 11:return Kh(e,n,n.type,n.pendingProps,l);case 7:return _t(e,n,n.pendingProps,l),n.child;case 8:return _t(e,n,n.pendingProps.children,l),n.child;case 12:return _t(e,n,n.pendingProps.children,l),n.child;case 10:return a=n.pendingProps,hl(n,n.type,a.value),_t(e,n,a.children,l),n.child;case 9:return o=n.type._context,a=n.pendingProps.children,Fl(n),o=Et(o),a=a(o),n.flags|=1,_t(e,n,a,l),n.child;case 14:return Jh(e,n,n.type,n.pendingProps,l);case 15:return Ph(e,n,n.type,n.pendingProps,l);case 19:return up(e,n,l);case 31:return pb(e,n,l);case 22:return Wh(e,n,l,n.pendingProps);case 24:return Fl(n),a=Et(pt),e===null?(o=Ms(),o===null&&(o=tt,h=Ds(),o.pooledCache=h,h.refCount++,h!==null&&(o.pooledCacheLanes|=l),o=h),n.memoizedState={parent:a,cache:o},Ls(n),hl(n,pt,o)):((e.lanes&l)!==0&&(Us(e,n),Sr(n,null,null,l),vr()),o=e.memoizedState,h=n.memoizedState,o.parent!==a?(o={parent:a,cache:a},n.memoizedState=o,n.lanes===0&&(n.memoizedState=n.updateQueue.baseState=o),hl(n,pt,a)):(a=h.cache,hl(n,pt,a),a!==o.cache&&zs(n,[pt],l,!0))),_t(e,n,n.pendingProps.children,l),n.child;case 29:throw n.pendingProps}throw Error(u(156,n.tag))}function Zn(e){e.flags|=4}function bo(e,n,l,a,o){if((n=(e.mode&32)!==0)&&(n=!1),n){if(e.flags|=16777216,(o&335544128)===o)if(e.stateNode.complete)e.flags|=8192;else if(Op())e.flags|=8192;else throw Ql=Ta,Os}else e.flags&=-16777217}function op(e,n){if(n.type!=="stylesheet"||(n.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!jm(n))if(Op())e.flags|=8192;else throw Ql=Ta,Os}function Xa(e,n){n!==null&&(e.flags|=4),e.flags&16384&&(n=e.tag!==22?st():536870912,e.lanes|=n,qi|=n)}function Er(e,n){if(!qe)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 rt(e){var n=e.alternate!==null&&e.alternate.child===e.child,l=0,a=0;if(n)for(var o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags&65011712,a|=o.flags&65011712,o.return=e,o=o.sibling;else for(o=e.child;o!==null;)l|=o.lanes|o.childLanes,a|=o.subtreeFlags,a|=o.flags,o.return=e,o=o.sibling;return e.subtreeFlags|=a,e.childLanes=l,n}function gb(e,n,l){var a=n.pendingProps;switch(Cs(n),n.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return rt(n),null;case 1:return rt(n),null;case 3:return l=n.stateNode,a=null,e!==null&&(a=e.memoizedState.cache),n.memoizedState.cache!==a&&(n.flags|=2048),Fn(pt),W(),l.pendingContext&&(l.context=l.pendingContext,l.pendingContext=null),(e===null||e.child===null)&&(Ni(n)?Zn(n):e===null||e.memoizedState.isDehydrated&&(n.flags&256)===0||(n.flags|=1024,_s())),rt(n),null;case 26:var o=n.type,h=n.memoizedState;return e===null?(Zn(n),h!==null?(rt(n),op(n,h)):(rt(n),bo(n,o,null,a,l))):h?h!==e.memoizedState?(Zn(n),rt(n),op(n,h)):(rt(n),n.flags&=-16777217):(e=e.memoizedProps,e!==a&&Zn(n),rt(n),bo(n,o,e,a,l)),null;case 27:if(Qe(n),l=he.current,o=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return rt(n),null}e=se.current,Ni(n)?Yd(n):(e=gm(o,a,l),n.stateNode=e,Zn(n))}return rt(n),null;case 5:if(Qe(n),o=n.type,e!==null&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(!a){if(n.stateNode===null)throw Error(u(166));return rt(n),null}if(h=se.current,Ni(n))Yd(n);else{var b=uu(he.current);switch(h){case 1:h=b.createElementNS("http://www.w3.org/2000/svg",o);break;case 2:h=b.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;default:switch(o){case"svg":h=b.createElementNS("http://www.w3.org/2000/svg",o);break;case"math":h=b.createElementNS("http://www.w3.org/1998/Math/MathML",o);break;case"script":h=b.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof a.is=="string"?b.createElement("select",{is:a.is}):b.createElement("select"),a.multiple?h.multiple=!0:a.size&&(h.size=a.size);break;default:h=typeof a.is=="string"?b.createElement(o,{is:a.is}):b.createElement(o)}}h[Nt]=n,h[Bt]=a;e:for(b=n.child;b!==null;){if(b.tag===5||b.tag===6)h.appendChild(b.stateNode);else if(b.tag!==4&&b.tag!==27&&b.child!==null){b.child.return=b,b=b.child;continue}if(b===n)break e;for(;b.sibling===null;){if(b.return===null||b.return===n)break e;b=b.return}b.sibling.return=b.return,b=b.sibling}n.stateNode=h;e:switch(Tt(h,o,a),o){case"button":case"input":case"select":case"textarea":a=!!a.autoFocus;break e;case"img":a=!0;break e;default:a=!1}a&&Zn(n)}}return rt(n),bo(n,n.type,e===null?null:e.memoizedProps,n.pendingProps,l),null;case 6:if(e&&n.stateNode!=null)e.memoizedProps!==a&&Zn(n);else{if(typeof a!="string"&&n.stateNode===null)throw Error(u(166));if(e=he.current,Ni(n)){if(e=n.stateNode,l=n.memoizedProps,a=null,o=Ct,o!==null)switch(o.tag){case 27:case 5:a=o.memoizedProps}e[Nt]=n,e=!!(e.nodeValue===l||a!==null&&a.suppressHydrationWarning===!0||rm(e.nodeValue,l)),e||dl(n,!0)}else e=uu(e).createTextNode(a),e[Nt]=n,n.stateNode=e}return rt(n),null;case 31:if(l=n.memoizedState,e===null||e.memoizedState!==null){if(a=Ni(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 Gl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;rt(n),e=!1}else l=_s(),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 rt(n),null;case 13:if(a=n.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(o=Ni(n),a!==null&&a.dehydrated!==null){if(e===null){if(!o)throw Error(u(318));if(o=n.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(u(317));o[Nt]=n}else Gl(),(n.flags&128)===0&&(n.memoizedState=null),n.flags|=4;rt(n),o=!1}else o=_s(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=o),o=!0;if(!o)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,o=null,a.alternate!==null&&a.alternate.memoizedState!==null&&a.alternate.memoizedState.cachePool!==null&&(o=a.alternate.memoizedState.cachePool.pool),h=null,a.memoizedState!==null&&a.memoizedState.cachePool!==null&&(h=a.memoizedState.cachePool.pool),h!==o&&(a.flags|=2048)),l!==e&&l&&(n.child.flags|=8192),Xa(n,n.updateQueue),rt(n),null);case 4:return W(),e===null&&Io(n.stateNode.containerInfo),rt(n),null;case 10:return Fn(n.type),rt(n),null;case 19:if(V(ft),a=n.memoizedState,a===null)return rt(n),null;if(o=(n.flags&128)!==0,h=a.rendering,h===null)if(o)Er(a,!1);else{if(ct!==0||e!==null&&(e.flags&128)!==0)for(e=n.child;e!==null;){if(h=Ra(e),h!==null){for(n.flags|=128,Er(a,!1),e=h.updateQueue,n.updateQueue=e,Xa(n,e),n.subtreeFlags=0,e=l,l=n.child;l!==null;)Ud(l,e),l=l.sibling;return w(ft,ft.current&1|2),qe&&Gn(n,a.treeForkCount),n.child}e=e.sibling}a.tail!==null&&Ue()>Ja&&(n.flags|=128,o=!0,Er(a,!1),n.lanes=4194304)}else{if(!o)if(e=Ra(h),e!==null){if(n.flags|=128,o=!0,e=e.updateQueue,n.updateQueue=e,Xa(n,e),Er(a,!0),a.tail===null&&a.tailMode==="hidden"&&!h.alternate&&!qe)return rt(n),null}else 2*Ue()-a.renderingStartTime>Ja&&l!==536870912&&(n.flags|=128,o=!0,Er(a,!1),n.lanes=4194304);a.isBackwards?(h.sibling=n.child,n.child=h):(e=a.last,e!==null?e.sibling=h:n.child=h,a.last=h)}return a.tail!==null?(e=a.tail,a.rendering=e,a.tail=e.sibling,a.renderingStartTime=Ue(),e.sibling=null,l=ft.current,w(ft,o?l&1|2:l&1),qe&&Gn(n,a.treeForkCount),e):(rt(n),null);case 22:case 23:return Jt(n),Is(),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&&(rt(n),n.subtreeFlags&6&&(n.flags|=8192)):rt(n),l=n.updateQueue,l!==null&&Xa(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&&V(Xl),null;case 24:return l=null,e!==null&&(l=e.memoizedState.cache),n.memoizedState.cache!==l&&(n.flags|=2048),Fn(pt),rt(n),null;case 25:return null;case 30:return null}throw Error(u(156,n.tag))}function xb(e,n){switch(Cs(n),n.tag){case 1:return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return Fn(pt),W(),e=n.flags,(e&65536)!==0&&(e&128)===0?(n.flags=e&-65537|128,n):null;case 26:case 27:case 5:return Qe(n),null;case 31:if(n.memoizedState!==null){if(Jt(n),n.alternate===null)throw Error(u(340));Gl()}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));Gl()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return V(ft),null;case 4:return W(),null;case 10:return Fn(n.type),null;case 22:case 23:return Jt(n),Is(),e!==null&&V(Xl),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 24:return Fn(pt),null;case 25:return null;default:return null}}function cp(e,n){switch(Cs(n),n.tag){case 3:Fn(pt),W();break;case 26:case 27:case 5:Qe(n);break;case 4:W();break;case 31:n.memoizedState!==null&&Jt(n);break;case 13:Jt(n);break;case 19:V(ft);break;case 10:Fn(n.type);break;case 22:case 23:Jt(n),Is(),e!==null&&V(Xl);break;case 24:Fn(pt)}}function _r(e,n){try{var l=n.updateQueue,a=l!==null?l.lastEffect:null;if(a!==null){var o=a.next;l=o;do{if((l.tag&e)===e){a=void 0;var h=l.create,b=l.inst;a=h(),b.destroy=a}l=l.next}while(l!==o)}}catch(k){Je(n,n.return,k)}}function bl(e,n,l){try{var a=n.updateQueue,o=a!==null?a.lastEffect:null;if(o!==null){var h=o.next;a=h;do{if((a.tag&e)===e){var b=a.inst,k=b.destroy;if(k!==void 0){b.destroy=void 0,o=n;var T=l,B=k;try{B()}catch(X){Je(o,T,X)}}}a=a.next}while(a!==h)}}catch(X){Je(n,n.return,X)}}function fp(e){var n=e.updateQueue;if(n!==null){var l=e.stateNode;try{th(n,l)}catch(a){Je(e,e.return,a)}}}function dp(e,n,l){l.props=Jl(e.type,e.memoizedProps),l.state=e.memoizedState;try{l.componentWillUnmount()}catch(a){Je(e,n,a)}}function Tr(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(o){Je(e,n,o)}}function Dn(e,n){var l=e.ref,a=e.refCleanup;if(l!==null)if(typeof a=="function")try{a()}catch(o){Je(e,n,o)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof l=="function")try{l(null)}catch(o){Je(e,n,o)}else l.current=null}function hp(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(o){Je(e,e.return,o)}}function vo(e,n,l){try{var a=e.stateNode;Bb(a,e.type,l,n),a[Bt]=n}catch(o){Je(e,e.return,o)}}function pp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Cl(e.type)||e.tag===4}function So(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||pp(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&&Cl(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 ko(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=Hn));else if(a!==4&&(a===27&&Cl(e.type)&&(l=e.stateNode,n=null),e=e.child,e!==null))for(ko(e,n,l),e=e.sibling;e!==null;)ko(e,n,l),e=e.sibling}function $a(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&&Cl(e.type)&&(l=e.stateNode),e=e.child,e!==null))for($a(e,n,l),e=e.sibling;e!==null;)$a(e,n,l),e=e.sibling}function mp(e){var n=e.stateNode,l=e.memoizedProps;try{for(var a=e.type,o=n.attributes;o.length;)n.removeAttributeNode(o[0]);Tt(n,a,l),n[Nt]=e,n[Bt]=l}catch(h){Je(e,e.return,h)}}var Kn=!1,xt=!1,wo=!1,gp=typeof WeakSet=="function"?WeakSet:Set,jt=null;function yb(e,n){if(e=e.containerInfo,Vo=pu,e=_d(e),ms(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 o=a.anchorOffset,h=a.focusNode;a=a.focusOffset;try{l.nodeType,h.nodeType}catch{l=null;break e}var b=0,k=-1,T=-1,B=0,X=0,K=e,I=null;t:for(;;){for(var Y;K!==l||o!==0&&K.nodeType!==3||(k=b+o),K!==h||a!==0&&K.nodeType!==3||(T=b+a),K.nodeType===3&&(b+=K.nodeValue.length),(Y=K.firstChild)!==null;)I=K,K=Y;for(;;){if(K===e)break t;if(I===l&&++B===o&&(k=b),I===h&&++X===a&&(T=b),(Y=K.nextSibling)!==null)break;K=I,I=K.parentNode}K=Y}l=k===-1||T===-1?null:{start:k,end:T}}else l=null}l=l||{start:0,end:0}}else l=null;for(Fo={focusedElem:e,selectionRange:l},pu=!1,jt=n;jt!==null;)if(n=jt,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,jt=e;else for(;jt!==null;){switch(n=jt,h=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++)o=e[l],o.ref.impl=o.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,l=n,o=h.memoizedProps,h=h.memoizedState,a=l.stateNode;try{var pe=Jl(l.type,o);e=a.getSnapshotBeforeUpdate(pe,h),a.__reactInternalSnapshotBeforeUpdate=e}catch(Se){Je(l,l.return,Se)}}break;case 3:if((e&1024)!==0){if(e=n.stateNode.containerInfo,l=e.nodeType,l===9)Qo(e);else if(l===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Qo(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,jt=e;break}jt=n.return}}function xp(e,n,l){var a=l.flags;switch(l.tag){case 0:case 11:case 15:Pn(e,l),a&4&&_r(5,l);break;case 1:if(Pn(e,l),a&4)if(e=l.stateNode,n===null)try{e.componentDidMount()}catch(b){Je(l,l.return,b)}else{var o=Jl(l.type,n.memoizedProps);n=n.memoizedState;try{e.componentDidUpdate(o,n,e.__reactInternalSnapshotBeforeUpdate)}catch(b){Je(l,l.return,b)}}a&64&&fp(l),a&512&&Tr(l,l.return);break;case 3:if(Pn(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{th(e,n)}catch(b){Je(l,l.return,b)}}break;case 27:n===null&&a&4&&mp(l);case 26:case 5:Pn(e,l),n===null&&a&4&&hp(l),a&512&&Tr(l,l.return);break;case 12:Pn(e,l);break;case 31:Pn(e,l),a&4&&vp(e,l);break;case 13:Pn(e,l),a&4&&Sp(e,l),a&64&&(e=l.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(l=Eb.bind(null,l),$b(e,l))));break;case 22:if(a=l.memoizedState!==null||Kn,!a){n=n!==null&&n.memoizedState!==null||xt,o=Kn;var h=xt;Kn=a,(xt=n)&&!h?Wn(e,l,(l.subtreeFlags&8772)!==0):Pn(e,l),Kn=o,xt=h}break;case 30:break;default:Pn(e,l)}}function yp(e){var n=e.alternate;n!==null&&(e.alternate=null,yp(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&Pu(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 at=null,It=!1;function Jn(e,n,l){for(l=l.child;l!==null;)bp(e,n,l),l=l.sibling}function bp(e,n,l){if(ut&&typeof ut.onCommitFiberUnmount=="function")try{ut.onCommitFiberUnmount(St,l)}catch{}switch(l.tag){case 26:xt||Dn(l,n),Jn(e,n,l),l.memoizedState?l.memoizedState.count--:l.stateNode&&(l=l.stateNode,l.parentNode.removeChild(l));break;case 27:xt||Dn(l,n);var a=at,o=It;Cl(l.type)&&(at=l.stateNode,It=!1),Jn(e,n,l),qr(l.stateNode),at=a,It=o;break;case 5:xt||Dn(l,n);case 6:if(a=at,o=It,at=null,Jn(e,n,l),at=a,It=o,at!==null)if(It)try{(at.nodeType===9?at.body:at.nodeName==="HTML"?at.ownerDocument.body:at).removeChild(l.stateNode)}catch(h){Je(l,n,h)}else try{at.removeChild(l.stateNode)}catch(h){Je(l,n,h)}break;case 18:at!==null&&(It?(e=at,fm(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,l.stateNode),Xi(e)):fm(at,l.stateNode));break;case 4:a=at,o=It,at=l.stateNode.containerInfo,It=!0,Jn(e,n,l),at=a,It=o;break;case 0:case 11:case 14:case 15:bl(2,l,n),xt||bl(4,l,n),Jn(e,n,l);break;case 1:xt||(Dn(l,n),a=l.stateNode,typeof a.componentWillUnmount=="function"&&dp(l,n,a)),Jn(e,n,l);break;case 21:Jn(e,n,l);break;case 22:xt=(a=xt)||l.memoizedState!==null,Jn(e,n,l),xt=a;break;default:Jn(e,n,l)}}function vp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Xi(e)}catch(l){Je(n,n.return,l)}}}function Sp(e,n){if(n.memoizedState===null&&(e=n.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Xi(e)}catch(l){Je(n,n.return,l)}}function bb(e){switch(e.tag){case 31:case 13:case 19:var n=e.stateNode;return n===null&&(n=e.stateNode=new gp),n;case 22:return e=e.stateNode,n=e._retryCache,n===null&&(n=e._retryCache=new gp),n;default:throw Error(u(435,e.tag))}}function Qa(e,n){var l=bb(e);n.forEach(function(a){if(!l.has(a)){l.add(a);var o=_b.bind(null,e,a);a.then(o,o)}})}function Yt(e,n){var l=n.deletions;if(l!==null)for(var a=0;a<l.length;a++){var o=l[a],h=e,b=n,k=b;e:for(;k!==null;){switch(k.tag){case 27:if(Cl(k.type)){at=k.stateNode,It=!1;break e}break;case 5:at=k.stateNode,It=!1;break e;case 3:case 4:at=k.stateNode.containerInfo,It=!0;break e}k=k.return}if(at===null)throw Error(u(160));bp(h,b,o),at=null,It=!1,h=o.alternate,h!==null&&(h.return=null),o.return=null}if(n.subtreeFlags&13886)for(n=n.child;n!==null;)kp(n,e),n=n.sibling}var Sn=null;function kp(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&&(bl(3,e,e.return),_r(3,e),bl(5,e,e.return));break;case 1:Yt(n,e),Gt(e),a&512&&(xt||l===null||Dn(l,l.return)),a&64&&Kn&&(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 o=Sn;if(Yt(n,e),Gt(e),a&512&&(xt||l===null||Dn(l,l.return)),a&4){var h=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,o=o.ownerDocument||o;t:switch(a){case"title":h=o.getElementsByTagName("title")[0],(!h||h[nr]||h[Nt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=o.createElement(a),o.head.insertBefore(h,o.querySelector("head > title"))),Tt(h,a,l),h[Nt]=e,wt(h),a=h;break e;case"link":var b=km("link","href",o).get(a+(l.href||""));if(b){for(var k=0;k<b.length;k++)if(h=b[k],h.getAttribute("href")===(l.href==null||l.href===""?null:l.href)&&h.getAttribute("rel")===(l.rel==null?null:l.rel)&&h.getAttribute("title")===(l.title==null?null:l.title)&&h.getAttribute("crossorigin")===(l.crossOrigin==null?null:l.crossOrigin)){b.splice(k,1);break t}}h=o.createElement(a),Tt(h,a,l),o.head.appendChild(h);break;case"meta":if(b=km("meta","content",o).get(a+(l.content||""))){for(k=0;k<b.length;k++)if(h=b[k],h.getAttribute("content")===(l.content==null?null:""+l.content)&&h.getAttribute("name")===(l.name==null?null:l.name)&&h.getAttribute("property")===(l.property==null?null:l.property)&&h.getAttribute("http-equiv")===(l.httpEquiv==null?null:l.httpEquiv)&&h.getAttribute("charset")===(l.charSet==null?null:l.charSet)){b.splice(k,1);break t}}h=o.createElement(a),Tt(h,a,l),o.head.appendChild(h);break;default:throw Error(u(468,a))}h[Nt]=e,wt(h),a=h}e.stateNode=a}else wm(o,e.type,e.stateNode);else e.stateNode=Sm(o,a,e.memoizedProps);else h!==a?(h===null?l.stateNode!==null&&(l=l.stateNode,l.parentNode.removeChild(l)):h.count--,a===null?wm(o,e.type,e.stateNode):Sm(o,a,e.memoizedProps)):a===null&&e.stateNode!==null&&vo(e,e.memoizedProps,l.memoizedProps)}break;case 27:Yt(n,e),Gt(e),a&512&&(xt||l===null||Dn(l,l.return)),l!==null&&a&4&&vo(e,e.memoizedProps,l.memoizedProps);break;case 5:if(Yt(n,e),Gt(e),a&512&&(xt||l===null||Dn(l,l.return)),e.flags&32){o=e.stateNode;try{mi(o,"")}catch(pe){Je(e,e.return,pe)}}a&4&&e.stateNode!=null&&(o=e.memoizedProps,vo(e,o,l!==null?l.memoizedProps:o)),a&1024&&(wo=!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(pe){Je(e,e.return,pe)}}break;case 3:if(cu=null,o=Sn,Sn=su(n.containerInfo),Yt(n,e),Sn=o,Gt(e),a&4&&l!==null&&l.memoizedState.isDehydrated)try{Xi(n.containerInfo)}catch(pe){Je(e,e.return,pe)}wo&&(wo=!1,wp(e));break;case 4:a=Sn,Sn=su(e.stateNode.containerInfo),Yt(n,e),Gt(e),Sn=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)&&(Ka=Ue()),a&4&&(a=e.updateQueue,a!==null&&(e.updateQueue=null,Qa(e,a)));break;case 22:o=e.memoizedState!==null;var T=l!==null&&l.memoizedState!==null,B=Kn,X=xt;if(Kn=B||o,xt=X||T,Yt(n,e),xt=X,Kn=B,Gt(e),a&8192)e:for(n=e.stateNode,n._visibility=o?n._visibility&-2:n._visibility|1,o&&(l===null||T||Kn||xt||Pl(e)),l=null,n=e;;){if(n.tag===5||n.tag===26){if(l===null){T=l=n;try{if(h=T.stateNode,o)b=h.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none";else{k=T.stateNode;var K=T.memoizedProps.style,I=K!=null&&K.hasOwnProperty("display")?K.display:null;k.style.display=I==null||typeof I=="boolean"?"":(""+I).trim()}}catch(pe){Je(T,T.return,pe)}}}else if(n.tag===6){if(l===null){T=n;try{T.stateNode.nodeValue=o?"":T.memoizedProps}catch(pe){Je(T,T.return,pe)}}}else if(n.tag===18){if(l===null){T=n;try{var Y=T.stateNode;o?dm(Y,!0):dm(T.stateNode,!1)}catch(pe){Je(T,T.return,pe)}}}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(pp(a)){l=a;break}a=a.return}if(l==null)throw Error(u(160));switch(l.tag){case 27:var o=l.stateNode,h=So(e);$a(e,h,o);break;case 5:var b=l.stateNode;l.flags&32&&(mi(b,""),l.flags&=-33);var k=So(e);$a(e,k,b);break;case 3:case 4:var T=l.stateNode.containerInfo,B=So(e);ko(e,B,T);break;default:throw Error(u(161))}}catch(X){Je(e,e.return,X)}e.flags&=-3}n&4096&&(e.flags&=-4097)}function wp(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var n=e;wp(n),n.tag===5&&n.flags&1024&&n.stateNode.reset(),e=e.sibling}}function Pn(e,n){if(n.subtreeFlags&8772)for(n=n.child;n!==null;)xp(e,n.alternate,n),n=n.sibling}function Pl(e){for(e=e.child;e!==null;){var n=e;switch(n.tag){case 0:case 11:case 14:case 15:bl(4,n,n.return),Pl(n);break;case 1:Dn(n,n.return);var l=n.stateNode;typeof l.componentWillUnmount=="function"&&dp(n,n.return,l),Pl(n);break;case 27:qr(n.stateNode);case 26:case 5:Dn(n,n.return),Pl(n);break;case 22:n.memoizedState===null&&Pl(n);break;case 30:Pl(n);break;default:Pl(n)}e=e.sibling}}function Wn(e,n,l){for(l=l&&(n.subtreeFlags&8772)!==0,n=n.child;n!==null;){var a=n.alternate,o=e,h=n,b=h.flags;switch(h.tag){case 0:case 11:case 15:Wn(o,h,l),_r(4,h);break;case 1:if(Wn(o,h,l),a=h,o=a.stateNode,typeof o.componentDidMount=="function")try{o.componentDidMount()}catch(B){Je(a,a.return,B)}if(a=h,o=a.updateQueue,o!==null){var k=a.stateNode;try{var T=o.shared.hiddenCallbacks;if(T!==null)for(o.shared.hiddenCallbacks=null,o=0;o<T.length;o++)eh(T[o],k)}catch(B){Je(a,a.return,B)}}l&&b&64&&fp(h),Tr(h,h.return);break;case 27:mp(h);case 26:case 5:Wn(o,h,l),l&&a===null&&b&4&&hp(h),Tr(h,h.return);break;case 12:Wn(o,h,l);break;case 31:Wn(o,h,l),l&&b&4&&vp(o,h);break;case 13:Wn(o,h,l),l&&b&4&&Sp(o,h);break;case 22:h.memoizedState===null&&Wn(o,h,l),Tr(h,h.return);break;case 30:break;default:Wn(o,h,l)}n=n.sibling}}function jo(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&&mr(l))}function No(e,n){e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&mr(e))}function kn(e,n,l,a){if(n.subtreeFlags&10256)for(n=n.child;n!==null;)jp(e,n,l,a),n=n.sibling}function jp(e,n,l,a){var o=n.flags;switch(n.tag){case 0:case 11:case 15:kn(e,n,l,a),o&2048&&_r(9,n);break;case 1:kn(e,n,l,a);break;case 3:kn(e,n,l,a),o&2048&&(e=null,n.alternate!==null&&(e=n.alternate.memoizedState.cache),n=n.memoizedState.cache,n!==e&&(n.refCount++,e!=null&&mr(e)));break;case 12:if(o&2048){kn(e,n,l,a),e=n.stateNode;try{var h=n.memoizedProps,b=h.id,k=h.onPostCommit;typeof k=="function"&&k(b,n.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(T){Je(n,n.return,T)}}else kn(e,n,l,a);break;case 31:kn(e,n,l,a);break;case 13:kn(e,n,l,a);break;case 23:break;case 22:h=n.stateNode,b=n.alternate,n.memoizedState!==null?h._visibility&2?kn(e,n,l,a):Ar(e,n):h._visibility&2?kn(e,n,l,a):(h._visibility|=2,Oi(e,n,l,a,(n.subtreeFlags&10256)!==0||!1)),o&2048&&jo(b,n);break;case 24:kn(e,n,l,a),o&2048&&No(n.alternate,n);break;default:kn(e,n,l,a)}}function Oi(e,n,l,a,o){for(o=o&&((n.subtreeFlags&10256)!==0||!1),n=n.child;n!==null;){var h=e,b=n,k=l,T=a,B=b.flags;switch(b.tag){case 0:case 11:case 15:Oi(h,b,k,T,o),_r(8,b);break;case 23:break;case 22:var X=b.stateNode;b.memoizedState!==null?X._visibility&2?Oi(h,b,k,T,o):Ar(h,b):(X._visibility|=2,Oi(h,b,k,T,o)),o&&B&2048&&jo(b.alternate,b);break;case 24:Oi(h,b,k,T,o),o&&B&2048&&No(b.alternate,b);break;default:Oi(h,b,k,T,o)}n=n.sibling}}function Ar(e,n){if(n.subtreeFlags&10256)for(n=n.child;n!==null;){var l=e,a=n,o=a.flags;switch(a.tag){case 22:Ar(l,a),o&2048&&jo(a.alternate,a);break;case 24:Ar(l,a),o&2048&&No(a.alternate,a);break;default:Ar(l,a)}n=n.sibling}}var zr=8192;function Li(e,n,l){if(e.subtreeFlags&zr)for(e=e.child;e!==null;)Np(e,n,l),e=e.sibling}function Np(e,n,l){switch(e.tag){case 26:Li(e,n,l),e.flags&zr&&e.memoizedState!==null&&r0(l,Sn,e.memoizedState,e.memoizedProps);break;case 5:Li(e,n,l);break;case 3:case 4:var a=Sn;Sn=su(e.stateNode.containerInfo),Li(e,n,l),Sn=a;break;case 22:e.memoizedState===null&&(a=e.alternate,a!==null&&a.memoizedState!==null?(a=zr,zr=16777216,Li(e,n,l),zr=a):Li(e,n,l));break;default:Li(e,n,l)}}function Cp(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 Dr(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];jt=a,_p(a,e)}Cp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Ep(e),e=e.sibling}function Ep(e){switch(e.tag){case 0:case 11:case 15:Dr(e),e.flags&2048&&bl(9,e,e.return);break;case 3:Dr(e);break;case 12:Dr(e);break;case 22:var n=e.stateNode;e.memoizedState!==null&&n._visibility&2&&(e.return===null||e.return.tag!==13)?(n._visibility&=-3,Za(e)):Dr(e);break;default:Dr(e)}}function Za(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];jt=a,_p(a,e)}Cp(e)}for(e=e.child;e!==null;){switch(n=e,n.tag){case 0:case 11:case 15:bl(8,n,n.return),Za(n);break;case 22:l=n.stateNode,l._visibility&2&&(l._visibility&=-3,Za(n));break;default:Za(n)}e=e.sibling}}function _p(e,n){for(;jt!==null;){var l=jt;switch(l.tag){case 0:case 11:case 15:bl(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:mr(l.memoizedState.cache)}if(a=l.child,a!==null)a.return=l,jt=a;else e:for(l=e;jt!==null;){a=jt;var o=a.sibling,h=a.return;if(yp(a),a===l){jt=null;break e}if(o!==null){o.return=h,jt=o;break e}jt=h}}}var vb={getCacheForType:function(e){var n=Et(pt),l=n.data.get(e);return l===void 0&&(l=e(),n.data.set(e,l)),l},cacheSignal:function(){return Et(pt).controller.signal}},Sb=typeof WeakMap=="function"?WeakMap:Map,Xe=0,tt=null,De=null,Oe=0,Ke=0,Pt=null,vl=!1,Ui=!1,Co=!1,el=0,ct=0,Sl=0,Wl=0,Eo=0,Wt=0,qi=0,Rr=null,Vt=null,_o=!1,Ka=0,Tp=0,Ja=1/0,Pa=null,kl=null,vt=0,wl=null,Bi=null,tl=0,To=0,Ao=null,Ap=null,Mr=0,zo=null;function en(){return(Xe&2)!==0&&Oe!==0?Oe&-Oe:D.T!==null?Uo():Xf()}function zp(){if(Wt===0)if((Oe&536870912)===0||qe){var e=ui;ui<<=1,(ui&3932160)===0&&(ui=262144),Wt=e}else Wt=536870912;return e=Kt.current,e!==null&&(e.flags|=32),Wt}function Ft(e,n,l){(e===tt&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)&&(Hi(e,0),jl(e,Oe,Wt,!1)),tr(e,l),((Xe&2)===0||e!==tt)&&(e===tt&&((Xe&2)===0&&(Wl|=l),ct===4&&jl(e,Oe,Wt,!1)),Rn(e))}function Dp(e,n,l){if((Xe&6)!==0)throw Error(u(327));var a=!l&&(n&127)===0&&(n&e.expiredLanes)===0||de(e,n),o=a?jb(e,n):Ro(e,n,!0),h=a;do{if(o===0){Ui&&!a&&jl(e,n,0,!1);break}else{if(l=e.current.alternate,h&&!kb(l)){o=Ro(e,n,!1),h=!1;continue}if(o===2){if(h=n,e.errorRecoveryDisabledLanes&h)var b=0;else b=e.pendingLanes&-536870913,b=b!==0?b:b&536870912?536870912:0;if(b!==0){n=b;e:{var k=e;o=Rr;var T=k.current.memoizedState.isDehydrated;if(T&&(Hi(k,b).flags|=256),b=Ro(k,b,!1),b!==2){if(Co&&!T){k.errorRecoveryDisabledLanes|=h,Wl|=h,o=4;break e}h=Vt,Vt=o,h!==null&&(Vt===null?Vt=h:Vt.push.apply(Vt,h))}o=b}if(h=!1,o!==2)continue}}if(o===1){Hi(e,0),jl(e,n,0,!0);break}e:{switch(a=e,h=o,h){case 0:case 1:throw Error(u(345));case 4:if((n&4194048)!==n)break;case 6:jl(a,n,Wt,!vl);break e;case 2:Vt=null;break;case 3:case 5:break;default:throw Error(u(329))}if((n&62914560)===n&&(o=Ka+300-Ue(),10<o)){if(jl(a,n,Wt,!vl),J(a,0,!0)!==0)break e;tl=n,a.timeoutHandle=om(Rp.bind(null,a,l,Vt,Pa,_o,n,Wt,Wl,qi,vl,h,"Throttled",-0,0),o);break e}Rp(a,l,Vt,Pa,_o,n,Wt,Wl,qi,vl,h,null,-0,0)}}break}while(!0);Rn(e)}function Rp(e,n,l,a,o,h,b,k,T,B,X,K,I,Y){if(e.timeoutHandle=-1,K=n.subtreeFlags,K&8192||(K&16785408)===16785408){K={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Hn},Np(n,h,K);var pe=(h&62914560)===h?Ka-Ue():(h&4194048)===h?Tp-Ue():0;if(pe=a0(K,pe),pe!==null){tl=h,e.cancelPendingCommit=pe(Ip.bind(null,e,n,h,l,a,o,b,k,T,X,K,null,I,Y)),jl(e,h,b,!B);return}}Ip(e,n,h,l,a,o,b,k,T)}function kb(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 o=l[a],h=o.getSnapshot;o=o.value;try{if(!Qt(h(),o))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 jl(e,n,l,a){n&=~Eo,n&=~Wl,e.suspendedLanes|=n,e.pingedLanes&=~n,a&&(e.warmLanes|=n),a=e.expirationTimes;for(var o=n;0<o;){var h=31-Ze(o),b=1<<h;a[h]=-1,o&=~b}l!==0&&Gf(e,l,n)}function Wa(){return(Xe&6)===0?(Or(0),!1):!0}function Do(){if(De!==null){if(Ke===0)var e=De.return;else e=De,Vn=Vl=null,$s(e),Ai=null,xr=0,e=De;for(;e!==null;)cp(e.alternate,e),e=e.return;De=null}}function Hi(e,n){var l=e.timeoutHandle;l!==-1&&(e.timeoutHandle=-1,Yb(l)),l=e.cancelPendingCommit,l!==null&&(e.cancelPendingCommit=null,l()),tl=0,Do(),tt=e,De=l=Yn(e.current,null),Oe=n,Ke=0,Pt=null,vl=!1,Ui=de(e,n),Co=!1,qi=Wt=Eo=Wl=Sl=ct=0,Vt=Rr=null,_o=!1,(n&8)!==0&&(n|=n&32);var a=e.entangledLanes;if(a!==0)for(e=e.entanglements,a&=n;0<a;){var o=31-Ze(a),h=1<<o;n|=e[o],a&=~h}return el=n,va(),l}function Mp(e,n){Te=null,D.H=Nr,n===Ti||n===_a?(n=Kd(),Ke=3):n===Os?(n=Kd(),Ke=4):Ke=n===oo?8:n!==null&&typeof n=="object"&&typeof n.then=="function"?6:1,Pt=n,De===null&&(ct=1,Ya(e,fn(n,e.current)))}function Op(){var e=Kt.current;return e===null?!0:(Oe&4194048)===Oe?mn===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===mn:!1}function Lp(){var e=D.H;return D.H=Nr,e===null?Nr:e}function Up(){var e=D.A;return D.A=vb,e}function eu(){ct=4,vl||(Oe&4194048)!==Oe&&Kt.current!==null||(Ui=!0),(Sl&134217727)===0&&(Wl&134217727)===0||tt===null||jl(tt,Oe,Wt,!1)}function Ro(e,n,l){var a=Xe;Xe|=2;var o=Lp(),h=Up();(tt!==e||Oe!==n)&&(Pa=null,Hi(e,n)),n=!1;var b=ct;e:do try{if(Ke!==0&&De!==null){var k=De,T=Pt;switch(Ke){case 8:Do(),b=6;break e;case 3:case 2:case 9:case 6:Kt.current===null&&(n=!0);var B=Ke;if(Ke=0,Pt=null,Ii(e,k,T,B),l&&Ui){b=0;break e}break;default:B=Ke,Ke=0,Pt=null,Ii(e,k,T,B)}}wb(),b=ct;break}catch(X){Mp(e,X)}while(!0);return n&&e.shellSuspendCounter++,Vn=Vl=null,Xe=a,D.H=o,D.A=h,De===null&&(tt=null,Oe=0,va()),b}function wb(){for(;De!==null;)qp(De)}function jb(e,n){var l=Xe;Xe|=2;var a=Lp(),o=Up();tt!==e||Oe!==n?(Pa=null,Ja=Ue()+500,Hi(e,n)):Ui=de(e,n);e:do try{if(Ke!==0&&De!==null){n=De;var h=Pt;t:switch(Ke){case 1:Ke=0,Pt=null,Ii(e,n,h,1);break;case 2:case 9:if(Qd(h)){Ke=0,Pt=null,Bp(n);break}n=function(){Ke!==2&&Ke!==9||tt!==e||(Ke=7),Rn(e)},h.then(n,n);break e;case 3:Ke=7;break e;case 4:Ke=5;break e;case 7:Qd(h)?(Ke=0,Pt=null,Bp(n)):(Ke=0,Pt=null,Ii(e,n,h,7));break;case 5:var b=null;switch(De.tag){case 26:b=De.memoizedState;case 5:case 27:var k=De;if(b?jm(b):k.stateNode.complete){Ke=0,Pt=null;var T=k.sibling;if(T!==null)De=T;else{var B=k.return;B!==null?(De=B,tu(B)):De=null}break t}}Ke=0,Pt=null,Ii(e,n,h,5);break;case 6:Ke=0,Pt=null,Ii(e,n,h,6);break;case 8:Do(),ct=6;break e;default:throw Error(u(462))}}Nb();break}catch(X){Mp(e,X)}while(!0);return Vn=Vl=null,D.H=a,D.A=o,Xe=l,De!==null?0:(tt=null,Oe=0,va(),ct)}function Nb(){for(;De!==null&&!ne();)qp(De)}function qp(e){var n=sp(e.alternate,e,el);e.memoizedProps=e.pendingProps,n===null?tu(e):De=n}function Bp(e){var n=e,l=n.alternate;switch(n.tag){case 15:case 0:n=np(l,n,n.pendingProps,n.type,void 0,Oe);break;case 11:n=np(l,n,n.pendingProps,n.type.render,n.ref,Oe);break;case 5:$s(n);default:cp(l,n),n=De=Ud(n,el),n=sp(l,n,el)}e.memoizedProps=e.pendingProps,n===null?tu(e):De=n}function Ii(e,n,l,a){Vn=Vl=null,$s(n),Ai=null,xr=0;var o=n.return;try{if(hb(e,o,n,l,Oe)){ct=1,Ya(e,fn(l,e.current)),De=null;return}}catch(h){if(o!==null)throw De=o,h;ct=1,Ya(e,fn(l,e.current)),De=null;return}n.flags&32768?(qe||a===1?e=!0:Ui||(Oe&536870912)!==0?e=!1:(vl=e=!0,(a===2||a===9||a===3||a===6)&&(a=Kt.current,a!==null&&a.tag===13&&(a.flags|=16384))),Hp(n,e)):tu(n)}function tu(e){var n=e;do{if((n.flags&32768)!==0){Hp(n,vl);return}e=n.return;var l=gb(n.alternate,n,el);if(l!==null){De=l;return}if(n=n.sibling,n!==null){De=n;return}De=n=e}while(n!==null);ct===0&&(ct=5)}function Hp(e,n){do{var l=xb(e.alternate,e);if(l!==null){l.flags&=32767,De=l;return}if(l=e.return,l!==null&&(l.flags|=32768,l.subtreeFlags=0,l.deletions=null),!n&&(e=e.sibling,e!==null)){De=e;return}De=e=l}while(e!==null);ct=6,De=null}function Ip(e,n,l,a,o,h,b,k,T){e.cancelPendingCommit=null;do nu();while(vt!==0);if((Xe&6)!==0)throw Error(u(327));if(n!==null){if(n===e.current)throw Error(u(177));if(h=n.lanes|n.childLanes,h|=vs,i1(e,l,h,b,k,T),e===tt&&(De=tt=null,Oe=0),Bi=n,wl=e,tl=l,To=h,Ao=o,Ap=a,(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,Tb(ye,function(){return Xp(),null})):(e.callbackNode=null,e.callbackPriority=0),a=(n.flags&13878)!==0,(n.subtreeFlags&13878)!==0||a){a=D.T,D.T=null,o=Q.p,Q.p=2,b=Xe,Xe|=4;try{yb(e,n,l)}finally{Xe=b,Q.p=o,D.T=a}}vt=1,Yp(),Gp(),Vp()}}function Yp(){if(vt===1){vt=0;var e=wl,n=Bi,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 o=Xe;Xe|=4;try{kp(n,e);var h=Fo,b=_d(e.containerInfo),k=h.focusedElem,T=h.selectionRange;if(b!==k&&k&&k.ownerDocument&&Ed(k.ownerDocument.documentElement,k)){if(T!==null&&ms(k)){var B=T.start,X=T.end;if(X===void 0&&(X=B),"selectionStart"in k)k.selectionStart=B,k.selectionEnd=Math.min(X,k.value.length);else{var K=k.ownerDocument||document,I=K&&K.defaultView||window;if(I.getSelection){var Y=I.getSelection(),pe=k.textContent.length,Se=Math.min(T.start,pe),et=T.end===void 0?Se:Math.min(T.end,pe);!Y.extend&&Se>et&&(b=et,et=Se,Se=b);var M=Cd(k,Se),z=Cd(k,et);if(M&&z&&(Y.rangeCount!==1||Y.anchorNode!==M.node||Y.anchorOffset!==M.offset||Y.focusNode!==z.node||Y.focusOffset!==z.offset)){var q=K.createRange();q.setStart(M.node,M.offset),Y.removeAllRanges(),Se>et?(Y.addRange(q),Y.extend(z.node,z.offset)):(q.setEnd(z.node,z.offset),Y.addRange(q))}}}}for(K=[],Y=k;Y=Y.parentNode;)Y.nodeType===1&&K.push({element:Y,left:Y.scrollLeft,top:Y.scrollTop});for(typeof k.focus=="function"&&k.focus(),k=0;k<K.length;k++){var Z=K[k];Z.element.scrollLeft=Z.left,Z.element.scrollTop=Z.top}}pu=!!Vo,Fo=Vo=null}finally{Xe=o,Q.p=a,D.T=l}}e.current=n,vt=2}}function Gp(){if(vt===2){vt=0;var e=wl,n=Bi,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 o=Xe;Xe|=4;try{xp(e,n.alternate,n)}finally{Xe=o,Q.p=a,D.T=l}}vt=3}}function Vp(){if(vt===4||vt===3){vt=0,Ye();var e=wl,n=Bi,l=tl,a=Ap;(n.subtreeFlags&10256)!==0||(n.flags&10256)!==0?vt=5:(vt=0,Bi=wl=null,Fp(e,e.pendingLanes));var o=e.pendingLanes;if(o===0&&(kl=null),Ku(l),n=n.stateNode,ut&&typeof ut.onCommitFiberRoot=="function")try{ut.onCommitFiberRoot(St,n,void 0,(n.current.flags&128)===128)}catch{}if(a!==null){n=D.T,o=Q.p,Q.p=2,D.T=null;try{for(var h=e.onRecoverableError,b=0;b<a.length;b++){var k=a[b];h(k.value,{componentStack:k.stack})}}finally{D.T=n,Q.p=o}}(tl&3)!==0&&nu(),Rn(e),o=e.pendingLanes,(l&261930)!==0&&(o&42)!==0?e===zo?Mr++:(Mr=0,zo=e):Mr=0,Or(0)}}function Fp(e,n){(e.pooledCacheLanes&=n)===0&&(n=e.pooledCache,n!=null&&(e.pooledCache=null,mr(n)))}function nu(){return Yp(),Gp(),Vp(),Xp()}function Xp(){if(vt!==5)return!1;var e=wl,n=To;To=0;var l=Ku(tl),a=D.T,o=Q.p;try{Q.p=32>l?32:l,D.T=null,l=Ao,Ao=null;var h=wl,b=tl;if(vt=0,Bi=wl=null,tl=0,(Xe&6)!==0)throw Error(u(331));var k=Xe;if(Xe|=4,Ep(h.current),jp(h,h.current,b,l),Xe=k,Or(0,!1),ut&&typeof ut.onPostCommitFiberRoot=="function")try{ut.onPostCommitFiberRoot(St,h)}catch{}return!0}finally{Q.p=o,D.T=a,Fp(e,n)}}function $p(e,n,l){n=fn(l,n),n=so(e.stateNode,n,2),e=gl(e,n,2),e!==null&&(tr(e,2),Rn(e))}function Je(e,n,l){if(e.tag===3)$p(e,e,l);else for(;n!==null;){if(n.tag===3){$p(n,e,l);break}else if(n.tag===1){var a=n.stateNode;if(typeof n.type.getDerivedStateFromError=="function"||typeof a.componentDidCatch=="function"&&(kl===null||!kl.has(a))){e=fn(l,e),l=Qh(2),a=gl(n,l,2),a!==null&&(Zh(l,a,n,e),tr(a,2),Rn(a));break}}n=n.return}}function Mo(e,n,l){var a=e.pingCache;if(a===null){a=e.pingCache=new Sb;var o=new Set;a.set(n,o)}else o=a.get(n),o===void 0&&(o=new Set,a.set(n,o));o.has(l)||(Co=!0,o.add(l),e=Cb.bind(null,e,n,l),n.then(e,e))}function Cb(e,n,l){var a=e.pingCache;a!==null&&a.delete(n),e.pingedLanes|=e.suspendedLanes&l,e.warmLanes&=~l,tt===e&&(Oe&l)===l&&(ct===4||ct===3&&(Oe&62914560)===Oe&&300>Ue()-Ka?(Xe&2)===0&&Hi(e,0):Eo|=l,qi===Oe&&(qi=0)),Rn(e)}function Qp(e,n){n===0&&(n=st()),e=Il(e,n),e!==null&&(tr(e,n),Rn(e))}function Eb(e){var n=e.memoizedState,l=0;n!==null&&(l=n.retryLane),Qp(e,l)}function _b(e,n){var l=0;switch(e.tag){case 31:case 13:var a=e.stateNode,o=e.memoizedState;o!==null&&(l=o.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),Qp(e,l)}function Tb(e,n){return En(e,n)}var lu=null,Yi=null,Oo=!1,iu=!1,Lo=!1,Nl=0;function Rn(e){e!==Yi&&e.next===null&&(Yi===null?lu=Yi=e:Yi=Yi.next=e),iu=!0,Oo||(Oo=!0,zb())}function Or(e,n){if(!Lo&&iu){Lo=!0;do for(var l=!1,a=lu;a!==null;){if(e!==0){var o=a.pendingLanes;if(o===0)var h=0;else{var b=a.suspendedLanes,k=a.pingedLanes;h=(1<<31-Ze(42|e)+1)-1,h&=o&~(b&~k),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(l=!0,Pp(a,h))}else h=Oe,h=J(a,a===tt?h:0,a.cancelPendingCommit!==null||a.timeoutHandle!==-1),(h&3)===0||de(a,h)||(l=!0,Pp(a,h));a=a.next}while(l);Lo=!1}}function Ab(){Zp()}function Zp(){iu=Oo=!1;var e=0;Nl!==0&&Ib()&&(e=Nl);for(var n=Ue(),l=null,a=lu;a!==null;){var o=a.next,h=Kp(a,n);h===0?(a.next=null,l===null?lu=o:l.next=o,o===null&&(Yi=l)):(l=a,(e!==0||(h&3)!==0)&&(iu=!0)),a=o}vt!==0&&vt!==5||Or(e),Nl!==0&&(Nl=0)}function Kp(e,n){for(var l=e.suspendedLanes,a=e.pingedLanes,o=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var b=31-Ze(h),k=1<<b,T=o[b];T===-1?((k&l)===0||(k&a)!==0)&&(o[b]=Ee(k,n)):T<=n&&(e.expiredLanes|=k),h&=~k}if(n=tt,l=Oe,l=J(e,e===n?l:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a=e.callbackNode,l===0||e===n&&(Ke===2||Ke===9)||e.cancelPendingCommit!==null)return a!==null&&a!==null&&_n(a),e.callbackNode=null,e.callbackPriority=0;if((l&3)===0||de(e,l)){if(n=l&-l,n===e.callbackPriority)return n;switch(a!==null&&_n(a),Ku(l)){case 2:case 8:l=ae;break;case 32:l=ye;break;case 268435456:l=Ge;break;default:l=ye}return a=Jp.bind(null,e),l=En(l,a),e.callbackPriority=n,e.callbackNode=l,n}return a!==null&&a!==null&&_n(a),e.callbackPriority=2,e.callbackNode=null,2}function Jp(e,n){if(vt!==0&&vt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var l=e.callbackNode;if(nu()&&e.callbackNode!==l)return null;var a=Oe;return a=J(e,e===tt?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),a===0?null:(Dp(e,a,n),Kp(e,Ue()),e.callbackNode!=null&&e.callbackNode===l?Jp.bind(null,e):null)}function Pp(e,n){if(nu())return null;Dp(e,n,!0)}function zb(){Gb(function(){(Xe&6)!==0?En(G,Ab):Zp()})}function Uo(){if(Nl===0){var e=Ei;e===0&&(e=Ll,Ll<<=1,(Ll&261888)===0&&(Ll=256)),Nl=e}return Nl}function Wp(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:da(""+e)}function em(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 Db(e,n,l,a,o){if(n==="submit"&&l&&l.stateNode===o){var h=Wp((o[Bt]||null).action),b=a.submitter;b&&(n=(n=b[Bt]||null)?Wp(n.formAction):b.getAttribute("formAction"),n!==null&&(h=n,b=null));var k=new ga("action","action",null,a,o);e.push({event:k,listeners:[{instance:null,listener:function(){if(a.defaultPrevented){if(Nl!==0){var T=b?em(o,b):new FormData(o);no(l,{pending:!0,data:T,method:o.method,action:h},null,T)}}else typeof h=="function"&&(k.preventDefault(),T=b?em(o,b):new FormData(o),no(l,{pending:!0,data:T,method:o.method,action:h},h,T))},currentTarget:o}]})}}for(var qo=0;qo<bs.length;qo++){var Bo=bs[qo],Rb=Bo.toLowerCase(),Mb=Bo[0].toUpperCase()+Bo.slice(1);vn(Rb,"on"+Mb)}vn(zd,"onAnimationEnd"),vn(Dd,"onAnimationIteration"),vn(Rd,"onAnimationStart"),vn("dblclick","onDoubleClick"),vn("focusin","onFocus"),vn("focusout","onBlur"),vn(K1,"onTransitionRun"),vn(J1,"onTransitionStart"),vn(P1,"onTransitionCancel"),vn(Md,"onTransitionEnd"),hi("onMouseEnter",["mouseout","mouseover"]),hi("onMouseLeave",["mouseout","mouseover"]),hi("onPointerEnter",["pointerout","pointerover"]),hi("onPointerLeave",["pointerout","pointerover"]),Ul("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),Ul("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),Ul("onBeforeInput",["compositionend","keypress","textInput","paste"]),Ul("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),Ul("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Lr="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(" "),Ob=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Lr));function tm(e,n){n=(n&4)!==0;for(var l=0;l<e.length;l++){var a=e[l],o=a.event;a=a.listeners;e:{var h=void 0;if(n)for(var b=a.length-1;0<=b;b--){var k=a[b],T=k.instance,B=k.currentTarget;if(k=k.listener,T!==h&&o.isPropagationStopped())break e;h=k,o.currentTarget=B;try{h(o)}catch(X){ba(X)}o.currentTarget=null,h=T}else for(b=0;b<a.length;b++){if(k=a[b],T=k.instance,B=k.currentTarget,k=k.listener,T!==h&&o.isPropagationStopped())break e;h=k,o.currentTarget=B;try{h(o)}catch(X){ba(X)}o.currentTarget=null,h=T}}}}function Re(e,n){var l=n[Ju];l===void 0&&(l=n[Ju]=new Set);var a=e+"__bubble";l.has(a)||(nm(n,e,2,!1),l.add(a))}function Ho(e,n,l){var a=0;n&&(a|=4),nm(l,e,a,n)}var ru="_reactListening"+Math.random().toString(36).slice(2);function Io(e){if(!e[ru]){e[ru]=!0,Zf.forEach(function(l){l!=="selectionchange"&&(Ob.has(l)||Ho(l,!1,e),Ho(l,!0,e))});var n=e.nodeType===9?e:e.ownerDocument;n===null||n[ru]||(n[ru]=!0,Ho("selectionchange",!1,n))}}function nm(e,n,l,a){switch(zm(n)){case 2:var o=o0;break;case 8:o=c0;break;default:o=nc}l=o.bind(null,n,l,e),o=void 0,!as||n!=="touchstart"&&n!=="touchmove"&&n!=="wheel"||(o=!0),a?o!==void 0?e.addEventListener(n,l,{capture:!0,passive:o}):e.addEventListener(n,l,!0):o!==void 0?e.addEventListener(n,l,{passive:o}):e.addEventListener(n,l,!1)}function Yo(e,n,l,a,o){var h=a;if((n&1)===0&&(n&2)===0&&a!==null)e:for(;;){if(a===null)return;var b=a.tag;if(b===3||b===4){var k=a.stateNode.containerInfo;if(k===o)break;if(b===4)for(b=a.return;b!==null;){var T=b.tag;if((T===3||T===4)&&b.stateNode.containerInfo===o)return;b=b.return}for(;k!==null;){if(b=ci(k),b===null)return;if(T=b.tag,T===5||T===6||T===26||T===27){a=h=b;continue e}k=k.parentNode}}a=a.return}ud(function(){var B=h,X=is(l),K=[];e:{var I=Od.get(e);if(I!==void 0){var Y=ga,pe=e;switch(e){case"keypress":if(pa(l)===0)break e;case"keydown":case"keyup":Y=_1;break;case"focusin":pe="focus",Y=cs;break;case"focusout":pe="blur",Y=cs;break;case"beforeblur":case"afterblur":Y=cs;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":Y=cd;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Y=g1;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Y=z1;break;case zd:case Dd:case Rd:Y=b1;break;case Md:Y=R1;break;case"scroll":case"scrollend":Y=p1;break;case"wheel":Y=O1;break;case"copy":case"cut":case"paste":Y=S1;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Y=dd;break;case"toggle":case"beforetoggle":Y=U1}var Se=(n&4)!==0,et=!Se&&(e==="scroll"||e==="scrollend"),M=Se?I!==null?I+"Capture":null:I;Se=[];for(var z=B,q;z!==null;){var Z=z;if(q=Z.stateNode,Z=Z.tag,Z!==5&&Z!==26&&Z!==27||q===null||M===null||(Z=ir(z,M),Z!=null&&Se.push(Ur(z,Z,q))),et)break;z=z.return}0<Se.length&&(I=new Y(I,pe,null,l,X),K.push({event:I,listeners:Se}))}}if((n&7)===0){e:{if(I=e==="mouseover"||e==="pointerover",Y=e==="mouseout"||e==="pointerout",I&&l!==ls&&(pe=l.relatedTarget||l.fromElement)&&(ci(pe)||pe[oi]))break e;if((Y||I)&&(I=X.window===X?X:(I=X.ownerDocument)?I.defaultView||I.parentWindow:window,Y?(pe=l.relatedTarget||l.toElement,Y=B,pe=pe?ci(pe):null,pe!==null&&(et=c(pe),Se=pe.tag,pe!==et||Se!==5&&Se!==27&&Se!==6)&&(pe=null)):(Y=null,pe=B),Y!==pe)){if(Se=cd,Z="onMouseLeave",M="onMouseEnter",z="mouse",(e==="pointerout"||e==="pointerover")&&(Se=dd,Z="onPointerLeave",M="onPointerEnter",z="pointer"),et=Y==null?I:lr(Y),q=pe==null?I:lr(pe),I=new Se(Z,z+"leave",Y,l,X),I.target=et,I.relatedTarget=q,Z=null,ci(X)===B&&(Se=new Se(M,z+"enter",pe,l,X),Se.target=q,Se.relatedTarget=et,Z=Se),et=Z,Y&&pe)t:{for(Se=Lb,M=Y,z=pe,q=0,Z=M;Z;Z=Se(Z))q++;Z=0;for(var be=z;be;be=Se(be))Z++;for(;0<q-Z;)M=Se(M),q--;for(;0<Z-q;)z=Se(z),Z--;for(;q--;){if(M===z||z!==null&&M===z.alternate){Se=M;break t}M=Se(M),z=Se(z)}Se=null}else Se=null;Y!==null&&lm(K,I,Y,Se,!1),pe!==null&&et!==null&&lm(K,et,pe,Se,!0)}}e:{if(I=B?lr(B):window,Y=I.nodeName&&I.nodeName.toLowerCase(),Y==="select"||Y==="input"&&I.type==="file")var Ve=vd;else if(yd(I))if(Sd)Ve=$1;else{Ve=F1;var ge=V1}else Y=I.nodeName,!Y||Y.toLowerCase()!=="input"||I.type!=="checkbox"&&I.type!=="radio"?B&&ns(B.elementType)&&(Ve=vd):Ve=X1;if(Ve&&(Ve=Ve(e,B))){bd(K,Ve,l,X);break e}ge&&ge(e,I,B),e==="focusout"&&B&&I.type==="number"&&B.memoizedProps.value!=null&&ts(I,"number",I.value)}switch(ge=B?lr(B):window,e){case"focusin":(yd(ge)||ge.contentEditable==="true")&&(bi=ge,gs=B,dr=null);break;case"focusout":dr=gs=bi=null;break;case"mousedown":xs=!0;break;case"contextmenu":case"mouseup":case"dragend":xs=!1,Td(K,l,X);break;case"selectionchange":if(Z1)break;case"keydown":case"keyup":Td(K,l,X)}var Ae;if(ds)e:{switch(e){case"compositionstart":var Le="onCompositionStart";break e;case"compositionend":Le="onCompositionEnd";break e;case"compositionupdate":Le="onCompositionUpdate";break e}Le=void 0}else yi?gd(e,l)&&(Le="onCompositionEnd"):e==="keydown"&&l.keyCode===229&&(Le="onCompositionStart");Le&&(hd&&l.locale!=="ko"&&(yi||Le!=="onCompositionStart"?Le==="onCompositionEnd"&&yi&&(Ae=sd()):(ol=X,us="value"in ol?ol.value:ol.textContent,yi=!0)),ge=au(B,Le),0<ge.length&&(Le=new fd(Le,e,null,l,X),K.push({event:Le,listeners:ge}),Ae?Le.data=Ae:(Ae=xd(l),Ae!==null&&(Le.data=Ae)))),(Ae=B1?H1(e,l):I1(e,l))&&(Le=au(B,"onBeforeInput"),0<Le.length&&(ge=new fd("onBeforeInput","beforeinput",null,l,X),K.push({event:ge,listeners:Le}),ge.data=Ae)),Db(K,e,B,l,X)}tm(K,n)})}function Ur(e,n,l){return{instance:e,listener:n,currentTarget:l}}function au(e,n){for(var l=n+"Capture",a=[];e!==null;){var o=e,h=o.stateNode;if(o=o.tag,o!==5&&o!==26&&o!==27||h===null||(o=ir(e,l),o!=null&&a.unshift(Ur(e,o,h)),o=ir(e,n),o!=null&&a.push(Ur(e,o,h))),e.tag===3)return a;e=e.return}return[]}function Lb(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function lm(e,n,l,a,o){for(var h=n._reactName,b=[];l!==null&&l!==a;){var k=l,T=k.alternate,B=k.stateNode;if(k=k.tag,T!==null&&T===a)break;k!==5&&k!==26&&k!==27||B===null||(T=B,o?(B=ir(l,h),B!=null&&b.unshift(Ur(l,B,T))):o||(B=ir(l,h),B!=null&&b.push(Ur(l,B,T)))),l=l.return}b.length!==0&&e.push({event:n,listeners:b})}var Ub=/\r\n?/g,qb=/\u0000|\uFFFD/g;function im(e){return(typeof e=="string"?e:""+e).replace(Ub,`
|
|
49
|
-
`).replace(qb,"")}function rm(e,n){return n=im(n),im(e)===n}function We(e,n,l,a,o,h){switch(l){case"children":typeof a=="string"?n==="body"||n==="textarea"&&a===""||mi(e,a):(typeof a=="number"||typeof a=="bigint")&&n!=="body"&&mi(e,""+a);break;case"className":ca(e,"class",a);break;case"tabIndex":ca(e,"tabindex",a);break;case"dir":case"role":case"viewBox":case"width":case"height":ca(e,l,a);break;case"style":rd(e,a,h);break;case"data":if(n!=="object"){ca(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=da(""+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 h=="function"&&(l==="formAction"?(n!=="input"&&We(e,n,"name",o.name,o,null),We(e,n,"formEncType",o.formEncType,o,null),We(e,n,"formMethod",o.formMethod,o,null),We(e,n,"formTarget",o.formTarget,o,null)):(We(e,n,"encType",o.encType,o,null),We(e,n,"method",o.method,o,null),We(e,n,"target",o.target,o,null)));if(a==null||typeof a=="symbol"||typeof a=="boolean"){e.removeAttribute(l);break}a=da(""+a),e.setAttribute(l,a);break;case"onClick":a!=null&&(e.onclick=Hn);break;case"onScroll":a!=null&&Re("scroll",e);break;case"onScrollEnd":a!=null&&Re("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(o.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=da(""+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":Re("beforetoggle",e),Re("toggle",e),oa(e,"popover",a);break;case"xlinkActuate":Bn(e,"http://www.w3.org/1999/xlink","xlink:actuate",a);break;case"xlinkArcrole":Bn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",a);break;case"xlinkRole":Bn(e,"http://www.w3.org/1999/xlink","xlink:role",a);break;case"xlinkShow":Bn(e,"http://www.w3.org/1999/xlink","xlink:show",a);break;case"xlinkTitle":Bn(e,"http://www.w3.org/1999/xlink","xlink:title",a);break;case"xlinkType":Bn(e,"http://www.w3.org/1999/xlink","xlink:type",a);break;case"xmlBase":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:base",a);break;case"xmlLang":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",a);break;case"xmlSpace":Bn(e,"http://www.w3.org/XML/1998/namespace","xml:space",a);break;case"is":oa(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=d1.get(l)||l,oa(e,l,a))}}function Go(e,n,l,a,o,h){switch(l){case"style":rd(e,a,h);break;case"dangerouslySetInnerHTML":if(a!=null){if(typeof a!="object"||!("__html"in a))throw Error(u(61));if(l=a.__html,l!=null){if(o.children!=null)throw Error(u(60));e.innerHTML=l}}break;case"children":typeof a=="string"?mi(e,a):(typeof a=="number"||typeof a=="bigint")&&mi(e,""+a);break;case"onScroll":a!=null&&Re("scroll",e);break;case"onScrollEnd":a!=null&&Re("scrollend",e);break;case"onClick":a!=null&&(e.onclick=Hn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!Kf.hasOwnProperty(l))e:{if(l[0]==="o"&&l[1]==="n"&&(o=l.endsWith("Capture"),n=l.slice(2,o?l.length-7:void 0),h=e[Bt]||null,h=h!=null?h[l]:null,typeof h=="function"&&e.removeEventListener(n,h,o),typeof a=="function")){typeof h!="function"&&h!==null&&(l in e?e[l]=null:e.hasAttribute(l)&&e.removeAttribute(l)),e.addEventListener(n,a,o);break e}l in e?e[l]=a:a===!0?e.setAttribute(l,""):oa(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":Re("error",e),Re("load",e);var a=!1,o=!1,h;for(h in l)if(l.hasOwnProperty(h)){var b=l[h];if(b!=null)switch(h){case"src":a=!0;break;case"srcSet":o=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(u(137,n));default:We(e,n,h,b,l,null)}}o&&We(e,n,"srcSet",l.srcSet,l,null),a&&We(e,n,"src",l.src,l,null);return;case"input":Re("invalid",e);var k=h=b=o=null,T=null,B=null;for(a in l)if(l.hasOwnProperty(a)){var X=l[a];if(X!=null)switch(a){case"name":o=X;break;case"type":b=X;break;case"checked":T=X;break;case"defaultChecked":B=X;break;case"value":h=X;break;case"defaultValue":k=X;break;case"children":case"dangerouslySetInnerHTML":if(X!=null)throw Error(u(137,n));break;default:We(e,n,a,X,l,null)}}td(e,h,k,T,B,b,o,!1);return;case"select":Re("invalid",e),a=b=h=null;for(o in l)if(l.hasOwnProperty(o)&&(k=l[o],k!=null))switch(o){case"value":h=k;break;case"defaultValue":b=k;break;case"multiple":a=k;default:We(e,n,o,k,l,null)}n=h,l=b,e.multiple=!!a,n!=null?pi(e,!!a,n,!1):l!=null&&pi(e,!!a,l,!0);return;case"textarea":Re("invalid",e),h=o=a=null;for(b in l)if(l.hasOwnProperty(b)&&(k=l[b],k!=null))switch(b){case"value":a=k;break;case"defaultValue":o=k;break;case"children":h=k;break;case"dangerouslySetInnerHTML":if(k!=null)throw Error(u(91));break;default:We(e,n,b,k,l,null)}ld(e,a,o,h);return;case"option":for(T in l)l.hasOwnProperty(T)&&(a=l[T],a!=null)&&(T==="selected"?e.selected=a&&typeof a!="function"&&typeof a!="symbol":We(e,n,T,a,l,null));return;case"dialog":Re("beforetoggle",e),Re("toggle",e),Re("cancel",e),Re("close",e);break;case"iframe":case"object":Re("load",e);break;case"video":case"audio":for(a=0;a<Lr.length;a++)Re(Lr[a],e);break;case"image":Re("error",e),Re("load",e);break;case"details":Re("toggle",e);break;case"embed":case"source":case"link":Re("error",e),Re("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:We(e,n,B,a,l,null)}return;default:if(ns(n)){for(X in l)l.hasOwnProperty(X)&&(a=l[X],a!==void 0&&Go(e,n,X,a,l,void 0));return}}for(k in l)l.hasOwnProperty(k)&&(a=l[k],a!=null&&We(e,n,k,a,l,null))}function Bb(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 o=null,h=null,b=null,k=null,T=null,B=null,X=null;for(Y in l){var K=l[Y];if(l.hasOwnProperty(Y)&&K!=null)switch(Y){case"checked":break;case"value":break;case"defaultValue":T=K;default:a.hasOwnProperty(Y)||We(e,n,Y,null,a,K)}}for(var I in a){var Y=a[I];if(K=l[I],a.hasOwnProperty(I)&&(Y!=null||K!=null))switch(I){case"type":h=Y;break;case"name":o=Y;break;case"checked":B=Y;break;case"defaultChecked":X=Y;break;case"value":b=Y;break;case"defaultValue":k=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(u(137,n));break;default:Y!==K&&We(e,n,I,Y,a,K)}}es(e,b,k,T,B,X,h,o);return;case"select":Y=b=k=I=null;for(h in l)if(T=l[h],l.hasOwnProperty(h)&&T!=null)switch(h){case"value":break;case"multiple":Y=T;default:a.hasOwnProperty(h)||We(e,n,h,null,a,T)}for(o in a)if(h=a[o],T=l[o],a.hasOwnProperty(o)&&(h!=null||T!=null))switch(o){case"value":I=h;break;case"defaultValue":k=h;break;case"multiple":b=h;default:h!==T&&We(e,n,o,h,a,T)}n=k,l=b,a=Y,I!=null?pi(e,!!l,I,!1):!!a!=!!l&&(n!=null?pi(e,!!l,n,!0):pi(e,!!l,l?[]:"",!1));return;case"textarea":Y=I=null;for(k in l)if(o=l[k],l.hasOwnProperty(k)&&o!=null&&!a.hasOwnProperty(k))switch(k){case"value":break;case"children":break;default:We(e,n,k,null,a,o)}for(b in a)if(o=a[b],h=l[b],a.hasOwnProperty(b)&&(o!=null||h!=null))switch(b){case"value":I=o;break;case"defaultValue":Y=o;break;case"children":break;case"dangerouslySetInnerHTML":if(o!=null)throw Error(u(91));break;default:o!==h&&We(e,n,b,o,a,h)}nd(e,I,Y);return;case"option":for(var pe in l)I=l[pe],l.hasOwnProperty(pe)&&I!=null&&!a.hasOwnProperty(pe)&&(pe==="selected"?e.selected=!1:We(e,n,pe,null,a,I));for(T in a)I=a[T],Y=l[T],a.hasOwnProperty(T)&&I!==Y&&(I!=null||Y!=null)&&(T==="selected"?e.selected=I&&typeof I!="function"&&typeof I!="symbol":We(e,n,T,I,a,Y));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)&&We(e,n,Se,null,a,I);for(B in a)if(I=a[B],Y=l[B],a.hasOwnProperty(B)&&I!==Y&&(I!=null||Y!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(I!=null)throw Error(u(137,n));break;default:We(e,n,B,I,a,Y)}return;default:if(ns(n)){for(var et in l)I=l[et],l.hasOwnProperty(et)&&I!==void 0&&!a.hasOwnProperty(et)&&Go(e,n,et,void 0,a,I);for(X in a)I=a[X],Y=l[X],!a.hasOwnProperty(X)||I===Y||I===void 0&&Y===void 0||Go(e,n,X,I,a,Y);return}}for(var M in l)I=l[M],l.hasOwnProperty(M)&&I!=null&&!a.hasOwnProperty(M)&&We(e,n,M,null,a,I);for(K in a)I=a[K],Y=l[K],!a.hasOwnProperty(K)||I===Y||I==null&&Y==null||We(e,n,K,I,a,Y)}function am(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function Hb(){if(typeof performance.getEntriesByType=="function"){for(var e=0,n=0,l=performance.getEntriesByType("resource"),a=0;a<l.length;a++){var o=l[a],h=o.transferSize,b=o.initiatorType,k=o.duration;if(h&&k&&am(b)){for(b=0,k=o.responseEnd,a+=1;a<l.length;a++){var T=l[a],B=T.startTime;if(B>k)break;var X=T.transferSize,K=T.initiatorType;X&&am(K)&&(T=T.responseEnd,b+=X*(T<k?1:(k-B)/(T-B)))}if(--a,n+=8*(h+b)/(o.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 Vo=null,Fo=null;function uu(e){return e.nodeType===9?e:e.ownerDocument}function um(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 sm(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 Xo(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 $o=null;function Ib(){var e=window.event;return e&&e.type==="popstate"?e===$o?!1:($o=e,!0):($o=null,!1)}var om=typeof setTimeout=="function"?setTimeout:void 0,Yb=typeof clearTimeout=="function"?clearTimeout:void 0,cm=typeof Promise=="function"?Promise:void 0,Gb=typeof queueMicrotask=="function"?queueMicrotask:typeof cm<"u"?function(e){return cm.resolve(null).then(e).catch(Vb)}:om;function Vb(e){setTimeout(function(){throw e})}function Cl(e){return e==="head"}function fm(e,n){var l=n,a=0;do{var o=l.nextSibling;if(e.removeChild(l),o&&o.nodeType===8)if(l=o.data,l==="/$"||l==="/&"){if(a===0){e.removeChild(o),Xi(n);return}a--}else if(l==="$"||l==="$?"||l==="$~"||l==="$!"||l==="&")a++;else if(l==="html")qr(e.ownerDocument.documentElement);else if(l==="head"){l=e.ownerDocument.head,qr(l);for(var h=l.firstChild;h;){var b=h.nextSibling,k=h.nodeName;h[nr]||k==="SCRIPT"||k==="STYLE"||k==="LINK"&&h.rel.toLowerCase()==="stylesheet"||l.removeChild(h),h=b}}else l==="body"&&qr(e.ownerDocument.body);l=o}while(l);Xi(n)}function dm(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 Qo(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":Qo(l),Pu(l);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(l.rel.toLowerCase()==="stylesheet")continue}e.removeChild(l)}}function Fb(e,n,l,a){for(;e.nodeType===1;){var o=l;if(e.nodeName.toLowerCase()!==n.toLowerCase()){if(!a&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(a){if(!e[nr])switch(n){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==o.rel||e.getAttribute("href")!==(o.href==null||o.href===""?null:o.href)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin)||e.getAttribute("title")!==(o.title==null?null:o.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(o.src==null?null:o.src)||e.getAttribute("type")!==(o.type==null?null:o.type)||e.getAttribute("crossorigin")!==(o.crossOrigin==null?null:o.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(n==="input"&&e.type==="hidden"){var h=o.name==null?null:""+o.name;if(o.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=gn(e.nextSibling),e===null)break}return null}function Xb(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 hm(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 Zo(e){return e.data==="$?"||e.data==="$~"}function Ko(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function $b(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 Jo=null;function pm(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 mm(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 gm(e,n,l){switch(n=uu(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 qr(e){for(var n=e.attributes;n.length;)e.removeAttributeNode(n[0]);Pu(e)}var xn=new Map,xm=new Set;function su(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var nl=Q.d;Q.d={f:Qb,r:Zb,D:Kb,C:Jb,L:Pb,m:Wb,X:t0,S:e0,M:n0};function Qb(){var e=nl.f(),n=Wa();return e||n}function Zb(e){var n=fi(e);n!==null&&n.tag===5&&n.type==="form"?Mh(n):nl.r(e)}var Gi=typeof document>"u"?null:document;function ym(e,n,l){var a=Gi;if(a&&typeof n=="string"&&n){var o=on(n);o='link[rel="'+e+'"][href="'+o+'"]',typeof l=="string"&&(o+='[crossorigin="'+l+'"]'),xm.has(o)||(xm.add(o),e={rel:e,crossOrigin:l,href:n},a.querySelector(o)===null&&(n=a.createElement("link"),Tt(n,"link",e),wt(n),a.head.appendChild(n)))}}function Kb(e){nl.D(e),ym("dns-prefetch",e,null)}function Jb(e,n){nl.C(e,n),ym("preconnect",e,n)}function Pb(e,n,l){nl.L(e,n,l);var a=Gi;if(a&&e&&n){var o='link[rel="preload"][as="'+on(n)+'"]';n==="image"&&l&&l.imageSrcSet?(o+='[imagesrcset="'+on(l.imageSrcSet)+'"]',typeof l.imageSizes=="string"&&(o+='[imagesizes="'+on(l.imageSizes)+'"]')):o+='[href="'+on(e)+'"]';var h=o;switch(n){case"style":h=Vi(e);break;case"script":h=Fi(e)}xn.has(h)||(e=x({rel:"preload",href:n==="image"&&l&&l.imageSrcSet?void 0:e,as:n},l),xn.set(h,e),a.querySelector(o)!==null||n==="style"&&a.querySelector(Br(h))||n==="script"&&a.querySelector(Hr(h))||(n=a.createElement("link"),Tt(n,"link",e),wt(n),a.head.appendChild(n)))}}function Wb(e,n){nl.m(e,n);var l=Gi;if(l&&e){var a=n&&typeof n.as=="string"?n.as:"script",o='link[rel="modulepreload"][as="'+on(a)+'"][href="'+on(e)+'"]',h=o;switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Fi(e)}if(!xn.has(h)&&(e=x({rel:"modulepreload",href:e},n),xn.set(h,e),l.querySelector(o)===null)){switch(a){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(l.querySelector(Hr(h)))return}a=l.createElement("link"),Tt(a,"link",e),wt(a),l.head.appendChild(a)}}}function e0(e,n,l){nl.S(e,n,l);var a=Gi;if(a&&e){var o=di(a).hoistableStyles,h=Vi(e);n=n||"default";var b=o.get(h);if(!b){var k={loading:0,preload:null};if(b=a.querySelector(Br(h)))k.loading=5;else{e=x({rel:"stylesheet",href:e,"data-precedence":n},l),(l=xn.get(h))&&Po(e,l);var T=b=a.createElement("link");wt(T),Tt(T,"link",e),T._p=new Promise(function(B,X){T.onload=B,T.onerror=X}),T.addEventListener("load",function(){k.loading|=1}),T.addEventListener("error",function(){k.loading|=2}),k.loading|=4,ou(b,n,a)}b={type:"stylesheet",instance:b,count:1,state:k},o.set(h,b)}}}function t0(e,n){nl.X(e,n);var l=Gi;if(l&&e){var a=di(l).hoistableScripts,o=Fi(e),h=a.get(o);h||(h=l.querySelector(Hr(o)),h||(e=x({src:e,async:!0},n),(n=xn.get(o))&&Wo(e,n),h=l.createElement("script"),wt(h),Tt(h,"link",e),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},a.set(o,h))}}function n0(e,n){nl.M(e,n);var l=Gi;if(l&&e){var a=di(l).hoistableScripts,o=Fi(e),h=a.get(o);h||(h=l.querySelector(Hr(o)),h||(e=x({src:e,async:!0,type:"module"},n),(n=xn.get(o))&&Wo(e,n),h=l.createElement("script"),wt(h),Tt(h,"link",e),l.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},a.set(o,h))}}function bm(e,n,l,a){var o=(o=he.current)?su(o):null;if(!o)throw Error(u(446));switch(e){case"meta":case"title":return null;case"style":return typeof l.precedence=="string"&&typeof l.href=="string"?(n=Vi(l.href),l=di(o).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=Vi(l.href);var h=di(o).hoistableStyles,b=h.get(e);if(b||(o=o.ownerDocument||o,b={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,b),(h=o.querySelector(Br(e)))&&!h._p&&(b.instance=h,b.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),h||l0(o,e,l,b.state))),n&&a===null)throw Error(u(528,""));return b}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=Fi(l),l=di(o).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 Vi(e){return'href="'+on(e)+'"'}function Br(e){return'link[rel="stylesheet"]['+e+"]"}function vm(e){return x({},e,{"data-precedence":e.precedence,precedence:null})}function l0(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),wt(n),e.head.appendChild(n))}function Fi(e){return'[src="'+on(e)+'"]'}function Hr(e){return"script[async]"+e}function Sm(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,wt(a),a;var o=x({},l,{"data-href":l.href,"data-precedence":l.precedence,href:null,precedence:null});return a=(e.ownerDocument||e).createElement("style"),wt(a),Tt(a,"style",o),ou(a,l.precedence,e),n.instance=a;case"stylesheet":o=Vi(l.href);var h=e.querySelector(Br(o));if(h)return n.state.loading|=4,n.instance=h,wt(h),h;a=vm(l),(o=xn.get(o))&&Po(a,o),h=(e.ownerDocument||e).createElement("link"),wt(h);var b=h;return b._p=new Promise(function(k,T){b.onload=k,b.onerror=T}),Tt(h,"link",a),n.state.loading|=4,ou(h,l.precedence,e),n.instance=h;case"script":return h=Fi(l.src),(o=e.querySelector(Hr(h)))?(n.instance=o,wt(o),o):(a=l,(o=xn.get(h))&&(a=x({},l),Wo(a,o)),e=e.ownerDocument||e,o=e.createElement("script"),wt(o),Tt(o,"link",a),e.head.appendChild(o),n.instance=o);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,ou(a,l.precedence,e));return n.instance}function ou(e,n,l){for(var a=l.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),o=a.length?a[a.length-1]:null,h=o,b=0;b<a.length;b++){var k=a[b];if(k.dataset.precedence===n)h=k;else if(h!==o)break}h?h.parentNode.insertBefore(e,h.nextSibling):(n=l.nodeType===9?l.head:l,n.insertBefore(e,n.firstChild))}function Po(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.title==null&&(e.title=n.title)}function Wo(e,n){e.crossOrigin==null&&(e.crossOrigin=n.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=n.referrerPolicy),e.integrity==null&&(e.integrity=n.integrity)}var cu=null;function km(e,n,l){if(cu===null){var a=new Map,o=cu=new Map;o.set(l,a)}else o=cu,a=o.get(l),a||(a=new Map,o.set(l,a));if(a.has(e))return a;for(a.set(e,null),l=l.getElementsByTagName(e),o=0;o<l.length;o++){var h=l[o];if(!(h[nr]||h[Nt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var b=h.getAttribute(n)||"";b=e+b;var k=a.get(b);k?k.push(h):a.set(b,[h])}}return a}function wm(e,n,l){e=e.ownerDocument||e,e.head.insertBefore(l,n==="title"?e.querySelector("head > title"):null)}function i0(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 jm(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function r0(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 o=Vi(a.href),h=n.querySelector(Br(o));if(h){n=h._p,n!==null&&typeof n=="object"&&typeof n.then=="function"&&(e.count++,e=fu.bind(e),n.then(e,e)),l.state.loading|=4,l.instance=h,wt(h);return}h=n.ownerDocument||n,a=vm(a),(o=xn.get(o))&&Po(a,o),h=h.createElement("link"),wt(h);var b=h;b._p=new Promise(function(k,T){b.onload=k,b.onerror=T}),Tt(h,"link",a),l.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(l,n),(n=l.state.preload)&&(l.state.loading&3)===0&&(e.count++,l=fu.bind(e),n.addEventListener("load",l),n.addEventListener("error",l))}}var ec=0;function a0(e,n){return e.stylesheets&&e.count===0&&hu(e,e.stylesheets),0<e.count||0<e.imgCount?function(l){var a=setTimeout(function(){if(e.stylesheets&&hu(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+n);0<e.imgBytes&&ec===0&&(ec=62500*Hb());var o=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&hu(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>ec?50:800)+n);return e.unsuspend=l,function(){e.unsuspend=null,clearTimeout(a),clearTimeout(o)}}:null}function fu(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)hu(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var du=null;function hu(e,n){e.stylesheets=null,e.unsuspend!==null&&(e.count++,du=new Map,n.forEach(u0,e),du=null,fu.call(e))}function u0(e,n){if(!(n.state.loading&4)){var l=du.get(e);if(l)var a=l.get(null);else{l=new Map,du.set(e,l);for(var o=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<o.length;h++){var b=o[h];(b.nodeName==="LINK"||b.getAttribute("media")!=="not all")&&(l.set(b.dataset.precedence,b),a=b)}a&&l.set(null,a)}o=n.instance,b=o.getAttribute("data-precedence"),h=l.get(b)||a,h===a&&l.set(null,o),l.set(b,o),this.count++,a=fu.bind(this),o.addEventListener("load",a),o.addEventListener("error",a),h?h.parentNode.insertBefore(o,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(o,e.firstChild)),n.state.loading|=4}}var Ir={$$typeof:U,Provider:null,Consumer:null,_currentValue:ce,_currentValue2:ce,_threadCount:0};function s0(e,n,l,a,o,h,b,k,T){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=o,this.onCaughtError=h,this.onRecoverableError=b,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=T,this.incompleteTransitions=new Map}function Nm(e,n,l,a,o,h,b,k,T,B,X,K){return e=new s0(e,n,l,b,T,B,X,K,k),n=1,h===!0&&(n|=24),h=Zt(3,null,null,n),e.current=h,h.stateNode=e,n=Ds(),n.refCount++,e.pooledCache=n,n.refCount++,h.memoizedState={element:a,isDehydrated:l,cache:n},Ls(h),e}function Cm(e){return e?(e=ki,e):ki}function Em(e,n,l,a,o,h){o=Cm(o),a.context===null?a.context=o:a.pendingContext=o,a=ml(n),a.payload={element:l},h=h===void 0?null:h,h!==null&&(a.callback=h),l=gl(e,a,n),l!==null&&(Ft(l,e,n),br(l,e,n))}function _m(e,n){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var l=e.retryLane;e.retryLane=l!==0&&l<n?l:n}}function tc(e,n){_m(e,n),(e=e.alternate)&&_m(e,n)}function Tm(e){if(e.tag===13||e.tag===31){var n=Il(e,67108864);n!==null&&Ft(n,e,67108864),tc(e,67108864)}}function Am(e){if(e.tag===13||e.tag===31){var n=en();n=Zu(n);var l=Il(e,n);l!==null&&Ft(l,e,n),tc(e,n)}}var pu=!0;function o0(e,n,l,a){var o=D.T;D.T=null;var h=Q.p;try{Q.p=2,nc(e,n,l,a)}finally{Q.p=h,D.T=o}}function c0(e,n,l,a){var o=D.T;D.T=null;var h=Q.p;try{Q.p=8,nc(e,n,l,a)}finally{Q.p=h,D.T=o}}function nc(e,n,l,a){if(pu){var o=lc(a);if(o===null)Yo(e,n,a,mu,l),Dm(e,a);else if(d0(o,e,n,l,a))a.stopPropagation();else if(Dm(e,a),n&4&&-1<f0.indexOf(e)){for(;o!==null;){var h=fi(o);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var b=qn(h.pendingLanes);if(b!==0){var k=h;for(k.pendingLanes|=2,k.entangledLanes|=2;b;){var T=1<<31-Ze(b);k.entanglements[1]|=T,b&=~T}Rn(h),(Xe&6)===0&&(Ja=Ue()+500,Or(0))}}break;case 31:case 13:k=Il(h,2),k!==null&&Ft(k,h,2),Wa(),tc(h,2)}if(h=lc(a),h===null&&Yo(e,n,a,mu,l),h===o)break;o=h}o!==null&&a.stopPropagation()}else Yo(e,n,a,null,l)}}function lc(e){return e=is(e),ic(e)}var mu=null;function ic(e){if(mu=null,e=ci(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 mu=e,null}function zm(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(an()){case G:return 2;case ae:return 8;case ye:case _e:return 32;case Ge:return 268435456;default:return 32}default:return 32}}var rc=!1,El=null,_l=null,Tl=null,Yr=new Map,Gr=new Map,Al=[],f0="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 Dm(e,n){switch(e){case"focusin":case"focusout":El=null;break;case"dragenter":case"dragleave":_l=null;break;case"mouseover":case"mouseout":Tl=null;break;case"pointerover":case"pointerout":Yr.delete(n.pointerId);break;case"gotpointercapture":case"lostpointercapture":Gr.delete(n.pointerId)}}function Vr(e,n,l,a,o,h){return e===null||e.nativeEvent!==h?(e={blockedOn:n,domEventName:l,eventSystemFlags:a,nativeEvent:h,targetContainers:[o]},n!==null&&(n=fi(n),n!==null&&Tm(n)),e):(e.eventSystemFlags|=a,n=e.targetContainers,o!==null&&n.indexOf(o)===-1&&n.push(o),e)}function d0(e,n,l,a,o){switch(n){case"focusin":return El=Vr(El,e,n,l,a,o),!0;case"dragenter":return _l=Vr(_l,e,n,l,a,o),!0;case"mouseover":return Tl=Vr(Tl,e,n,l,a,o),!0;case"pointerover":var h=o.pointerId;return Yr.set(h,Vr(Yr.get(h)||null,e,n,l,a,o)),!0;case"gotpointercapture":return h=o.pointerId,Gr.set(h,Vr(Gr.get(h)||null,e,n,l,a,o)),!0}return!1}function Rm(e){var n=ci(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,$f(e.priority,function(){Am(l)});return}}else if(n===31){if(n=p(l),n!==null){e.blockedOn=n,$f(e.priority,function(){Am(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 gu(e){if(e.blockedOn!==null)return!1;for(var n=e.targetContainers;0<n.length;){var l=lc(e.nativeEvent);if(l===null){l=e.nativeEvent;var a=new l.constructor(l.type,l);ls=a,l.target.dispatchEvent(a),ls=null}else return n=fi(l),n!==null&&Tm(n),e.blockedOn=l,!1;n.shift()}return!0}function Mm(e,n,l){gu(e)&&l.delete(n)}function h0(){rc=!1,El!==null&&gu(El)&&(El=null),_l!==null&&gu(_l)&&(_l=null),Tl!==null&&gu(Tl)&&(Tl=null),Yr.forEach(Mm),Gr.forEach(Mm)}function xu(e,n){e.blockedOn===n&&(e.blockedOn=null,rc||(rc=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,h0)))}var yu=null;function Om(e){yu!==e&&(yu=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){yu===e&&(yu=null);for(var n=0;n<e.length;n+=3){var l=e[n],a=e[n+1],o=e[n+2];if(typeof a!="function"){if(ic(a||l)===null)continue;break}var h=fi(l);h!==null&&(e.splice(n,3),n-=3,no(h,{pending:!0,data:o,method:l.method,action:a},a,o))}}))}function Xi(e){function n(T){return xu(T,e)}El!==null&&xu(El,e),_l!==null&&xu(_l,e),Tl!==null&&xu(Tl,e),Yr.forEach(n),Gr.forEach(n);for(var l=0;l<Al.length;l++){var a=Al[l];a.blockedOn===e&&(a.blockedOn=null)}for(;0<Al.length&&(l=Al[0],l.blockedOn===null);)Rm(l),l.blockedOn===null&&Al.shift();if(l=(e.ownerDocument||e).$$reactFormReplay,l!=null)for(a=0;a<l.length;a+=3){var o=l[a],h=l[a+1],b=o[Bt]||null;if(typeof h=="function")b||Om(l);else if(b){var k=null;if(h&&h.hasAttribute("formAction")){if(o=h,b=h[Bt]||null)k=b.formAction;else if(ic(o)!==null)continue}else k=b.action;typeof k=="function"?l[a+1]=k:(l.splice(a,3),a-=3),Om(l)}}}function Lm(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(b){return o=b})},focusReset:"manual",scroll:"manual"})}function n(){o!==null&&(o(),o=null),a||setTimeout(l,20)}function l(){if(!a&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var a=!1,o=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),o!==null&&(o(),o=null)}}}function ac(e){this._internalRoot=e}bu.prototype.render=ac.prototype.render=function(e){var n=this._internalRoot;if(n===null)throw Error(u(409));var l=n.current,a=en();Em(l,a,e,n,null,null)},bu.prototype.unmount=ac.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var n=e.containerInfo;Em(e.current,2,null,e,null,null),Wa(),n[oi]=null}};function bu(e){this._internalRoot=e}bu.prototype.unstable_scheduleHydration=function(e){if(e){var n=Xf();e={blockedOn:null,target:e,priority:n};for(var l=0;l<Al.length&&n!==0&&n<Al[l].priority;l++);Al.splice(l,0,e),l===0&&Rm(e)}};var Um=i.version;if(Um!=="19.2.8")throw Error(u(527,Um,"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?y(e):null,e=e===null?null:e.stateNode,e};var p0={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:D,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var vu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!vu.isDisabled&&vu.supportsFiber)try{St=vu.inject(p0),ut=vu}catch{}}return Xr.createRoot=function(e,n){if(!s(e))throw Error(u(299));var l=!1,a="",o=Vh,h=Fh,b=Xh;return n!=null&&(n.unstable_strictMode===!0&&(l=!0),n.identifierPrefix!==void 0&&(a=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(h=n.onCaughtError),n.onRecoverableError!==void 0&&(b=n.onRecoverableError)),n=Nm(e,1,!1,null,null,l,a,null,o,h,b,Lm),e[oi]=n.current,Io(e),new ac(n)},Xr.hydrateRoot=function(e,n,l){if(!s(e))throw Error(u(299));var a=!1,o="",h=Vh,b=Fh,k=Xh,T=null;return l!=null&&(l.unstable_strictMode===!0&&(a=!0),l.identifierPrefix!==void 0&&(o=l.identifierPrefix),l.onUncaughtError!==void 0&&(h=l.onUncaughtError),l.onCaughtError!==void 0&&(b=l.onCaughtError),l.onRecoverableError!==void 0&&(k=l.onRecoverableError),l.formState!==void 0&&(T=l.formState)),n=Nm(e,1,!0,n,l??null,a,o,T,h,b,k,Lm),n.context=Cm(null),l=n.current,a=en(),a=Zu(a),o=ml(a),o.callback=null,gl(l,o,a),l=a,n.current.lanes=l,tr(n,l),Rn(n),e[oi]=n.current,Io(e),new bu(n)},Xr.version="19.2.8",Xr}var $m;function j0(){if($m)return oc.exports;$m=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(),oc.exports=w0(),oc.exports}var N0=j0();const C0=qu(N0);function E0(t,i){const r=t.getElementById("product-config");if(!r)return i;let u;try{u=JSON.parse(r.textContent??"")}catch{throw new Error("Invalid public product configuration.")}if(typeof u!="object"||u===null)throw new Error("Invalid public product configuration.");const s=u,c=s.identity?.displayName,f=s.identity?.cliName,p=s.storage?.browserNamespace;if(![c,f,p].every(g=>typeof g=="string"&&g.trim()!==""))throw new Error("Public product configuration is missing required identity fields.");return{identity:{displayName:c,cliName:f},storage:{browserNamespace:p}}}const _0=Object.freeze(["not_available","stopping","in_progress","prompt_pending","unknown_session","unreadable","start_failed","limit","failed"]),T0=Object.freeze(["not_available","stopping","unknown_session","live_elsewhere","running","failed"]),A0="owner",Sx="agent";function Be(t){return typeof t=="object"&&!!t&&!Array.isArray(t)}const ke=t=>typeof t=="string",$e=t=>typeof t=="string"&&t.length>0,il=t=>typeof t=="boolean",zu=t=>typeof t=="number"&&Number.isFinite(t),hc=t=>Number.isSafeInteger(t)&&t>=0,bt=t=>i=>i===void 0||t(i),Dl=t=>Array.isArray(t)&&t.every(Be),Qm=t=>t===null||Be(t),wn=t=>i=>typeof i=="string"&&t.includes(i),z0={user:!0,"agent-wakeup":!0,peer:!0,external:!0},D0=t=>Be(t)&&ke(t.id)&&ke(t.timestamp)&&ke(t.category)&&ke(t.type),R0=t=>Array.isArray(t)&&t.every(D0),M0=t=>Be(t)&&ke(t.name)&&ke(t.description)&&ke(t.definedIn),O0=t=>Array.isArray(t)&&t.every(M0),L0=["cancel","close","send"],Zm={none:{},several:{message:ke},stopped:{loopId:$e,message:bt(ke)},failed:{loopId:bt($e),message:ke}},U0=t=>{if(!Be(t)||!ke(t.kind))return!1;let i=t.kind;if(!Object.prototype.hasOwnProperty.call(Zm,i))return!1;let r=Zm[i];return Object.entries(r).every(([u,s])=>s(t[u]))};function mf(t){return i=>{if(!Be(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,s])=>s(i[u]))}}const q0=["Added","Modified","Deleted","Renamed","Copied","Untracked","Conflicted"],B0=t=>Be(t)&&$e(t.path)&&wn(q0)(t.status)&&bt($e)(t.renamedFrom)&&bt(zu)(t.added)&&bt(zu)(t.removed),H0=mf({status:{branch:bt(ke),unborn:il,files:t=>Array.isArray(t)&&t.every(B0),truncated:il},"not-a-repository":{},failed:{message:ke}}),I0=["add","remove","context","hunk"],Y0=t=>Be(t)&&wn(I0)(t.type)&&ke(t.text)&&zu(t.lineNumber),G0=mf({diff:{diffLines:t=>Array.isArray(t)&&t.every(Y0),truncated:il},"not-a-repository":{},"outside-workspace":{},failed:{message:ke}}),V0=mf({memory:{content:ke,path:$e,truncated:il},unavailable:{message:ke}}),ll={driverId:bt(ke)},F0={text_delta:{delta:ke,...ll},user_message:{content:ke,...ll},tool_start:{state:Be,...ll},tool_end:{state:Be,...ll},thinking:{isThinking:il,...ll},complete:{result:Be,...ll},interrupted:{result:Be,...ll},error:{message:ke,code:bt(wn(["auth","rate_limit","model_unavailable","network","provider"])),provider:bt(ke),retryAfterSeconds:bt(zu),model:bt(ke),...ll},command_result:{name:ke,message:ke,success:il,requestId:bt(ke)},messages:{messages:Dl,display:bt(Dl),...ll},history:{startIndex:hc,total:hc,entries:R0},context:{state:Be},history_changed:{},turn_source:{source:wn(Object.keys(z0))},commands:{commands:Dl,skills:Dl},session_status:{status:Be},model_list:{requestId:$e,groups:Dl,currentProfile:bt(ke),currentModel:ke},agent_definitions:{requestId:$e,agents:O0,current:$e},sessions:{requestId:$e,listing:Be},sessions_error:{requestId:$e,code:wn(["not_available","list_failed"]),message:ke},session_switched:{event:Be},session_change_failed:{code:wn(_0),message:ke,requestId:bt(ke)},session_renamed_in_list:{requestId:$e,sessionId:ke,name:ke},session_rename_failed:{requestId:$e,message:ke},session_deleted:{requestId:$e,sessionId:ke},session_delete_failed:{requestId:$e,code:wn(T0),message:ke},usage_report:{report:Be},personal_usage_report:{requestId:$e,report:Be},personal_usage_report_error:{requestId:$e,code:wn(["not_available","report_failed"]),message:ke},stored_session_usage_report:{requestId:$e,sessionId:$e,report:Be},stored_session_usage_report_error:{requestId:$e,sessionId:$e,code:wn(["not_available","report_failed"]),message:ke},executing:{executing:il},pending:{pending:t=>t===null||ke(t),pendingCount:bt(hc)},execution_workspace_event:{snapshot:Be},execution_detail:{requestId:$e,page:Be},execution_detail_error:{requestId:$e,message:ke},waiting_loop_stop:{requestId:$e,outcome:U0},project_status:{requestId:$e,result:H0},project_diff:{requestId:$e,result:G0},project_memory:{requestId:$e,result:V0},app_tool_result:{requestId:$e,success:il,data:()=>!0,parts:bt(Dl),error:bt(ke)},app_view:{requestId:$e,view:Be},background_task_event:{event:Be},background_job_group_event:{event:Be},plan_event:{event:Be},context_file_refreshed:{event:Be},branch_event:{event:Be},background_tasks:{tasks:Dl},background_task:{taskId:ke,task:Qm},background_job_groups:{groups:Dl},background_job_group:{groupId:ke,group:Qm},background_task_log:{taskId:ke,page:Be},permission_request:{event:Be},ask_request:{event:Be},prompt_resolved:{event:Be},ui_intent:{event:Be},session_renamed:{event:Be},history_cleared:{},background_task_control_result:{action:wn(L0),taskId:ke,success:il,message:bt(ke)},protocol_error:{message:ke,requestId:bt(ke)},resume_gap:{},settings:{requestId:$e,settings:Be},settings_error:{requestId:$e,code:wn(["not_available","invalid","refused","update_failed"]),message:ke}};function X0(t,i,r){if(!Be(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 s=Object.prototype.hasOwnProperty.call(i,u)?i[u]:void 0;if(s===void 0)return{ok:!1,reason:`Unknown message type: ${u}`};for(let[c,f]of Object.entries(s))if(!f(t[c]))return{ok:!1,reason:r(c)};return{ok:!0,message:t}}function $0(t){return X0(t,F0,i=>`${i} has an invalid shape`)}function Q0(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 Z0(t,i){const r={};return(t[t.length-1]===""?[...t,""]:t).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const K0=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,J0=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,P0={};function Km(t,i){return(P0.jsx?J0:K0).test(t)}const W0=/[ \t\n\f\r]/g;function ev(t){return typeof t=="object"?t.type==="text"?Jm(t.value):!1:Jm(t)}function Jm(t){return t.replace(W0,"")===""}class ia{constructor(i,r,u){this.normal=r,this.property=i,u&&(this.space=u)}}ia.prototype.normal={};ia.prototype.property={};ia.prototype.space=void 0;function kx(t,i){const r={},u={};for(const s of t)Object.assign(r,s.property),Object.assign(u,s.normal);return new ia(r,u,i)}function $c(t){return t.toLowerCase()}class $t{constructor(i,r){this.attribute=r,this.property=i}}$t.prototype.attribute="";$t.prototype.booleanish=!1;$t.prototype.boolean=!1;$t.prototype.commaOrSpaceSeparated=!1;$t.prototype.commaSeparated=!1;$t.prototype.defined=!1;$t.prototype.mustUseProperty=!1;$t.prototype.number=!1;$t.prototype.overloadedBoolean=!1;$t.prototype.property="";$t.prototype.spaceSeparated=!1;$t.prototype.space=void 0;let tv=0;const Ne=ri(),yt=ri(),Qc=ri(),le=ri(),nt=ri(),ni=ri(),tn=ri();function ri(){return 2**++tv}const Zc=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ne,booleanish:yt,commaOrSpaceSeparated:tn,commaSeparated:ni,number:le,overloadedBoolean:Qc,spaceSeparated:nt},Symbol.toStringTag,{value:"Module"})),pc=Object.keys(Zc);class gf extends $t{constructor(i,r,u,s){let c=-1;if(super(i,r),Pm(this,"space",s),typeof u=="number")for(;++c<pc.length;){const f=pc[c];Pm(this,pc[c],(u&Zc[f])===Zc[f])}}}gf.prototype.defined=!0;function Pm(t,i,r){r&&(t[i]=r)}function Pi(t){const i={},r={};for(const[u,s]of Object.entries(t.properties)){const c=new gf(u,t.transform(t.attributes||{},u),s,t.space);t.mustUseProperty&&t.mustUseProperty.includes(u)&&(c.mustUseProperty=!0),i[u]=c,r[$c(u)]=u,r[$c(c.attribute)]=u}return new ia(i,r,t.space)}const wx=Pi({properties:{ariaActiveDescendant:null,ariaAtomic:yt,ariaAutoComplete:null,ariaBusy:yt,ariaChecked:yt,ariaColCount:le,ariaColIndex:le,ariaColSpan:le,ariaControls:nt,ariaCurrent:null,ariaDescribedBy:nt,ariaDetails:null,ariaDisabled:yt,ariaDropEffect:nt,ariaErrorMessage:null,ariaExpanded:yt,ariaFlowTo:nt,ariaGrabbed:yt,ariaHasPopup:null,ariaHidden:yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:nt,ariaLevel:le,ariaLive:null,ariaModal:yt,ariaMultiLine:yt,ariaMultiSelectable:yt,ariaOrientation:null,ariaOwns:nt,ariaPlaceholder:null,ariaPosInSet:le,ariaPressed:yt,ariaReadOnly:yt,ariaRelevant:null,ariaRequired:yt,ariaRoleDescription:nt,ariaRowCount:le,ariaRowIndex:le,ariaRowSpan:le,ariaSelected:yt,ariaSetSize:le,ariaSort:null,ariaValueMax:le,ariaValueMin:le,ariaValueNow:le,ariaValueText:null,role:null},transform(t,i){return i==="role"?i:"aria-"+i.slice(4).toLowerCase()}});function jx(t,i){return i in t?t[i]:i}function Nx(t,i){return jx(t,i.toLowerCase())}const nv=Pi({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ni,acceptCharset:nt,accessKey:nt,action:null,allow:null,allowFullScreen:Ne,allowPaymentRequest:Ne,allowUserMedia:Ne,alpha:Ne,alt:null,as:null,async:Ne,autoCapitalize:null,autoComplete:nt,autoFocus:Ne,autoPlay:Ne,blocking:nt,capture:null,charSet:null,checked:Ne,cite:null,className:nt,closedBy:null,colorSpace:null,cols:le,colSpan:le,command:null,commandFor:null,content:null,contentEditable:yt,controls:Ne,controlsList:nt,coords:le|ni,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ne,defer:Ne,dir:null,dirName:null,disabled:Ne,download:Qc,draggable:yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ne,formTarget:null,headers:nt,height:le,hidden:Qc,high:le,href:null,hrefLang:null,htmlFor:nt,httpEquiv:nt,id:null,imageSizes:null,imageSrcSet:null,inert:Ne,inputMode:null,integrity:null,is:null,isMap:Ne,itemId:null,itemProp:nt,itemRef:nt,itemScope:Ne,itemType:nt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ne,low:le,manifest:null,max:null,maxLength:le,media:null,method:null,min:null,minLength:le,multiple:Ne,muted:Ne,name:null,nonce:null,noModule:Ne,noValidate:Ne,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:Ne,optimum:le,pattern:null,ping:nt,placeholder:null,playsInline:Ne,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ne,referrerPolicy:null,rel:nt,required:Ne,reversed:Ne,rows:le,rowSpan:le,sandbox:nt,scope:null,scoped:Ne,seamless:Ne,selected:Ne,shadowRootClonable:Ne,shadowRootCustomElementRegistry:Ne,shadowRootDelegatesFocus:Ne,shadowRootMode:null,shadowRootSerializable:Ne,shape:null,size:le,sizes:null,slot:null,span:le,spellCheck:yt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:le,step:null,style:null,tabIndex:le,target:null,title:null,translate:null,type:null,typeMustMatch:Ne,useMap:null,value:yt,width:le,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:nt,axis:null,background:null,bgColor:null,border:le,borderColor:null,bottomMargin:le,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ne,declare:Ne,event:null,face:null,frame:null,frameBorder:null,hSpace:le,leftMargin:le,link:null,longDesc:null,lowSrc:null,marginHeight:le,marginWidth:le,noResize:Ne,noHref:Ne,noShade:Ne,noWrap:Ne,object:null,profile:null,prompt:null,rev:null,rightMargin:le,rules:null,scheme:null,scrolling:yt,standby:null,summary:null,text:null,topMargin:le,valueType:null,version:null,vAlign:null,vLink:null,vSpace:le,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ne,disablePictureInPicture:Ne,disableRemotePlayback:Ne,exportParts:ni,part:nt,prefix:null,property:null,results:le,security:null,unselectable:null},space:"html",transform:Nx}),lv=Pi({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:le,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:le,amplitude:le,arabicForm:null,ascent:le,attributeName:null,attributeType:null,azimuth:le,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:le,by:null,calcMode:null,capHeight:le,className:nt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:le,diffuseConstant:le,direction:null,display:null,dur:null,divisor:le,dominantBaseline:null,download:Ne,dx:null,dy:null,edgeMode:null,editable:null,elevation:le,enableBackground:null,end:null,event:null,exponent:le,externalResourcesRequired:null,fill:null,fillOpacity:le,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:le,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:le,horizOriginX:le,horizOriginY:le,id:null,ideographic:le,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:le,k:le,k1:le,k2:le,k3:le,k4:le,kernelMatrix:tn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:le,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:le,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:le,overlineThickness:le,paintOrder:null,panose1:null,path:null,pathLength:le,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:nt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:le,pointsAtY:le,pointsAtZ:le,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:le,specularExponent:le,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:le,strikethroughThickness:le,string:null,stroke:null,strokeDashArray:tn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:le,strokeOpacity:le,strokeWidth:null,style:null,surfaceScale:le,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:tn,tabIndex:le,tableValues:null,target:null,targetX:le,targetY:le,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:le,underlineThickness:le,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:le,values:null,vAlphabetic:le,vMathematical:le,vectorEffect:null,vHanging:le,vIdeographic:le,version:null,vertAdvY:le,vertOriginX:le,vertOriginY:le,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:le,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:jx}),Cx=Pi({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()}}),Ex=Pi({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:Nx}),_x=Pi({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(t,i){return"xml:"+i.slice(3).toLowerCase()}}),iv={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"},rv=/[A-Z]/g,Wm=/-[a-z]/g,av=/^data[-\w.:]+$/i;function uv(t,i){const r=$c(i);let u=i,s=$t;if(r in t.normal)return t.property[t.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&av.test(i)){if(i.charAt(4)==="-"){const c=i.slice(5).replace(Wm,ov);u="data"+c.charAt(0).toUpperCase()+c.slice(1)}else{const c=i.slice(4);if(!Wm.test(c)){let f=c.replace(rv,sv);f.charAt(0)!=="-"&&(f="-"+f),i="data"+f}}s=gf}return new s(u,i)}function sv(t){return"-"+t.toLowerCase()}function ov(t){return t.charAt(1).toUpperCase()}const cv=kx([wx,nv,Cx,Ex,_x],"html"),xf=kx([wx,lv,Cx,Ex,_x],"svg");function fv(t){return t.join(" ").trim()}var $i={},mc,eg;function dv(){if(eg)return mc;eg=1;var t=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,i=/\n/g,r=/^\s*/,u=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,c=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,f=/^[;\s]*/,p=/^\s+|\s+$/g,g=`
|
|
50
|
-
`,m="/",y="*",x="",S="comment",v="declaration";function N(L,C){if(typeof L!="string")throw new TypeError("First argument must be a string");if(!L)return[];C=C||{};var F=1,U=1;function $(oe){var P=oe.match(i);P&&(F+=P.length);var D=oe.lastIndexOf(g);U=~D?oe.length-D:U+oe.length}function ue(){var oe={line:F,column:U};return function(P){return P.position=new R(oe),ee(),P}}function R(oe){this.start=oe,this.end={line:F,column:U},this.source=C.source}R.prototype.content=L;function H(oe){var P=new Error(C.source+":"+F+":"+U+": "+oe);if(P.reason=oe,P.filename=C.source,P.line=F,P.column=U,P.source=L,!C.silent)throw P}function ie(oe){var P=oe.exec(L);if(P){var D=P[0];return $(D),L=L.slice(D.length),P}}function ee(){ie(r)}function O(oe){var P;for(oe=oe||[];P=re();)P!==!1&&oe.push(P);return oe}function re(){var oe=ue();if(!(m!=L.charAt(0)||y!=L.charAt(1))){for(var P=2;x!=L.charAt(P)&&(y!=L.charAt(P)||m!=L.charAt(P+1));)++P;if(P+=2,x===L.charAt(P-1))return H("End of comment missing");var D=L.slice(2,P-2);return U+=2,$(D),L=L.slice(P),U+=2,oe({type:S,comment:D})}}function te(){var oe=ue(),P=ie(u);if(P){if(re(),!ie(s))return H("property missing ':'");var D=ie(c),Q=oe({type:v,property:_(P[0].replace(t,x)),value:D?_(D[0].replace(t,x)):x});return ie(f),Q}}function xe(){var oe=[];O(oe);for(var P;P=te();)P!==!1&&(oe.push(P),O(oe));return oe}return ee(),xe()}function _(L){return L?L.replace(p,x):x}return mc=N,mc}var tg;function hv(){if(tg)return $i;tg=1;var t=$i&&$i.__importDefault||function(u){return u&&u.__esModule?u:{default:u}};Object.defineProperty($i,"__esModule",{value:!0}),$i.default=r;const i=t(dv());function r(u,s){let c=null;if(!u||typeof u!="string")return c;const f=(0,i.default)(u),p=typeof s=="function";return f.forEach(g=>{if(g.type!=="declaration")return;const{property:m,value:y}=g;p?s(m,y,g):y&&(c=c||{},c[m]=y)}),c}return $i}var $r={},ng;function pv(){if(ng)return $r;ng=1,Object.defineProperty($r,"__esModule",{value:!0}),$r.camelCase=void 0;var t=/^--[a-zA-Z0-9_-]+$/,i=/-([a-z])/g,r=/^[^-]+$/,u=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(ms)-/,c=function(m){return!m||r.test(m)||t.test(m)},f=function(m,y){return y.toUpperCase()},p=function(m,y){return"".concat(y,"-")},g=function(m,y){return y===void 0&&(y={}),c(m)?m:(m=m.toLowerCase(),y.reactCompat?m=m.replace(s,p):m=m.replace(u,p),m.replace(i,f))};return $r.camelCase=g,$r}var Qr,lg;function mv(){if(lg)return Qr;lg=1;var t=Qr&&Qr.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},i=t(hv()),r=pv();function u(s,c){var f={};return!s||typeof s!="string"||(0,i.default)(s,function(p,g){p&&g&&(f[(0,r.camelCase)(p,c)]=g)}),f}return u.default=u,Qr=u,Qr}var gv=mv();const xv=qu(gv),Tx=Ax("end"),yf=Ax("start");function Ax(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 yv(t){const i=yf(t),r=Tx(t);if(i&&r)return{start:i,end:r}}function Wr(t){return!t||typeof t!="object"?"":"position"in t||"type"in t?ig(t.position):"start"in t||"end"in t?ig(t):"line"in t||"column"in t?Kc(t):""}function Kc(t){return rg(t&&t.line)+":"+rg(t&&t.column)}function ig(t){return Kc(t&&t.start)+"-"+Kc(t&&t.end)}function rg(t){return t&&typeof t=="number"?t:1}class Ot extends Error{constructor(i,r,u){super(),typeof r=="string"&&(u=r,r=void 0);let s="",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"?s=i:!c.cause&&i&&(f=!0,s=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=s,this.line=p?p.line:void 0,this.name=Wr(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}}Ot.prototype.file="";Ot.prototype.name="";Ot.prototype.reason="";Ot.prototype.message="";Ot.prototype.stack="";Ot.prototype.column=void 0;Ot.prototype.line=void 0;Ot.prototype.ancestors=void 0;Ot.prototype.cause=void 0;Ot.prototype.fatal=void 0;Ot.prototype.place=void 0;Ot.prototype.ruleId=void 0;Ot.prototype.source=void 0;const bf={}.hasOwnProperty,bv=new Map,vv=/[A-Z]/g,Sv=new Set(["table","tbody","thead","tfoot","tr"]),kv=new Set(["td","th"]),zx="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function wv(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=zv(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=Av(r,i.jsx,i.jsxs)}const s={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"?xf:cv,stylePropertyNameCase:i.stylePropertyNameCase||"dom",tableCellAlignToStyle:i.tableCellAlignToStyle!==!1},c=Dx(s,t,void 0);return c&&typeof c!="string"?c:s.create(t,s.Fragment,{children:c||void 0},void 0)}function Dx(t,i,r){if(i.type==="element")return jv(t,i,r);if(i.type==="mdxFlowExpression"||i.type==="mdxTextExpression")return Nv(t,i);if(i.type==="mdxJsxFlowElement"||i.type==="mdxJsxTextElement")return Ev(t,i,r);if(i.type==="mdxjsEsm")return Cv(t,i);if(i.type==="root")return _v(t,i,r);if(i.type==="text")return Tv(t,i)}function jv(t,i,r){const u=t.schema;let s=u;i.tagName.toLowerCase()==="svg"&&u.space==="html"&&(s=xf,t.schema=s),t.ancestors.push(i);const c=Mx(t,i.tagName,!1),f=Dv(t,i);let p=Sf(t,i);return Sv.has(i.tagName)&&(p=p.filter(function(g){return typeof g=="string"?!ev(g):!0})),Rx(t,f,c,i),vf(f,p),t.ancestors.pop(),t.schema=u,t.create(i,c,f,r)}function Nv(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)}na(t,i.position)}function Cv(t,i){if(i.data&&i.data.estree&&t.evaluater)return t.evaluater.evaluateProgram(i.data.estree);na(t,i.position)}function Ev(t,i,r){const u=t.schema;let s=u;i.name==="svg"&&u.space==="html"&&(s=xf,t.schema=s),t.ancestors.push(i);const c=i.name===null?t.Fragment:Mx(t,i.name,!0),f=Rv(t,i),p=Sf(t,i);return Rx(t,f,c,i),vf(f,p),t.ancestors.pop(),t.schema=u,t.create(i,c,f,r)}function _v(t,i,r){const u={};return vf(u,Sf(t,i)),t.create(i,t.Fragment,u,r)}function Tv(t,i){return i.value}function Rx(t,i,r,u){typeof r!="string"&&r!==t.Fragment&&t.passNode&&(i.node=u)}function vf(t,i){if(i.length>0){const r=i.length>1?i:i[0];r&&(t.children=r)}}function Av(t,i,r){return u;function u(s,c,f,p){const m=Array.isArray(f.children)?r:i;return p?m(c,f,p):m(c,f)}}function zv(t,i){return r;function r(u,s,c,f){const p=Array.isArray(c.children),g=yf(u);return i(s,c,f,p,{columnNumber:g?g.column-1:void 0,fileName:t,lineNumber:g?g.line:void 0},void 0)}}function Dv(t,i){const r={};let u,s;for(s in i.properties)if(s!=="children"&&bf.call(i.properties,s)){const c=Mv(t,s,i.properties[s]);if(c){const[f,p]=c;t.tableCellAlignToStyle&&f==="align"&&typeof p=="string"&&kv.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 Rv(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 na(t,i.position);else{const s=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 na(t,i.position);else c=u.value===null?!0:u.value;r[s]=c}return r}function Sf(t,i){const r=[];let u=-1;const s=t.passKeys?new Map:bv;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=s.get(g)||0;f=g+"-"+m,s.set(g,m+1)}}const p=Dx(t,c,f);p!==void 0&&r.push(p)}return r}function Mv(t,i,r){const u=uv(t.schema,i);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=u.commaSeparated?Z0(r):fv(r)),u.property==="style"){let s=typeof r=="object"?r:Ov(t,String(r));return t.stylePropertyNameCase==="css"&&(s=Lv(s)),["style",s]}return[t.elementAttributeNameCase==="react"&&u.space?iv[u.property]||u.property:u.attribute,r]}}function Ov(t,i){try{return xv(i,{reactCompat:!0})}catch(r){if(t.ignoreInvalidStyle)return{};const u=r,s=new Ot("Cannot parse `style` attribute",{ancestors:t.ancestors,cause:u,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=t.filePath||void 0,s.url=zx+"#cannot-parse-style-attribute",s}}function Mx(t,i,r){let u;if(!r)u={type:"Literal",value:i};else if(i.includes(".")){const s=i.split(".");let c=-1,f;for(;++c<s.length;){const p=Km(s[c])?{type:"Identifier",name:s[c]}:{type:"Literal",value:s[c]};f=f?{type:"MemberExpression",object:f,property:p,computed:!!(c&&p.type==="Literal"),optional:!1}:p}u=f}else u=Km(i)&&!/^[a-z]/.test(i)?{type:"Identifier",name:i}:{type:"Literal",value:i};if(u.type==="Literal"){const s=u.value;return bf.call(t.components,s)?t.components[s]:s}if(t.evaluater)return t.evaluater.evaluateExpression(u);na(t)}function na(t,i){const r=new Ot("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=zx+"#cannot-handle-mdx-estrees-without-createevaluater",r}function Lv(t){const i={};let r;for(r in t)bf.call(t,r)&&(i[Uv(r)]=t[r]);return i}function Uv(t){let i=t.replace(vv,qv);return i.slice(0,3)==="ms-"&&(i="-"+i),i}function qv(t){return"-"+t.toLowerCase()}const gc={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"]},Bv={};function kf(t,i){const r=Bv,u=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,s=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return Ox(t,u,s)}function Ox(t,i,r){if(Hv(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 ag(t.children,i,r)}return Array.isArray(t)?ag(t,i,r):""}function ag(t,i,r){const u=[];let s=-1;for(;++s<t.length;)u[s]=Ox(t[s],i,r);return u.join("")}function Hv(t){return!!(t&&typeof t=="object")}const ug=document.createElement("i");function wf(t){const i="&"+t+";";ug.innerHTML=i;const r=ug.textContent;return r.charCodeAt(r.length-1)===59&&t!=="semi"||r===i?!1:r}function nn(t,i,r,u){const s=t.length;let c=0,f;if(i<0?i=-i>s?0:s+i:i=i>s?s: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 sg={}.hasOwnProperty;function Lx(t){const i={};let r=-1;for(;++r<t.length;)Iv(i,t[r]);return i}function Iv(t,i){let r;for(r in i){const s=(sg.call(t,r)?t[r]:void 0)||(t[r]={}),c=i[r];let f;if(c)for(f in c){sg.call(s,f)||(s[f]=[]);const p=c[f];Yv(s[f],Array.isArray(p)?p:p?[p]:[])}}}function Yv(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 Ux(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 jn(t){return t.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Ut=Ol(/[A-Za-z]/),Mt=Ol(/[\dA-Za-z]/),Gv=Ol(/[#-'*+\--9=?A-Z^-~]/);function Du(t){return t!==null&&(t<32||t===127)}const Jc=Ol(/\d/),Vv=Ol(/[\dA-Fa-f]/),Fv=Ol(/[!-/:-@[-`{-~]/);function ve(t){return t!==null&&t<-2}function lt(t){return t!==null&&(t<0||t===32)}function Me(t){return t===-2||t===-1||t===32}const Bu=Ol(/\p{P}|\p{S}/u),ii=Ol(/\s/);function Ol(t){return i;function i(r){return r!==null&&r>-1&&t.test(String.fromCharCode(r))}}function Wi(t){const i=[];let r=-1,u=0,s=0;for(;++r<t.length;){const c=t.charCodeAt(r);let f="";if(c===37&&Mt(t.charCodeAt(r+1))&&Mt(t.charCodeAt(r+2)))s=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),s=1):f="�"}else f=String.fromCharCode(c);f&&(i.push(t.slice(u,r),encodeURIComponent(f)),u=r+s+1,f=""),s&&(r+=s,s=0)}return i.join("")+t.slice(u)}function Ie(t,i,r,u){const s=u?u-1:Number.POSITIVE_INFINITY;let c=0;return f;function f(g){return Me(g)?(t.enter(r),p(g)):i(g)}function p(g){return Me(g)&&c++<s?(t.consume(g),p):(t.exit(r),i(g))}}const Xv={tokenize:$v};function $v(t){const i=t.attempt(this.parser.constructs.contentInitial,u,s);let r;return i;function u(p){if(p===null){t.consume(p);return}return t.enter("lineEnding"),t.consume(p),t.exit("lineEnding"),Ie(t,i,"linePrefix")}function s(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 ve(p)?(t.consume(p),t.exit("chunkText"),c):(t.consume(p),f)}}const Qv={tokenize:Zv},og={tokenize:Kv};function Zv(t){const i=this,r=[];let u=0,s,c,f;return p;function p(U){if(u<r.length){const $=r[u];return i.containerState=$[1],t.attempt($[0].continuation,g,m)(U)}return m(U)}function g(U){if(u++,i.containerState._closeFlow){i.containerState._closeFlow=void 0,s&&F();const $=i.events.length;let ue=$,R;for(;ue--;)if(i.events[ue][0]==="exit"&&i.events[ue][1].type==="chunkFlow"){R=i.events[ue][1].end;break}C(u);let H=$;for(;H<i.events.length;)i.events[H][1].end={...R},H++;return nn(i.events,ue+1,0,i.events.slice($)),i.events.length=H,m(U)}return p(U)}function m(U){if(u===r.length){if(!s)return S(U);if(s.currentConstruct&&s.currentConstruct.concrete)return N(U);i.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return i.containerState={},t.check(og,y,x)(U)}function y(U){return s&&F(),C(u),S(U)}function x(U){return i.parser.lazy[i.now().line]=u!==r.length,f=i.now().offset,N(U)}function S(U){return i.containerState={},t.attempt(og,v,N)(U)}function v(U){return u++,r.push([i.currentConstruct,i.containerState]),S(U)}function N(U){if(U===null){s&&F(),C(0),t.consume(U);return}return s=s||i.parser.flow(i.now()),t.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:c}),_(U)}function _(U){if(U===null){L(t.exit("chunkFlow"),!0),C(0),t.consume(U);return}return ve(U)?(t.consume(U),L(t.exit("chunkFlow")),u=0,i.interrupt=void 0,p):(t.consume(U),_)}function L(U,$){const ue=i.sliceStream(U);if($&&ue.push(null),U.previous=c,c&&(c.next=U),c=U,s.defineSkip(U.start),s.write(ue),i.parser.lazy[U.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<f&&(!s.events[R][1].end||s.events[R][1].end.offset>f))return;const H=i.events.length;let ie=H,ee,O;for(;ie--;)if(i.events[ie][0]==="exit"&&i.events[ie][1].type==="chunkFlow"){if(ee){O=i.events[ie][1].end;break}ee=!0}for(C(u),R=H;R<i.events.length;)i.events[R][1].end={...O},R++;nn(i.events,ie+1,0,i.events.slice(H)),i.events.length=R}}function C(U){let $=r.length;for(;$-- >U;){const ue=r[$];i.containerState=ue[1],ue[0].exit.call(i,t)}r.length=U}function F(){s.write([null]),c=void 0,s=void 0,i.containerState._closeFlow=void 0}}function Kv(t,i,r){return Ie(t,t.attempt(this.parser.constructs.document,i,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Ji(t){if(t===null||lt(t)||ii(t))return 1;if(Bu(t))return 2}function Hu(t,i,r){const u=[];let s=-1;for(;++s<t.length;){const c=t[s].resolveAll;c&&!u.includes(c)&&(i=c(i,r),u.push(c))}return i}const Pc={name:"attention",resolveAll:Jv,tokenize:Pv};function Jv(t,i){let r=-1,u,s,c,f,p,g,m,y;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};cg(x,-g),cg(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}},s={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",s,i],["enter",f,i],["exit",f,i],["enter",c,i]]),m=yn(m,Hu(i.parser.constructs.insideSpan.null,t.slice(u+1,r),i)),m=yn(m,[["exit",c,i],["enter",p,i],["exit",p,i],["exit",s,i]]),t[r][1].end.offset-t[r][1].start.offset?(y=2,m=yn(m,[["enter",t[r][1],i],["exit",t[r][1],i]])):y=0,nn(t,u-1,r-u+3,m),r=u+m.length-y-2;break}}for(r=-1;++r<t.length;)t[r][1].type==="attentionSequence"&&(t[r][1].type="data");return t}function Pv(t,i){const r=this.parser.constructs.attentionMarkers.null,u=this.previous,s=Ji(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"),y=Ji(g),x=!y||y===2&&s||r.includes(g),S=!s||s===2&&y||r.includes(u);return m._open=!!(c===42?x:x&&(s||!S)),m._close=!!(c===42?S:S&&(y||!x)),i(g)}}function cg(t,i){t.column+=i,t.offset+=i,t._bufferIndex+=i}const Wv={name:"autolink",tokenize:eS};function eS(t,i,r){let u=0;return s;function s(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||Mt(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||Mt(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||Du(v)?r(v):(t.consume(v),g)}function m(v){return v===64?(t.consume(v),y):Gv(v)?(t.consume(v),m):r(v)}function y(v){return Mt(v)?x(v):r(v)}function x(v){return v===46?(t.consume(v),u=0,y):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||Mt(v))&&u++<63){const N=v===45?S:x;return t.consume(v),N}return r(v)}}const ra={partial:!0,tokenize:tS};function tS(t,i,r){return u;function u(c){return Me(c)?Ie(t,s,"linePrefix")(c):s(c)}function s(c){return c===null||ve(c)?i(c):r(c)}}const qx={continuation:{tokenize:lS},exit:iS,name:"blockQuote",tokenize:nS};function nS(t,i,r){const u=this;return s;function s(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 Me(f)?(t.enter("blockQuotePrefixWhitespace"),t.consume(f),t.exit("blockQuotePrefixWhitespace"),t.exit("blockQuotePrefix"),i):(t.exit("blockQuotePrefix"),i(f))}}function lS(t,i,r){const u=this;return s;function s(f){return Me(f)?Ie(t,c,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(f):c(f)}function c(f){return t.attempt(qx,i,r)(f)}}function iS(t){t.exit("blockQuote")}const Bx={name:"characterEscape",tokenize:rS};function rS(t,i,r){return u;function u(c){return t.enter("characterEscape"),t.enter("escapeMarker"),t.consume(c),t.exit("escapeMarker"),s}function s(c){return Fv(c)?(t.enter("characterEscapeValue"),t.consume(c),t.exit("characterEscapeValue"),t.exit("characterEscape"),i):r(c)}}const Hx={name:"characterReference",tokenize:aS};function aS(t,i,r){const u=this;let s=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=Mt,y(x))}function m(x){return x===88||x===120?(t.enter("characterReferenceMarkerHexadecimal"),t.consume(x),t.exit("characterReferenceMarkerHexadecimal"),t.enter("characterReferenceValue"),c=6,f=Vv,y):(t.enter("characterReferenceValue"),c=7,f=Jc,y(x))}function y(x){if(x===59&&s){const S=t.exit("characterReferenceValue");return f===Mt&&!wf(u.sliceSerialize(S))?r(x):(t.enter("characterReferenceMarker"),t.consume(x),t.exit("characterReferenceMarker"),t.exit("characterReference"),i)}return f(x)&&s++<c?(t.consume(x),y):r(x)}}const fg={partial:!0,tokenize:sS},dg={concrete:!0,name:"codeFenced",tokenize:uS};function uS(t,i,r){const u=this,s={partial:!0,tokenize:ue};let c=0,f=0,p;return g;function g(R){return m(R)}function m(R){const H=u.events[u.events.length-1];return c=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,p=R,t.enter("codeFenced"),t.enter("codeFencedFence"),t.enter("codeFencedFenceSequence"),y(R)}function y(R){return R===p?(f++,t.consume(R),y):f<3?r(R):(t.exit("codeFencedFenceSequence"),Me(R)?Ie(t,x,"whitespace")(R):x(R))}function x(R){return R===null||ve(R)?(t.exit("codeFencedFence"),u.interrupt?i(R):t.check(fg,_,$)(R)):(t.enter("codeFencedFenceInfo"),t.enter("chunkString",{contentType:"string"}),S(R))}function S(R){return R===null||ve(R)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),x(R)):Me(R)?(t.exit("chunkString"),t.exit("codeFencedFenceInfo"),Ie(t,v,"whitespace")(R)):R===96&&R===p?r(R):(t.consume(R),S)}function v(R){return R===null||ve(R)?x(R):(t.enter("codeFencedFenceMeta"),t.enter("chunkString",{contentType:"string"}),N(R))}function N(R){return R===null||ve(R)?(t.exit("chunkString"),t.exit("codeFencedFenceMeta"),x(R)):R===96&&R===p?r(R):(t.consume(R),N)}function _(R){return t.attempt(s,$,L)(R)}function L(R){return t.enter("lineEnding"),t.consume(R),t.exit("lineEnding"),C}function C(R){return c>0&&Me(R)?Ie(t,F,"linePrefix",c+1)(R):F(R)}function F(R){return R===null||ve(R)?t.check(fg,_,$)(R):(t.enter("codeFlowValue"),U(R))}function U(R){return R===null||ve(R)?(t.exit("codeFlowValue"),F(R)):(t.consume(R),U)}function $(R){return t.exit("codeFenced"),i(R)}function ue(R,H,ie){let ee=0;return O;function O(P){return R.enter("lineEnding"),R.consume(P),R.exit("lineEnding"),re}function re(P){return R.enter("codeFencedFence"),Me(P)?Ie(R,te,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):te(P)}function te(P){return P===p?(R.enter("codeFencedFenceSequence"),xe(P)):ie(P)}function xe(P){return P===p?(ee++,R.consume(P),xe):ee>=f?(R.exit("codeFencedFenceSequence"),Me(P)?Ie(R,oe,"whitespace")(P):oe(P)):ie(P)}function oe(P){return P===null||ve(P)?(R.exit("codeFencedFence"),H(P)):ie(P)}}}function sS(t,i,r){const u=this;return s;function s(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 xc={name:"codeIndented",tokenize:cS},oS={partial:!0,tokenize:fS};function cS(t,i,r){const u=this;return s;function s(m){return t.enter("codeIndented"),Ie(t,c,"linePrefix",5)(m)}function c(m){const y=u.events[u.events.length-1];return y&&y[1].type==="linePrefix"&&y[2].sliceSerialize(y[1],!0).length>=4?f(m):r(m)}function f(m){return m===null?g(m):ve(m)?t.attempt(oS,f,g)(m):(t.enter("codeFlowValue"),p(m))}function p(m){return m===null||ve(m)?(t.exit("codeFlowValue"),f(m)):(t.consume(m),p)}function g(m){return t.exit("codeIndented"),i(m)}}function fS(t,i,r){const u=this;return s;function s(f){return u.parser.lazy[u.now().line]?r(f):ve(f)?(t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),s):Ie(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):ve(f)?s(f):r(f)}}const dS={name:"codeText",previous:pS,resolve:hS,tokenize:mS};function hS(t){let i=t.length-4,r=3,u,s;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;)s===void 0?u!==i&&t[u][1].type!=="lineEnding"&&(s=u):(u===i||t[u][1].type==="lineEnding")&&(t[s][1].type="codeTextData",u!==s+2&&(t[s][1].end=t[u-1][1].end,t.splice(s+2,u-s-2),i-=u-s-2,u=s+2),s=void 0);return t}function pS(t){return t!==96||this.events[this.events.length-1][1].type==="characterEscape"}function mS(t,i,r){let u=0,s,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"),s=0,y(x)):ve(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||ve(x)?(t.exit("codeTextData"),g(x)):(t.consume(x),m)}function y(x){return x===96?(t.consume(x),s++,y):s===u?(t.exit("codeTextSequence"),t.exit("codeText"),i(x)):(c.type="codeTextData",m(x))}}class gS{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 s=r||0;this.setCursor(Math.trunc(i));const c=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return u&&Zr(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),Zr(this.left,i)}unshift(i){this.setCursor(0),this.right.push(i)}unshiftMany(i){this.setCursor(0),Zr(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);Zr(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-i,Number.POSITIVE_INFINITY);Zr(this.left,r.reverse())}}}function Zr(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 Ix(t){const i={};let r=-1,u,s,c,f,p,g,m;const y=new gS(t);for(;++r<y.length;){for(;r in i;)r=i[r];if(u=y.get(r),r&&u[1].type==="chunkFlow"&&y.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,xS(y,r)),r=i[r],m=!0);else if(u[1]._container){for(c=r,s=void 0;c--;)if(f=y.get(c),f[1].type==="lineEnding"||f[1].type==="lineEndingBlank")f[0]==="enter"&&(s&&(y.get(s)[1].type="lineEndingBlank"),f[1].type="lineEnding",s=c);else if(!(f[1].type==="linePrefix"||f[1].type==="listItemIndent"))break;s&&(u[1].end={...y.get(s)[1].start},p=y.slice(s,r),p.unshift(u),y.splice(s,r-s+1,p))}}return nn(t,0,Number.POSITIVE_INFINITY,y.slice(0)),!m}function xS(t,i){const r=t.get(i)[1],u=t.get(i)[2];let s=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 y,x,S=-1,v=r,N=0,_=0;const L=[_];for(;v;){for(;t.get(++s)[1]!==v;);c.push(s),v._tokenizer||(y=u.sliceStream(v),v.next||y.push(null),x&&f.defineSkip(v.start),v._isInFirstContentOfListItem&&(f._gfmTasklistFirstContentOfListItem=!0),f.write(y),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&&(_=S+1,L.push(_),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 C=p.slice(L[S],L[S+1]),F=c.pop();g.push([F,F+C.length-1]),t.splice(F,2,C)}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 yS={resolve:vS,tokenize:SS},bS={partial:!0,tokenize:kS};function vS(t){return Ix(t),t}function SS(t,i){let r;return u;function u(p){return t.enter("content"),r=t.enter("chunkContent",{contentType:"content"}),s(p)}function s(p){return p===null?c(p):ve(p)?t.check(bS,f,c)(p):(t.consume(p),s)}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,s}}function kS(t,i,r){const u=this;return s;function s(f){return t.exit("chunkContent"),t.enter("lineEnding"),t.consume(f),t.exit("lineEnding"),Ie(t,c,"linePrefix")}function c(f){if(f===null||ve(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 Yx(t,i,r,u,s,c,f,p,g){const m=g||Number.POSITIVE_INFINITY;let y=0;return x;function x(C){return C===60?(t.enter(u),t.enter(s),t.enter(c),t.consume(C),t.exit(c),S):C===null||C===32||C===41||Du(C)?r(C):(t.enter(u),t.enter(f),t.enter(p),t.enter("chunkString",{contentType:"string"}),_(C))}function S(C){return C===62?(t.enter(c),t.consume(C),t.exit(c),t.exit(s),t.exit(u),i):(t.enter(p),t.enter("chunkString",{contentType:"string"}),v(C))}function v(C){return C===62?(t.exit("chunkString"),t.exit(p),S(C)):C===null||C===60||ve(C)?r(C):(t.consume(C),C===92?N:v)}function N(C){return C===60||C===62||C===92?(t.consume(C),v):v(C)}function _(C){return!y&&(C===null||C===41||lt(C))?(t.exit("chunkString"),t.exit(p),t.exit(f),t.exit(u),i(C)):y<m&&C===40?(t.consume(C),y++,_):C===41?(t.consume(C),y--,_):C===null||C===32||C===40||Du(C)?r(C):(t.consume(C),C===92?L:_)}function L(C){return C===40||C===41||C===92?(t.consume(C),_):_(C)}}function Gx(t,i,r,u,s,c){const f=this;let p=0,g;return m;function m(v){return t.enter(u),t.enter(s),t.consume(v),t.exit(s),t.enter(c),y}function y(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(s),t.consume(v),t.exit(s),t.exit(u),i):ve(v)?(t.enter("lineEnding"),t.consume(v),t.exit("lineEnding"),y):(t.enter("chunkString",{contentType:"string"}),x(v))}function x(v){return v===null||v===91||v===93||ve(v)||p++>999?(t.exit("chunkString"),y(v)):(t.consume(v),g||(g=!Me(v)),v===92?S:x)}function S(v){return v===91||v===92||v===93?(t.consume(v),p++,x):x(v)}}function Vx(t,i,r,u,s,c){let f;return p;function p(S){return S===34||S===39||S===40?(t.enter(u),t.enter(s),t.consume(S),t.exit(s),f=S===40?41:S,g):r(S)}function g(S){return S===f?(t.enter(s),t.consume(S),t.exit(s),t.exit(u),i):(t.enter(c),m(S))}function m(S){return S===f?(t.exit(c),g(f)):S===null?r(S):ve(S)?(t.enter("lineEnding"),t.consume(S),t.exit("lineEnding"),Ie(t,m,"linePrefix")):(t.enter("chunkString",{contentType:"string"}),y(S))}function y(S){return S===f||S===null||ve(S)?(t.exit("chunkString"),m(S)):(t.consume(S),S===92?x:y)}function x(S){return S===f||S===92?(t.consume(S),y):y(S)}}function ea(t,i){let r;return u;function u(s){return ve(s)?(t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),r=!0,u):Me(s)?Ie(t,u,r?"linePrefix":"lineSuffix")(s):i(s)}}const wS={name:"definition",tokenize:NS},jS={partial:!0,tokenize:CS};function NS(t,i,r){const u=this;let s;return c;function c(v){return t.enter("definition"),f(v)}function f(v){return Gx.call(u,t,p,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(v)}function p(v){return s=jn(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 lt(v)?ea(t,m)(v):m(v)}function m(v){return Yx(t,y,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(v)}function y(v){return t.attempt(jS,x,x)(v)}function x(v){return Me(v)?Ie(t,S,"whitespace")(v):S(v)}function S(v){return v===null||ve(v)?(t.exit("definition"),u.parser.defined.push(s),i(v)):r(v)}}function CS(t,i,r){return u;function u(p){return lt(p)?ea(t,s)(p):r(p)}function s(p){return Vx(t,c,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(p)}function c(p){return Me(p)?Ie(t,f,"whitespace")(p):f(p)}function f(p){return p===null||ve(p)?i(p):r(p)}}const ES={name:"hardBreakEscape",tokenize:_S};function _S(t,i,r){return u;function u(c){return t.enter("hardBreakEscape"),t.consume(c),s}function s(c){return ve(c)?(t.exit("hardBreakEscape"),i(c)):r(c)}}const TS={name:"headingAtx",resolve:AS,tokenize:zS};function AS(t,i){let r=t.length-2,u=3,s,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&&(s={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",s,i],["enter",c,i],["exit",c,i],["exit",s,i]])),t}function zS(t,i,r){let u=0;return s;function s(y){return t.enter("atxHeading"),c(y)}function c(y){return t.enter("atxHeadingSequence"),f(y)}function f(y){return y===35&&u++<6?(t.consume(y),f):y===null||lt(y)?(t.exit("atxHeadingSequence"),p(y)):r(y)}function p(y){return y===35?(t.enter("atxHeadingSequence"),g(y)):y===null||ve(y)?(t.exit("atxHeading"),i(y)):Me(y)?Ie(t,p,"whitespace")(y):(t.enter("atxHeadingText"),m(y))}function g(y){return y===35?(t.consume(y),g):(t.exit("atxHeadingSequence"),p(y))}function m(y){return y===null||y===35||lt(y)?(t.exit("atxHeadingText"),p(y)):(t.consume(y),m)}}const DS=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],hg=["pre","script","style","textarea"],RS={concrete:!0,name:"htmlFlow",resolveTo:LS,tokenize:US},MS={partial:!0,tokenize:BS},OS={partial:!0,tokenize:qS};function LS(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 US(t,i,r){const u=this;let s,c,f,p,g;return m;function m(w){return y(w)}function y(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,_):w===63?(t.consume(w),s=3,u.interrupt?i:E):Ut(w)?(t.consume(w),f=String.fromCharCode(w),L):r(w)}function S(w){return w===45?(t.consume(w),s=2,v):w===91?(t.consume(w),s=5,p=0,N):Ut(w)?(t.consume(w),s=4,u.interrupt?i:E):r(w)}function v(w){return w===45?(t.consume(w),u.interrupt?i:E):r(w)}function N(w){const se="CDATA[";return w===se.charCodeAt(p++)?(t.consume(w),p===se.length?u.interrupt?i:te:N):r(w)}function _(w){return Ut(w)?(t.consume(w),f=String.fromCharCode(w),L):r(w)}function L(w){if(w===null||w===47||w===62||lt(w)){const se=w===47,fe=f.toLowerCase();return!se&&!c&&hg.includes(fe)?(s=1,u.interrupt?i(w):te(w)):DS.includes(f.toLowerCase())?(s=6,se?(t.consume(w),C):u.interrupt?i(w):te(w)):(s=7,u.interrupt&&!u.parser.lazy[u.now().line]?r(w):c?F(w):U(w))}return w===45||Mt(w)?(t.consume(w),f+=String.fromCharCode(w),L):r(w)}function C(w){return w===62?(t.consume(w),u.interrupt?i:te):r(w)}function F(w){return Me(w)?(t.consume(w),F):O(w)}function U(w){return w===47?(t.consume(w),O):w===58||w===95||Ut(w)?(t.consume(w),$):Me(w)?(t.consume(w),U):O(w)}function $(w){return w===45||w===46||w===58||w===95||Mt(w)?(t.consume(w),$):ue(w)}function ue(w){return w===61?(t.consume(w),R):Me(w)?(t.consume(w),ue):U(w)}function R(w){return w===null||w===60||w===61||w===62||w===96?r(w):w===34||w===39?(t.consume(w),g=w,H):Me(w)?(t.consume(w),R):ie(w)}function H(w){return w===g?(t.consume(w),g=null,ee):w===null||ve(w)?r(w):(t.consume(w),H)}function ie(w){return w===null||w===34||w===39||w===47||w===60||w===61||w===62||w===96||lt(w)?ue(w):(t.consume(w),ie)}function ee(w){return w===47||w===62||Me(w)?U(w):r(w)}function O(w){return w===62?(t.consume(w),re):r(w)}function re(w){return w===null||ve(w)?te(w):Me(w)?(t.consume(w),re):r(w)}function te(w){return w===45&&s===2?(t.consume(w),D):w===60&&s===1?(t.consume(w),Q):w===62&&s===4?(t.consume(w),A):w===63&&s===3?(t.consume(w),E):w===93&&s===5?(t.consume(w),me):ve(w)&&(s===6||s===7)?(t.exit("htmlFlowData"),t.check(MS,V,xe)(w)):w===null||ve(w)?(t.exit("htmlFlowData"),xe(w)):(t.consume(w),te)}function xe(w){return t.check(OS,oe,V)(w)}function oe(w){return t.enter("lineEnding"),t.consume(w),t.exit("lineEnding"),P}function P(w){return w===null||ve(w)?xe(w):(t.enter("htmlFlowData"),te(w))}function D(w){return w===45?(t.consume(w),E):te(w)}function Q(w){return w===47?(t.consume(w),f="",ce):te(w)}function ce(w){if(w===62){const se=f.toLowerCase();return hg.includes(se)?(t.consume(w),A):te(w)}return Ut(w)&&f.length<8?(t.consume(w),f+=String.fromCharCode(w),ce):te(w)}function me(w){return w===93?(t.consume(w),E):te(w)}function E(w){return w===62?(t.consume(w),A):w===45&&s===2?(t.consume(w),E):te(w)}function A(w){return w===null||ve(w)?(t.exit("htmlFlowData"),V(w)):(t.consume(w),A)}function V(w){return t.exit("htmlFlow"),i(w)}}function qS(t,i,r){const u=this;return s;function s(f){return ve(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 BS(t,i,r){return u;function u(s){return t.enter("lineEnding"),t.consume(s),t.exit("lineEnding"),t.attempt(ra,i,r)}}const HS={name:"htmlText",tokenize:IS};function IS(t,i,r){const u=this;let s,c,f;return p;function p(E){return t.enter("htmlText"),t.enter("htmlTextData"),t.consume(E),g}function g(E){return E===33?(t.consume(E),m):E===47?(t.consume(E),ue):E===63?(t.consume(E),U):Ut(E)?(t.consume(E),ie):r(E)}function m(E){return E===45?(t.consume(E),y):E===91?(t.consume(E),c=0,N):Ut(E)?(t.consume(E),F):r(E)}function y(E){return E===45?(t.consume(E),v):r(E)}function x(E){return E===null?r(E):E===45?(t.consume(E),S):ve(E)?(f=x,Q(E)):(t.consume(E),x)}function S(E){return E===45?(t.consume(E),v):x(E)}function v(E){return E===62?D(E):E===45?S(E):x(E)}function N(E){const A="CDATA[";return E===A.charCodeAt(c++)?(t.consume(E),c===A.length?_:N):r(E)}function _(E){return E===null?r(E):E===93?(t.consume(E),L):ve(E)?(f=_,Q(E)):(t.consume(E),_)}function L(E){return E===93?(t.consume(E),C):_(E)}function C(E){return E===62?D(E):E===93?(t.consume(E),C):_(E)}function F(E){return E===null||E===62?D(E):ve(E)?(f=F,Q(E)):(t.consume(E),F)}function U(E){return E===null?r(E):E===63?(t.consume(E),$):ve(E)?(f=U,Q(E)):(t.consume(E),U)}function $(E){return E===62?D(E):U(E)}function ue(E){return Ut(E)?(t.consume(E),R):r(E)}function R(E){return E===45||Mt(E)?(t.consume(E),R):H(E)}function H(E){return ve(E)?(f=H,Q(E)):Me(E)?(t.consume(E),H):D(E)}function ie(E){return E===45||Mt(E)?(t.consume(E),ie):E===47||E===62||lt(E)?ee(E):r(E)}function ee(E){return E===47?(t.consume(E),D):E===58||E===95||Ut(E)?(t.consume(E),O):ve(E)?(f=ee,Q(E)):Me(E)?(t.consume(E),ee):D(E)}function O(E){return E===45||E===46||E===58||E===95||Mt(E)?(t.consume(E),O):re(E)}function re(E){return E===61?(t.consume(E),te):ve(E)?(f=re,Q(E)):Me(E)?(t.consume(E),re):ee(E)}function te(E){return E===null||E===60||E===61||E===62||E===96?r(E):E===34||E===39?(t.consume(E),s=E,xe):ve(E)?(f=te,Q(E)):Me(E)?(t.consume(E),te):(t.consume(E),oe)}function xe(E){return E===s?(t.consume(E),s=void 0,P):E===null?r(E):ve(E)?(f=xe,Q(E)):(t.consume(E),xe)}function oe(E){return E===null||E===34||E===39||E===60||E===61||E===96?r(E):E===47||E===62||lt(E)?ee(E):(t.consume(E),oe)}function P(E){return E===47||E===62||lt(E)?ee(E):r(E)}function D(E){return E===62?(t.consume(E),t.exit("htmlTextData"),t.exit("htmlText"),i):r(E)}function Q(E){return t.exit("htmlTextData"),t.enter("lineEnding"),t.consume(E),t.exit("lineEnding"),ce}function ce(E){return Me(E)?Ie(t,me,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(E):me(E)}function me(E){return t.enter("htmlTextData"),f(E)}}const jf={name:"labelEnd",resolveAll:FS,resolveTo:XS,tokenize:$S},YS={tokenize:QS},GS={tokenize:ZS},VS={tokenize:KS};function FS(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 s=u.type==="labelImage"?4:2;u.type="data",i+=s}}return t.length!==r.length&&nn(t,0,t.length,r),t}function XS(t,i){let r=t.length,u=0,s,c,f,p;for(;r--;)if(s=t[r][1],c){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;t[r][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(f){if(t[r][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(c=r,s.type!=="labelLink")){u=2;break}}else s.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}},y={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",y,i]]),p=yn(p,Hu(i.parser.constructs.insideSpan.null,t.slice(c+u+4,f-3),i)),p=yn(p,[["exit",y,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 $S(t,i,r){const u=this;let s=u.events.length,c,f;for(;s--;)if((u.events[s][1].type==="labelImage"||u.events[s][1].type==="labelLink")&&!u.events[s][1]._balanced){c=u.events[s][1];break}return p;function p(S){return c?c._inactive?x(S):(f=u.parser.defined.includes(jn(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(YS,y,f?y:x)(S):S===91?t.attempt(GS,y,f?m:x)(S):f?y(S):x(S)}function m(S){return t.attempt(VS,y,x)(S)}function y(S){return i(S)}function x(S){return c._balanced=!0,r(S)}}function QS(t,i,r){return u;function u(x){return t.enter("resource"),t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),s}function s(x){return lt(x)?ea(t,c)(x):c(x)}function c(x){return x===41?y(x):Yx(t,f,p,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(x)}function f(x){return lt(x)?ea(t,g)(x):y(x)}function p(x){return r(x)}function g(x){return x===34||x===39||x===40?Vx(t,m,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(x):y(x)}function m(x){return lt(x)?ea(t,y)(x):y(x)}function y(x){return x===41?(t.enter("resourceMarker"),t.consume(x),t.exit("resourceMarker"),t.exit("resource"),i):r(x)}}function ZS(t,i,r){const u=this;return s;function s(p){return Gx.call(u,t,c,f,"reference","referenceMarker","referenceString")(p)}function c(p){return u.parser.defined.includes(jn(u.sliceSerialize(u.events[u.events.length-1][1]).slice(1,-1)))?i(p):r(p)}function f(p){return r(p)}}function KS(t,i,r){return u;function u(c){return t.enter("reference"),t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),s}function s(c){return c===93?(t.enter("referenceMarker"),t.consume(c),t.exit("referenceMarker"),t.exit("reference"),i):r(c)}}const JS={name:"labelStartImage",resolveAll:jf.resolveAll,tokenize:PS};function PS(t,i,r){const u=this;return s;function s(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 WS={name:"labelStartLink",resolveAll:jf.resolveAll,tokenize:ek};function ek(t,i,r){const u=this;return s;function s(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 yc={name:"lineEnding",tokenize:tk};function tk(t,i){return r;function r(u){return t.enter("lineEnding"),t.consume(u),t.exit("lineEnding"),Ie(t,i,"linePrefix")}}const _u={name:"thematicBreak",tokenize:nk};function nk(t,i,r){let u=0,s;return c;function c(m){return t.enter("thematicBreak"),f(m)}function f(m){return s=m,p(m)}function p(m){return m===s?(t.enter("thematicBreakSequence"),g(m)):u>=3&&(m===null||ve(m))?(t.exit("thematicBreak"),i(m)):r(m)}function g(m){return m===s?(t.consume(m),u++,g):(t.exit("thematicBreakSequence"),Me(m)?Ie(t,p,"whitespace")(m):p(m))}}const Xt={continuation:{tokenize:ak},exit:sk,name:"list",tokenize:rk},lk={partial:!0,tokenize:ok},ik={partial:!0,tokenize:uk};function rk(t,i,r){const u=this,s=u.events[u.events.length-1];let c=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[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:Jc(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 Jc(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(ra,u.interrupt?r:y,t.attempt(lk,S,x))}function y(v){return u.containerState.initialBlankLine=!0,c++,S(v)}function x(v){return Me(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 ak(t,i,r){const u=this;return u.containerState._closeFlow=void 0,t.check(ra,s,c);function s(p){return u.containerState.furtherBlankLines=u.containerState.furtherBlankLines||u.containerState.initialBlankLine,Ie(t,i,"listItemIndent",u.containerState.size+1)(p)}function c(p){return u.containerState.furtherBlankLines||!Me(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(ik,i,f)(p))}function f(p){return u.containerState._closeFlow=!0,u.interrupt=void 0,Ie(t,t.attempt(Xt,i,r),"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(p)}}function uk(t,i,r){const u=this;return Ie(t,s,"listItemIndent",u.containerState.size+1);function s(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 sk(t){t.exit(this.containerState.type)}function ok(t,i,r){const u=this;return Ie(t,s,"listItemPrefixWhitespace",u.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(c){const f=u.events[u.events.length-1];return!Me(c)&&f&&f[1].type==="listItemPrefixWhitespace"?i(c):r(c)}}const pg={name:"setextUnderline",resolveTo:ck,tokenize:fk};function ck(t,i){let r=t.length,u,s,c;for(;r--;)if(t[r][0]==="enter"){if(t[r][1].type==="content"){u=r;break}t[r][1].type==="paragraph"&&(s=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[s][1].type="setextHeadingText",c?(t.splice(s,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 fk(t,i,r){const u=this;let s;return c;function c(m){let y=u.events.length,x;for(;y--;)if(u.events[y][1].type!=="lineEnding"&&u.events[y][1].type!=="linePrefix"&&u.events[y][1].type!=="content"){x=u.events[y][1].type==="paragraph";break}return!u.parser.lazy[u.now().line]&&(u.interrupt||x)?(t.enter("setextHeadingLine"),s=m,f(m)):r(m)}function f(m){return t.enter("setextHeadingLineSequence"),p(m)}function p(m){return m===s?(t.consume(m),p):(t.exit("setextHeadingLineSequence"),Me(m)?Ie(t,g,"lineSuffix")(m):g(m))}function g(m){return m===null||ve(m)?(t.exit("setextHeadingLine"),i(m)):r(m)}}const dk={tokenize:hk};function hk(t){const i=this,r=t.attempt(ra,u,t.attempt(this.parser.constructs.flowInitial,s,Ie(t,t.attempt(this.parser.constructs.flow,s,t.attempt(yS,s)),"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 s(c){if(c===null){t.consume(c);return}return t.enter("lineEnding"),t.consume(c),t.exit("lineEnding"),i.currentConstruct=void 0,r}}const pk={resolveAll:Xx()},mk=Fx("string"),gk=Fx("text");function Fx(t){return{resolveAll:Xx(t==="text"?xk:void 0),tokenize:i};function i(r){const u=this,s=this.parser.constructs[t],c=r.attempt(s,f,p);return f;function f(y){return m(y)?c(y):p(y)}function p(y){if(y===null){r.consume(y);return}return r.enter("data"),r.consume(y),g}function g(y){return m(y)?(r.exit("data"),c(y)):(r.consume(y),g)}function m(y){if(y===null)return!0;const x=s[y];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 Xx(t){return i;function i(r,u){let s=-1,c;for(;++s<=r.length;)c===void 0?r[s]&&r[s][1].type==="data"&&(c=s,s++):(!r[s]||r[s][1].type!=="data")&&(s!==c+2&&(r[c][1].end=r[s-1][1].end,r.splice(c+2,s-c-2),s=c+2),c=void 0);return t?t(r,u):r}}function xk(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],s=i.sliceStream(u);let c=s.length,f=-1,p=0,g;for(;c--;){const m=s[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 yk={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:qx},bk={91:wS},vk={[-2]:xc,[-1]:xc,32:xc},Sk={35:TS,42:_u,45:[pg,_u],60:RS,61:pg,95:_u,96:dg,126:dg},kk={38:Hx,92:Bx},wk={[-5]:yc,[-4]:yc,[-3]:yc,33:JS,38:Hx,42:Pc,60:[Wv,HS],91:WS,92:[ES,Bx],93:jf,95:Pc,96:dS},jk={null:[Pc,pk]},Nk={null:[42,95]},Ck={null:[]},Ek=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:Nk,contentInitial:bk,disable:Ck,document:yk,flow:Sk,flowInitial:vk,insideSpan:jk,string:kk,text:wk},Symbol.toStringTag,{value:"Module"}));function _k(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 s={},c=[];let f=[],p=[];const g={attempt:H(ue),check:H(R),consume:F,enter:U,exit:$,interrupt:H(R,{interrupt:!0})},m={code:null,containerState:{},defineSkip:_,events:[],now:N,parser:t,previous:null,sliceSerialize:S,sliceStream:v,write:x};let y=i.tokenize.call(m,g);return i.resolveAll&&c.push(i),m;function x(re){return f=yn(f,re),L(),f[f.length-1]!==null?[]:(ie(i,0),m.events=Hu(c,m.events,m),m.events)}function S(re,te){return Ak(v(re),te)}function v(re){return Tk(f,re)}function N(){const{_bufferIndex:re,_index:te,line:xe,column:oe,offset:P}=u;return{_bufferIndex:re,_index:te,line:xe,column:oe,offset:P}}function _(re){s[re.line]=re.column,O()}function L(){let re;for(;u._index<f.length;){const te=f[u._index];if(typeof te=="string")for(re=u._index,u._bufferIndex<0&&(u._bufferIndex=0);u._index===re&&u._bufferIndex<te.length;)C(te.charCodeAt(u._bufferIndex));else C(te)}}function C(re){y=y(re)}function F(re){ve(re)?(u.line++,u.column=1,u.offset+=re===-3?2:1,O()):re!==-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=re}function U(re,te){const xe=te||{};return xe.type=re,xe.start=N(),m.events.push(["enter",xe,m]),p.push(xe),xe}function $(re){const te=p.pop();return te.end=N(),m.events.push(["exit",te,m]),te}function ue(re,te){ie(re,te.from)}function R(re,te){te.restore()}function H(re,te){return xe;function xe(oe,P,D){let Q,ce,me,E;return Array.isArray(oe)?V(oe):"tokenize"in oe?V([oe]):A(oe);function A(he){return we;function we(He){const W=He!==null&&he[He],je=He!==null&&he.null,Qe=[...Array.isArray(W)?W:W?[W]:[],...Array.isArray(je)?je:je?[je]:[]];return V(Qe)(He)}}function V(he){return Q=he,ce=0,he.length===0?D:w(he[ce])}function w(he){return we;function we(He){return E=ee(),me=he,he.partial||(m.currentConstruct=he),he.name&&m.parser.constructs.disable.null.includes(he.name)?fe():he.tokenize.call(te?Object.assign(Object.create(m),te):m,g,se,fe)(He)}}function se(he){return re(me,E),P}function fe(he){return E.restore(),++ce<Q.length?w(Q[ce]):D}}}function ie(re,te){re.resolveAll&&!c.includes(re)&&c.push(re),re.resolve&&nn(m.events,te,m.events.length-te,re.resolve(m.events.slice(te),m)),re.resolveTo&&(m.events=re.resolveTo(m.events,m))}function ee(){const re=N(),te=m.previous,xe=m.currentConstruct,oe=m.events.length,P=Array.from(p);return{from:oe,restore:D};function D(){u=re,m.previous=te,m.currentConstruct=xe,m.events.length=oe,p=P,O()}}function O(){u.line in s&&u.column<2&&(u.column=s[u.line],u.offset+=s[u.line]-1)}}function Tk(t,i){const r=i.start._index,u=i.start._bufferIndex,s=i.end._index,c=i.end._bufferIndex;let f;if(r===s)f=[t[r].slice(u,c)];else{if(f=t.slice(r,s),u>-1){const p=f[0];typeof p=="string"?f[0]=p.slice(u):f.shift()}c>0&&f.push(t[s].slice(0,c))}return f}function Ak(t,i){let r=-1;const u=[];let s;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&&s)continue;f=" ";break}default:f=String.fromCharCode(c)}s=c===-2,u.push(f)}return u.join("")}function zk(t){const u={constructs:Lx([Ek,...(t||{}).extensions||[]]),content:s(Xv),defined:[],document:s(Qv),flow:s(dk),lazy:{},string:s(mk),text:s(gk)};return u;function s(c){return f;function f(p){return _k(u,c,p)}}}function Dk(t){for(;!Ix(t););return t}const mg=/[\0\t\n\r]/g;function Rk(){let t=1,i="",r=!0,u;return s;function s(c,f,p){const g=[];let m,y,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(mg.lastIndex=x,m=mg.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(y=Math.ceil(t/4)*4,g.push(-2);t++<y;)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 Mk=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function Ok(t){return t.replace(Mk,Lk)}function Lk(t,i,r){if(i)return i;if(r.charCodeAt(0)===35){const s=r.charCodeAt(1),c=s===120||s===88;return Ux(r.slice(c?2:1),c?16:10)}return wf(r)||t}const $x={}.hasOwnProperty;function Uk(t,i,r){return i&&typeof i=="object"&&(r=i,i=void 0),qk(r)(Dk(zk(r).document().write(Rk()(t,i,!0))))}function qk(t){const i={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:c(rn),autolinkProtocol:ee,autolinkEmail:ee,atxHeading:c(ln),blockQuote:c(je),characterEscape:ee,characterReference:ee,codeFenced:c(Qe),codeFencedFenceInfo:f,codeFencedFenceMeta:f,codeIndented:c(Qe,f),codeText:c(qt,f),codeTextData:ee,data:ee,codeFlowValue:ee,definition:c(Nn),definitionDestinationString:f,definitionLabelString:f,definitionTitleString:f,emphasis:c(At),hardBreakEscape:c(Cn),hardBreakTrailing:c(Cn),htmlFlow:c(Un,f),htmlFlowData:ee,htmlText:c(Un,f),htmlTextData:ee,image:c(ul),label:f,link:c(rn),listItem:c(_n),listItemValue:S,listOrdered:c(En,x),listUnordered:c(En),paragraph:c(ne),reference:w,referenceString:f,resourceDestinationString:f,resourceTitleString:f,setextHeading:c(ln),strong:c(Ye),thematicBreak:c(an)},exit:{atxHeading:g(),atxHeadingSequence:ue,autolink:g(),autolinkEmail:W,autolinkProtocol:He,blockQuote:g(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:fe,characterReferenceMarkerNumeric:fe,characterReferenceValue:he,characterReference:we,codeFenced:g(L),codeFencedFence:_,codeFencedFenceInfo:v,codeFencedFenceMeta:N,codeFlowValue:O,codeIndented:g(C),codeText:g(P),codeTextData:O,data:O,definition:g(),definitionDestinationString:$,definitionLabelString:F,definitionTitleString:U,emphasis:g(),hardBreakEscape:g(te),hardBreakTrailing:g(te),htmlFlow:g(xe),htmlFlowData:O,htmlText:g(oe),htmlTextData:O,image:g(Q),label:me,labelText:ce,lineEnding:re,link:g(D),listItem:g(),listOrdered:g(),listUnordered:g(),paragraph:g(),referenceString:se,resourceDestinationString:E,resourceTitleString:A,resource:V,setextHeading:g(ie),setextHeadingLineSequence:H,setextHeadingText:R,strong:g(),thematicBreak:g()}};Qx(i,(t||{}).mdastExtensions||[]);const r={};return u;function u(G){let ae={type:"root",children:[]};const ye={stack:[ae],tokenStack:[],config:i,enter:p,exit:m,buffer:f,resume:y,data:r},_e=[];let Ge=-1;for(;++Ge<G.length;)if(G[Ge][1].type==="listOrdered"||G[Ge][1].type==="listUnordered")if(G[Ge][0]==="enter")_e.push(Ge);else{const zt=_e.pop();Ge=s(G,zt,Ge)}for(Ge=-1;++Ge<G.length;){const zt=i[G[Ge][0]];$x.call(zt,G[Ge][1].type)&&zt[G[Ge][1].type].call(Object.assign({sliceSerialize:G[Ge][2].sliceSerialize},ye),G[Ge][1])}if(ye.tokenStack.length>0){const zt=ye.tokenStack[ye.tokenStack.length-1];(zt[1]||gg).call(ye,void 0,zt[0])}for(ae.position={start:Rl(G.length>0?G[0][1].start:{line:1,column:1,offset:0}),end:Rl(G.length>0?G[G.length-2][1].end:{line:1,column:1,offset:0})},Ge=-1;++Ge<i.transforms.length;)ae=i.transforms[Ge](ae)||ae;return ae}function s(G,ae,ye){let _e=ae-1,Ge=-1,zt=!1,un,St,ut,kt;for(;++_e<=ye;){const Ze=G[_e];switch(Ze[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Ze[0]==="enter"?Ge++:Ge--,kt=void 0;break}case"lineEndingBlank":{Ze[0]==="enter"&&(un&&!kt&&!Ge&&!ut&&(ut=_e),kt=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:kt=void 0}if(!Ge&&Ze[0]==="enter"&&Ze[1].type==="listItemPrefix"||Ge===-1&&Ze[0]==="exit"&&(Ze[1].type==="listUnordered"||Ze[1].type==="listOrdered")){if(un){let bn=_e;for(St=void 0;bn--;){const Dt=G[bn];if(Dt[1].type==="lineEnding"||Dt[1].type==="lineEndingBlank"){if(Dt[0]==="exit")continue;St&&(G[St][1].type="lineEndingBlank",zt=!0),Dt[1].type="lineEnding",St=bn}else if(!(Dt[1].type==="linePrefix"||Dt[1].type==="blockQuotePrefix"||Dt[1].type==="blockQuotePrefixWhitespace"||Dt[1].type==="blockQuoteMarker"||Dt[1].type==="listItemIndent"))break}ut&&(!St||ut<St)&&(un._spread=!0),un.end=Object.assign({},St?G[St][1].start:Ze[1].end),G.splice(St||_e,0,["exit",un,Ze[2]]),_e++,ye++}if(Ze[1].type==="listItemPrefix"){const bn={type:"listItem",_spread:!1,start:Object.assign({},Ze[1].start),end:void 0};un=bn,G.splice(_e,0,["enter",bn,Ze[2]]),_e++,ye++,ut=void 0,kt=!0}}}return G[ae][1]._spread=zt,ye}function c(G,ae){return ye;function ye(_e){p.call(this,G(_e),_e),ae&&ae.call(this,_e)}}function f(){this.stack.push({type:"fragment",children:[]})}function p(G,ae,ye){this.stack[this.stack.length-1].children.push(G),this.stack.push(G),this.tokenStack.push([ae,ye||void 0]),G.position={start:Rl(ae.start),end:void 0}}function g(G){return ae;function ae(ye){G&&G.call(this,ye),m.call(this,ye)}}function m(G,ae){const ye=this.stack.pop(),_e=this.tokenStack.pop();if(_e)_e[0].type!==G.type&&(ae?ae.call(this,G,_e[0]):(_e[1]||gg).call(this,G,_e[0]));else throw new Error("Cannot close `"+G.type+"` ("+Wr({start:G.start,end:G.end})+"): it’s not open");ye.position.end=Rl(G.end)}function y(){return kf(this.stack.pop())}function x(){this.data.expectingFirstListItemValue=!0}function S(G){if(this.data.expectingFirstListItemValue){const ae=this.stack[this.stack.length-2];ae.start=Number.parseInt(this.sliceSerialize(G),10),this.data.expectingFirstListItemValue=void 0}}function v(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.lang=G}function N(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.meta=G}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function L(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.value=G.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function C(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.value=G.replace(/(\r?\n|\r)$/g,"")}function F(G){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ae,ye.identifier=jn(this.sliceSerialize(G)).toLowerCase()}function U(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.title=G}function $(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.url=G}function ue(G){const ae=this.stack[this.stack.length-1];if(!ae.depth){const ye=this.sliceSerialize(G).length;ae.depth=ye}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function H(G){const ae=this.stack[this.stack.length-1];ae.depth=this.sliceSerialize(G).codePointAt(0)===61?1:2}function ie(){this.data.setextHeadingSlurpLineEnding=void 0}function ee(G){const ye=this.stack[this.stack.length-1].children;let _e=ye[ye.length-1];(!_e||_e.type!=="text")&&(_e=Ue(),_e.position={start:Rl(G.start),end:void 0},ye.push(_e)),this.stack.push(_e)}function O(G){const ae=this.stack.pop();ae.value+=this.sliceSerialize(G),ae.position.end=Rl(G.end)}function re(G){const ae=this.stack[this.stack.length-1];if(this.data.atHardBreak){const ye=ae.children[ae.children.length-1];ye.position.end=Rl(G.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&i.canContainEols.includes(ae.type)&&(ee.call(this,G),O.call(this,G))}function te(){this.data.atHardBreak=!0}function xe(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.value=G}function oe(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.value=G}function P(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.value=G}function D(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ae,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function Q(){const G=this.stack[this.stack.length-1];if(this.data.inReference){const ae=this.data.referenceType||"shortcut";G.type+="Reference",G.referenceType=ae,delete G.url,delete G.title}else delete G.identifier,delete G.label;this.data.referenceType=void 0}function ce(G){const ae=this.sliceSerialize(G),ye=this.stack[this.stack.length-2];ye.label=Ok(ae),ye.identifier=jn(ae).toLowerCase()}function me(){const G=this.stack[this.stack.length-1],ae=this.resume(),ye=this.stack[this.stack.length-1];if(this.data.inReference=!0,ye.type==="link"){const _e=G.children;ye.children=_e}else ye.alt=ae}function E(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.url=G}function A(){const G=this.resume(),ae=this.stack[this.stack.length-1];ae.title=G}function V(){this.data.inReference=void 0}function w(){this.data.referenceType="collapsed"}function se(G){const ae=this.resume(),ye=this.stack[this.stack.length-1];ye.label=ae,ye.identifier=jn(this.sliceSerialize(G)).toLowerCase(),this.data.referenceType="full"}function fe(G){this.data.characterReferenceType=G.type}function he(G){const ae=this.sliceSerialize(G),ye=this.data.characterReferenceType;let _e;ye?(_e=Ux(ae,ye==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):_e=wf(ae);const Ge=this.stack[this.stack.length-1];Ge.value+=_e}function we(G){const ae=this.stack.pop();ae.position.end=Rl(G.end)}function He(G){O.call(this,G);const ae=this.stack[this.stack.length-1];ae.url=this.sliceSerialize(G)}function W(G){O.call(this,G);const ae=this.stack[this.stack.length-1];ae.url="mailto:"+this.sliceSerialize(G)}function je(){return{type:"blockquote",children:[]}}function Qe(){return{type:"code",lang:null,meta:null,value:""}}function qt(){return{type:"inlineCode",value:""}}function Nn(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function At(){return{type:"emphasis",children:[]}}function ln(){return{type:"heading",depth:0,children:[]}}function Cn(){return{type:"break"}}function Un(){return{type:"html",value:""}}function ul(){return{type:"image",title:null,url:"",alt:null}}function rn(){return{type:"link",title:null,url:"",children:[]}}function En(G){return{type:"list",ordered:G.type==="listOrdered",start:null,spread:G._spread,children:[]}}function _n(G){return{type:"listItem",spread:G._spread,checked:null,children:[]}}function ne(){return{type:"paragraph",children:[]}}function Ye(){return{type:"strong",children:[]}}function Ue(){return{type:"text",value:""}}function an(){return{type:"thematicBreak"}}}function Rl(t){return{line:t.line,column:t.column,offset:t.offset}}function Qx(t,i){let r=-1;for(;++r<i.length;){const u=i[r];Array.isArray(u)?Qx(t,u):Bk(t,u)}}function Bk(t,i){let r;for(r in i)if($x.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 gg(t,i){throw t?new Error("Cannot close `"+t.type+"` ("+Wr({start:t.start,end:t.end})+"): a different token (`"+i.type+"`, "+Wr({start:i.start,end:i.end})+") is open"):new Error("Cannot close document, a token (`"+i.type+"`, "+Wr({start:i.start,end:i.end})+") is still open")}function Hk(t){const i=this;i.parser=r;function r(u){return Uk(u,{...i.data("settings"),...t,extensions:i.data("micromarkExtensions")||[],mdastExtensions:i.data("fromMarkdownExtensions")||[]})}}function Ik(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 Yk(t,i){const r={type:"element",tagName:"br",properties:{},children:[]};return t.patch(i,r),[t.applyData(i,r),{type:"text",value:`
|
|
53
|
-
`}]}function Gk(t,i){const r=i.value?i.value+`
|
|
54
|
-
`:"",u={},s=i.lang?i.lang.split(/\s+/):[];s.length>0&&(u.className=["language-"+s[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 Vk(t,i){const r={type:"element",tagName:"del",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function Fk(t,i){const r={type:"element",tagName:"em",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function Xk(t,i){const r=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",u=String(i.identifier).toUpperCase(),s=Wi(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-"+s,id:r+"fnref-"+s+(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 $k(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 Qk(t,i){if(t.options.allowDangerousHtml){const r={type:"raw",value:i.value};return t.patch(i,r),t.applyData(i,r)}}function Zx(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 s=t.all(i),c=s[0];c&&c.type==="text"?c.value="["+c.value:s.unshift({type:"text",value:"["});const f=s[s.length-1];return f&&f.type==="text"?f.value+=u:s.push({type:"text",value:u}),s}function Zk(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return Zx(t,i);const s={src:Wi(u.url||""),alt:i.alt};u.title!==null&&u.title!==void 0&&(s.title=u.title);const c={type:"element",tagName:"img",properties:s,children:[]};return t.patch(i,c),t.applyData(i,c)}function Kk(t,i){const r={src:Wi(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 Jk(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 Pk(t,i){const r=String(i.identifier).toUpperCase(),u=t.definitionById.get(r);if(!u)return Zx(t,i);const s={href:Wi(u.url||"")};u.title!==null&&u.title!==void 0&&(s.title=u.title);const c={type:"element",tagName:"a",properties:s,children:t.all(i)};return t.patch(i,c),t.applyData(i,c)}function Wk(t,i){const r={href:Wi(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 e2(t,i,r){const u=t.all(i),s=r?t2(r):Kx(i),c={},f=[];if(typeof i.checked=="boolean"){const y=u[0];let x;y&&y.type==="element"&&y.tagName==="p"?x=y:(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 y=u[p];(s||p!==0||y.type!=="element"||y.tagName!=="p")&&f.push({type:"text",value:`
|
|
55
|
-
`}),y.type==="element"&&y.tagName==="p"&&!s?f.push(...y.children):f.push(y)}const g=u[u.length-1];g&&(s||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 t2(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=Kx(r[u])}return i}function Kx(t){const i=t.spread;return i??t.children.length>1}function n2(t,i){const r={},u=t.all(i);let s=-1;for(typeof i.start=="number"&&i.start!==1&&(r.start=i.start);++s<u.length;){const f=u[s];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 l2(t,i){const r={type:"element",tagName:"p",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function i2(t,i){const r={type:"root",children:t.wrap(t.all(i))};return t.patch(i,r),t.applyData(i,r)}function r2(t,i){const r={type:"element",tagName:"strong",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}function a2(t,i){const r=t.all(i),u=r.shift(),s=[];if(u){const f={type:"element",tagName:"thead",properties:{},children:t.wrap([u],!0)};t.patch(i.children[0],f),s.push(f)}if(r.length>0){const f={type:"element",tagName:"tbody",properties:{},children:t.wrap(r,!0)},p=yf(i.children[1]),g=Tx(i.children[i.children.length-1]);p&&g&&(f.position={start:p,end:g}),s.push(f)}const c={type:"element",tagName:"table",properties:{},children:t.wrap(s,!0)};return t.patch(i,c),t.applyData(i,c)}function u2(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 y={type:"element",tagName:"tr",properties:{},children:t.wrap(m,!0)};return t.patch(i,y),t.applyData(i,y)}function s2(t,i){const r={type:"element",tagName:"td",properties:{},children:t.all(i)};return t.patch(i,r),t.applyData(i,r)}const xg=9,yg=32;function o2(t){const i=String(t),r=/\r?\n|\r/g;let u=r.exec(i),s=0;const c=[];for(;u;)c.push(bg(i.slice(s,u.index),s>0,!0),u[0]),s=u.index+u[0].length,u=r.exec(i);return c.push(bg(i.slice(s),s>0,!1)),c.join("")}function bg(t,i,r){let u=0,s=t.length;if(i){let c=t.codePointAt(u);for(;c===xg||c===yg;)u++,c=t.codePointAt(u)}if(r){let c=t.codePointAt(s-1);for(;c===xg||c===yg;)s--,c=t.codePointAt(s-1)}return s>u?t.slice(u,s):""}function c2(t,i){const r={type:"text",value:o2(String(i.value))};return t.patch(i,r),t.applyData(i,r)}function f2(t,i){const r={type:"element",tagName:"hr",properties:{},children:[]};return t.patch(i,r),t.applyData(i,r)}const d2={blockquote:Ik,break:Yk,code:Gk,delete:Vk,emphasis:Fk,footnoteReference:Xk,heading:$k,html:Qk,imageReference:Zk,image:Kk,inlineCode:Jk,linkReference:Pk,link:Wk,listItem:e2,list:n2,paragraph:l2,root:i2,strong:r2,table:a2,tableCell:s2,tableRow:u2,text:c2,thematicBreak:f2,toml:Su,yaml:Su,definition:Su,footnoteDefinition:Su};function Su(){}const Jx=-1,Iu=0,ta=1,Ru=2,Nf=3,Cf=4,Ef=5,_f=6,Px=7,Wx=8,h2=typeof self=="object"?self:globalThis,vg=(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 h2[t](i)},p2=(t,i)=>{const r=(s,c)=>(t.set(c,s),s),u=s=>{if(t.has(s))return t.get(s);const[c,f]=i[s];switch(c){case Iu:case Jx:return r(f,s);case ta:{const p=r([],s);for(const g of f)p.push(u(g));return p}case Ru:{const p=r({},s);for(const[g,m]of f)p[u(g)]=u(m);return p}case Nf:return r(new Date(f),s);case Cf:{const{source:p,flags:g}=f;return r(new RegExp(p,g),s)}case Ef:{const p=r(new Map,s);for(const[g,m]of f)p.set(u(g),u(m));return p}case _f:{const p=r(new Set,s);for(const g of f)p.add(u(g));return p}case Px:{const{name:p,message:g}=f;return r(vg(p,g),s)}case Wx:return r(BigInt(f),s);case"BigInt":return r(Object(BigInt(f)),s);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(vg(c,f),s)};return u},Sg=t=>p2(new Map,t)(0),Qi="",{toString:m2}={},{keys:g2}=Object,Kr=t=>{const i=typeof t;if(i!=="object"||!t)return[Iu,i];const r=m2.call(t).slice(8,-1);switch(r){case"Array":return[ta,Qi];case"Object":return[Ru,Qi];case"Date":return[Nf,Qi];case"RegExp":return[Cf,Qi];case"Map":return[Ef,Qi];case"Set":return[_f,Qi];case"DataView":return[ta,r]}return r.includes("Array")?[ta,r]:r.includes("Error")?[Px,r]:[Ru,r]},ku=([t,i])=>t===Iu&&(i==="function"||i==="symbol"),x2=(t,i,r,u)=>{const s=(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]=Kr(f);switch(p){case Iu:{let y=f;switch(g){case"bigint":p=Wx,y=f.toString();break;case"function":case"symbol":if(t)throw new TypeError("unable to serialize "+g);y=null;break;case"undefined":return s([Jx],f)}return s([p,y],f)}case ta:{if(g){let S=f;return g==="DataView"?S=new Uint8Array(f.buffer):g==="ArrayBuffer"&&(S=new Uint8Array(f)),s([g,[...S]],f)}const y=[],x=s([p,y],f);for(const S of f)y.push(c(S));return x}case Ru:{if(g)switch(g){case"BigInt":return s([g,f.toString()],f);case"Boolean":case"Number":case"String":return s([g,f.valueOf()],f)}if(i&&"toJSON"in f)return c(f.toJSON());const y=[],x=s([p,y],f);for(const S of g2(f))(t||!ku(Kr(f[S])))&&y.push([c(S),c(f[S])]);return x}case Nf:return s([p,f.toISOString()],f);case Cf:{const{source:y,flags:x}=f;return s([p,{source:y,flags:x}],f)}case Ef:{const y=[],x=s([p,y],f);for(const[S,v]of f)(t||!(ku(Kr(S))||ku(Kr(v))))&&y.push([c(S),c(v)]);return x}case _f:{const y=[],x=s([p,y],f);for(const S of f)(t||!ku(Kr(S)))&&y.push(c(S));return x}}const{message:m}=f;return s([p,{name:g,message:m}],f)};return c},kg=(t,{json:i,lossy:r}={})=>{const u=[];return x2(!(i||r),!!i,new Map,u)(t),u},Mu=typeof structuredClone=="function"?(t,i)=>i&&("json"in i||"lossy"in i)?Sg(kg(t,i)):structuredClone(t):(t,i)=>Sg(kg(t,i));function y2(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 b2(t,i){return"Back to reference "+(t+1)+(i>1?"-"+i:"")}function v2(t){const i=typeof t.options.clobberPrefix=="string"?t.options.clobberPrefix:"user-content-",r=t.options.footnoteBackContent||y2,u=t.options.footnoteBackLabel||b2,s=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 y=t.all(m),x=String(m.identifier).toUpperCase(),S=Wi(x.toLowerCase());let v=0;const N=[],_=t.footnoteCounts.get(x);for(;_!==void 0&&++v<=_;){N.length>0&&N.push({type:"text",value:" "});let F=typeof r=="string"?r:r(g,v);typeof F=="string"&&(F={type:"text",value:F}),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(F)?F:[F]})}const L=y[y.length-1];if(L&&L.type==="element"&&L.tagName==="p"){const F=L.children[L.children.length-1];F&&F.type==="text"?F.value+=" ":L.children.push({type:"text",value:" "}),L.children.push(...N)}else y.push(...N);const C={type:"element",tagName:"li",properties:{id:i+"fn-"+S},children:t.wrap(y,!0)};t.patch(m,C),p.push(C)}if(p.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:c,properties:{...Mu(f),id:"footnote-label"},children:[{type:"text",value:s}]},{type:"text",value:`
|
|
57
|
-
`},{type:"element",tagName:"ol",properties:{},children:t.wrap(p,!0)},{type:"text",value:`
|
|
58
|
-
`}]}}const Yu=(function(t){if(t==null)return j2;if(typeof t=="function")return Gu(t);if(typeof t=="object")return Array.isArray(t)?S2(t):k2(t);if(typeof t=="string")return w2(t);throw new Error("Expected function, string, or object as test")});function S2(t){const i=[];let r=-1;for(;++r<t.length;)i[r]=Yu(t[r]);return Gu(u);function u(...s){let c=-1;for(;++c<i.length;)if(i[c].apply(this,s))return!0;return!1}}function k2(t){const i=t;return Gu(r);function r(u){const s=u;let c;for(c in t)if(s[c]!==i[c])return!1;return!0}}function w2(t){return Gu(i);function i(r){return r&&r.type===t}}function Gu(t){return i;function i(r,u,s){return!!(N2(r)&&t.call(this,r,typeof u=="number"?u:void 0,s||void 0))}}function j2(){return!0}function N2(t){return t!==null&&typeof t=="object"&&"type"in t}const ey=[],C2=!0,Wc=!1,E2="skip";function ty(t,i,r,u){let s;typeof i=="function"&&typeof r!="function"?(u=r,r=i):s=i;const c=Yu(s),f=u?-1:1;p(t,void 0,[])();function p(g,m,y){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=ey,N,_,L;if((!i||c(g,m,y[y.length-1]||void 0))&&(v=_2(r(g,y)),v[0]===Wc))return v;if("children"in g&&g.children){const C=g;if(C.children&&v[0]!==E2)for(_=(u?C.children.length:-1)+f,L=y.concat(C);_>-1&&_<C.children.length;){const F=C.children[_];if(N=p(F,_,L)(),N[0]===Wc)return N;_=typeof N[1]=="number"?N[1]:_+f}}return v}}}function _2(t){return Array.isArray(t)?t:typeof t=="number"?[C2,t]:t==null?ey:[t]}function Tf(t,i,r,u){let s,c,f;typeof i=="function"&&typeof r!="function"?(c=void 0,f=i,s=r):(c=i,f=r,s=u),ty(t,c,p,s);function p(g,m){const y=m[m.length-1],x=y?y.children.indexOf(g):void 0;return f(g,x,y)}}const ef={}.hasOwnProperty,T2={};function A2(t,i){const r=i||T2,u=new Map,s=new Map,c=new Map,f={...d2,...r.handlers},p={all:m,applyData:D2,definitionById:u,footnoteById:s,footnoteCounts:c,footnoteOrder:[],handlers:f,one:g,options:r,patch:z2,wrap:M2};return Tf(t,function(y){if(y.type==="definition"||y.type==="footnoteDefinition"){const x=y.type==="definition"?u:s,S=String(y.identifier).toUpperCase();x.has(S)||x.set(S,y)}}),p;function g(y,x){const S=y.type,v=p.handlers[S];if(ef.call(p.handlers,S)&&v)return v(p,y,x);if(p.options.passThrough&&p.options.passThrough.includes(S)){if("children"in y){const{children:_,...L}=y,C=Mu(L);return C.children=p.all(y),C}return Mu(y)}return(p.options.unknownHandler||R2)(p,y,x)}function m(y){const x=[];if("children"in y){const S=y.children;let v=-1;for(;++v<S.length;){const N=p.one(S[v],y);if(N){if(v&&S[v-1].type==="break"&&(!Array.isArray(N)&&N.type==="text"&&(N.value=wg(N.value)),!Array.isArray(N)&&N.type==="element")){const _=N.children[0];_&&_.type==="text"&&(_.value=wg(_.value))}Array.isArray(N)?x.push(...N):x.push(N)}}}return x}}function z2(t,i){t.position&&(i.position=yv(t))}function D2(t,i){let r=i;if(t&&t.data){const u=t.data.hName,s=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,Mu(c)),"children"in r&&r.children&&s!==null&&s!==void 0&&(r.children=s)}return r}function R2(t,i){const r=i.data||{},u="value"in i&&!(ef.call(r,"hProperties")||ef.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 M2(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 wg(t){let i=0,r=t.charCodeAt(i);for(;r===9||r===32;)i++,r=t.charCodeAt(i);return t.slice(i)}function jg(t,i){const r=A2(t,i),u=r.one(t,void 0),s=v2(r),c=Array.isArray(u)?{type:"root",children:u}:u||{type:"root",children:[]};return s&&c.children.push({type:"text",value:`
|
|
62
|
-
`},s),c}function O2(t,i){return t&&"run"in t?async function(r,u){const s=jg(r,{file:u,...i});await t.run(s,u)}:function(r,u){return jg(r,{file:u,...t||i})}}function Ng(t){if(t)throw t}var bc,Cg;function L2(){if(Cg)return bc;Cg=1;var t=Object.prototype.hasOwnProperty,i=Object.prototype.toString,r=Object.defineProperty,u=Object.getOwnPropertyDescriptor,s=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 y=t.call(m,"constructor"),x=m.constructor&&m.constructor.prototype&&t.call(m.constructor.prototype,"isPrototypeOf");if(m.constructor&&!y&&!x)return!1;var S;for(S in m);return typeof S>"u"||t.call(m,S)},f=function(m,y){r&&y.name==="__proto__"?r(m,y.name,{enumerable:!0,configurable:!0,value:y.newValue,writable:!0}):m[y.name]=y.newValue},p=function(m,y){if(y==="__proto__")if(t.call(m,y)){if(u)return u(m,y).value}else return;return m[y]};return bc=function g(){var m,y,x,S,v,N,_=arguments[0],L=1,C=arguments.length,F=!1;for(typeof _=="boolean"&&(F=_,_=arguments[1]||{},L=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});L<C;++L)if(m=arguments[L],m!=null)for(y in m)x=p(_,y),S=p(m,y),_!==S&&(F&&S&&(c(S)||(v=s(S)))?(v?(v=!1,N=x&&s(x)?x:[]):N=x&&c(x)?x:{},f(_,{name:y,newValue:g(F,N,S)})):typeof S<"u"&&f(_,{name:y,newValue:S}));return _},bc}var U2=L2();const vc=qu(U2);function tf(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 q2(){const t=[],i={run:r,use:u};return i;function r(...s){let c=-1;const f=s.pop();if(typeof f!="function")throw new TypeError("Expected function as last argument, not "+f);p(null,...s);function p(g,...m){const y=t[++c];let x=-1;if(g){f(g);return}for(;++x<s.length;)(m[x]===null||m[x]===void 0)&&(m[x]=s[x]);s=m,y?B2(y,p)(...m):f(null,...m)}}function u(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return t.push(s),i}}function B2(t,i){let r;return u;function u(...f){const p=t.length>f.length;let g;p&&f.push(s);try{g=t.apply(this,f)}catch(m){const y=m;if(p&&r)throw y;return s(y)}p||(g&&g.then&&typeof g.then=="function"?g.then(c,s):g instanceof Error?s(g):c(g))}function s(f,...p){r||(r=!0,i(f,...p))}function c(f){s(null,f)}}const Mn={basename:H2,dirname:I2,extname:Y2,join:G2,sep:"/"};function H2(t,i){if(i!==void 0&&typeof i!="string")throw new TypeError('"ext" argument must be a string');aa(t);let r=0,u=-1,s=t.length,c;if(i===void 0||i.length===0||i.length>t.length){for(;s--;)if(t.codePointAt(s)===47){if(c){r=s+1;break}}else u<0&&(c=!0,u=s+1);return u<0?"":t.slice(r,u)}if(i===t)return"";let f=-1,p=i.length-1;for(;s--;)if(t.codePointAt(s)===47){if(c){r=s+1;break}}else f<0&&(c=!0,f=s+1),p>-1&&(t.codePointAt(s)===i.codePointAt(p--)?p<0&&(u=s):(p=-1,u=f));return r===u?u=f:u<0&&(u=t.length),t.slice(r,u)}function I2(t){if(aa(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 Y2(t){aa(t);let i=t.length,r=-1,u=0,s=-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?s<0?s=i:c!==1&&(c=1):s>-1&&(c=-1)}return s<0||r<0||c===0||c===1&&s===r-1&&s===u+1?"":t.slice(s,r)}function G2(...t){let i=-1,r;for(;++i<t.length;)aa(t[i]),t[i]&&(r=r===void 0?t[i]:r+"/"+t[i]);return r===void 0?".":V2(r)}function V2(t){aa(t);const i=t.codePointAt(0)===47;let r=F2(t,!i);return r.length===0&&!i&&(r="."),r.length>0&&t.codePointAt(t.length-1)===47&&(r+="/"),i?"/"+r:r}function F2(t,i){let r="",u=0,s=-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(!(s===f-1||c===1))if(s!==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("/")),s=f,c=0;continue}}else if(r.length>0){r="",u=0,s=f,c=0;continue}}i&&(r=r.length>0?r+"/..":"..",u=2)}else r.length>0?r+="/"+t.slice(s+1,f):r=t.slice(s+1,f),u=f-s-1;s=f,c=0}else p===46&&c>-1?c++:c=-1}return r}function aa(t){if(typeof t!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}const X2={cwd:$2};function $2(){return"/"}function nf(t){return!!(t!==null&&typeof t=="object"&&"href"in t&&t.href&&"protocol"in t&&t.protocol&&t.auth===void 0)}function Q2(t){if(typeof t=="string")t=new URL(t);else if(!nf(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 Z2(t)}function Z2(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(i)}const Sc=["history","path","basename","stem","extname","dirname"];class ny{constructor(i){let r;i?nf(i)?r={path:i}:typeof i=="string"||K2(i)?r={value:i}:r=i:r={},this.cwd="cwd"in r?"":X2.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let u=-1;for(;++u<Sc.length;){const c=Sc[u];c in r&&r[c]!==void 0&&r[c]!==null&&(this[c]=c==="history"?[...r[c]]:r[c])}let s;for(s in r)Sc.includes(s)||(this[s]=r[s])}get basename(){return typeof this.path=="string"?Mn.basename(this.path):void 0}set basename(i){wc(i,"basename"),kc(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){Eg(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(kc(i,"extname"),Eg(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){nf(i)&&(i=Q2(i)),wc(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){wc(i,"stem"),kc(i,"stem"),this.path=Mn.join(this.dirname||"",i+(this.extname||""))}fail(i,r,u){const s=this.message(i,r,u);throw s.fatal=!0,s}info(i,r,u){const s=this.message(i,r,u);return s.fatal=void 0,s}message(i,r,u){const s=new Ot(i,r,u);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(i){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(i||void 0).decode(this.value)}}function kc(t,i){if(t&&t.includes(Mn.sep))throw new Error("`"+i+"` cannot be a path: did not expect `"+Mn.sep+"`")}function wc(t,i){if(!t)throw new Error("`"+i+"` cannot be empty")}function Eg(t,i){if(!t)throw new Error("Setting `"+i+"` requires `path` to be set too")}function K2(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const J2=(function(t){const u=this.constructor.prototype,s=u[t],c=function(){return s.apply(c,arguments)};return Object.setPrototypeOf(c,u),c}),P2={}.hasOwnProperty;class Af extends J2{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=q2()}copy(){const i=new Af;let r=-1;for(;++r<this.attachers.length;){const u=this.attachers[r];i.use(...u)}return i.data(vc(!0,{},this.namespace)),i}data(i,r){return typeof i=="string"?arguments.length===2?(Cc("data",this.frozen),this.namespace[i]=r,this):P2.call(this.namespace,i)&&this.namespace[i]||void 0:i?(Cc("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 s=r.call(i,...u);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(i){this.freeze();const r=wu(i),u=this.parser||this.Parser;return jc("parse",u),u(String(r),r)}process(i,r){const u=this;return this.freeze(),jc("process",this.parser||this.Parser),Nc("process",this.compiler||this.Compiler),r?s(void 0,r):new Promise(s);function s(c,f){const p=wu(i),g=u.parse(p);u.run(g,p,function(y,x,S){if(y||!x||!S)return m(y);const v=x,N=u.stringify(v,S);tw(N)?S.value=N:S.result=N,m(y,S)});function m(y,x){y||!x?f(y):c?c(x):r(void 0,x)}}}processSync(i){let r=!1,u;return this.freeze(),jc("processSync",this.parser||this.Parser),Nc("processSync",this.compiler||this.Compiler),this.process(i,s),Tg("processSync","process",r),u;function s(c,f){r=!0,Ng(c),u=f}}run(i,r,u){_g(i),this.freeze();const s=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=wu(r);s.run(i,g,m);function m(y,x,S){const v=x||i;y?p(y):f?f(v):u(void 0,v,S)}}}runSync(i,r){let u=!1,s;return this.run(i,r,c),Tg("runSync","run",u),s;function c(f,p){Ng(f),s=p,u=!0}}stringify(i,r){this.freeze();const u=wu(r),s=this.compiler||this.Compiler;return Nc("stringify",s),_g(i),s(i,u)}use(i,...r){const u=this.attachers,s=this.namespace;if(Cc("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[y,...x]=m;g(y,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&&(s.settings=vc(!0,s.settings,m.settings))}function p(m){let y=-1;if(m!=null)if(Array.isArray(m))for(;++y<m.length;){const x=m[y];c(x)}else throw new TypeError("Expected a list of plugins, not `"+m+"`")}function g(m,y){let x=-1,S=-1;for(;++x<u.length;)if(u[x][0]===m){S=x;break}if(S===-1)u.push([m,...y]);else if(y.length>0){let[v,...N]=y;const _=u[S][1];tf(_)&&tf(v)&&(v=vc(!0,_,v)),u[S]=[m,v,...N]}}}}const W2=new Af().freeze();function jc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `parser`")}function Nc(t,i){if(typeof i!="function")throw new TypeError("Cannot `"+t+"` without `compiler`")}function Cc(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 _g(t){if(!tf(t)||typeof t.type!="string")throw new TypeError("Expected node, got `"+t+"`")}function Tg(t,i,r){if(!r)throw new Error("`"+t+"` finished async. Use `"+i+"` instead")}function wu(t){return ew(t)?t:new ny(t)}function ew(t){return!!(t&&typeof t=="object"&&"message"in t&&"messages"in t)}function tw(t){return typeof t=="string"||nw(t)}function nw(t){return!!(t&&typeof t=="object"&&"byteLength"in t&&"byteOffset"in t)}const lw="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ag=[],zg={allowDangerousHtml:!0},iw=/^(https?|ircs?|mailto|xmpp)$/i,rw=[{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 aw(t){const i=uw(t),r=sw(t);return ow(i.runSync(i.parse(r),r),t)}function uw(t){const i=t.rehypePlugins||Ag,r=t.remarkPlugins||Ag,u=t.remarkRehypeOptions?{...t.remarkRehypeOptions,...zg}:zg;return W2().use(Hk).use(r).use(O2,u).use(i)}function sw(t){const i=t.children||"",r=new ny;return typeof i=="string"&&(r.value=i),r}function ow(t,i){const r=i.allowedElements,u=i.allowElement,s=i.components,c=i.disallowedElements,f=i.skipHtml,p=i.unwrapDisallowed,g=i.urlTransform||cw;for(const y of rw)Object.hasOwn(i,y.from)&&(""+y.from+(y.to?"use `"+y.to+"` instead":"remove it")+lw+y.id,void 0);return Tf(t,m),wv(t,{Fragment:d.Fragment,components:s,ignoreInvalidStyle:!0,jsx:d.jsx,jsxs:d.jsxs,passKeys:!0,passNode:!0});function m(y,x,S){if(y.type==="raw"&&S&&typeof x=="number")return f?S.children.splice(x,1):S.children[x]={type:"text",value:y.value},x;if(y.type==="element"){let v;for(v in gc)if(Object.hasOwn(gc,v)&&Object.hasOwn(y.properties,v)){const N=y.properties[v],_=gc[v];(_===null||_.includes(y.tagName))&&(y.properties[v]=g(String(N||""),v,y))}}if(y.type==="element"){let v=r?!r.includes(y.tagName):c?c.includes(y.tagName):!1;if(!v&&u&&typeof x=="number"&&(v=!u(y,x,S)),v&&S&&typeof x=="number")return p&&y.children?S.children.splice(x,1,...y.children):S.children.splice(x,1),x}}}function cw(t){const i=t.indexOf(":"),r=t.indexOf("?"),u=t.indexOf("#"),s=t.indexOf("/");return i===-1||s!==-1&&i>s||r!==-1&&i>r||u!==-1&&i>u||iw.test(t.slice(0,i))?t:""}function Dg(t,i){const r=String(t);if(typeof i!="string")throw new TypeError("Expected character");let u=0,s=r.indexOf(i);for(;s!==-1;)u++,s=r.indexOf(i,s+i.length);return u}function fw(t){if(typeof t!="string")throw new TypeError("Expected a string");return t.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function dw(t,i,r){const s=Yu((r||{}).ignore||[]),c=hw(i);let f=-1;for(;++f<c.length;)ty(t,"text",p);function p(m,y){let x=-1,S;for(;++x<y.length;){const v=y[x],N=S?S.children:void 0;if(s(v,N?N.indexOf(v):void 0,S))return;S=v}if(S)return g(m,y)}function g(m,y){const x=y[y.length-1],S=c[f][0],v=c[f][1];let N=0;const L=x.children.indexOf(m);let C=!1,F=[];S.lastIndex=0;let U=S.exec(m.value);for(;U;){const $=U.index,ue={index:U.index,input:U.input,stack:[...y,m]};let R=v(...U,ue);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?S.lastIndex=$+1:(N!==$&&F.push({type:"text",value:m.value.slice(N,$)}),Array.isArray(R)?F.push(...R):R&&F.push(R),N=$+U[0].length,C=!0),!S.global)break;U=S.exec(m.value)}return C?(N<m.value.length&&F.push({type:"text",value:m.value.slice(N)}),x.children.splice(L,1,...F)):F=[m],L+F.length}}function hw(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 s=r[u];i.push([pw(s[0]),mw(s[1])])}return i}function pw(t){return typeof t=="string"?new RegExp(fw(t),"g"):t}function mw(t){return typeof t=="function"?t:function(){return t}}const Ec="phrasing",_c=["autolink","link","image","label"];function gw(){return{transforms:[ww],enter:{literalAutolink:yw,literalAutolinkEmail:Tc,literalAutolinkHttp:Tc,literalAutolinkWww:Tc},exit:{literalAutolink:kw,literalAutolinkEmail:Sw,literalAutolinkHttp:bw,literalAutolinkWww:vw}}}function xw(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Ec,notInConstruct:_c},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Ec,notInConstruct:_c},{character:":",before:"[ps]",after:"\\/",inConstruct:Ec,notInConstruct:_c}]}}function yw(t){this.enter({type:"link",title:null,url:"",children:[]},t)}function Tc(t){this.config.enter.autolinkProtocol.call(this,t)}function bw(t){this.config.exit.autolinkProtocol.call(this,t)}function vw(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 Sw(t){this.config.exit.autolinkEmail.call(this,t)}function kw(t){this.exit(t)}function ww(t){dw(t,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,jw],[/(?<=^|\s|\p{P}|\p{S})([-.\w+]+)@([-\w]+(?:\.[-\w]+)+)/gu,Nw]],{ignore:["link","linkReference"]})}function jw(t,i,r,u,s){let c="";if(!ly(s)||(/^w/i.test(i)&&(r=i+r,i="",c="http://"),!Cw(r)))return!1;const f=Ew(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 Nw(t,i,r,u){return!ly(u,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+i+"@"+r,children:[{type:"text",value:i+"@"+r}]}}function Cw(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 Ew(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 s=Dg(t,"(");let c=Dg(t,")");for(;u!==-1&&s>c;)t+=r.slice(0,u+1),r=r.slice(u+1),u=r.indexOf(")"),c++;return[t,r]}function ly(t,i){const r=t.input.charCodeAt(t.index-1);return(t.index===0||ii(r)||Bu(r))&&(!i||r!==47)}iy.peek=Lw;function _w(){this.buffer()}function Tw(t){this.enter({type:"footnoteReference",identifier:"",label:""},t)}function Aw(){this.buffer()}function zw(t){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},t)}function Dw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=jn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Rw(t){this.exit(t)}function Mw(t){const i=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=jn(this.sliceSerialize(t)).toLowerCase(),r.label=i}function Ow(t){this.exit(t)}function Lw(){return"["}function iy(t,i,r,u){const s=r.createTracker(u);let c=s.move("[^");const f=r.enter("footnoteReference"),p=r.enter("reference");return c+=s.move(r.safe(r.associationId(t),{after:"]",before:c})),p(),f(),c+=s.move("]"),c}function Uw(){return{enter:{gfmFootnoteCallString:_w,gfmFootnoteCall:Tw,gfmFootnoteDefinitionLabelString:Aw,gfmFootnoteDefinition:zw},exit:{gfmFootnoteCallString:Dw,gfmFootnoteCall:Rw,gfmFootnoteDefinitionLabelString:Mw,gfmFootnoteDefinition:Ow}}}function qw(t){let i=!1;return t&&t.firstLineBlank&&(i=!0),{handlers:{footnoteDefinition:r,footnoteReference:iy},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(u,s,c,f){const p=c.createTracker(f);let g=p.move("[^");const m=c.enter("footnoteDefinition"),y=c.enter("label");return g+=p.move(c.safe(c.associationId(u),{before:g,after:"]"})),y(),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?ry:Bw))),m(),g}}function Bw(t,i,r){return i===0?t:ry(t,i,r)}function ry(t,i,r){return(r?"":" ")+t}const Hw=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ay.peek=Fw;function Iw(){return{canContainEols:["delete"],enter:{strikethrough:Gw},exit:{strikethrough:Vw}}}function Yw(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:Hw}],handlers:{delete:ay}}}function Gw(t){this.enter({type:"delete",children:[]},t)}function Vw(t){this.exit(t)}function ay(t,i,r,u){const s=r.createTracker(u),c=r.enter("strikethrough");let f=s.move("~~");return f+=r.containerPhrasing(t,{...s.current(),before:f,after:"~"}),f+=s.move("~~"),c(),f}function Fw(){return"~"}function Xw(t){return t.length}function $w(t,i){const r=i||{},u=(r.align||[]).concat(),s=r.stringLength||Xw,c=[],f=[],p=[],g=[];let m=0,y=-1;for(;++y<t.length;){const _=[],L=[];let C=-1;for(t[y].length>m&&(m=t[y].length);++C<t[y].length;){const F=Qw(t[y][C]);if(r.alignDelimiters!==!1){const U=s(F);L[C]=U,(g[C]===void 0||U>g[C])&&(g[C]=U)}_.push(F)}f[y]=_,p[y]=L}let x=-1;if(typeof u=="object"&&"length"in u)for(;++x<m;)c[x]=Rg(u[x]);else{const _=Rg(u);for(;++x<m;)c[x]=_}x=-1;const S=[],v=[];for(;++x<m;){const _=c[x];let L="",C="";_===99?(L=":",C=":"):_===108?L=":":_===114&&(C=":");let F=r.alignDelimiters===!1?1:Math.max(1,g[x]-L.length-C.length);const U=L+"-".repeat(F)+C;r.alignDelimiters!==!1&&(F=L.length+F+C.length,F>g[x]&&(g[x]=F),v[x]=F),S[x]=U}f.splice(1,0,S),p.splice(1,0,v),y=-1;const N=[];for(;++y<f.length;){const _=f[y],L=p[y];x=-1;const C=[];for(;++x<m;){const F=_[x]||"";let U="",$="";if(r.alignDelimiters!==!1){const ue=g[x]-(L[x]||0),R=c[x];R===114?U=" ".repeat(ue):R===99?ue%2?(U=" ".repeat(ue/2+.5),$=" ".repeat(ue/2-.5)):(U=" ".repeat(ue/2),$=U):$=" ".repeat(ue)}r.delimiterStart!==!1&&!x&&C.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&F==="")&&(r.delimiterStart!==!1||x)&&C.push(" "),r.alignDelimiters!==!1&&C.push(U),C.push(F),r.alignDelimiters!==!1&&C.push($),r.padding!==!1&&C.push(" "),(r.delimiterEnd!==!1||x!==m-1)&&C.push("|")}N.push(r.delimiterEnd===!1?C.join("").replace(/ +$/,""):C.join(""))}return N.join(`
|
|
64
|
-
`)}function Qw(t){return t==null?"":String(t)}function Rg(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 Zw(t,i,r,u){const s=r.enter("blockquote"),c=r.createTracker(u);c.move("> "),c.shift(2);const f=r.indentLines(r.containerFlow(t,c.current()),Kw);return s(),f}function Kw(t,i,r){return">"+(r?"":" ")+t}function Jw(t,i){return Mg(t,i.inConstruct,!0)&&!Mg(t,i.notInConstruct,!1)}function Mg(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 Og(t,i,r,u){let s=-1;for(;++s<r.unsafe.length;)if(r.unsafe[s].character===`
|
|
65
|
-
`&&Jw(r.stack,r.unsafe[s]))return/[ \t]/.test(u.before)?"":" ";return`\\
|
|
66
|
-
`}function Pw(t,i){const r=String(t);let u=r.indexOf(i),s=u,c=0,f=0;if(typeof i!="string")throw new TypeError("Expected substring");for(;u!==-1;)u===s?++c>f&&(f=c):c=1,s=u+i.length,u=r.indexOf(i,s);return f}function Ww(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 ej(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 tj(t,i,r,u){const s=ej(r),c=t.value||"",f=s==="`"?"GraveAccent":"Tilde";if(Ww(t,r)){const x=r.enter("codeIndented"),S=r.indentLines(c,nj);return x(),S}const p=r.createTracker(u),g=s.repeat(Math.max(Pw(c,s)+1,3)),m=r.enter("codeFenced");let y=p.move(g);if(t.lang){const x=r.enter(`codeFencedLang${f}`);y+=p.move(r.safe(t.lang,{before:y,after:" ",encode:["`"],...p.current()})),x()}if(t.lang&&t.meta){const x=r.enter(`codeFencedMeta${f}`);y+=p.move(" "),y+=p.move(r.safe(t.meta,{before:y,after:`
|
|
67
|
-
`,encode:["`"],...p.current()})),x()}return y+=p.move(`
|
|
68
|
-
`),c&&(y+=p.move(c+`
|
|
69
|
-
`)),y+=p.move(g),m(),y}function nj(t,i,r){return(r?"":" ")+t}function zf(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 lj(t,i,r,u){const s=zf(r),c=s==='"'?"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(" "+s),m+=g.move(r.safe(t.title,{before:m,after:s,...g.current()})),m+=g.move(s),p()),f(),m}function ij(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 la(t){return"&#x"+t.toString(16).toUpperCase()+";"}function Ou(t,i,r){const u=Ji(t),s=Ji(i);return u===void 0?s===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:u===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}uy.peek=rj;function uy(t,i,r,u){const s=ij(r),c=r.enter("emphasis"),f=r.createTracker(u),p=f.move(s);let g=f.move(r.containerPhrasing(t,{after:s,before:p,...f.current()}));const m=g.charCodeAt(0),y=Ou(u.before.charCodeAt(u.before.length-1),m,s);y.inside&&(g=la(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Ou(u.after.charCodeAt(0),x,s);S.inside&&(g=g.slice(0,-1)+la(x));const v=f.move(s);return c(),r.attentionEncodeSurroundingInfo={after:S.outside,before:y.outside},p+g+v}function rj(t,i,r){return r.options.emphasis||"*"}function aj(t,i){let r=!1;return Tf(t,function(u){if("value"in u&&/\r?\n|\r/.test(u.value)||u.type==="break")return r=!0,Wc}),!!((!t.depth||t.depth<3)&&kf(t)&&(i.options.setext||r))}function uj(t,i,r,u){const s=Math.max(Math.min(6,t.depth||1),1),c=r.createTracker(u);if(aj(t,r)){const y=r.enter("headingSetext"),x=r.enter("phrasing"),S=r.containerPhrasing(t,{...c.current(),before:`
|
|
71
|
-
`,after:`
|
|
72
|
-
`});return x(),y(),S+`
|
|
73
|
-
`+(s===1?"=":"-").repeat(S.length-(Math.max(S.lastIndexOf("\r"),S.lastIndexOf(`
|
|
74
|
-
`))+1))}const f="#".repeat(s),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=la(m.charCodeAt(0))+m.slice(1)),m=m?f+" "+m:f,r.options.closeAtx&&(m+=" "+f),g(),p(),m}sy.peek=sj;function sy(t){return t.value||""}function sj(){return"<"}oy.peek=oj;function oy(t,i,r,u){const s=zf(r),c=s==='"'?"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(" "+s),m+=g.move(r.safe(t.title,{before:m,after:s,...g.current()})),m+=g.move(s),p()),m+=g.move(")"),f(),m}function oj(){return"!"}cy.peek=cj;function cy(t,i,r,u){const s=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 y=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...p.current()});return f(),r.stack=y,c(),s==="full"||!m||m!==x?g+=p.move(x+"]"):s==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function cj(){return"!"}fy.peek=fj;function fy(t,i,r){let u=t.value||"",s="`",c=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(u);)s+="`";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 s+u+s}function fj(){return"`"}function dy(t,i){const r=kf(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))}hy.peek=dj;function hy(t,i,r,u){const s=zf(r),c=s==='"'?"Quote":"Apostrophe",f=r.createTracker(u);let p,g;if(dy(t,r)){const y=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=y,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(" "+s),m+=f.move(r.safe(t.title,{before:m,after:s,...f.current()})),m+=f.move(s),g()),m+=f.move(")"),p(),m}function dj(t,i,r){return dy(t,r)?"<":"["}py.peek=hj;function py(t,i,r,u){const s=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 y=r.stack;r.stack=[],f=r.enter("reference");const x=r.safe(r.associationId(t),{before:g,after:"]",...p.current()});return f(),r.stack=y,c(),s==="full"||!m||m!==x?g+=p.move(x+"]"):s==="shortcut"?g=g.slice(0,-1):g+=p.move("]"),g}function hj(){return"["}function Df(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 pj(t){const i=Df(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 mj(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 my(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 gj(t,i,r,u){const s=r.enter("list"),c=r.bulletCurrent;let f=t.ordered?mj(r):Df(r);const p=t.ordered?f==="."?")":".":pj(r);let g=i&&r.bulletLastUsed?f===r.bulletLastUsed:!1;if(!t.ordered){const y=t.children?t.children[0]:void 0;if((f==="*"||f==="-")&&y&&(!y.children||!y.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),my(r)===f&&y){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,s(),m}function xj(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 yj(t,i,r,u){const s=xj(r);let c=r.bulletCurrent||Df(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;(s==="tab"||s==="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()),y);return g(),m;function y(x,S,v){return S?(v?"":" ".repeat(f))+x:(v?c:c+" ".repeat(f-c.length))+x}}function bj(t,i,r,u){const s=r.enter("paragraph"),c=r.enter("phrasing"),f=r.containerPhrasing(t,u);return c(),s(),f}const vj=Yu(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function Sj(t,i,r,u){return(t.children.some(function(f){return vj(f)})?r.containerPhrasing:r.containerFlow).call(r,t,u)}function kj(t){const i=t.options.strong||"*";if(i!=="*"&&i!=="_")throw new Error("Cannot serialize strong with `"+i+"` for `options.strong`, expected `*`, or `_`");return i}gy.peek=wj;function gy(t,i,r,u){const s=kj(r),c=r.enter("strong"),f=r.createTracker(u),p=f.move(s+s);let g=f.move(r.containerPhrasing(t,{after:s,before:p,...f.current()}));const m=g.charCodeAt(0),y=Ou(u.before.charCodeAt(u.before.length-1),m,s);y.inside&&(g=la(m)+g.slice(1));const x=g.charCodeAt(g.length-1),S=Ou(u.after.charCodeAt(0),x,s);S.inside&&(g=g.slice(0,-1)+la(x));const v=f.move(s+s);return c(),r.attentionEncodeSurroundingInfo={after:S.outside,before:y.outside},p+g+v}function wj(t,i,r){return r.options.strong||"*"}function jj(t,i,r,u){return r.safe(t.value,u)}function Nj(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 Cj(t,i,r){const u=(my(r)+(r.options.ruleSpaces?" ":"")).repeat(Nj(r));return r.options.ruleSpaces?u.slice(0,-1):u}const xy={blockquote:Zw,break:Og,code:tj,definition:lj,emphasis:uy,hardBreak:Og,heading:uj,html:sy,image:oy,imageReference:cy,inlineCode:fy,link:hy,linkReference:py,list:gj,listItem:yj,paragraph:bj,root:Sj,strong:gy,text:jj,thematicBreak:Cj};function Ej(){return{enter:{table:_j,tableData:Lg,tableHeader:Lg,tableRow:Aj},exit:{codeText:zj,table:Tj,tableData:Ac,tableHeader:Ac,tableRow:Ac}}}function _j(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 Tj(t){this.exit(t),this.data.inTable=void 0}function Aj(t){this.enter({type:"tableRow",children:[]},t)}function Ac(t){this.exit(t)}function Lg(t){this.enter({type:"tableCell",children:[]},t)}function zj(t){let i=this.resume();this.data.inTable&&(i=i.replace(/\\([\\|])/g,Dj));const r=this.stack[this.stack.length-1];r.type,r.value=i,this.exit(t)}function Dj(t,i){return i==="|"?i:t}function Rj(t){const i=t||{},r=i.tableCellPadding,u=i.tablePipeAlign,s=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,_,L){return m(y(v,_,L),v.align)}function p(v,N,_,L){const C=x(v,_,L),F=m([C]);return F.slice(0,F.indexOf(`
|
|
77
|
-
`))}function g(v,N,_,L){const C=_.enter("tableCell"),F=_.enter("phrasing"),U=_.containerPhrasing(v,{...L,before:c,after:c});return F(),C(),U}function m(v,N){return $w(v,{align:N,alignDelimiters:u,padding:r,stringLength:s})}function y(v,N,_){const L=v.children;let C=-1;const F=[],U=N.enter("table");for(;++C<L.length;)F[C]=x(L[C],N,_);return U(),F}function x(v,N,_){const L=v.children;let C=-1;const F=[],U=N.enter("tableRow");for(;++C<L.length;)F[C]=g(L[C],v,N,_);return U(),F}function S(v,N,_){let L=xy.inlineCode(v,N,_);return _.stack.includes("tableCell")&&(L=L.replace(/\|/g,"\\$&")),L}}function Mj(){return{exit:{taskListCheckValueChecked:Ug,taskListCheckValueUnchecked:Ug,paragraph:Lj}}}function Oj(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:Uj}}}function Ug(t){const i=this.stack[this.stack.length-2];i.type,i.checked=t.type==="taskListCheckValueChecked"}function Lj(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 s=i.children;let c=-1,f;for(;++c<s.length;){const p=s[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 Uj(t,i,r,u){const s=t.children[0],c=typeof t.checked=="boolean"&&s&&s.type==="paragraph",f="["+(t.checked?"x":" ")+"] ",p=r.createTracker(u);c&&p.move(f);let g=xy.listItem(t,i,r,{...u,...p.current()});return c&&(g=g.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,m)),g;function m(y){return y+f}}function qj(){return[gw(),Uw(),Iw(),Ej(),Mj()]}function Bj(t){return{extensions:[xw(),qw(t),Yw(),Rj(t),Oj()]}}const Hj={tokenize:Xj,partial:!0},yy={tokenize:$j,partial:!0},by={tokenize:Qj,partial:!0},vy={tokenize:Zj,partial:!0},Ij={tokenize:Kj,partial:!0},Sy={name:"wwwAutolink",tokenize:Vj,previous:wy},ky={name:"protocolAutolink",tokenize:Fj,previous:jy},al={name:"emailAutolink",tokenize:Gj,previous:Ny},Ln={};function Yj(){return{text:Ln}}let ei=48;for(;ei<123;)Ln[ei]=al,ei++,ei===58?ei=65:ei===91&&(ei=97);Ln[43]=al;Ln[45]=al;Ln[46]=al;Ln[95]=al;Ln[72]=[al,ky];Ln[104]=[al,ky];Ln[87]=[al,Sy];Ln[119]=[al,Sy];function Gj(t,i,r){const u=this;let s,c;return f;function f(x){return!lf(x)||!Ny.call(u,u.previous)||Rf(u.events)?r(x):(t.enter("literalAutolink"),t.enter("literalAutolinkEmail"),p(x))}function p(x){return lf(x)?(t.consume(x),p):x===64?(t.consume(x),g):r(x)}function g(x){return x===46?t.check(Ij,y,m)(x):x===45||x===95||Mt(x)?(c=!0,t.consume(x),g):y(x)}function m(x){return t.consume(x),s=!0,g}function y(x){return c&&s&&Ut(u.previous)?(t.exit("literalAutolinkEmail"),t.exit("literalAutolink"),i(x)):r(x)}}function Vj(t,i,r){const u=this;return s;function s(f){return f!==87&&f!==119||!wy.call(u,u.previous)||Rf(u.events)?r(f):(t.enter("literalAutolink"),t.enter("literalAutolinkWww"),t.check(Hj,t.attempt(yy,t.attempt(by,c),r),r)(f))}function c(f){return t.exit("literalAutolinkWww"),t.exit("literalAutolink"),i(f)}}function Fj(t,i,r){const u=this;let s="",c=!1;return f;function f(x){return(x===72||x===104)&&jy.call(u,u.previous)&&!Rf(u.events)?(t.enter("literalAutolink"),t.enter("literalAutolinkHttp"),s+=String.fromCodePoint(x),t.consume(x),p):r(x)}function p(x){if(Ut(x)&&s.length<5)return s+=String.fromCodePoint(x),t.consume(x),p;if(x===58){const S=s.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||Du(x)||lt(x)||ii(x)||Bu(x)?r(x):t.attempt(yy,t.attempt(by,y),r)(x)}function y(x){return t.exit("literalAutolinkHttp"),t.exit("literalAutolink"),i(x)}}function Xj(t,i,r){let u=0;return s;function s(f){return(f===87||f===119)&&u<3?(u++,t.consume(f),s):f===46&&u===3?(t.consume(f),c):r(f)}function c(f){return f===null?r(f):i(f)}}function $j(t,i,r){let u,s,c;return f;function f(m){return m===46||m===95?t.check(vy,g,p)(m):m===null||lt(m)||ii(m)||m!==45&&Bu(m)?g(m):(c=!0,t.consume(m),f)}function p(m){return m===95?u=!0:(s=u,u=void 0),t.consume(m),f}function g(m){return s||u||!c?r(m):i(m)}}function Qj(t,i){let r=0,u=0;return s;function s(f){return f===40?(r++,t.consume(f),s):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(vy,i,c)(f):f===null||lt(f)||ii(f)?i(f):(t.consume(f),s)}function c(f){return f===41&&u++,t.consume(f),s}}function Zj(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),s):p===60||p===null||lt(p)||ii(p)?i(p):r(p)}function s(p){return p===null||p===40||p===91||lt(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 Kj(t,i,r){return u;function u(c){return t.consume(c),s}function s(c){return Mt(c)?r(c):i(c)}}function wy(t){return t===null||t===40||t===42||t===95||t===91||t===93||t===126||lt(t)}function jy(t){return!Ut(t)}function Ny(t){return!(t===47||lf(t))}function lf(t){return t===43||t===45||t===46||t===95||Mt(t)}function Rf(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 Jj={tokenize:rN,partial:!0};function Pj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:nN,continuation:{tokenize:lN},exit:iN}},text:{91:{name:"gfmFootnoteCall",tokenize:tN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Wj,resolveTo:eN}}}}function Wj(t,i,r){const u=this;let s=u.events.length;const c=u.parser.gfmFootnotes||(u.parser.gfmFootnotes=[]);let f;for(;s--;){const g=u.events[s][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=jn(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 eN(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},t[r+3][1].end),end:Object.assign({},t[r+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const c={type:"gfmFootnoteCallString",start:Object.assign({},s.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",s,i],["exit",s,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 tN(t,i,r){const u=this,s=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||lt(x))return r(x);if(x===93){t.exit("chunkString");const S=t.exit("gfmFootnoteCallString");return s.includes(jn(u.sliceSerialize(S)))?(t.enter("gfmFootnoteCallLabelMarker"),t.consume(x),t.exit("gfmFootnoteCallLabelMarker"),t.exit("gfmFootnoteCall"),i):r(x)}return lt(x)||(f=!0),c++,t.consume(x),x===92?y:m}function y(x){return x===91||x===92||x===93?(t.consume(x),c++,m):m(x)}}function nN(t,i,r){const u=this,s=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",y):r(N)}function y(N){if(f>999||N===93&&!p||N===null||N===91||lt(N))return r(N);if(N===93){t.exit("chunkString");const _=t.exit("gfmFootnoteDefinitionLabelString");return c=jn(u.sliceSerialize(_)),t.enter("gfmFootnoteDefinitionLabelMarker"),t.consume(N),t.exit("gfmFootnoteDefinitionLabelMarker"),t.exit("gfmFootnoteDefinitionLabel"),S}return lt(N)||(p=!0),f++,t.consume(N),N===92?x:y}function x(N){return N===91||N===92||N===93?(t.consume(N),f++,y):y(N)}function S(N){return N===58?(t.enter("definitionMarker"),t.consume(N),t.exit("definitionMarker"),s.includes(c)||s.push(c),Ie(t,v,"gfmFootnoteDefinitionWhitespace")):r(N)}function v(N){return i(N)}}function lN(t,i,r){return t.check(ra,i,t.attempt(Jj,i,r))}function iN(t){t.exit("gfmFootnoteDefinition")}function rN(t,i,r){const u=this;return Ie(t,s,"gfmFootnoteDefinitionIndent",5);function s(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 aN(t){let r=(t||{}).singleTilde;const u={name:"strikethrough",tokenize:c,resolveAll:s};return r==null&&(r=!0),{text:{126:u},insideSpan:{null:[u]},attentionMarkers:{null:[126]}};function s(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 y={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",y,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,Hu(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",y,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,y=this.events;let x=0;return S;function S(N){return m===126&&y[y.length-1][1].type!=="characterEscape"?g(N):(f.enter("strikethroughSequenceTemporary"),v(N))}function v(N){const _=Ji(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"),C=Ji(N);return L._open=!C||C===2&&!!_,L._close=!_||_===2&&!!C,p(N)}}}class uN{constructor(){this.map=[]}add(i,r,u){sN(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 s=u.pop();for(;s;){for(const c of s)i.push(c);s=u.pop()}this.map.length=0}}function sN(t,i,r,u){let s=0;if(!(r===0&&u.length===0)){for(;s<t.map.length;){if(t.map[s][0]===i){t.map[s][1]+=r,t.map[s][2].push(...u);return}s+=1}t.map.push([i,r,u])}}function oN(t,i){let r=!1;const u=[];for(;i<t.length;){const s=t[i];if(r){if(s[0]==="enter")s[1].type==="tableContent"&&u.push(t[i+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(t[i-1][1].type==="tableDelimiterMarker"){const c=u.length-1;u[c]=u[c]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(r=!0);i+=1}return u}function cN(){return{flow:{null:{name:"table",tokenize:fN,resolveAll:dN}}}}function fN(t,i,r){const u=this;let s=0,c=0,f;return p;function p(O){let re=u.events.length-1;for(;re>-1;){const oe=u.events[re][1].type;if(oe==="lineEnding"||oe==="linePrefix")re--;else break}const te=re>-1?u.events[re][1].type:null,xe=te==="tableHead"||te==="tableRow"?R:g;return xe===R&&u.parser.lazy[u.now().line]?r(O):xe(O)}function g(O){return t.enter("tableHead"),t.enter("tableRow"),m(O)}function m(O){return O===124||(f=!0,c+=1),y(O)}function y(O){return O===null?r(O):ve(O)?c>1?(c=0,u.interrupt=!0,t.exit("tableRow"),t.enter("lineEnding"),t.consume(O),t.exit("lineEnding"),v):r(O):Me(O)?Ie(t,y,"whitespace")(O):(c+=1,f&&(f=!1,s+=1),O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),f=!0,y):(t.enter("data"),x(O)))}function x(O){return O===null||O===124||lt(O)?(t.exit("data"),y(O)):(t.consume(O),O===92?S:x)}function S(O){return O===92||O===124?(t.consume(O),x):x(O)}function v(O){return u.interrupt=!1,u.parser.lazy[u.now().line]?r(O):(t.enter("tableDelimiterRow"),f=!1,Me(O)?Ie(t,N,"linePrefix",u.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):N(O))}function N(O){return O===45||O===58?L(O):O===124?(f=!0,t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),_):ue(O)}function _(O){return Me(O)?Ie(t,L,"whitespace")(O):L(O)}function L(O){return O===58?(c+=1,f=!0,t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),C):O===45?(c+=1,C(O)):O===null||ve(O)?$(O):ue(O)}function C(O){return O===45?(t.enter("tableDelimiterFiller"),F(O)):ue(O)}function F(O){return O===45?(t.consume(O),F):O===58?(f=!0,t.exit("tableDelimiterFiller"),t.enter("tableDelimiterMarker"),t.consume(O),t.exit("tableDelimiterMarker"),U):(t.exit("tableDelimiterFiller"),U(O))}function U(O){return Me(O)?Ie(t,$,"whitespace")(O):$(O)}function $(O){return O===124?N(O):O===null||ve(O)?!f||s!==c?ue(O):(t.exit("tableDelimiterRow"),t.exit("tableHead"),i(O)):ue(O)}function ue(O){return r(O)}function R(O){return t.enter("tableRow"),H(O)}function H(O){return O===124?(t.enter("tableCellDivider"),t.consume(O),t.exit("tableCellDivider"),H):O===null||ve(O)?(t.exit("tableRow"),i(O)):Me(O)?Ie(t,H,"whitespace")(O):(t.enter("data"),ie(O))}function ie(O){return O===null||O===124||lt(O)?(t.exit("data"),H(O)):(t.consume(O),O===92?ee:ie)}function ee(O){return O===92||O===124?(t.consume(O),ie):ie(O)}}function dN(t,i){let r=-1,u=!0,s=0,c=[0,0,0,0],f=[0,0,0,0],p=!1,g=0,m,y,x;const S=new uN;for(;++r<t.length;){const v=t[r],N=v[1];v[0]==="enter"?N.type==="tableHead"?(p=!1,g!==0&&(qg(S,i,g,m,y),y=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,y={type:"tableBody",start:Object.assign({},N.start),end:Object.assign({},N.end)},S.add(r,0,[["enter",y,i]])),s=N.type==="tableDelimiterRow"?2:y?3:1):s&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")?(u=!1,f[2]===0&&(c[1]!==0&&(f[0]=f[1],x=ju(S,i,c,s,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=ju(S,i,c,s,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=ju(S,i,c,s,r,x)):f[1]!==0&&(x=ju(S,i,f,s,r,x)),s=0):s&&(N.type==="data"||N.type==="tableDelimiterMarker"||N.type==="tableDelimiterFiller")&&(f[3]=r)}for(g!==0&&qg(S,i,g,m,y),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=oN(i.events,r))}return t}function ju(t,i,r,u,s,c){const f=u===1?"tableHeader":u===2?"tableDelimiter":"tableData",p="tableContent";r[0]!==0&&(c.end=Object.assign({},Ki(i.events,r[0])),t.add(r[0],0,[["exit",c,i]]));const g=Ki(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=Ki(i.events,r[2]),y=Ki(i.events,r[3]),x={type:p,start:Object.assign({},m),end:Object.assign({},y)};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,_=r[3]-r[2]-1;t.add(N,_,[])}}t.add(r[3]+1,0,[["exit",x,i]])}return s!==void 0&&(c.end=Object.assign({},Ki(i.events,s)),t.add(s,0,[["exit",c,i]]),c=void 0),c}function qg(t,i,r,u,s){const c=[],f=Ki(i.events,r);s&&(s.end=Object.assign({},f),c.push(["exit",s,i])),u.end=Object.assign({},f),c.push(["exit",u,i]),t.add(r+1,0,c)}function Ki(t,i){const r=t[i],u=r[0]==="enter"?"start":"end";return r[1][u]}const hN={name:"tasklistCheck",tokenize:mN};function pN(){return{text:{91:hN}}}function mN(t,i,r){const u=this;return s;function s(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 lt(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 ve(g)?i(g):Me(g)?t.check({tokenize:gN},i,r)(g):r(g)}}function gN(t,i,r){return Ie(t,u,"whitespace");function u(s){return s===null?r(s):i(s)}}function xN(t){return Lx([Yj(),Pj(),aN(t),cN(),pN()])}const yN={};function bN(t){const i=this,r=t||yN,u=i.data(),s=u.micromarkExtensions||(u.micromarkExtensions=[]),c=u.fromMarkdownExtensions||(u.fromMarkdownExtensions=[]),f=u.toMarkdownExtensions||(u.toMarkdownExtensions=[]);s.push(xN(r)),c.push(qj()),f.push(Bj(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 Cy=(...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 vN=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 SN=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 Bg=t=>{const i=SN(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 zc={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 kN=t=>{for(const i in t)if(i.startsWith("aria-")||i==="role"||i==="title")return!0;return!1},wN=j.createContext({}),jN=()=>j.useContext(wN),NN=j.forwardRef(({color:t,size:i,strokeWidth:r,absoluteStrokeWidth:u,className:s="",children:c,iconNode:f,...p},g)=>{const{size:m=24,strokeWidth:y=2,absoluteStrokeWidth:x=!1,color:S="currentColor",className:v=""}=jN()??{},N=u??x?Number(r??y)*24/Number(i??m):r??y;return j.createElement("svg",{ref:g,...zc,width:i??m??zc.width,height:i??m??zc.height,stroke:t??S,strokeWidth:N,className:Cy("lucide",v,s),...!c&&!kN(p)&&{"aria-hidden":"true"},...p},[...f.map(([_,L])=>j.createElement(_,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 ze=(t,i)=>{const r=j.forwardRef(({className:u,...s},c)=>j.createElement(NN,{ref:c,iconNode:i,className:Cy(`lucide-${vN(Bg(t))}`,`lucide-${t}`,u),...s}));return r.displayName=Bg(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 CN=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],EN=ze("arrow-down",CN);/**
|
|
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 _N=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],TN=ze("arrow-up",_N);/**
|
|
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 AN=[["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"}]],zN=ze("bot",AN);/**
|
|
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 DN=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ua=ze("check",DN);/**
|
|
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 RN=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Ey=ze("chevron-down",RN);/**
|
|
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 MN=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ON=ze("chevron-left",MN);/**
|
|
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 LN=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Vu=ze("chevron-right",LN);/**
|
|
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 UN=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],qN=ze("circle-check",UN);/**
|
|
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 BN=[["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"}]],HN=ze("circle-dashed",BN);/**
|
|
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 IN=[["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"}]],Hg=ze("circle-x",IN);/**
|
|
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 YN=[["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"}]],GN=ze("copy",YN);/**
|
|
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 VN=[["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"}]],FN=ze("ellipsis",VN);/**
|
|
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 XN=[["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"}]],$N=ze("external-link",XN);/**
|
|
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 QN=[["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"}]],ZN=ze("file-text",QN);/**
|
|
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 KN=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],JN=ze("gauge",KN);/**
|
|
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 PN=[["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"}]],WN=ze("git-branch",PN);/**
|
|
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 eC=[["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"}]],tC=ze("globe",eC);/**
|
|
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 nC=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Mf=ze("loader-circle",nC);/**
|
|
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 lC=[["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"}]],iC=ze("message-circle-question-mark",lC);/**
|
|
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 rC=[["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"}]],aC=ze("panel-left-close",rC);/**
|
|
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 uC=[["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"}]],sC=ze("panel-left-open",uC);/**
|
|
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 oC=[["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"}]],Ig=ze("paperclip",oC);/**
|
|
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 cC=[["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"}]],fC=ze("pause",cC);/**
|
|
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 dC=[["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"}]],_y=ze("pencil",dC);/**
|
|
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 hC=[["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"}]],pC=ze("play",hC);/**
|
|
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 mC=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Of=ze("refresh-cw",mC);/**
|
|
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 gC=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],xC=ze("search",gC);/**
|
|
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 yC=[["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"}]],Ty=ze("settings",yC);/**
|
|
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 bC=[["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"}]],rf=ze("shield-alert",bC);/**
|
|
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 vC=[["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"}]],SC=ze("shield",vC);/**
|
|
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 kC=[["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"}]],wC=ze("sparkles",kC);/**
|
|
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 jC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],NC=ze("square-check",jC);/**
|
|
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 CC=[["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"}]],Ay=ze("square-pen",CC);/**
|
|
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 EC=[["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"}]],_C=ze("square-terminal",EC);/**
|
|
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 TC=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]],Fu=ze("square",TC);/**
|
|
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 AC=[["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"}]],zy=ze("target",AC);/**
|
|
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 zC=[["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"}]],Lf=ze("trash-2",zC);/**
|
|
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 DC=[["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"}]],Dy=ze("wrench",DC);/**
|
|
303
|
-
* @license lucide-react v1.26.0 - ISC
|
|
304
|
-
*
|
|
305
|
-
* This source code is licensed under the ISC license.
|
|
306
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
307
|
-
*/const RC=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],er=ze("x",RC),Ry=new Map([["theme","This app follows your system appearance."],["keybindings","This app 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."]]),MC="This command runs in the host terminal.";function My(t){return Ry.has(t.name)?!0:t.runner==="client"&&!(t.surfaces??[]).includes("gui")}function Oy(t){return Ry.get(t)??MC}function OC(t,i){switch(i.type){case"permission_request":{const{id:r,toolName:u,toolArgs:s,requesterDriverId:c,requester:f,diffLines:p,diffFile:g,cwd:m}=i.event;return t.some(y=>y.id===r)?t:[...t,{kind:"permission",id:r,toolName:u,toolArgs:s,...c?{requesterDriverId:c}:{},...f?{requester:f}:{},...p?{diffLines:p,diffFile:g}:{},...m?{cwd:m}:{}}]}case"ask_request":{const{id:r,request:u,requesterDriverId:s}=i.event;return t.some(c=>c.id===r)?t:[...t,{kind:"ask",id:r,request:u,...s?{requesterDriverId:s}:{}}]}case"prompt_resolved":{const{id:r}=i.event,u=t.filter(s=>s.id!==r);return u.length===t.length?t:u}default:return t}}function LC(t,i){return{type:"permission-response",id:t,result:i}}function UC(t,i){return{type:"ask-response",id:t,response:i}}function Jr(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 Nu(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 qC(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 Oy("theme");default:return`This client does not have a screen for '${t.type}' yet.`}}const BC=2e3,HC=10;function IC(t,i){let r=null,u="disconnected",s=null,c=0,f=!1;function p(v){u=v,i.onStatusChange(v)}function g(){if(!f){if(c>=HC){i.onGiveUp?.();return}s=setTimeout(()=>{c++,m()},BC)}}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 _=Q0(N,$0);if(!_.ok){i.onMessage({type:"protocol_error",message:`Malformed message from server (${_.reason})`});return}i.onMessage(_.message)},r.onclose=()=>{r=null,f?p("disconnected"):(p("disconnected"),g())},r.onerror=()=>{p("error")}}function y(){f=!1,s!==null&&(clearTimeout(s),s=null),m()}function x(){f=!0,s!==null&&(clearTimeout(s),s=null),r?.close(),r=null,p("disconnected")}function S(v){r?.readyState===WebSocket.OPEN&&r.send(JSON.stringify(v))}return{connect:y,disconnect:x,send:S,status:()=>u}}const YC={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",app_view:"intentionally-not-rendered",app_tool_result:"intentionally-not-rendered",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 Yg=0;function Gg(t){return Yg+=1,`${t}_${Yg}_${Date.now()}`}function GC(t){const[i,r]=j.useState(!1),[u,s]=j.useState("idle"),[c,f]=j.useState([]),[p,g]=j.useState(null),[m,y]=j.useState(null),x=j.useRef(null),S=j.useRef(null),v=j.useCallback(_=>_.type!=="agent_definitions"?!1:(x.current!==_.requestId||(f(_.agents),g(_.current),s("ready")),!0),[]),N=j.useCallback(()=>{const _=Gg("get_agent_definitions");x.current=_,t({type:"get-agent-definitions",requestId:_})},[t]);return{agentSwitcherOpen:i,agentSwitcherStatus:u,agentDefinitions:c,currentAgentType:p,agentSwitchMessage:m,openAgentSwitcher:j.useCallback(()=>{r(!0),s(_=>_==="ready"?"ready":"loading"),y(null),N()},[N]),closeAgentSwitcher:j.useCallback(()=>{r(!1)},[]),selectAgent:j.useCallback(_=>{const L=Gg("agent_switch");S.current=L,y(null),t({type:"command",name:"agent",args:_,requestId:L})},[t]),handleAgentDefinitionsMessage:v,resolveSwitchResult:j.useCallback((_,L)=>_===void 0||S.current!==_?!1:(S.current=null,y(L.message),L.success&&N(),!0),[N])}}let Vg=0;function VC(){return Vg+=1,`execdetail_${Vg}_${Date.now()}`}function FC(t){const[i,r]=j.useState(null),[u,s]=j.useState("idle"),[c,f]=j.useState([]),[p,g]=j.useState(null),[m,y]=j.useState(!1),x=j.useRef(null),S=j.useRef(null),v=j.useRef(void 0),N=j.useCallback((_,L)=>{const C=VC();x.current=C,S.current=_,s("loading"),g(null),t({type:"read-execution-detail",requestId:C,entryId:_,cursor:L})},[t]);return{openEntryId:i,executionDetailStatus:u,executionDetailRecords:c,executionDetailError:p,executionDetailComplete:m,openExecutionDetail:j.useCallback(_=>{r(_),f([]),y(!1),v.current=void 0,N(_)},[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([]),s("idle"),g(null),y(!1)},[]),handleExecutionDetailMessage:j.useCallback(_=>_.type!=="execution_detail"&&_.type!=="execution_detail_error"?!1:x.current!==_.requestId?!0:_.type==="execution_detail_error"?(s("error"),g(_.message),!0):(f(L=>_.page.cursor===void 0?_.page.records:[...L,..._.page.records]),v.current=_.page.nextCursor,y(_.page.nextCursor===void 0),s("ready"),!0),[])}}let Fg=0;function XC(){return Fg+=1,`model_list_${Fg}_${Date.now()}`}function $C(t){const[i,r]=j.useState(null),u=j.useRef(null),s=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=XC();u.current=c,t({type:"list-models",requestId:c})},[t]),handleModelListMessage:s}}let Xg=0;function $g(t){return Xg+=1,`${t}_${Xg}_${Date.now()}`}function QC(t){const[i,r]=j.useState("idle"),[u,s]=j.useState(null),[c,f]=j.useState(null),[p,g]=j.useState("idle"),[m,y]=j.useState(null),[x,S]=j.useState(null),[v,N]=j.useState(null),[_,L]=j.useState("idle"),[C,F]=j.useState(null),U=j.useRef(null),$=j.useRef(null),ue=j.useCallback(R=>R.type==="personal_usage_report"||R.type==="personal_usage_report_error"?(U.current!==R.requestId||(s(R.type==="personal_usage_report"?R.report:null),f(R.type==="personal_usage_report_error"?R.message:null),r(R.type==="personal_usage_report"?"ready":"error")),!0):R.type==="usage_report"?(F(R.report),L("ready"),!0):R.type==="stored_session_usage_report"||R.type==="stored_session_usage_report_error"?($.current!==R.requestId||(y(R.type==="stored_session_usage_report"?R.report:null),S(R.sessionId),N(R.type==="stored_session_usage_report_error"?R.message:null),g(R.type==="stored_session_usage_report"?"ready":"error")),!0):(R.type==="protocol_error"&&L(H=>H==="loading"?"error":H),!1),[]);return{personalUsageStatus:i,personalUsageReport:u,personalUsageError:c,requestPersonalUsage:j.useCallback(R=>{const H=$g("personal_usage");U.current=H,r("loading"),f(null),t({type:"get-personal-usage-report",requestId:H,period:R,timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"})},[t]),storedSessionUsageStatus:p,storedSessionUsageReport:m,storedSessionUsageSessionId:x,storedSessionUsageError:v,requestStoredSessionUsage:j.useCallback(R=>{const H=$g("stored_session_usage");$.current=H,g("loading"),y(null),S(R),N(null),t({type:"get-stored-session-usage-report",requestId:H,sessionId:R})},[t]),currentSessionUsageStatus:_,currentSessionUsageReport:C,requestCurrentSessionUsage:j.useCallback(()=>{L("loading"),t({type:"get-usage-report"})},[t]),handleUsageMessage:ue}}let Qg=0;function Dc(t){return Qg+=1,`${t}_${Qg}_${Date.now()}`}function ZC(t){const[i,r]=j.useState("idle"),[u,s]=j.useState(null),[c,f]=j.useState("idle"),[p,g]=j.useState(null),[m,y]=j.useState(null),[x,S]=j.useState("idle"),[v,N]=j.useState(null),_=j.useRef(null),L=j.useRef(null),C=j.useRef(null),F=j.useCallback(U=>U.type==="project_status"?(_.current!==U.requestId||(s(U.result),r("ready")),!0):U.type==="project_diff"?(L.current!==U.requestId||(y(U.result),f("ready")),!0):U.type==="project_memory"?(C.current!==U.requestId||(N(U.result),S("ready")),!0):(U.type==="protocol_error"&&U.requestId!==void 0&&(_.current===U.requestId&&r("error"),L.current===U.requestId&&f("error"),C.current===U.requestId&&S("error")),!1),[]);return{projectStatusState:i,projectStatus:u,requestProjectStatus:j.useCallback(()=>{const U=Dc("project_status");_.current=U,r("loading"),t({type:"project-status",requestId:U})},[t]),projectDiffState:c,projectDiffPath:p,projectDiff:m,requestProjectDiff:j.useCallback(U=>{const $=Dc("project_diff");L.current=$,g(U),f("loading"),y(null),t({type:"project-diff",requestId:$,path:U})},[t]),projectMemoryState:x,projectMemory:v,requestProjectMemory:j.useCallback(()=>{const U=Dc("project_memory");C.current=U,S("loading"),t({type:"project-memory",requestId:U})},[t]),handleProjectMessage:F}}function KC(t){const[i,r]=j.useState([]),u=j.useCallback(()=>{t({type:"get-background-tasks",filter:{kind:"scheduled"}})},[t]),s=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:s,requestSchedules:u}}const Ly=j.createContext(null);function JC({value:t,children:i}){if(!t.identity.displayName||!t.identity.cliName||!t.storage.browserNamespace)throw new Error("A public product identity is required");return d.jsx(Ly.Provider,{value:t,children:i},t.storage.browserNamespace)}function ai(){const t=j.useContext(Ly);if(t===null)throw new Error("ProductIdentityProvider is required");return t}let Zg=0;function Zi(t){return Zg+=1,`${t}_${Zg}_${Date.now()}`}function PC(t){return t.sessions.some(i=>typeof i.live=="boolean")}function Uf(t){return`${t}.restoreSessionId`}function WC(t,i){try{window.sessionStorage.setItem(Uf(t),i)}catch{}}function eE(t){try{return window.sessionStorage.getItem(Uf(t))}catch{return null}}function tE(t){try{window.sessionStorage.removeItem(Uf(t))}catch{}}function nE(){return typeof window>"u"||typeof window.matchMedia!="function"?!0:window.matchMedia("(min-width: 768px)").matches}function lE(t){const{storage:{browserNamespace:i}}=ai(),[r,u]=j.useState(null),[s,c]=j.useState(null),[f,p]=j.useState(nE),g=j.useRef(null),m=j.useRef(!1),y=j.useCallback(()=>{const $=Zi("sessions");g.current=$,t({type:"list-sessions",requestId:$})},[t]),x=j.useRef(null);x.current=r?.currentSessionId??null;const S=j.useCallback($=>{$!==x.current&&t({type:"switch-session",sessionId:$,requestId:Zi("session_change")})},[t,i]),v=j.useCallback(()=>t({type:"new-session",requestId:Zi("session_change")}),[t,i]),N=j.useCallback(($,ue)=>t({type:"rename-session",sessionId:$,name:ue,requestId:Zi("session_rename")}),[t,i]),_=j.useCallback($=>t({type:"delete-session",sessionId:$,requestId:Zi("session_delete")}),[t,i]),L=j.useRef(null),C=j.useRef(null),F=j.useCallback(()=>{C.current=eE(i)??L.current},[i]),U=j.useCallback($=>{const ue=C.current;C.current=null,ue!==null&&(tE(i),ue!==$.currentSessionId&&PC($)&&$.sessions.some(R=>R.id===ue)&&t({type:"switch-session",sessionId:ue,requestId:Zi("session_change")}))},[t,i]);return{sessionListing:r,sessionsError:s,requestSessions:y,switchSession:S,newSession:v,renameSessionInList:N,deleteSession:_,sessionSidebarOpen:f,setSessionSidebarOpen:p,handleSessionsMessage:j.useCallback($=>$.type!=="sessions"&&$.type!=="sessions_error"?!1:$.requestId!==g.current?!0:$.type==="sessions"?(m.current=!1,u($.listing),c(null),U($.listing),!0):(C.current=null,m.current=$.code==="not_available",$.code==="not_available"&&u(null),c({code:$.code,message:$.message}),!0),[U]),canListSessions:j.useCallback(()=>!m.current,[]),markCurrent:j.useCallback($=>{L.current=$,u(ue=>ue===null?ue:{...ue,currentSessionId:$})},[i]),armRestore:F}}let Kg=0;function Jg(t){return Kg+=1,`${t}_${Kg}_${Date.now()}`}function iE(t){const[i,r]=j.useState(!1),[u,s]=j.useState("idle"),[c,f]=j.useState(null),[p,g]=j.useState(null),[m,y]=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),s("ready"),g(null),!0):(g(N.message),s(_=>_==="ready"?"ready":"error"),!0),[]),v=j.useCallback(()=>{s(_=>_==="ready"?"ready":"loading"),g(null);const N=Jg("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),y(N??null),v()},[v]),closeSettings:j.useCallback(()=>{r(!1)},[]),updateSettings:j.useCallback(N=>{const _=Jg("update_settings");x.current=_,g(null),t({type:"update-settings",requestId:_,patch:N})},[t]),handleSettingsMessage:S,refreshSettings:v}}let rE=0;function ht(){return`msg_${++rE}_${Date.now()}`}let Pg=0;function aE(){return Pg+=1,`silent_command_${Pg}_${Date.now()}`}function Uy(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:ht(),text:i}]}function qy(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:ht(),tools:[i]}]}function By(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 Hy(t){return{id:ht(),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 qf(t){return{status:t.isRunning?"running":t.result==="error"||t.result==="denied"?"error":"done",result:t.result,...t.diffLines?{diffLines:t.diffLines}:{},...t.diffFile?{diffFile:t.diffFile}:{},...t.toolResultData!==void 0?{toolResultData:t.toolResultData}:{},...t.toolResultParts?{toolResultParts:t.toolResultParts}:{}}}function uE(t,i){let r=!1;return t.map(u=>{if(r||u.type!=="tools")return u;const s=By(u.tools,i);if(s===-1)return u;r=!0;const c=[...u.tools];return c[s]={...c[s],...qf(i)},{...u,tools:c}})}function Iy(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 s=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)+s,removed:(f?.removed??0)+c,diffLines:u.diffLines})}return[...i.values()]}function sE(t){return{...Hy(t),...qf(t)}}function oE(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 s=Iy(r);s.length>0&&i.push({id:ht(),role:"changed-files",files:s}),r=[]};for(const s of t)s.type==="text"&&s.role==="user"?(u(),i.push({id:ht(),role:"user",content:s.content})):s.type==="text"?r=Uy(r,s.content):r=qy(r,sE(s.tool));return u(),i}function cE(t){const[i,r]=j.useState("disconnected"),[u,s]=j.useState([]),[c,f]=j.useState([]),[p,g]=j.useState(""),[m,y]=j.useState(!1),[x,S]=j.useState(null),[v,N]=j.useState([]),[_,L]=j.useState(null),[C,F]=j.useState(null),[U,$]=j.useState([]),[ue,R]=j.useState(null),H=j.useRef(null),[ie,ee]=j.useState(null),[O,re]=j.useState(null),[te,xe]=j.useState(!1),oe=j.useCallback(()=>xe(!0),[]),P=j.useCallback(()=>xe(!1),[]),D=j.useRef(null),Q=j.useRef(""),ce=j.useRef([]),me=j.useRef([]),E=j.useRef(null),A=j.useRef(null),V=j.useCallback(J=>{ce.current=J(ce.current),f(ce.current)},[]),w=j.useCallback(J=>{s(de=>[...de,J])},[]),se=j.useCallback(J=>{const de=me.current;me.current=[],Q.current="",g(""),y(!1),V(()=>[]);for(const st of de)st.type==="tools"?w({id:st.id,role:"tools",tools:st.tools.map(Tn=>({...Tn,status:J(Tn)}))}):w({id:st.id,role:"assistant",content:st.text});const Ee=Iy(de);Ee.length>0&&w({id:ht(),role:"changed-files",files:Ee})},[w,V]),fe=j.useRef(0),he=j.useRef(new Set),we=j.useRef(0),He=j.useRef(new Set),W=j.useCallback(J=>{if(J.type==="command"){if(J.name==="help"){xe(!0);return}const de=H.current?.commands.find(Ee=>Ee.name===J.name);if(My(de??{name:J.name})){w({id:ht(),role:"command",name:J.name,content:Oy(J.name),tone:"info"});return}fe.current+=1}(J.type==="switch-session"||J.type==="new-session")&&(we.current+=1,J.requestId!==void 0&&He.current.add(J.requestId)),D.current?.send(J)},[w]),je=j.useCallback(J=>{we.current=Math.max(0,we.current-1),J!==void 0&&He.current.delete(J)},[]),Qe=j.useCallback((J,de)=>{const Ee=aE();he.current.add(Ee),W({type:"command",name:J,requestId:Ee,...de?{args:de}:{}})},[W]),{handleUsageMessage:qt,...Nn}=QC(W),{handleExecutionDetailMessage:At,closeExecutionDetail:ln,...Cn}=FC(W),{handleModelListMessage:Un,...ul}=$C(W),{handleProjectMessage:rn,...En}=ZC(W),{handleSessionsMessage:_n,canListSessions:ne,markCurrent:Ye,armRestore:Ue,...an}=lE(W),{requestSessions:G,setSessionSidebarOpen:ae}=an,{handleSettingsMessage:ye,openSettings:_e,refreshSettings:Ge,...zt}=iE(W),un=j.useRef(!1);un.current=zt.settingsOpen;const{handleAgentDefinitionsMessage:St,resolveSwitchResult:ut,openAgentSwitcher:kt,...Ze}=GC(W),{handleSchedulesMessage:bn,requestSchedules:Dt,...Qu}=KC(W),Ll=j.useCallback(J=>{if(YC[J.type],!qt(J)&&!At(J)&&!Un(J)&&!rn(J)&&!_n(J)&&!ye(J)&&!St(J)&&!bn(J))switch(J.type){case"messages":{const de=J.display?oE(J.display):J.messages.flatMap(Ee=>{if(Ee.role!=="user"&&Ee.role!=="assistant")return[];const st=Ee.content??"";return[{id:ht(),role:Ee.role,content:st}]});s(de),J.driverId&&re(J.driverId);break}case"user_message":s(de=>[...de,{id:ht(),role:"user",content:J.content??"",...J.driverId?{author:J.driverId}:{}}]);break;case"text_delta":{const de=Q.current+J.delta;Q.current=de,g(de),me.current=Uy(me.current,J.delta);break}case"thinking":y(J.isThinking);break;case"tool_start":{const{state:de}=J,Ee={...Hy(de),status:"running"};V(st=>[...st,Ee]),me.current=qy(me.current,Ee);break}case"tool_end":{const{state:de}=J;V(Ee=>{const st=By(Ee,de);if(st===-1)return Ee;const Tn=[...Ee];return Tn[st]={...Tn[st],...qf(de)},Tn}),me.current=uE(me.current,de);break}case"execution_workspace_event":S(J.snapshot);break;case"background_task_control_result":J.success||$(de=>[...de,{id:ht(),kind:"background-task-control-failed",message:J.message??`Could not stop ${J.taskId}.`}]);break;case"pending":L(J.pending===null?null:{text:J.pending,count:J.pendingCount??1});break;case"permission_request":case"ask_request":case"prompt_resolved":N(de=>OC(de,J));break;case"ui_intent":{if(Nu(J.event.intent)==="session-sidebar"&&ne()){ae(!0),G(),fe.current>0&&(E.current={name:Jr(J.event.intent),text:null});break}if(Nu(J.event.intent)==="settings"){_e(),fe.current>0&&(E.current={name:Jr(J.event.intent),text:null});break}if(Nu(J.event.intent)==="settings-plugins"){_e("plugins"),fe.current>0&&(E.current={name:Jr(J.event.intent),text:null});break}if(Nu(J.event.intent)==="agent-switcher"){kt(),fe.current>0&&(E.current={name:Jr(J.event.intent),text:null});break}const de={name:Jr(J.event.intent),text:qC(J.event.intent)};fe.current>0?E.current=de:w({id:ht(),role:"command",name:de.name,content:de.text,tone:"info"});break}case"session_renamed":F(J.event.name),G();break;case"session_switched":je(),A.current=null,ee(null),Q.current="",me.current=[],g(""),y(!1),V(()=>[]),s([]),N([]),L(null),F(null),S(null),ln(),Ye(J.event.sessionId),W({type:"get-messages"}),W({type:"get-status"}),W({type:"get-commands"}),W({type:"get-execution-workspace"}),W({type:"get-pending"}),G(),Dt();break;case"history_cleared":Q.current="",me.current=[],g(""),s([]);break;case"error":{const de=J.model??A.current?.model;W({type:"get-status"}),se(Ee=>Ee.status==="running"?"error":Ee.status),$(Ee=>[...Ee,{id:ht(),kind:"session-error",message:J.message,...J.code!==void 0&&{code:J.code},...J.provider!==void 0&&{provider:J.provider},...de!==void 0&&{model:de},...J.retryAfterSeconds!==void 0&&{retryAfterSeconds:J.retryAfterSeconds}}]);break}case"session_change_failed":if(J.requestId!==void 0&&!He.current.has(J.requestId))break;je(J.requestId),$(de=>[...de,{id:ht(),kind:"session-change-refused",message:J.message}]);break;case"session_renamed_in_list":G();break;case"session_rename_failed":$(de=>[...de,{id:ht(),kind:"session-change-refused",message:J.message}]);break;case"session_deleted":G();break;case"session_delete_failed":$(de=>[...de,{id:ht(),kind:"session-change-refused",message:J.message}]);break;case"protocol_error":{if(we.current>0){je(),$(Ee=>[...Ee,{id:ht(),kind:"protocol-error",message:J.message}]);break}fe.current=Math.max(0,fe.current-1);const de=E.current;E.current=null,de!==null&&de.text!==null&&w({id:ht(),role:"command",name:de.name,content:de.text,tone:"info"}),$(Ee=>[...Ee,{id:ht(),kind:"protocol-error",message:J.message}]);break}case"commands":{const de={commands:J.commands,skills:J.skills};H.current=de,R(de);break}case"session_status":A.current=J.status,ee(J.status);break;case"command_result":{W({type:"get-status"}),W({type:"get-commands"}),fe.current=Math.max(0,fe.current-1),J.name==="provider"&&J.success&&un.current&&Ge();const de=J.requestId!==void 0&&he.current.delete(J.requestId);if(ut(J.requestId,J))break;const Ee=E.current;if(E.current=null,Ee!==null&&J.success){Ee.text!==null&&w({id:ht(),role:"command",name:J.name,content:Ee.text,tone:"info"});break}if(J.message.trim().length===0)break;if(de){J.success||$(st=>[...st,{id:ht(),kind:"command-failed",message:J.message}]);break}w({id:ht(),role:"command",name:J.name,content:J.message,tone:J.success?"success":"error"});break}case"complete":case"interrupted":W({type:"get-status"}),W({type:"get-pending"}),G(),se(de=>de.status==="running"?"done":de.status);break}},[w,ne,ln,se,St,At,Un,rn,bn,_n,ye,qt,Ye,kt,_e,Ge,Dt,G,ut,W,ae,je,V]),ui=j.useCallback((J,de)=>{D.current?.send(LC(J,de)),N(Ee=>Ee.filter(st=>st.id!==J))},[]),si=j.useCallback((J,de)=>{D.current?.send(UC(J,de)),N(Ee=>Ee.filter(st=>st.id!==J))},[]),qn=j.useCallback(J=>{$(de=>de.filter(Ee=>Ee.id!==J))},[]);return j.useEffect(()=>{const de=t({onMessage:Ll,onStatusChange:Ee=>{r(Ee),Ee==="connected"&&(fe.current=0,he.current.clear(),we.current=0,He.current.clear(),E.current=null,de.send({type:"get-commands"}),de.send({type:"get-status"}),de.send({type:"get-pending"}),Ue(),G(),Dt())}});return D.current=de,de.connect(),()=>{de.disconnect(),D.current=null}},[t,Ll,G,Dt,Ue]),{status:i,messages:u,activeTools:c,streamingText:p,isThinking:m,executionWorkspace:x,sessionName:C,commandCatalog:ue,sessionStatus:ie,ownDriverId:O,send:W,sendCommandSilently:Qe,pendingPrompts:v,queuedPrompt:_,answerPermission:ui,answerAsk:si,...Nn,...Cn,closeExecutionDetail:ln,...ul,...En,...an,sessionNotices:U,dismissSessionNotice:qn,openSettings:_e,...zt,openAgentSwitcher:kt,...Ze,...Qu,helpOpen:te,openHelp:oe,closeHelp:P}}function fE(t){const[i,r]=j.useState(!1),u=cE(j.useCallback(s=>IC(t,{...s,onGiveUp:()=>r(!0)}),[t]));return j.useEffect(()=>{u.status==="connected"&&r(!1)},[u.status]),{...u,connectionLost:i}}async function dE(t){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(t);return}catch{}if(!hE(t))throw new Error("copy failed")}function hE(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 pE=2e3;function mE(){const[t,i]=j.useState("idle");return j.useEffect(()=>{if(t==="idle")return;const u=setTimeout(()=>i("idle"),pE);return()=>clearTimeout(u)},[t]),{status:t,copy:u=>{dE(u).then(()=>i("copied"),()=>i("error"))}}}function af(t){return t.startsWith("attach:")?"terminal":t==="app"?"desktop-app":t==="browser"?"browser":t==="remote:ws"?"remote":t.startsWith("peer:")?"peer":null}function Yy(t,i){if(t===A0)return!0;if(t===Sx||i===null)return!1;if(t===i)return!0;const r=af(t);return r!==null&&r===af(i)}function gE(t){switch(af(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 Gy(t){return t===Sx?"Automatic — loop":`from ${gE(t)}`}const xE={add:"bg-accent/10 text-foreground",remove:"bg-destructive/10 text-foreground",context:"text-muted-foreground",hunk:"text-subtle"},yE={add:"+ ",remove:"- ",context:" ",hunk:""},Rc=40,Cu=500;function Wg({line:t}){return d.jsx("div",{className:`whitespace-pre ${xE[t.type]}`,children:`${yE[t.type]}${t.text}`})}function Xu({diffLines:t}){const[i,r]=j.useState(!1);if(t.length<=Rc)return d.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)=>d.jsx(Wg,{line:f},p))});const u=t.slice(0,Cu),s=i?u:t.slice(0,Rc),c=Math.min(t.length,Cu)-Rc;return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("pre",{className:"overflow-x-auto rounded-lg bg-sidebar px-3 py-2 font-mono text-[12.5px] leading-relaxed",children:s.map((f,p)=>d.jsx(Wg,{line:f},p))}),i&&t.length>Cu&&d.jsxs("p",{className:"text-[12px] text-subtle",children:[t.length-Cu," more lines not shown"]}),d.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 uf(t){return t==null||typeof t=="boolean"?"":typeof t=="string"||typeof t=="number"?String(t):Array.isArray(t)?t.map(uf).join(""):pf.isValidElement(t)?uf(t.props.children):""}function Vy({label:t,getText:i,className:r=""}){const{status:u,copy:s}=mE(),c=u==="copied"?"Copied":u==="error"?"Couldn't copy":"";return d.jsxs("span",{className:`inline-flex items-center ${r}`,children:[d.jsxs("button",{type:"button",onClick:()=>s(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"?d.jsx(ua,{size:13,strokeWidth:2}):d.jsx(GN,{size:13,strokeWidth:1.9}),d.jsx("span",{children:t})]}),d.jsx("span",{className:"sr-only",role:"status","aria-live":"polite",children:c})]})}function bE({children:t}){const i=uf(t).replace(/\n$/,"");return d.jsxs("div",{className:"group/code relative my-1",children:[d.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}),d.jsx(Vy,{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 vE({children:t}){return d.jsx(aw,{remarkPlugins:[bN],components:{h1:({children:i})=>d.jsx("h1",{className:"mt-6 text-[20px] font-semibold leading-snug tracking-[-0.015em] first:mt-0",children:i}),h2:({children:i})=>d.jsx("h2",{className:"mt-6 text-[17px] font-semibold leading-snug tracking-[-0.01em] first:mt-0",children:i}),h3:({children:i})=>d.jsx("h3",{className:"mt-5 text-[15px] font-semibold leading-snug first:mt-0",children:i}),p:({children:i})=>d.jsx("p",{children:i}),pre:bE,code:({className:i,children:r})=>i?d.jsx("code",{className:`font-mono ${i??""}`,children:r}):d.jsx("code",{className:"rounded-md bg-raised px-1.5 py-0.5 font-mono text-[0.85em]",children:r}),ul:({children:i})=>d.jsx("ul",{className:"ml-5 list-outside list-disc space-y-1.5 marker:text-subtle",children:i}),ol:({children:i})=>d.jsx("ol",{className:"ml-5 list-outside list-decimal space-y-1.5 marker:text-subtle",children:i}),li:({children:i})=>d.jsx("li",{className:"pl-1",children:i}),strong:({children:i})=>d.jsx("strong",{className:"font-semibold",children:i}),em:({children:i})=>d.jsx("em",{className:"italic",children:i}),a:({href:i,children:r})=>d.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})=>d.jsx("div",{className:"overflow-x-auto",children:d.jsx("table",{className:"w-full border-collapse text-[14px]",children:i})}),thead:({children:i})=>d.jsx("thead",{children:i}),th:({children:i})=>d.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})=>d.jsx("td",{className:"px-3 py-2 align-top",children:i}),blockquote:({children:i})=>d.jsx("blockquote",{className:"border-l-2 border-subtle/50 pl-4 text-muted-foreground",children:i}),hr:()=>d.jsx("hr",{className:"mx-auto my-7 w-12 border-subtle/40"})},children:t})}function SE({content:t,author:i,ownDriverId:r}){const u=i&&!Yy(i,r)?Gy(i):void 0;return d.jsxs("div",{className:"flex flex-col items-end gap-1.5 pl-12",children:[u&&d.jsx("span",{className:"px-1 text-[12.5px] text-subtle",children:u}),d.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 ex({content:t,isStreaming:i=!1}){return d.jsxs("div",{className:"group/message gui-prose",children:[d.jsx(vE,{children:t}),i&&d.jsx("span",{className:"ml-1 inline-block h-2.5 w-2.5 animate-pulse rounded-full bg-foreground/70 align-middle"}),!i&&d.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:d.jsx(Vy,{label:"Copy message",getText:()=>t})})]})}function kE({name:t,className:i}){const r=t.toLowerCase(),u={size:15,strokeWidth:1.75,className:i};return/(read|view|cat|open)/u.test(r)?d.jsx(ZN,{...u}):/(grep|glob|search|find|list|ls)/u.test(r)?d.jsx(xC,{...u}):/(edit|write|patch|replace|create)/u.test(r)?d.jsx(_y,{...u}):/(bash|shell|exec|run|command|terminal)/u.test(r)?d.jsx(_C,{...u}):/(web|fetch|http|url|browse)/u.test(r)?d.jsx(tC,{...u}):/(agent|task|delegate)/u.test(r)?d.jsx(zN,{...u}):d.jsx(Dy,{...u})}const wE=52;function Fy(t,i=wE){if(t.length<=i)return t;const r=t.lastIndexOf("/");if(r===-1)return t;const u=t.slice(r+1),s=t.slice(0,r),c=i-u.length-2;return c<=0?`…/${u}`:`…${s.slice(s.length-c)}/${u}`}function jE(t){if(t)try{const i=JSON.parse(t);if(typeof i!="object"||i===null)return{output:t};const r=i;return{structured:t,...typeof r.output=="string"&&r.output?{output:r.output}:{},...typeof r.error=="string"&&r.error?{error:r.error}:{},...typeof r.exitCode=="number"?{exitCode:r.exitCode}:{}}}catch{return{output:t}}}const Mc=20,Oc=500;function Lu({text:t}){const[i,r]=j.useState(!1),u=t.split(`
|
|
308
|
-
`);if(u.length<=Mc)return d.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:t});const s=u.slice(0,Oc);return d.jsxs("div",{className:"flex flex-col gap-1",children:[d.jsx("pre",{className:"whitespace-pre-wrap break-words font-mono text-[12.5px] leading-relaxed text-muted-foreground",children:(i?s:u.slice(0,Mc)).join(`
|
|
309
|
-
`)}),i&&u.length>Oc&&d.jsxs("p",{className:"text-[12px] text-subtle",children:[u.length-Oc," more lines"]}),d.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-Mc} more lines)`})]})}function NE({tool:t}){return d.jsxs("div",{className:"flex flex-col gap-2",children:[t.executionId&&d.jsx("code",{className:"text-[12px] text-subtle",children:t.executionId}),t.toolResultParts?.map((i,r)=>{switch(i.type){case"text":return d.jsx(Lu,{text:i.text},r);case"image_inline":return/^image\/(png|jpeg|gif|webp)$/.test(i.mimeType)?d.jsx("img",{src:`data:${i.mimeType};base64,${i.data}`,alt:`Observation from ${t.name}`,className:"max-h-96 max-w-full object-contain"},r):d.jsxs("p",{children:["Image preview unavailable (",i.mimeType,")."]},r);case"image_uri":return d.jsxs("div",{children:[d.jsx("p",{children:"Image reference; an admitted read is required."}),d.jsx("code",{children:i.uri})]},r);case"resource_link":return d.jsxs("div",{children:[d.jsx("p",{children:i.title??i.name}),d.jsx("code",{children:i.uri}),d.jsx("p",{children:"An admitted read is required."})]},r);case"resource_embedded":return d.jsxs("div",{children:[d.jsx("code",{children:i.uri}),i.text!==void 0?d.jsx(Lu,{text:i.text}):d.jsxs("p",{children:["Embedded binary resource (",i.mimeType??"unknown type","); preview unavailable."]})]},r);case"audio_inline":return d.jsxs("p",{children:["Audio preview unavailable (",i.mimeType,")."]},r)}})]})}function Xy({tool:t}){const i=t.status==="running",r=t.status==="error",[u,s]=j.useState(!1),c=jE(t.toolResultData),f=t.diffLines!==void 0&&t.diffLines.length>0,p=!!c?.output||!!c?.error||!!c?.structured,g=!!t.toolResultParts?.length,m=f||p||g,y=t.commandName?`Ran /${t.commandName}`:t.name;return d.jsxs("div",{className:"flex flex-col text-[14px]",children:[d.jsxs("button",{type:"button",disabled:!m,"aria-expanded":m?u:void 0,onClick:()=>m&&s(x=>!x),className:`group -mx-2 flex min-w-0 items-center gap-2.5 rounded-lg px-2 py-1 text-left ${m?"hover:bg-hover":"cursor-default"}`,children:[d.jsx(kE,{name:t.name,className:`flex-shrink-0 ${r?"text-destructive":"text-subtle"}`}),d.jsx("span",{className:`flex-shrink-0 font-medium ${i?"gui-shimmer":r?"text-destructive":"text-muted-foreground"}`,children:y}),t.displayPath?d.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-subtle",title:t.displayPath,children:Fy(t.displayPath)}):typeof t.input=="string"&&t.input&&d.jsx("span",{className:"min-w-0 truncate font-mono text-[12.5px] text-subtle",children:t.input}),d.jsxs("span",{className:"ml-auto flex flex-shrink-0 items-center gap-1.5 text-[12.5px] text-subtle",children:[i?d.jsx(Mf,{size:14,className:"animate-spin","aria-label":"running"}):r?d.jsx("span",{className:"text-destructive",children:"failed"}):d.jsx(ua,{size:14,"aria-label":"done"}),m&&d.jsx(Vu,{size:13,className:`transition-transform ${u?"rotate-90":""}`})]})]}),u&&m&&d.jsxs("div",{className:"flex flex-col gap-1 pb-1 pl-[25px] pt-0.5",children:[f&&d.jsx(Xu,{diffLines:t.diffLines}),!f&&c?.output&&d.jsx(Lu,{text:c.output}),c?.error&&d.jsx("p",{className:"font-mono text-[12.5px] text-destructive",children:c.error}),typeof c?.exitCode=="number"&&d.jsxs("p",{className:"text-[12px] text-subtle",children:["exit ",c.exitCode]}),c?.structured&&d.jsx(Lu,{text:c.structured}),g&&d.jsx(NE,{tool:t})]})]})}const tx=12,nx=280,CE={success:{dot:"bg-accent",text:"text-foreground/90"},error:{dot:"bg-destructive",text:"text-destructive"},info:{dot:"bg-subtle",text:"text-muted-foreground"}};function EE({entry:t}){const i=t.content.split(`
|
|
310
|
-
`),r=j.useRef(null),[u,s]=j.useState(!1),[c,f]=j.useState(!1);j.useLayoutEffect(()=>{const S=r.current;S&&s(S.scrollHeight>nx)},[t.content]);const p=i.length>tx,g=p||u,m=g&&!c,y=m&&p?i.slice(0,tx).join(`
|
|
311
|
-
`):t.content,x=CE[t.tone];return d.jsxs("div",{"data-testid":"command-output","data-tone":t.tone,className:"overflow-hidden rounded-xl bg-card",children:[d.jsxs("div",{className:"flex items-center gap-2 px-4 pt-3 text-[13px]",children:[d.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${x.dot}`}),d.jsxs("span",{className:"font-mono font-medium text-foreground",children:["/",t.name]})]}),d.jsxs("div",{className:"relative",children:[d.jsx("pre",{ref:r,style:m?{maxHeight:nx}: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:y}),m&&d.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-card to-transparent"})]}),g&&d.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:[d.jsx(Ey,{size:14,className:c?"rotate-180":""}),c?"Show less":`Show all ${i.length} lines`]})]})}function _E({tools:t}){const[i,r]=j.useState(!1),u=t.filter(f=>!f.internal),s=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:d.jsxs("div",{className:"text-[14px]",children:[d.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:[d.jsx(Dy,{size:15,strokeWidth:1.75,className:"flex-shrink-0 text-subtle"}),d.jsxs("span",{className:"flex-shrink-0",children:[u.length," tool ",u.length===1?"call":"calls"]}),d.jsx("span",{className:"min-w-0 truncate text-subtle",children:c}),s>0&&d.jsxs("span",{className:"flex-shrink-0 rounded-md bg-destructive/12 px-1.5 text-[12.5px] text-destructive",children:[s," failed"]}),d.jsx(Vu,{size:14,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`})]}),i&&d.jsx("div",{className:"mt-0.5 flex flex-col pl-[25px]",children:u.map(f=>d.jsx(Xy,{tool:f},f.id))})]})}function TE({files:t}){const[i,r]=j.useState(null);return d.jsxs("div",{className:"flex flex-col gap-0.5 rounded-lg bg-card px-2 py-1.5 text-[13px]",children:[d.jsx("p",{className:"px-1 text-[12px] font-medium text-muted-foreground",children:"Changed files"}),t.map(u=>d.jsxs("div",{className:"flex flex-col",children:[d.jsxs("button",{type:"button","aria-expanded":i===u.path,onClick:()=>r(s=>s===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:[d.jsx("span",{className:"min-w-0 flex-1 break-all font-mono text-[12.5px] text-foreground",title:u.path,children:Fy(u.path)}),d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",u.added]}),d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",u.removed]})]}),i===u.path&&d.jsx("div",{className:"pl-2",children:d.jsx(Xu,{diffLines:u.diffLines})})]},u.path))]})}function AE(){return d.jsx("p",{className:"gui-shimmer w-fit text-[15px] font-medium",children:"Thinking…"})}const zE=80;function DE({messages:t,activeTools:i,streamingText:r,isThinking:u,ownDriverId:s}){const c=j.useRef(null),f=j.useRef(!0),[p,g]=j.useState(!0),[m,y]=j.useState(!1),x=C=>{f.current=C,g(C)};j.useLayoutEffect(()=>{if(f.current){const C=c.current;C&&(C.scrollTop=C.scrollHeight),x(!0),y(!1)}else y(!0)},[t.length,r,u,i.length]);const S=()=>{const C=c.current;if(!C)return;const F=C.scrollHeight-C.scrollTop-C.clientHeight<=zE;x(F),F&&y(!1)},v=()=>{const C=c.current;C&&(C.scrollTop=C.scrollHeight),x(!0),y(!1)},N=t.length===0&&!u&&i.length===0&&!r,_=u||r.length>0||i.some(C=>C.status==="running"),L=!p&&(m||_);return d.jsxs("div",{className:"agent-ui relative flex h-full min-h-0 flex-col",children:[d.jsx("main",{ref:c,onScroll:S,className:"min-h-0 flex-1 overflow-y-auto","aria-label":"Conversation",children:d.jsxs("div",{className:"mx-auto flex w-full max-w-[760px] flex-col gap-6 px-6 pb-6 pt-8",children:[N&&d.jsx("div",{className:"flex h-full items-center justify-center",children:d.jsx("p",{className:"text-[14px] text-subtle",children:"No messages yet"})}),t.map(C=>{switch(C.role){case"user":return d.jsx(SE,{content:C.content,author:C.author,ownDriverId:s},C.id);case"assistant":return d.jsx(ex,{content:C.content},C.id);case"command":return d.jsx(EE,{entry:C},C.id);case"tools":return d.jsx(_E,{tools:C.tools},C.id);case"changed-files":return d.jsx(TE,{files:C.files},C.id)}}),u&&!r&&d.jsx(AE,{}),i.some(C=>!C.internal)&&d.jsx("div",{className:"flex flex-col",children:i.filter(C=>!C.internal).map(C=>d.jsx(Xy,{tool:C},C.id))}),r&&d.jsx(ex,{content:r,isStreaming:!0})]})}),L&&d.jsx("div",{className:"pointer-events-none absolute inset-x-0 bottom-4 flex justify-center",children:d.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:[d.jsx(EN,{size:14,strokeWidth:2.25}),"Jump to latest"]})})]})}const lx='a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])';let Pr=[];function sa({open:t,onClose:i,title:r,children:u,destructive:s=!1,panelClassName:c,describedById:f,restoreFocusTo:p,role:g="dialog"}){const m=j.useRef(null),y=j.useRef(null),x=j.useId(),S=j.useRef(Symbol("dialog"));return j.useEffect(()=>{if(!t)return;y.current=p??document.activeElement;const v=m.current;return(v?.querySelector(lx)??v)?.focus(),()=>{y.current?.focus?.()}},[t]),j.useEffect(()=>{if(!t)return;const v=S.current;return Pr.push(v),()=>{Pr=Pr.filter(N=>N!==v)}},[t]),j.useEffect(()=>{if(!t)return;const v=S.current,N=()=>Pr[Pr.length-1]===v,_=L=>{if(!N())return;if(L.key==="Escape"){L.stopImmediatePropagation(),i();return}if(L.key!=="Tab")return;const C=m.current;if(!C)return;const F=Array.from(C.querySelectorAll(lx));if(F.length===0)return;const U=F[0],$=F[F.length-1];L.shiftKey&&document.activeElement===U?(L.preventDefault(),$?.focus()):!L.shiftKey&&document.activeElement===$&&(L.preventDefault(),U?.focus())};return document.addEventListener("keydown",_,!0),()=>document.removeEventListener("keydown",_,!0)},[t,i]),t?d.jsx("div",{className:"agent-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",onMouseDown:v=>{s||v.target===v.currentTarget&&i()},children:d.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:[d.jsx("h2",{id:x,className:"sr-only",children:r}),u]})}):null}const Bf="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",RE=`${Bf} bg-primary text-primary-foreground hover:opacity-90`,ME=`${Bf} bg-raised text-foreground hover:bg-hover`,OE=`${Bf} bg-destructive text-destructive-foreground hover:opacity-90`;function Ml({open:t,title:i,body:r,confirmLabel:u,cancelLabel:s="Cancel",destructive:c=!1,onConfirm:f,onCancel:p,restoreFocusTo:g}){const m=j.useId();return d.jsxs(sa,{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:[d.jsx("p",{className:"text-[15px] font-medium text-foreground",children:i}),d.jsx("p",{id:m,className:"mt-2 text-[13.5px] text-muted-foreground",children:r}),d.jsxs("div",{className:"mt-5 flex justify-end gap-2",children:[d.jsx("button",{type:"button",className:ME,onClick:p,children:s}),d.jsx("button",{type:"button",className:c?OE:RE,onClick:f,children:u})]})]})}const LE={satisfied:"Satisfied","max-iterations":"Stopped — reached the iteration limit",cancelled:"Cancelled","no-progress":"Stopped — no progress"};function UE(t){return t.status==="active"?"Active":t.status==="satisfied"?"Satisfied":t.stopReason?LE[t.stopReason]:"Stopped"}const $y=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];function qE(t){return t.toLocaleTimeString("en-US",{hour:"numeric",minute:"2-digit"})}function ix(t,i){return t.getFullYear()===i.getFullYear()&&t.getMonth()===i.getMonth()&&t.getDate()===i.getDate()}function BE(t,i=new Date){const r=new Date(t);if(Number.isNaN(r.getTime()))return"Unknown";const u=qE(r);if(ix(r,i))return`Today ${u}`;const s=new Date(i);if(s.setDate(i.getDate()+1),ix(r,s))return`Tomorrow ${u}`;const c=new Date(i);return c.setDate(i.getDate()+6),r.getTime()>i.getTime()&&r.getTime()<=c.getTime()?`${$y[r.getDay()]} ${u}`:`${r.toLocaleDateString("en-US",{month:"short",day:"numeric"})} ${u}`}function HE(t){const i=t.trim().split(/\s+/);if(i.length!==5)return;const[r,u,s,c,f]=i;if(s!=="*"||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=$y[Number(f)];return g?`Every ${g} at ${p}`:void 0}}function IE(t,i=new Date){if(t.nextFireAt)return BE(t.nextFireAt,i);const r=t.schedule?.cronExpression;return r?HE(r)??"Repeats":"—"}function Qy(t){return t.schedule?.agentInstruction??t.label}const YE={sleeping:"Active",paused:"Paused",running:"Running",queued:"Queued",cancelled:"Deleted",failed:"Failed",completed:"Done",waiting_permission:"Needs you"};function GE(t){return YE[t.status]??t.status}function Zy(t,i){return t==="completed"&&(i??0)>0}function VE(t){return Ky(t.status,t.attention,t.deniedToolCalls)}function Ky(t,i,r){return i==="permission"||t==="waiting_permission"?{label:"Needs you",tone:"warning"}:i==="failed"||t==="failed"?{label:"Failed",tone:"destructive"}:Zy(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 FE({tasks:t,schedules:i=[],goal:r=null,onPauseSchedule:u,onResumeSchedule:s,onDeleteSchedule:c,onCancelGoal:f,className:p,onSelect:g,onReturnToConversation:m,onStop:y,selectedEntryId:x}){const S=t.filter(C=>C.status==="running").length,v=i.filter(C=>C.status!=="cancelled"),[N,_]=j.useState(null),L=v.find(C=>C.id===N)??null;return d.jsxs("div",{className:`agent-ui flex flex-col overflow-hidden ${p??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[d.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Agents"}),S>0&&d.jsxs("span",{className:"ml-auto text-[13px] tabular-nums text-subtle",children:[S," running"]})]}),d.jsxs("div",{className:"flex-1 space-y-4 overflow-y-auto px-3 pb-3",children:[t.length>0&&d.jsx("div",{className:"space-y-2",children:t.map(C=>d.jsx(XE,{entry:C,selected:C.id===x,onOpen:C.kind==="main_thread"?m:g&&(()=>g(C)),onStop:y&&C.controls?.includes("cancel")?()=>y(C):void 0},C.id))}),v.length>0&&d.jsxs("div",{children:[d.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Scheduled"}),d.jsx("div",{className:"space-y-2",children:v.map(C=>d.jsx($E,{task:C,onPause:u,onResume:s,onRequestDelete:()=>_(C.id)},C.id))})]}),r&&d.jsxs("div",{children:[d.jsx("p",{className:"px-0.5 pb-1.5 text-[12px] font-medium uppercase tracking-wide text-subtle",children:"Goal"}),d.jsx(QE,{goal:r,onCancel:f})]})]}),d.jsx(Ml,{open:L!==null,title:"Delete this schedule?",body:L?`"${Qy(L)}" will stop running. This cannot be undone.`:"",confirmLabel:"Delete",destructive:!0,onConfirm:()=>{L&&c?.(L.id),_(null)},onCancel:()=>_(null)})]})}function XE({entry:t,selected:i,onOpen:r,onStop:u}){const s=t.attention==="permission"||t.status==="waiting_permission",c=t.attention==="failed"||t.status==="failed";return d.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 ${s?"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:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(ZE,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),d.jsx(JE,{status:t.status,attention:t.attention,deniedToolCalls:t.deniedToolCalls}),u&&d.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&&d.jsx("p",{className:"mt-1.5 truncate pl-[26px] text-[13px] leading-snug text-muted-foreground",children:t.currentAction}),t.preview&&d.jsx("p",{className:"mt-1 truncate pl-[26px] font-mono text-[12px] leading-snug text-subtle",children:t.preview})]})}function $E({task:t,onPause:i,onResume:r,onRequestDelete:u}){const s=t.status==="paused";return d.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[d.jsx("p",{className:"truncate text-[14px] font-medium text-foreground",children:Qy(t)}),d.jsxs("p",{className:"mt-1 text-[13px] text-muted-foreground",children:[IE(t)," · ",GE(t)]}),d.jsxs("div",{className:"mt-2 flex items-center gap-3",children:[s?d.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:[d.jsx(pC,{size:11,fill:"currentColor","aria-hidden":"true"}),"Resume"]}):d.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:[d.jsx(fC,{size:11,fill:"currentColor","aria-hidden":"true"}),"Pause"]}),d.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 QE({goal:t,onCancel:i}){return d.jsxs("div",{className:"rounded-xl bg-card px-3.5 py-3",children:[d.jsxs("div",{className:"flex items-center gap-2.5",children:[d.jsx(zy,{size:16,strokeWidth:1.9,className:"flex-shrink-0 text-accent"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.objective})]}),d.jsx("p",{className:"mt-1.5 pl-[26px] text-[13px] text-muted-foreground",children:UE(t)}),t.status==="active"&&d.jsx("div",{className:"mt-2 pl-[26px]",children:d.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:[d.jsx(Fu,{size:11,fill:"currentColor","aria-hidden":"true"}),"Cancel goal"]})})]})}function ZE({status:t,attention:i,deniedToolCalls:r}){const u={size:16,strokeWidth:1.9,className:"flex-shrink-0"};return i==="permission"||t==="waiting_permission"?d.jsx(rf,{...u,className:`${u.className} text-warning`}):i==="failed"||t==="failed"?d.jsx(Hg,{...u,className:`${u.className} text-destructive`}):Zy(t,r)?d.jsx(rf,{...u,className:`${u.className} text-warning`}):t==="running"?d.jsx(Mf,{...u,className:`${u.className} animate-spin text-muted-foreground`}):t==="completed"?d.jsx(qN,{...u,className:`${u.className} text-success`}):t==="cancelled"?d.jsx(Hg,{...u,className:`${u.className} text-subtle`}):d.jsx(HN,{...u,className:`${u.className} text-subtle`})}const KE={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"text-subtle"};function JE({attention:t,status:i,deniedToolCalls:r}){const u=Ky(i,t,r);return!u||u.label==="Running"?null:d.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${KE[u.tone]}`,children:u.label})}function PE({state:t}){if(!t.agentSwitcherOpen)return null;const i=t.agentSwitcherStatus==="loading"&&t.agentDefinitions.length===0;return d.jsxs(sa,{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:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Switch agent"}),d.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:d.jsx(er,{size:17,strokeWidth:1.75})})]}),t.agentSwitchMessage?d.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,d.jsx("ul",{className:"min-h-0 flex-1 overflow-y-auto p-2",children:i?d.jsx("li",{className:"px-3 py-4 text-[13.5px] text-muted-foreground",children:"Loading agents…"}):t.agentDefinitions.length===0?d.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 d.jsx("li",{children:d.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:[d.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:u?d.jsx(ua,{size:16,strokeWidth:2,className:"text-accent"}):null}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate text-[14px] font-medium text-foreground",children:r.name}),d.jsx("span",{className:"block truncate text-[13px] text-muted-foreground",children:r.description}),d.jsx("span",{className:"block truncate text-[12px] text-subtle",children:r.definedIn})]})]})},r.name)})})]})}function WE(t){return t!==null&&t.matches("input, textarea, select, [contenteditable]")}function sf(t,i){return t==="provider-profile-action"&&i==="delete"}function e_(t){const i=t.maxSelect??1;if(i<=1)return;const r=(t.options??[]).filter(c=>!sf(t.id,c.value)),u=new Set(t.default?.values??[]),s=r.filter(c=>u.has(c.value)).slice(0,i);return{min:t.minSelect??1,max:i,options:r,defaults:new Set(s.map(c=>c.value))}}function Lc({prompts:t,onAnswerPermission:i,onAnswerAsk:r,ownDriverId:u=null,layout:s="modal",armDelayMs:c=450,onFocusReturn:f}){const p=t[0],g=p?.id,m=j.useRef(null),y=j.useRef(null),x=p?.kind==="ask"&&p.request.allowFreeText===!0,[S,v]=j.useState(void 0),[N,_]=j.useState(!1),[L,C]=j.useState(!1),F=j.useRef(null),U=j.useRef(!1),[$,ue]=j.useState(void 0);j.useEffect(()=>{if(g===void 0||c<=0)return;const W=setTimeout(()=>v(g),c);return()=>clearTimeout(W)},[g,c]);const R=g!==void 0&&(c<=0||S===g);if(j.useLayoutEffect(()=>{const W=m.current;if(!W)return;const je=document.activeElement,Qe=!!(je&&je!==W&&W.contains(je)),qt=U.current&&je===document.body;(Qe||qt)&&W.focus()},[g]),j.useEffect(()=>{R&&(WE(document.activeElement)||(x?y.current:m.current)?.focus())},[R,g,x]),j.useEffect(()=>{if(g!==void 0){U.current=!1;return}_(!1),U.current&&(U.current=!1,f?.())},[g,f]),!p)return null;if(p.kind==="ask"&&p.request.id==="provider-delete")return d.jsx(Ml,{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 H=p.requesterDriverId&&!Yy(p.requesterDriverId,u)?Gy(p.requesterDriverId):void 0,ie=s==="dock",ee=()=>{const W=m.current,je=document.activeElement;U.current=!!(W&&je&&W.contains(je))},O=(W,je)=>{ee(),i(W,je)},re=(W,je)=>{ee(),F.current?.clear(),r(W,je)},te=p.kind==="ask"?e_(p.request):void 0,xe=$?.promptId===p.id?$.values:te?.defaults,oe=te&&xe?te.options.map(W=>W.value).filter(W=>xe.has(W)):[],P=te!==void 0&&oe.length>=te.min,D=W=>{te&&ue(je=>{const Qe=new Set(je?.promptId===p.id?je.values:te.defaults);return Qe.has(W)?Qe.delete(W):Qe.size<te.max&&Qe.add(W),{promptId:p.id,values:Qe}})},Q=()=>{P&&re(p.id,{type:"answer",values:oe})},ce=W=>{x&&(W.target.closest("button, input")||y.current?.focus())},me=W=>je=>{!R&&je.detail===0||W()},E=W=>{if(W.key==="Escape"){W.preventDefault(),p.kind==="permission"?O(p.id,!1):re(p.id,{type:"cancelled"});return}if(!R)return;if(te&&W.key==="Enter"){W.target===W.currentTarget&&(W.preventDefault(),Q());return}const je=Number(W.key)-1;if(!Number.isInteger(je)||je<0)return;if(p.kind==="permission"){je<2&&O(p.id,je===0);return}const Qe=(p.request.options??[]).filter(qt=>!sf(p.request.id,qt.value))[je];Qe&&(te?D(Qe.value):re(p.id,{type:"answer",values:[Qe.value]}))},A=p.kind==="permission"&&(p.diffLines?.length??0)>0,V=p.kind==="permission"&&typeof p.toolArgs.command=="string"?p.toolArgs.command:void 0,w=p.kind==="permission"&&p.toolName==="Bash"&&V!==void 0,se=p.kind==="ask"?p.request.id:void 0,fe=p.kind==="ask"?p.request.options??[]:[],he=fe.find(W=>sf(se,W.value)),we=he?fe.filter(W=>W!==he):fe,He=x&&L?"Enter to submit · Esc to cancel":te&&fe.length>0?"1–9 toggle · Enter submit · Esc cancel":fe.length>0?"1–9 choose · Esc cancel":"Esc cancels";return d.jsx("div",{className:ie?"agent-ui gui-rise flex-shrink-0":"agent-ui fixed inset-0 z-50 flex items-center justify-center bg-black/55 p-4 backdrop-blur-[2px]",children:d.jsx("div",{ref:m,tabIndex:ie?0:-1,onKeyDown:ie?E:void 0,onClick:ce,onFocus:()=>_(!0),onBlur:W=>{W.currentTarget.contains(W.relatedTarget)||_(!1)},role:"dialog","aria-label":"pending question","data-armed":ie?String(R):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 ${ie?"p-4":"max-w-lg p-5"}`,children:p.kind==="permission"?d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.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:d.jsx(rf,{size:17,strokeWidth:1.9})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsxs("p",{className:"text-[13px] text-muted-foreground",children:["Permission request",H&&d.jsxs(d.Fragment,{children:[" ","· ",d.jsx("span",{className:"text-foreground",children:H})]})]}),p.requester?.kind==="background-agent"?d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Background agent ",d.jsx("span",{className:"font-semibold",children:p.requester.label})," ","wants to"," ",A?d.jsxs(d.Fragment,{children:[p.toolName.toLowerCase()," ",d.jsx("span",{className:"font-mono font-semibold",children:p.diffFile})]}):d.jsxs(d.Fragment,{children:["run ",d.jsx("span",{className:"font-semibold",children:p.toolName})]})]}):A?d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:[p.toolName," ",d.jsx("span",{className:"font-mono font-semibold",children:p.diffFile})]}):d.jsxs("p",{className:"mt-0.5 text-[15px] font-medium text-foreground",children:["Allow ",d.jsx("span",{className:"font-semibold",children:p.toolName})," to run?"]}),A?d.jsx("div",{className:"mt-2.5",children:d.jsx(Xu,{diffLines:p.diffLines})}):w?d.jsx(r_,{command:V,cwd:p.cwd}):d.jsx(i_,{args:p.toolArgs})]})]}),d.jsxs("div",{className:"mt-4 flex flex-wrap items-center gap-2 pl-11",children:[d.jsxs("button",{type:"button","aria-keyshortcuts":ie?"1":void 0,className:Tu,onClick:me(()=>O(p.id,!0)),children:[d.jsx("span",{children:"Allow"}),ie&&d.jsx(Uc,{children:"1"})]}),d.jsxs("button",{type:"button","aria-keyshortcuts":ie?"2":void 0,className:rx,onClick:me(()=>O(p.id,!1)),children:[d.jsx("span",{children:"Deny"}),ie&&d.jsx(Uc,{children:"2"})]}),ie&&d.jsx(ax,{hasFocus:N,armed:R,armedText:"1 allow · 2 deny · Esc deny"})]})]}):d.jsxs(d.Fragment,{children:[d.jsxs("div",{className:"flex items-start gap-3",children:[d.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:d.jsx(iC,{size:17,strokeWidth:1.9})}),d.jsxs("div",{className:"min-w-0 flex-1",children:[H&&d.jsx("p",{className:"text-[13px] text-muted-foreground",children:d.jsx("span",{className:"text-foreground",children:H})}),d.jsx("p",{className:"text-[15px] font-medium text-foreground",children:p.request.title}),p.request.description?d.jsx("p",{className:"mt-1 leading-relaxed text-muted-foreground",children:p.request.description}):null]})]}),d.jsxs("div",{className:"mt-4 flex flex-col gap-3 pl-11",children:[we.length>0&&d.jsx("div",{className:"flex flex-wrap items-start gap-3",children:we.map((W,je)=>d.jsxs("div",{className:"flex flex-col items-start gap-0.5",children:[d.jsxs("button",{type:"button","aria-keyshortcuts":ie&&je<9?String(je+1):void 0,"aria-pressed":te?oe.includes(W.value):void 0,className:(te?oe.includes(W.value):je===0)?Tu:rx,onClick:me(()=>te?D(W.value):re(p.id,{type:"answer",values:[W.value]})),children:[te&&(oe.includes(W.value)?d.jsx(NC,{size:15,strokeWidth:2}):d.jsx(Fu,{size:15,strokeWidth:2})),d.jsx("span",{children:W.label}),ie&&je<9&&d.jsx(Uc,{children:je+1})]}),W.description&&d.jsx("p",{className:"pl-0.5 text-[11.5px] leading-snug text-subtle",children:W.description})]},W.value))}),he&&d.jsx("div",{className:"flex flex-wrap items-start gap-3",children:d.jsx("button",{type:"button",className:n_,onClick:me(()=>re(p.id,{type:"answer",values:[he.value]})),children:d.jsx("span",{children:he.label})})}),x&&d.jsxs("div",{className:"flex flex-col gap-1.5",children:[fe.length>0&&d.jsx("p",{className:"text-[12.5px] text-subtle",children:"or type an answer"}),d.jsx(l_,{ref:F,inputRef:y,masked:p.request.masked===!0,placeholder:p.request.placeholder,allowEmpty:p.request.allowEmpty===!0,wrapClick:me,onSubmit:W=>re(p.id,{type:"answer",values:[],text:W}),onCancel:()=>re(p.id,{type:"cancelled"}),onFocusChange:C},p.id)]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[te&&d.jsx("button",{type:"button",className:`${Tu} disabled:opacity-60`,disabled:!P,onClick:me(Q),children:P?"Submit":`Submit (min ${te.min})`}),d.jsx("button",{type:"button",className:t_,onClick:me(()=>re(p.id,{type:"cancelled"})),children:"Cancel"}),ie&&d.jsx(ax,{hasFocus:N,armed:R,armedText:He})]})]})]})})})}const $u="inline-flex items-center gap-2 rounded-lg px-3.5 py-1.5 text-[14px] font-medium transition-colors",Tu=`${$u} bg-primary text-primary-foreground hover:opacity-90`,rx=`${$u} bg-raised text-foreground hover:bg-hover`,t_=`${$u} text-muted-foreground hover:bg-hover hover:text-foreground`,n_=`${$u} bg-destructive/12 text-destructive hover:bg-destructive/20`,l_=j.forwardRef(function({masked:i,placeholder:r,allowEmpty:u,inputRef:s,wrapClick:c,onSubmit:f,onCancel:p,onFocusChange:g},m){const[y,x]=j.useState("");j.useImperativeHandle(m,()=>({clear:()=>x("")}),[]);const S=()=>{const _=y.trim();!_&&!u||(x(""),f(_))},v=()=>{x(""),p()},N=_=>{if(_.stopPropagation(),_.key==="Enter"){if(_.nativeEvent.isComposing||_.keyCode===229)return;_.preventDefault(),S()}else _.key==="Escape"&&(_.preventDefault(),v())};return d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx("input",{ref:s,type:i?"password":"text",autoComplete:"off","aria-label":"answer",placeholder:r,value:y,onChange:_=>x(_.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"}),d.jsx("button",{type:"button",className:Tu,disabled:!y.trim()&&!u,onClick:c(S),children:"Continue"})]})});function Uc({children:t}){return d.jsx("kbd",{"aria-hidden":"true",className:"rounded bg-foreground/10 px-1 font-mono text-[11px] leading-[1.45] opacity-70",children:t})}function ax({hasFocus:t,armed:i,armedText:r}){return d.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 i_({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),s=c=>typeof c=="string"?c:JSON.stringify(c,null,2);return d.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?d.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t[r]}):null,u.length>0?d.jsx("dl",{className:`text-muted-foreground ${r?"mt-1.5":""}`,children:u.map(([c,f])=>d.jsxs("div",{className:"flex gap-2",children:[d.jsxs("dt",{className:"flex-shrink-0 text-subtle",children:[c,":"]}),d.jsx("dd",{className:"min-w-0 whitespace-pre-wrap break-all",children:s(f)})]},c))}):null]})}function r_({command:t,cwd:i}){return d.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:[d.jsx("pre",{className:"whitespace-pre-wrap break-all text-foreground",children:t}),i&&d.jsxs("p",{className:"mt-1.5 text-muted-foreground",children:[d.jsx("span",{className:"text-subtle",children:"in "}),i]})]})}const of=6e4,cf=60*of,qc=24*cf;function a_(t,i=Date.now()){const r=Date.parse(t);if(Number.isNaN(r))return"";const u=Math.max(0,i-r);return u<of?"just now":u<cf?`${Math.floor(u/of)}m ago`:u<qc?`${Math.floor(u/cf)}h ago`:u<7*qc?`${Math.floor(u/qc)}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 u_(t,i){if(t.clients===void 0)return null;const r=t.clients-(i?1:0);return r>=1?r:null}function s_({state:t,brand:i,className:r}){const u=t.sessionListing??null,s=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),[y,x]=j.useState(null),[S,v]=j.useState(""),[N,_]=j.useState(null),L=j.useRef(null),C=j.useRef(new Map);j.useEffect(()=>{if(g===null)return;const H=ee=>{ee.key==="Escape"&&m(null)},ie=ee=>{L.current&&!L.current.contains(ee.target)&&m(null)};return document.addEventListener("keydown",H),document.addEventListener("mousedown",ie),()=>{document.removeEventListener("keydown",H),document.removeEventListener("mousedown",ie)}},[g]),j.useEffect(()=>{g!==null&&L.current?.querySelector('[role="menuitem"]')?.focus()},[g]);const F=(H,ie,ee)=>m({sessionId:H,x:ie,y:ee}),U=H=>{m(null),x(H.id),v(On(H))},$=H=>{const ie=S.trim();x(null),!(ie.length===0||ie===On(H))&&(H.id===s?t.send({type:"command",name:"rename",args:ie}):t.renameSessionInList?.(H.id,ie))},ue=u?.sessions??[],R=ue.find(H=>H.id===N)??null;return d.jsxs("aside",{"aria-label":"Sessions",className:`agent-ui flex w-[272px] flex-shrink-0 flex-col overflow-hidden bg-sidebar ${r??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[i,d.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:d.jsx(aC,{size:17,strokeWidth:1.75})})]}),d.jsx("div",{className:"flex-shrink-0 px-2.5 pt-1",children:d.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:[d.jsx(Ay,{size:16,strokeWidth:1.75,className:"text-muted-foreground"}),"New session"]})}),d.jsxs("div",{className:"flex-1 overflow-y-auto px-2.5 pb-3 pt-4",children:[d.jsx("h2",{className:"px-2.5 pb-1.5 text-[12.5px] font-medium text-subtle",children:"Sessions"}),f!==null?d.jsx("p",{className:"px-2.5 py-1 text-[13px] leading-snug text-destructive",children:f}):null,u===null&&f===null?d.jsx("p",{className:"px-2.5 py-1 text-[13px] text-subtle",children:"Loading sessions…"}):null,d.jsxs("ul",{className:"space-y-px",children:[ue.map(H=>{const ie=H.id===s,ee=u_(H,ie),O=y===H.id,re=[H.live===!0?"Live":null,ee!==null?`${ee} ${ee===1?"other":"others"}`:null].filter(P=>P!==null),te=`session-status-${H.id}`,xe=`session-updated-${H.id}`,oe=re.length>0?`${xe} ${te}`:xe;return d.jsxs("li",{className:"group relative",children:[O?d.jsx("input",{autoFocus:!0,"aria-label":`Rename ${On(H)}`,value:S,onChange:P=>v(P.target.value),onBlur:()=>$(H),onKeyDown:P=>{P.key==="Enter"?(P.preventDefault(),$(H)):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"}):d.jsxs("button",{type:"button","aria-current":ie?"true":void 0,"aria-label":On(H),"aria-describedby":oe,title:p?H.preview||H.id:"Reconnecting…",disabled:!p,onClick:()=>{ie||t.switchSession?.(H.id)},onContextMenu:P=>{P.preventDefault(),F(H.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 ${ie?"bg-raised":"hover:bg-hover"}`,children:[d.jsx("span",{className:`block truncate text-[14px] leading-snug ${ie?"font-medium text-foreground":"text-foreground/85"}`,children:On(H)}),d.jsxs("span",{className:"mt-0.5 flex items-center gap-1.5 text-[12.5px] tabular-nums text-subtle",children:[H.live===!0?d.jsx("span",{title:"Live in the host",className:"h-1.5 w-1.5 flex-shrink-0 rounded-full bg-accent",children:d.jsx("span",{className:"sr-only",children:"live"})}):null,d.jsx("span",{id:xe,children:a_(H.updatedAt)}),ee!==null?d.jsxs(d.Fragment,{children:[d.jsx("span",{"aria-hidden":"true",children:"·"}),d.jsxs("span",{className:"text-muted-foreground",children:[ee," ",ee===1?"other":"others"]})]}):null,re.length>0?d.jsx("span",{id:te,className:"sr-only",children:re.join(", ")}):null]})]}),O?null:d.jsx("button",{type:"button",ref:P=>{P?C.current.set(H.id,P):C.current.delete(H.id)},"aria-label":`More for ${On(H)}`,"aria-haspopup":"menu","aria-expanded":g?.sessionId===H.id,onClick:P=>{const D=P.currentTarget.getBoundingClientRect();F(H.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:d.jsx(FN,{size:15,strokeWidth:1.75})})]},H.id)}),c.length>0&&d.jsx("li",{children:d.jsxs("details",{className:"px-2.5 py-2 text-[12.5px] text-subtle",children:[d.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"]}),d.jsx("ul",{className:"mt-1.5 space-y-0.5 font-mono text-[11.5px]",children:c.map(H=>d.jsx("li",{className:"truncate",children:H},H))})]})})]})]}),d.jsx("div",{className:"flex-shrink-0 border-t border-border/60 px-2.5 py-2",children:d.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:[d.jsx(Ty,{size:16,strokeWidth:1.75}),"Settings"]})}),g!==null?(()=>{const H=ue.find(ie=>ie.id===g.sessionId);return H?d.jsxs("div",{ref:L,role:"menu","aria-label":`Actions for ${On(H)}`,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:[d.jsxs("button",{type:"button",role:"menuitem",onClick:()=>U(H),className:"flex w-full items-center gap-2 px-3 py-1.5 text-left text-[13.5px] hover:bg-hover",children:[d.jsx(_y,{size:14,strokeWidth:1.75}),"Rename"]}),d.jsxs("button",{type:"button",role:"menuitem",onClick:()=>{m(null),_(H.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:[d.jsx(Lf,{size:14,strokeWidth:1.75}),"Delete…"]})]}):null})():null,R!==null?d.jsx(Ml,{open:!0,title:`Delete "${On(R)}"?`,body:"This removes its conversation from this computer.",confirmLabel:"Delete",destructive:!0,restoreFocusTo:C.current.get(R.id)??null,onCancel:()=>_(null),onConfirm:()=>{t.deleteSession?.(R.id),_(null)}}):null]})}function o_({state:t}){const i=t.status==="connected";return d.jsxs("div",{className:"flex w-12 flex-shrink-0 flex-col items-center gap-1 bg-sidebar py-2.5",children:[d.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:d.jsx(sC,{size:17,strokeWidth:1.75})}),d.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:d.jsx(Ay,{size:16,strokeWidth:1.75})}),d.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:d.jsx(Ty,{size:16,strokeWidth:1.75})})]})}const rl=new Intl.NumberFormat("en-US"),c_=100,f_=["model","provider","surface","source"];function d_(t){return t==="activity"?"Activity":`By ${t}`}function h_(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 p_(t){return t.length===1&&t[0]?.key==="unknown"}function m_(t){return[...f_.filter(i=>!p_(Py(t,i))),"activity"]}const g_=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"});function Jy(t,i,r){const u=t.sessionListing?.sessions.find(f=>f.id===r);if(u)return On(u);const s=i.sessionFirstSeen?.[r],c=s?new Date(s):void 0;return c&&!Number.isNaN(c.getTime())?`Session from ${g_.format(c)}`:"Another session"}function ti({label:t,value:i,note:r}){return d.jsxs("div",{className:"rounded-2xl bg-card p-5",children:[d.jsxs("div",{className:"flex items-baseline gap-1.5 text-[13px] text-muted-foreground",children:[t,r?d.jsxs("span",{className:"text-subtle",children:["· ",r]}):null]}),d.jsx("div",{className:"mt-1.5 text-[28px] font-semibold tabular-nums tracking-[-0.02em] text-foreground",children:i})]})}function Py(t,i){return i==="model"?t.byModel:i==="provider"?t.byProvider:i==="surface"?t.bySurface:i==="source"?t.bySource:[]}function x_({state:t,report:i,breakdown:r,setBreakdown:u}){const s=m_(i),c=s.includes(r)?r:s[0]??r;return d.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[d.jsx(y_,{breakdown:c,setBreakdown:u,visible:s}),d.jsx("div",{className:"mt-4 space-y-3",children:c==="activity"?d.jsx(b_,{report:i}):d.jsx(v_,{state:t,report:i,breakdown:c,dimensions:Py(i,c)})})]})}function y_({breakdown:t,setBreakdown:i,visible:r}){return d.jsxs("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Breakdown"}),d.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(u=>d.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:d_(u)},u))})]})}function b_({report:t}){return d.jsx(d.Fragment,{children:t.byActivity.map(i=>d.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl bg-raised/60 px-3.5 py-2.5",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{className:"truncate text-[14px] text-foreground",children:i.label})," ",d.jsx("span",{className:"ml-1 rounded-full bg-raised px-2 py-0.5 text-[11px] font-medium text-subtle",children:i.kind})]}),d.jsxs("span",{className:"text-[13px] tabular-nums text-muted-foreground",children:[rl.format(i.count)," calls"]})]},i.key))})}function v_({state:t,report:i,breakdown:r,dimensions:u}){return d.jsx(d.Fragment,{children:u.map(s=>d.jsxs("div",{className:"grid grid-cols-[minmax(0,1fr)_auto] gap-3",children:[d.jsx(S_,{report:i,breakdown:r,dimension:s}),d.jsxs("span",{className:"self-start text-[13px] tabular-nums text-subtle",children:[rl.format(s.turns)," turns"]}),d.jsx(k_,{state:t,report:i,dimension:s})]},s.key))})}function S_({report:t,breakdown:i,dimension:r}){const u=t.totals.totalTokens===0?0:r.totalTokens/t.totals.totalTokens*c_;return d.jsxs("div",{className:"min-w-0",children:[d.jsxs("div",{className:"flex justify-between gap-3 text-[14px]",children:[d.jsx("span",{className:"truncate text-foreground",children:i==="surface"?h_(r.key):r.label}),d.jsxs("span",{className:"tabular-nums text-muted-foreground",children:[rl.format(r.totalTokens)," tokens"]})]}),d.jsx("div",{className:"mt-2 h-1.5 overflow-hidden rounded-full bg-raised",children:d.jsx("div",{className:"h-full rounded-full bg-accent/80",style:{width:`${u}%`}})})]})}function k_({state:t,report:i,dimension:r}){return d.jsx("div",{className:"col-span-2 flex flex-wrap gap-1",children:r.sessionIds.map(u=>{const s=Jy(t,i,u);return d.jsx("button",{type:"button","data-session-id":u,onClick:()=>t.requestStoredSessionUsage(u),"aria-label":`Open session ${s}`,className:"rounded-md bg-raised px-2 py-1 text-[12px] text-muted-foreground hover:bg-hover hover:text-foreground",children:d.jsx("span",{className:"max-w-40 truncate align-middle",children:s})},u)})})}function w_({state:t}){if(t.storedSessionUsageStatus==="idle")return null;const i=t.storedSessionUsageSessionId??"";return d.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Session usage detail","data-session-id":i,children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:t.personalUsageReport?Jy(t,t.personalUsageReport,i):"Another session"}),d.jsx(j_,{state:t})]})}function j_({state:t}){if(t.storedSessionUsageStatus==="loading")return d.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});if(t.storedSessionUsageStatus==="error")return d.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:t.storedSessionUsageError??"Session usage failed."});const i=t.storedSessionUsageReport;return i?d.jsxs("div",{className:"mt-3 grid gap-3 sm:grid-cols-3",children:[d.jsx(ti,{label:"Session tokens",value:rl.format(i.totalTokens)}),d.jsx(ti,{label:"Sources",value:rl.format(i.bySource.length)}),d.jsx(ti,{label:"Trace turns",value:rl.format(i.timeline.length)})]}):null}function N_(t){const{coverage:i}=t,r=[];if(i.unsupportedSessions>0){const u=i.unsupportedSessions===1?"session":"sessions",s=i.unsupportedSessions===1?"uses":"use";r.push(`${rl.format(i.unsupportedSessions)} older ${u} ${s} 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(`${rl.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(`${rl.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 C_({report:t}){const i=N_(t);return i.length===0?null:d.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=>d.jsx("p",{children:r},r))})}const li=new Intl.NumberFormat("en-US"),E_=100,ux=2,__=5,T_=2;function Bc({children:t}){return d.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 A_({period:t,setPeriod:i,requestCurrentSessionUsage:r}){return d.jsxs("div",{className:"flex flex-wrap items-end justify-between gap-4",children:[d.jsxs("div",{children:[d.jsx("div",{className:"text-[13px] font-medium text-accent",children:"Local analytics"}),d.jsx("h1",{className:"mt-1 text-[28px] font-semibold tracking-[-0.02em]",children:"Personal usage"}),d.jsx("p",{className:"mt-1 text-[15px] text-muted-foreground",children:"Cross-session activity grouped by local calendar day."})]}),d.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[d.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"}),d.jsx(z_,{period:t,setPeriod:i})]})]})}function z_({period:t,setPeriod:i}){return d.jsx("div",{className:"flex rounded-lg bg-raised p-0.5",children:["7d","30d"].map(r=>d.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 D_({state:t}){if(t.currentSessionUsageStatus==="idle")return null;let i=null;if(t.currentSessionUsageStatus==="loading")i=d.jsx("p",{className:"mt-3 text-[14px] text-muted-foreground",children:"Loading trace…"});else if(t.currentSessionUsageStatus==="error")i=d.jsx("p",{className:"mt-3 text-[14px] text-destructive",children:"Current trace unavailable."});else if(t.currentSessionUsageReport){const r=t.currentSessionUsageReport.timeline.length;i=d.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 d.jsxs("section",{className:"rounded-2xl bg-card p-5","aria-label":"Current session usage",children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Current session trace"}),i]})}function R_(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 M_({report:t}){const i=t.totals.costStatus==="unknown"?"Unknown":`$${t.totals.costUsd.toFixed(T_)}`,r=R_(t);return d.jsxs("section",{"aria-label":"Usage totals",children:[d.jsxs("div",{className:"grid grid-cols-2 gap-3 lg:grid-cols-4",children:[d.jsx(ti,{label:"Turns",value:li.format(t.totals.turns)}),d.jsx(ti,{label:"Sessions",value:li.format(t.totals.sessions)}),d.jsx(ti,{label:"Tokens",value:li.format(t.totals.totalTokens)}),d.jsx(ti,{label:"Cost",value:i,...t.totals.costStatus==="estimated"?{note:"estimated"}:{}})]}),r?d.jsx("p",{className:"mt-2 text-[13px] text-subtle",children:r}):null]})}function O_({report:t}){const i=t.daily.reduce((r,u)=>Math.max(r,u.totals.totalTokens),0);return d.jsxs("section",{className:"rounded-2xl bg-card p-5",children:[d.jsx(L_,{report:t}),d.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=>d.jsxs("div",{className:"group flex min-w-0 flex-1 flex-col items-center justify-end gap-2",children:[d.jsx("div",{className:"relative flex h-32 w-full items-end",children:d.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?ux:Math.max(ux,r.totals.totalTokens/i*E_)}%`},title:`${r.date}: ${li.format(r.totals.totalTokens)} tokens`})}),d.jsx("span",{className:"truncate text-[12px] tabular-nums text-subtle",children:r.date.slice(__)})]},r.date))})]})}function L_({report:t}){return d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsxs("div",{children:[d.jsx("h2",{className:"text-[15px] font-semibold",children:"Daily usage"}),d.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?d.jsx("span",{className:"rounded-full bg-warning/15 px-2.5 py-1 text-[12px] font-medium text-warning",children:"Partial day"}):null]})}function U_({state:t,breakdown:i,setBreakdown:r}){const u=t.personalUsageReport;return t.personalUsageStatus==="loading"&&!u?d.jsx(Bc,{children:"Loading local usage…"}):t.personalUsageStatus==="error"?d.jsx(Bc,{children:t.personalUsageError??"Usage report failed."}):!u||q_(u)?d.jsx(Bc,{children:"No recorded usage in this period."}):d.jsxs(d.Fragment,{children:[d.jsx(M_,{report:u}),d.jsx(O_,{report:u}),d.jsx(x_,{state:t,report:u,breakdown:i,setBreakdown:r}),d.jsx(w_,{state:t}),d.jsx(C_,{report:u})]})}function q_(t){return t.totals.sessions===0&&t.totals.totalTokens===0&&t.byActivity.length===0}function B_({state:t}){const[i,r]=j.useState("7d"),[u,s]=j.useState("model");return j.useEffect(()=>{t.requestPersonalUsage(i)},[i,t.requestPersonalUsage]),d.jsx("main",{className:"agent-ui gui-rise h-full overflow-y-auto p-5 md:p-7","aria-label":"Personal usage",children:d.jsxs("div",{className:"mx-auto flex max-w-6xl flex-col gap-5",children:[d.jsx(A_,{period:i,setPeriod:r,requestCurrentSessionUsage:t.requestCurrentSessionUsage}),d.jsx(D_,{state:t}),d.jsx(U_,{state:t,breakdown:u,setBreakdown:s})]})})}function Hf({size:t=20}){return d.jsxs("svg",{width:t,height:t,viewBox:"0 0 20 20","aria-hidden":"true",className:"flex-shrink-0",children:[d.jsx("rect",{x:"1",y:"2.5",width:"18",height:"15",rx:"5.5",className:"fill-accent"}),d.jsx("circle",{cx:"7.2",cy:"10",r:"1.7",className:"fill-accent-foreground"}),d.jsx("circle",{cx:"12.8",cy:"10",r:"1.7",className:"fill-accent-foreground"})]})}function If({surface:t}){const{identity:i}=ai();return d.jsxs("span",{className:"flex items-center gap-2",children:[d.jsx(Hf,{}),d.jsx("span",{className:"text-[15px] font-semibold tracking-[-0.01em] text-foreground",children:i.displayName}),t?d.jsx("span",{className:"rounded-md bg-raised px-1.5 py-px text-[11px] font-medium text-muted-foreground",children:t}):null]})}const H_=200;function Wy(t,i){if(!t||!i.startsWith("/")||/\s/u.test(i))return null;const r=i.slice(1).toLowerCase(),u=t.commands.filter(f=>!My(f)).map(f=>({name:f.name,description:f.description,kind:"command"})),s=t.skills.filter(f=>f.userInvocable).map(f=>({name:f.name,description:f.description,kind:"skill"})),c=[...sx(u,r),...sx(s,r)].slice(0,H_);return c.length>0?c:null}function sx(t,i){const r=t.filter(s=>s.name.toLowerCase().startsWith(i)),u=t.filter(s=>!s.name.toLowerCase().startsWith(i)&&s.name.toLowerCase().includes(i));return[...r.sort(ox),...u.sort(ox)]}function ox(t,i){return t.name.localeCompare(i.name)}const I_=64*1024,Y_=256*1024,cx="Only files inside this project folder can be attached.",G_="You can attach up to 8 files to one message.",V_="Images and other non-text files can't be attached yet.";function fx(t){return t.replaceAll("\\","/")}function dx(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 F_(t,i){if(!t)return null;const r=dx(fx(t));if(!r||r==="/")return null;const u=dx(fx(i));if(u===r)return null;const s=`${r}/`;if(!u.startsWith(s))return null;const c=u.slice(s.length);return c||null}function X_(t){return/^text\//.test(t)||/[+/](?:json|xml)$/.test(t)}const $_=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 Q_(t,i){if(i)return!X_(i);const r=t.lastIndexOf(".");return r<0?!1:$_.has(t.slice(r+1).toLowerCase())}const Z_=/[\s)\]}>,;"'`]/u,K_=/[.,:;!?]$/u;function hx(t){return t>=1024?`${Math.round(t/1024)} KB`:`${t} B`}function J_(){const t=typeof crypto<"u"?crypto:void 0;return t?.randomUUID?t.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`}function P_(t,i,r,u){if(u>=8)return{kind:"rejected",message:G_};if(!t.absolutePath)return{kind:"rejected",message:cx};const s=F_(i,t.absolutePath);return s===null?{kind:"rejected",message:cx}:Z_.test(s)||K_.test(s)?{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.`}:Q_(t.name,t.mimeType)?{kind:"rejected",message:V_}:t.size>65536?{kind:"rejected",message:`${t.name} is larger than ${hx(I_)} and cannot be attached.`}:r+t.size>262144?{kind:"rejected",message:`Attachments cannot total more than ${hx(Y_)}.`}:{kind:"attached",attachment:{id:J_(),name:t.name,relativePath:s,size:t.size}}}function W_(t,i){if(i.length===0)return t;const r=i.map(u=>`@./${u.relativePath}`).join(" ");return t?`${t}
|
|
312
|
-
|
|
313
|
-
${r}`:r}function e1({label:t,sections:i,onClose:r,triggerRef:u}){const s=i.flatMap(v=>v.items),c=j.useId(),f=j.useRef(null),p=j.useRef([]),[g,m]=j.useState(()=>{const v=s.findIndex(N=>N.checked);return v>=0?v:0}),y=v=>{r(),v&&u.current?.focus()};j.useEffect(()=>{p.current[g]?.focus()},[g]),j.useEffect(()=>{const v=N=>{const _=N.target;f.current?.contains(_)||u.current?.contains(_)||y(!1)};return document.addEventListener("mousedown",v),()=>document.removeEventListener("mousedown",v)},[]);const x=v=>{if(v.key==="Escape"){v.preventDefault(),y(!0);return}if(v.key==="ArrowDown"||v.key==="ArrowUp"){if(v.preventDefault(),s.length===0)return;const N=v.key==="ArrowDown"?1:-1;m(_=>(_+N+s.length)%s.length);return}if(v.key==="Enter"||v.key===" "){v.preventDefault();const N=s[g];N&&(N.onSelect(),y(!0))}};let S=-1;return d.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)=>d.jsxs("div",{role:"group","aria-label":v.heading,children:[v.heading?d.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(_=>{S+=1;const L=S,C=_.kind==="action",F=_.description?`${c}-desc-${_.key}`:void 0;return d.jsxs("button",{ref:U=>{p.current[L]=U},type:"button",role:C?"menuitem":"menuitemradio","aria-checked":C?void 0:_.checked===!0,"aria-label":_.label,"aria-describedby":F,tabIndex:L===g?0:-1,onFocus:()=>m(L),onClick:()=>{_.onSelect(),y(!0)},className:`flex w-full items-start gap-2 rounded-xl px-3 py-2 text-left text-[13.5px] ${_.destructive?"text-destructive hover:bg-destructive/10":"text-foreground hover:bg-hover"} ${L===g?"bg-hover":""}`,children:[C?null:d.jsx("span",{className:"mt-0.5 flex h-4 w-4 flex-shrink-0 items-center justify-center",children:_.checked?d.jsx(ua,{size:14,strokeWidth:2.25,"aria-hidden":"true"}):null}),d.jsxs("span",{className:"min-w-0 flex-1",children:[d.jsx("span",{className:"block truncate",children:_.label}),_.description?d.jsx("span",{id:F,className:"block truncate text-[12px] text-muted-foreground",children:_.description}):null]})]},_.key)})]},v.heading??N))})}const Hc={auto:"Auto",none:"None",minimal:"Minimal",low:"Low",medium:"Medium",high:"High",xhigh:"Extra high",max:"Maximum"},e3=["auto","low","medium","high"],t3=["none","minimal","xhigh","max"];function t1(t){return t?.commands.find(i=>i.name==="mode")?.subcommands??[]}function n3(t,i){return t1(t).find(r=>r.name===i)?.displayName??i}const l3="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",i3="text-warning hover:text-warning";function Ic({chipLabel:t,value:i,icon:r,connected:u,warning:s=!1,menuLabel:c,sections:f,onOpen:p}){const[g,m]=j.useState(!1),y=j.useRef(null);return d.jsxs("span",{className:"relative",children:[d.jsxs("button",{ref:y,type:"button","aria-label":`${t}: ${i}`,"aria-haspopup":"menu","aria-expanded":g,title:u?`${t}: ${i}`:"Reconnecting…",disabled:!u,onClick:()=>{p?.(),m(!0)},className:`${l3} ${s?i3:""}`,children:[r,d.jsx("span",{className:"hidden truncate md:inline",children:i})]}),g?d.jsx(e1,{label:c,sections:f,triggerRef:y,onClose:()=>m(!1)}):null]})}const Yc={size:14,strokeWidth:1.75,"aria-hidden":!0};function r3({status:t,catalog:i,modelList:r,onRequestModelList:u,onManageProviders:s,onSilentCommand:c,connected:f}){const p=t?Math.round(t.context.usedPercentage):null,[g,m]=j.useState(!1),y=[...(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:s}]}],x=[{items:t1(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:e3.map(v=>({key:v,label:Hc[v],checked:v===t?.effort,onSelect:()=>c("effort",v)}))},{heading:"More",items:t3.map(v=>({key:v,label:Hc[v],checked:v===t?.effort,onSelect:()=>c("effort",v)}))}];return d.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-0.5",children:[t?d.jsxs(d.Fragment,{children:[d.jsx(Ic,{chipLabel:"mode",value:n3(i,t.permissionMode),icon:d.jsx(SC,{...Yc}),connected:f,warning:t.permissionMode==="bypassPermissions",menuLabel:"Mode",sections:x}),d.jsx("span",{className:"ml-auto"}),d.jsx(Ic,{chipLabel:"model",value:t.model,icon:d.jsx(wC,{...Yc}),connected:f,menuLabel:"Model",sections:y,onOpen:u}),d.jsx(Ic,{chipLabel:"effort",value:Hc[t.effort],icon:d.jsx(JN,{...Yc}),connected:f,menuLabel:"Effort",sections:S})]}):d.jsx("span",{className:"ml-auto px-2 text-[13px] text-subtle",children:"…"}),d.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:[d.jsx(a3,{percent:p??0}),p===null?"":`${p}%`]}),d.jsx(Ml,{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 a3({percent:t}){const r=2*Math.PI*5,u=Math.min(100,Math.max(0,t))/100;return d.jsxs("svg",{width:"14",height:"14",viewBox:"0 0 14 14","aria-hidden":"true",children:[d.jsx("circle",{cx:"7",cy:"7",r:5,className:"fill-none stroke-raised",strokeWidth:"2"}),d.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 Uu={text:"",attachments:[]},u3=new Set(["settings","resume","help"]);function px(t){return t.kind==="command"&&u3.has(t.name)}function Gc(t){return t.kind==="skill"?"Skills":"Commands"}function n1(t,i){return i?`${t}.draft.${i}`:`${t}.draft`}function s3(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 o3(t){if(!t)return Uu;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(s3):[]}}}catch{}return{text:t,attachments:[]}}function mx(t,i){try{return o3(window.localStorage.getItem(n1(t,i)))}catch{return Uu}}function Eu(t,i,r){try{const u=n1(t,i);!r.text&&r.attachments.length===0?window.localStorage.removeItem(u):window.localStorage.setItem(u,JSON.stringify(r))}catch{}}const c3=j.forwardRef(function({onSubmit:i,onCommand:r,catalog:u,status:s,connected:c=!0,running:f,onStop:p,queued:g,onCancelQueue:m,pickFiles:y,getPathForFile:x,modelList:S=null,onRequestModelList:v=()=>{},onSilentCommand:N=r,onManageProviders:_=()=>r("provider")},L){const{identity:C,storage:{browserNamespace:F}}=ai(),U=j.useRef(null);j.useImperativeHandle(L,()=>({focus:()=>U.current?.focus()}),[]);const $=s?.sessionId,ue=j.useRef($),R=j.useRef($!==void 0),H=j.useRef(Uu),[ie,ee]=j.useState(()=>{const ne=mx(F,$);return H.current=ne,ne.text}),[O,re]=j.useState(()=>H.current.attachments),[te,xe]=j.useState(null),[oe,P]=j.useState(0),[D,Q]=j.useState(!1),ce=D||!c?null:Wy(u,ie);j.useEffect(()=>{P(0),Q(!1)},[ie]);const me=j.useRef([]);j.useEffect(()=>{me.current[oe]?.scrollIntoView?.({block:"nearest"})},[oe,ce]);const E=ne=>{H.current={...H.current,text:ne},ee(ne),Eu(F,ue.current,H.current)},A=ne=>{const Ye=typeof ne=="function"?ne(H.current.attachments):ne;H.current={...H.current,attachments:Ye},re(Ye),Eu(F,ue.current,H.current)};j.useEffect(()=>{if($===void 0&&R.current||ue.current===$)return;const ne=!R.current,Ye=ue.current;ue.current=$,$!==void 0&&(R.current=!0);const Ue=mx(F,$),an=Ue.text!==""||Ue.attachments.length>0,G=H.current.text!==""||H.current.attachments.length>0;if(ne&&!an&&G){Eu(F,$,H.current),Eu(F,Ye,Uu);return}H.current=Ue,ee(Ue.text),re(Ue.attachments),xe(null)},[F,$]);const V=()=>{if(!c)return;const ne=ie.trim();!ne&&O.length===0||(i(W_(ne,O)),E(""),A([]),xe(null))},w=s?.workspace?.path,se=O.reduce((ne,Ye)=>ne+Ye.size,0),fe=ne=>{if(ne.length===0)return;let Ye=se,Ue=O.length;const an=[];let G=null;for(const ae of ne){const ye=P_(ae,w,Ye,Ue);ye.kind==="attached"?(an.push(ye.attachment),Ye+=ye.attachment.size,Ue+=1):G=ye.message}an.length>0&&A(ae=>[...ae,...an]),xe(G)},he=ne=>{A(Ye=>Ye.filter(Ue=>Ue.id!==ne))},we=ne=>({name:ne.name,size:ne.size,mimeType:ne.type||void 0,absolutePath:x&&x(ne)||void 0}),He=j.useRef(null),W=()=>{if(c){if(y){y().then(ne=>fe(ne.map(Ye=>({name:Ye.name,size:Ye.size,absolutePath:Ye.path})))).catch(()=>xe("Could not open the file picker. Try again."));return}He.current?.click()}},je=ne=>{const Ye=Array.from(ne.target.files??[]);ne.target.value="",fe(Ye.map(we))},Qe=j.useRef(0),[qt,Nn]=j.useState(!1),At=ne=>Array.from(ne.dataTransfer?.types??[]).includes("Files"),ln=ne=>{!c||!At(ne)||(ne.preventDefault(),Qe.current+=1,Nn(!0))},Cn=ne=>{!c||!At(ne)||ne.preventDefault()},Un=()=>{Qe.current=Math.max(0,Qe.current-1),Qe.current===0&&Nn(!1)},ul=ne=>{!c||!At(ne)||(ne.preventDefault(),Qe.current=0,Nn(!1),fe(Array.from(ne.dataTransfer?.files??[]).map(we)))},rn=ne=>{if(px(ne)){E(""),r(ne.name);return}E(`/${ne.name} `)},En=()=>{const ne=ce?.[oe];return!ne||!px(ne)&&ie===`/${ne.name}`?!1:(rn(ne),!0)},_n=()=>{g&&(E(g.text),m())};return d.jsxs("div",{className:"relative flex-shrink-0",onDragEnter:ln,onDragOver:Cn,onDragLeave:Un,onDrop:ul,children:[d.jsx("p",{id:"composer-attach-hint",className:"sr-only",children:"Drag files here, or use Attach files, to add them to your message."}),qt&&d.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&&d.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:[d.jsxs("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:["Queued: ",g.text,g.count>1&&d.jsxs("span",{className:"text-subtle",children:[" and ",g.count-1," more"]})]}),g.count===1?d.jsxs(d.Fragment,{children:[d.jsx("button",{type:"button",onClick:_n,className:"flex-shrink-0 rounded-lg px-2 py-1 text-muted-foreground hover:bg-hover hover:text-foreground",children:"Edit"}),d.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"})]}):d.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"})]}),ce&&d.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:ce.map((ne,Ye)=>d.jsxs("div",{children:[(Ye===0||Gc(ce[Ye-1])!==Gc(ne))&&d.jsx("div",{role:"presentation",className:"px-3 pb-1 pt-2 text-[11px] font-semibold uppercase tracking-wide text-subtle first:pt-1",children:Gc(ne)}),d.jsxs("button",{ref:Ue=>{me.current[Ye]=Ue},type:"button",role:"option","aria-selected":Ye===oe,onMouseEnter:()=>P(Ye),onMouseDown:Ue=>{Ue.preventDefault(),rn(ne)},className:`flex w-full items-baseline gap-3 rounded-xl px-3 py-2 text-left text-[14px] ${Ye===oe?"bg-hover":""}`,children:[d.jsxs("span",{className:"flex-shrink-0 font-mono text-[13.5px] text-foreground",children:["/",ne.name]}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:ne.description})]})]},`${ne.kind}:${ne.name}`))}),d.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:ne=>{ne.preventDefault(),V()},children:[O.length>0&&d.jsx("ul",{"aria-label":"attachments",className:"mb-1.5 flex flex-wrap gap-1.5 px-1 pt-0.5",children:O.map(ne=>d.jsxs("li",{title:ne.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:[d.jsx(Ig,{size:12,strokeWidth:1.75,"aria-hidden":"true",className:"flex-shrink-0"}),d.jsx("span",{className:"max-w-[180px] truncate",children:ne.name}),d.jsx("button",{type:"button","aria-label":`Remove ${ne.name}`,onClick:()=>he(ne.id),className:"flex-shrink-0 rounded-full p-0.5 hover:bg-hover hover:text-foreground",children:d.jsx(er,{size:12,strokeWidth:2,"aria-hidden":"true"})})]},ne.id))}),te&&d.jsx("p",{role:"status","aria-live":"polite",className:"mb-1.5 px-1.5 text-[12.5px] text-muted-foreground",children:te}),d.jsx("input",{ref:He,type:"file",multiple:!0,onChange:je,className:"sr-only",tabIndex:-1,"aria-hidden":"true"}),d.jsx("textarea",{ref:U,"aria-label":"message","aria-describedby":"composer-attach-hint",rows:1,value:ie,onChange:ne=>E(ne.target.value),onKeyDown:ne=>{if(!(ne.key==="Enter"&&(ne.nativeEvent.isComposing||ne.keyCode===229))){if(ce){if(ne.key==="ArrowDown"||ne.key==="ArrowUp"){ne.preventDefault();const Ye=ne.key==="ArrowDown"?1:-1;P(Ue=>(Ue+Ye+ce.length)%ce.length);return}if(ne.key==="Escape"){ne.preventDefault(),Q(!0);return}if((ne.key==="Tab"||ne.key==="Enter"&&!ne.shiftKey)&&En()){ne.preventDefault();return}}if(ne.key==="Escape"&&f&&c){ne.preventDefault(),p();return}ne.key==="Enter"&&!ne.shiftKey&&(ne.preventDefault(),V())}},placeholder:`Ask ${C.displayName} 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"}),d.jsxs("div",{className:"mt-1 flex items-center gap-1",children:[d.jsx("button",{type:"button","aria-label":"Attach files",title:c?"Attach files":"Reconnecting…",disabled:!c,onClick:W,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:d.jsx(Ig,{size:16,strokeWidth:1.75,"aria-hidden":"true"})}),d.jsx(r3,{status:s,catalog:u,modelList:S,onRequestModelList:v,onManageProviders:_,onSilentCommand:N,connected:c}),d.jsxs("button",{type:f?"button":"submit",onClick:f?p:void 0,disabled:!c||!f&&!ie.trim()&&O.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?d.jsx(Fu,{size:13,strokeWidth:2,fill:"currentColor","aria-hidden":"true"}):d.jsx(TN,{size:17,strokeWidth:2.25,"aria-hidden":"true"}),d.jsx("span",{className:"sr-only",children:f?"Stop":"Send"})]})]})]})]})});function f3({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 d.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:[d.jsx(zy,{size:16,strokeWidth:1.75,className:"flex-shrink-0 text-accent"}),d.jsx("span",{className:"flex-shrink-0 font-medium text-foreground",children:"Goal"}),d.jsx("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:r.objective}),d.jsxs("span",{className:"flex-shrink-0 text-[13px] tabular-nums text-subtle",children:[r.iterations,"/",r.maxIterations]}),d.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:[d.jsx(Fu,{size:11,fill:"currentColor","aria-hidden":"true"}),"Stop"]}),d.jsx("span",{"aria-hidden":"true",className:"absolute bottom-0 left-0 h-[2px] bg-accent/70 transition-[width]",style:{width:`${u*100}%`}})]})}const d3={warning:"bg-warning/15 text-warning",destructive:"bg-destructive/12 text-destructive",muted:"bg-subtle/15 text-subtle"},gx={message:"",tool_activity:"Tool",process_output:"Output",progress:"Progress",result:"Result",error:"Error",group_summary:"Summary"};function h3({entry:t,status:i,records:r,error:u,complete:s,onClose:c,onLoadMore:f,onStop:p}){if(!t)return null;const g=VE(t),m=p!==void 0&&t.controls.includes("cancel"),y=t.headline?.text??t.preview;return d.jsxs("div",{role:"dialog","aria-label":t.title,onKeyDown:x=>{x.key==="Escape"&&(x.preventDefault(),c())},className:"agent-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:[d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2 border-b border-subtle/15 px-4 py-3",children:[d.jsx("span",{className:"min-w-0 flex-1 truncate text-[14px] font-medium text-foreground",children:t.title}),g&&d.jsx("span",{className:`flex-shrink-0 rounded-md px-1.5 py-px text-[12px] ${d3[g.tone]}`,children:g.label}),m&&d.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"}),d.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:d.jsx(er,{size:16,strokeWidth:1.9,"aria-hidden":"true"})})]}),y&&d.jsx("p",{className:"flex-shrink-0 border-b border-subtle/15 px-4 py-2.5 text-[13px] leading-snug text-muted-foreground",children:y}),t.deniedToolCalls!==void 0&&t.deniedToolCalls>0&&d.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."]}),d.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-4 py-3",children:[r.map(x=>d.jsxs("div",{className:"text-[13px] leading-relaxed text-foreground",children:[gx[x.kind]&&d.jsx("span",{className:"mr-1.5 text-[11px] font-medium uppercase tracking-wide text-subtle",children:gx[x.kind]}),d.jsx("span",{className:"whitespace-pre-wrap break-words",children:x.text})]},x.id)),i==="loading"&&r.length===0&&d.jsx("p",{className:"text-[13px] text-subtle",children:"Loading…"}),u&&d.jsx("p",{className:"text-[13px] text-destructive",children:u}),!s&&i!=="loading"&&d.jsx("button",{type:"button",onClick:f,className:"text-[12px] text-subtle underline hover:text-foreground",children:"Load more"}),!s&&i==="loading"&&r.length>0&&d.jsx("p",{className:"text-[12px] text-subtle",children:"Loading more…"})]})]})}const p3=[{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 m3({open:t,onClose:i,catalog:r}){const u=Wy(r,"/")??[],s=u.filter(f=>f.kind==="command"),c=u.filter(f=>f.kind==="skill");return d.jsxs(sa,{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:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Help"}),d.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:d.jsx(er,{size:17,strokeWidth:1.75})})]}),d.jsxs("div",{className:"min-h-0 flex-1 overflow-y-auto px-5 py-4",children:[d.jsxs("section",{"aria-label":"Shortcuts",children:[d.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:"Shortcuts"}),d.jsx("dl",{className:"mt-2 mb-5 space-y-1.5",children:p3.map(f=>d.jsxs("div",{className:"flex items-baseline gap-3 text-[13.5px]",children:[d.jsx("dt",{className:"w-24 flex-shrink-0 font-mono text-foreground",children:f.keys}),d.jsx("dd",{className:"min-w-0 flex-1 text-muted-foreground",children:f.description})]},f.keys))})]}),d.jsx(xx,{label:"Commands",items:s}),c.length>0&&d.jsx(xx,{label:"Skills",items:c})]})]})}function xx({label:t,items:i}){return d.jsxs("section",{"aria-label":t,className:"mb-5 last:mb-0",children:[d.jsx("h3",{className:"text-[11px] font-semibold uppercase tracking-wide text-subtle",children:t}),d.jsx("ul",{className:"mt-2 space-y-1.5",children:i.map(r=>d.jsxs("li",{className:"flex items-baseline gap-3 text-[13.5px]",children:[d.jsxs("span",{className:"w-24 flex-shrink-0 truncate font-mono text-foreground",children:["/",r.name]}),d.jsx("span",{className:"min-w-0 flex-1 text-muted-foreground",children:r.description})]},r.name))})]})}const g3={Added:"text-accent",Modified:"text-warning",Deleted:"text-destructive",Renamed:"text-muted-foreground",Copied:"text-muted-foreground",Untracked:"text-subtle",Conflicted:"text-destructive"};function x3({file:t,open:i,onOpen:r}){return d.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:[d.jsx(Vu,{size:13,className:`flex-shrink-0 text-subtle transition-transform ${i?"rotate-90":""}`}),d.jsx("span",{className:`w-[76px] flex-shrink-0 text-[12px] font-medium ${g3[t.status]}`,children:t.status}),d.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"&&d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-accent",children:["+",t.added]}),typeof t.removed=="number"&&d.jsxs("span",{className:"flex-shrink-0 font-mono text-[12px] text-destructive",children:["-",t.removed]})]})}function y3({status:t,statusState:i,onRefresh:r,openPath:u,onSelectFile:s,diff:c,diffState:f,diffPath:p}){return d.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-1",children:[d.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:t?.kind==="status"&&t.branch?`Changes — ${t.branch}`:"Changes"}),d.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:[d.jsx(Of,{size:12,className:i==="loading"?"animate-spin":""}),"Refresh"]})]}),i==="loading"&&t===null&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"Reading git status…"}),i==="error"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:"Could not read git status."}),t?.kind==="not-a-repository"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"This folder is not a git repository."}),t?.kind==="failed"&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-destructive",children:t.message}),t?.kind==="status"&&t.files.length===0&&d.jsx("p",{className:"px-1 py-2 text-[13px] text-muted-foreground",children:"No changes."}),t?.kind==="status"&&t.files.map(g=>d.jsxs("div",{className:"flex flex-col",children:[d.jsx(x3,{file:g,open:u===g.path,onOpen:()=>s(g.path)}),u===g.path&&d.jsxs("div",{className:"pl-6",children:[f==="loading"&&p===g.path&&d.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&&d.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&&d.jsxs(d.Fragment,{children:[d.jsx(Xu,{diffLines:c.diffLines}),c.truncated&&d.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"&&d.jsx("p",{className:"py-1.5 text-[12.5px] text-destructive",children:c.message}),c&&p===g.path&&c.kind==="outside-workspace"&&d.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"&&d.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&&d.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"Showing the first files only — there are more."})]})}function b3({memory:t,memoryState:i,onOpenInEditor:r}){return d.jsxs("div",{className:"flex flex-col gap-1.5 rounded-xl bg-card px-2 py-2",children:[d.jsxs("div",{className:"flex items-center gap-2 px-1",children:[d.jsx("p",{className:"flex-1 text-[12px] font-medium text-muted-foreground",children:"Memory"}),t?.kind==="memory"&&r&&d.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:[d.jsx($N,{size:12}),"Open in editor"]})]}),i==="loading"&&t===null&&d.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:"Reading project memory…"}),t?.kind==="unavailable"&&d.jsx("p",{className:"px-1 py-1 text-[13px] text-muted-foreground",children:t.message}),t?.kind==="memory"&&d.jsxs(d.Fragment,{children:[d.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&&d.jsx("p",{className:"px-1 pt-1 text-[12px] text-subtle",children:"The memory was too long and was cut short."})]})]})}function v3({state:t,className:i,onOpenMemoryInEditor:r}){j.useEffect(()=>{t.requestProjectStatus(),t.requestProjectMemory()},[t.requestProjectStatus,t.requestProjectMemory]);const[u,s]=j.useState(null);return d.jsxs("div",{className:`agent-ui flex flex-col overflow-hidden ${i??""}`,children:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-2 px-4",children:[d.jsx(WN,{size:15,className:"text-subtle"}),d.jsx("span",{className:"text-[14px] font-medium text-foreground",children:"Project"}),t.projectStatusState==="loading"&&d.jsx(Mf,{size:13,className:"ml-auto animate-spin text-subtle","aria-label":"loading"})]}),d.jsxs("div",{className:"flex-1 space-y-2 overflow-y-auto px-3 pb-3",children:[d.jsx(y3,{status:t.projectStatus,statusState:t.projectStatusState,onRefresh:()=>t.requestProjectStatus(),openPath:u,onSelectFile:c=>{if(u===c){s(null);return}s(c),t.requestProjectDiff(c)},diff:t.projectDiffPath===u?t.projectDiff:null,diffState:t.projectDiffPath===u?t.projectDiffState:"loading",diffPath:t.projectDiffPath}),d.jsx(b3,{memory:t.projectMemory,memoryState:t.projectMemoryState,onOpenInEditor:r})]})]})}const yx={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"}},S3={chat:"Chat",usage:"Usage",project:"Project"};function k3(t){const{identity:i}=ai();j.useEffect(()=>{typeof document>"u"||t===void 0||(document.title=`${t.name} — ${i.displayName}`)},[t,i.displayName])}function w3({status:t,surface:i,title:r,workspace:u,showBrand:s,view:c,onView:f,personalUsageEnabled:p,connectionLost:g=!1}){const m=yx[t]??yx.disconnected;k3(u);const y=j.useRef(!1);j.useEffect(()=>{t==="connected"&&(y.current=!0)},[t]);const x=t!=="connected"&&(g||y.current),S=p?["chat","usage","project"]:["chat","project"];return d.jsxs("header",{className:"agent-gui-status flex h-12 flex-shrink-0 items-center gap-3 px-5","data-status":t,children:[s?d.jsx(If,{surface:i}):null,c==="chat"&&r?d.jsx("h1",{className:"min-w-0 truncate text-[14px] font-medium text-foreground/90",children:r}):null,c==="chat"&&u?d.jsx("span",{title:u.path,className:"min-w-0 flex-shrink truncate text-[13px] text-muted-foreground",children:u.name}):null,d.jsxs("div",{className:"ml-auto flex items-center gap-3",children:[d.jsx("nav",{className:"flex items-center rounded-lg bg-raised p-0.5","aria-label":"Primary",children:S.map(v=>d.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:S3[v]},v))}),x?null:d.jsxs("span",{className:"flex items-center gap-2",title:m.label,children:[d.jsx("span",{className:`h-2 w-2 rounded-full ${m.dot}`}),t==="connected"?d.jsx("span",{className:"sr-only",children:t}):d.jsx("span",{className:"text-[13px] text-muted-foreground",children:m.label})]})]})]})}const bx="mx-auto w-full max-w-[760px] px-6";function j3({status:t,connectionLost:i,onReconnect:r}){const u=j.useRef(!1);j.useEffect(()=>{t==="connected"&&(u.current=!0)},[t]);const{identity:s}=ai(),[c,f]=j.useState(!1),[p,g]=j.useState(null);if(t==="connected"||!i&&!u.current)return null;if(!i)return d.jsx("div",{role:"status",className:`${bx} flex-shrink-0 pt-3`,children:d.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:[d.jsx("span",{className:"h-2 w-2 flex-shrink-0 animate-pulse rounded-full bg-warning","aria-hidden":"true"}),"Connection lost. Reconnecting…"]})});const m=()=>{r&&(f(!0),g(null),r().catch(y=>{f(!1),g(y instanceof Error?y.message:String(y))}))};return d.jsx("div",{role:"alert",className:`${bx} flex-shrink-0 pt-3`,children:d.jsxs("div",{className:"flex flex-col gap-2 rounded-xl bg-destructive/15 px-4 py-3 text-[13.5px] text-foreground",children:[d.jsxs("div",{className:"flex flex-wrap items-center gap-3",children:[d.jsx("span",{className:"h-2 w-2 flex-shrink-0 rounded-full bg-destructive","aria-hidden":"true"}),d.jsxs("span",{className:"min-w-0 flex-1",children:[s.displayName," stopped.",!r&&d.jsxs(d.Fragment,{children:[" ","Run ",d.jsxs("code",{className:"font-mono",children:[s.cliName," --serve --open"]})," again to reopen it."]})]}),r?d.jsx("button",{type:"button",onClick:m,disabled:c,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:c?"Reconnecting…":"Reconnect"}):null]}),p?d.jsx("p",{className:"text-destructive",children:p}):null]})})}const N3={openai:"OpenAI",deepseek:"DeepSeek"};function C3(t){return t===void 0||t.length===0?"The provider":N3[t]??t[0].toUpperCase()+t.slice(1)}function E3(t){const i=C3(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 _3({state:t}){const i=t.sessionNotices??[];return i.length===0?null:d.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=E3(r);return d.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:[d.jsx("span",{className:"mt-[7px] h-2 w-2 flex-shrink-0 rounded-full bg-destructive"}),d.jsxs("span",{className:"max-h-40 flex-1 overflow-y-auto whitespace-pre-wrap break-words",children:[u??r.message,u&&d.jsxs("details",{className:"mt-1.5",children:[d.jsx("summary",{className:"cursor-pointer text-[12.5px] text-muted-foreground hover:text-foreground",children:"Details"}),d.jsx("p",{className:"mt-1 whitespace-pre-wrap break-words text-[12.5px] text-muted-foreground",children:r.message})]})]}),d.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:d.jsx(er,{size:15})})]},r.id)})})}const l1="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 ff({label:t,note:i,value:r,options:u,onChange:s,disabled:c=!1}){const f=j.useId(),p=u.find(m=>m.id===r),g=i??p?.description;return d.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),d.jsxs("select",{id:f,value:u.some(m=>m.id===r)?r:"",disabled:c,onChange:m=>s(m.target.value),className:l1,children:[u.some(m=>m.id===r)?null:d.jsx("option",{value:"",disabled:!0,children:r||"Unset"}),u.map(m=>d.jsx("option",{value:m.id,children:m.label},m.id))]})]}),g?d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:g}):null]})}const Vc="__other__";function T3({label:t,current:i,recommended:r,note:u,onChange:s,disabled:c=!1}){const f=j.useId(),p=r.some(v=>v.id===i),[g,m]=j.useState(!p&&i.length>0),[y,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=y.trim();v.length>0&&v!==i&&s(v)}return d.jsxs("div",{className:"flex flex-col gap-1.5 border-b border-border/60 py-3.5 last:border-b-0",children:[d.jsxs("div",{className:"flex items-center justify-between gap-4",children:[d.jsx("label",{htmlFor:f,className:"text-[14px] font-medium text-foreground",children:t}),d.jsxs("select",{id:f,disabled:c,value:g?Vc:p?i:"",onChange:v=>{if(v.target.value===Vc){m(!0);return}m(!1),s(v.target.value)},className:l1,children:[!p&&!g?d.jsx("option",{value:"",disabled:!0,children:i||"Unset"}):null,r.map(v=>d.jsx("option",{value:v.id,children:v.label},v.id)),d.jsx("option",{value:Vc,children:"Other…"})]})]}),g?d.jsx("input",{type:"text","aria-label":`${t} — other`,placeholder:"Language code, e.g. fr",value:y,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,d.jsx("p",{className:"text-[12.5px] leading-snug text-muted-foreground",children:u})]})}function A3({snapshot:t,onUpdate:i,onRequestPresetChange:r}){return d.jsxs("section",{"aria-labelledby":"settings-general-heading",children:[d.jsx("h3",{id:"settings-general-heading",className:"sr-only",children:"General"}),d.jsx(T3,{label:"Language",current:t.language.current,recommended:t.language.recommended,note:t.language.appliesNote,onChange:u=>i({field:"language",language:u})}),d.jsx(ff,{label:"Output style",value:t.outputStyle.current,options:t.outputStyle.choices,onChange:u=>i({field:"outputStyle",styleId:u})}),d.jsx(ff,{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 z3={connected:"Connected",failed:"Failed",disabled:"Disabled"},D3={connected:"text-success",failed:"text-destructive",disabled:"text-muted-foreground"};function R3({server:t,expanded:i,onToggleExpanded:r,onToggleEnabled:u}){const s=j.useId(),c=t.toolNames.length>0;return d.jsx("li",{className:"border-b border-border/60 py-3 last:border-b-0",children:d.jsxs("div",{className:"flex items-start justify-between gap-3",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.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?d.jsx(Ey,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):d.jsx(Vu,{size:14,strokeWidth:1.75,className:"flex-shrink-0 text-muted-foreground"}):d.jsx("span",{className:"w-[14px] flex-shrink-0"}),d.jsx("span",{id:s,className:"truncate text-[14px] font-medium text-foreground",children:t.name})]}),d.jsxs("p",{className:"mt-0.5 text-[12.5px] text-muted-foreground",children:[t.scopeLabel," · ",d.jsx("span",{className:D3[t.status],children:z3[t.status]}),t.status==="failed"&&t.statusReason?`: ${t.statusReason}`:""," · ",t.toolNames.length===1?"1 tool":`${t.toolNames.length} tools`]}),i&&c?d.jsx("ul",{className:"mt-2 flex flex-col gap-0.5 pl-[20px]",children:t.toolNames.map(f=>d.jsx("li",{className:"truncate font-mono text-[12px] text-muted-foreground",children:f},f))}):null]}),d.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":s,onClick:()=>u(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:d.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,onToggleServer:i,onReload:r,reloading:u}){const[s,c]=j.useState(new Set),{servers:f}=t.mcp;function p(g){c(m=>{const y=new Set(m);return y.has(g)?y.delete(g):y.add(g),y})}return d.jsxs("section",{"aria-labelledby":"settings-mcp-heading",className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("h3",{id:"settings-mcp-heading",className:"text-[14px] font-medium text-foreground",children:"MCP Servers"}),d.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:[d.jsx(Of,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload servers"]})]}),f.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No MCP servers are configured."}):d.jsx("ul",{children:f.map(g=>d.jsx(R3,{server:g,expanded:s.has(g.id),onToggleExpanded:()=>p(g.id),onToggleEnabled:m=>i(g.id,m)},g.id))})]})}const vx={allow:"Allow",deny:"Deny",ask:"Ask"},O3={allow:"allowed",deny:"denied",ask:"asked about"};function L3({rule:t,onRequestRemove:i}){return d.jsxs("li",{className:"flex items-center justify-between gap-3 rounded-lg px-2.5 py-2 hover:bg-hover",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"truncate text-[13.5px] text-foreground",children:[d.jsx("span",{className:"font-medium",children:vx[t.kind]})," ",d.jsx("span",{className:"font-mono text-[12.5px]",children:t.pattern})]}),d.jsx("p",{className:"truncate text-[12px] text-muted-foreground",children:t.source})]}),t.removable?d.jsx("button",{type:"button","aria-label":`Remove rule: ${vx[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:d.jsx(Lf,{size:15,strokeWidth:1.75})}):null]})}function U3({snapshot:t,onRequestModeChange:i,onToggleSandbox:r,onRequestRemoveRule:u}){const s=j.useId(),{sandbox:c}=t;return d.jsxs("section",{"aria-labelledby":"settings-permissions-heading",className:"flex flex-col gap-5",children:[d.jsxs("div",{children:[d.jsx("h3",{id:"settings-permissions-heading",className:"sr-only",children:"Permissions"}),d.jsx(ff,{label:"Default permission mode",value:t.permissionMode.current,options:t.permissionMode.choices,onChange:i})]}),d.jsxs("div",{children:[d.jsx("h4",{className:"mb-1.5 text-[13px] font-medium text-foreground",children:"Rules"}),t.permissionRules.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No permission rules are configured — the default mode above governs every action."}):d.jsx("ul",{className:"space-y-0.5",children:t.permissionRules.map(f=>d.jsx(L3,{rule:f,onRequestRemove:u},f.id))})]}),d.jsxs("div",{className:"flex items-start justify-between gap-4 border-t border-border/60 pt-4",children:[d.jsxs("div",{className:"min-w-0",children:[d.jsx("span",{id:s,className:"text-[14px] font-medium text-foreground",children:"Sandbox"}),d.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:c.description}),!c.available&&c.unavailableReason?d.jsxs("p",{className:"mt-0.5 text-[12.5px] text-destructive",children:["Not available on this machine: ",c.unavailableReason]}):null]}),d.jsx("button",{type:"button",role:"switch","aria-checked":c.enabled,"aria-labelledby":s,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:d.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 q3(t){return`"${t.pattern}" will no longer be ${O3[t.kind]} automatically.`}function B3({plugin:t,canInstall:i,onToggleEnabled:r,onRequestUninstall:u}){const s=j.useId();return d.jsxs("li",{className:"flex items-start justify-between gap-3 border-b border-border/60 py-3 last:border-b-0",children:[d.jsxs("div",{className:"min-w-0 flex-1",children:[d.jsx("span",{id:s,className:"truncate text-[14px] font-medium text-foreground",children:t.name}),t.description?d.jsx("p",{className:"mt-0.5 text-[12.5px] leading-snug text-muted-foreground",children:t.description}):null]}),d.jsxs("div",{className:"flex flex-shrink-0 items-center gap-2",children:[i?d.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:d.jsx(Lf,{size:15,strokeWidth:1.75})}):null,d.jsx("button",{type:"button",role:"switch","aria-checked":t.enabled,"aria-labelledby":s,onClick:()=>r(!t.enabled),className:`relative h-6 w-11 flex-shrink-0 rounded-full transition-colors ${t.enabled?"bg-primary":"bg-raised"}`,children:d.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 H3({snapshot:t,onTogglePlugin:i,onReload:r,reloading:u,onRequestInstall:s,onRequestUninstall:c}){const[f,p]=j.useState(""),{plugins:g,canInstall:m}=t.plugins,y=j.useId();function x(){const S=f.trim();S.length!==0&&(s(S),p(""))}return d.jsxs("section",{"aria-labelledby":"settings-plugins-heading",className:"flex flex-col gap-3",children:[d.jsxs("div",{className:"flex items-center justify-between gap-3",children:[d.jsx("h3",{id:"settings-plugins-heading",className:"text-[14px] font-medium text-foreground",children:"Plugins"}),d.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:[d.jsx(Of,{size:13,strokeWidth:1.75,className:u?"animate-spin":""}),"Reload plugins"]})]}),g.length===0?d.jsx("p",{className:"text-[13px] leading-snug text-muted-foreground",children:"No plugins are installed."}):d.jsx("ul",{children:g.map(S=>d.jsx(B3,{plugin:S,canInstall:m,onToggleEnabled:v=>i(S.id,v),onRequestUninstall:()=>c(S)},S.id))}),d.jsx("div",{className:"border-t border-border/60 pt-3",children:m?d.jsxs("div",{className:"flex flex-col gap-1.5",children:[d.jsx("label",{htmlFor:y,className:"text-[13px] font-medium text-foreground",children:"Install a plugin"}),d.jsxs("div",{className:"flex gap-2",children:[d.jsx("input",{id:y,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"}),d.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"})]})]}):d.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 Yf="rounded-lg px-2.5 py-1.5 text-[12.5px] font-medium transition-colors disabled:cursor-not-allowed disabled:opacity-50",I3=`${Yf} bg-primary text-primary-foreground hover:opacity-90`,Au=`${Yf} bg-raised text-foreground hover:bg-hover`,Y3=`${Yf} text-destructive hover:bg-destructive/10`;function G3({profile:t,modelList:i,onSelect:r}){const[u,s]=j.useState(!1),c=j.useRef(null),f=i?.groups.find(p=>p.profileName===t.name)?.models??[];return d.jsxs("span",{className:"relative inline-block",children:[d.jsx("button",{ref:c,type:"button","aria-haspopup":"menu","aria-expanded":u,disabled:f.length===0,onClick:()=>s(!0),className:Au,children:"Model"}),u?d.jsx(e1,{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:()=>s(!1)}):null]})}function V3({profile:t,modelList:i,onUse:r,onModelChange:u,onCommand:s,onRequestDelete:c}){return d.jsxs("li",{className:"rounded-xl border border-border/60 p-3",children:[d.jsxs("div",{className:"flex items-start gap-1.5",children:[t.current?d.jsx(ua,{size:14,strokeWidth:2.25,className:"mt-0.5 flex-shrink-0 text-primary","aria-hidden":"true"}):d.jsx("span",{className:"mt-0.5 w-3.5 flex-shrink-0","aria-hidden":"true"}),d.jsxs("div",{className:"min-w-0",children:[d.jsxs("p",{className:"truncate text-[14px] font-medium text-foreground",children:[t.name,t.current?d.jsx("span",{className:"sr-only",children:" (in use)"}):null]}),d.jsxs("p",{className:"truncate text-[12.5px] text-muted-foreground",children:[t.providerLabel,t.model?` · ${t.model.label}`:" · No model configured"]}),t.connectionState?d.jsx("p",{className:"text-[12.5px] text-destructive",children:t.connectionState}):null]})]}),d.jsxs("div",{className:"mt-2.5 flex flex-wrap items-center gap-1.5",children:[d.jsx("button",{type:"button",disabled:t.current,onClick:()=>r(t.name),className:I3,children:"Use"}),d.jsx(G3,{profile:t,modelList:i,onSelect:u}),d.jsx("button",{type:"button",onClick:()=>s(`edit ${t.name}`),className:Au,children:"Edit…"}),d.jsx("button",{type:"button",onClick:()=>s(`test ${t.name}`),className:Au,children:"Test connection"}),d.jsx("button",{type:"button",onClick:()=>s(`duplicate ${t.name}`),className:Au,children:"Duplicate…"}),d.jsx("button",{type:"button",onClick:()=>c(t.name),className:`${Y3} ml-auto`,children:"Delete…"})]})]})}function F3({snapshot:t,modelList:i,onRequestModelList:r,onUse:u,onModelChange:s,onCommand:c,onRequestDelete:f}){j.useEffect(()=>{r()},[]);const{profiles:p}=t.providers;return d.jsxs("section",{"aria-labelledby":"settings-providers-heading",className:"flex flex-col gap-4",children:[d.jsx("h3",{id:"settings-providers-heading",className:"sr-only",children:"Providers & Models"}),p.length===0?d.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"No providers configured yet."}):d.jsx("ul",{className:"flex flex-col gap-3",children:p.map(g=>d.jsx(V3,{profile:g,modelList:i,onUse:u,onModelChange:s,onCommand:c,onRequestDelete:f},g.name))}),d.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 Fc=[{id:"general",label:"General"},{id:"permissions",label:"Permissions"},{id:"mcp",label:"MCP Servers"},{id:"plugins",label:"Plugins"},{id:"providers",label:"Providers & Models"}];function X3({state:t}){const[i,r]=j.useState("general"),[u,s]=j.useState(!0),[c,f]=j.useState(null),[p,g]=j.useState(null),[m,y]=j.useState(null),[x,S]=j.useState(!1),[v,N]=j.useState(!1),[_,L]=j.useState(null);if(j.useEffect(()=>{t.settingsOpen&&(r(t.settingsInitialSectionId??"general"),s(!0))},[t.settingsOpen,t.settingsInitialSectionId]),j.useEffect(()=>{S(!1),N(!1)},[t.settingsSnapshot,t.settingsError]),!t.settingsOpen)return null;const C=t.settingsSnapshot,F=Fc.find(ee=>ee.id===i)??Fc[0];function U(ee){r(ee),s(!1)}function $(ee){if(C&&ee===C.permissionMode.skipsAllChecksMode){f({kind:"mode"});return}t.updateSettings({field:"permissionMode",mode:ee})}function ue(ee){if(C?.preset.skipsAllChecksPresetIds.includes(ee)){f({kind:"preset",presetId:ee});return}t.updateSettings({field:"preset",presetId:ee})}function R(){S(!0),t.updateSettings({field:"reloadMcpServers"})}function H(){N(!0),t.updateSettings({field:"reloadPlugins"})}function ie(){m?.kind==="install"?t.updateSettings({field:"installPlugin",pluginId:m.pluginId}):m?.kind==="uninstall"&&t.updateSettings({field:"uninstallPlugin",pluginId:m.plugin.id}),y(null)}return d.jsxs(d.Fragment,{children:[d.jsxs(sa,{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:[d.jsxs("div",{className:"flex h-12 flex-shrink-0 items-center gap-1 border-b border-border px-3",children:[u?null:d.jsx("button",{type:"button","aria-label":"Back to sections",onClick:()=>s(!0),className:"rounded-md p-1.5 text-muted-foreground hover:bg-hover hover:text-foreground md:hidden",children:d.jsx(ON,{size:18,strokeWidth:1.75})}),d.jsx("h2",{className:"px-1.5 text-[15px] font-semibold text-foreground",children:"Settings"}),d.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:d.jsx(er,{size:17,strokeWidth:1.75})})]}),d.jsxs("div",{className:"flex min-h-0 flex-1",children:[d.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:d.jsx("ul",{className:"space-y-0.5",children:Fc.map(ee=>d.jsx("li",{children:d.jsx("button",{type:"button",onClick:()=>U(ee.id),"aria-current":ee.id===i?"true":void 0,className:`w-full rounded-lg px-2.5 py-2 text-left text-[13.5px] ${ee.id===i?"bg-raised font-medium text-foreground":"text-foreground/85 hover:bg-hover"}`,children:ee.label})},ee.id))})}),d.jsx("div",{className:`min-h-0 flex-1 overflow-y-auto px-5 py-4 md:block ${u?"hidden":"block"}`,children:C===null?t.settingsStatus==="error"?d.jsxs("div",{className:"flex flex-col items-start gap-2",children:[d.jsx("p",{className:"text-[13.5px] text-destructive",children:t.settingsError??"Settings could not be read."}),d.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"})]}):d.jsx("p",{className:"text-[13.5px] text-muted-foreground",children:"Loading settings…"}):d.jsxs(d.Fragment,{children:[t.settingsError?d.jsx("p",{className:"mb-3 rounded-lg bg-destructive/12 px-3 py-2 text-[13px] text-destructive",children:t.settingsError}):null,F.id==="general"?d.jsx(A3,{snapshot:C,onUpdate:t.updateSettings,onRequestPresetChange:ue}):F.id==="mcp"?d.jsx(M3,{snapshot:C,onToggleServer:(ee,O)=>t.updateSettings({field:"mcpServerEnabled",serverId:ee,enabled:O}),onReload:R,reloading:x}):F.id==="plugins"?d.jsx(H3,{snapshot:C,onTogglePlugin:(ee,O)=>t.updateSettings({field:"pluginEnabled",pluginId:ee,enabled:O}),onReload:H,reloading:v,onRequestInstall:ee=>y({kind:"install",pluginId:ee}),onRequestUninstall:ee=>y({kind:"uninstall",plugin:ee})}):F.id==="providers"?d.jsx(F3,{snapshot:C,modelList:t.modelList,onRequestModelList:t.requestModelList,onUse:ee=>t.updateSettings({field:"providerProfile",profileName:ee}),onModelChange:(ee,O)=>t.updateSettings({field:"providerModel",profileName:ee,modelId:O}),onCommand:ee=>t.send({type:"command",name:"provider",args:ee}),onRequestDelete:ee=>L(ee)}):d.jsx(U3,{snapshot:C,onRequestModeChange:$,onToggleSandbox:ee=>t.updateSettings({field:"sandbox",enabled:ee}),onRequestRemoveRule:ee=>g(ee)})]})})]})]}),d.jsx(Ml,{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"&&C?t.updateSettings({field:"permissionMode",mode:C.permissionMode.skipsAllChecksMode}):c?.kind==="preset"&&t.updateSettings({field:"preset",presetId:c.presetId}),f(null)}}),d.jsx(Ml,{open:p!==null,title:"Remove this rule?",body:p?q3(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)}}),d.jsx(Ml,{open:m!==null,title:m?.kind==="uninstall"?"Uninstall this plugin?":"Install this plugin?",body:m?$3(m):"",confirmLabel:m?.kind==="uninstall"?"Uninstall":"Install",destructive:!0,onCancel:()=>y(null),onConfirm:ie}),d.jsx(Ml,{open:_!==null,title:_?`Delete profile "${_}"?`:"",body:"This removes the profile and its stored key. This cannot be undone.",confirmLabel:"Delete",destructive:!0,onCancel:()=>L(null),onConfirm:()=>{_&&t.updateSettings({field:"deleteProviderProfile",profileName:_}),L(null)}})]})}function $3(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 Q3(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),s=()=>r(u.matches);return s(),u.addEventListener("change",s),()=>u.removeEventListener("change",s)},[t]),i}const Z3="(max-width: 767.98px)",K3="mx-auto w-full max-w-[760px] px-6";function J3(){return d.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Conversation",children:d.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx(Hf,{size:40}),d.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"What are we working on?"}),d.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Session connected. Send a message to start — the agent works in the host runtime and asks you here before anything that needs your permission."})]})})}function P3({onSetUp:t,disabled:i}){return d.jsx("main",{className:"flex h-full items-center justify-center","aria-label":"Set up a provider",children:d.jsxs("div",{className:"gui-rise flex max-w-[440px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx(Hf,{size:40}),d.jsx("h2",{className:"text-[26px] font-semibold tracking-[-0.02em] text-foreground",children:"Connect a model provider to start."}),d.jsx("p",{className:"text-[15px] leading-relaxed text-muted-foreground",children:"Choose a provider and model to start. Enter a key if your provider requires one. You can add more providers or change them later the same way."}),d.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 W3({state:t,surface:i,personalUsageEnabled:r=!1,onReconnect:u,pickFiles:s,getPathForFile:c,onOpenMemoryInEditor:f}){const[p,g]=j.useState("chat"),m=j.useRef(null),y=t.executionWorkspace?.entries??[],x=y.some(D=>D.kind!=="main_thread"),S=y.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,_=x||t.scheduledTasks.length>0||N!==null,L=t.messages.length===0&&!t.streamingText&&!t.isThinking&&t.activeTools.length===0,C=t.sessionStatus?.setupRequired===!0,F=(t.sessionListing??null)!==null||t.sessionsError?.code==="list_failed",U=F&&t.sessionSidebarOpen,$=r&&p==="usage",ue=p==="project",R=t.sessionListing??null,H=R?.sessions.find(D=>D.id===R.currentSessionId),ie=t.sessionName??(H?On(H):null),ee=Q3(Z3),O=U&&ee,re=()=>t.setSessionSidebarOpen?.(!1),te=j.useRef(null);j.useEffect(()=>{if(O)return;const D=Q=>{Q.target instanceof HTMLElement&&(te.current=Q.target)};return document.addEventListener("focusin",D),()=>document.removeEventListener("focusin",D)},[O]);const xe=j.useRef(!1);j.useEffect(()=>{if(xe.current&&!O){const D=te.current,Q=D?.getAttribute("aria-label");(D&&document.contains(D)?D:Q?document.querySelector(`[aria-label="${Q}"]`):null)?.focus()}xe.current=O},[O]);const oe={...t,switchSession:D=>{g("chat"),t.switchSession?.(D),O&&re()},newSession:()=>{g("chat"),t.newSession?.(),O&&re()}},P=d.jsx(s_,{state:oe,brand:d.jsx(If,{surface:i}),className:O?"h-full":"absolute inset-y-0 left-0 z-30 shadow-2xl shadow-black/40 md:static md:z-auto md:shadow-none"});return d.jsxs("div",{className:"agent-ui relative flex h-full bg-background text-foreground",children:[F?U?ee?d.jsx(sa,{open:O,onClose:re,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:d.jsx(o_,{state:oe}):null,d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(w3,{status:t.status,surface:i,title:ie,workspace:t.sessionStatus?.workspace,showBrand:!U,view:p,onView:g,personalUsageEnabled:r,connectionLost:t.connectionLost??!1}),$?d.jsxs("div",{className:"min-h-0 flex-1",children:[d.jsx(B_,{state:t}),d.jsx(Lc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):ue?d.jsxs("div",{className:"min-h-0 flex-1",children:[d.jsx(v3,{state:t,onOpenMemoryInEditor:f}),d.jsx(Lc,{layout:"modal",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId})]}):d.jsxs("div",{className:"flex min-h-0 flex-1",children:[d.jsxs("div",{className:"flex min-w-0 flex-1 flex-col",children:[d.jsx(j3,{status:t.status,connectionLost:t.connectionLost??!1,onReconnect:u}),d.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:C?d.jsx(P3,{onSetUp:()=>t.send({type:"command",name:"provider",args:"add"}),disabled:t.status!=="connected"}):L?d.jsx(J3,{}):d.jsx(DE,{messages:t.messages,activeTools:t.activeTools,streamingText:t.streamingText,isThinking:t.isThinking,ownDriverId:t.ownDriverId})}),d.jsxs("div",{className:`${K3} 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:[d.jsx(f3,{status:t.sessionStatus??null,onStop:()=>t.send({type:"command",name:"goal",args:"cancel"})}),d.jsx(Lc,{layout:"dock",prompts:t.pendingPrompts,onAnswerPermission:t.answerPermission,onAnswerAsk:t.answerAsk,ownDriverId:t.ownDriverId,onFocusReturn:()=>m.current?.focus()}),C?null:d.jsx(c3,{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:s,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,...ce]=D.slice(1).trim().split(/\s+/u);if(!Q)return;const me=ce.join(" ");t.send({type:"command",name:Q,...me?{args:me}:{}})}})]})]}),_&&d.jsx("aside",{"aria-label":"Agents",className:"flex w-72 flex-shrink-0 overflow-hidden bg-sidebar",children:d.jsx(FE,{tasks:y,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"})})}),d.jsx(h3,{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})]})]}),d.jsx(_3,{state:t}),d.jsx(X3,{state:t}),d.jsx(PE,{state:t}),d.jsx(m3,{open:t.helpOpen,onClose:()=>t.closeHelp(),catalog:t.commandCatalog})]})}function df({tone:t,children:i}){return d.jsxs("div",{className:"agent-ui flex h-full flex-col bg-background text-foreground",children:[d.jsx("header",{className:"flex h-12 flex-shrink-0 items-center px-5",children:d.jsx(If,{})}),d.jsx("main",{className:"flex flex-1 items-center justify-center",children:d.jsxs("div",{className:"gui-rise flex max-w-[520px] flex-col items-center gap-4 px-8 text-center",children:[d.jsx("span",{className:`h-2.5 w-2.5 rounded-full ${t==="fatal"?"bg-destructive":"animate-pulse bg-warning"}`}),d.jsx("div",{className:`text-[15px] leading-relaxed ${t==="fatal"?"text-foreground":"text-muted-foreground"}`,children:i})]})})]})}function e5({url:t,host:i}){const{storage:r}=ai(),u=fE(t);j.useEffect(()=>{u.status==="connected"&&i.signalReady()},[u.status,i]);const{openSettings:s}=u;j.useEffect(()=>i.onOpenSettings(s),[i,s]);const c=i.restartRuntime,f=u.sessionListing?.currentSessionId??null,p=c?async()=>{f&&WC(r.browserNamespace,f),await c()}:void 0;return d.jsx(W3,{state:u,surface:i.kind==="desktop"?"app":"web",personalUsageEnabled:!0,onReconnect:p,pickFiles:i.pickFiles,getPathForFile:i.getPathForFile,onOpenMemoryInEditor:i.openMemoryInEditor})}const Xc="rounded-lg px-4 py-2 text-[14px] font-medium disabled:opacity-60 focus-visible:outline focus-visible:outline-2";function t5({detail:t,retry:i}){const[r,u]=j.useState(!1),[s,c]=j.useState(null),f=()=>{i&&(u(!0),c(null),i().catch(p=>{u(!1),c(p instanceof Error?p.message:String(p))}))};return d.jsxs(d.Fragment,{children:[t?d.jsxs(d.Fragment,{children:["The agent process stopped:",d.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?d.jsx("div",{className:"mt-4",children:d.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"})}):d.jsx("p",{className:"mt-3",children:"Restart the app to reconnect."}),s?d.jsx("p",{className:"mt-3 text-[13px] text-destructive",children:s}):null]})}function n5({question:t,answer:i}){const{identity:r}=ai(),[u,s]=j.useState(!1),[c,f]=j.useState(null),p=g=>{s(!0),f(null),i(g).then(m=>{m.error!==void 0&&(s(!1),f(m.error))},m=>{s(!1),f(m instanceof Error?m.message:String(m))})};return d.jsx("div",{role:"dialog","aria-labelledby":"trust-title",className:"flex h-full flex-col",children:d.jsxs(df,{tone:"muted",children:[d.jsx("h1",{id:"trust-title",className:"text-[16px] font-medium text-foreground",children:"Do you trust this folder?"}),d.jsx("p",{className:"mt-2 break-all font-mono text-[13px] text-foreground",children:t.folder}),d.jsxs("p",{className:"mt-3",children:["Trusting this folder lets ",r.displayName," use the project's own settings, hooks, skills and MCP servers. Restricted starts without them."]}),t.loads.length>0?d.jsxs("details",{className:"mt-4 text-left",children:[d.jsx("summary",{className:"cursor-pointer text-[13px] text-muted-foreground hover:text-foreground",children:"Details"}),d.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(`
|
|
314
|
-
`)})]}):null,d.jsxs("div",{className:"mt-5 flex flex-wrap justify-center gap-2",children:[d.jsx("button",{type:"button",onClick:()=>p("trust"),disabled:u,className:`${Xc} bg-primary text-primary-foreground hover:opacity-90`,children:"Trust folder"}),d.jsx("button",{type:"button",onClick:()=>p("restricted"),disabled:u,className:`${Xc} bg-card text-foreground hover:opacity-90`,children:"Start Restricted"}),d.jsx("button",{type:"button",onClick:()=>p("quit"),disabled:u,className:`${Xc} text-muted-foreground hover:text-foreground`,children:"Quit"})]}),c?d.jsx("p",{role:"alert",className:"mt-3 whitespace-pre-wrap text-[13px] text-destructive",children:c}):null]})})}function l5({host:t,product:i}){return d.jsx(JC,{value:i,children:d.jsx(i5,{host:t})})}function i5({host:t}){const[i,r]=j.useState(null),[u,s]=j.useState(null),[c,f]=j.useState(null);return j.useEffect(()=>{let p=!1;const g=t.onState((m,y)=>{m==="fatal"&&s(y?{detail:y}:{})});return(async()=>{const m=await t.trustQuestion?.()??null;if(p)return;if(m){f(m);return}const y=await t.getEndpoint();p||r(y)})(),()=>{p=!0,g()}},[t]),u?d.jsx("div",{role:"alert",className:"flex h-full flex-col",children:d.jsx(df,{tone:"fatal",children:d.jsx(t5,{detail:u.detail,retry:t.restartRuntime})})}):c&&t.answerTrust?d.jsx(n5,{question:c,answer:t.answerTrust}):i?d.jsx(e5,{url:i,host:t}):d.jsx(df,{tone:"muted",children:"Starting the agent…"})}class r5 extends pf.Component{constructor(i){super(i),this.state={error:null}}static getDerivedStateFromError(i){return{error:i}}render(){return this.state.error?d.jsx("main",{className:"min-h-screen bg-[var(--background)] flex items-center justify-center p-8",children:d.jsxs("div",{className:"max-w-[600px] text-[15px] text-[var(--destructive)]",children:[d.jsx("p",{className:"mb-2 text-[20px] font-semibold text-[var(--foreground)]",children:"The application encountered an error"}),d.jsx("p",{className:"text-[var(--muted-foreground)] mb-2",children:this.state.error.message}),d.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 a5(t,i){const r=t?.trim();return r||`ws://${i}`}function u5(t){return t.querySelector('meta[name="ws-url"]')?.getAttribute("content")??null}function s5(t){const i=u5(t.document);if(i?.trim())return i.trim();const r=new URLSearchParams(t.location.search).get("ws");return a5(r,t.location.host)}function o5(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.runtimeMode==="remote"?void 0:()=>i.trustQuestion(),answerTrust:i.runtimeMode==="remote"?void 0:u=>i.answerTrust(u),pickFiles:i.runtimeMode==="remote"?void 0:()=>i.pickFiles(),getPathForFile:i.runtimeMode==="remote"?void 0:u=>i.getPathForFile(u),onOpenSettings:u=>i.onOpenSettings(u),openMemoryInEditor:i.runtimeMode==="remote"?void 0:u=>{i.openPath(u)}};const r=s5(t);return{kind:"browser",getEndpoint:async()=>r,signalReady:()=>{},onState:()=>()=>{},onOpenSettings:()=>()=>{}}}function c5(t){const i=t.getElementById("root");if(!i)throw new Error("No #root element");return i}var f5={identity:{id:"robota",displayName:"Robota",cliName:"robota",envPrefix:"ROBOTA_",packageScope:"@robota-sdk",repositoryUrl:"https://github.com/woojubb/robota",websiteUrl:"https://robota.io/",docsUrl:"https://docs.robota.io/",appId:"com.robota-sdk.desktop",protocolScheme:"robota"},storage:{browserNamespace:"robota",browserCredentialDatabase:"robota-credentials"},crypto:{namespace:"robota"},services:{}};const d5=o5({bridge:window.agentGui,document,location:window.location});C0.createRoot(c5(document)).render(d.jsx(pf.StrictMode,{children:d.jsx(r5,{children:d.jsx("div",{className:"h-screen w-screen overflow-hidden",children:d.jsx(l5,{host:d5,product:E0(document,f5)})})})}));
|